Retrieval method, query method, device, system, electronic device and computer storage medium

By first performing structured field indexing and then performing similarity indexing in the search method, the problem of high computational overhead in the ANN search method is solved, and the efficiency of image retrieval is improved.

CN113297454BActive Publication Date: 2025-01-03ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010291995.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-14
Publication Date
2025-01-03
Estimated Expiration
2040-04-14

AI Technical Summary

Technical Problem

The existing ANN retrieval methods are computationally expensive when looking for similar images in high-dimensional spaces, resulting in inefficiency, especially in the absence of dedicated ANN indexes.

Method used

By first performing structured field indexing, the pre-order indexing results are obtained, and then similarity indexing is performed based on unstructured data retrieval conditions, thereby reducing the calculation overhead of similarity indexing.

Benefits of technology

It reduces the computing overhead of unstructured data retrieval, improves query efficiency, and saves computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113297454B_ABST
    Figure CN113297454B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a retrieval method, a query method, a device, a system, an electronic device and a computer storage medium. The retrieval method includes: obtaining retrieval conditions, the retrieval conditions including structured field retrieval conditions and unstructured data retrieval conditions based on the same object; performing structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result; performing similarity indexing based on the unstructured data retrieval conditions, and determining the unstructured data index result from the pre-order index result to generate a retrieval result. Since the pre-order index result is obtained by the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity indexing based on the unstructured data, thereby saving computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of communication technology, and in particular to a retrieval method, a query method, a device, a system, an electronic device, and a computer storage medium. Background Art

[0002] With the development of multimedia devices such as images and videos, a large amount of image, video and other data is generated on the Internet every day. In order to deeply analyze the content in images and videos, it is necessary to first use deep learning to extract the feature vectors, and then use the vector analysis engine to perform vector retrieval. For example, the most common vector retrieval is the Approximate Nearest Neighbor Search (ANN) retrieval. The purpose of ANN retrieval is to find similar vectors in high-dimensional space, which is similar image search at the service level. The vector server has developed a dedicated ANN index for ANN retrieval. However, there is still room for improvement in many services. Summary of the invention

[0003] In view of this, embodiments of the present invention provide a retrieval method, a query method, an apparatus, a system, an electronic device, and a computer storage medium to solve or alleviate the above-mentioned problems.

[0004] According to a first aspect of an embodiment of the present invention, a retrieval method is provided, comprising: obtaining retrieval conditions, the retrieval conditions comprising structured field retrieval conditions and unstructured data retrieval conditions based on the same object, performing structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result; performing similarity indexing based on the unstructured data retrieval conditions, determining the unstructured data index result from the pre-order index result to generate a retrieval result.

[0005] According to a second aspect of an embodiment of the present invention, a query method is provided, comprising: obtaining a query request, the query request including an object to be queried; generating structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried in response to the query request; sending the structured field retrieval conditions and unstructured data retrieval conditions to a server, so that the server performs structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result, and performs similarity indexing based on the unstructured data retrieval conditions to determine an unstructured data index result from the pre-order index result; and receiving a query result based on the unstructured data index result returned by the server.

[0006] According to a third aspect of an embodiment of the present invention, a query method is provided, comprising: obtaining a display image query request, the display image query request including a to-be-queried image; generating structured field retrieval conditions and unstructured data retrieval conditions for the to-be-queried image in response to the display image query request; sending the structured field retrieval conditions and unstructured data retrieval conditions to a server, so that the server performs structured field indexing in a display image data set based on the structured field retrieval conditions to obtain a pre-order index result, and performs similarity indexing based on the unstructured data retrieval conditions to determine an unstructured data index result from the pre-order index result; and receiving a query result based on the unstructured data index result returned by the server, the query result including at least one display image in the display image data set that satisfies the display image query request.

[0007] According to a fourth aspect of an embodiment of the present invention, a query device is provided, comprising: an acquisition module, which acquires a display image query request, wherein the display image query request includes a to-be-queried image; a retrieval condition generation module, which responds to the display image query request and generates a structured field retrieval condition and an unstructured data retrieval condition for the to-be-queried image; a sending module, which sends the structured field retrieval condition and the unstructured data retrieval condition to a server, so that the server performs a structured field index in a display image data set based on the structured field retrieval condition to obtain a pre-order index result, and performs a similarity index based on the unstructured data retrieval condition to determine an unstructured data index result from the pre-order index result; and a receiving module, which receives a query result based on the unstructured data index result returned by the server, wherein the query result includes at least one display image in the display image data set that satisfies the display image query request.

[0008] According to a fifth aspect of an embodiment of the present invention, a retrieval device is provided, comprising: an acquisition module, which acquires retrieval conditions, wherein the retrieval conditions include structured field retrieval conditions and unstructured data retrieval conditions based on the same object; a structured field indexing module, which performs structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result; and a similarity indexing module, which performs similarity indexing based on the special unstructured data retrieval conditions, and determines the unstructured data index result from the pre-order index result to generate a retrieval result.

[0009] According to a sixth aspect of an embodiment of the present invention, a query device is provided, comprising: an acquisition module, which acquires a query request, wherein the query request includes an object to be queried; a retrieval condition generation module, which responds to the query request and generates structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried; a sending module, which sends the structured field retrieval conditions and unstructured data retrieval conditions to a server, so that the server performs structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result, and performs similarity indexing based on the unstructured data retrieval conditions to determine an unstructured data index result from the pre-order index result; and a receiving module, which receives a query result based on the unstructured data index result returned by the server.

[0010] According to a seventh aspect of an embodiment of the present invention, a query system is provided, comprising: a front-end node and at least one computing node, wherein the front-end node is used to: obtain a query request, wherein the query request includes an object to be queried; in response to the query request, generate structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried; send the structured field retrieval conditions and the unstructured data retrieval conditions to the at least one computing node; receive a query result based on the unstructured data index result sent by the at least one computing node, wherein the at least one computing node is used to: perform structured field indexing based on the structured field retrieval condition to obtain a pre-order index result; perform similarity indexing based on the unstructured data retrieval condition to determine the unstructured data index result from the pre-order index result; and generate a query result based on the unstructured data index result.

