Method and apparatus for searching for object, device, and storage medium

By combining quantitative representation index and inverted index tables, the quantitative representation of candidates is quickly selected and filtered, and the vector retrieval performance problem under large-scale data and complex filtering conditions is solved, and efficient and low-latency search results are achieved.

WO2025036339A1PCT designated stage expired Publication Date: 2025-02-20HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/111572
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-15
Filing Date
2024-08-12
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

In vector retrieval under large-scale data and complex filtering conditions, it is difficult for the prior art to achieve high-performance and low-latency search results.

Method used

By obtaining the quantitative representation and attribute value of the reference object, the quantitative representation index is used to select candidate quantized representations related to it, and filter the candidate quantized representation based on the attribute value and the inverted index table, and finally return the target object similar to the reference object.

Benefits of technology

This method realizes high-performance and low-latency retrieval under large data volume and complex filtering conditions, reducing the number of scanned data volume and partitions, and improving the retrieval efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024111572_20022025_PF_FP_ABST
    Figure CN2024111572_20022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data search, and provides a method and apparatus for searching for an object, a device, and a storage medium. The method comprises: obtaining a reference quantized representation for a reference object in a search input and a set of attribute values for the reference object. The method further comprises: on the basis of the reference quantized representation and quantized representation indexes generated from a plurality of quantized representations of a plurality of objects, selecting, from the plurality of quantized representations, a set of candidate quantized representations associated with the reference quantized representation. The method further comprises: on the basis of the set of attribute values and a set of inverted index tables of a set of partitions associated with the set of candidate quantized representations among a plurality of partitions formed by the plurality of quantized representations, filtering the set of candidate quantized representations. The method further comprises: on the basis of the filtered set of candidate quantized representations, returning a plurality of target objects similar to the reference object. According to the embodiments of the present application, high-performance and low-delay search is ensured under a large volume of data and complex filtering conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and storage medium for searching objects

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese invention patent application with application number 202311033821.0, entitled “Method, apparatus, device and storage medium for searching objects” and filing date August 15, 2023, and the entire application is incorporated herein by reference. Technical Field

[0003] The embodiments of the present application mainly relate to the field of data search. More specifically, the embodiments of the present application relate to a method, apparatus, device and storage medium for searching an object. Background Art

[0004] The widespread application of artificial intelligence (AI) technologies, including natural language processing and image processing, has driven changes and developments in the traditional search field. Traditional search algorithms primarily rely on deterministic search algorithms, such as keyword-based ones. AI, however, enhances the processing capabilities of unstructured data, supporting the conversion of unstructured data into multidimensional vectors. This shifts search from keyword-based to vectorized search, and from deterministic to similarity-based.

[0005] In the field of vector search, the degree of similarity between corresponding data is generally represented by the distance between vectors. Furthermore, in most business scenarios, in addition to satisfying similarity search criteria, search results must also meet attribute feature filtering conditions. This type of problem can be described as vector search with attribute filtering conditions. However, this type of vector search with attribute filtering conditions still presents many challenges that need to be addressed.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a solution for searching objects.

[0008] According to a first aspect of the present application, a method for searching for an object is provided. The method for searching for an object includes obtaining a reference quantization representation for a reference object in a search input and a set of attribute values ​​for the reference object; selecting a set of candidate quantization representations related to the reference quantization representation from the multiple quantization representations based on the reference quantization representation and a quantization representation index generated from multiple quantization representations of multiple objects; filtering the set of candidate quantization representations based on the set of attribute values ​​and a set of inverted index tables of a set of partitions formed by the multiple quantization representations and associated with the set of candidate quantization representations, wherein the inverted index tables in the set of inverted index tables are generated by attribute values ​​of objects corresponding to the quantization representations in the corresponding partitions; and returning multiple target objects similar to the reference object based on the filtered set of candidate quantization representations.

[0009] This approach utilizes the quantization representation index, so that during the retrieval process, only local regions associated with multiple quantization representations are scanned to obtain a set of candidate quantization representations. Furthermore, when filtering quantization representations, only the inverted index table of the partition associated with that local region is required to calculate the reference results for filtering the quantization representations. As data volumes grow exponentially, this operation results in only a small increase in the amount of data scanned during retrieval, and in the number of partitions scanned, ensuring high-performance, low-latency retrieval even with large amounts of data and complex filtering conditions.

[0010] In some embodiments, selecting a set of candidate quantization representations related to a reference quantization representation from a plurality of quantization representations includes: selecting a set of similar partitions adjacent to the reference quantization representation from a similar region formed by performing a similarity aggregation operation on the plurality of quantization representations based on similarity between the reference quantization representation and the quantization representation in the quantization representation index; and determining the quantization representations in the set of similar partitions as a set of candidate quantization representations. In this manner, a portion of the quantization representations that need to be processed can be quickly and accurately determined from the plurality of quantization representations without having to process all of the quantization representations.

[0011] In some embodiments, filtering a set of candidate quantization representations includes: determining a logical operation for filtering a set of candidate quantization representations based on a set of attribute values; determining whether a reference result for filtering the candidate quantization representations has been calculated for a target partition in a set of partitions that corresponds to a candidate quantization representation in a set of candidate quantization representations; if it is determined that a reference result has not been calculated for the target partition, determining a reference result based on the logical operation and an inverted index table for the target partition; and filtering the candidate quantization representations based on the reference result. In this way, local area data scanned for retrieval can be filtered quickly and accurately, ensuring high-performance filtering retrieval under large data volumes; as the complexity of the filtering conditions increases, the computational delay of the inverted filtering increases less, and low-latency retrieval under complex filtering conditions can be provided.

[0012] In some embodiments, filtering a set of candidate quantized representations further comprises: if it is determined that a reference result has been calculated for the target partition, filtering the candidate quantized representations based on the reference result. In this way, the reference result for filtering can be quickly obtained.

[0013] In some embodiments, the method further includes: if it is determined that the candidate quantized representation fails the filtering, removing the candidate quantized representation from the set of candidate quantized representations. In this way, irrelevant quantized representations can be quickly removed to ensure accuracy.

[0014] In some embodiments, returning multiple target objects similar to a reference object includes: determining a set of similarities between the reference quantized representation and a filtered set of candidate quantized representations; and selecting multiple target quantized representations from the filtered set of candidate quantized representations based on the set of similarities. In this manner, multiple target quantized representations to be retrieved can be quickly and accurately selected.

[0015] In some embodiments, selecting multiple target quantization representations from the filtered set of candidate quantization representations includes: sorting the filtered set of candidate quantization representations based on a set of similarities; and selecting multiple target quantization representations from the sorted set of candidate quantization representations. In this way, multiple target quantization representations to be retrieved can be selected quickly and accurately.

[0016] In some embodiments, the method further includes: performing a similarity aggregation operation on the multiple quantized representations based on similarities between the multiple quantized representations; and generating a quantized representation index based on the multiple quantized representations that have undergone similarity aggregation. In this way, the quantized representation index can be generated quickly and the efficiency of quantized representation retrieval can be improved.

[0017] In some embodiments, the method further includes: performing a clustering operation on the plurality of quantized representations based on similarities between the plurality of quantized representations to determine a plurality of partitions; and determining, based on a set of quantized representations in each of the plurality of partitions, an inverted index table of attribute values ​​of a set of objects corresponding to the set of quantized representations. In this manner, an inverted index table for a partition can be generated quickly and accurately, and the computational complexity in the search and filtering process can be reduced.

[0018] In some embodiments, each of the plurality of partitions includes: an identifier of the object, a quantitative representation of the object, and an offset position of the quantitative representation of the object in the partition. In this way, information in the partition can be quickly determined.

