Hierarchical Locality Sensitive Hashing (LSH) Partitioned Index for Big Data Applications

Through local sensitive hashing and random drawing forest index structure, the problem of high-dimensional feature vector search inaccuracy and partition error is solved, efficient and accurate similarity search is achieved, and the search performance of unstructured data is improved.

CN111801665BActive Publication Date: 2024-09-06HUAWEI TECH CANADA CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN201980016648.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-07-24
Filing Date
2019-02-26
Publication Date
2024-09-06
Estimated Expiration
2039-02-26

AI Technical Summary

Technical Problem

Existing indexing and search algorithms based on LSH-ANN suffer from search inaccuracy and inefficiency of computational resources when dealing with high-dimensional feature vectors, especially due to the bias towards the most significant bits of compact feature vectors resulting in inaccuracy of similarity search. Accurate, and traditional partitioning methods assign similar feature vectors to different partitioning groups, affecting the accuracy and consistency of similarity search.

Method used

The Locality Sensitive Hash (LSH) function is used to generate compact feature vectors, and a twisted compact feature vector set is generated through random scrambling, a Random Drawing Forest (RDF) index structure is constructed, and the feature vectors are partitioned to generate a searchable sub-index structure to ensure Each feature vector is only partitioned into a single partition group, improving search accuracy and efficiency.

Benefits of technology

Through the RDF index structure, MSB problems and partition errors are overcome, the search accuracy and computing efficiency of unstructured data are improved, faster and more accurate similarity searches are achieved, and the use of processing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111801665B_ABST
    Figure CN111801665B_ABST
Patent Text Reader

Abstract

The present invention describes a system and method for partitioning a plurality of data objects, wherein each data object is represented by a respective high-dimensional feature vector. The method comprises: performing a hash function on each high-dimensional feature vector to generate a respective low-dimensional binary compact feature vector for the data object represented by the high-dimensional feature vector; performing another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partitioning the compact feature vector into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vector.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related Applications

[0002] This application claims the benefit of and prior application priority to U.S. Provisional Patent Application No. 62 / 637,278, filed on March 1, 2018, and U.S. Utility Patent Application No. 16 / 044,362, filed on July 24, 2018, which are both incorporated herein by reference. Technical Field

[0003] The present invention generally relates to indexing and searching of databases, and more particularly to partitioned indexing of unstructured data. Background Art

[0004] The amount of unstructured multimedia data objects (e.g., including image data, video data, audio data, text data, and other complex digital objects) stored in digital information repositories (e.g., online Internet and cloud-based databases) is growing dramatically. Processing search queries on unstructured data in an accurate and resource-efficient manner is a technical challenge.

[0005] Similarity search is a data search method for searching unstructured data objects based on a comparison between the similarity between a query object and data objects in a search database. Similarity search typically involves creating metadata for each data object stored in a database, creating metadata for a query object, and then comparing the metadata of the query object with the metadata of the data object. The metadata of each object can be in the form of a feature vector, which is a multidimensional numerical feature vector representing the object. In this regard, similarity search can be defined as finding the feature vector that is most similar to a given feature vector (e.g., a query vector) from a plurality of feature vectors stored in a database. Similarity search algorithms can be used in pattern recognition and classification, recommendation systems, statistical machine learning, and many other fields.

[0006] Thus, similarity search typically involves using a feature extraction algorithm to translate (convert) a query object (e.g., an image, a video sample, an audio sample, or text) into a query feature vector representing the query object. The query feature vector is then used to search a database of feature vectors to locate one or more data object feature vectors (e.g., feature vectors of data objects stored in the database) that are most similar to the query feature vector.

[0007] In the case of unstructured data objects, the feature vector is usually a high-dimensional vector. In a high-dimensional feature space, the data of a given data set becomes sparse, so distance and similarity lose their statistical significance, causing query performance to decrease exponentially as the number of dimensions increases. This is called the "curse of dimensionality" problem.

[0008] One method for solving the "curse of dimensionality" problem includes applying a dimensionality reduction algorithm to each feature vector stored in a database to generate a shorter version (e.g., a compact feature vector) of each feature vector. After generating a compact feature vector for each feature vector of each object stored in the database, generating a search index from the compact feature vector using an index generation algorithm. The dimensionality reduction algorithm may also be applied to the query feature vector to generate a shorter version (e.g., a compact query feature vector) of the query feature vector. A similarity search may then be performed by providing the compact query vector and the search index to a search algorithm to find a candidate data object feature vector that is most similar to the query feature vector.

[0009] One method of converting a feature vector with a large vector dimension into a compact feature vector with a reduced vector dimension and generating a corresponding search index is to apply a hash-based approximate nearest neighbor (ANN) algorithm. For example, locality sensitive hashing (LSH) can be used to reduce the dimensionality of high-dimensional data. LSH hashes the input items so that similar items are mapped to the same "bucket" with a high probability (the number of buckets is much less than the sum of possible input items). In particular, the LSH algorithm can be used to hash the feature vector to generate an LSH hash value as the compact feature vector.

[0010] However, one problem with existing LSH-ANN-based indexing and search algorithms is that these algorithms may cause search queries to be overly biased towards similarities between the most significant bits (MSBs) of compact feature vectors. In particular, existing index generation methods may use the first few bits (or other consecutive bit groups, such as the last few bits) of compact feature vectors to identify similar feature vectors. However, these bits may not be a good indicator of similarity, resulting in inaccurate searches and inefficient use of computing resources.

[0011] An example of such an MSB problem is illustrated in FIG1A , which shows an example of an LSH-based indexing and searching method 100. In the example in FIG1A , an index 102 points to different slots or buckets 104 ( 1 ), 104 ( 2 ), where each slot or bucket is represented by a compact feature vector K i The compact feature vector K contains the respective hash value sets in the form of. According to the longest length of common prefix (LLCP) or other defined distance measurement methods, the compact feature vector K iGrouped into respective buckets 104(1), 104(2). As shown in FIG1A, based on the Euclidean distance, the compact feature vector K1 is more similar to the compact feature vector K2 than to the compact feature vector K3. However, based on the comparison between the first two (2) components (e.g., the first two bits) of the compact feature vector K1 and the first (2) two components (e.g., the first two bits) of the compact feature vector K2 and K3, the index generation method in FIG1 divides the compact feature vectors K1 and K2 into different buckets 104(1) and 104(2), and combines the compact feature vectors K1 and K3 into the same bucket 104(2). When the compact query feature vector q enters, based on the first two components, the compact query feature vector q will be closer to the first bucket 104(1), so the compact feature vectors K1 and K3 are returned as candidate nearest neighbors. Ideally, the compact feature vectors K1 and K2 should be returned as the nearest neighbors of the compact query feature vector q. This error is caused by giving priority to the left component or bit when partitioning, even though the left component or bit is not given priority when selecting the hash function. This affects the accuracy of similarity searches using the generated search index.

[0012] In an environment with multiple search queries to search for a large number of unstructured data objects stored in a digital information repository, a concurrent search query partitioning strategy can be used to group data indexes. For example, in order to facilitate search, the index can be partitioned or divided into partition groups (which can include slots or buckets), and objects that are said to be similar are assigned to the same partition group. Similar to the above-mentioned MSB problem, existing partitioning methods use a fixed number of leading bits in a compact feature vector to partition the compact feature vector into partition groups. When performing a query, searching only one partition group will produce a large error. Figure 1B shows an example of a traditional (non-content-based) partitioning method. Based on the leading 2 bits, compact feature vectors K2 and K3 are placed in partition group 11, and compact feature vectors K1 and K4 are placed in partition group 01. Although hash values ​​K1 and K2 are almost the same except for their first bit, the traditional partitioning method puts hash values ​​K1 and K2 into different partition groups. In addition, the traditional partitioning method puts extremely different hash values ​​K2 and K3 into the same partition group. Therefore, similar compact feature vectors are likely to be put into different sub-indexes (e.g., partition groups), which affects the accuracy and consistency of similarity search.

[0013] Therefore, this article discloses methods and systems that solve the above-mentioned partitioning problem to improve the accuracy and efficiency of searching large-scale unstructured data stored in digital information repositories, including systems and methods that can improve the computational efficiency and search accuracy during searching. Summary of the invention

[0014] Exemplary embodiments are disclosed in the specification and claims by way of examples. According to one exemplary aspect, a system and method for generating an index structure to index a plurality of unstructured data objects is described, comprising: generating a set of compact feature vectors, the set comprising a compact feature vector for each of the data objects, the compact feature vector for each data object comprising a sequence of hash values ​​representing the data object; and indexing the compact feature vectors into partition groups based on the contents of the compact feature vectors.

[0015] According to a first example aspect, a method for partitioning a plurality of data objects is described, wherein each data object is represented by a respective high-dimensional feature vector. The method comprises: performing a hash function on each high-dimensional feature vector to generate a respective low-dimensional binary compact feature vector for the data object represented by the high-dimensional feature vector; performing another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partitioning the compact feature vector into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vectors.

[0016] In some exemplary embodiments, the hash function performed on each high-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function performed on each compact feature vector is also an LSH function. In some examples, the hash function and the other hash function are orthogonal angle hash functions. In some examples, the method includes: generating a searchable sub-index structure for each of the respective partition groups.

[0017] In some examples, each compact feature vector is partitioned into only a single partition group. In some examples, the sub-index structures are stored as independently searchable structures such that the sub-index structures can be searched concurrently with each other.

[0018] In some exemplary embodiments, generating a searchable sub-index structure for each of the respective partition groups includes: for each partition group: generating multiple twisted compact feature vector sets for the compact feature vectors in the partition group, wherein each of the twisted compact feature vector sets is generated by applying a respective random scrambled arrangement to the compact feature vectors in the partition group; for each twisted compact feature vector set, generating an index table for the data objects represented by the compact feature vectors in the partition group based on a sequence of hash values ​​in the twisted compact feature vector set; including the index table generated for each of the twisted compact feature vector sets in the searchable sub-index structure for the partition group.

[0019] According to a second exemplary aspect, a system for partitioning data objects is described, wherein each data object is represented by its own high-dimensional feature vector. The system includes one or more processing units and a system storage device coupled to the processor system. The system storage device stores executable instructions that, when executed by the one or more processing units, cause the system to: execute a hash function on each high-dimensional feature vector to generate its own low-dimensional binary compact feature vector for the data object represented by the high-dimensional feature vector; execute another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partition the compact feature vectors into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vectors.

[0020] According to a third exemplary aspect, a computer program product is described, including a medium having tangible stored thereon executable instructions that, when executed by a digital processing system, cause the digital processing system to: execute a hash function on each of a plurality of high-dimensional feature vectors to generate its own low-dimensional binary compact feature vector, each of the high-dimensional feature vectors representing its own data object; execute another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partition the compact feature vectors into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vectors.

[0021] According to a fourth exemplary aspect, a method for searching for data objects similar to a query object is described. The method includes: converting the query object into a d-dimensional feature vector; executing a hash function on the d-dimensional feature vector to generate an m-dimensional binary compact query vector for the query object, where m < d; executing another hash function on the query vector to determine the sub-index ID of the query vector; searching in a sub-index structure corresponding to the sub-index ID for a compact feature vector similar to the query vector, the sub-index structure including an index of compact feature vectors, wherein each compact feature vector represents its own data object.

[0022] In an exemplary embodiment of the fourth aspect, the hash function executed on the d-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function executed on the compact feature query vector is also an LSH function. In some examples, the hash function and the other hash function are orthogonal angular hash functions.

[0023] In an exemplary embodiment of the fourth aspect, the method includes: determining a set of additional sub-index IDs, where the additional sub-index IDs are within a similarity threshold range of the sub-index IDs of the query vector; searching for compact feature vectors similar to the query vector in additional sub-index structures corresponding to the additional sub-index IDs. In some examples, the similarity threshold refers to a threshold level of different bit values in the additional sub-index IDs relative to the sub-index IDs of the query vector.

[0024] In some exemplary embodiments of the fourth aspect, if a threshold number of search results is reached before all the sub-index structures corresponding to the additional sub-index IDs are searched, the search of the additional sub-index structures is terminated.

[0025] In some exemplary embodiments of the fourth aspect, the method includes: while searching in a sub-index structure corresponding to the sub-index ID: searching for a compact feature vector in another sub-index structure, where the compact feature vector is similar to another query vector for which another sub-index ID is determined.

[0026] According to a fifth example aspect, a system for searching for data objects similar to a query object is described. The system includes one or more processing units and a system storage device coupled to each of the one or more processing units. The system storage device tangibly stores executable instructions that, when executed by the one or more processing units, cause the system to: convert the query object into a d-dimensional feature vector; perform a hash function on the d-dimensional feature vector to generate an m-dimensional binary compact query vector for the query object, where m < d; perform another hash function on the query vector to determine a sub-index ID of the query vector; search for a compact feature vector similar to the query vector in a sub-index structure corresponding to the sub-index ID, the sub-index structure including an index of compact feature vectors, where each compact feature vector represents a respective data object.

[0027] According to a sixth exemplary embodiment, a computer program product is described, including a medium having tangibly stored thereon executable instructions that, when executed by a digital processing system, cause the digital processing system to search for data objects similar to a query object by: converting the query object into a d-dimensional feature vector; performing a hash function on the d-dimensional feature vector to generate an m-dimensional binary compact query vector for the query object, where m < d; performing another hash function on the query vector to determine a sub-index ID of the query vector; searching for compact feature vectors similar to the query vector in a sub-index structure corresponding to the sub-index ID, the sub-index structure including an index of compact feature vectors, where each compact feature vector represents a respective data object. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings.

[0029] FIG. 1A is a schematic diagram of an example of an index and search method based on locality sensitive hashing (LSH) according to the prior art.

[0030] FIG. 1B is a schematic diagram of an example of a partitioning method according to the prior art.

[0031] Figure 2 is a flowchart of an index generation and similarity search method according to an exemplary embodiment.

[0032] Figure 3 is a pseudocode representation of a method for generating a hash value function according to an exemplary embodiment.

[0033] Figure 4 is for generating a compact feature vector based on a function generated by the method in Figure 3 is a pseudocode representation of a method for generating a compact feature vector based on a function generated by the method in

[0034] Figure 5 shows a first-layer LSH hash value table according to an exemplary embodiment.

[0035] Figure 6 shows according to an exemplary embodiment Figure 2 the index structure generation process of the index generation method in

[0036] Figure 7 shows an example of a random hash value scrambling process according to an exemplary embodiment.

[0037] Figure 8 shows Figure 6 an example of an LSH index table generation task of the process in

[0038] Fig. 9 Variable length scaling of different d nodes in the LSH index table is shown.

[0039] Fig.10 is an example of a digital processing system that can be used to implement the methods and systems described herein.

[0040] Fig.11A An example of an index generation method including partitioning according to an exemplary embodiment is shown.

[0041] Fig. 11B According to an exemplary embodiment, a Fig.11A An example of the partitioning method in the index building method in .

[0042] Fig.12 yes Fig.11A Schematic diagram of the index generation method including the partitioning method in .

[0043] Fig.13 yes Fig. 11B Pseudocode representation of the partitioning method used to assign sub-index IDs to compact feature vectors in .

[0044] Fig.14 is a flowchart of a step-by-step search using a partitioned index.

[0045] Fig.15 Incremental step sub-index calculation is shown. DETAILED DESCRIPTION

[0046] Figure 2 2 is a flow chart of an index generation method 202 and a similarity search method 204 according to an exemplary embodiment. In an exemplary embodiment, the index generation method 202 and the similarity search method 204 are performed by software implemented on one or more digital processing systems. In an exemplary embodiment, the index generation method 202 and the similarity search method 204 cause their host digital processing systems to operate in a more efficient and accurate manner. For example, the methods and systems described herein may use fewer processing resources in some applications to provide similar or more accurate search results than previously available similarity search methods.

[0047] like Figure 2As shown in , in an exemplary embodiment, the index generation method 202 is executed periodically to index the unstructured data objects stored in the object database 206. For example, the index generation method 202 can be executed when a threshold level change occurs in the object database 206 by adding, modifying, or deleting an object 208 stored in the object database 206. In addition, or alternatively, the index generation method 202 can be executed according to a predefined schedule, such as hourly, daily, or weekly. In an exemplary embodiment, when a query object is received, the similarity search method 204 is executed. In some exemplary embodiments, the object database 206 can be a distributed database that includes complex data objects stored across multiple digital repositories that are hosted on different real or virtual machines located in one or more locations.

[0048] The index generation method 202 will now be described in more detail according to an exemplary embodiment, which generates an index structure 219 for n objects 208 stored in the object database 206. The index generation method 202 begins with a feature extraction process 210, during which information is extracted from the unstructured data objects contained in the object database 206 to generate a corresponding raw feature vector V for each of the n objects 208. i The unstructured data objects included in the object database 206 may be, for example, video data objects, audio data objects, image data objects, text data objects, and other unstructured data objects. For example, each image object may be represented by its own original feature vector V i Represents, where the original feature vector V i Derived from the color histogram of the original image data, each video object can be represented by its own original feature vector V i Represents, where the original feature vector V i The feature vectors may be derived from the scale-invariant feature transform (SIFT) or 3D-SIFT of the raw video data, or from discriminate video descriptors (DVD). Many different feature vector formats are known for representing different categories of data objects, and any of these formats are suitable for the feature extraction process 210 to convert the objects 208 into their respective raw feature vectors V1 to V n .exist Figure 2 In the example in , the original feature vectors V1 to V (a total of n data objects) n Stored in the main table 250. In the main table 250, the original feature vectors V1 to V nEach original feature vector in is stored as objectID and the corresponding d-dimensional feature list, which includes d normalized feature values ​​fv1 to fv d (For example, V j ={fv1, fv2, ..., fv d}), where the eigenvalues ​​fv1 to fv d Each feature value in is normalized between 0 and 1. objectID can directly or indirectly point to a storage location in an object repository, which stores the original feature vectors V1 to V n Represents an unstructured data object.