[0011] According to an eighth aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; a computer-readable medium configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the retrieval method described in the first aspect or the query method described in the second aspect or the third aspect.

[0012] According to a ninth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the retrieval method described in the first aspect or the query method described in the second aspect or the third aspect is implemented.

[0013] The solution of the embodiment of the present invention can obtain a pre-order index result by performing a structured field index based on the structured field search condition, and then perform a similarity index based on the unstructured data search condition, and determine the unstructured data index result from the pre-order index result. Since the pre-order index result is obtained by a structured field index with a lower computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0015] Figure 1 A schematic block diagram of a network architecture in which a retrieval method according to an embodiment of the present invention is located;

[0016] Figure 2A is a schematic block diagram of a retrieval method according to another embodiment of the present invention;

[0017] Figure 2B-2D is a schematic diagram of a retrieval method according to another embodiment of the present invention;

[0018] Figure 3 A schematic block diagram of a network architecture in which a query method according to another embodiment of the present invention is located;

[0019] Figure 4A is a schematic block diagram of a query method according to another embodiment of the present invention;

[0020] Figure 4B is a schematic block diagram of a query method according to another embodiment of the present invention;

[0021] Figure 5 is a schematic block diagram of a retrieval device according to another embodiment of the present invention;

[0022] Fig. 6A is a schematic block diagram of a query device according to another embodiment of the present invention;

[0023] Figure 6B is a schematic block diagram of a query device according to another embodiment of the present invention;

[0024] Figure 6C is a schematic block diagram of a query device according to another embodiment of the present invention;

[0025] Figure 7is a schematic structural diagram of an electronic device according to another embodiment of the present invention;

[0026] Figure 8 The present invention is another embodiment of the hardware structure of an electronic device. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0028] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.

[0029] Figure 1 1 is a schematic block diagram of a network architecture in which a retrieval method according to an embodiment of the present invention resides. For example, a network architecture according to an example of an embodiment of the present invention may include a client and a server. For example, a user device 150 used by a user 140 is connected to a server via a network or the like. The server may include a server cluster of at least one of a WEB server, an application server, and a database server. The server may include a query engine 110 and a computing node. For example, a computing node may be a single server or a server cluster, for example, a distributed server such as a cloud server. Figure 1 1 shows a logical block diagram of executing queries for structured data and unstructured data according to an embodiment of the present invention. In one embodiment, the query engine 110 may be a query engine that can access and process queries about different types of data. For example, Figure 1 As shown, the query engine 110 can access the unstructured data 160. In an embodiment of the present invention, the query engine 110 can implement an interface that supports queries based on a common or public query specification language (such as SQL), or any other type of formatted queries. In an embodiment of the present invention, the query engine 110 can also translate queries received in different query language formats into another query language format for execution (for example, translating an SPL query into an SQL query).

[0030] In an embodiment of the present invention, the query engine 110 may send an index request to execute a query on the unstructured data 160. For example, in one embodiment, a SQL query may be received, which specifies another query predicate for the unstructured data 160. The index request may generate an execution plan with structured data operations 131 and unstructured data operations 132 to execute such SQL queries. In an embodiment of the present invention, the other query received may be for the unstructured data 160, and the appropriate structured data operation 131 or unstructured data operation 131 may be determined and included in the execution plan generated by the index request.

[0031] In the embodiment of the present invention, the query engine 110 may implement structured data query execution to perform structured data operation 131. The query engine 110 may also implement unstructured data query execution to perform unstructured data operation 132, thereby applying unstructured data operation 132.

[0032] It should be understood that in an embodiment of the present invention, structured data may be data stored according to a predefined data model (such as a relational data model). In one embodiment, the unstructured output storage may pre-label the structured data. In one embodiment, structured data may be stored in different types of formats, such as a row-oriented format (e.g., where rows of data are stored together in a single permanent storage block), or a column-oriented format (e.g., where columns of data are stored together in a single permanent storage block). In one embodiment, the unstructured data 160 may be vector data of images, videos, and the like. It may also be semi-structured data (such as log records), or unstructured data (such as text data), or any other data that is not fully structured.

[0033] It should also be understood that the preceding description of executing queries against structured data and unstructured data is a logical illustration and, therefore, should not be construed as limiting the implementation of the query engine or other illustrated features (such as index requests, structured data query execution, unstructured data query execution, or data storage devices for structured data or unstructured data).

[0034] This specification begins with a general description of a provider network that implements structured data processing that performs queries against structured and unstructured data. Various examples of structured data processing services are then discussed, which include different components / modules or arrangements of components / modules that can be used as part of implementing the technology. Many different methods and techniques for implementing query execution against structured and unstructured data are then discussed, some of which are shown in the accompanying flow charts. Finally, a description of an example computing system on which various components, modules, systems, devices, and / or nodes can be implemented is provided. Various examples are provided throughout the specification.

[0035] Figure 2A A schematic block diagram of a retrieval method according to another embodiment of the present invention. Figure 2A The search methods include:

[0036] 210: Acquire search conditions, where the search conditions include structured field search conditions and unstructured data search conditions based on the same object.

[0037] For example, the object may be processed into structured data, semi-structured data or unstructured data. For example, the object may be an object such as a picture, sound or video. For example, the unstructured data may be annotated and have structured data. For example, the unstructured data may be unannotated but its structured data may be determined after identification processing. The structured field retrieval condition is a retrieval condition for the structured data of the object. The object may be structured data, such as attribute information of the object. For example, the structured data may include the size of the picture, the color of the picture, the acquisition time of the picture, the modification time of the picture, the size of the video, the resolution of the video, the encoding method of the video, and the author information of the video. For example, the structured data may also include information related to the client, such as the time when the client initiates the query, the location where the client initiates the query, and the user behavior record in the client. For example, the structured data may also include information input from the client, such as the time, location, price of a specific product, style of a specific product, sales volume of a specific product, brand of a specific product, etc. input by the client. For example, the unstructured data retrieval condition may be a feature vector retrieval condition. For example, the retrieval condition may be a subquery generated by the client based on the query. For example, the structured field search condition may be a part or all of the characteristic fields of the structured data, such as keywords or key words.