[0019] In some embodiments, the method further includes generating, for each of the plurality of objects, a mapping relationship between the object's identifier and the partition in which the quantized representation of the object resides, as well as an offset position within the partition. In this manner, the partition in which the quantized representation of the object resides and its position within the partition can be quickly determined based on the object's identifier.

[0020] In some embodiments, determining an inverted index table for a set of object attribute values ​​corresponding to a set of quantized representations includes: obtaining a set of quantized representations in a partition; obtaining attribute values ​​for the set of objects based on identifiers of the set of objects corresponding to the set of quantized representations; and establishing an inverted index table based on the attribute values ​​of the set of objects. This approach allows for rapid generation of an inverted index table for the partition and reduces computational complexity during retrieval and filtering.

[0021] According to a second aspect of the present application, a device for searching for an object is provided. The device for searching for an object includes a reference quantization representation and attribute value acquisition unit configured to acquire a reference quantization representation for a reference object in a search input and a set of attribute values ​​for the reference object; a candidate quantization representation selection unit configured to select a set of candidate quantization representations related to the reference quantization representation from multiple quantization representations based on the reference quantization representation and a quantization representation index generated from multiple quantization representations of multiple objects; a quantization representation filtering unit configured to filter a set of candidate quantization representations based on a set of attribute values ​​and a set of inverted index tables associated with a set of candidate quantization representations in a set of partitions formed by the multiple quantization representations, wherein the inverted index tables in the set of inverted index tables are generated by attribute values ​​of objects corresponding to the quantization representations in the corresponding partitions; and a target object returning unit configured to return multiple target objects similar to the reference object based on the filtered set of candidate quantization representations.

[0022] In some embodiments, the candidate quantization representation selection unit includes: an aggregation selection unit, configured to select a group of similar partitions adjacent to the reference quantization representation from similar areas formed by similar aggregation operations on multiple quantization representations based on the similarity between the reference quantization representation and the quantization representation in the quantization representation index; and a candidate quantization representation determination unit, configured to determine the quantization representations in a group of similar partitions as a group of candidate quantization representations.

[0023] In some embodiments, the quantization representation filtering unit includes: a logical operation determination unit, configured to determine a logical operation for filtering a set of candidate quantization representations based on a set of attribute values; a partition filtering determination unit, configured to determine whether a reference result for filtering the candidate quantization representation has been calculated for a target partition in a set of partitions corresponding to a candidate quantization representation in a set of candidate quantization representations; a reference result determination unit, configured to determine a reference result based on the logical operation and an inverted index table for the target partition if it is determined that the reference result has not been calculated for the target partition; and a first filtering unit, configured to filter the candidate quantization representation based on the reference result.

[0024] In some embodiments, the quantized representation filtering unit further includes: a second filtering unit configured to filter the candidate quantized representations based on the reference result if it is determined that the reference result has been calculated for the target partition.

[0025] In some embodiments, the apparatus further comprises: a removing unit configured to remove the candidate quantized representation from the set of candidate quantized representations if it is determined that the candidate quantized representation fails the filtering.

[0026] In some embodiments, the target object return unit includes: a similarity determination unit configured to determine a set of similarities between a reference quantization representation and a filtered set of candidate quantization representations; and a plurality of target quantization representation selection units configured to select a plurality of target quantization representations from the filtered set of candidate quantization representations based on a set of similarities.

[0027] In some embodiments, the multiple target quantization representation selection unit includes: a sorting unit configured to sort the filtered set of candidate quantization representations based on the set of similarities; and a quantization representation selection unit configured to select multiple target quantization representations from the sorted set of candidate quantization representations.

[0028] In some embodiments, the apparatus further comprises: a similarity aggregation operation unit configured to perform a similarity aggregation operation on the plurality of quantized representations based on the similarity between the plurality of quantized representations; a quantized representation index generation unit configured to generate a quantized representation index based on the plurality of quantized representations that have been similarly aggregated.

[0029] In some embodiments, the device also includes: multiple partition determination units, configured to perform clustering operations on multiple quantized representations based on the similarity between the multiple quantized representations to determine multiple partitions; and an inverted index table determination unit, configured to determine an inverted index table of attribute values ​​of a set of objects corresponding to a set of quantized representations based on a set of quantized representations in each partition of the multiple partitions.

[0030] In some embodiments, each partition of the plurality of partitions includes: an identification of the object, a quantized representation of the object, and an offset position of the quantized representation of the object in the partition.

[0031] In some embodiments, the apparatus further includes: a mapping relationship generating unit configured to generate, for each object among the plurality of objects, a mapping relationship between the identifier of the object and the partition where the quantized representation of the object is located and an offset position in the partition.

[0032] In some embodiments, the inverted index table determination unit includes: a quantization representation acquisition unit, configured to acquire a set of quantization representations in a partition; an object attribute value acquisition unit, configured to acquire attribute values ​​of a set of objects based on identifiers of a set of objects corresponding to a set of quantization representations; and an inverted index table establishment unit, configured to establish an inverted index table based on the attribute values ​​of the set of objects.

[0033] According to the third aspect of the present application, an electronic device is also provided, comprising: at least one computing unit; and at least one memory, wherein the at least one memory is coupled to the at least one computing unit and stores instructions for execution by the at least one computing unit, wherein the instructions, when executed by the at least one computing unit, enable the device to execute the method described in the first aspect of the present application.

[0034] According to a fourth aspect of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect of the present application is implemented.

[0035] According to a fifth aspect of the present application, a computer program product is further provided, comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to the first aspect of the present application.

[0036] It is understandable that the apparatus of the second aspect, the electronic device of the third aspect, the computer storage medium of the fourth aspect, or the computer program product of the fifth aspect provided above is used to execute the method provided in the first aspect. Therefore, the explanation or description of the first aspect also applies to the second, third, fourth, and fifth aspects. In addition, the beneficial effects that can be achieved in the second, third, fourth, and fifth aspects can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0038] FIG1 is a schematic diagram illustrating an example environment in which various embodiments of the present application can be implemented;

[0039] FIG2 is a schematic diagram illustrating an example process in which various embodiments of the present application can be implemented;

[0040] FIG3 shows a schematic diagram of an example implementation architecture according to some embodiments of the present application;

[0041] FIG4 is a schematic diagram showing a schematic process of constructing a joint index according to some embodiments of the present application;

[0042] FIG5 is a schematic diagram showing an example of online joint search according to some embodiments of the present application;

[0043] FIG6 shows a schematic flowchart for retrieving an object according to some embodiments of the present application;

[0044] FIG7 shows a schematic flowchart of constructing a vector index according to some embodiments of the present application;

[0045] FIG8 shows a schematic flowchart of constructing an inverted index according to some embodiments of the present application;

[0046] FIG9 shows a schematic flow chart of parsing filtering conditions according to some embodiments of the present application;

[0047] FIG10 shows a schematic flow chart of retrieving similarity vectors according to some embodiments of the present application;

[0048] FIG11 shows a block diagram of an apparatus according to some embodiments of the present application; and

[0049] FIG12 illustrates a block diagram of a computing device capable of implementing various embodiments of the present application. DETAILED DESCRIPTION