[0049] Then, the original feature vectors V1 to V n Each original feature vector in performs a dimensionality reduction process 214 to convert the high-dimensional original feature vector into a respective low-dimensional compact feature vector K1 to K n Although different reduction algorithms may be used, in at least one exemplary embodiment, the dimensionality reduction process 214 uses a locality sensitivity hashing (LSH) algorithm that uses an orthogonal hash function to reduce the d-dimensional original feature vector V1 to V n Converted into respective m-dimensional compact feature vectors K1 to K n .in this regard, Figure 3 A pseudo-code representation of an algorithm for generating an orthogonal angle hash function that is subsequently applied in the dimensionality reduction process 214 to convert the original feature vectors into respective compact feature vectors is shown. Figure 3 The algorithm in can be executed as a configuration step before the index generation method 202, and the obtained hash function will be stored as an LSH function table for future use.

[0050] Figure 3 The algorithm is provided with predefined inputs, including: the original feature vector V to which the hash function will be applied ji The dimension of (d) (the dimension of data points = d); each orthogonal hash function chain G i The number of hash functions (m) to be included in ; and the total hash family size F s (eg, the total number of hash functions from which the m hash functions are selected). Figure 3 The output of the algorithm is a set of L orthogonal hash function chains G i , where i is equal to 1 to L. Each orthogonal hash function chain G i Includes m hash functions h j (denoted as G i =(h1, h2, ..., hm), where h1, h2, ..., h m It is from Fs A hash function randomly selected from a family of hash functions. Figure 3 As shown, a L*d matrix H is randomly generated, where the elements x of the matrix H are sampled independently from the normal distribution. Then the QR decomposition of the matrix H is performed (where H = QR, and assuming d ≤ F s ) to determine the orthogonal matrix Q. After QR decomposition, each column in the resulting m*L matrix Q provides an orthogonal vector of m elements (i.e., an orthogonal angle hash function chain G i ). Therefore, each column in the matrix Q provides a respective orthogonal hash function chain G i (also called LSH table), the orthogonal hash function chain G i Includes m hash functions h j , where 1≤j≤m(G i =(h1, h2,…, hm)). Figure 3 An example of a suitable hash function generation algorithm is provided. In other exemplary embodiments, different known hash generation algorithms may be substituted. Figure 3 The algorithm in is used to generate a suitable chain of composite LSH functions for use in the index generation and search process described here.

[0051] Once the orthogonal hash function chain G is generated i , the hash function can be used in the dimensionality reduction process 214 to convert each d-dimensional original feature vector V ji Reduced to their respective m-dimensional compact feature vectors K j .in this regard, Figure 4 The method for generating compact feature vectors K1 to K is shown. n Pseudocode expression of the algorithm for the hash value matrix E.

[0052] In an exemplary embodiment, for the original feature vectors V1 to V n The eigenvector values ​​stored in the main table 250 for each original eigenvector in have been normalized. For each of the eigenvector values, the inner product of the hash function and the eigenvector value is directly calculated. The result is cos(hash function, eigenvector value), which is called the angular distance. In order to determine the hyperplane on which the eigenvector value lies, the sign() operation is applied to the result to provide an output for each hash function with an eigenvector value of -1 or 1. In order to simplify digital storage, a hash value of -1 is treated as 0. Figure 4 The algorithm shown in is an example of a suitable hash algorithm for obtaining a composite hash value, and in other exemplary embodiments, other orthogonal hash algorithms that reduce a d-dimensional vector to an m-sized vector may be used.

[0053] Therefore, the dimension reduction process 216 applies LSH to reduce each original eigenvector of length d to a compact eigenvalue K such asj =G i (V j )={h1(V j ), h2(V j ), …, h m (V j )} is a binary sequence of length m. The compact eigenvalue K j Each binary value in the binary sequence is a feature vector V j All eigenvalues ​​fv1 to fv d With hash function chain G i m hash functions (h1, h2, ..., h m ) is the hash function result of a corresponding hash function in . For example, the compact feature vector K j The first binary value in is the hash function h1 with the original feature vector V j The eigenvalues ​​fv1 to fv d The hash function result of . Figure 5 The resulting set of compact feature vectors 502 is shown in the form of a hash table, where each row represents a respective compact feature vector K j Each compact feature vector has its own ID K j , where 1≤j≤n, also has a sequence of m binary values. Figure 5 In the exemplary embodiment, ID K j is a memory pointer that points to a list of m binary hash values ​​that make up the compact feature vector 216. In an exemplary embodiment, each compact feature vector K i are associated with or include a pointer (e.g., objectID) that points to the compact feature vector K i The original feature vector V represented by i .

[0054] Reference again Figure 2 After generating the compact feature vector set 502, a random draw forest (RDF) index structure generation process 218 generates a corresponding index structure 219. In this regard, Figure 6 The steps performed in the RDF index structure generation process 218 according to an exemplary embodiment are shown.

[0055] For ease of reference, Table 1 below summarizes parameters related to the RDF index structure generation process 218 .

[0056] Table 1:

[0057]

[0058]

[0059] As shown in step 602, randomly scramble SP(1) to SP(n s ) is applied to the compact feature vector set 502 to generate n s The twisted compact eigenvector set THV set (1) to THV set (n s ). An example of step 602 is Figure 7 Randomly generate scrambled permutations SP(1) to SP(n s ), which is then applied to shuffle the column positions of the hash values ​​in the compact feature vector set 502 into respective distorted compact feature vectors THV set (1) to THV set (n s ) at different column positions. As mentioned above, each compact feature vector K j In one exemplary embodiment, each compact feature vector K in the compact feature vector set 502 j The first subset of s bits is used as segmentID, and only for each compact feature vector K j The (ms) bits of are scrambled in step 602. Thus, in the exemplary embodiment, the scrambled arrays SP(1) to SP(n s Each scrambled permutation in ) specifies a random re-scrambled order of the compact feature vectors. For example, in Figure 7 In the above, the scrambled arrangement SP(1) to SP(n s ) corresponds to the corresponding twisted compact feature vector set THV set (1) to THV set (n s ), the value at this position refers to the bit position column c+s in the compact feature vector set 502, which is used as the source binary value to fill the column in the twisted compact feature vector set THV set (i).

[0060] For example, in Figure 7 , m=32 and s=4. The first value at the first position of the scrambled permutation SP(1) is 15, which means that the 19th (15+s)th hash value bit (which is "1") of the compact feature vector K1 in the compact feature vector set 502 will be relocated to the first scrambled hash value bit position of the compact feature vector K1 in the THV set (1), as shown in line 702. Therefore, the random scrambled permutation step 602 generates the compact feature vectors K1 to K n n s In each distorted hash version, the hash value bit order is randomly shuffled relative to the order of the compact feature vector set 502. However, in each THV set, all compact feature vectors K1 to K nThe random scrambling order of is the same, so that the similarity of the columns is maintained during the scrambling process. s In this twisted version, the MSB problem described above can be alleviated because there is no longer any bias towards any particular order of hash value bit grouping. Figure 7 As shown in the THV set in the exemplary embodiment, the s bits of the segmentID are prepended to each of the compact feature vectors K in each of the THV sets. j By putting the compact feature vector K j The first s bits of are used as segmentIDs to support parallelism in the following indexes—in particular, the number of possible segmentIDs is 2 s .

[0061] Reference again Figure 6 The next task (604) of the RDF index structure generation process 218 is to generate the twisted compact feature vector set THV set (1) to THV set (n s Each twisted compact feature vector set in ) generates its own LSH index table T(1) to T(n s ). For the twisted compact feature vector set THV set (1) to THV set (n s ) is repeated once for each set of twisted compact feature vectors in Figure 6 The LSH index table generation task 604 shown in steps 610 to 622 in the embodiment of the present invention is to obtain n s LSH index table.

[0062] Now we will use the twisted compact eigenvector set THV(y) (where 1≤y≤n s ), combined with Figure 8 The LSH index table generation task 604 is described, wherein: Figure 8 The steps of performing the LSH index table generation task 604 on the compact feature vector set THV set (y) to generate the corresponding LSH index table T (y) are graphically illustrated. Figure 8 801A, 801B, 801C and 801D are shown when the LSH index table T(y) is generated. Table 802 is a decimal representation of the compact feature vector set THV Set (y) indexed in the LSH index table T(y). In particular, in Table 802, the column "segment" is the individual twisted compact feature vectors K i) (e.g., segmentID), column "Level 1" is the decimal value of the next 7 bits (e.g., the first 7 scrambled bits), column "Level 2" is the decimal value of the next 7 bits, column "Level 3" is the decimal value of the next 7 bits, and column "Level 4" is the decimal value of the next 7 bits. Figure 8 In the example, m = 32, s = 4, each twisted compact feature vector K j The number of scrambling bits is ms = 28, and the number of 7-bit levels is 4. Figure 8 In the example, the segmentID bits are "1001", providing decimal segmentID=9.

[0063] like Figure 8 As shown, the LSH index table T(y) is a node tree structure including two types of nodes, wherein the two types of nodes are represented as k nodes and d nodes. Figure 8 The LSH index table T(y) shown at the bottom includes two levels of d nodes (first level or root d node (d node (1)) and second level d node (d node (2))), and five levels of k nodes (k node (1) to k node (5)). Each k node in k nodes (1) to (5) corresponds to a respective compact feature vector K1 to K5 of the compact feature vector set THV set (y). In an exemplary embodiment. Each LSH index table T(y) includes n k nodes, where n is the compact feature vector K j The number of

[0064] Each d node (i) is l i slots (denoted as slots() in the figure, Figure 8 The slots are numbered from slot (0) to slot (127), where l i =128) integer array, where l i Less than or equal to the predefined maximum slot value l. The number of slots per d node level l i is variable. Each d-node slot () corresponds to a bucket of compact feature vectors K, which are identified as satisfying a similarity threshold with each other. Each k-node contains two fields, namely KEY 804 and POINT 806. KEY 804 is an objectID pointing to the original feature vector (for example, K1 points to V1), and POINT 806 stores the offset of the next k-node in the same slot (if any). The d-node slot is used to store a pointer to the first k-node associated with the slot (assuming that the number of k-nodes associated with the slot does not exceed the threshold Th), or another d-node level (if the number of k-nodes associated with the slot exceeds the threshold Th).

[0065] like Figure 6As shown in step 610 in , the LSH index table generation task 604 begins by initializing a d-node of length l as the first level or root d-node (1). As described above, in order to support parallelism, the first s bits of each compact feature vector K are treated as segmentIDs, allowing 2s segments. For each twisted compact feature vector set THV set (y), this is a number sufficient to maximize parallelism. In an exemplary embodiment, each twisted compact feature vector K j The number of hash value bits used to classify or locate the corresponding data objects in their respective d-node slots is log2(l), and the maximum number of d-node levels is (ms) / log(l). As described below, task 604 converts the twisted compact feature vector K into a vector according to the similarity between groups of consecutive twisted hash bits of length log2(l). j are sorted into their respective d-node slots. In this regard, the set of log2(l) bits acts as a similarity threshold.

[0066] In an exemplary embodiment, the threshold value Th represents the number of data objects that can be classified into a single slot without further subclassification. When the threshold value Th is exceeded, further classification or sorting is required, which is completed by adding another d node level. Then, the twisted compact feature vector can be further classified according to another set of log2 (l) bits. Therefore, more d node index levels can be provided using the gradually increasing more bits in the hash value of the compact feature vector. When there are more than Th k nodes under the same slot, they will be reallocated to the next d node level of the hash tree structure of the LSH index table (y).

[0067] exist Figure 8 In the example shown, l=128; Th=3; s=4; m=32; ms=28; log2(l)=7; the 28 values ​​of the scrambled permutation SP(y) are {15, 7, 3, 4, 21, 6, 20, 14, 16, 26, 19, 28, 25, 18, 24, 13, 22, 9, 17, 27, 5, 2, 1, 11, 8, 10, 23, 12}; the 32-bit binary sequence of the first twisted compact feature vector of the obtained THV set (y) is:

[0068] Twisted compact eigenvector K1=10010011010000100011011010000101

[0069] (consists of a 4-bit segmentID followed by 28 scrambled bits). (Note that Figure 8 K j Examples with Figures 5 to 7 The examples shown are not identical binary sequences).