[0038] 230: Based on the structured field search condition, the structured field is indexed to obtain a pre-order index result.

[0039] For example, a structured retrieval data set is determined, and a search is performed based on all data objects in the structured retrieval data set. Alternatively, a structured retrieval data set is determined, and a search is performed based on a part of the structured retrieval data set to obtain a pre-order index result. For example, a first structured retrieval data set and a second structured retrieval data set are determined, wherein the first structured retrieval data set and the second structured retrieval data set may overlap with each other. Alternatively, the first structured retrieval data set and the second structured retrieval data set may be mutually intersecting sets. For example, a search is performed based on the data objects in the first structured retrieval data set to obtain a pre-order index result. In other words, the structured retrieval data set may include multiple sub-data sets, for example, each data set includes different types of structured data. For example, a structured index is performed based on the sub-data sets to obtain a pre-order index result. For example, the above situation is also applicable when there are query conditions for different types of structured data in the structured field retrieval conditions. In other words, a structured field index may be performed based on only a part of the query conditions to obtain a pre-order index result. For example, a structured data set may include unstructured data.

[0040] 240: Based on the unstructured data retrieval condition, similarity indexing is performed, and the unstructured data index result is determined from the previous index result to generate a retrieval result.

[0041] It should be understood that the similarity index described herein can be any method of similarity calculation. For example, vector similarity calculation is adopted. For example, feature vector retrieval is performed based on the pre-order index result by clustering or classification. For example, feature vector retrieval is performed based on all pre-order index results. For example, feature vector retrieval is performed based on part of the pre-order index results. For example, feature vector retrieval is performed based on all or part of the structured data set mentioned above, and then feature vector retrieval results are obtained based on the pre-order index results. For example, vector similarity indexing can be performed based on the first feature vector retrieval condition to obtain a preliminary feature vector index result. For example, a second feature vector retrieval condition is generated based on the pre-order result, and based on the second feature vector retrieval condition, the preliminary feature vector index result is re-indexed by vector similarity to obtain the feature vector index result. It should also be understood that the various indexing methods mentioned above are merely exemplary, and the embodiments of the present invention are not limited thereto.

[0042] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources.

[0043] It should be understood that ANN retrieval is an approximate process of calculating similarity and sorting and intercepting global vectors. For example, when massively parallel processing (MPP) analytical data is processing ANN retrieval, if there is no dedicated ANN index at the bottom layer, all vector data needs to be extracted to the calculation layer for vector calculation, and then sorted and intercepted part of the sorting, which makes the calculation overhead very large. The solution of the embodiment of the present invention saves computing resources. In addition, the solution of the present invention realizes structured query and maintains good compatibility with existing equipment.

[0044] In another implementation of the present invention, similarity indexing is performed based on unstructured data retrieval conditions, and the unstructured data index results are determined from the previous index results, including: based on the feature vector retrieval conditions, vector similarity indexing is performed on the previous index results to obtain a first vector similarity index result; based on the first vector similarity index result, the feature vector index result is determined.

[0045] For example, Figure 2B As shown, in each computing node, based on the feature vector retrieval condition, the pre-order index result is subjected to vector similarity indexing to obtain a first vector similarity indexing result. For example, in response to the feature vector retrieval condition, the main service node sends the same retrieval condition to multiple computing nodes so that the corresponding query engines perform vector similarity indexing. For example, in response to the feature vector retrieval condition, different feature vector retrieval conditions are sent to different computing nodes so that the corresponding query engines perform corresponding vector similarity indexing, thereby providing the system with flexibility in configuring computing resources. For example, in response to the feature vector retrieval condition, the same query condition is sent to different computing nodes. For example, the query engines of different computing nodes generate different sub-queries. For example, different computing nodes process according to the sub-queries to obtain the processing results of the sub-queries. For example, the main service node processes the processing results of the sub-queries to obtain the vector similarity indexing result. In this way, the amount of calculation of the main service node is reduced. Thus, the separation of functions from the main service node to the computing nodes is achieved.

[0046] In another implementation of the present invention, similarity indexing is performed based on unstructured data retrieval conditions, and the unstructured data index results are determined from the previous index results, including: based on the feature vector retrieval conditions, vector similarity indexing is performed to obtain a second vector similarity index result; using the previous index result, the second vector similarity index result is filtered to obtain a feature vector index result.

[0047] For example, in response to the feature vector retrieval condition, a first pre-order index result and a second pre-order index result are obtained. For example, the first pre-order index result is used to perform vector similarity indexing to obtain a second vector similarity initial index result. For example, the second pre-order index result is used to filter the second vector similarity initial index result to obtain a second vector similarity index result. Optionally, the pre-order index result also includes a third pre-order index result. For example, the first pre-order result can be subjected to vector similarity indexing to obtain a first initial result. For example, the second pre-order result can be used to filter the first initial result to obtain a second initial result. For example, the third pre-order result can be used to perform vector similarity indexing. In other words, the pre-order index result can be subjected to a lower level of vector similarity indexing and filtering processing. There is no limit on the number of these two processings. It should be understood that the above-mentioned similarity indexing can be performed in any manner, and the embodiments of the present invention are not limited to this.

[0048] For example, using Figure 2C The nodes shown are processed and it should be understood that Figure 2C The computing nodes shown can be distributed computing nodes or single computing nodes. Figure 2B Or the computing nodes shown in 2D are used for processing.

[0049] In another implementation of the present invention, structured field indexing is performed based on structured field retrieval conditions to obtain a pre-order index result, including: determining an original similarity index data set; indexing in the original similarity index data set based on the structured field retrieval conditions to obtain a pre-order index result, wherein the method also includes: determining the computational overhead of the vector similarity index based on the original similarity index data set.

