CN118673195A - Data searching method, device, computer equipment and storage medium - Google Patents
Data searching method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN118673195A CN118673195A CN202410800547.3A CN202410800547A CN118673195A CN 118673195 A CN118673195 A CN 118673195A CN 202410800547 A CN202410800547 A CN 202410800547A CN 118673195 A CN118673195 A CN 118673195A
- Authority
- CN
- China
- Prior art keywords
- target
- hash value
- bucket
- neighboring
- hash
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/907—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/909—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9014—Indexing; Data structures therefor; Storage structures hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Library & Information Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明涉及一种数据查找方法、装置、计算机设备及存储介质。该方法包括:根据目标点的坐标,从多个网格中确定出目标点所在的目标网格;根据目标网格的位置信息,确定目标点对应的目标哈希值;当所述目标哈希值小于或等于最大哈希值参数的参数值时,根据所述目标哈希值和每个预设方向的第一哈希值偏移量,确定所述目标哈希值的多个第一邻近桶哈希值;从多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点,第一桶集合包括:目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶,目标哈希值对应的目标桶、目标第一邻近桶哈希值对应的第一邻近桶在目标哈希表中。
The present invention relates to a data search method, device, computer equipment and storage medium. The method comprises: determining a target grid where the target point is located from multiple grids according to the coordinates of the target point; determining a target hash value corresponding to the target point according to the location information of the target grid; when the target hash value is less than or equal to the parameter value of the maximum hash value parameter, determining multiple first neighboring bucket hash values of the target hash value according to the target hash value and the first hash value offset of each preset direction; determining at least one target first neighboring bucket hash value from the multiple first neighboring bucket hash values, and searching for the nearest neighbor point corresponding to the target point from a first bucket set, the first bucket set comprising: a target bucket corresponding to the target hash value, a first neighboring bucket corresponding to each target first neighboring bucket hash value, and the target bucket corresponding to the target hash value and the first neighboring bucket corresponding to the target first neighboring bucket hash value in the target hash table.
Description
技术领域Technical Field
本发明涉及计算机技术领域,具体涉及一种数据查找方法、装置、计算机设备及存储介质。The present invention relates to the field of computer technology, and in particular to a data search method, device, computer equipment and storage medium.
背景技术Background Art
最近邻搜索即搜索与给定的一个点的距离最近的其他点是一些软件系统例如自动驾驶系统的常见的操作。在相关技术中,建立树结构,将每一个点作为一个树结构的一个节点。最近邻搜索需要遍历大量的节点,有时需要遍历整个树结构,造成最近邻搜索的效率较低,如何提升最近邻搜索的效率成为一个需要解决的问题。Nearest neighbor search, i.e. searching for other points closest to a given point, is a common operation in some software systems such as autonomous driving systems. In related technologies, a tree structure is established, and each point is regarded as a node in the tree structure. The nearest neighbor search needs to traverse a large number of nodes, and sometimes the entire tree structure, resulting in low efficiency of the nearest neighbor search. How to improve the efficiency of the nearest neighbor search has become a problem that needs to be solved.
发明内容Summary of the invention
本发明的目的之一在于提供一种数据查找方法、装置、计算机设备及存储介质,以解决如何提升最近邻搜索的效率。One of the purposes of the present invention is to provide a data search method, apparatus, computer device and storage medium to solve the problem of how to improve the efficiency of nearest neighbor search.
为了实现上述目的,本发明采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the present invention is as follows:
根据目标点的坐标,从多个网格中确定出目标点所在的目标网格;According to the coordinates of the target point, a target grid where the target point is located is determined from multiple grids;
根据目标网格的位置信息,确定目标点对应的目标哈希值;According to 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, determining a plurality of first adjacent bucket hash values of the target hash value according to the target hash value and the first hash value offset in each preset direction;
从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点,其中,第一桶集合包括:目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶,其中,目标哈希值对应的目标桶、目标第一邻近桶哈希值对应的第一邻近桶在目标哈希表中。At least one target first neighboring bucket hash value is determined from the multiple first neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is searched from the first bucket set, wherein the first bucket set includes: a target bucket corresponding to the target hash value, and a 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 a target hash table.
根据上述技术手段,目标哈希值对应的目标桶对应于目标点所在的目标网格,目标第一邻近桶哈希值对应的第一邻近桶对应目标网格的周围的网格。从由目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶组成的第一桶集合中查找目标点对应的最近邻点,相当于由目标网格、目标网格的周围的网格组成的少量的网格的存储在目标哈希表中的点中查找目标点对应的最近邻点。减少最近邻搜索涉及的点的数量,提升最近邻搜索的效率。According to the above technical means, the target bucket corresponding to the target hash value corresponds to the target grid where the target point is located, and the first neighboring bucket corresponding to the target first neighboring bucket hash value corresponds to the grid surrounding the target grid. Searching for the nearest neighbor point corresponding to the target point from the first bucket set consisting of the target bucket corresponding to the target hash value and the first neighboring bucket corresponding to each target first neighboring bucket hash value is equivalent to searching for the nearest neighbor point corresponding to the target point from the points stored in the target hash table of a small number of grids consisting of the target grid and the grids surrounding the target grid. Reduce the number of points involved in the nearest neighbor search and improve the efficiency of the nearest neighbor search.
进一步,还包括:Furthermore, it also includes:
当没有从第一桶集合中查找出目标点对应的最近邻点时,根据目标点对应的目标哈希值和每个预设方向的第二哈希值偏移量,确定所述目标哈希值的多个第二邻近桶哈希值;When the nearest neighbor point corresponding to the target point is not found from the first bucket set, determining multiple second neighboring bucket hash values of the target hash value according to the target hash value corresponding to the target point and the second hash value offset in each preset direction;
从所述多个第二邻近桶哈希值中确定出至少一个目标第二邻近桶哈希值,以及从第二桶集合中查找目标点对应的最近邻点,第二桶集合包括:每个目标第二邻近桶哈希值对应的第二邻近桶,其中,目标第二邻近桶哈希值对应的第二邻近桶在目标哈希表中。At least one target second neighboring bucket hash value is determined from the multiple second neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is searched from the second bucket set, the second bucket set including: a second neighboring bucket corresponding to each target second neighboring bucket hash value, wherein the second neighboring bucket corresponding to the target second neighboring bucket hash value is in the target hash table.
进一步,从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值之前,还包括:Further, before determining at least one target first adjacent bucket hash value from the plurality of first adjacent 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.
进一步,还包括: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.
进一步,还包括:Furthermore, it also includes:
根据所述目标哈希值和最大哈希值参数的参数值,确定每个预设方向的最大哈希值偏移量,其中,对于每个预设方向,所述预设方向的最大哈希值偏移量用于确定所述预设方向的相应哈希值偏移量。The maximum hash value offset of each preset direction is determined according to the target hash value and the parameter value of the maximum hash value parameter, wherein for each preset direction, the maximum hash value offset of the preset direction is used to determine the corresponding hash value offset of the preset direction.
一种数据查找装置,其特征在于:数据查找装置包括:A data search device, characterized in that the data search device comprises:
第一确定单元,用于根据目标点的坐标,从多个网格中确定出目标点所在的目标网格;A first determining unit, configured to determine a target grid where the target point is located from a plurality of grids according to the coordinates of the target point;
第二确定单元,用于根据目标网格的位置信息,确定目标点对应的目标哈希值;A second determining unit, configured to determine a target hash value corresponding to the target point according to the location information of the target grid;
第三确定单元,用于当所述目标哈希值小于或等于最大哈希值参数的参数值时,根据所述目标哈希值和每个预设方向的第一哈希值偏移量,确定所述目标哈希值的多个第一邻近桶哈希值;A third determining unit, configured to determine a plurality of first adjacent bucket hash values of the target hash value according to the target hash value and the first hash value offset in each preset direction when the target hash value is less than or equal to the parameter value of the maximum hash value parameter;
第四确定单元,用于从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点,其中,第一桶集合包括:目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶,其中,目标哈希值对应的目标桶、目标第一邻近桶哈希值对应的第一邻近桶在目标哈希表中。A fourth determination unit is used to determine at least one target first neighboring bucket hash value from the multiple first neighboring bucket hash values, and to search for the nearest neighbor point corresponding to the target point from the first bucket set, wherein the first bucket set includes: a target bucket corresponding to the target hash value, and a 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.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
继续查找单元,用于当没有从第一桶集合中查找出目标点对应的最近邻点时,根据目标点对应的目标哈希值和每个预设方向的第二哈希值偏移量,确定所述目标哈希值的多个第二邻近桶哈希值;从所述多个第二邻近桶哈希值中确定出至少一个目标第二邻近桶哈希值,以及从第二桶集合中查找目标点对应的最近邻点,第二桶集合包括:每个目标第二邻近桶哈希值对应的第二邻近桶,其中,目标第二邻近桶哈希值对应的第二邻近桶在目标哈希表中。A continuing search unit is used to determine multiple second neighboring bucket hash values of the target hash value according to the target hash value corresponding to the target point and the second hash value offset of each preset direction when the nearest neighbor point corresponding to the target point is not found from the first bucket set; determine at least one target second neighboring bucket hash value from the multiple second neighboring bucket hash values, and search for the nearest neighbor point corresponding to the target point from the second bucket set, the second bucket set including: a second neighboring bucket corresponding to each target second neighboring bucket hash value, wherein the second neighboring bucket corresponding to the target second neighboring bucket hash value is in the target hash table.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
第五确定单元,用于从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值之前,确定目标哈希表中是否存在所述目标桶;若否,创建所述目标桶,以及将所述目标桶存储在目标哈希表中。The fifth determining unit is used to determine whether the target bucket exists in the target hash table before determining at least one target first adjacent bucket hash value from the multiple first adjacent bucket hash values; if not, create the target bucket and store the target bucket in the target hash table.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
更新单元,用于当所述目标哈希值大于最大哈希值参数的参数值时,将最大哈希值参数的参数值更新为所述目标哈希值。An updating unit is configured 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.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
第六确定单元,用于根据所述目标哈希值和最大哈希值参数的参数值,确定每个预设方向的最大哈希值偏移量,其中,对于每个预设方向,所述预设方向的最大哈希值偏移量用于确定所述预设方向的相应哈希值偏移量。The sixth determining unit is used to determine the maximum hash value offset of each preset direction according to the target hash value and the parameter value of the maximum hash value parameter, wherein for each preset direction, the maximum hash value offset of the preset direction is used to determine the corresponding hash value offset of the preset direction.
一种计算机设备,包括:A computer device comprising:
存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行上述方法。A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above method by executing the computer instructions.
一种计算机可读存储介质,计算机可读存储介质上存储有计算机指令,计算机指令用于使计算机执行上述方法。A computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the above method.
一种计算机程序产品,其特征在于,包括计算机指令,所述计算机指令用于使计算机执行上述方法。A computer program product, characterized in that it includes computer instructions, wherein the computer instructions are used to enable a computer to execute the above method.
本发明的有益效果:Beneficial effects of the present invention:
目标哈希值对应的目标桶对应于目标点所在的目标网格,目标第一邻近桶哈希值对应的第一邻近桶对应目标网格的周围的网格。从由目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶组成的第一桶集合中查找目标点对应的最近邻点,相当于由目标网格、目标网格的周围的网格组成的少量的网格的存储在目标哈希表中的点中查找目标点对应的最近邻点。减少最近邻搜索涉及的点的数量,提升最近邻搜索的效率。The target bucket corresponding to the target hash value corresponds to the target grid where the target point is located, and the first neighboring bucket corresponding to the target first neighboring bucket hash value corresponds to the grids around the target grid. Searching for the nearest neighbor point corresponding to the target point from the first bucket set consisting of the target bucket corresponding to the target hash value and the first neighboring bucket corresponding to each target first neighboring bucket hash value is equivalent to searching for the nearest neighbor point corresponding to the target point from the points stored in the target hash table of a small number of grids consisting of the target grid and the grids around the target grid. Reduce the number of points involved in the nearest neighbor search and improve the efficiency of the nearest neighbor search.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的数据查找方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a data search method provided by an embodiment of the present invention;
图2为多个网格和多个网格对应的哈希值的示意图;FIG2 is a schematic diagram of multiple grids and hash values corresponding to the multiple grids;
图3为目标哈希值的多个第一邻近桶哈希值的示意图;FIG3 is a schematic diagram of a plurality of first neighboring bucket hash values of a target hash value;
图4为本发明实施例提供的另一数据查找方法的流程示意图;FIG4 is a schematic diagram of a flow chart of another data search method provided by an embodiment of the present invention;
图5为本发明实施例提供的一种计算机设备的硬件结构示意图。FIG5 is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
以下将参照附图和优选实施例来说明本发明的实施方式,本领域技术人员可由本说明书中所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。应当理解,优选实施例仅为了说明本发明,而不是为了限制本发明的保护范围。The following will describe the embodiments of the present invention 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 contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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, not for limiting the scope of protection of the present invention.
需要说明的是,以下实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
参考图1,其示出了本发明实施例提供的数据查找方法的流程示意图。Referring to FIG. 1 , there is shown a schematic flow chart of a data search method provided by an embodiment of the present invention.
在步骤S101,根据目标点的坐标,从多个网格中确定出目标点所在的目标网格。In step S101, according to the coordinates of the target point, a target grid where the target point is located is determined from a plurality of grids.
目标点的坐标为预先建立的二维坐标系中的坐标。目标点的坐标所属的点在预先建立的二维坐标系中。The coordinates of the target point are the coordinates in the 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.
作为一个示例,自动驾驶功能中的定位功能需要搜索目标点对应的最近邻点,预先建立的二维坐标系基于路面建立,目标点的坐标可以表示路面上的一个对象的位置,目标点对应的最近邻点的坐标表示里面上的与该对象的距离最近的对象的位置。As an example, the positioning function in the autonomous driving function needs to search for the nearest neighbor point corresponding to the target point. The pre-established two-dimensional coordinate system is established 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 point corresponding to the target point represent the position of the object on the road surface that is closest to the object.
在本发明实施例中,将目标点所在的网格叫做目标网格。In the embodiment of the present invention, the grid where the target point is located is called the target grid.
在本发明实施例中,多个网格通过对预先建立的二维坐标系下的区域进行划分得到。In the embodiment of the present invention, the plurality of grids are obtained by dividing a region in a pre-established two-dimensional coordinate system.
其中,每个网格的形状可以均为正方形,每个网格可以具有相同的边长。The shape of each grid may be a square, and each grid may have the same side length.
在本发明实施例中,可以根据网格的边长,确定目标点所在的目标网格的位置信息。从而,确定目标网格。In the embodiment of the present invention, the position information of the target grid where the target point is located can be determined according to the side length of the grid, thereby determining the target grid.
多个网格可以构成一个网格阵列。目标网格的位置信息可以表示:目标网格所在的网格阵列的行、目标网格所在的网格阵列的列。A plurality of grids may form a grid array. The location information of the target grid may be represented by: the row of the grid array where the target grid is located, and the column of the grid array where the target grid is located.
目标网格的位置信息可以包括:目标网格所在的网格阵列的行的序号、目标网格所在的网格阵列的列的序号。The location information of the target grid may include: the serial number of the row of the grid array where the target grid is located, and the serial number of the column of the grid array where the target grid is located.
可以采用以下公式确定目标网格的位置信息:The location information of the target grid can be determined using the following formula:
hx=floor(abs(x)/bucketWidth_);hx=floor(abs(x)/bucketWidth_);
hy=floor(abs(y)/bucketWidth_)。hy=floor(abs(y)/bucketWidth_).
其中,hx表示目标网格所在的网格阵列的行的序号,hy表示目标网格的所在的网格阵列的列的序号,bucketWidth为网格的边长,x为目标点的坐标中的在二维坐标系的水平方向的坐标轴即px轴的坐标值,y为目标点的坐标中的在二维坐标系的垂直方向的坐标轴即py轴的坐标值,floor()表示向下取整。Among them, hx represents the row number of the grid array where the target grid is located, hy represents the column number of the grid array where the target grid is located, bucketWidth is the side length of the grid, x is the coordinate value of the horizontal axis of the coordinate system of the target point in the two-dimensional coordinate system, that is, the px axis, y is the coordinate value of the vertical axis of the coordinate system of the target point in the two-dimensional coordinate system, that is, the py axis, and floor() means rounding down.
在步骤S102,根据目标网格的位置信息,确定目标点对应的目标哈希值。In step S102, a target hash value corresponding to the target point is determined according to the position information of the target grid.
在本发明实施例中,将目标点对应的哈希值叫做目标哈希值。In the embodiment of the present invention, the hash value corresponding to the target point is called the target hash value.
目标点对应的目标哈希值为:目标网格对应的哈希值。The target hash value corresponding to the target point is: the hash value corresponding to the target grid.
可以采用以下公式计算目标点对应的目标哈希值即目标网格对应的哈希值:The target hash value corresponding to the target point, that is, the hash value corresponding to the target grid, can be calculated using the following formula:
hash_value=hx*factor+hy。hash_value=hx*factor+hy.
其中,hash_value为目标哈希值,factor为预先设置的较大的常数,hx表示目标网格所在的网格阵列的行的序号,hy表示目标网格所在的网格阵列的列的序号。Among them, hash_value is the target hash value, factor is a preset large constant, hx represents the serial number of the row of the grid array where the target grid is located, and hy represents the serial number of the column of the grid array where the target grid is located.
在本说明书实施例中,目标哈希表包括:桶(Bucket)。In the embodiment of this specification, the target hash table includes: a bucket.
目标哈希表中每个桶在目标哈希表中不同的存储位置。目标哈希表每个桶对应的不同的哈希值。Each bucket in the target hash table has a different storage location in the target hash table. Each bucket in the target hash table corresponds to a different hash value.
对于目标哈希表中一个桶,该桶在对应于该桶对应的哈希值的存储位置。For a bucket in the target hash table, the bucket is at a storage location corresponding to the hash value corresponding to the bucket.
目标哈希表中每个桶对应不同的网格。Each bucket in the target hash table corresponds to a different grid.
每个网格分别对应不同的哈希值。Each grid corresponds to a different hash value.
对于目标哈希表中一个桶,该桶对应的哈希值为:对应于该桶对应的网格的哈希值。For a bucket in the target hash table, the hash value corresponding to the bucket is: the hash value of the grid corresponding to the bucket.
对于一个网格,该网格对应的哈希值为:该网格中的点对应的哈希值。For a grid, the hash value corresponding to the grid is: the hash value corresponding to the point in the grid.
对于一个网格,该网格中每个点对应同一个哈希值,该网格中每个点的坐标均存储在位于对应于该同一个哈希值的存储位置的桶中,位于对应于该同一个哈希值的存储位置的桶为该网格对应的桶。For a grid, each point in the grid corresponds to the same hash value, and the coordinates of each point in the grid are stored in a bucket located at a storage position corresponding to the same hash value, and the bucket located at the storage position corresponding to the same hash value is the bucket corresponding to the grid.
参考图2,其示出了多个网格和多个网格对应的哈希值的示意图。Refer to FIG2 , which shows a schematic diagram of multiple grids and hash values corresponding to the multiple grids.
图2示出了二维坐标系的水平方向的坐标轴即px轴、垂直方向的坐标轴即py轴。图2示出了多个网格,多个网格构成一个网格阵列。每个网格为一个正方形。网格中数字为网格对应的哈希值即网格中的点对应的哈希值。例如,网格中的数字为4005的网格对应的哈希值为4005,网格中的数字为4005的网格中的每个点对应的哈希值均为4005。网格中的数字为5005的网格对应的哈希值为5005,网格中的数字为5005的网格中的每个点对应的哈希值均为5005。网格中的数字为6005的网格对应的哈希值为6005,网格中的数字为6005的网格中的每个点对应的哈希值均为6005。若网格中的数字为5005的网格为目标网格,则左方向的最大哈希值偏移量为5,右方向的最大哈希值偏移量为4,下方向的最大哈希值偏移量为5,上方向的最大哈希值偏移量为4。FIG. 2 shows the horizontal coordinate axis of the two-dimensional coordinate system, i.e., the px axis, and the vertical coordinate axis, i.e., the py axis. FIG. 2 shows a plurality of grids, which constitute a grid array. Each grid is a square. The number in the grid is the hash value corresponding to the grid, i.e., the hash value corresponding to the point in the grid. For example, the hash value corresponding to the grid with the number 4005 in the grid is 4005, and the hash value corresponding to each point in the grid with the number 4005 in the grid is 4005. The hash value corresponding to the grid with the number 5005 in the grid is 5005, and the hash value corresponding to each point in the grid with the number 5005 in the grid is 5005. The hash value corresponding to the grid with the number 6005 in the grid is 6005, and the hash value corresponding to each point in the grid with the number 6005 in the grid is 6005. If the grid with the number 5005 in the grid is the target grid, the maximum hash value offset in the left direction is 5, the maximum hash value offset in the right direction is 4, the maximum hash value offset in the lower direction is 5, and the maximum hash value offset in the upper direction is 4.
在一个可能的实现方式中,从多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值之前,还包括:确定目标哈希表中是否存在目标桶;若确定目标哈希表中不存在目标桶,创建目标桶,以及将目标桶存储在目标哈希表中。从而,无需要求必须创建目标哈希表中的所有存储位置的桶才能进行最近邻搜索,提升最近邻搜索的便利性。In a possible implementation, before determining at least one target first neighboring bucket hash value from a plurality of first neighboring bucket hash values, the method further includes: determining whether a target bucket exists in a target hash table; if it is determined that the target bucket does not exist in the target hash table, creating a target bucket, and storing the target bucket in the target hash table. Thus, it is not necessary to create buckets of all storage locations in the target hash table in order to perform a nearest neighbor search, thereby improving the convenience of the nearest neighbor search.
在步骤S103,当目标哈希值小于或等于最大哈希值参数的参数值时,根据目标哈希值和每个预设方向的第一哈希值偏移量,确定目标哈希值的多个第一邻近桶哈希值。In step S103, when the target hash value is less than or equal to the parameter value of the maximum hash value parameter, a plurality of first adjacent bucket hash values of the target hash value are determined according to the target hash value and the first hash value offset in each preset direction.
其中,最大哈希值参数的参数值指示目标哈希表中桶对应的最大哈希值。也就是说,最大哈希值参数的参数值指示由目标哈希表中每个桶对应的哈希值组成的哈希值集合中最大的哈希值。The parameter value of the maximum hash value parameter indicates the maximum hash value corresponding to the bucket in the target hash table. That is, the parameter value of the maximum hash value parameter indicates the maximum hash value in the hash value set composed of the hash values corresponding to each bucket in the target hash table.
需要说明的是,目标哈希表中桶对应的最大哈希值应该理解为变量。It should be noted that the maximum hash value corresponding to the bucket in the target hash table should be understood as a variable.
在步骤S103,将目标哈希值与最大哈希值参数的参数值进行比较。当目标哈希值小于或等于最大哈希值参数的参数值时,根据目标哈希值和每个预设方向的第一哈希值偏移量,确定目标哈希值的多个第一邻近桶哈希值。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 adjacent bucket hash values of the target hash value are determined according to the target hash value and the first hash value offset in each preset direction.
在本发明实施例中,预设方向为水平方向或垂直方向。预设方向的数量为四个,上、下、左、右分别作为预设方向。In the embodiment of the present invention, the preset direction is a horizontal direction or a vertical direction. There are four preset directions, namely, up, down, left, and right.
需要说明的是,左方向可以叫做二维坐标系中的X轴负方向。右方向可以叫做二维坐标系中的X轴正方向。上方向可以叫做二维坐标系中的Y轴正方向。下方向可以叫做二维坐标系中的Y轴负方向。It should be noted that the left direction can be called the negative direction of the X axis in the two-dimensional coordinate system. The right direction can be called the positive direction of the X axis in the two-dimensional coordinate system. The upper direction can be called the positive direction of the Y axis in the two-dimensional coordinate system. The lower direction can be called the negative direction of the Y axis in the two-dimensional coordinate system.
每个预设方向的第一哈希值偏移量可以根据每个预设方向的预设第一哈希值偏移量确定。The first Hash value offset of each preset direction may be determined according to the preset first Hash value offset of each preset direction.
对于每个预设方向,该预设方向的预设第一哈希值偏移量是正整数还是负整数是预先设置的。For each preset direction, whether the preset first hash value offset of the preset direction is a positive integer or a negative integer is preset.
对于每个预设方向,该预设方向的预设第一哈希值偏移量是预先设置的。For each preset direction, the preset first hash value offset of the preset direction is preset.
在发明实施例中,每个预设方向的预设第一哈希值偏移量的绝对值可以为同一个值。In the embodiment of the invention, the absolute value of the preset first hash value offset in each preset direction may be the same value.
作为一个示例,每个预设方向的预设第一哈希值偏移量的绝对值为1。As an example, the absolute value of the preset first hash value offset in each preset direction is 1.
对于每个预设方向,该预设方向的预设第一哈希值偏移量是正整数还是负整数是预先设置的。For each preset direction, whether the preset first hash value offset of the preset direction is a positive integer or a negative integer is preset.
在发明实施例中,每个预设方向的预设第一哈希值偏移量的绝对值可以为同一个值。In the embodiment of the invention, the absolute value of the preset first hash value offset in each preset direction may be the same value.
作为一个示例,每个预设方向的预设第一哈希值偏移量的绝对值为1。As an example, the absolute value of the preset first hash value offset in each preset direction is 1.
左方向的预设第一哈希值偏移量为负整数,右方向的预设第一哈希值偏移量为正整数,下方向的预设第一哈希值偏移量为负整数,上方向的预设第一哈希值偏移量为正整数。The preset first Hash value offset in the left direction is a negative integer, the preset first Hash value offset in the right direction is a positive integer, the preset first Hash value offset in the downward direction is a negative integer, and the preset first Hash value offset in the upward direction is a positive integer.
在本发明实施例中,对于一个预设方向,若该预设方向的预设第一哈希值偏移量小于或等于该预设方向的最大哈希值偏移量,可以将该预设方向的预设第一哈希值偏移量确定为该预设方向的第一哈希值偏移量。In the 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 may be determined as the first hash value offset of the preset direction.
在本发明实施例中,对于一个预设方向,若该预设方向的预设第一哈希值偏移量大于该预设方向的最大哈希值偏移量,则可以将该预设方向的最大哈希值偏移量确定为该预设方向的第一哈希值偏移量。In the embodiment of the present 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, the maximum hash value offset of the preset direction may be determined as the first hash value offset of the preset direction.
在本发明实施例中,对于一个预设方向,该预设方向的最大哈希值偏移量可以为:网格阵列中该预设方向上的最后一个网格的序号减目标网格在该预设方向上的序号。该预设方向上的最后一个网格的序号为i,表示该预设方向上的最后一个网格为该预设方向上的第i+1个网格。目标网格在该预设方向上的序号j,表示目标网格为该预设方向上的第j+1个网格。In an embodiment of the present invention, for a preset direction, the maximum hash value offset of the preset direction may be: the sequence number of the last grid in the preset direction in the grid array minus the sequence number of the target grid in the preset direction. The sequence number of the last grid in the preset direction is i, indicating that the last grid in the preset direction is the i+1th grid in the preset direction. The sequence number of the target grid in the preset direction is j, indicating that the target grid is the j+1th grid in the preset direction.
在一个可能的实现方式中,还包括:根据目标哈希值和最大哈希值参数的参数值,确定每个预设方向的最大哈希值偏移量,其中,对于每个预设方向,该预设方向的最大哈希值偏移量用于确定该预设方向的相应哈希值偏移量。从而,可以快速地确定预设方向的最大哈希值偏移量。In a possible implementation, the method further includes: determining a maximum hash value offset of each preset direction according to the target hash value and the parameter value of the maximum hash value parameter, wherein for each preset direction, the maximum hash value offset of the preset direction is used to determine a corresponding hash value offset of the preset direction. Thus, the maximum hash value offset of the preset direction can be quickly determined.
可以采用以下公式计算左方向的最大哈希值偏移量:The maximum hash value offset in the left direction can be calculated using the following formula:
expend_x_l=floor(hash_value/factor_)*-1。expend_x_l=floor(hash_value/factor_)*-1.
其中,expend_x_l为左方向的最大哈希值偏移量,hash_value为目标哈希值,factor为预先设置的较大的常数。Among them, expend_x_l is the maximum hash value offset in the left direction, hash_value is the target hash value, and factor is a preset large constant.
可以采用以下公式计算右方向的最大哈希值偏移量:The maximum hash value offset in the right direction can be calculated using the following formula:
expend_x_r=floor((max_hash-hash_value)/factor);expend_x_r=floor((max_hash-hash_value)/factor);
其中,expend_x_l表示右方向的最大哈希值偏移量,hash_value为目标哈希值,factor为预先设置的较大的常数,max_hash为最大哈希值参数的参数值。Among them, expend_x_l represents the maximum hash value offset in the right direction, hash_value is the target hash value, factor is a preset large constant, and max_hash is the parameter value of the maximum hash value parameter.
可以采用以下公式计算下方向的最大哈希值偏移量记为expend_y_d:The maximum hash value offset in the downward direction can be calculated using the following formula and recorded as expend_y_d:
expend_y_d=(hash_value%factor)*-1;expend_y_d=(hash_value%factor)*-1;
其中,expend_y_d为下方向的最大哈希值偏移量,hash_value为目标哈希值,factor为预先设置的较大的常数。Among them, expend_y_d is the maximum hash value offset in the downward direction, hash_value is the target hash value, and factor is a preset large constant.
可以采用以下公式计算上方向的最大哈希值偏移量:The maximum hash value offset in the upward direction can be calculated using the following formula:
expend_y_u=(max_hash-hash_value)%factor。expend_y_u=(max_hash-hash_value)%factor.
其中,expend_y_u为上方向的最大哈希值偏移量,hash_value为目标哈希值,factor为预先设置的较大的常数。Among them, expend_y_u is the maximum hash value offset in the upward direction, hash_value is the target hash value, and factor is a preset large constant.
在步骤S103,可以确定以右方向的第一哈希值偏移量为右端点并且以左方向的第一哈希值偏移量为左端点的第一区间。将第一区间内的每个正整数分别作为一个第一区间内第一哈希值偏移量。可以确定以上方向的第一哈希值偏移量为右端点并且以下方向的第一哈希值偏移量为左端点的第二区间。将第二区间内每个正整数分别作为一个第二区间内第一哈希值偏移量。可以将第一区间内第一哈希值偏移量与第二区间内第一哈希值偏移量进行组合,得到多个第一哈希值偏移量组合。计算每个第一哈希值偏移量组合对应的第一邻近桶哈希值,将每个第一哈希值偏移量组合对应的第一邻近桶哈希值分别作为目标哈希值的多个第一邻近桶哈希值。In step S103, a first interval with the first hash value offset in the right direction as the right endpoint and the first hash value offset in the left direction as the left endpoint can be determined. Each positive integer in the first interval is used as a first hash value offset in the first interval. A second interval with the first hash value offset in the upper direction as the right endpoint and the first hash value offset in the lower direction as the left endpoint can be determined. Each positive integer in the second interval is used as a first hash value offset in the second interval. The first hash value offset in the first interval can be combined with the first hash value offset in the second interval to obtain multiple first hash value offset combinations. The first neighboring bucket hash value corresponding to each first hash value offset combination is calculated, and the first neighboring bucket hash value corresponding to each first hash value offset combination is used as multiple first neighboring bucket hash values of the target hash value.
在本发明实施例中,可以采用以下公式,计算一个第一哈希值偏移量组合对应的第一邻近桶哈希值:In the embodiment of the present invention, the following formula may be used to calculate the first adjacent bucket hash value corresponding to a first hash value offset combination:
neighborHash=hash_value+dx*factor+dyneighborHash=hash_value+dx*factor+dy
其中,neighborHash为该第一哈希值偏移量组合对应的第一邻近桶哈希值,hash_value为目标哈希值,dx为该第一哈希值偏移量组合中的第一区间内第一哈希值偏移量,dy为该第一哈希值偏移量组合中的第二区间内第一哈希值偏移量。Among them, neighborHash is the first neighboring bucket hash value 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.
作为一个示例,上方向的第一哈希值偏移量为1、下方向的第一哈希值偏移量为-1、左方向第一哈希值偏移量为-1、右方向的第一哈希值偏移量为1。确定以右方向的第一哈希值偏移量为右端点并且以左方向的第一哈希值偏移量为左端点的第一区间,第一区间为【-1,1】。确定以上方向的第一哈希值偏移量为右端点并且以下方向的第一哈希值偏移量为左端点的第二区间,第二区间为【-1,1】。将第一区间内的每个正整数即-1、0,1分别作为一个第一区间内第一哈希值偏移量。将第二区间内每个正整数即-1、0,1分别作为一个第二区间内第一哈希值偏移量。可以将第一区间内第一哈希值偏移量与第二区间内第一哈希值偏移量进行组合,得到多个第一哈希值偏移量组合。多个第一哈希值偏移量组合包括:由为-1的第一区间内第一哈希值偏移量和为-1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、由为-1的第一区间内第一哈希值偏移量和为0的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、由为-1的第一区间内第一哈希值偏移量和为1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合。多个第一哈希值偏移量组合还包括:由为0的第一区间内第一哈希值偏移量和为-1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、为0的第一区间内第一哈希值偏移量和为0的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、为0的第一区间内第一哈希值偏移量和为1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合。多个第一哈希值偏移量组合还包括:由为1的第一区间内第一哈希值偏移量和为-1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、由为1的第一区间内第一哈希值偏移量和为0的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合、由为1的第一区间内第一哈希值偏移量和为1的第二区间内第一哈希值偏移量组成的第一哈希值偏移量组合。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 the right endpoint and the first hash value offset in the left direction as the left endpoint, and the first interval is [-1, 1]. Determine a second interval with the first hash value offset in the upward direction as the right endpoint and the first hash value offset in the downward direction as the left endpoint, and the second interval is [-1, 1]. Take each positive integer in the first interval, i.e., -1, 0, 1, as a first hash value offset in a first interval. Take each positive integer in the second interval, i.e., -1, 0, 1, as a first hash value offset in a second interval. The first hash value offset in the first interval can be combined with the first hash value offset in the second interval to obtain multiple first hash value offset combinations. The plurality of first hash value offset combinations include: a first hash value offset combination consisting of a first hash value offset in a first interval of -1 and a first hash value offset in a second interval of -1, a first hash value offset combination consisting of a first hash value offset in a first interval of -1 and a first hash value offset in a second interval of 0, and a first hash value offset combination consisting of a first hash value offset in a first interval of -1 and a first hash value offset in a second interval of 1. The plurality of first hash value offset combinations also include: a first hash value offset combination consisting of a first hash value offset in a first interval of 0 and a first hash value offset in a second interval of -1, a first hash value offset combination consisting of a first hash value offset in a first interval of 0 and a first hash value offset in a second interval of 0, and a first hash value offset combination consisting of a first hash value offset in a first interval of 0 and a first hash value offset in a second interval of 1. The multiple first hash value offset combinations also include: a first hash value offset combination consisting of a first hash value offset in a first interval of 1 and a first hash value offset in a second interval of -1, a first hash value offset combination consisting of a first hash value offset in a first interval of 1 and a first hash value offset in a second interval of 0, and a first hash value offset combination consisting of a first hash value offset in a first interval of 1 and a first hash value offset in a second interval of 1.
若上方向的第一哈希值偏移量为1、下方向的第一哈希值偏移量为-1、左方向第一哈希值偏移量为-1、右方向的第一哈希值偏移量为1,计算每个第一哈希值偏移量组合对应的第一邻近桶哈希值的过程可以采用以下伪代码表示: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 adjacent bucket hash value corresponding to each first hash value offset combination can be expressed by the following pseudo code:
for(intdx=1;dx<=1;x++){for(intdx=1;dx<=1;x++){
for(intdy=-1;dy=1;y++)for(intdy=-1; dy=1; y++)
{{
intneighborHash=(hash_value+dx*factor+dy)intneighborHash=(hash_value+dx*factor+dy)
}}
}}
参考图3,其示出了目标哈希值的多个第一邻近桶哈希值的示意图。Referring to FIG. 3 , it shows a schematic diagram of multiple first neighboring bucket hash values of a target hash value.
在该示例中,上方向的第一哈希值偏移量为1,下方向的第一哈希值偏移量为-1,左方向第一哈希值偏移量为-1,右方向的第一哈希值偏移量为1。目标哈希值为5005,factor为1000。目标哈希值为5005。图3示出了目标网格、目标网格的周围的网格。图3示出了目标网格对应的目标哈希值即5005。图3示出了按照上述用于计算一个点对应的哈希值的公式计算目标点对应的目标哈希值计算出的目标哈希值的多个第一邻近桶哈希值。目标哈希值的多个第一邻近桶哈希值包括: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、5005+1*1000-1即6004。第一邻近桶哈希值对应的网格为目标网格的周围的网格。第一邻近桶哈希值对应的第一邻近桶中坐标所属的点为第一邻近桶哈希值对应的网格中的点。例如,对应的第一邻近桶哈希值为5006的网格为上方向上的与目标网格最近的网格。对应的第一邻近桶哈希值为5004的网格为下方向上的与目标网格最近的网格。对应的第一邻近桶哈希值为4005的网格为左方向上的与目标网格最近的网格。对应的第一邻近桶哈希值为6005的网格为右方向上的与目标网格最近的网格。In this 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. The target hash value is 5005, and the factor is 1000. The target hash value is 5005. FIG. 3 shows a target grid and grids around the target grid. FIG. 3 shows a target hash value corresponding to the target grid, i.e., 5005. FIG. 3 shows multiple first neighboring bucket hash values of the target hash value calculated by calculating the target hash value corresponding to a target point according to the above formula for calculating the hash value corresponding to a point. The multiple first neighboring bucket hash values of the target hash value include: 5005+0*1000+1, i.e., 5006, 5005+0*1000-1, i.e., 5004, 5005-1*1000+1, i.e., 4006, 5005-1*1000+0, i.e., 4005, 5005-1*1000-1, i.e., 4004, 5005+1*1000+1, i.e., 6006, 5005+1*1000+0, i.e., 6005, 5005+1*1000-1, i.e., 6004. The grid corresponding to the first neighboring bucket hash value is the grid around the target grid. The point to which the coordinates in the first neighboring bucket corresponding to the first neighboring bucket hash value belong is the point in the grid corresponding to the first neighboring bucket hash value. For example, the grid whose corresponding first neighboring bucket hash value is 5006 is the grid closest to the target grid in the upper direction. The grid whose corresponding first neighboring bucket hash value is 5004 is the grid closest to the target grid in the downward direction. The grid whose corresponding first neighboring bucket hash value is 4005 is the grid closest to the target grid in the left direction. The grid whose corresponding first neighboring bucket hash value is 6005 is the grid closest to the target grid in the right direction.
在一个可能的实现方式中,还包括:当目标哈希值大于最大哈希值参数的参数值时,将最大哈希值参数的参数值更新为目标哈希值。从而,目标哈希值可以用于后续的对其他点的对应的最近邻点的最近邻搜索。In a possible implementation, the method further includes: when the target hash value is greater than the parameter value of the maximum hash value parameter, updating the parameter value of the maximum hash value parameter to the target hash value. Thus, the target hash value can be used for subsequent nearest neighbor searches for the nearest neighbor points corresponding to other points.
在步骤S104,从多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点。In step S104, at least one target first neighboring bucket hash value is determined from the plurality of first neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is searched from the first bucket set.
在步骤S104,对于一个第一邻近桶哈希值,可以确定目标哈希表中该第一邻近桶哈希值对应的存储位置是否有桶,若该第一邻近桶哈希值对应的存储位置有桶,可以将该第一邻近桶哈希值确定为目标第一邻近桶哈希值。In step S104, for a first neighboring bucket hash value, it can be determined whether there is a bucket at the storage location corresponding to the first neighboring bucket hash value in the target hash table. If there is a bucket at 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.
第一桶集合包括:目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶。The first bucket set includes: a target bucket corresponding to the target hash value, and a first adjacent bucket corresponding to each target first adjacent bucket hash value.
目标哈希值对应的目标桶存储在目标哈希表中目标哈希值对应的存储位置。The target bucket corresponding to the target hash value is stored in the storage location corresponding to the target hash value in the target hash table.
对于一个目标第一邻近桶哈希值,该目标第一邻近桶哈希值对应的第一邻近桶存储在目标哈希表中该目标第一邻近桶哈希值对应的存储位置。For a target first-neighboring bucket hash value, the first neighboring bucket corresponding to the target first-neighboring bucket hash value is stored in the storage location corresponding to the target first-neighboring bucket hash value in the target hash table.
在步骤S104,为了从第一桶集合中查找目标点对应的最近邻点,可以确定第一桶集合的点集合。In step S104 , in order to find the nearest neighbor point corresponding to the target point from the first bucket set, a point set of the first bucket set may be determined.
第一桶集合的点集合包括:目标哈希值对应的目标桶中每个坐标所属的点、每个目标第一邻近桶哈希值对应的第一邻近桶的点集合。The point set of the first bucket set includes: the point to which each coordinate in the target bucket corresponding to the target hash value belongs, and the point set of the first neighboring bucket corresponding to each target first neighboring bucket hash value.
对于一个目标第一邻近桶哈希值,该目标第一邻近桶哈希值对应的第一邻近桶的点集合包括:该目标第一邻近桶哈希值对应的第一邻近桶中每个坐标所属的点。For a target first neighboring bucket hash value, the point set of the first neighboring bucket corresponding to the target first neighboring bucket hash value includes: the point to which each coordinate in the first neighboring bucket corresponding to the target first neighboring bucket hash value belongs.
在步骤S104,若第一桶集合的点集合为空集合,则可以确定没有从第一桶集合中查找目标点对应的最近邻点。In step S104, if the point set of the first bucket set is an empty set, it can be determined that no nearest neighbor point corresponding to the target point is found in the first bucket set.
在步骤S104,若第一桶集合的点集合不是空集合,则可以计算第一桶集合的点集合中每个点与目标点之间的欧式距离。可以确定第一桶集合的点集合中与目标点的欧式距离最小的点,将与目标点的欧式距离最小的点确定为目标点对应的最近邻点。In step S104, if the point set of the first bucket set is not an empty set, the Euclidean distance between each point in the point set of the first bucket set and the target point can be calculated. The point in the point set of the first bucket set with the smallest Euclidean distance to the target point can be determined, and the point with the smallest Euclidean distance to the target point is determined as the nearest neighbor point corresponding to the target point.
参考图4,其示出了本发明实施例提供的另一数据查找方法的流程示意图。Referring to FIG. 4 , there is shown a schematic flow chart of another data search method provided by an embodiment of the present invention.
在步骤S401,根据目标点的坐标,从多个网格中确定出目标点所在的目标网格。In step S401, according to the coordinates of the target point, a target grid where the target point is located is determined from multiple grids.
步骤S401的过程参考步骤S101的过程。The process of step S401 refers to the process of step S101.
在步骤S402,根据目标网格的位置信息,确定目标点对应的目标哈希值。In step S402, a target hash value corresponding to the target point is determined according to the location information of the target grid.
步骤S402的过程参考步骤S102的过程。The process of step S402 refers to the process of step S102.
在步骤S403,当目标哈希值小于或等于最大哈希值参数的参数值时,根据目标哈希值和每个预设方向的第一哈希值偏移量,确定目标哈希值的多个第一邻近桶哈希值。In step S403, when the target hash value is less than or equal to the parameter value of the maximum hash value parameter, a plurality of first adjacent bucket hash values of the target hash value are determined according to the target hash value and the first hash value offset in each preset direction.
步骤S403的过程参考步骤S103的过程。The process of step S403 refers to the process of step S103.
在步骤S404,从多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点。In step S404, at least one target first neighboring bucket hash value is determined from the plurality of first neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is searched from the first bucket set.
步骤S404的过程参考步骤S104的过程。The process of step S404 refers to the process of step S104.
在步骤S405,当没有从第一桶集合中查找出目标点对应的最近邻点时,根据目标点对应的目标哈希值和每个预设方向的第二哈希值偏移量,确定目标哈希值的多个第二邻近桶哈希值。In step S405, when the nearest neighbor point corresponding to the target point is not found from the first bucket set, multiple second neighboring bucket hash values of the target hash value are determined according to the target hash value corresponding to the target point and the second hash value offset in each preset direction.
作为一个示例,上方向的第二哈希值偏移量为2、下方向的第二哈希值偏移量为-2、左方向第二哈希值偏移量为-2、右方向的第二哈希值偏移量为2。As an example, the second Hash value offset in the upward direction is 2, the second Hash value offset in the downward direction is -2, the second Hash value offset in the left direction is -2, and the second Hash value offset in the right direction is 2.
需要说明的是,在本发明实施例中,可以根据目标点对应的目标哈希值和每个预设方向的第k哈希值偏移量,确定目标哈希值的多个第k邻近桶哈希值。每个预设方向的第k哈希值偏移量可以根据每个预设方向的预设第k哈希值偏移量确定。It should be noted that, in the embodiment of the present invention, multiple k-th neighboring bucket hash values of the target hash value can be determined according to the target hash value corresponding to the target point and the k-th hash value offset of each preset direction. The k-th hash value offset of each preset direction can be determined according to the preset k-th hash value offset of each preset direction.
对于每个预设方向,该预设方向的预设第k哈希值偏移量的绝对值大于该预设方向的预设第k-1哈希值偏移量的绝对值,该预设方向的预设第k哈希值偏移量的绝对值减去该预设方向的预设第k-1哈希值偏移量的绝对值的结果为预设搜索半径递增值。For each preset direction, the absolute value of the preset kth hash value offset of the preset direction is greater than the absolute value of the preset k-1th hash value offset of the preset direction, and the result of subtracting the absolute value of the preset k-1th hash value offset of the preset direction from the absolute value of the preset k-1th hash value offset of the preset direction is the preset search radius increment value.
对于每个预设方向,该预设方向的预设第二哈希值偏移量是正整数还是负整数是预先设置的。For each preset direction, whether the preset second hash value offset of the preset direction is a positive integer or a negative integer is preset.
对于每个预设方向,该预设方向的预设第二哈希值偏移量是预先设置的。For each preset direction, the preset second hash value offset of the preset direction is preset.
在发明实施例中,每个预设方向的预设第二哈希值偏移量的绝对值可以为同一个值。In the embodiment of the invention, the absolute value of the preset second hash value offset in each preset direction may be the same value.
作为一个示例,每个预设方向的预设第二哈希值偏移量的绝对值为2。As an example, the absolute value of the preset second hash value offset in each preset direction is 2.
对于每个预设方向,该预设方向的预设第二哈希值偏移量的绝对值大于该预设方向的预设第一哈希值偏移量的绝对值,该预设方向的预设第二哈希值偏移量的绝对值减去该预设方向的预设第一哈希值偏移量的绝对值的结果为预设搜索半径递增值。作为一个示例,预设搜索半径递增值为1。For each preset direction, the absolute value of the preset second Hash value offset of the preset direction is greater than the absolute value of the preset first Hash value offset of the preset direction, and the result of subtracting the absolute value of the preset first Hash value offset of the preset direction from the absolute value of the preset second Hash value offset of the preset direction is the preset search radius increment value. As an example, the preset search radius increment value is 1.
在本发明实施例中,对于一个预设方向,若该预设方向的预设第二哈希值偏移量小于或等于该预设方向的最大哈希值偏移量,可以将该预设方向的预设第二哈希值偏移量作为该预设方向的第二哈希值偏移量。In the 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 may be used as the second hash value offset of the preset direction.
在本发明实施例中,对于一个预设方向,若该预设方向的预设第二哈希值偏移量大于该预设方向的最大哈希值偏移量,则可以将该预设方向的最大哈希值偏移量作为该预设方向的第二哈希值偏移量。In the embodiment of the present 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, the maximum hash value offset of the preset direction may be used as the second hash value offset of the preset direction.
在步骤S405,可以确定由右方向的第二哈希值偏移量、左方向的第二哈希值偏移量组成的第一集合。可以确定由上方向的第二哈希值偏移量、下方向的第二哈希值偏移量组成的第二集合。将第一集合中的第二哈希值偏移量与第二集合中的第二哈希值偏移量进行组合,得到多个第二哈希值偏移量组合。计算每个第二哈希值偏移量组合对应的第二邻近桶哈希值,将每个第二哈希值偏移量组合对应的第二邻近桶哈希值分别作为目标哈希值的多个第二邻近桶哈希值。In step S405, a first set consisting of a second hash value offset in the right direction and a second hash value offset in the left direction may be determined. A second set consisting of a second hash value offset in the upper direction and a second hash value offset in the lower direction may be determined. The second hash value offset in the first set is combined with the second hash value offset in the second set to obtain a plurality of second hash value offset combinations. The second adjacent bucket hash value corresponding to each second hash value offset combination is calculated, and the second adjacent bucket hash value corresponding to each second hash value offset combination is used as a plurality of second adjacent bucket hash values of the target hash value.
在本发明实施例中,可以采用以下公式,计算一个第二哈希值偏移量组合对应的第二邻近桶哈希值:In the embodiment of the present invention, the following formula may be used to calculate the second adjacent bucket hash value corresponding to a second hash value offset combination:
neighborHash’=hash_value+dx’*factor+dy’neighborHash’=hash_value+dx’*factor+dy’
其中,neighborHash’为该第二哈希值偏移量组合对应的第二邻近桶哈希值,hash_value为目标哈希值,dx’为该第二哈希值偏移量组合中的属于第一集合的第二哈希值偏移量,dy’为该第二哈希值偏移量组合中的属于第二集合的第二哈希值偏移量。Among them, neighborHash’ is the second neighbor 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.
在步骤S406,从多个第二邻近桶哈希值中确定出至少一个目标第二邻近桶哈希值,以及从第二桶集合中查找目标点对应的最近邻点。In step S406, at least one target second neighboring bucket hash value is determined from the plurality of second neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is searched from the second bucket set.
第二桶集合包括:每个目标第二邻近桶哈希值对应的第二邻近桶。The second bucket set includes: a second adjacent bucket corresponding to each target second adjacent bucket hash value.
其中,目标第二邻近桶哈希值对应的第二邻近桶在目标哈希表中。The second adjacent bucket corresponding to the target second adjacent bucket hash value is in the target hash table.
在步骤S406,对于一个第二邻近桶哈希值,可以确定目标哈希表中该第二邻近桶哈希值对应的存储位置是否有桶,若该第二邻近桶哈希值对应的存储位置有桶,可以将该第二邻近桶哈希值确定为目标第二邻近桶哈希值。In step S406, for a second adjacent bucket hash value, it can be determined whether there is a bucket at the storage location corresponding to the second adjacent bucket hash value in the target hash table. If there is a bucket at the storage location corresponding to the second adjacent bucket hash value, the second adjacent bucket hash value can be determined as the target second adjacent bucket hash value.
对于一个目标第二邻近桶哈希值,该目标第二邻近桶哈希值对应的第二邻近桶存储在目标哈希表中该目标第二邻近桶哈希值对应的存储位置。For a target second-neighboring bucket hash value, the second-neighboring bucket corresponding to the target second-neighboring bucket hash value is stored in the target hash table at a storage location corresponding to the target second-neighboring bucket hash value.
在步骤S406,为了从第二桶集合中查找目标点对应的最近邻点,可以确定第二桶集合的点集合。In step S406 , in order to find the nearest neighbor point corresponding to the target point from the second bucket set, a point set of the second bucket set may be determined.
第二桶集合的点集合包括:每个目标第二邻近桶哈希值对应的第二邻近桶的点集合。The point set of the second bucket set includes: the point set of the second neighboring bucket corresponding to each target second neighboring bucket hash value.
对于一个目标第二邻近桶哈希值,该目标第二邻近桶哈希值对应的第二邻近桶的点集合包括:该目标第二邻近桶哈希值对应的第二邻近桶中每个坐标所属的点。For a target second neighboring bucket hash value, the point set of the second neighboring bucket corresponding to the target second neighboring bucket hash value includes: the point to which each coordinate in the second neighboring bucket corresponding to the target second neighboring bucket hash value belongs.
在步骤S406,若第二桶集合的点集合为空集合,则可以确定没有从第二桶集合中查找目标点对应的最近邻点。In step S406, if the point set of the second bucket set is an empty set, it can be determined that no nearest neighbor point corresponding to the target point is found in the second bucket set.
在步骤S406,若第二桶集合的点集合不是空集合,则可以计算第二桶集合的点集合中每个点与目标点之间的欧式距离。可以确定第二桶集合的点集合中与目标点的欧式距离最小的点,将与目标点的欧式距离最小的点确定为目标点对应的最近邻点。In step S406, if the point set of the second bucket set is not an empty set, the Euclidean distance between each point in the point set of the second bucket set and the target point can be calculated. The point in the point set of the second bucket set with the smallest Euclidean distance to the target point can be determined, and the point with the smallest Euclidean distance to the target point is determined as the nearest neighbor point corresponding to the target point.
通过步骤S405-步骤S406,可以在没有从第一桶集合中查找出目标点对应的最近邻点时,继续查找目标点对应的最近邻点。Through step S405 to step S406, when the nearest neighbor point corresponding to the target point is not found from the first bucket set, the nearest neighbor point corresponding to the target point can be continuously searched.
本发明实施例中还提供了一种数据查找装置,该装置用于实现上述方法实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“单元”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。本发明实施例中的装置是以功能单元的形式来呈现,这里的功能单元是指ASIC(Application Specific IntegratedCircuit,专用集成电路)电路,执行一个或多个软件或固定程序的处理器和存储器,和/或其他可以提供上述功能的器件。A data search device is also provided in an embodiment of the present invention, and the device is used to implement the above-mentioned method embodiment and preferred implementation mode, which have been described and will not be repeated here. As used below, the term "unit" can implement a combination of software and/or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived. The device in the embodiment of the present invention is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and/or other devices that can provide the above-mentioned functions.
一种数据查找装置,其特征在于:数据查找装置包括:A data search device, characterized in that the data search device comprises:
第一确定单元,用于根据目标点的坐标,从多个网格中确定出目标点所在的目标网格;A first determining unit, configured to determine a target grid where the target point is located from a plurality of grids according to the coordinates of the target point;
第二确定单元,用于根据目标网格的位置信息,确定目标点对应的目标哈希值;A second determining unit, configured to determine a target hash value corresponding to the target point according to the location information of the target grid;
第三确定单元,用于当所述目标哈希值小于或等于最大哈希值参数的参数值时,根据所述目标哈希值和每个预设方向的第一哈希值偏移量,确定所述目标哈希值的多个第一邻近桶哈希值;A third determining unit, configured to determine a plurality of first adjacent bucket hash values of the target hash value according to the target hash value and the first hash value offset in each preset direction when the target hash value is less than or equal to the parameter value of the maximum hash value parameter;
第四确定单元,用于从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值,以及从第一桶集合中查找目标点对应的最近邻点,其中,第一桶集合包括:目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶,其中,目标哈希值对应的目标桶、目标第一邻近桶哈希值对应的第一邻近桶在目标哈希表中。A fourth determination unit is used to determine at least one target first neighboring bucket hash value from the multiple first neighboring bucket hash values, and to search for the nearest neighbor point corresponding to the target point from the first bucket set, wherein the first bucket set includes: a target bucket corresponding to the target hash value, and a 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.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
继续查找单元,用于当没有从第一桶集合中查找出目标点对应的最近邻点时,根据目标点对应的目标哈希值和每个预设方向的第二哈希值偏移量,确定所述目标哈希值的多个第二邻近桶哈希值;从所述多个第二邻近桶哈希值中确定出至少一个目标第二邻近桶哈希值,以及从第二桶集合中查找目标点对应的最近邻点,第二桶集合包括:每个目标第二邻近桶哈希值对应的第二邻近桶,其中,目标第二邻近桶哈希值对应的第二邻近桶在目标哈希表中。A continuing search unit is used to determine multiple second neighboring bucket hash values of the target hash value according to the target hash value corresponding to the target point and the second hash value offset in each preset direction when the nearest neighboring point corresponding to the target point is not found from the first bucket set; determine at least one target second neighboring bucket hash value from the multiple second neighboring bucket hash values, and search for the nearest neighboring point corresponding to the target point from the second bucket set, the second bucket set including: a second neighboring bucket corresponding to each target second neighboring bucket hash value, wherein the second neighboring bucket corresponding to the target second neighboring bucket hash value is in the target hash table.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
第五确定单元,用于从所述多个第一邻近桶哈希值中确定出至少一个目标第一邻近桶哈希值之前,确定目标哈希表中是否存在所述目标桶;若否,创建所述目标桶,以及将所述目标桶存储在目标哈希表中。The fifth determining unit is used to determine whether the target bucket exists in the target hash table before determining at least one target first adjacent bucket hash value from the multiple first adjacent bucket hash values; if not, create the target bucket and store the target bucket in the target hash table.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
更新单元,用于当所述目标哈希值大于最大哈希值参数的参数值时,将最大哈希值参数的参数值更新为所述目标哈希值。An updating unit is configured 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.
进一步,数据查找装置还包括:Furthermore, the data search device also includes:
第六确定单元,用于根据所述目标哈希值和最大哈希值参数的参数值,确定每个预设方向的最大哈希值偏移量,其中,对于每个预设方向,所述预设方向的最大哈希值偏移量用于确定所述预设方向的相应哈希值偏移量。The sixth determining unit is used to determine the maximum hash value offset of each preset direction according to the target hash value and the parameter value of the maximum hash value parameter, wherein for each preset direction, the maximum hash value offset of the preset direction is used to determine the corresponding hash value offset of the preset direction.
参考图5,图5是本发明实施例提供的一种计算机设备的硬件结构示意图。该计算机设备包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在计算机设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个车辆,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。其中,所述存储器20存储有可由至少一个处理器10执行的指令,以使所述至少一个处理器10执行实现上述实施例示出的方法。存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据车辆的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。该计算机设备还包括输入装置30和输出装置40。处理器10、存储器20、输入装置30和输出装置40可以通过总线或者其他方式连接。输入装置30可接收输入的数字或字符信息,以及产生与该计算机设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等。输出装置40可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。上述显示设备包括但不限于液晶显示器,发光二极管,显示器和等离子体显示器。在一些可选的实施方式中,显示设备可以是触摸屏。Referring to FIG. 5 , FIG. 5 is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. The computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and/or multiple buses can be used with multiple memories and multiple memories. Similarly, multiple vehicles can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above-mentioned hardware chip can be a dedicated integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof. The memory 20 stores instructions executable by at least one processor 10 so that the at least one processor 10 executes the method shown in the above embodiment. The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the vehicle, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state hard disk; the memory 20 may also include a combination of the above-mentioned types of memory. The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected via a bus or in other ways. The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
本发明实施例还提供了一种计算机可读存储介质,上述根据本发明实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
本发明实施例的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本发明的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。A portion of the embodiments of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and/or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
以上实施例仅是为充分说明本发明而所举的较佳的实施例,本发明的保护范围不限于此。本技术领域的技术人员在本发明基础上所作的等同替代或变换,均在本发明的保护范围之内。The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410800547.3A CN118673195A (en) | 2024-06-20 | 2024-06-20 | Data searching method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410800547.3A CN118673195A (en) | 2024-06-20 | 2024-06-20 | Data searching method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118673195A true CN118673195A (en) | 2024-09-20 |
Family
ID=92722310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410800547.3A Pending CN118673195A (en) | 2024-06-20 | 2024-06-20 | Data searching method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118673195A (en) |
-
2024
- 2024-06-20 CN CN202410800547.3A patent/CN118673195A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5852967B2 (en) | GUI program creation support apparatus, GUI program creation support method, program, and integrated circuit | |
JP2016192205A (en) | Persistent caching of map imagery and data | |
CN110737944A (en) | floor slab generation method and generation device based on Revit | |
CN117332541B (en) | Method, device, equipment and medium for temporal management of power grid data based on graph calculation | |
CN114090695A (en) | Query optimization method and device for distributed database | |
CN118673195A (en) | Data searching method, device, computer equipment and storage medium | |
JP2018120444A (en) | Piping route creation apparatus, piping route creation method, and program | |
CN103544191A (en) | Method and device for reading cache data | |
CN117217147B (en) | Logic mapping method, device, equipment and medium for FPGA | |
CN115779424B (en) | Navigation grid path finding method, device, equipment and medium | |
WO2024078122A1 (en) | Database table scanning method and apparatus, and device | |
JP6242090B2 (en) | MAP UPDATE DEVICE, MAP UPDATE SYSTEM, AND MAP UPDATE MANAGEMENT METHOD | |
CN108920749B (en) | Pipeline two-dimensional and three-dimensional data updating method and device and computer readable storage medium | |
KR20180055447A (en) | Metohd and apparatus for processing data | |
US9183435B2 (en) | Feature generalization using topological model | |
US10331837B1 (en) | Device graphics rendering for electronic designs | |
CN106687999B (en) | Generating a set of instructions implementing rules designed to update objects specified according to an application data model | |
CN110059328B (en) | Structural analysis simulation method, information processing apparatus, and computer-readable storage medium | |
CN105518664B (en) | Managing database nodes | |
CN112699148A (en) | Method, device and equipment for refreshing cache and storage medium | |
CN118170954B (en) | AIG library construction method and device | |
CN108319750B (en) | Subway engineering collaborative design system based on DWG file splitting and recombining method | |
CN118570224B (en) | Parallel computing-based high-similarity reservoir cutting method, device and equipment | |
CN113157979B (en) | Method, system and medium for constructing kernel module relation graph based on dummy module node | |
CN116931954B (en) | Built-in software package compiling construction method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |