A product quantization nearest neighbor search method based on optimal space decomposition
By transforming the spatial partitioning problem of product quantization into a spatial decomposition problem of data distribution volume balance, and setting the number of closest clusters based on the quantization error, the problem of large quantization error in high-dimensional data retrieval is solved, achieving higher retrieval accuracy and lower resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2026-03-20
AI Technical Summary
Existing product quantization nearest neighbor retrieval methods suffer from large quantization errors and insufficient retrieval accuracy in high-dimensional data retrieval.
The spatial partitioning problem of product quantization is transformed into a spatial decomposition problem that balances the data distribution volume of each subspace. The reasonable decomposition of the space is achieved by solving the objective function, and the number of closest clusters in each subspace is set according to the quantization error. An inverted sorting table is constructed to improve retrieval accuracy.
It effectively reduces quantization error, improves retrieval accuracy, and at the same time reduces index building time and memory consumption, thereby improving the real-time performance and accuracy of retrieval.
Smart Images

Figure CN115292537B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a product-quantized nearest neighbor retrieval method based on optimal spatial decomposition, belonging to the field of high-dimensional data retrieval. Background Technology
[0002] In recent years, with the development of the Internet, high-dimensional data has continued to grow, putting enormous pressure on data retrieval, especially for high-dimensional data such as images and text.
[0003] The Product Quantization (PQ) algorithm is a commonly used fast search algorithm in image retrieval. The PQ algorithm sequentially decomposes the original vector space into several low-dimensional vector spaces (e.g., ...). Figure 2 The Cartesian product (as shown) is used, and the resulting low-dimensional vector space is quantized. The nearest neighbor retrieval method based on the PQ algorithm has low memory consumption and, due to its lower quantization error, higher retrieval accuracy than hash-based and tree-based nearest neighbor retrieval methods. However, its retrieval accuracy is still affected by the PQ quantization error. Therefore, a data retrieval method with higher retrieval accuracy is needed. Summary of the Invention
[0004] To overcome the problems existing in the prior art, this invention designs a product quantization nearest neighbor retrieval method based on optimal spatial decomposition. The spatial partitioning problem of product quantization is transformed into a spatial decomposition problem that balances the data distribution volume of each subspace, thereby achieving reasonable spatial partitioning, effectively reducing quantization error, and improving retrieval accuracy.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A product-quantized nearest neighbor retrieval method based on optimal space decomposition includes the following steps:
[0007] Obtain the sample dataset;
[0008] Find the optimal solution for the spatial decomposition of the sample dataset;
[0009] The sample dataset is decomposed into M subspaces based on the optimal solution of spatial decomposition, and cluster analysis is performed in each subspace to obtain several clusters; an inverted sort table is constructed using the cluster centroids as indexes.
[0010] Retrieve the data to be searched;
[0011] The search data is decomposed into M subspaces according to the optimal solution of the spatial decomposition, and several nearest clusters are retrieved in each subspace; the Cartesian product of the several nearest clusters is calculated to obtain several candidate coding sets;
[0012] According to the plurality of candidate encoding sets, a reverse order table is queried to obtain a retrieval result set.
[0013] Further, the method further comprises: performing dimension reduction processing on the sample data by using a PCA algorithm.
[0014] Further, the spatial decomposition optimal solution is solved by performing the following steps.
[0015] An objective function is constructed by taking the cumulative value of square roots of products of variances of dimensions in each subspace after decomposition as the target, and the spatial decomposition optimal solution is obtained by solving the objective function.
[0016] Further, the objective function is expressed by a formula as follows.
[0017]
[0018] In the formula, s represents the s-th subspace, and M represents the total number of subspace. The square root of the product of variances of dimensions in the s-th subspace is represented by s.
[0019] Further, the objective function is solved by performing the following steps.
[0020] A1, the dimension with the t-th largest variance and the t-th smallest variance in the sample data set is allocated to the subspace with the smallest SRVP value, and the SRVP value of the subspace is updated, until the number of dimensions in the subspace is equal to D / M;
[0021] A2, repeat step A1 until all dimensions are allocated to the subspace.
[0022] Further, the method further comprises: setting the number of nearest clusters of each subspace according to the quantization error.
[0023] Further, the smaller the quantization error of the subspace is, the more the number of nearest clusters of the subspace is.
[0024] Further, the number of nearest clusters of each subspace is set by performing the following steps.
[0025] A preset total number of nearest clusters Z is set.
[0026] Each subspace is sorted according to the proportion of the quantization error.
[0027] The number of nearest clusters of the subspace is calculated according to the number of subspaces with undetermined number of nearest clusters and the total number of nearest clusters Z, the value of Z is updated according to the calculated number of nearest clusters, the number of nearest clusters of the next subspace is sequentially calculated and the value of Z is updated according to the sorting result, until the number of nearest clusters of all subspaces is obtained.
[0028] Further, the method further comprises:
[0029] calculating a quantization error ratio of a certain subspace; calculating a weight value of the subspace according to the quantization error ratio; and adjusting the nearest cluster number value of the subspace according to the weight value.
[0030] Further, the nearest cluster number of the subspace is calculated as follows:
[0031]
[0032]
[0033] In the formula, R s represents the nearest cluster number of the s-th subspace; floor() represents a down-rounding function; ceil() represents an up-rounding function; p s represents the quantization error ratio of the s-th subspace; Z represents the total number of the nearest clusters; M-i represents the number of the subspace whose nearest cluster number value is not determined; and M represents the total number of the subspace.
[0034] Compared with the prior art, the present application has the following features and advantages:
[0035] 1. In the prior art PQ algorithm, sequential subspace decomposition is adopted, and the quantization error is large. In the present application, the problem is converted into a subspace decomposition problem for balancing the data distribution volume of each subspace, and the length of each dimension is measured by using variance, so as to construct a target function as shown in formula (2) for easy solution. The reasonable decomposition of the space is realized by solving the target function, the quantization error is effectively reduced, and the retrieval precision is improved.
[0036] 2. The present application considers that different subspace has different quantization error, and the smaller the quantization error is, the more compact the data distribution range is, and the smaller the clustering radius is. Therefore, in the subspace with smaller quantization error, more clusters need to be searched to contain the nearest neighbor points; and in the subspace with larger quantization error, fewer clusters need to be searched to contain the nearest neighbor points. Therefore, in the present application, the nearest cluster number of each subspace is set according to the quantization error, and the subspace with smaller quantization error is allocated with more nearest cluster number, which is beneficial to obtain a retrieval result set with higher quality, and thus the retrieval precision is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 is a flow chart of the present application;
[0038] Figure 2 is a schematic diagram of the prior art;
[0039] Figure 3 is a schematic diagram of the optimal subspace decomposition of the present application;
[0040] Figure 4 is a schematic diagram of the experimental results of Example 3. DETAILED DESCRIPTION
[0041] The application will be described in more detail below with reference to examples.
[0042] Example 1
[0043] As shown in the figure, a product quantization nearest neighbor search method based on optimal space decomposition includes the following steps: Figure 1
[0044] S1, constructing a sample data set:
[0045] Obtain n pictures; extract the feature vector of each picture, and the feature vector set is the sample data set
[0046] S2, dimension reduction processing of the sample data set by PCA algorithm:
[0047] Zero-mean each row of the sample data set X; calculate the covariance matrix of X; calculate the eigenvalues and corresponding eigenvectors of the covariance matrix; arrange the eigenvectors into a matrix from top to bottom according to the size of the corresponding eigenvalues, and take the first D rows to form a matrix A; X' = AX, X' is the sample data set after dimension reduction to D.
[0048] S3, solving the optimal solution of space decomposition of the sample data set:
[0049] Calculate the variance σ = [σ (1) ,σ (2) ,…,σ (D) ] of each dimension in the sample data set X', and the variance σ (1) >σ (2) >…>σ (D) in the sample data set X' obtained by PCA algorithm dimension reduction.
[0050] In order to make the subspace data distribution as balanced as possible, so as to ensure that the product quantization error is minimum, and the volume accumulation value of the divided subspace data distribution is minimum, the objective function is constructed as formula (1).
[0051]
[0052]
[0053] In the formula, V(X s ′) represents the data distribution volume of subspace X s ′, and b represents the radius of data distribution. The constraint conditions are: each subspace is not intersected; all dimensions of the sample data set X' are contained in the union set of the subspaces.
[0054] Define the square root of the product of the variances of D dimensions
[0055] In this embodiment, the length of each dimension is measured by variance, and it is assumed that the data distribution is uniform distribution, and the variance of the uniform distribution is Δ=(b-a)(In this embodiment, it is assumed that a=0, and b is the length of the data distribution). Obviously, That is, SRVP=12 D / 2 V. Since 12 D / 2 Since C is only a constant, equation (1) can be expressed as equation (2):
[0056]
[0057]
[0058] In the equation, X′ s is the data in the subspace, and the square root of the product of the variance of the dimension.
[0059] Based on the greedy idea, the optimal solution of equation (2) is solved by using the algorithm shown in Table 1, and the algorithm performs the following process:
[0060] First, define M empty set lists for M subspaces, and the list corresponds to the subspace one by one; perform multiple loops, and each loop selects the tth dimension and the (D+1-t)th dimension in the sample data set to be placed in the subspace with the smallest SRVP value (s<M), and the execution result is as shown in Figure 3 In this embodiment, σ (1) >σ (2) >…>σ (D) Therefore, the tth dimension and the (D+1-t)th dimension are the tth largest variance and the tth smallest variance. For example, D=8, M=2, and the decomposition result is [1, 8, 2, 7], [3, 6, 4, 5].
[0061]
[0062] S4, according to the optimal solution of the space decomposition obtained in step S3, the sample data set X′ is decomposed into M subspaces, and clustering analysis is performed in each subspace to obtain a plurality of clusters; taking the cluster center as an index, a reverse sorting table IT(code)={x:x∈X and code=IDX(x)} is constructed.
[0063] S6, obtain the data to be searched, and reduce the data to be searched to D dimensions by the PCA algorithm;
[0064] S7, according to the optimal solution of the space decomposition, the D-dimensional data to be searched is decomposed into M subspaces to obtain q′=(q′1, q′2, …, q′M). M); retrieving R nearest clusters in each subspace; calculating the Cartesian product of the R nearest clusters to obtain a candidate encoding set containing R M nearest clusters in the s-th subspace are:
[0065] The final candidate encoding set is
[0066] and |Candidate_index| = R M .
[0067] According to the R M candidate encoding sets, the inverted index table is queried, and the target is hit to form a retrieval result set.
[0068] Embodiment Two
[0069] The difference between this embodiment and Embodiment One is that different numbers of nearest clusters [R1, …, s, …, R M ] are set for each subspace according to the quantization error. The specific steps are as follows:
[0070] According to the quantization error of the subspace, the proportion p s of the quantization error is calculated, as shown in equation (3):
[0071]
[0072] In the equation, err s represents the quantization error of the s-th subspace.
[0073] The number of nearest clusters R s for the s-th subspace is defined, as shown in equation (4)
[0074]
[0075] The algorithm shown in Table 2 is used to solve equation (4), and the algorithm performs the following processes:
[0076] A total number of nearest clusters Z is set in advance; the weight value of the subspace is calculated Each subspace is sorted in descending order of quantization error;
[0077] First, according to the number of unprocessed subspaces, an initial cluster number ΔR is allocated to the subspace for this calculation from Z; and the weight value of the subspace is multiplied by ΔR to obtain the number of nearest clusters of the subspace; Z is dynamically updated, that is, the number of nearest clusters calculated this time is removed from Z; the number of nearest clusters of the next subspace is sequentially calculated according to the sorting result, until the number of nearest clusters of all subspaces is obtained.
[0078]
[0079] Obviously, the smaller the quantization error of a subspace, the larger the value of R and ΔR, and the larger the R s assigned to it (err s the smaller the M-i value, and the smaller the M-i value, the larger the value of R and ΔR, and the larger the R
[0080] After the above process, [R1, …, R M ] is obtained. Then for q' = (q'1, q'2, …, q'N), the first R M closest cluster indices to q' are found. s s The candidate encoding set is Candidates = {IT(idx) | idx ∈ Candidate_idx}. and Finally, the result set Candidates = {IT(idx) | idx ∈ Candidate_idx} is obtained.
[0081] The skilled person in the art considers that different subspace has different quantization error. The smaller the quantization error, the more compact the data distribution range, and the smaller the cluster radius. Therefore, in the subspace with smaller quantization error, more clusters need to be searched to contain the nearest neighbor points; while in the subspace with larger quantization error, fewer clusters are needed to contain the nearest neighbor points. The present application sets the number of closest clusters for each subspace according to the quantization error, and the smaller the quantization error, the more closest clusters are assigned, which is beneficial to obtain a result set with higher quality, and thus improves the search precision.
[0082] Example Three
[0083] Here, the following terms are explained:
[0084] OSDPQ - the product quantization nearest neighbor search method based on the optimal space decomposition method described in Example One of the present application
[0085] PQ - product quantization algorithm
[0086] OPQ - optimized product quantization algorithm
[0087] OPQ(p) - optimized product quantization algorithm (parameter version)
[0088] OPQ(np) - optimized product quantization algorithm (non-parameter version), @number represents the number of iterations
[0089] RVQ - Residual Vector Quantization
[0090] LTI - Learning to index for nearest neighbor
[0091] The embodiment uses three data sets for approximate nearest neighbor search experiments, and the three data sets are shown in Table 3.
[0092] Table 3
[0093]
[0094]
[0095] By comparing the K-neighbor accuracy of different algorithms under the condition that the number of search results is the same, the search accuracy of the algorithm is measured. The calculation method of K-neighbor accuracy is as follows.
[0096]
[0097] Wherein, A K ={a1, a2, …, a k} represents the actual K-neighbor element set of the data to be searched q. Top k-reveal represents the proportion of K-neighbor in the actual K-neighbor element in the search result set.
[0098] 1. Quantization error comparison
[0099] Table 4 shows the quantization error of the three data sets decomposed by OSDPQ, (OPQ(p)) and (OPQ(np)). Overall, under the condition that the number of iterations is sufficient, OPQ(np) has the smallest quantization error, and the quantization error of OSDPQ is smaller than PQ and OPQ(p) on the three data sets.
[0100] Table 4
[0101] MNIST GIST1M SIFT1M PQ 2.395 x 10 5 ]] 8.30 x 10 2 ]] 1.652 x 10 5 ]]> OPQ(p) 2.234 x 10 5 ]] 7.69 x 10 2 ]] 1.578 x 10 5 ]] OPQ(np)@50 2.063 x 10 5 ]] 7.54 x 10 2 ]] 1.554 x 10 5 ]]> OPQ(np)@100 2.049 x 10 5 ]] 7.48 x 10 2 ]] 1.539 x 10 5 ]] OPQ(np)@150 2.051 x 10 5 ]] 7.43 x 10 2 ]] 1.478 x 10 5 ]]> OPQ(np)@200 2.052 x 10 5 ]]> 7.34 x 10 2 ]]> 1.477 x 10 5 ]]> OSDPQ 2.205 x 10 5 ]]> 7.39 x 10 25 ]] 1.572 x 10 5 ]]
[0102] PQ, OPQ(p) and OSDPQ decompose the data dimension with fixed steps, while OPQ(np) adjusts the transformation matrix of the data by rotation and projection in the iteration process to change the distribution of the data in order to obtain the smallest quantization error. Due to the diversity of data distribution, OPQ(np) has better performance in terms of quantization error alone, but its iteration process leads to low algorithm efficiency and reduces usability.
[0103] 2. Comparison and analysis of search accuracy
[0104] OSDPQ vs. PQ, OPQ, RVQ, LTI in terms of retrieval accuracy Figure 4 Figure 4 The curves of retrieval accuracy vs. number of retrieval results are shown (Top1 means the number of retrieval results is 1, and Top10 means the number of retrieval results is 10). It can be seen from the figure that the retrieval accuracy increases with the increase of the number of retrieval results. For the convenience of description, + means that the accuracy of the method in this paper is better than that of the comparative method, and otherwise, - is used to represent it.
[0105] In the GIST1M dataset, OSDPQ shows the highest retrieval accuracy, followed by OPQ(p). When the number of retrieval results is 2000, OSDPQ is improved by +1.10%, +2.94%, +1.7%, +4.2%, +20.25%, +25.05%, +6.05%, +6.89% and +5.62%, +4.63% than OPQ(p), OPQ(np)@200, PQ, RVQ and LTI in Top1 and Top10, respectively (as shown in Figure 4 (a, b) shown in the table 4). Obviously, (1) the retrieval accuracy of PQ is far behind OSDPQ, OPQ(p) and OPQ(np); (2) OPQ(np)@200 achieves the lowest quantization error (as shown in the table 4), but its retrieval accuracy is not the highest.
[0106] The reason for phenomenon (1) is that the GIST1M data distribution is extremely uneven, and in the case of not considering any prior knowledge, the order space decomposition of PQ will lead to extremely uneven data volume in each subspace, which will seriously reduce the retrieval accuracy of PQ. The reason for phenomenon (2) is probably the diversity of data set distribution, and OPQ(np)@200 excessively pursues the minimization of quantization error, which leads to the uneven distribution of data in the reverse order table.
[0107] In the SIFT1M dataset, OSDPQ gradually shows good retrieval accuracy with the increase of the number of retrieval results. When the number of retrieval results is less than 1600, OPQ(np)@200 achieves the optimal retrieval accuracy; when the number of retrieval results is 1600, OSDPQ is different from OPQ(p), OPQ(np)@50, OPQ(np)@100, OPQ(np)@150, OPQ(np)@200, PQ, RVQ and LTI in Top1 by +1.98%, +4.70%, +1.44%, -1.21%, -1.75%, +5.15%, +3.40% and +4.80%, respectively (as shown in Figure 4 (c) shown in the table 4). With the increase of the number of retrieval results, the gap between OSDPQ and the optimal method OPQ(np)@200 is gradually reduced (as shown inFigure 4 (c,d) shows). OSDPQ is 1.20% lower than OPQ(np)@200 on Top1 when the number of retrieval results is 1800; while OSDPQ is only 0.3% lower than OPQ(np)@200 when the number of retrieval results is 2000.
[0108] In MNIST dataset, OSDPQ generally shows better retrieval accuracy. When the number of retrieval results is 800, OSDPQ is (+13.40%, +6.96%), (+3.36%, +0.85%), (+3.60%, +0.60%), (+1.66%, -1.00%), (-0.56%, -1.30%), (+1.18%, -1.81%), (+8.96%, +2.60%) and (+17.81%, +14.49%) better than PQ, OPQ(p), OPQ(np)@50, OPQ(np)@100, OPQ(np)@150, OPQ(np)@200, RVQ and LTI respectively in Top1 and Top10 queries (as shown in Fig. 4(e,f)). Figure 4 (e,f) shows). Since the principal component distribution of MNIST data is relatively balanced (as shown in Fig. 3), the spatial decomposition of PQ makes the data distribution volume of each subspace relatively balanced, so the retrieval accuracy of PQ and OSDPQ, OPQ(p) and OPQ(np) is relatively small under the same number of retrieval results. However, under the same conditions, OSDPQ, OPQ(p) and OPQ(np) show greater accuracy differences on GIST1M dataset.
[0109] 3. Index construction time and memory consumption comparison
[0110] When the retrieval accuracy of OSDPQ and OPQ(np) is similar (SIFT1M: OPQ(np)@80; GIST1M: OPQ(np)@200; MNIST: OPQ(np)@100), the index construction time of OSDPQ and OPQ(np) is (581.23s, 2421.86s), (664.85s, 10230.12s) and (15.17s, 155.42s) respectively. On these three datasets, the construction efficiency of OSDPQ is improved by 4.17 times, 15.83 times and 10.24 times respectively compared with OPQ.
[0111] On SIFT1M, GIST1M and MNIST datasets, the memory consumed by OSDPQ and OPQ(np) is (2832.81Mb, 3194.35Mb); (3656.56Mb, 4075.66Mb); (0.01Mb, 0.01Mb) respectively.
[0112] (1577.93Mb,2017.58Mb). The memory consumption of OSDPQ is reduced by 11.3%, 10.3% and 21.8% than OPQ on the three data sets respectively.
[0113] In summary, the product quantization based nearest neighbor search method based on optimal space decomposition (OSDPQ) described in embodiment one of the present application can effectively reduce quantization error, improve search accuracy, and consume less time and memory, and has strong real-time performance compared with the prior art.
[0114] Embodiment four
[0115] DRQE-the method for setting the number of nearest clusters of each subspace based on quantization error described in embodiment two of the present application. When DRQE is applied to PQ, OPQ(p) and OPQ(np), the influence of DRQE on the search accuracy of each algorithm is shown in Table 5.
[0116] Table 5
[0117]
[0118] On the MNIST data set, the search accuracy of PQ, OPQ(p), OPQ(np)@200 and OSDPQ is improved by (5.96%, 4.28%), (0.78%, 1.25%), (1.67%, 0.46%) and (1.64%, 1.11%) on top-1 and top-10 queries respectively.
[0119] On the SIFT1M data set, the search accuracy of PQ, OPQ(p), OPQ(np)@200 and OSDPQ is improved by (3.95%, 2.92%), (1.30%, 1.04%), (2.00%, 2.15%) and (0.45%, 2.04%) on top-1 and top-10 queries respectively.
[0120] On the GIST1M data set, the search accuracy of PQ, OPQ(p), OPQ(np)@200 and OSDPQ is improved by (3.10%, 2.35%), (2.30%, 1.30%), (2.05%, 2.98%) and (1.85%, 1.95%) on top-1 and top-10 queries respectively.
[0121] In summary, the method for setting the number of nearest clusters of each subspace based on quantization error described in embodiment two of the present application is widely applicable to various product quantization based nearest neighbor search methods, and can effectively improve search accuracy.
[0122] Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present application.
Claims
1. A product-quantized nearest neighbor retrieval method based on optimal space decomposition, characterized in that, Includes the following steps: Obtain the sample dataset; The specific steps to find the optimal solution for the spatial decomposition of the sample dataset are as follows: The objective function is constructed with the goal of minimizing the sum of the square roots of the products of the variances of the data dimensions in each subspace after decomposition. The objective function is expressed by the formula: ; In the formula, , indicating the first Data X' in subspace s The square root of the product of the variances of the dimensions; M represents the total number of subspaces; Solving the objective function to obtain the optimal solution of the space decomposition involves the following steps: A1. In each iteration, select the first sample from the dataset. t Dimension and ( D +1- t ) Dimensions are assigned to the subspace with the smallest SRVP value and the SRVP value of that subspace is updated until the number of dimensions in that subspace equals D / M; A2. Repeat step A1 until all dimensions have been assigned to the subspace; Among them, M subspaces define M empty set lists, and each list corresponds one-to-one with a subspace; The sample dataset is decomposed into M subspaces according to the optimal solution of the spatial decomposition, and cluster analysis is performed in each subspace to obtain several clusters; an inverted sort table is constructed using the cluster centroids as indexes. Retrieve the data to be searched; The search data is decomposed into M subspaces according to the optimal solution of the spatial decomposition, and several nearest clusters are retrieved in each subspace; the Cartesian product of the several nearest clusters is calculated to obtain several candidate coding sets; Based on the candidate code set, the retrieval result set is obtained by querying the inverted sort table.
2. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 1, characterized in that, Also includes: The PCA algorithm is used to reduce the dimensionality of the sample data.
3. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 1, characterized in that, Also includes: Based on the quantization error, set the number of closest clusters for each subspace.
4. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 1, characterized in that, The smaller the quantization error of the subspace, the more nearest clusters the subspace has.
5. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 3, characterized in that, The specific steps for setting the number of closest clusters in each subspace are as follows: Preset a value closest to the total number of clusters Z; The subspaces are sorted according to the proportion of quantization error. Calculate the number of closest clusters in a subspace based on the number of subspaces with undetermined closest cluster counts and the total number of closest clusters Z; update the Z value based on the calculated closest cluster count. Based on the sorting results, calculate the number of closest clusters in the next subspace sequentially and update the Z value until the number of closest clusters in all subspaces is obtained.
6. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 5, characterized in that, Also includes: Calculate the proportion of quantization error in a certain subspace; Calculate the weight value of the subspace based on the quantization error ratio; The number of nearest clusters in the subspace is adjusted based on the weight value.
7. The product-quantized nearest neighbor retrieval method based on optimal space decomposition according to claim 6, characterized in that, The number of closest clusters in a subspace can be calculated using the following formula: = ) In the formula, This represents the number of the nearest clusters in the s-th subspace; This represents the floor function; ) represents the floor function; This represents the proportion of quantization error in the s-th subspace; Closest to the total number of clusters; Mi represents the number of subspaces whose closest cluster number is not yet determined; M represents the total number of subspaces.
Citation Information
Patent Citations
Network flow index retrieving and compressing method based on inverted list
CN104009984A
Mixed vector quantization-based nearest neighbor search method
CN107193938A