[0050] For example, a computational overhead calculation module can be used in a query engine. It should be understood that the computational overhead calculation module can also be an independent module, which is not limited in the embodiments of the present invention. For example, the computational overhead calculation module is used to calculate the computational overhead of the above-mentioned filtering process. For example, the computational overhead calculation module is used to calculate the computational overhead of the above-mentioned vector similarity. For example, the computational overhead calculation module is used to calculate the computational overhead of the above-mentioned structured field retrieval. For example, the computational overhead module can also compare the computational overheads of the above-mentioned filtering process, structured field error detection process, and vector similarity calculation process. For example, based on the above-mentioned comparison result, the query engine is instructed to perform processing.

[0051] For example, the computational cost of each of the three processes mentioned above can be calculated. For example, the computational cost sum of two of the three processes mentioned above can be calculated. For example, the computational cost sum of the two processes can be compared with another computational cost.

[0052] In another implementation of the present invention, the vector similarity index includes a first vector similarity index and a second vector similarity index, wherein similarity indexing is performed based on unstructured data retrieval conditions, and the unstructured data index result is determined from the pre-order index result, including: determining that the computational overhead of the first vector similarity index is greater than the computational overhead of the second vector similarity index; and performing the second vector similarity index based on the feature vector retrieval condition, and determining the feature vector index result from the pre-order index result.

[0053] In another implementation of the present invention, similarity indexing is performed based on unstructured data retrieval conditions, and the unstructured data index results are determined from the pre-order index results, which also includes: based on a first index overhead, determining the computational overhead of a first vector similarity index, wherein the first index overhead indicates the overhead of indexing the pre-order index results in the original similarity index data set; based on a second index overhead and a filtering processing overhead, determining the computational overhead of a second vector similarity index, wherein the second index overhead indicates the overhead of indexing the feature vector index results in the pre-order index results, and the filtering processing overhead is the overhead of filtering the second vector similarity index results based on the pre-order index results.

[0054] In another implementation of the present invention, similarity indexing is performed based on unstructured data retrieval conditions, and the unstructured data index results are determined from the pre-order index results, which also includes: based on the first index overhead, determining the computational overhead of the second vector similarity index, wherein the first index overhead indicates the overhead of indexing the pre-order index results in the original similarity index data set; based on the second index overhead and the filtering processing overhead, determining the computational overhead of the first vector similarity index, wherein the second index overhead indicates the overhead of indexing the feature vector index results in the pre-order index results, and the filtering processing overhead is the overhead of filtering the second vector similarity index results based on the pre-order index results.

[0055] For example, the structured field index and the vector similarity index can be forward indexes or inverted indexes. For example, the structured field index is a forward index, and the vector similarity index can be an inverted index. For example, the structured field index can be an inverted index, and the vector similarity index can be a forward index. For example, the structured field index is divided into a first structured field index and a second structured field index, the first structured field index is a forward index, and the second structured field index is an inverted index. For example, the vector similarity index includes a first vector similarity index and a second vector similarity index. For example, the first vector similarity index is a forward index. For example, the second vector similarity index is an inverted index.

[0056] In another implementation of the present invention, the structured field retrieval condition includes a first retrieval condition for a first structured field and a feature vector retrieval condition for a second structured field, wherein, based on the structured field retrieval condition, a structured field index is performed to obtain a pre-order index result, including: based on the first retrieval condition, a first inverted index is performed on the first structured field to obtain a first inverted index result; based on the second structured field retrieval condition, a second inverted index is performed on the first inverted index result to obtain a pre-order index result.

[0057] In another implementation of the present invention, the method further includes: performing row number indexing on the unstructured data index result to obtain at least one object corresponding to the unstructured data index result; and generating a retrieval result including the at least one object.

[0058] Figure 3 This is a schematic block diagram of a network architecture in which a query method according to another embodiment of the present invention resides. For example, a network architecture according to an example of an embodiment of the present invention may include a client and a server. For example, a user device 150 used by a user 140 is connected to a server via a network or the like. The server may include a server cluster of at least one of a WEB server, an application server, and a database server. The server may include a query engine 110 and a computing node. For example, a computing node may be a single server or a server cluster, for example, a distributed server such as a cloud server. Figure 3 1 shows a logical block diagram of executing queries for structured data and unstructured data according to an embodiment of the present invention. In one embodiment, the query engine 110 may be a query engine that can access and process queries about different types of data. For example, Figure 3 As shown, the query engine 110 can access the unstructured data 160. In an embodiment of the present invention, the query engine 110 can implement an interface that supports queries based on a common or public query specification language (such as SQL), or any other type of formatted queries. In an embodiment of the present invention, the query engine 110 can also translate queries received in different query language formats into another query language format for execution (for example, translating an SPL query into an SQL query).

[0059] In an embodiment of the present invention, the query engine 110 may send an index request to execute a query on the unstructured data 160. For example, in one embodiment, a SQL query may be received, which specifies another query predicate for the unstructured data 160. The index request may generate an execution plan with structured data operations 131 and unstructured data operations 132 to execute such SQL queries. In an embodiment of the present invention, the other query received may be for the unstructured data 160, and the appropriate structured data operation 131 or unstructured data operation 131 may be determined and included in the execution plan generated by the index request.

[0060] In the embodiment of the present invention, the query engine 110 may implement structured data query execution to perform structured data operation 131. The query engine 110 may also implement unstructured data query execution to perform unstructured data operation 132, thereby applying unstructured data operation 132.

[0061] Figure 4A A schematic block diagram of a query method according to another embodiment of the present invention. Figure 4A The query methods include:

[0062] 410: Get query request, the query request includes the object to be queried.

[0063] 420: In response to the query request, generate structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried.

[0064] 430: Sending structured field retrieval conditions and unstructured data retrieval conditions to the server, so that the server performs structured field indexing based on the structured field retrieval conditions to obtain pre-order index results, and performs similarity indexing based on the unstructured data retrieval conditions to determine the unstructured data index results from the pre-order index results.