[0050] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0051] In the description of the embodiments of this application, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The terms "first," "second," etc. can refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0052] As mentioned above, in most business scenarios, in addition to satisfying similarity search criteria, search results must also meet attribute feature filtering conditions. However, to implement vector searches for specific objects with attribute feature filtering conditions, a traditional approach is to perform inverted filtering before searching. Specifically, this method first determines whether the request contains a filtering condition. If so, the inverted index of all vectors is used to perform a filtering operation to obtain vectors that meet the filtering condition. Then, when scanning vectors, if the filtering condition exists, the previously calculated filtering results are used to determine whether the vector meets the filtering condition. Similarity is then calculated for vectors that meet the filtering condition. If the filtering condition does not exist, similarity is calculated directly. This method effectively implements attribute value filtering, but as the total number of vectors increases, the inverted index of attribute values ​​also grows. Because the inverted index-based filtering operation must be performed on all vectors, the filtering calculation time increases with the number of vectors, which in turn increases the overall search latency. Therefore, in the case of large-scale data, filtering operations on the entire data set can result in excessive latency and fail to meet business performance requirements.

[0053] Another traditional solution is to encode the labels and filter them during retrieval. Specifically, this solution determines whether the request contains a filter condition, and if so, encodes the scalar value in the filter condition. When scanning a vector, if a filter condition exists, the filter calculation is completed using the previously calculated encoded value and the encoded value in the scalar index, and then the similarity is calculated for the vectors that meet the filter condition; if the filter condition does not exist, the similarity is calculated directly. Since scalar attribute values ​​need to be encoded, the number of attribute values ​​must be limited and enumerable, which limits the scope of use of the filtering function. In addition, as the complexity of the filter condition increases, the amount of calculation for each vector to determine whether the filter condition is met continues to increase, resulting in a significant increase in retrieval latency. This solution can ensure that the retrieval latency will not increase as the amount of data grows; however, as the complexity of the filter condition increases, the retrieval latency will increase significantly.

[0054] To address at least some of the above-mentioned problems and other potential problems, in an embodiment of the present application, a computing device first obtains a reference quantized representation and a set of attribute values ​​for the reference object in the search input. The computing device then uses the reference quantized representation and a quantized representation index generated from multiple quantized representations of multiple objects to determine a set of candidate quantized representations related to the reference quantized representation. The computing device then filters the set of candidate quantized representations based on the set of attribute values ​​and in combination with a set of inverted index tables of a set of partitions associated with a set of candidate quantized representations in multiple partitions formed by the multiple quantized representations. Finally, the computing device can return multiple target objects similar to the reference object based on multiple target quantized representations selected from the filtered set of candidate quantized representations. In this way, the quantized representation index is used so that during the search process, only local areas related to the multiple quantized representations are scanned to obtain a set of candidate quantized representations. At the same time, when filtering the quantized representations, only the inverted index table of the partition related to the local area needs to be used to calculate the reference result for filtering the quantized representations. As the amount of data grows massively, the above operations ensure that the amount of data scanned will only increase slightly, and the number of partitions scanned will also increase slightly, ensuring high-performance and low-latency retrieval under large data volumes and complex filtering conditions.

[0055] Embodiments of the present application are further described below with reference to the accompanying drawings. FIG1 illustrates a schematic diagram of an example environment 100 in which various embodiments of the present application can be implemented. As shown in FIG1 , example environment 100 includes a computing device 104. Computing device 104 includes, but is not limited to, an in-vehicle computing device, a personal computer, a server, a handheld or laptop device, a mobile device, a multi-processor system, a consumer electronics product, a minicomputer, a mainframe computer, a distributed computing environment including any of the aforementioned systems or devices, and the like.

[0056] The computing device 104 can be used to provide search services for users. After the user enters a reference object 102, multiple target objects 118 similar to the reference object 102 can be provided to the user for viewing or use. The reference object 102 entered by the user can be any suitable data information. In some embodiments, the reference object 102 can be a picture. For example, the user enters a picture to find pictures with content similar to the picture, such as using pictures of dogs to find pictures with content similar to the dog in the picture. In some embodiments, the reference object 102 can be text information. The user enters text to find information similar to or related to the entered text. For example, if the user enters to search for an application, the reference object can be the name of the application; if the user wants to find some information, the reference object can be some keywords entered by the user. In some embodiments, the reference object can be an audio clip that the user wants to retrieve, etc. The above examples are only used to describe the present disclosure and are not specific limitations of the present disclosure. The reference object can be any suitable input information that the user wants to retrieve.

[0057] As shown in FIG1 , computing device 104 processes a reference object input by a user to generate a reference quantized representation 106 corresponding to the reference object, such as a vector corresponding to the reference object. FIG1 illustrates that computing device 104 receives reference object 102 and then generates reference quantized representation 106 corresponding to reference object 102. This is merely an example and not a limitation of the present disclosure. In another example, reference quantized representation 106 of reference object 102 is obtained by another computing device, and computing device 104 then receives reference quantized representation 106 of reference object 102 from the other device.

[0058] In Figure 1, in addition to obtaining the reference quantitative representation 106 of the reference object 102, the computing device 104 will also receive a set of attribute values ​​108 of the reference object 102 if some attribute information needs to be used to filter the reference object during the retrieval process. This set of attribute values ​​can serve as a label for the reference object. In some embodiments, the set of attribute values ​​108 is obtained from the reference object input by the user. For example, when the reference object input by the user is a picture of a dog, in addition to generating a quantitative representation of the picture, an image content label can also be added and set to dog. In another example, the set of attribute values ​​is some directional information collected by the computing device when the user inputs the reference object as the attribute information of the reference object, such as the region of the object to be found, the age of the object, and other information. The above examples are only used to describe the present disclosure and are not specific limitations of the present disclosure.

[0059] The computing device 104 may also obtain a pre-generated quantitative representation index 110 for multiple quantitative representations of multiple objects in the target library to be searched. The quantitative representation index 110 is constructed by using a vector aggregation algorithm on the multiple quantitative representations of the multiple objects in the target library. For example, an inverted file (IVF) clustering algorithm or a graph aggregation algorithm is used to perform similarity aggregation operations on the multiple quantitative representations to generate a quantitative representation index for searching the multiple quantitative representations. In one example, the quantitative representation index is a vector index. The computing device then uses the obtained reference quantitative representation 106 to search the quantitative representation index 110 for a group of similar partitions similar to the reference quantitative representation 106 in the similar regions for the multiple quantitative representations generated by the similarity aggregation algorithm. The quantitative representations in the group of similar partitions are then used as a group of candidate quantitative representations 112. In one example, the vector aggregation algorithm is an IVF clustering algorithm, and the group of similar partitions is selected from the multiple partitions generated by processing the multiple quantitative representations using the IVF clustering algorithm. In another example, the vector aggregation algorithm is a graph aggregation algorithm, and the group of similar partitions is some regions in a graph formed by processing the multiple quantitative representations using the graph aggregation algorithm. The above examples are only used to describe the present disclosure, rather than to specifically limit the present disclosure.

[0060] In addition, the computing device 104 can also obtain information about multiple partitions related to multiple quantitative representations of multiple objects in the target library and an inverted index table of attribute values ​​corresponding to each partition in the multiple partitions. The multiple partitions are obtained by using a vector partition aggregation algorithm on the multiple quantitative representations of the multiple objects, such as the IVF clustering algorithm. This operation can be performed in the computing device 104 or on other computing devices, and then the computing device 104 obtains multiple partitions obtained by the partition aggregation algorithm. For each partition, it can include the identifier of each object located in the partition, the quantitative representation of the object, and the offset position of the quantitative representation in the partition. The identifier of the object in the partition can be used to obtain the attribute value of the corresponding object, and then these attribute values ​​are used to generate an inverted index table for each partition. For example, the inverted index table includes the attribute value and the offset position of the quantitative representation of the object with the attribute value in the partition. The above example is only used to describe the present disclosure and is not a specific limitation of the present disclosure. The inverted index table can also include any appropriate information.