[0070] Therefore, in step 610, the first level or root d node (1) is initialized to have a length of l = 128 slots (eg Figure 8 As shown in stage 801A in FIG. Figure 6 As shown in step 612 in the embodiment, the next available compact feature vector K is obtained for the twisted compact vector set THV (y). j First, step 612 is performed on the set of twisted compact feature vectors. The next available compact feature vector will be the first compact feature vector in the THV set (y), i.e., K1. It is worth noting that steps 602 and 612 can be combined together. A particular compact feature vector K j The distorted hash value of may then be determined as part of step 612 rather than being pre-calculated in step 602 .

[0071] As shown in step 613, the compact feature vector K j Initialize the respective k-node (i). As described above, the k-node contains two fields, namely KEY 804 and POINT 806. Therefore, in the example of the twisted compact vector K1, the KEY 804 of the k-node (1) is set to point to the corresponding original feature vector V1. When a new k-node is initialized, its POINT 806 field is initially set to empty.

[0072] As shown in step 614, the warped compact feature vector K is then j In the example shown of the twisted compact feature vector K1, the first four bits provide SegmentID = (1001) b = 9. The next log2(l) = 7 bits of K1 is (0011010) b =26, providing the d node (1) of level 1 with SlotID 26.

[0073] As shown in step 616, it is determined whether the identified d-node slot (SlotID) is empty. If the slot is not occupied, as shown in steps 618 and Figure 8 As shown in stage 801A in the above, the value in the corresponding slot (e.g., slot (26)) of the root d node (1) is updated to point to the address of the corresponding k-node location (e.g., k-node (1)) in the system storage (e.g., the system storage device 1408 described below), (as described above, k-node (j) itself points to the corresponding original feature vector V i address).

[0074] After updating the respective d-node slots, as shown in step 619, it is determined whether all n compact feature vectors in the twisted compact feature vector set THV(y) are classified into the TSH index table T(y). If so, the LSH index table T(y) has been completed and task 604 for the THV set (y) is terminated. If not, task 604 is repeated. As shown in step 612, the next compact feature vector K is retrieved from the THV set (y). j .exist Figure 8 In the example of , the next compact feature vector is K2. Figure 8 Phase 801B and Figure 6 As shown in steps 613 and 614 in , the second k node (2) is initialized for the compact feature vector K2, and the segmentID and the SlotID of level 1 are extracted (as shown in Table 802, in the example shown, the same as K1, the segmentID of K2 = 9, the SlotID of level 1 = 26.). For the compact feature vector K2, it is determined in step 616 whether the d-node slot (SlotID) (for example, slot (26)) is occupied. Therefore, as shown in step 620, it is then determined whether the number of k nodes allocated to the slot (SlotID) exceeds the threshold Th without an intermediate d-node layer. If the number of k nodes under the d-node slot (SlotID) is equal to or less than Th, the new k node can be included in this slot in the hash tree of the LSH index table T(y). In particular, as shown in step 622, the value in the slot (SlotID) is set to point to the current k node (i), and the POINT field of the current k node (j) is set to point to the address of the k node previously referenced by the slot (SlotID).

[0075] exist Figure 8 , an example of step 622 is shown in stage 801B, which shows the value of slot (26) updated to point to k-node (2). In turn, the POINT 806 field of k-node (2) is set to point to k-node (1) (previously identified in slot (26)).

[0076] exist Figure 8 In the example of , the k node (3) created for the twisted compact feature vector K3 also has segmentID=9 and slotID=26 of level 1. Figure 8As shown in stage 801C, after processing the twisted compact feature vector K3, the k node (3) is initialized so that its KEY 804 field points to the objectID of the original feature vector V3 (according to step 613). According to step 622, the value of the slot (26) of the d node (1) is updated to point to the k node (3), and the POINT 806 field of the k node (3) is set to point to the k node (3).

[0077] exist Figure 8 In the example, the k node (4) created for the twisted compact feature vector K4 has a segmentID equal to 9 and a level 1 SlotID equal to 1 (different from the values ​​of K1 to K3). Therefore, Figure 8 As shown in stage 801D in step 616, it is determined that slot (1) is empty, and in step 618, the value of slot (1) of d node (1) is updated to point to k node (4).

[0078] exist Figure 8 In the example of , the k node (5) created for the twisted compact feature vector K5 has segmentID=9 and level 1 d node slotID=26 (still the same as the segmentID and level 1 d node slotID of K1 to K3). In this case, in step 620, it is determined whether the number of k nodes under the level 1 d node slot (26) exceeds the threshold Th. As shown in steps 624 and Figure 8 As shown in the final version of the LSH index table T(1) at the bottom, inserting the k-node (5) into the LSH index table requires generating an additional d-node level (e.g., second-level d-node (2)) and reallocating the k-nodes below the higher-level d-node slot to the lower-level d-node slot. As described above, using multiple d-node levels effectively allows sufficiently similar objects to be classified into a single d-node level slot (as determined by a matching set of twisted hash value bit values) and then divided into different sub-buckets.

[0079] exist Figure 8In the example of k node (5) in the first level d node (1), step 624 is implemented by initializing the second level d node (2) to have a length of l=128 slots. The value in slot (26) of the first level d node (1) is set to point to the system storage address of d node (2) (rather than directly to the k node). The process of assigning k nodes (1), (2), (3) and (5) to the slots of the second level d node (2) is similar to the process described above regarding assignment to the first level. However, a different set of twisted hash bits in the twisted compact feature vector is used to determine the second level SlotID rather than the first level SlotID. In particular, the next set of log2(l) hash bits in each of the twisted compact feature vectors K1, K2, K3 and K5 are used. Therefore, in the example of K1=10010011010000100011011010000101, the first four bits provide SegmentID=(1001) b =9; next log2(l)=7 bits (0011010) b =26, providing level 1 d node (1) SlotID is 26; next log2(l) = 7 bits (0001000) b =8, providing the d node (2) of level 2 with SlotID 8. Figure 8 In the example, k nodes (1), (2), and (3) all have the same second-level SlotID of 9 (as shown in Table 802), so they are all assigned to the second-level d node (2) slot (9). In particular, d node (2) slot (9) points to k node (3), which in turn points to k node (2), which in turn points to k node (1). However, hash bits 12 to 18 of K5 identify a second-level d node SlotID of 4, so k node (5) is assigned to the second-level d node slot (4).

[0080] Repeat steps 610 to 622 of the LSH index generation task 604 until all compact feature vectors K1 to K2 in the twisted compact vector set THV set (y) are complete. n are indexed into their respective LSH index tables T(y). As shown in the 4 columns level 1 to level 4 in table 802, Figure 8 In the example of , the maximum level (maximum level, Dmax) of the d-node is 4. In some exemplary embodiments, when the maximum level (maximum level, Dmax) of the d-node in the slot of the LSH index table T is reached, the threshold Th is ignored and the length of the k-node chain of the Dmax d-node level is not limited.

[0081] For all n stwisted compact vector set THV set (1) to THV set (n s ) Repeat LSH index generation task 604 to generate n s Each of the LSH index tables T(1) to T(n s ), these index tables are stored together in the system storage as an index structure 219.

[0082] In an exemplary embodiment, the above index generation method 202 can be summarized by the following general steps, which follow the feature extraction process 210. Step 1: Calculate the input raw feature vector V i The LSH hash value of to generate the corresponding compact feature vector K j The compact eigenvector K j The first s bits of are used as segmentID. Then, the compact feature vector K is shuffled by random scrambling. j The next log2(l) bits after the segmentID are used to generate an integer range from 0 to l as the SlotID of the first level (e.g., dnode (1)) slot in the index table (e.g., LSH index table T(y)). Step 2: If the slot is not occupied, update the slot to point to the original feature vector V i Step 3: If the slot is occupied and the number of objects under the slot is equal to or less than Th, then add a k-node under the slot. If the number of objects under the slot is greater than Th, then add a new d-node level under the slot, followed by Step 4: The next log2(l) term of the scrambled permutation is used to provide a compact feature vector K j The corresponding log2(l) bits are used as the SlotID of the new d node, and the k node will be reallocated to the new d node.

[0083] In an exemplary embodiment, in the LSH index table T(y), the number of slots li at each d-node level can be set to different values, such as Fig. 9As shown. The variable number of li control bits is used to locate objects in different d-node levels in the hash tree defined by the LSH index table T(y). For example, in one example, l = 32 and log2(l) = 5, and 5 bits of the compact feature vector are used to determine the slots for all d-node levels. With this scheme, each d-node level is processed at the same resolution. Alternatively, different resolutions can be used for different levels. For example, for the first-level d-node (1), a shorter l1 can be used, which enables a dataset with a small number of similar objects to obtain sufficient valid candidates. In the lower levels, the number of bits can gradually increase, where l1 < l2 < l3. The only condition for object deepening is that the number of "similar" objects under the same slot is equal to or greater than Th. Therefore, for the second level, in order to group these "similar" objects into different "similar" groups with higher similarity, the resolution should be increased.

[0084] Thus, in an exemplary embodiment, the RDF index structure generation process 218 implements a random draw that produces a random draw forest (RDF) index structure 219, where each LSH index table T(y) represents a respective tree in the RDF index structure 219. The random draw performed in the RDF index structure generation process 218 is a function of a randomly generated shuffling permutation (SP).

[0085] Referring again to Figure 2 , the similarity search method 204 will now be described. A query object 220 is received. In an exemplary embodiment, the query object 220 is unstructured object data, such as an image file, a video sample, an audio sample, or a text string. As shown in the feature extraction process 222, the query object 220 is converted into an original query feature vector Qv using the same method as in the feature extraction process 210 for converting the object 208 into an original feature vector. Then, using the same process and the previously generated hash functions for the dimensionality reduction process 214 described above, the obtained original query feature vector Qv is converted into a binary sequence compact query vector Qk of length m in the LSH dimensionality reduction process 226.

[0086] Then, the compact query vector Qk is processed in combination with the index structure 219 for the search process 230. In an exemplary embodiment, by applying the above-described shuffling permutation SP(1) to SP(n s ) to each shuffling permutation of the compact query vector Qk, n s shuffled versions Qks(1) to Qks(n s ) of the compact query vector Qk are generated. The n sThe scrambled versions Qks(1) to Qks(n s Each scrambled version in ) is used to search the LSH index table T(1) to T(n s ) in a corresponding LSH index table. For example, the compact query vector Qks(y) scrambled according to the scrambling arrangement SP(y) is used to search the corresponding LSH index table T(y). In particular, the first group of log2(l1) bits (excluding the s bits for segmentID) of the compact query vector Qks(y) are used to determine the SlotID of the root (e.g., first level) d node (1) of the LSH index table T(y). If the matching slot of the first level d node (1) points to a k node, then all objects 208 addressed in the k nodes under the slot are returned as candidate results 232. If the matching slot of the first level d node (1) points to a second level d node, then the next group of log2(l2) bits of the compact query vector Qks(y) are used to determine the SlotID of the second level d node (2) of the LSH index table T(y). And, in the absence of an intermediate d node, any object 208 addressed in the k node directly under the matching d node (2) is returned as a candidate result 232. If the matching d node (2) slot points to another third level d node (3), repeat the process of determining additional lower level SlotIDs from consecutive bits of the compact query vector Qks(y) until all k nodes under any matching slot have been processed and all candidate results 232 have been returned.

[0087] Thus, upon completion of the search process 230, the candidate results 232 include objects 208 corresponding to each of the scrambled query vectors Qks(1) to Qks(ns) identified in the respective LSH index tables T(1) to T(ns). Figure 2 As shown in 232 to 240 in FIG. 2 , the candidate result 232 may then be filtered using a filtering process 234 to generate a filtered result 236, wherein the filtered result 236 may be sorted using a sorting process 238 to obtain a sorted object list as a final result 240. The methods used in the filtering process 235 and the sorting process 238 may be similar to those used in existing similarity search processes, for example.

[0088] As described above, the index generation method 202 and the similarity search method 204 use a random draw forest (RDF) index structure that overcomes the MSB problem. Using the above RDF index structure 219 for similarity search can obtain faster and more accurate similarity search than previous methods in at least some applications. By improving the high-quality candidates included in the candidate results, when the index structure 219 is used for similarity search, better approximate nearest neighbor performance (quality and accuracy of results) can be achieved than previous methods in at least some applications, and better time performance can be achieved than at least some previous methods.

[0089] In an exemplary embodiment, an index generation method for similarity search based on the above-mentioned RDF (random drawing forest, RDF for short) includes: step 1: generating a hash value using local sensitive hashing according to the input original feature vector; step 2: generating a distorted hash value based on the hash value by using random drawing; step 3: generating a random drawing forest (multiple hash trees) based on the distorted hash value by following the adaptive hash tree establishment step; step 4: generating a hash value of the query object by using local sensitive hashing based on the original features of the query object; step 5: combining the hash value of the query object and the random drawing forest as input information, and generating similar objects of the query object from the data set by following the similarity search strategy.

[0090] As described above, in an exemplary embodiment, the index generation method 202 and the similarity search method 204 are performed by software (which may include one or more software modules) implemented on one or more digital processing systems. In some examples, examples of the index generation method 202 or the similarity search method 204 may be implemented on one or more digital processing systems implemented as virtual machines by one or more physical computing systems.

[0091] Fig.10 An example of a digital processing system 1410 is shown, which can be used to implement one or both of the index generation method 202 and the similarity search method 204. Fig.10As shown, the digital processing system 1410 includes at least one processing unit 1400. The processing unit 1400 implements various processing operations of the digital processing system 1410. For example, the processing unit 1400 can perform data processing, power control, input / output processing, or any other function that enables the digital processing system 1410 to operate. The processing unit 1400 can also be used to implement some or all of the functions and / or embodiments described in more detail above. Each processing unit 1400 includes any suitable processing or computing device for performing one or more operations. For example, each processing unit 1400 may include a microprocessor, a microcontroller, a digital signal processor, a field programmable gate array, or an application-specific integrated circuit or a combination thereof.

[0092] The digital processing system 1410 also includes one or more input / output devices 1406 or interfaces (e.g., wired or wireless interfaces to the Internet or other networks). The input / output devices 1406 allow interaction with users or other devices in the network. Each input / output device 1406 includes any suitable structure, such as a speaker, microphone, keypad, keyboard, display, or touch screen, wherein the structure is used to provide information to or receive information from the user, including network interface communications for receiving query objects and transmitting search results.

[0093] In addition, the digital processing system 1410 includes at least one system storage device 1408. The system storage device 1408 stores instructions and data used, generated or collected by the digital processing system 1410. For example, the system storage device 1408 can store software instructions or modules executed by the processing unit 1400 for implementing some or all of the above functions and / or embodiments. The system storage device 1408 can also store one or more object databases 206, master tables 250, compact feature vector sets 502, and index structures 219. The system storage device 1408 can include any suitable volatile and / or non-volatile storage and retrieval devices. Any suitable type of memory can be used, such as random access memory (RAM), read-only memory (ROM), hard disk, solid state drive, optical disk, subscriber identity module (SIM) card, memory stick, and secure digital (SD) memory card.

[0094] In the above example, the index generation method 202 generates an RDF index structure 219 for a compact feature vector set 502, wherein the compact feature vector set 502 represents n objects 208 stored in the object database 206. In the above example, the compact feature vector set 502 is treated as a single partition group and indexed using a single RDF index structure 219. However, in some examples, the amount of data objects that need to be indexed is so large that representing the corresponding compact feature vector set in a single index structure will cause system delays and inefficiencies, especially in the case of concurrent search query processing. As described above in the background technology, partitions can be used to split a group of data objects into smaller groups of similar data objects for indexing and searching.

[0095] Also as described above, in addition to the MSB problem that may occur when indexing compact feature vectors, sub-index partitioning problems may also cause errors. Partitioning is an important part of hash-based index generation methods. As described in the background technology, existing partitioning methods use a fixed number of header bits to divide hash values ​​(e.g., put hash values ​​into different partition groups). These existing methods may divide very similar feature vectors into different partitions, or put very different hash values ​​into the same partition, simply because they rely on a limited number of bits. Assigning hash values ​​to the wrong sub-index (e.g., partition) will affect the accuracy and consistency of similarity searches. The following describes an improved partitioning method to alleviate the problems of traditional partitioning methods. In the currently described embodiment, the partitioning method is used to generate partition groups, where each partition group is subsequently indexed separately by the above-mentioned RDF index structure generation process 218. However, the partitioning method described herein is not limited to use in combination with the RDF index structure generation process, but in other exemplary embodiments, it can be used to generate partition groups, where these partition groups can be indexed separately by known or suitable indexing methods.

[0096] The partitioning method described here uses multi-layer LSH using orthogonal hash functions and combines the above Figures 2 to 9 The index generation and search methods are used in combination. In the exemplary embodiment to be described below, during the index generation method, the compact feature vector set 502 is divided into a plurality of partition groups before indexing. Then, a corresponding sub-index structure is created for each partition group. In this regard, Fig.11A The index generation method 202A is shown. The index generation method 202A is similar to the above-mentioned index generation method 202, except that the index generation method 202A includes a method for dividing the compact feature vector set 502 into two M Zone groups 1 to 2 M Additional process ( Fig.11AThen, the partition groups 1 to 2 are respectively M Perform respective RDF index structure generation processes 218(1) to 218(2) M ) to generate respective sub-index structures 219(1) to 219(2 M ).

[0097] As will be described in more detail below, the partitioning method uses a distributed hierarchical LSH method that enables parallelism of the indexing and search methods. It is a content-based partitioning strategy that enables each search query to be mapped to only one partition group. An orthogonal hash family is used to more accurately partition objects (as represented by compact feature vectors). A step-by-step search is described below to provide an accurate search method to search the sub-indexes corresponding to each partition group.

[0098] Reference now Fig.11A The index generation method 202A will be described in more detail, wherein: Fig.11A An overview of the entire index generation method 202A is provided. Fig. 11B The partitioning process 1100 is shown in more detail. Fig.12 , Fig.12 The schematic diagram shows that when the number of sub-index partition groups is 4 (ie 2 M =4, M=2) in the specific example of m=6.

[0099] like Fig.11A As shown in FIG. 2 , the index generation method 202A includes the same preliminary operations as the above-described index generation method 202, namely, a feature extraction process 210 and a dimensionality reduction process 214. In particular, the feature extraction process 210 processes n unstructured data objects to generate n corresponding representative d-dimensional original feature vectors V1 to V2 stored in the main table 250, for example. n The master table 250 includes original feature vectors V1 to V2 with pointers (eg, objectID) pointing to their respective unstructured data objects. n .

[0100] Dimensionality reduction process 214 applies the first layer of LSH to process the n d-dimensional original feature vectors V1 to V n , and generates, for example, n corresponding m-dimensional compact feature vectors K1 to K stored as a compact feature vector set 502 n , wherein the compact feature vector set 502 includes original feature vectors V1 to V having pointers to their respective n and compact feature vectors K1 to K of pointers (e.g., objectIDs) to one or both of the unstructured data objects n .

[0101] In an exemplary embodiment, the LSH-based dimensionality reduction process 214 of the index generation method 202A uses the orthogonal angle hash function h described above for the index generation method 202, which performs better than the original angle hash function. As described above, the original feature vectors V1 to V2 associated with the object are denoted by the merged orthogonal hash function. n Each original eigenvector in generates a compact eigenvector from K1 to K n Each compact feature vector K j is a sequence of length m consisting of 0s and 1s. By way of example, Fig.12 The dimensionality reduction process 214 shown in FIG. 2 (where m=6) illustrates the use of a hash function chain G of length m. i ={h1, h2, ..., h m} For the original feature vector V1 = {fv1, fv2, ..., fv d}Hash processing is performed to generate a binary sequence compact feature vector K1=G with a length of m i (V1)={h1(V1), h2(V1), h3(V1), h4(V1), h5(V1), h6(V1)}={0, 0, 1, 0, 1, 0}.

[0102] Following the first-level LSH dimension reduction process 214, the composite hash values ​​of the compact feature vector set 502 (e.g., compact feature vectors K1 to K n ) is partitioned into sub-index partition groups, wherein the partitioning process 1100 will be Fig. 11B The partitioning process 1100 is used to partition sufficiently similar compact feature vectors K j Assigned to their respective partition groups.

[0103] In order to classify similar objects (each object is represented by its own compact feature vector K j The partition layer LSH index is introduced to divide the objects into their own partition groups, and a new LSH index layer is introduced, called the partition layer LSH index. The principle of the partition layer LSH index is: after executing the first layer LSH, similar objects (such as represented by the original feature vectors) have a high probability p1 to have similar hash values; after executing the second partition layer LSH, similar compact feature vectors have a high probability p2 to have similar hash values. Therefore, after two layers of LSH, similar objects have a probability p1*p2 to have similar compact feature vectors. This principle is the basis for defining partition groups and generating sub-index IDs (SubIDs) for each partition group, such as Fig.11A and Fig.12 In at least some examples, each compact feature vector K jis contained in only one partition group. Therefore, when searching, each search query only needs to access the sub-index structure of a single partition group, which improves the speed of similarity search. In addition, in order to handle concurrency, the robustness of the partitioning method can be easily controlled by a single parameter M, where M refers to the number of bits used for partitioning into partition groups.

[0104] like Fig. 11B As shown, there are n compact feature vectors K included in the compact feature vector set 502. j The partitioning process 1100 is repeated for each compact feature vector in the partitioning process 1100. When the partitioning process 1100 is completed, the n compact feature vectors K are j Each compact feature vector in is assigned to a similar compact feature vector K j Partition Group 1 to 2 M The similarity is a function of the partition layer LSH process block 1104. The number of partition groups is 2 M , each partition group and its respective sub-index structure 219 (SubID) is mapped to a unique M-bit sub-index ID (SubID).

[0105] As shown in process block 1102, each iteration of the partitioning process 1100 begins by obtaining the next compact feature vector K from the compact feature vector set 502. j As shown in process block 1104, the compact feature vector K is then j The partitioning layer LSH is performed to generate a sub-index ID (SubID) so as to convert the compact feature vector K j Assign to partition group 1 to 2 M In an exemplary embodiment, the application partition layer LSH includes using a hash function chain G' (eg, K) including M orthogonal angle locality-sensitive hash functions. j =G'(K j )={h1(K j ), h2(K j ), …, h M (K j )}SubID) for the compact feature vector K j Perform hashing. Fig.13 is a pseudo-code representation of process blocks 1102 and 1104 in the partitioning process 1100, wherein each compact feature vector K j (exist Fig.13 The hash values ​​​​identified and represented as "hash value matrix E[j, i]") are assigned their own sub-index ID (SubID). Fig.12An example of LSH partitioning applied to a 6-bit compact feature vector K1={0,0,1,0,1,0} in process block 1104 is shown. The m=6-bit compact feature vector K1 is hashed using a function chain G'={h1,h2}(M=2) to output a 2-bit sub-index ID (SubID)=G'(K1)={h1(K1),h2(K1)}={1,0}. The first binary value of the sub-index ID is the hash output of the 6-bit compact feature vector K1={0,0,1,0,1,0} and the orthogonal hash function h1, and the second binary value of the sub-index ID is the hash output of the 6-bit compact feature vector K1={0,0,1,0,1,0} and the orthogonal hash function h1.

[0106] like Fig. 11B As shown in process block 1108 in FIG. 1104 , once the compact feature vector K j The sub-index ID is determined by the compact feature vector K j Add to the corresponding partition group 1 to 2 M In. Fig.12 In the example of FIG. 1 , the 6-bit compact feature vector K1={0, 0, 1, 0, 1, 0} is added to partition group 3, as indicated by its binary sub-index ID, SubID=10. b Therefore, each compact feature vector K i (and its corresponding original eigenvector V i and unstructured data objects) are individually assigned to sub-index partition groups of similar vectors.

[0107] When the partitioning process 1100 is completed, the compact feature vector K in the compact feature vector set 502 is i To K n Distributed into M partition groups, where each partition group is a compact feature vector K i To K n A subset of . Fig.11A and 12 As shown in , the respective RDF index structure generation processes 128(1) to 218(2 M ) to process the M partition groups respectively to generate respective RDF sub-index structures 219(1) to 219(2 M ). Use a combination of the above Figures 6 to 9 In the same manner as described above for the processing of the compact feature vector set 502 by the RDF index structure generation process 218, the RDF index structure generation process 218(1) to 218(2) M Each index structure generation process in ) processes its respective sub-index partition group. The respective RDF sub-index structures 219(1) to 219(2 M) includes respective LHS index tables T(1) to T(ns), where the RDF sub-index structures 219(1) to 219(2 M ) selects n separately for each sub-index structure s .