[0065] 440: receiving the query result based on the feature vector index result returned by the server.

[0066] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources. Therefore, for the front end, the query efficiency is improved accordingly.

[0067] For example, the query condition sent by the client includes a mixed query intent. For example, the query condition is to find the 10 vector records that appear in city 101 on September 10, 2018, which are closest to the query vector. For example, the query vector is a target image. For example, the target object in the target image is marked in blue. For example, the query condition may also include other structured data.

[0068] It should be understood that the client may include a corresponding method or a module of the response. For example, a module such as ann_distance included in the client can calculate the result based on the query vector of the client and the recorded vector. For example, when the front-end node receives the query, it will disassemble and rewrite the custom table query. For example, the front-end node can send the subquery to one or more computing nodes. For example, the query received by the one or more computing nodes may be a query with three filter conditions. For example, the above three filter conditions can be executed in parallel or in series. For example, the query can be performed serially. For example, a structured query is performed first, and then an ANN query is performed. For example, an ANN query can also be performed first, then a structured query, and then an ANN query. For example, in this example, the computing node queries the inverted index of the Date field and the inverted index of the CityId field in parallel. For example, the results of the first two inverted indexes are merged and intersected in the inverted index collector (Revert Search Collector). For example, the Revert Search Collector transmits the intermediate results of the inverted index to the ANN index collector (Ann Search Collector). For example, Ann Search Collector uses an index to perform ANN search based on a pre-order result set. For example, the ANN search process of Ann Search Collector is divided into two modes: feeder and filter. For example, feeder is driven by pre-order results for calculation. For example, filter is driven by index for calculation and uses pre-order results for filtering. Ann Search Collector uses a computational cost calculation module to calculate a better search method. The computational cost calculation module can be implemented as a Cost Based Optimizer. For example, the better search method can be a search method with the lowest computational cost. For example, a mixed index search (Mixed Index Search) of structured search and vector similarity search can be performed. For example, the mixed index search can include the above-mentioned alternating search methods. For example, after the search process is completed, the search result row number is passed to the detail manager (DetailManager). For example, the above-mentioned detail manager can have the function of row number indexing. For example, detailed data of the result row is obtained. For example, a front-end node such as a client that initiates a query can collect query results of all or part of the computing nodes. For example, a front-end node such as a client can reorder and intercept all records according to ann_distance. It should be understood that the above process description is only an example of a hybrid search process of an embodiment of the present invention. For example, an embodiment of the present invention can only query a single type of condition.The corresponding operations and processes are as described above. For example, the computing node will skip part of the retrieval process, and the process will not be repeated.

[0069] Figure 4B FIG. 1 is a schematic block diagram of a query method according to another embodiment of the present invention. It should be understood that Figure 4B The query method can be applied to Figure 3 The network architecture shown may also adopt other network architectures, which are not limited in the embodiments of the present invention. Figure 4B The query methods include:

[0070] 450: Get a display image query request, which includes the image to be queried.

[0071] 460: In response to the display image query request, generate structured field retrieval conditions and unstructured data retrieval conditions for the image to be queried.

[0072] 470: Send structured field retrieval conditions and unstructured data retrieval conditions to the server, so that the server can perform structured field indexing in the display image data set based on the structured field retrieval conditions to obtain pre-order index results, and perform similarity indexing based on the unstructured data retrieval conditions to determine the unstructured data index results from the pre-order index results.

[0073] 480: Receive a query result based on the feature vector index result returned by the server, where the query result includes at least one display image in the display image data set that satisfies the display image query request.

[0074] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources. Accordingly, for the front-end node, the image query efficiency is improved.

[0075] Figure 5 A schematic block diagram of a retrieval device according to another embodiment of the present invention. Figure 5 The retrieval device includes:

[0076] The acquisition module 510 acquires search conditions, where the search conditions include structured field search conditions and unstructured data search conditions based on the same object.

[0077] The structured field indexing module 520 performs structured field indexing based on the structured field search condition to obtain a pre-order index result;

[0078] The similarity indexing module 530 performs similarity indexing based on the unstructured data retrieval condition, and determines the unstructured data indexing result from the previous indexing result to generate a retrieval result.

[0079] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources.

[0080] The method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.

[0081] In another implementation of the present invention, the similarity index module is specifically used to: perform vector similarity indexing on the preceding index result based on the feature vector retrieval condition to obtain a first vector similarity index result; and determine the feature vector index result based on the first vector similarity index result.

[0082] In another implementation of the present invention, the similarity index module is specifically used to: perform vector similarity indexing based on feature vector retrieval conditions to obtain a second vector similarity index result; and use the preceding index result to filter the second vector similarity index result to obtain a feature vector index result.

[0083] In another implementation of the present invention, the structured field index module is specifically used to: determine an original similarity index data set; based on the structured field retrieval condition, index in the original similarity index data set to obtain a pre-order index result, wherein the device also includes a computational overhead determination module: based on the original similarity index data set, determine the computational overhead of the vector similarity index.

[0084] In another implementation of the present invention, the vector similarity index includes a first vector similarity index and a second vector similarity index, wherein the similarity index module is specifically used to: determine that the computational overhead of the first vector similarity index is greater than the computational overhead of the second vector similarity index; perform the second vector similarity index based on the feature vector retrieval condition, and determine the feature vector index result from the previous index result.

[0085] In another implementation of the present invention, the similarity index module is also used to: determine the computational overhead of the first vector similarity index based on the first index overhead, wherein the first index overhead indicates the overhead of indexing the pre-order index result in the original similarity index data set; determine the computational overhead of the second vector similarity index based on the second index overhead and the filtering processing overhead, wherein the second index overhead indicates the overhead of indexing the feature vector index result in the pre-order index result, and the filtering processing overhead is the overhead of filtering the second vector similarity index result based on the pre-order index result.