[0061] Next, the computing device 104 needs to filter a set of candidate quantization representations 112 to determine whether each candidate quantization representation in the set of candidate quantization representations meets the requirements of the set of attribute values ​​of the input reference object. If the candidate quantization representation meets the requirements of the set of attribute values ​​of the input reference object, it indicates that the candidate quantization representation has passed the filtering. If the candidate quantization representation does not meet the requirements of the set of attribute values ​​of the input reference object, it indicates that the candidate quantization representation has failed the filtering and the quantization representation is removed from the set of candidate quantization representations. Specifically, when filtering the set of candidate quantization representations, it is necessary to use a set of attribute values ​​108 and a set of inverted index tables 114 of a set of partitions corresponding to the set of candidate quantization representations to filter the set of candidate quantization representations 112. After filtering the set of candidate quantization representations 112, a filtered set of candidate quantization representations 116 is generated. Then, multiple target quantization representations are selected from the filtered set of candidate quantization representations 116. For example, multiple target quantization representations with high similarity are selected based on the similarity between the quantization representation of the reference object and the quantization representations in the filtered set of candidate quantization representations. Then, a corresponding plurality of target objects 118 may be obtained based on the plurality of target quantified representations and returned to the user or other computing device.

[0062] This approach utilizes the quantization representation index, so that during the retrieval process, only local regions associated with multiple quantization representations are scanned to obtain a set of candidate quantization representations. Furthermore, when filtering quantization representations, only the inverted index table of the partition associated with that local region is required to calculate the reference results for filtering the quantization representations. As data volumes grow exponentially, this operation results in only a small increase in the amount of data scanned during retrieval, and in the number of partitions scanned, ensuring high-performance, low-latency retrieval even with large amounts of data and complex filtering conditions.

[0063] The schematic diagram of an example environment 100 in which embodiments of the present application can be implemented is described above in conjunction with FIG1 . The schematic diagram of an example process 200 in which various embodiments of the present application can be implemented is described below in conjunction with FIG2 . In this example process, the quantization of an object is represented as a vector of the object. As shown in FIG2 , before performing a vector search, vector objects in a database or repository need to be processed to construct a joint index. Then, during the vector search, the constructed joint index is used to locate the appropriate vector. Specifically, a vector object 202 is first determined for constructing the joint index. In some embodiments, vector object 102 includes an object identifier, an object vector, and an object's attribute value. Furthermore, the object vector is obtained by processing information about the vector object itself. For example, feature extraction, feature encoding, and related processing are performed on some objects to obtain the object vector. Next, at block 204 , a joint index is constructed for use in the search. The process of constructing the joint index can be seen in the description of FIG4 . After the joint index is constructed, before the actual search is performed, at block 206 , the joint index is loaded into the vector engine. At this point, the computing device can store the joint index locally for fast retrieval. The above operation process is mainly performed before the search is performed. The operation described below is an online search process. At box 210, the computing device performs a search with filtering conditions. For example, the search can obtain the vector of the object input by the user, and at the same time, the attribute value of the object input by the user. The attribute value can be used as the label of the object. For example, when an image with a dog is input, the dog identified from the image can be used as the attribute value or label of the image after processing. Then, the search is performed using the vector engine 208. The vector engine has loaded the joint index. The vector engine 208 uses the joint index, the vector of the input object, and the attribute value as the filtering condition to search. Then, at box 212, the recall results that meet the filtering conditions are determined. In this way, using the joint index, the recall results that meet the filtering conditions can be quickly obtained, and when the amount of data increases, high-performance filtering retrieval can be performed, and low-latency retrieval under complex filtering conditions can be provided.

[0064] The above, in conjunction with Figure 2, describes a schematic diagram of a specific example environment in which multiple embodiments of the present application can be implemented. Below, in conjunction with Figure 3, describes a schematic diagram of an example implementation architecture 300 according to some embodiments of the present application. As shown in Figure 3, the technical solution of the present application can be implemented in a server 302. Server 302 includes a software layer 304, which includes software and applications that the server can handle. An engine module 306, located within software layer 304, is a vector engine online search service component. Engine module 306 primarily processes online search requests and includes an interface 308. Interface 308 is used to accept online search requests. Engine module 306 also includes a vector search module 310, which is used to load a joint index. Engine module 306 also includes a data layer 314, which is used to store a joint index 318. Vector search module 310 performs filtered searches through a joint filter search module 312. Index builder 316 primarily handles the construction of joint index 318, which includes an attribute value inverted index and a vector index. Alternatively, the index builder 316 provides offline index building services for the vector engine.

[0065] The above, in conjunction with FIG3 , describes a schematic diagram of an example implementation architecture according to some embodiments of the present application. The following, in conjunction with FIG4 , describes a schematic diagram of a schematic process 400 for constructing a joint index according to some embodiments of the present application. As shown in FIG4 , each piece of object information in object information 402 includes an object identifier (ID), a vector value of the object, and an attribute value of the object (color: red, country: us). The attribute value of an object can also be referred to as the object's scalar value. Object information 402 can then be used to construct a joint index, which consists of a vector index and an inverted index table of attribute values ​​based on vector clustering information. A vector index 404 can be constructed using the vector values ​​of the objects in object information 402. As shown in FIG4 , vector index 404 is constructed using a common vector algorithm (IVF clustering algorithm or graph clustering algorithm). By using this vector algorithm, similar vectors are clustered together, making it easier to quickly find similar partitions similar to the target vector during retrieval and traverse within these similar partitions. As shown in FIG4 , vector index 404 is obtained using the IVF clustering algorithm, and therefore includes multiple partitions, each with similar vectors. When searching for similar vectors through the vector index, the vector of the input reference object can be compared with the vector of the center point in each partition, and then several partitions with similar distances can be found, and then each vector in these partitions can be traversed. The partitions formed by the IVF algorithm shown in Figure 4 are only an example, not a specific limitation of the present disclosure. In other embodiments, the vectors of the object can be aggregated by other vector algorithms to generate a vector index. In this case, the vectors are not divided into partitions, and the similarity between the vectors is represented by the association relationship. At this time, when searching for a target vector related to the reference vector of the reference object, similar areas similar to the reference vector can be found from the vector association relationship area for all objects as similar partitions. Then the vectors in the similar partitions are traversed.

[0066] As shown in FIG4 , multiple attribute value inverted index tables 416 may be further generated. For the vectors in the object information, similarity aggregation is performed on the vectors using a vector aggregation partitioning algorithm (IVF class) to generate multiple partitions 406, where the multiple partitions 406 include partition 0 408, ... partition n 410. Based on the multiple partitions 406, an object identifier (ID) mapping relationship 414 may be further generated, which includes the object identifier and the partition where the vector of the object is located and the offset position in the partition. For example, the mapping relationship includes object identifier ID-[partition number, offset position in the partition]. Then, the attribute values ​​of the objects in each partition may be used to construct multiple attribute value inverted index tables 416 for the multiple partitions.

[0067] In Figure 4, for partition 0, it has an attribute value inverted index table 418. In the attribute value inverted index table 418, for the attribute value RED[], it indicates that there is no vector with the attribute value RED in the partition, and for the attribute value BLUE[1,3,9...], it indicates that the objects corresponding to the vectors at offset positions 1, 3, 9, etc. in the partition have the attribute value BLUE. For partition N, it has an inverted table 420. The inverted table can also be locally densified. For each attribute value, it includes the same number of bits as the number of vectors in the partition. If the object of the vector at an offset position in the partition has the attribute value, the corresponding bit position is set to 1, otherwise it is set to 0. After the densification process, the corresponding inverted tables 422 and 424 can be obtained. The generated vector index 404 and the multiple attribute value inverted index tables 416 together form a joint index 412 for retrieval.

[0068] The schematic diagram of the process for constructing a joint index according to some embodiments of the present application is described above in conjunction with FIG4 . The schematic diagram of an example of online joint search according to some embodiments of the present application is described below in conjunction with FIG5 . In FIG5 , a filtered query 502 includes a query vector and attribute value filtering conditions for a reference object. For example, the query vector is 101101, and its attribute value filtering conditions are "COLOR:RED" and "COUNTRY:US." The relationship between the two attribute values ​​is an AND relationship, indicating that the searched object must have both "COLOR:RED" and "COUNTRY:US." Then, in block 504 , the attribute value filtering conditions in the query are parsed to obtain the corresponding logical operation F(scalar1, scalar2...), where scalar1 and scalar2 represent the corresponding attribute values, and this logical operation F performs an AND operation on "COLOR:RED" and "COUNTRY:US." Next, during the vector search process, vectors similar to the reference vector are first searched from the vector index 506. Then, for each vector found in the vector index, a determination is made as to whether the logical operation has been completed for the partition corresponding to that vector. If the partition has not completed the logical operation, F(scalar1, scalar2...) and the inverted index table of the partition are used to calculate the reference result that meets the filtering conditions in the partition. For example, the inverted information with the attribute values ​​scalar1 and scalar2 is found from the attribute value inverted index table of the partition, and then the obtained inverted information is subjected to logical operations, such as AND operations, OR operations, or various combination operations, to obtain the reference result for filtering. The reference result includes which vectors at which offset positions in the partition meet the attribute value filtering conditions. Then, the reference result can be used to determine whether the vector meets the filtering conditions. As shown in Figure 4, three partitions 1, 2, and M are determined in multiple partitions 508 by vector indexing, and filtering logical operations are applied to the three partitions. Then, as shown in box 510, the light-colored points in the three partitions are filtered out, and the dark-colored points are retained as filtered points. Then, for the vectors that meet the filtering conditions, the distance to the reference vector is calculated, and the most similar k vector values ​​512 are returned.

[0069] The above description is made in conjunction with FIG5 , which illustrates a schematic diagram of an example of online joint search according to some embodiments of the present application. The following description is made in conjunction with FIG6 , which illustrates a schematic flowchart 600 for searching an object according to some embodiments of the present application. The method shown in FIG6 may be executed by the computing device 104 in FIG1 or any other suitable computing device.

[0070] As shown in Figure 6, at box 602, a reference quantitative representation of the reference object in the search input and a set of attribute values ​​for the reference object are obtained. As shown in Figure 1, the user's search input includes information about the reference object 102, and then a reference quantitative representation 106 of the reference object 102 can be obtained at the computing device 104 or the reference quantitative representation 106 of the reference object can be obtained from other computing devices. In one example, features can be extracted from the object, and then the extracted features are encoded and converted into vector features. In another example, the object is directly mapped to a vector. For example, if the object is text, a vector of the text is generated based on the vector corresponding to each character in the text. The above examples are only used to describe the present disclosure, and are not specific limitations of the present disclosure. Those skilled in the art can adopt any suitable method to obtain the reference quantitative representation of the reference object.

[0071] For searches that require filtering using attribute values, a set of attribute values ​​for the reference objects used for filtering must also be obtained. This set of attribute values ​​is information associated with the reference object being searched and can serve as a label for the reference object. For example, this set of attribute information can be obtained from the reference object; it can also be determined by information collected by the computing device, such as the geographical scope of the search, the age of the user who entered the search object, and so on. If the search object does not require filtering, obtaining a set of attribute values ​​for the reference object is not necessary.

[0072] At block 604, a set of candidate quantized representations associated with the reference quantized representation is selected from the plurality of quantized representations based on the reference quantized representation and the quantized representation indexes generated from the plurality of quantized representations of the plurality of objects. For example, the computing device 104 may obtain the set of candidate quantized representations 110 based on the quantized representation 106 using the quantized representation indexes generated from the plurality of quantized representations of the plurality of objects.

[0073] In some embodiments, the quantized representation index is generated by the computing device 104. Additionally, the generation process can be generated offline by the computing device 104. During the generation process, the computing device 104 first calculates the similarity between the quantized representations. In one example, the similarity is represented by the distance between the quantized representations. In another example, the similarity is represented by the cosine similarity between the quantized representations. The above examples are only used to describe the present disclosure and are not specific limitations of the present disclosure. Those skilled in the art can use any suitable method to calculate the similarity between vectors. Then, based on the similarity between the multiple quantized representations, a similarity aggregation operation is performed on the multiple quantized representations. Then, the computing device generates a quantized representation index based on the multiple quantized representations that have been similarly aggregated. In some embodiments, the computing device can use an inverted file clustering algorithm or a graph aggregation algorithm to perform a similarity aggregation operation on the multiple quantized representations to generate a quantized representation index for searching multiple quantized representations. In some embodiments, the quantized representation index is generated by other computing devices according to the above method and obtained by the computing device 104. The above examples are only used to describe the present disclosure and are not specific limitations of the present disclosure.

[0074] In some embodiments, after obtaining a quantization representation index, when selecting a set of candidate quantization representations related to a reference quantization representation from multiple quantization representations, the similarity between the reference quantization representation and the quantization representations in the quantization representation index can be first used to select a set of similar partitions adjacent to the reference quantization representation from similar regions formed by similarity aggregation operations corresponding to the multiple quantization representations. The quantization representations in the set of similar partitions are then determined as a set of candidate quantization representations. In some embodiments, when the quantization representation index is obtained using an inverted file clustering algorithm, the similarity between the reference quantization index and the central quantization representation of each partition in the inverted file clustering can be first calculated. A predetermined number of partitions with high similarity can then be selected from the multiple partitions generated using the inverted file clustering. The quantization representations in the predetermined number of partitions with high similarity are then used as a set of candidate quantization representations. In some embodiments, when the quantization representation index is implemented using a graph aggregation algorithm, the similarity between the reference quantization representation and the quantization representations in the similar regions implemented using the graph aggregation algorithm can be calculated to find the corresponding similar partitions. The quantization representations in the found similar partitions are then determined as a set of candidate quantization representations. The above examples are merely illustrative of the present disclosure and are not intended to limit the present disclosure. Those skilled in the art may determine a group of candidate quantization representations related to the reference quantization representation according to the quantization representation index in any appropriate manner.

[0075] At block 606, the set of candidate quantized representations is filtered based on the set of property values ​​and a set of inverted index tables associated with a set of partitions of the set of candidate quantized representations, one of the partitions formed by the plurality of quantized representations. The inverted index tables in the set of inverted index tables are generated using the property values ​​of the objects corresponding to the quantized representations in the corresponding partitions. For example, the computing device 104 utilizes the set of inverted index tables 114 obtained from the set of candidate quantized representations and then filters the set of candidate quantized representations 112 in combination with the set of property values ​​108 of the reference object 102 to generate a filtered set of candidate quantized representations 116.

[0076] In some embodiments, computing device 104 may generate multiple partitions based on multiple quantized representations of multiple objects in an object library. Specifically, computing device 104 may determine multiple partitions by clustering the multiple quantized representations based on similarities between the multiple quantized representations of the multiple objects. For example, multiple partitions may be generated by processing the multiple quantized representations of the multiple objects using an inverted file clustering algorithm. For example, each of the multiple partitions may include: an object identifier, a quantized representation of the object, and an offset position of the quantized representation of the object within the partition. The above example is merely illustrative of the present disclosure and does not specifically limit the present disclosure. Each partition may include any suitable information. Computing device 104 may then further determine an inverted index table of attribute values ​​of a set of objects corresponding to the set of quantized representations based on the set of quantized representations in each of the multiple partitions. Specifically, when determining an inverted index table of attribute values ​​of a set of objects corresponding to a set of vectors, computing device 104 may first obtain the set of quantized representations in the partition. For example, after determining the partitions for the multiple quantized representations using the above clustering algorithm, the quantized representations in each partition and the identifiers of the objects corresponding thereto may be known. In this case, the attribute values ​​of the set of objects may be obtained based on the identifiers of the set of objects corresponding to the set of quantized representations. Then, the attribute values ​​of the group of objects obtained are used to establish an inverted index table. The inverted index table is established based on the attribute values ​​of multiple objects, and the offset position of the vector including the attribute in the distinction can be found through it. In some embodiments, the process of clustering and partitioning multiple quantized representations of multiple objects and generating an inverted index table corresponding to each partition can be implemented on other computing devices, and the computing device 104 can receive it from other computing devices as needed. The above examples are only used to describe the present disclosure and are not specific limitations of the present disclosure.

[0077] In some embodiments, the computing device also generates a mapping relationship for each of the multiple objects. For each of the multiple objects, the computing device can generate a mapping relationship between the object's identifier and the partition where the object's quantitative representation is located and the offset position in the partition. In some embodiments, when filtering a set of candidate quantitative representations, the computing device 104 determines the logical operation used to filter the set of candidate quantitative representations based on a set of attribute values ​​for the reference object. In one example, if the searched object is required to have each essential value in the set of attribute values, it is necessary to construct a logical operation with a logical AND relationship of these attribute values. In another example, if the searched object is required to have only one essential value in the set of attribute values, it is necessary to construct a logical OR operation with these attribute values. In yet another example, a combination of logical AND and logical OR operations can be performed on the set of attribute values ​​as needed. The above examples are only used to describe the present disclosure and are not specific limitations of the disclosure. Those skilled in the art can set the logical operation generated by a set of attribute values ​​as needed.

[0078] In some embodiments, when filtering a set of candidate quantized representations, a reference result for a target partition corresponding to a candidate quantized representation in the set of candidate quantized representations is also required. Therefore, when filtering a set of candidate quantized representations, it is necessary to first determine the target partition corresponding to the candidate quantized representation in the set of candidate quantized representations. This process is implemented using the mapping relationship described above between the identifier of an object and the partition where the quantized representation of the object is located, as well as the offset position in the partition. For example, for a candidate quantized representation in the set of candidate quantized representations, it is necessary to first determine the identifier of the object corresponding to the candidate quantized representation. This identifier is then used to search the target partition where the candidate quantized representation is located and its offset position in the target partition using the mapping relationship described above. After determining the target partition where the candidate quantized representation is located, it is then determined whether a reference result for filtering the candidate quantized representation has been calculated for the target partition. If it is determined that the reference result has not been calculated for the target partition, the computing device 104 uses a logical operation and an inverted index table for the target partition to determine a reference result. The process of determining the reference result combines the logical operation with the inverted index table for the target partition, searching the inverted index table for the partition for an object that satisfies the logical operation consisting of a set of attribute values. For example, if a set of attribute values ​​includes red and a place name, and the logical operation formed is an AND operation of red and the place name, the offset position of the quantization representation of the object having both red and the place name in the partition can be found through the inverted index table, and then the offset position can be used to determine which quantization representations in the partition correspond to objects that meet the logical operation. Further, the offset position that meets the logical operation result is determined as the reference result. If it is determined that the reference result has been calculated for the target partition, the candidate quantization representations are filtered based on the reference result. For example, the candidate quantization representation is filtered by confirming whether the offset position of the candidate quantization representation in the partition is in the reference result. If it is determined that the candidate quantization representation does not pass the filtering, the candidate quantization representation is removed from a set of candidate quantization representations. At this time, it indicates that the object corresponding to the quantization representation does not meet the requirements of a set of attribute values. If it is determined that the candidate quantization representation passes the filtering, the candidate quantization representation is retained, and the other candidate quantization representations in a set of candidate quantization representations are filtered in this way.

[0079] In some embodiments, the aggregation method for generating the quantization representation index of multiple quantization representations of multiple objects is the same as the clustering method for partitioning multiple vectors when establishing an inverted index table, for example, both use the IVF clustering method. At this time, the multiple partitions where a set of candidate quantization representations are located by searching the quantization representation index and the partitions filtered by searching using a set of candidate quantization representations are the same partitions. Therefore, after finding multiple partitions corresponding to a set of candidate quantization representations corresponding to the quantization representation of the reference object, each quantization representation within these partitions can be directly traversed. For each quantization representation, determine whether the partition where the quantization representation is located has calculated the reference result. If the reference result is not calculated, the reference result is calculated using a logical operation formed by a set of attribute values ​​in combination with the inverted index table of the partition. If the reference result is calculated, determine whether the offset position of the quantization representation is in the reference result. If it is, it indicates that it has passed the filtering, and if not, it indicates that it has not passed the filtering.

[0080] In some embodiments, the aggregation method used to generate quantized representation indexes for multiple quantized representations of multiple objects differs from the clustering method used to partition multiple vectors when establishing an inverted index table. For example, the aggregation method used to generate the quantized representation indexes is a graph aggregation algorithm, while the clustering method used to partition multiple vectors when establishing an inverted index table is an IVF clustering method. These two methods may result in inconsistent aggregation results. In this case, after finding a set of candidate quantized representations corresponding to the quantized representation of a reference object using the quantized representation index, for each candidate quantized representation obtained, the partition containing the candidate quantized representation is searched using the object identifier of the candidate quantized representation. After determining the partition, it is determined whether the partition containing the quantized representation has calculated a reference result for filtering. If no reference result has been calculated, a logical operation formed by a set of attribute values ​​is combined with the inverted index table of the partition to calculate the reference result. If a reference result has been calculated, it is determined whether the offset position of the quantized representation is within the reference result. If so, it indicates that it has passed the filtering; if not, it indicates that it has failed the filtering. All partitions for which reference results have been calculated will cover the set of candidate quantized representations determined by the quantized representation index. The above examples are only used to describe the present disclosure, rather than to specifically limit the present disclosure.

[0081] At block 608 , a plurality of target objects similar to the reference object are returned based on the filtered set of candidate quantized representations. As shown in FIG1 , the computing device 104 obtains a plurality of target quantized representations from the filtered set of candidate quantized representations 116 and then returns a plurality of objects corresponding to the plurality of target quantized representations to the user.

[0082] In some embodiments, when returning multiple target objects similar to a reference object, computing device 104 first determines a set of similarities between the reference quantized representation and a filtered set of candidate quantized representations. Computing device 104 then selects multiple target quantized representations from the filtered set of candidate quantized representations based on the set of similarities. Specifically, computing device 104 sorts the filtered set of candidate quantized representations based on the set of similarities. Then, multiple target quantized representations are selected from the sorted set of candidate quantized representations. For example, multiple target quantized representations with higher similarities that are ranked first are selected. Multiple objects are then acquired based on the multiple target quantized representations.

[0083] This method utilizes vector indexing to ensure that during vector retrieval, only local regions associated with multiple quantized representations are scanned to obtain a set of candidate quantized representations. Furthermore, when filtering a vector, only the inverted index table of the partition associated with that local region is used to calculate the reference result for filtering the vector. As data volumes grow exponentially, this operation results in only a small increase in the amount of data scanned during retrieval, and in the number of partitions scanned. This ensures high-performance, low-latency retrieval even with large amounts of data and complex filtering conditions.