[0108] like Fig.11A The dashed box marked “machine (1)” to “machine (2 M )”, in at least some exemplary embodiments, the RDF sub-index structures 219(1) to 219(2 M ) is hosted or stored on a different digital processing system to support concurrent queries. In some examples, the multiple different digital processing systems may include multiple virtual machines implemented on a common digital processing system (e.g., digital processing system 1410) or on physically different machines (e.g., multiple digital processing systems 1410). The size of M determines the number of sub-index partition groups, which affects the ability to support concurrent query requests. The larger M is, the higher the ability to handle concurrent searches. Therefore, in an exemplary embodiment, the sub-index structures 219 (1) to 219 (2 M ) is stored as an independently searchable structure, so that concurrent searches of the sub-index structures can be achieved.

[0109] Now refer to Fig.14 Describes the RDF subindex structure 219(1) to 219(2 M ), where Fig.14 The similarity search method 204A according to an exemplary embodiment is shown. The similarity search method 204A is combined with the above Figure 2 Similar to the similarity search method 204 described above, except that the similarity search method 204A includes an additional process of generating a sub-index ID for the compact feature query vector Qk (process 1450) and, in at least some exemplary embodiments, an additional process of performing a step-wise search of the index structure using a sub-index ID similar to the sub-index ID of the compact feature query vector Qk (process block 1454). Fig.14 As shown, the similarity search method 204A includes: a feature extraction process 222 for converting the query object into a d-dimensional original feature query vector Qv; and an LSH dimension reduction process 226 for reducing the d-dimensional original feature query vector Qv to an m-dimensional compact feature query vector Qk=G i (Qv)={h1(Qv),h2(Qv),…,h m (Qv)}.