[0086] In another implementation of the present invention, the similarity index module is also used to: determine the computational overhead of the second vector similarity index based on the first index overhead, wherein the first index overhead indicates the overhead of indexing the pre-order index result in the original similarity index data set; determine the computational overhead of the first vector similarity index based on the second index overhead and the filtering processing overhead, wherein the second index overhead indicates the overhead of indexing the feature vector index result in the pre-order index result, and the filtering processing overhead is the overhead of filtering the second vector similarity index result based on the pre-order index result.

[0087] In another implementation of the present invention, the structured field retrieval condition includes a first retrieval condition for the first structured field and a feature vector retrieval condition for the second structured field, wherein the structured field index module is specifically used to: based on the first retrieval condition, perform a first inverted index on the first structured field to obtain a first inverted index result; based on the second structured field retrieval condition, perform a second inverted index on the first inverted index result to obtain a pre-order index result.

[0088] In another implementation of the present invention, the device further includes: a retrieval result generating module: performing row number indexing on the unstructured data index result to obtain at least one object corresponding to the unstructured data index result; and generating a retrieval result including at least one object.

[0089] The device of this embodiment is used to implement the corresponding methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.

[0090] Fig. 6A is a schematic block diagram of a query device according to another embodiment of the present invention; Fig. 6A The query device comprises:

[0091] An acquisition module 610 acquires a query request, wherein the query request includes an object to be queried;

[0092] The search condition generation module 620 generates structured field search conditions and unstructured data search conditions of the object to be searched in response to the query request;

[0093] The sending module 630 sends the structured field search condition and the unstructured data search condition to the server, so that the server performs structured field indexing based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result;

[0094] The receiving module 640 receives the query result based on the feature vector index result returned by the server.

[0095] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources. Accordingly, for the front-end node, query efficiency is improved.

[0096] The method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.

[0097] The device of this embodiment is used to implement the corresponding methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.

[0098] Figure 6B It is a schematic block diagram of a query device according to another embodiment of the present invention. Figure 6B The query device comprises:

[0099] An acquisition module 650 acquires a display image query request, wherein the display image query request includes a to-be-queried image;

[0100] The search condition generation module 660 generates structured field search conditions and unstructured data search conditions for the image to be searched in response to the display image query request;

[0101] The sending module 670 sends the structured field search condition and the unstructured data search condition to the server, so that the server performs structured field indexing in the display image data set based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result;

[0102] The receiving module 680 receives a query result based on the feature vector index result returned by the server, where the query result includes at least one display picture in the display picture data set that satisfies the display picture query request.

[0103] It should be understood that the object can be processed into structured data, semi-structured data or unstructured data. For example, the object can be an object such as a picture, sound or video. For example, the unstructured data can be annotated and have structured data. For example, the unstructured data can be unannotated but its structured data can be determined through identification processing. The structured field retrieval condition is a retrieval condition for the structured data of the object. The object can be structured data, such as attribute information of the object. For example, the structured data can include the size of the picture, the color of the picture, the acquisition time of the picture, the modification time of the picture, the size of the video, the resolution of the video, the encoding method of the video, and the author information of the video. For example, the structured data can also include information related to the client, such as the time when the client initiates the query, the location where the client initiates the query, and the user behavior record in the client. For example, the structured data can also include information input from the client, such as the time, location, price of a specific product, style of a specific product, sales volume of a specific product, brand of a specific product, etc. input from the client. For example, the feature vector retrieval condition is a retrieval condition for unstructured data. For example, the retrieval condition can be a subquery generated by the client based on the query. For example, the structured field search condition may be a part or all of the characteristic fields of the structured data, such as keywords or key words.

[0104] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources. Accordingly, for the front-end node, the image query efficiency is improved.

[0105] The method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.

[0106] The device of this embodiment is used to implement the corresponding methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.

[0107] Figure 6C It is a schematic block diagram of a query device according to another embodiment of the present invention. Figure 6C The query system includes:

[0108] A front-end node 6100 and at least one computing node 6200,

[0109] The front-end node 6100 is used to: obtain a query request, the query request includes an object to be queried; respond to the query request, generate structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried; send the structured field retrieval conditions and unstructured data retrieval conditions to at least one computing node; receive a query result based on an unstructured data index result sent by at least one computing node,

[0110] At least one computing node 6200 is used to: perform structured field indexing based on structured field retrieval conditions to obtain pre-order index results; perform similarity indexing based on unstructured data retrieval conditions to determine unstructured data index results from pre-order index results; and generate query results based on the unstructured data index results.

[0111] Since the pre-order index result is obtained through the structured field index with low computational overhead, the index range is reduced, thereby reducing the computational overhead of the subsequent similarity index based on unstructured data, thereby saving computing resources.

[0112] It should be understood that in each computing node, the vector similarity index can be performed on the pre-order index result based on the feature vector retrieval condition to obtain the vector similarity index result. For example, in response to the feature vector retrieval condition, the same retrieval condition is sent to at least one computing node (for example, multiple computing nodes) via the main computing node or directly, so that the corresponding query engine performs the vector similarity index. For example, in response to the feature vector retrieval condition, different feature vector retrieval conditions are sent to different computing nodes so that the corresponding query engine performs the corresponding vector similarity index, thereby providing the system with flexibility in configuring computing resources. For example, in response to the feature vector retrieval condition, the same or different query conditions are sent to different computing nodes. In one example, the query engines of different computing nodes generate different sub-queries. For example, different computing nodes process according to the sub-query to obtain the processing result of the sub-query. In another example, the main service node processes the processing result of the sub-query to obtain the vector similarity index result. In this way, the amount of calculation of the main service node is reduced. Thus, the separation of functions from the main service node to the computing node is achieved.

[0113] in addition, Figure 2B-Figure 2D The various embodiments described in the corresponding description are also applicable to the Figure 6C .

[0114] In another implementation of the present invention, at least one computing node is a first computing node and a second computing node, the unstructured data retrieval condition is a feature vector retrieval condition, and the front-end node is specifically used to: respond to a query request, generate a structured field retrieval condition and a feature vector retrieval condition for the object to be queried; send the structured field retrieval condition to the first service node, and send the feature vector retrieval condition to the second service node, the first service node is specifically used to: perform structured field indexing based on the structured field retrieval condition to obtain a pre-order index result; send the pre-order index result to the second service node, and the second service node is specifically used to: perform vector similarity indexing based on the feature vector retrieval condition, and determine the unstructured data index result from the pre-order index result; generate a query result based on the unstructured data index result; and return the query result to the front-end node.