[0084] The schematic flowchart for retrieving objects according to some embodiments of the present application was described above in conjunction with FIG6 . The following, in conjunction with FIG7-10 , describes a process for implementing high-performance vector retrieval with filtering conditions according to some embodiments of the present application. First, FIG7 shows a schematic flowchart for constructing a vector index according to some embodiments of the present application. As shown in FIG7 , process 700 is used to construct an IVF-type vector index. At block 702 , operations begin. At block 704 , a computing device parses and obtains vector values ​​from an object. In one example, vector features of the object are extracted by processing the object. For example, image features of an image are extracted, then encoded and converted into vector features. The above example is merely illustrative of the present disclosure and does not specifically limit the present disclosure. At block 706 , a model for the IVF-type index is trained. The IVF-type index model is implemented using a neural network model, which can be trained using sample vector representations and sample indexes. Then, at block 708 , a vector index is constructed using the trained model. For multiple vectors of multiple objects in a search repository, a vector index is constructed using the trained model. In some embodiments, the generated vector index may include partitions, each with a center point vector representation. Each partition includes multiple vector representations. After the vector index is generated, the process ends at block 710. Alternatively, a graph algorithm can be used to generate the vector index. Additionally, the generated vector index is a region consisting of points connected to each other based on similarity.

[0085] FIG. 8 shows a schematic flowchart of constructing an inverted index according to some embodiments of the present application. In FIG. 8, according to the vector index of the IVF type, a scalar inverted index table is built for each partition. The exemplary process 800 begins at block 802. Then at block 804, the vector index constructed in the previous FIG. 7 is loaded. Then at block 806, the computing device can obtain the partition information of the IVF type index, including the total number of partitions N. Then, an inverted index table is generated for each partition. At block 808, i = 0 is set to indicate starting from the 0th partition. Then, at block 810, the vectors within the ith partition are obtained. Then at block 812, the corresponding attribute values are obtained from the object information based on the vector IDs. At block 814, an inverted index table is built using the attribute values. At block 816, it is determined whether i < N holds. If it holds, then at block 820, i is incremented to continue calculating the next partition. If it does not hold, the operation ends at block 818, indicating that the inverted index tables have been built for all partitions.

[0086] FIG. 9 shows a schematic flowchart of parsing a filtering condition according to some embodiments of the present application. As shown in FIG. 9, it illustrates the attribute value filtering condition in the request. Specifically, the exemplary process 900 begins at block 902. Then at block 904, it is confirmed whether the request needs to be filtered. If filtering is not required, the exemplary process ends. If filtering is required, then at block 906, the filtering condition is verified. For example, it is checked whether each filtering condition meets the corresponding syntax rule or whether all the filtering conditions meet the matching rule, etc. At block 908, the computing device parses the filtering condition into a recursive calculation function. For example, the recursive calculation function is a logical operation of the constructed attribute values. Then the operation ends at block 910.

[0087] Figure 10 shows a schematic flow chart for retrieving similar vectors according to some embodiments of the present application. In this process, a joint index is used to retrieve similar vectors that meet the filtering criteria. This example process 1000 begins at block 1002. At block 1004, an IVF-type index search is used to obtain a list of partitions to be scanned. At block 1006, for each partition to be scanned, each vector within the partition is traversed. Because the vector index generation method is the same as the vector partitioning method, the partition determined in the vector index is the same partition for calculating the filtering result. At block 1008, a determination is made as to whether a filtering condition exists. If not, vector similarity is calculated directly at block 1018. If a filtering condition exists, then at block 1010, a determination is made as to whether a reference result for filtering has been calculated for the partition containing the vector. If a reference result for filtering has been calculated for the partition containing the vector, the process proceeds to block 1014. If the partition containing the vector has not yet calculated a reference result for filtering, at block 1012, the inverted index table of attribute values ​​corresponding to the partition and a recursive calculation function are used to calculate a reference result for filtering within the partition. At block 1014, the calculated reference result is used to determine whether the vector meets the filtering conditions. If not, the vector is discarded at block 1016. If so, the similarity between the vector and the reference vector of the object in the search input is calculated at block 1018. Then, at block 1020, the K vectors with the highest similarity are returned. Finally, the process ends at block 1022.

[0088] FIG11 further illustrates a block diagram of an apparatus 1100 for retrieving an object according to an embodiment of the present application. Apparatus 1100 is applied to a computing device and may include multiple modules for executing corresponding steps in process 600 as discussed in FIG6 . As shown in FIG11 , apparatus 1100 includes: a reference quantized representation and property value acquisition unit 1102 configured to acquire a reference quantized representation and a set of property values ​​for a reference object in a search input; a candidate quantized representation selection unit 1104 configured to select a set of candidate quantized representations related to the reference quantized representation from a plurality of quantized representations based on the reference quantized representation and a quantized representation index generated from a plurality of quantized representations of a plurality of objects; a quantized representation filtering unit 1106 configured to filter a set of candidate quantized representations based on the set of property values ​​and a set of inverted index tables associated with a set of candidate quantized representations from a plurality of partitions formed by the plurality of quantized representations, wherein the inverted index tables in the set of inverted index tables are generated based on the property values ​​of the objects corresponding to the quantized representations in the corresponding partitions; and a target object returning unit 1108 configured to return a plurality of target objects similar to the reference object based on the filtered set of candidate quantized representations.

[0089] In some embodiments, the candidate quantization representation selection unit 1104 includes: a similarity aggregation selection unit, configured to select a group of similar partitions adjacent to the reference quantization representation from a similar area formed by performing a similarity aggregation operation on multiple quantization representations based on the similarity between the reference quantization representation and the quantization representation in the quantization representation index; and a candidate quantization representation determination unit, configured to determine the quantization representations in a group of similar partitions as a group of candidate quantization representations.

[0090] In some embodiments, the quantization representation filtering unit 1106 includes: a logical operation determination unit, configured to determine a logical operation for filtering a set of candidate quantization representations based on a set of attribute values; a partition filtering determination unit, configured to determine whether a reference result for filtering the candidate quantization representation has been calculated for a target partition in a set of partitions corresponding to a candidate quantization representation in a set of candidate quantization representations; a reference result determination unit, configured to determine a reference result based on the logical operation and an inverted index table for the target partition if it is determined that the reference result has not been calculated for the target partition; and a first filtering unit, configured to filter the candidate quantization representation based on the reference result.

[0091] In some embodiments, the quantized representation filtering unit 1106 further includes: a second filtering unit configured to filter the candidate quantized representations based on the reference result if it is determined that the reference result has been calculated for the target partition.

[0092] In some embodiments, the apparatus 1100 further includes: a removing unit configured to remove the candidate quantized representation from a set of candidate quantized representations if it is determined that the candidate quantized representation fails filtering.

[0093] In some embodiments, the target object return unit 1108 includes: a similarity determination unit, configured to determine a set of similarities between a reference quantization representation and a filtered set of candidate quantization representations; and a plurality of target quantization representation selection units, configured to select a plurality of target quantization representations from the filtered set of candidate quantization representations based on a set of similarities.

[0094] In some embodiments, the multiple target quantization representation selection unit includes: a sorting unit configured to sort a filtered set of candidate quantization representations based on a set of similarities; and a quantization representation selection unit configured to select multiple target quantization representations from the sorted set of candidate quantization representations.

[0095] In some embodiments, the apparatus 1100 further includes: a similarity aggregation operation unit configured to perform a similarity aggregation operation on the multiple quantized representations based on the similarity between the multiple quantized representations; a quantized representation index generation unit configured to generate a quantized representation index based on the multiple quantized representations that have been similarly aggregated.

[0096] In some embodiments, the device 1100 also includes: multiple partition determination units, configured to perform clustering operations on multiple quantized representations based on the similarity between the multiple quantized representations to determine multiple partitions; and an inverted index table determination unit, configured to determine an inverted index table of attribute values ​​of a group of objects corresponding to a group of quantized representations based on a group of quantized representations in each partition of the multiple partitions.