[0110] Another LSH level is applied in process 1450 to determine a compact feature vector K for searching for a compact feature query vector Qk that is similar to the compact feature query vector Qk. i In particular, the same operation of applying the second LSH layer described above for process block 1104 is applied to the query vector Qk. In particular, the sub-index ID (SubID) of the query vector Qk is determined by applying the orthogonal angle hash function G' as follows:

[0111] SubID of query vector Qk = G'(Qk) = {h1(Qk), h2(Qk), ..., h M (Qk)}.

[0112] like Fig.14 As shown in process 1452 in FIG. 14, the SubID of the compact feature query vector Qk is used to identify the RDF sub-index structure 219 (SubID) of the sub-index partition that is most likely to include objects similar to the search query object. Then, the above combined Figure 2 The same search process 230 is applied to identify candidate results 232 in the RDF sub-index structure 219 (SubID).

[0113] Ideally, the partitioning method strives to partition all similar objects into one sub-index partition group. However, due to the approximate nature of applying the partitioning layer LSH to assign partition group sub-index IDs, in at least some applications, similar objects may still be partitioned into different partition groups, which will affect the accuracy and consistency of similarity searches using the generated sub-index structure. Therefore, in order to improve search accuracy, in an exemplary embodiment, a step-by-step search method is implemented based on other LSH attributes. Fig.14 Process block 1454 ("Perform a stepwise search of the index structure with similar sub-index IDs") in Fig.15 An example of additional steps required to implement the step-by-step method is illustrated in the step-by-step search schematic shown in .

[0114] The step-by-step search method is based on the following assumption: sub-index structures that are one step away from each other are more likely to contain compact feature vectors that are close to the compact feature vector of the search query than sub-index structures that are two steps away from each other. Since each bit of the compact feature vector has only two possible values ​​0 / 1, the Hamming distance between two compact feature vectors can be recorded as an incremental step, and the maximum number of incremental steps is M steps.

[0115] In an exemplary embodiment, as shown in process 1452, initially, the sub-index structure 219 (SubID) corresponding to the sub-index ID generated for the compact feature query vector Qk is searched. However, in order to improve accuracy, the 1-step sub-index structure is also searched, and the time efficiency gradually decreases as the number of sub-indexes searched increases. In some exemplary embodiments, the number of 1-step sub-index structures used for searching is set to M (i.e., the same as the number of bits used for the sub-index ID). Using this method, higher accuracy can be achieved in some cases by searching in a reasonable number of sub-index structures.

[0116] To identify the delta-step sub-index structure for a particular SubID, apply +1 (for bit=0) or -1 (for bit=1) to the delta bits in the original sub-index ID. k The original sub-index ID is SubID = G'(Q k )={h1(Q k ), h2(Q k ), …, h M (Q k )}, then the 1-step sub-index ID is determined by applying a +1 / -1 operation on a random bit in G'(Qk), the 2-step sub-index ID is determined by applying a +1 / -1 operation on two random bits in SubID=G'(Qk), and so on. Fig.15 It can be seen that if M=3, the original sub-index ID is 010, the 1-step sub-index IDs are 110, 000 and 011, the 2-step sub-index IDs are 100, 111 and 001, and the 3-step sub-index is 101.