[0115] Figure 7 This is a schematic diagram of the structure of an electronic device in another embodiment of the present invention; the electronic device may include:

[0116] One or more processors 701;

[0117] The computer readable medium 702 may be configured to store one or more programs,

[0118] When the one or more programs are executed by the one or more processors, the one or more processors implement the retrieval method described in the above embodiment or the query method described in the above embodiment.

[0119] Figure 8 The hardware structure of the electronic device of another embodiment of the present invention is as follows; Figure 8 As shown, the hardware structure of the electronic device may include: a processor 801 , a communication interface 802 , a computer readable medium 803 and a communication bus 804 .

[0120] The processor 801 , the communication interface 802 , and the computer-readable medium 803 communicate with each other via a communication bus 804 .

[0121] Optionally, the communication interface 802 may be an interface of a communication module.

[0122] The processor 801 may be specifically configured to: obtain a search condition, wherein the search condition includes a structured field search condition and an unstructured data search condition based on the same object; perform a structured field index based on the structured field search condition to obtain a pre-order index result; perform a similarity index based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result, or,

[0123] A query request is obtained, wherein the query request includes an object to be queried; in response to the query request, structured field retrieval conditions and unstructured data retrieval conditions of the object to be queried are generated; the structured field retrieval conditions and unstructured data retrieval conditions are sent to a server, so that the server performs structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result, and performs similarity indexing based on the unstructured data retrieval conditions to determine an unstructured data index result from the pre-order index result; and a query result based on the unstructured data index result returned by the server is received.

[0124] The processor 801 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0125] The computer readable medium 803 can be, but is not limited to, a random access memory medium (RAM), a read-only memory medium (ROM), a programmable read-only memory medium (PROM), an erasable read-only memory medium (EPROM), an electrically erasable read-only memory medium (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.

[0126] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program configured to be used by or in combination with an instruction execution system, an apparatus or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0127] Computer program code configured to perform the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the computer, partially on the computer, as a separate software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0128] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions configured to implement the specified logical function. There are specific sequential relationships in the above-mentioned specific embodiments, but these sequential relationships are only exemplary. When the specific implementation is implemented, these steps may be less, more, or the execution order may be adjusted. That is, in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession 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 flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The modules involved in the embodiments described in this application may be implemented by software or hardware. The names of these modules do not constitute limitations on the modules themselves in some cases.

[0130] As another aspect, the present application further provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in the above embodiments.

[0131] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device: obtains retrieval conditions, and the retrieval conditions include structured field retrieval conditions and unstructured data retrieval conditions based on the same object; performs structured field indexing based on the structured field retrieval conditions to obtain pre-order index results; performs similarity indexing based on the unstructured data retrieval conditions, and determines the unstructured data index results from the pre-order index results, or,

[0132] A query request is obtained, wherein the query request includes an object to be queried; in response to the query request, structured field retrieval conditions and unstructured data retrieval conditions of the object to be queried are generated; the structured field retrieval conditions and unstructured data retrieval conditions are sent to a server, so that the server performs structured field indexing based on the structured field retrieval conditions to obtain a pre-order index result, and performs similarity indexing based on the unstructured data retrieval conditions to determine an unstructured data index result from the pre-order index result; and a query result based on the unstructured data index result returned by the server is received.

[0133] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.

[0134] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.

[0135] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A search method, comprising: Acquire search conditions, where the search conditions include structured field search conditions and unstructured data search conditions based on the same object; Based on the structured field search condition, perform structured field indexing to obtain a pre-order index result; Based on the unstructured data retrieval condition, similarity indexing is performed, and an unstructured data index result is determined from the preceding index result to generate a retrieval result; The performing of similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the preceding index result includes: Based on the feature vector retrieval condition, performing vector similarity indexing on the preceding index result to obtain a first vector similarity index result; Based on the first vector similarity index result, a feature vector index result is determined.

2. The method according to claim 1, wherein: The performing similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the preceding index result includes: Based on the feature vector retrieval condition, vector similarity indexing is performed to obtain a second vector similarity indexing result; The second vector similarity index result is filtered using the preceding index result to obtain a feature vector index result.

3. The method according to claim 1, wherein: The step of performing structured field indexing based on the structured field search condition to obtain a pre-order index result includes: Determine the original similarity index data set; Based on the structured field search condition, indexing in the original similarity index data set to obtain the pre-order index result, wherein the method further comprises: Based on the original similarity index data set, a computational overhead of the vector similarity index is determined.

4. The method according to claim 3, wherein: The vector similarity index includes a first vector similarity index and a second vector similarity index, wherein the similarity indexing is performed based on the unstructured data retrieval condition, and the unstructured data index result is determined from the pre-order index result, including: Determining that a computational overhead of the first vector similarity index is greater than a computational overhead of the second vector similarity index; Based on the feature vector retrieval condition, a second vector similarity index is performed, and a feature vector index result is determined from the preceding index result.

5. The method according to claim 4, wherein: The method further comprises: performing similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the pre-order index result; Determine, based on a first index overhead, a computation overhead of the first vector similarity index, wherein the first index overhead indicates an overhead of indexing in the original similarity index data set to obtain a pre-order index result; Based on the second index overhead and the filtering processing overhead, the computational overhead of the second vector similarity index is determined, wherein the second index overhead indicates the overhead of indexing the feature vector index result in the preceding index result, and the filtering processing overhead is the overhead of filtering the second vector similarity index result based on the preceding index result.