[0097] In some embodiments, each partition of the plurality of partitions includes: an identification of the object, a quantized representation of the object, and an offset position of the quantized representation of the object in the partition.

[0098] In some embodiments, the apparatus 1100 further includes: a mapping relationship generating unit configured to generate, for each object among the plurality of objects, a mapping relationship between the identifier of the object and the partition where the quantized representation of the object is located and an offset position in the partition.

[0099] In some embodiments, the inverted index table determination unit includes: a quantization representation acquisition unit, configured to acquire a set of quantization representations in a partition; an object attribute value acquisition unit, configured to acquire attribute values ​​of a set of objects based on identifiers of a set of objects corresponding to a set of quantization representations; and an inverted index table establishment unit, configured to establish an inverted index table based on the attribute values ​​of the set of objects.

[0100] Figure 12 shows a schematic block diagram of an example device 1200 that can be used to implement an embodiment of the present application. For example, the computing device 104 in Figure 1 and the device 302 in Figure 3 according to an embodiment of the present application can be implemented by example device 1200. As shown in the figure, device 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the computer program instructions stored in a read-only memory (ROM) 1202 or the computer program instructions loaded into a random access memory (RAM) 1203 from a storage unit 1208. In RAM 1203, various programs and data required for the operation of device 1200 can also be stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other by bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.

[0101] Various components in device 1200 are connected to I / O interface 1205, including an input unit 1206, such as a keyboard and mouse; an output unit 1207, such as various types of displays and speakers; a storage unit 1208, such as a magnetic disk and optical disk; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0102] The various processes and processing described above, such as methods 600, 700, 800, 900, and 1000, may be performed by the processing unit 1201. For example, in some embodiments, the methods 600, 700, 800, 900, and 1000 may be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the CPU 1201, one or more actions of the methods 600, 700, 800, 900, and 1000 described above may be performed.

[0103] The present application may include a method, apparatus, system, chip, and / or computer program product. The chip may include a processing unit and a communication interface, and the processing unit may process program instructions received from the communication interface. The computer program product may include a computer-readable storage medium having computer-readable program instructions for executing various aspects of the present application.

[0104] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0105] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0106] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data or source code or object code written in any combination of one or more programming languages, wherein the programming language includes object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or executed completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as by using an Internet service provider to connect to the Internet). In certain embodiments, by utilizing the state information of computer-readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer-readable program instructions, thereby realizing various aspects of the present application.

[0107] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0108] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0109] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0110] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a special hardware-based system that performs the function or action of the specification, or can be implemented by a combination of special hardware and computer instructions.

[0111] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for searching an object, characterized in that: include: Obtaining a reference quantized representation for a reference object in the search input and an attribute value for the reference object; selecting, from the plurality of quantized representations, a candidate quantized representation associated with the reference quantized representation based on the reference quantized representation and a quantized representation index generated from a plurality of quantized representations of a plurality of objects; filtering the candidate quantized representations based on the property value and an inverted index table of a partition associated with the candidate quantized representation in a plurality of partitions formed by the plurality of quantized representations; as well as Based on the filtered candidate quantized representations, a plurality of target objects similar to the reference object are returned.

2. The method according to claim 1, characterized in that: The selecting a set of candidate quantized representations related to the reference quantized representation from the multiple quantized representations comprises: Based on the similarity between the reference quantized representation and the quantized representation in the quantized representation index, selecting a group of similar partitions adjacent to the reference quantized representation from the similarity region formed by performing similarity aggregation operations on the plurality of quantized representations; and The quantized representations in the group of similar partitions are determined as the group of candidate quantized representations.

3. The method of claim 1 , wherein filtering the set of candidate quantized representations comprises: In a case where a reference result has not been calculated for a target partition in the partitions corresponding to a candidate quantized representation in the candidate quantized representations, determining the reference result based on an inverted index table for the target partition; as well as The candidate quantized representations are filtered based on the reference result.

4. The method according to claim 3, characterized in that The filtering of the set of candidate quantized representations further comprises: If it is determined that the reference result has been calculated for the target partition, the candidate quantization representations are filtered based on the reference result.

5. The method according to claim 3 or 4, characterized in that: Also includes: If it is determined that the candidate quantized representation does not pass the filtering, the candidate quantized representation is removed from the set of candidate quantized representations.

6. The method according to claim 3 or 4, wherein returning a plurality of target objects similar to the reference object comprises: determining a set of similarities between the reference quantized representation and the filtered set of candidate quantized representations; as well as Based on the set of similarities, a plurality of target quantized representations are selected from the filtered set of candidate quantized representations.

7. The method according to claim 6, characterized in that The step of selecting a plurality of target quantization representations from the filtered set of candidate quantization representations comprises: sorting the filtered set of candidate quantized representations based on the set of similarities; and The plurality of target quantized representations are selected from the sorted set of candidate quantized representations.

8. The method according to claim 1, characterized in that Also includes: Based on the similarities between the multiple quantized representations, performing a similarity aggregation operation on the multiple quantized representations; as well as The quantized representation index is generated based on the plurality of similarity-aggregated quantized representations.

9. The method according to claim 8, characterized in that Also includes: Based on the similarities between the multiple quantized representations, clustering the multiple quantized representations to determine multiple partitions; as well as Based on a set of quantized representations in each of the plurality of partitions, an inverted index table of attribute values ​​of a set of objects corresponding to the set of quantized representations is determined.

10. The method according to claim 9, characterized in that Each partition of the plurality of partitions includes: an identification of an object, a quantized representation of the object, and an offset position of the quantized representation of the object in the partition.

11. The method according to claim 10, characterized in that Also includes: For each object among the multiple objects, a mapping relationship between the identifier of the object, the partition where the quantized representation of the object is located, and the offset position in the partition is generated.

12. The method according to claim 9, characterized in that Determining an inverted index table of attribute values ​​of a set of objects corresponding to the set of quantized representations comprises: obtaining a set of quantized representations in the partition; obtaining attribute values ​​of the set of objects based on identifications of the set of objects corresponding to the set of quantized representations; and The inverted index table is established based on the attribute values ​​of the group of objects.

13. A device for searching an object, characterized in that: The device comprises: A reference quantitative representation and attribute value acquisition unit is configured to acquire a reference quantitative representation for a reference object in the search input and a reference quantitative representation for the reference object in the search input. A set of attribute values ​​of the reference object; a candidate quantization representation selection unit configured to select, based on the reference quantization representation and quantization representation indexes generated from a plurality of quantization representations of a plurality of objects, a group of candidate quantization representations related to the reference quantization representation from the plurality of quantization representations; a quantization representation filtering unit configured to filter the set of candidate quantization representations based on the set of property values ​​and a set of inverted index tables of a set of partitions in a plurality of partitions formed by the plurality of quantization representations and associated with the set of candidate quantization representations, wherein the inverted index tables in the set of inverted index tables are generated by property values ​​of objects corresponding to the quantization representations in the corresponding partitions; and The target object returning unit is configured to return a plurality of target objects similar to the reference object based on the filtered set of candidate quantization representations.

14. An electronic device comprising: at least one computing unit; At least one memory, the at least one memory being coupled to the at least one computing unit and storing instructions for execution by the at least one computing unit, the instructions, when executed by the at least one computing unit, causing the device to perform the method according to any one of claims 1-12.

15. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 12.

16. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Search recall method and device, server and storage medium

    CN107491518A

  • Method and device for extracting entity related information, electronic device and storage medium

    CN109783651A

  • Image retrieval method and device

    CN110019907A

  • Method for image retrieval, computing device and computer storage medium

    CN111522989A

  • Data query method and device, electronic equipment and computer readable storage medium

    CN115495504A