[0117] Thus, in an exemplary embodiment, the process block 1454 (performing a stepwise search of index structures with similar sub-index IDs) includes, as indicated by process block 1456, determining the sub-index IDs of all sub-index structures 219 (SubIDs) that fall within a threshold similarity range of an “original” or “0-step” sub-index ID (where “original” or “0-step” sub-index ID is the compact query function vector Q k In an exemplary embodiment, the threshold is the maximum number of steps (e.g., bit changes) within the range of SubIDs that falls within the range of the maximum number of steps (e.g., M). Fig.15In the example, M=3, original SubID={0, 1, 0}, then there will be 3 "1-step" SubIDs that are different from the original SubID by one bit, namely: {1, 1, 0}, {0, 0, 0} and {0, 1, 1}, 3 "2-step" SubIDs that are different from the original SubID by two bits, namely: {0, 0, 1}, {1, 1, 1} and {1, 0, 0}, and 1 "3-step" SubID that is different from the original SubID by three bits, namely: {1, 0, 1}.

[0118] As described in process block 1458, each sub-index structure 219 (SubID) identified as falling within the maximum step size range is then searched to identify a sub-index structure 219 that matches the compact query function vector Q k Any compact vector K similar to i In an exemplary embodiment, such a search is performed by the search process 230 described above, and a set of candidate results 232 are returned for each searched sub-index structure 219 (SubID). In an exemplary embodiment, the candidate search results may be filtered and ranked.

[0119] In at least some examples, the digital processing system 1410 can be used to generate a search result threshold for each compact query function vector Q k Determine to perform a step-by-step search and an extension of such a search, respectively. For example, if after searching the sub-index structure corresponding to the original sub-index ID, a threshold number of candidate search results is reached, then there is no need to perform an additional step-by-step search (i.e., process block 1454). Similarly, if an additional step-by-step search is performed, then if the threshold number of candidate search results is reached before the maximum number of step-by-step searches are completed, the step-by-step search of the additional sub-index structure can be terminated.

[0120] As described above, in at least some exemplary embodiments, each of the RDF sub-index structures 219(1) to 219(2M) is hosted or stored on a different digital processing system to support parallel queries. These systems can support parallel queries based on different object queries, or support parallel step-by-step queries based on the same object query.

[0121] In at least some exemplary embodiments, the above-described methods and systems can address some inherent time and processing inefficiencies in a large number of existing unstructured data storage systems, indexing systems, and search systems, thereby improving one or more of search accuracy, search speed, and utilization of system resources including processor time and power consumption.

[0122] The above description of some embodiments is provided to enable any person skilled in the art to construct or use the apparatus, method or computer-readable medium according to the present invention.

[0123] Various modifications to the embodiments described herein may be apparent to those skilled in the art, and the general principles of the methods and devices described herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is consistent with the principles and novel features disclosed herein in the broadest scope.

[0124] For example, although embodiments are described primarily with reference to bits, other embodiments may involve non-binary and / or multi-bit symbols.

Claims

1. A method for partitioning a plurality of data objects, characterized in that: Each data object is represented by its own high-dimensional feature vector, including: performing a hash function on each high-dimensional feature vector to generate a respective low-dimensional binary compact feature vector for the data object represented by the high-dimensional feature vector; performing another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partitioning the compact feature vector into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vector; generating a searchable sub-index structure for each of said respective partition groups; The sub-index structures are stored as independent searchable structures, so that the sub-index structures can be searched concurrently with each other; wherein generating a searchable sub-index structure for each of the respective partition groups comprises: for each partition group: Generating a plurality of twisted compact feature vector sets for the compact feature vectors in the partition group, wherein each of the twisted compact feature vector sets is generated by applying a respective random scrambling arrangement to the compact feature vectors in the partition group; For each twisted compact feature vector set, generating an index table for data objects represented by the compact feature vectors in the partition group based on the sequence of hash values ​​in the twisted compact feature vector set; An index table is included that is generated for each of the warped compact feature vector sets in a searchable sub-index structure of the partition group.

2. The method according to claim 1, characterized in that: The hash function executed on each high-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function executed on each compact feature vector is also a LSH function.

3. The method according to claim 2, characterized in that The hash function and the another hash function are orthogonal angle hash functions.

4. The method according to claim 3, characterized in that Each compact feature vector is partitioned into only a single such partition group.

5. A system for partitioning a data object, characterized in that: Each data object is represented by its own high-dimensional feature vector, including: one or more processing units; A system storage device coupled to each of the processing units, the system storage device tangibly storing executable instructions that, when executed by the one or more processing units, cause the system to: performing a hash function on each high-dimensional feature vector to generate a respective low-dimensional binary compact feature vector for the data object represented by the high-dimensional feature vector; performing another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partitioning the compact feature vector into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vector; generating a searchable sub-index structure for each of said respective partition groups; When the executable instructions are executed by the one or more processing units, the system stores the sub-index structures as independently searchable structures in one or more memories, so that the sub-index structures can be searched concurrently with each other; wherein, when the executable instructions are executed by the one or more processing units, the system generates the searchable sub-index structure for each of the respective partition groups by the following operations: Generating a plurality of twisted compact feature vector sets for the compact feature vectors in the partition group, wherein each of the twisted compact feature vector sets is generated by applying a respective random scrambling arrangement to the compact feature vectors in the partition group; For each twisted compact feature vector set, generating an index table for data objects represented by the compact feature vectors in the partition group based on the sequence of hash values ​​in the twisted compact feature vector set; An index table is included that is generated for each of the warped compact feature vector sets in a searchable sub-index structure of the partition group.

6. The system according to claim 5, characterized in that The hash function executed on each high-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function executed on each compact feature vector is also a LSH function.

7. The system according to claim 6, characterized in that The hash function and the another hash function are orthogonal angle hash functions.

8. The system according to claim 7, characterized in that include: Each compact feature vector is partitioned into only a single such partition group.

9. A computer program product, characterized in that A medium having executable instructions tangibly stored thereon, which, when executed by a digital processing system, causes the digital processing system to: performing a hash function on each of the plurality of high-dimensional feature vectors to generate a respective low-dimensional binary compact feature vector, each of the high-dimensional feature vectors representing a respective data object; performing another hash function on each compact feature vector to assign a sub-index ID to the compact feature vector; partitioning the compact feature vector into respective partition groups, wherein the respective partition groups correspond to the sub-index IDs assigned to the compact feature vector; generating a searchable sub-index structure for each of said respective partition groups; The sub-index structures are stored as independent searchable structures, so that the sub-index structures can be searched concurrently with each other; wherein generating a searchable sub-index structure for each of the respective partition groups comprises: for each partition group: Generating a plurality of twisted compact feature vector sets for the compact feature vectors in the partition group, wherein each of the twisted compact feature vector sets is generated by applying a respective random scrambling arrangement to the compact feature vectors in the partition group; For each twisted compact feature vector set, generating an index table for data objects represented by the compact feature vectors in the partition group based on the sequence of hash values ​​in the twisted compact feature vector set; An index table is included that is generated for each of the warped compact feature vector sets in a searchable sub-index structure of the partition group.

10. A method for searching for data objects similar to a query object, characterized in that: include: Convert the query object into a d-dimensional feature vector; A hash function is performed on the d-dimensional feature vector to generate an m-dimensional binary query vector for the query object, where m <d; performing another hash function on the query vector to determine a sub-index ID of the query vector; Searching for a compact feature vector similar to the query vector in a sub-index structure corresponding to the sub-index ID, the sub-index structure comprising an index of compact feature vectors, wherein each compact feature vector represents a respective data object, and the sub-index structure is an independently searchable structure, so that the sub-index structures can be searched concurrently with each other; The step of searching the sub-index structure corresponding to the sub-index ID for a compact feature vector similar to the query vector includes: generating a plurality of distorted query vectors for the query vector, wherein the plurality of distorted query vectors are generated by applying respective random scrambling permutations; A search is performed in the sub-index structure corresponding to the sub-index ID according to the warped query vector to search for a compact feature vector similar to the query vector.

11. The method according to claim 10, characterized in that The hash function executed on the d-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function executed on the query vector is also an LSH function.

12. The method according to claim 11, characterized in that The hash function and the another hash function are orthogonal angle hash functions.

13. The method according to any one of claims 10 to 12, characterized in that Also includes: Determine a set of additional sub-index IDs, wherein the additional sub-index IDs belong to a similarity threshold range of the sub-index ID of the query vector; A compact feature vector similar to the query vector is searched in the other sub-index structure corresponding to the other sub-index ID.

14. The method according to claim 13, characterized in that The similarity threshold refers to a threshold level of different bit values ​​in the additional sub-index ID relative to the sub-index ID of the query vector.

15. The method according to claim 13, characterized in that If a threshold number of search results is reached before all of the sub-index structures corresponding to the additional sub-index IDs are searched, the search for the additional sub-index structures is terminated.

16. The method according to any one of claims 10 to 12, characterized in that include: While searching in the sub-index structure corresponding to the sub-index ID: searching in another sub-index structure for a compact feature vector, wherein the compact feature vector is similar to another query vector for which another sub-index ID is determined.

17. A system for searching for data objects similar to a query object, characterized in that: include: one or more processing units; a system storage device coupled to each of the one or more processing units, the system storage device tangibly storing executable instructions that, when executed by the one or more processing units, cause the system to: Convert the query object into a d-dimensional feature vector; A hash function is performed on the d-dimensional feature vector to generate an m-dimensional binary query vector for the query object, where m <d; performing another hash function on the query vector to determine a sub-index ID of the query vector; Searching for a compact feature vector similar to the query vector in a sub-index structure corresponding to the sub-index ID, the sub-index structure comprising an index of compact feature vectors, wherein each compact feature vector represents a respective data object, and the sub-index structure is an independently searchable structure, so that the sub-index structures can be searched concurrently with each other; The step of searching the sub-index structure corresponding to the sub-index ID for a compact feature vector similar to the query vector includes: generating a plurality of distorted query vectors for the query vector, wherein the plurality of distorted query vectors are generated by applying respective random scrambling permutations; A search is performed in the sub-index structure corresponding to the sub-index ID according to the warped query vector to search for a compact feature vector similar to the query vector.

18. The system according to claim 17, characterized in that The hash function executed on the d-dimensional feature vector is a locality sensitive hashing (LSH) function, and the other hash function executed on the query vector is also an LSH function.

19. The system according to claim 18, characterized in that The hash function and the another hash function are orthogonal angle hash functions.

20. The system according to any one of claims 17 to 19, characterized in that The executable instructions also cause the system to: Determine a set of additional sub-index IDs, wherein the additional sub-index IDs belong to a similarity threshold range of the sub-index ID of the query vector; A compact feature vector similar to the query vector is searched in the other sub-index structure corresponding to the other sub-index ID.

21. The system according to claim 20, characterized in that The similarity threshold refers to a threshold level of different bit values ​​in the additional sub-index ID relative to the sub-index ID of the query vector.

22. The system according to claim 20, characterized in that If a threshold number of search results is reached before all of the sub-index structures corresponding to the additional sub-index IDs are searched, the search for the additional sub-index structures is terminated.

23. The system according to any one of claims 17 to 19, characterized in that The executable instructions further cause the system to search for a compact feature vector in another sub-index structure while searching in the sub-index structure corresponding to the sub-index ID, wherein the compact feature vector is similar to another query vector for which another sub-index ID is determined.

24. A computer program product, characterized in that A medium tangibly stores thereon executable instructions which, when executed by a digital processing system, cause the digital processing system to search for a data object similar to a query object by: Convert the query object into a d-dimensional feature vector; A hash function is performed on the d-dimensional feature vector to generate an m-dimensional binary query vector for the query object, where m <d; performing another hash function on the query vector to determine a sub-index ID of the query vector; Searching for a compact feature vector similar to the query vector in a sub-index structure corresponding to the sub-index ID, the sub-index structure comprising an index of compact feature vectors, wherein each compact feature vector represents a respective data object, and the sub-index structure is an independently searchable structure, so that the sub-index structures can be searched concurrently with each other; The step of searching the sub-index structure corresponding to the sub-index ID for a compact feature vector similar to the query vector includes: generating a plurality of distorted query vectors for the query vector, wherein the plurality of distorted query vectors are generated by applying respective random scrambling permutations; A search is performed in the sub-index structure corresponding to the sub-index ID according to the warped query vector to search for a compact feature vector similar to the query vector.

Citation Information

Patent Citations

  • Layered locality sensitive hashing (LSH) partition indexing for big data applications

    US20190272341A1

  • Local-sensitive hash high-dimensional indexing method based on distribution entropy

    CN102609441A

  • Distributed index method based on LSH (Locality Sensitive Hashing)

    CN103744934A

  • Efficient distributed locality sensitive Hashing method

    CN107391554A

  • Remapping locality-sensitive hash vectors to compact bit vectors

    US20130204905A1