6. The method according to claim 4, wherein: The method further comprises: performing similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the pre-order index result; Determine, based on a first index overhead, a computation overhead of the second vector similarity index, wherein the first index overhead indicates an overhead of indexing in the original similarity index data set to obtain a pre-order index result; Based on the second index overhead and the filtering processing overhead, the computational overhead of the first vector similarity index is determined, wherein the second index overhead indicates the overhead of indexing the feature vector index result in the preceding index result, and the filtering processing overhead is the overhead of filtering the second vector similarity index result based on the preceding index result.

7. The method according to claim 1, wherein: The structured field search condition includes a first search condition for a first structured field and a feature vector search condition for a second structured field, wherein: The step of performing structured field indexing based on the structured field search condition to obtain a pre-order index result includes: Based on the first search condition, performing a first inverted index on the first structured field to obtain a first inverted index result; Based on the second structured field search condition, a second inverted index is performed on the first inverted index result to obtain the pre-order index result.

8. The method according to claim 1, wherein: The method further comprises: Performing row number indexing on the unstructured data index result to obtain at least one object corresponding to the unstructured data index result; A search result including the at least one object is generated.

9. A query method, comprising: Obtaining a query request, wherein the query request includes an object to be queried; In response to the query request, generating structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried; Sending the structured field search condition and the unstructured data search condition to the server, so that the server performs structured field indexing based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result; Receiving a query result based on the unstructured data index result returned by the server; The performing similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the preceding index result includes: Based on the feature vector retrieval condition, performing vector similarity indexing on the preceding index result to obtain a first vector similarity index result; Based on the first vector similarity index result, a feature vector index result is determined.

10. A query method, comprising: Obtaining a display image query request, wherein the display image query request includes a to-be-queried image; In response to the display image query request, generating structured field retrieval conditions and unstructured data retrieval conditions for the image to be queried; Sending the structured field search condition and the unstructured data search condition to the server, so that the server performs structured field indexing in the display image data set based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result; Receiving a query result based on the unstructured data index result returned by the server, the query result including at least one display picture in the display picture data set that satisfies the display picture query request; The performing similarity indexing based on the unstructured data retrieval condition and determining the unstructured data index result from the preceding index result includes: Based on the feature vector retrieval condition, performing vector similarity indexing on the preceding index result to obtain a first vector similarity index result; Based on the first vector similarity index result, a feature vector index result is determined.

11. A query device, comprising: An acquisition module is used to acquire a display image query request, wherein the display image query request includes a to-be-queried image; A retrieval condition generation module, in response to the display image query request, generates structured field retrieval conditions and unstructured data retrieval conditions for the image to be queried; A sending module is configured to send the structured field search condition and the unstructured data search condition to a server, so that the server performs structured field indexing in the display image data set based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine the unstructured data index result from the pre-order index result; A receiving module receives a query result based on the unstructured data index result returned by the server, wherein the query result includes at least one display picture in the display picture data set that satisfies the display picture query request; The sending module is further used to perform vector similarity indexing on the pre-order index result based on the feature vector retrieval condition to obtain a first vector similarity index result; and determine a feature vector index result based on the first vector similarity index result.

12. A retrieval device, comprising: An acquisition module is used to acquire search conditions, wherein the search conditions include structured field search conditions and unstructured data search conditions based on the same object. A structured field indexing module performs structured field indexing based on the structured field search condition to obtain a pre-order index result; A similarity indexing module performs similarity indexing based on the unstructured data retrieval condition, and determines the unstructured data indexing result from the preceding indexing result to generate a retrieval result; The similarity indexing module is further used to perform vector similarity indexing on the preceding indexing result based on a feature vector retrieval condition to obtain a first vector similarity indexing result; and determine a feature vector indexing result based on the first vector similarity indexing result.

13. A query device, comprising: An acquisition module is used to acquire a query request, wherein the query request includes an object to be queried; A search condition generation module, in response to the query request, generates structured field search conditions and unstructured data search conditions for the object to be queried; A sending module is configured to send the structured field search condition and the unstructured data search condition to a server, so that the server performs structured field indexing based on the structured field search condition to obtain a pre-order index result, and performs similarity indexing based on the unstructured data search condition to determine an unstructured data index result from the pre-order index result; A receiving module receives a query result based on the unstructured data index result returned by the server; The sending module is further used to perform vector similarity indexing on the pre-order index result based on the feature vector retrieval condition to obtain a first vector similarity index result; and determine a feature vector index result based on the first vector similarity index result.

14. A query system comprising: A front-end node and at least one compute node, The front-end node is used to: obtain a query request, wherein the query request includes an object to be queried; In response to the query request, generating structured field retrieval conditions and unstructured data retrieval conditions for the object to be queried; Sending the structured field search condition and the unstructured data search condition to the at least one computing node; receiving a query result based on the unstructured data index result sent by the at least one computing node, The at least one computing node is used to: perform structured field indexing based on the structured field search condition to obtain a pre-order index result; Based on the unstructured data retrieval condition, similarity indexing is performed, and an unstructured data index result is determined from the preceding index result; Generate a query result based on the unstructured data index result; The at least one computing node is a first computing node and a second computing node, the unstructured data retrieval condition is a feature vector retrieval condition, The front-end node is specifically used to: respond to the query request and generate the structured field retrieval condition and the feature vector retrieval condition of the object to be queried; sending the structured field search condition to the first computing node, and sending the feature vector search condition to the second computing node, The first computing node is specifically used to: perform structured field indexing based on the structured field search condition to obtain a pre-order index result; Sending the pre-order index result to the second computing node, The second computing node is specifically used to: perform vector similarity indexing based on the feature vector retrieval condition, and determine the unstructured data indexing result from the preceding indexing result; Generate a query result based on the unstructured data index result; The query result is returned to the front-end node.

15. An electronic device, comprising: one or more processors; A computer readable medium configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the retrieval method according to any one of claims 1 to 8 or the query method according to claim 9 or 10.

16. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the program implements the search method according to any one of claims 1 to 8 or the query method according to claim 9 or 10.

Citation Information

Patent Citations

  • Distributed spatial secondary index and range query algorithm based on SPARK

    CN110175175A

  • Executing queries for structured data and not-structured data

    CN110431545A