Hybrid query method of vector data management system

By constructing a proximity graph index that integrates distance metrics in a vector data management system and using MOBO technology to automatically tune parameters, the problem of low efficiency in hybrid query indexing is solved, and efficient hybrid query answering and performance optimization are achieved.

CN120705162AActive Publication Date: 2025-09-26BERGMEIS (SHENZHEN) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511203419.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-26
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

The existing technology has low efficiency in tuning hybrid query index parameters in vector data management systems, and it is difficult to balance attribute filtering and vector similarity search at the same time, resulting in query efficiency and storage usage issues.

Method used

A proximity graph is constructed as a hybrid query index structure using vector and attribute fusion distance metrics. Multi-objective Bayesian optimization is used to automatically tune the hybrid query index parameters. A hybrid query method for vector data management system is designed, which includes index construction and query answering stages. The fusion distance is calculated using a preset balance coefficient and attribute distance metric, and the parameter configuration is optimized in combination with MOBO technology.

Benefits of technology

It significantly improves the performance of hybrid query answering, avoids the storage and computational overhead of vector indexes and attribute indexes, achieves the optimal balance of multiple performance goals, and increases the number of query requests per second and recall rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705162A_ABST
    Figure CN120705162A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a hybrid query method of a vector data management system, which relates to the technical field of artificial intelligence and databases and comprises two stages of index construction and query answering. In the index construction stage, parameters of the mixed query index are automatically optimized according to a historical mixed query request set and a data object set stored in the VDMS, and the mixed query index based on the adjacent graph is constructed by taking data objects stored in the VDMS as nodes based on the optimized parameters. In the query answering stage, each mixed query request submitted by the user online is answered. Each mixed query request is composed of an expected return object number k, an attribute constraint and a query vector, and k data objects which meet the attribute constraint in the mixed query request and are close to the query vector as much as possible are required to be returned. According to the method, the performance of hybrid query answers can be remarkably improved, and the optimal balance point is achieved under the performance target of multiple conflicting hybrid query answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and database technology, and in particular to a hybrid query method for a vector data management system. Background Art

[0002] With the rapid development of artificial intelligence and big data technologies, large-scale information retrieval and machine learning systems have become an integral part of our daily lives and work. One of the key infrastructures behind these systems is the Vector Data Management System (VDMS). VDMS efficiently manages large amounts of vector data by converting multimedia data such as text, images, and audio into embedded vectors. It also provides fast and accurate similarity search services using the Approximate Nearest Neighbor Search (ANNS) technique. Nearest Neighbor Search (NNS) returns the top k known vectors stored in the VDMS that are most similar to a user-specified query vector. To improve search efficiency, ANNS relaxes the constraints on returned results in NNS, returning only the k known vectors that are as similar as possible to the query vector. For example, in an ANNS-based paper retrieval system, users want to find the papers most similar to the query text. This is achieved by converting the unstructured text of each paper and the query text into high-dimensional feature vectors and performing ANNS using vector indices. In reality, pure ANNS approaches still struggle to meet user needs. For example, users want to find data objects that have similar feature vectors to the query object and meet structured attribute constraints such as paper topic, conference, and publication year. This combination of ANNS and attribute constraints is called a hybrid query (HQ). Answering hybrid queries is a key capability requirement for modern VDMSs.

[0003] Currently, there are two main approaches for answering mixed queries internationally. The first method performs attribute filtering first, followed by a vector similarity search. This method is highly efficient during the attribute filtering phase, narrowing the data scope in a relatively short period of time, reducing the amount of data required for the vector similarity search (ANNS), and improving query efficiency. However, this method struggles with using pre-built vector indexes based on all vector data. Vector indexes must be re-established for the filtered vector data, resulting in inefficient ANNS. Pre-building multiple filtered vector data indexes offline consumes excessive memory space, making this method less able to leverage the efficiency advantages of vector indexes. The second method performs a vector similarity search first, followed by attribute filtering. This method only requires attribute filtering on the small number of results returned after the ANNS completes, which is generally more efficient than performing attribute filtering at each step and eliminates the need for additional attribute indexing. However, this method requires returning far more than the k candidate results required by the user to meet the final attribute filtering requirement, reducing ANNS efficiency. Furthermore, the need to maintain both vector and attribute indexes increases storage usage and computational overhead. Given the limitations of the two aforementioned approaches, a third solution is readily available: combining attribute filtering with vector similarity search to construct a hybrid query index. However, designing an appropriate hybrid query index is extremely challenging. Firstly, this approach cannot maintain both vector and attribute indexes simultaneously, instead using a single combined vector and attribute index. This combined index must effectively balance attribute filtering and vector similarity search to support joint pruning during hybrid query answering, minimizing the generation of intermediate candidate results and improving query efficiency. Secondly, this approach must consider multiple factors, such as parameters during the index construction phase and query answering phase, which significantly impact the performance of the hybrid query index. Parameter tuning for a hybrid query index requires balancing multiple objectives, such as the number of queries per second (QPS) and recall. These objectives often conflict with each other; for example, increasing QPS may reduce recall, and vice versa. While hybrid query index parameter tuning can leverage existing techniques in this area, these techniques have various limitations for VDMS hybrid query index parameter tuning. For example, while heuristic strategies such as rule-based and search-based methods are effective in certain situations, they struggle to adapt to the rapid changes and complex parameters of VDMS and are prone to falling into local optimal solutions. Reinforcement learning is effective for high-dimensional parameter tuning, but is inefficient when faced with conflicting objectives and requires extensive offline training data. Overall, existing parameter tuning methods are inefficient in multidimensional parameter spaces and struggle to balance conflicting objectives. Therefore, how to design a hybrid query index structure that can balance attribute filtering and vector similarity search, and automatically tune the hybrid query index parameters to fully utilize the efficiency advantages of the hybrid query index, has become a key issue for the further industrialization of VDMS. Summary of the Invention

[0004] In view of this, the present invention provides a hybrid query method for a vector data management system.

[0005] The specific technical solution of the first embodiment of the present invention is: a hybrid query method for a vector data management system, the method comprising an index construction phase and a query answering phase; the index construction phase automatically tunes the parameters of the hybrid query index based on a historical hybrid query set and a data object set stored in the vector data management system, and constructs a hybrid query index based on the tuned parameters with the data objects stored in the vector data management system as nodes; the query answering phase answers each hybrid query request submitted online by a user using the hybrid query index output by the index construction phase; the index construction phase comprises: obtaining all historical hybrid query requests and all data objects in the vector data management system, each of the historical hybrid query requests is a hybrid query request submitted and saved by the user, and each of the data objects is composed of a vector and multiple attribute values; setting a fusion distance metric of vectors and attributes between different data objects based on a preset balance coefficient, a preset attribute distance metric weight, a vector distance metric between data objects, and an attribute distance metric between data objects, the fusion distance metric being used to calculate the distance between any two data objects; obtaining all tunable parameters and the value range of each tunable parameter, and referring a specific value combination of all the tunable parameters as a hybrid query index parameter. The method comprises the following steps: configuring the number of objects k to be returned, obtaining all evaluation indicators used in the automatic parameter tuning process, invoking the automatic parameter tuning method based on multi-objective Bayesian optimization to determine the optimal hybrid query index parameter configuration, constructing a proximity graph of the data object according to the optimal hybrid query index parameter configuration, and the proximity graph is the hybrid query index output by the index construction phase; the query answering phase comprises the following steps: obtaining the expected number of returned objects k, the query vector and the attribute constraints in the hybrid query request submitted by the user online, using a preset vector distance metric as the distance metric between the vector in the data object and the query vector in the hybrid query request, and comparing the vector in the data object to the query vector in the hybrid query request; The distance from the query vector in the hybrid query request is referred to as the distance between the data object and the query vector; the candidate data object set is iteratively updated in the hybrid query index output in the index construction phase; during the iterative update process, the candidate data object set is always maintained to consist of k data objects; the candidate data object set finally outputted from the iterative update process is referred to as the target data object set; data objects that do not meet the attribute constraints are deleted from the target data object set, the remaining data objects in the target data object set are sorted in ascending order according to the distance from the query vector, and the sorted data object list is returned to the user as the query result.

[0006] In an optional embodiment of the present application, the fusion distance metric is obtained using the following formula:

[0007] in, is the fused distance metric between two data objects, is a preset vector distance metric between two data objects, It is in i The preset attribute distance metric between two data objects on a preset attribute subset, is the preset balance coefficient, is a minimal constant that ensures the denominator is not zero. is the preset number of attribute distance metrics, It is i The weights of the preset attribute distance metrics, Represents a data object With data objects The fusion distance between Represents a data object With data objects The vector distance between Indicates in i Data objects with a preset attribute subset With data objects The attribute distance between them.

[0008] In an optional embodiment of the present application, the automatic parameter tuning method based on multi-objective Bayesian optimization is called to determine the optimal hybrid query index parameter configuration, including: generating a preset number of initial hybrid query index parameter configurations according to the tunable parameters and the value range; the tunable parameters include the preset balance coefficient, the preset attribute distance measurement weight and the maximum number of neighbors per node in the proximity graph; constructing a proximity graph of the data object according to each initial hybrid query index parameter configuration, and based on the proximity graph, using the method of the query answering stage to answer all historical hybrid query requests, obtaining a score vector of all evaluation indicators of each initial hybrid query index parameter configuration, each component in the score vector of all evaluation indicators is the score of an evaluation indicator; using each initial hybrid query index parameter configuration as the input of a training sample and the score vector of all evaluation indicators corresponding to each initial hybrid query index parameter configuration as the output of the corresponding training sample to constitute a training set of a preset probability proxy model, and training the preset probability proxy model; obtaining training The hybrid query index parameter configuration recommended by the preset probabilistic proxy model and the score vector of all the evaluation indicators corresponding thereto are then determined; whether the score vector of all the evaluation indicators corresponding to the recommended hybrid query index parameter configuration meets the preset performance target; if the preset performance target is not met and the number of recommendations by the preset probabilistic proxy model does not exceed the preset recommendation number threshold, the recommended hybrid query index parameter configuration and the score vector of all the evaluation indicators corresponding thereto are added as a training sample to the training set of the preset probabilistic proxy model, and the preset probabilistic proxy model is trained again until the score vector of all the evaluation indicators corresponding to the hybrid query index parameter configuration recommended by the probabilistic proxy model after training meets the preset performance target, or the number of recommendations by the preset probabilistic proxy model is equal to the preset recommendation number threshold, and then the training of the preset probabilistic proxy model is terminated; the parameter configuration that performs best on the preset primary evaluation indicator under the premise of satisfying the preset constraints is selected from the final training set of the preset probabilistic proxy model and set as the optimal hybrid query index parameter configuration.

[0009] In an optional embodiment of the present application, obtaining the hybrid query index parameter configuration recommended by the preset probabilistic proxy model after training and the corresponding score vectors of all evaluation indicators includes: using a standard expected hypervolume improvement as an acquisition function for multi-objective Bayesian optimization to evaluate the degree of improvement of a new hybrid query index parameter configuration on a current Pareto front, where the current Pareto front is composed of all non-dominated score vectors of all evaluation indicators in a training set of the preset probabilistic proxy model, wherein a score vector Y in the training set is called non-dominated if and only if there is no other score vector Z in the training set, all components of Z are not inferior to corresponding components of Y, and Z has at least one component that is superior to the corresponding component of Y; calculating a new hybrid query index parameter configuration that maximizes the expected hypervolume improvement using a preset optimization algorithm, and setting the new hybrid query index parameter configuration as the recommended hybrid query index parameter configuration; constructing a proximity graph for the data object based on the recommended hybrid query index parameter configuration, and answering all historical hybrid query requests based on the proximity graph using the method of the query answering stage to obtain the score vectors of all evaluation indicators corresponding to the recommended hybrid query index parameter configuration.

[0010] In an optional embodiment of the present application, constructing a proximity graph of the data object based on the optimal hybrid query index parameter configuration includes: dividing all N data objects into multiple clusters, each cluster containing close to but no more than M data objects, where M is the maximum number of neighbors per node in the proximity graph in the hybrid query index parameter configuration; setting each data object as a node in the proximity graph; for each data object o, selecting L preset cluster centers with the smallest fusion distance from o from the cluster centers of all clusters, the L cluster centers are called target cluster centers, and the cluster they are in is called the target cluster, and selecting M other data objects with the smallest fusion distance from o from the target cluster as neighbors of o in the proximity graph, that is, adding a directed edge from the node corresponding to o to the nodes corresponding to the M other data objects in the proximity graph; after processing all N data objects as described above, a proximity graph of the data object is obtained.

[0011] In an optional embodiment of the present application, the iterative updating of the candidate data object set in the hybrid query index output in the index construction phase includes: randomly selecting preset m data objects in the hybrid query index output in the index construction phase, where mk is a preset tunable non-negative parameter; dividing the set of m data objects into a first subset and a second subset according to the attribute constraints in the hybrid query request, the first subset consisting of data objects that meet the attribute constraints in the hybrid query request, and the second subset consisting of data objects that do not meet the attribute constraints in the hybrid query request; selecting k data objects with the smallest distance to the query vector in the hybrid query request from the first subset to form a candidate data object set; if the candidate data object set If there are less than k data objects, multiple data objects with the smallest distance to the query vector in the hybrid query request are selected from the second subset, and the candidate data object set is supplemented to k data objects; the candidate data object set is iteratively updated, and the candidate data object set output by the previous iteration is input for each iteration, and the input candidate data object set is updated to k data objects with a smaller distance to the query vector in the hybrid query request as the candidate data object set output by this iteration; when the candidate data object set input by this iteration is equal to the candidate data object set output by this iteration, the iterative update process is terminated, and the candidate data object set input by this iteration is output as the candidate data object set finally output by the iterative update process; otherwise, the candidate data object set is continued to be iteratively updated.

[0012] In an optional embodiment of the present application, each iteration inputs the candidate data object set outputted in the previous iteration, and updates the input candidate data object set to k data objects having a smaller distance to the query vector in the hybrid query request as the candidate data object set outputted in the current iteration, including: calculating, based on the candidate data object set inputted in the current iteration, a union of respective neighbor sets of all data objects in the input candidate data object set in the hybrid query index outputted in the index construction phase, and dividing the union of respective neighbor sets into a first subset and a second subset, the first subset consisting of data objects satisfying the attribute constraints in the hybrid query request, and the second subset consisting of data objects not satisfying the attribute constraints in the hybrid query request; selecting, from the first subset, k data objects having the smallest distance to the query vector in the hybrid query request to constitute the candidate data object set outputted in the current iteration; and if there are fewer than k data objects in the candidate data object set, selecting, from the second subset, multiple data objects having the smallest distance to the query vector in the hybrid query request to supplement the candidate data object set outputted in the current iteration to k data objects.

[0013] The specific technical solution of the second embodiment of the present invention is: a hybrid query device for a vector data management system, including: an index construction module, used to automatically tune the parameters of the hybrid query index based on the historical hybrid query set and the data object set stored in the vector data management system, and build a hybrid query index with the data objects stored in the vector data management system as nodes according to the tuned parameters; a query answering module, used to answer each hybrid query request submitted by the user online using the hybrid query index output in the index construction phase.

[0014] The specific technical solution of the third embodiment of the present invention is: a computer device, including a processor and a memory; the processor is used to execute the computer program stored in the memory to implement the method as described in any one of the first embodiments of the present application.

[0015] The specific technical solution of the fourth embodiment of the present invention is: a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the method described in any one of the first embodiments of the present application.

[0016] The implementation of the present invention will have the following beneficial effects: The present invention uses a proximity graph constructed by fusion of vector and attribute distance metrics as the sole hybrid query index structure, avoiding the storage usage and computational overhead of maintaining both vector and attribute indexes. Furthermore, the MOBO technology automatically optimizes hybrid query index parameters, achieving an optimal balance between multiple conflicting performance targets, such as the number of query requests per second and the recall rate, significantly improving the performance of hybrid query answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A flowchart of the steps of a hybrid query method for a vector data management system; Figure 2 A flowchart of the steps in the index building phase; Figure 3 A flowchart of the steps in the query answering phase; Figure 4 It is a structural diagram of a hybrid query device of a vector data management system; Figure 5 A schematic block diagram of the structure of a computer device; Among them, 901 is an index building module; 902 is a query answering module. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0020] The terms "first," "second," and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not limited to the listed steps or modules but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to the process, method, product, or apparatus.

[0021] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0022] With the rapid development of artificial intelligence and big data technologies, large-scale information retrieval and machine learning systems have become an integral part of our daily lives and work. One of the key infrastructures behind these systems is the Vector Data Management System (VDMS). VDMS efficiently manages large amounts of vector data by converting multimedia data such as text, images, and audio into embedded vectors. It also provides fast and accurate similarity search services through the Approximate Nearest Neighbor Search (ANNS) technique. Nearest Neighbor Search (NNS) returns the top k known vectors stored in the VDMS that are most similar to a user-specified query vector. To improve search efficiency, ANNS relaxes the constraints on returned results in NNS, requiring only the k known vectors that are as similar as possible to the query vector. For example, in an ANNS-based paper retrieval system, users want to find the papers most similar to the query text. This is achieved by converting the unstructured text of each paper and the query text into high-dimensional feature vectors and performing ANNS using vector indices. In reality, pure ANNS approaches still struggle to meet user needs. For example, users want to find data objects that have similar feature vectors to the query object and meet structured attribute constraints such as paper topic, conference, and publication year. This combination of ANNS and attribute constraints is called a hybrid query (HQ). Answering hybrid queries is a key capability requirement for modern VDMSs.

[0023] Currently, there are two main approaches for answering mixed queries internationally. The first method performs attribute filtering first, followed by a vector similarity search. This method is highly efficient during the attribute filtering phase, narrowing the data scope in a relatively short period of time, reducing the amount of data required for the vector similarity search (ANNS), and improving query efficiency. However, this method struggles with using pre-built vector indexes based on all vector data. Vector indexes must be re-established for the filtered vector data, resulting in inefficient ANNS. Pre-building multiple filtered vector data indexes offline consumes excessive memory space, making this method less able to leverage the efficiency advantages of vector indexes. The second method performs a vector similarity search first, followed by attribute filtering. This method only requires attribute filtering on the small number of results returned after the ANNS completes, which is generally more efficient than performing attribute filtering at each step and eliminates the need for additional attribute indexing. However, this method requires returning far more than the k candidate results required by the user to meet the final attribute filtering requirement, reducing ANNS efficiency. Furthermore, the need to maintain both vector and attribute indexes increases storage usage and computational overhead.

[0024] Given the limitations of the two aforementioned approaches, a third solution is readily available: combining attribute filtering with vector similarity search to construct a hybrid query index. However, designing an appropriate hybrid query index is extremely challenging. Firstly, this approach cannot maintain both vector and attribute indexes simultaneously, instead using a single combined vector and attribute index. This combined index must effectively balance attribute filtering and vector similarity search to support joint pruning during hybrid query answering, minimizing the generation of intermediate candidate results and improving query efficiency. Secondly, this approach must consider multiple factors, such as parameters during the index construction phase and query answering phase, which significantly impact the performance of the hybrid query index. Parameter tuning for a hybrid query index requires balancing multiple objectives, such as the number of queries per second (QPS) and recall. These objectives often conflict with each other; for example, increasing QPS may reduce recall, and vice versa. While hybrid query index parameter tuning can leverage existing techniques in this area, these techniques have various limitations for VDMS hybrid query index parameter tuning. For example, heuristic strategies such as rule-based and search-based methods, while effective in specific situations, are difficult to adapt to the rapid changes and complex parameters of VDMS and are prone to falling into local optimal solutions. Reinforcement learning is effective in high-dimensional parameter tuning, but is inefficient when faced with conflicting objectives and requires large amounts of data for offline training. Overall, existing parameter tuning methods are inefficient in multidimensional parameter spaces and have difficulty balancing conflicting objectives. Therefore, how to design a hybrid query index structure that can balance attribute filtering and vector similarity search, and automatically tune the hybrid query index parameters to fully leverage the efficiency advantages of the hybrid query index, has become a key issue for the further industrialization of VDMS.

[0025] This embodiment proposes a hybrid query method for a vector data management system to give full play to the efficiency advantage of hybrid query index. Figure 1 ,The method includes an index building phase and a query answering phase; Step 101: The index construction phase automatically optimizes the parameters of the hybrid query index based on the historical hybrid query set and the data object set stored in the vector data management system, and constructs the hybrid query index based on the optimized parameters using the data objects stored in the vector data management system as nodes. Step 102: In the query answering phase, each hybrid query request submitted online by the user is answered using the hybrid query index outputted in the index building phase.

[0026] See also Figure 2 , the index building phase includes: Step 201: Acquire all historical mixed query requests and all data objects in the vector data management system, where each historical mixed query request is a mixed query request submitted and saved by a user, and each data object consists of a vector and multiple attribute values.

[0027] Specifically, a set of historical hybrid query requests is obtained from the VDMS. This set includes hybrid query requests submitted by users online. Each hybrid query request consists of the expected number of returned objects, a query vector, and attribute constraints. A set of data objects is also obtained from the VDMS. This set includes all data objects stored in the VDMS. Each data object consists of a vector and multiple attribute-value pairs.

[0028] Step 202: Set a fusion distance metric of vectors and attributes between different data objects based on a preset balance coefficient, a preset attribute distance metric weight, a vector distance metric between data objects, and an attribute distance metric between data objects. The fusion distance metric is used to calculate the distance between any two data objects.

[0029] Specifically, the method in this embodiment constructs a hybrid query index based on a proximity graph. The core of this index is the proximity graph, which consists of nodes and directed edges. Each node is a data object stored in the VDMS, and each data object consists of a vector and multiple attribute value pairs. Each node in the proximity graph emits at most M directed edges (referred to as edges). The endpoints of a directed edge are called neighbors, where M is a preset, tunable parameter. Each edge in the proximity graph is associated with a real value representing the distance between the two nodes. This distance is calculated by combining a preset single vector distance metric with multiple attribute distance metrics. The vector distance metric reflects the distance between two data objects in vector space, while the attribute distance metric reflects the distance between the values ​​of two data objects on a subset of attributes. Each attribute distance metric consists of a preset attribute subset and a distance metric applicable to that attribute subset, returning a real value between 0 and 1. For example, a simple attribute distance metric can be defined on a single attribute A and returns the result of a numerical comparison of two data objects on attribute A: 0 if the values ​​of attribute A are the same, and 1 otherwise.

[0030] Step 203: Obtain all tunable parameters and the value range of each tunable parameter, and call a specific value combination of all the tunable parameters a hybrid query index parameter configuration; obtain all evaluation indicators used in the automatic parameter tuning process; call the automatic parameter tuning method based on multi-objective Bayesian optimization to determine the optimal hybrid query index parameter configuration.

[0031] Specifically, obtain the tunable parameters and their value ranges, including the parameters of the basic ANNS algorithm and the balance coefficient in the fusion distance formula. , attribute distance measurement weight ,…, The specific value combinations of these tunable parameters are called hybrid query index parameter configurations, or simply parameter configurations. Pre-set evaluation metrics applicable to all parameter configurations are obtained, such as the number of queries per second (QPS) and recall (indicating the percentage of k-nearest neighbor data objects of the query vector that meet the attribute constraints in the set of k returned data objects). An automatic parameter tuning method based on Multi-Objective Bayesian Optimization (MOBO) is used to determine the optimal hybrid query index parameter configuration.

[0032] Step 204: construct a proximity graph of the data object according to the optimal hybrid query index parameter configuration. The proximity graph is the hybrid query index outputted in the index construction phase.

[0033] The basic ANNS algorithm is adapted according to the optimal parameter configuration to construct a proximity graph of all data object sets in the VDMS as the final output hybrid query index.

[0034] See also Figure 3 , the query answering stage includes: Step 301: Obtain the expected number of returned objects k, the query vector, and the attribute constraints in the hybrid query request submitted online by the user.

[0035] Specifically, after the hybrid query index is built, the VDMS can answer hybrid query requests submitted online by users based on the hybrid query index. A hybrid query request consists of the desired number of returned objects (k), a query vector, and attribute constraints. Specifically, the VDMS retrieves the query vector and attribute constraints from the hybrid query request submitted by the user and answers the hybrid query request based on the hybrid query index.

[0036] Step 302: Use a preset vector distance metric as the distance metric between the vector in the data object and the query vector in the hybrid query request, and refer to the distance between the vector in the data object and the query vector in the hybrid query request as the distance between the data object and the query vector.

[0037] Step 303: Iteratively update the candidate data object set in the hybrid query index output in the index construction phase; during the iterative update process, the candidate data object set is always maintained to consist of k data objects; the candidate data object set finally outputted in the iterative update process is called the target data object set.

[0038] Specifically, an iterative proximity graph local search process is entered, where the input of each iteration is the output of the previous iteration or the initial object set, and the output is an object set that better meets the hybrid query request.

[0039] Step 304: Delete data objects that do not meet the attribute constraints from the target data object set, sort the remaining data objects in the target data object set from small to large according to their distance from the query vector, and return the sorted data object list to the user as the query result.

[0040] Specifically, data objects that meet the attribute constraints are selected from the output object set of the last iteration, sorted from small to large according to the distance to the query vector, and the sorted data object list is returned to the user as the query result.

[0041] In a specific embodiment, the fusion distance metric is obtained using the following formula:

[0042] in, is the fused distance metric between two data objects, is a preset vector distance metric between two data objects, It is in i The preset attribute distance metric between two data objects on a preset attribute subset, is the preset balance coefficient, is a minimal constant that ensures the denominator is not zero. is the preset number of attribute distance metrics, It is i The weights of the preset attribute distance metrics, Represents a data object With data objects The fusion distance between Represents a data object With data objects The vector distance between Indicates in i Data objects with a preset attribute subset With data objects The attribute distance between , ,…, These are all included in the subsequent automatic tuning parameters.

[0043] In a specific embodiment, the calling of an automatic parameter tuning method based on multi-objective Bayesian optimization to determine an optimal hybrid query index parameter configuration includes: Step 401: Generate a preset number of initial hybrid query index parameter configurations based on the tunable parameters and the value range; the tunable parameters include the preset balance coefficient, the preset attribute distance metric weight, and the maximum number of neighbors per node in the proximity graph.

[0044] Step 402: construct a proximity graph of the data object according to each of the initial hybrid query index parameter configurations, and based on the proximity graph, use the method of the query answering stage to answer all the historical hybrid query requests, and obtain a score vector of all the evaluation indicators of each of the initial hybrid query index parameter configurations, where each component in the score vector of all the evaluation indicators is the score of an evaluation indicator.

[0045] Specifically, a preset number of initial hybrid query index parameter configurations are generated. For each parameter configuration, the vector distance metric in the basic ANNS algorithm is replaced with a vector and attribute fusion distance metric. The improved basic ANNS algorithm is called to construct a hybrid query index based on a proximity graph, and each hybrid query request in a set of historical hybrid query requests is answered based on the index, obtaining a score vector of all evaluation indicators for each initial hybrid query index parameter configuration.

[0046] Step 403: Take each of the initial mixed query index parameter configurations as the input of a training sample and the score vectors of all the evaluation indicators corresponding to each initial mixed query index parameter configuration as the output of the corresponding training sample to form a training set of the preset probabilistic proxy model, and train the preset probabilistic proxy model.

[0047] Specifically, the initial hybrid query index parameter configuration is used as the independent variable (X) of the initial sampled dataset, and the corresponding evaluation metric score vector is used as the dependent variable (Y). The initial sampled dataset is used to train a pre-set probabilistic surrogate model (hereinafter referred to as the surrogate model). The surrogate model can use a Gaussian process (GP) or random forest (RF) to predict the score vector of the evaluation metric for the given parameter configuration.

[0048] Step 404: Obtain the hybrid query index parameter configuration recommended by the preset probabilistic proxy model after training and the corresponding score vectors of all evaluation indicators.

[0049] Specifically, a hybrid query index based on a proximity graph is constructed using the new parameter configuration recommended by the preset probabilistic proxy model after training, and each hybrid query request in a set of historical hybrid query requests is answered based on the index, and a score vector of the evaluation index of the new parameter configuration is calculated.

[0050] Step 405: Determine whether the score vectors of all evaluation indicators corresponding to the recommended hybrid query index parameter configuration meet preset performance targets.

[0051] Specifically, the preset performance indicators include but are not limited to the number of query requests per second or the recall rate.

[0052] Step 406: If the preset performance target is not met and the number of recommendations of the preset probabilistic proxy model does not exceed the preset recommendation number threshold, the recommended hybrid query index parameter configuration and its corresponding score vector of all evaluation indicators are added as a training sample to the training set of the preset probabilistic proxy model, and the preset probabilistic proxy model is trained again until the score vector of all evaluation indicators corresponding to the hybrid query index parameter configuration recommended by the probabilistic proxy model after training meets the preset performance target, or the number of recommendations of the preset probabilistic proxy model is equal to the preset recommendation number threshold, and then the training of the preset probabilistic proxy model is terminated.

[0053] Specifically, the new parameter configuration and its corresponding preset evaluation index value are added to the sampling data set, and the proxy model is retrained using the sampling data set until the score vector of all the evaluation indicators corresponding to the hybrid query index parameter configuration recommended by the probabilistic proxy model after training meets the preset performance target, or the number of recommendations of the preset probabilistic proxy model is equal to the preset recommendation number threshold, and the training of the preset probabilistic proxy model is terminated.

[0054] Step 407: Select the parameter configuration that performs best on the preset primary evaluation indicator while satisfying the preset constraints from the final training set of the preset probabilistic proxy model, and set it as the optimal hybrid query index parameter configuration.

[0055] Specifically, the optimal hybrid query index parameter configuration is selected as the one that performs best on a preset primary evaluation indicator such as recall rate while satisfying preset constraints such as QPS not being lower than a preset threshold.

[0056] In a specific embodiment, the step of obtaining the hybrid query index parameter configuration recommended by the preset probabilistic proxy model after training and the corresponding score vectors of all evaluation indicators includes: Step 501: Use the standard expected hypervolume improvement as the acquisition function of the multi-objective Bayesian optimization to evaluate the degree of improvement of a new hybrid query index parameter configuration on the current Pareto front, where the current Pareto front is composed of all non-dominated score vectors of all evaluation indicators in the training set of the preset probabilistic proxy model, and the score vector Y in the training set is called non-dominated if and only if there is no other score vector Z in the training set, all components of Z are not inferior to the corresponding components of Y, and Z has at least one component that is better than the corresponding component of Y.

[0057] Step 502: Calculate a new hybrid query index parameter configuration that maximizes the expected hypervolume improvement using a preset optimization algorithm, and set the new hybrid query index parameter configuration as the recommended hybrid query index parameter configuration.

[0058] Specifically, the expected hypervolume improvement (EHVI) is used as the acquisition function of MOBO to evaluate the improvement degree of a new parameter configuration on the current Pareto Frontier.

[0059] EHVI evaluates the value of a new parameter configuration by calculating the increase in hypervolume that may be brought about. The specific calculation formula is:

[0060] in, is the hypervolume function, is the reference point, usually set to the minimum value of the current Pareto frontier. is the performance set of all current non-dominated solutions, is the new parameter configuration predicted by the surrogate model The performance distribution of Indicates the target space, with reference point As the benchmark, and the non-dominated solution set In multi-objective optimization, a solution It is called a non-dominated solution if and only if there is no other solution , making Not inferior to , and outperforms at least one objective When applying the above calculation formula, first calculate the hypervolume of all current non-dominated solutions , and then use the surrogate model to predict the new parameter configuration Performance distribution , and finally in the performance distribution The EHVI value of the new parameter configuration is estimated by Monte Carlo Integration based on random sampling.

[0061] The EHVI maximization problem is defined as an optimization problem:

[0062] in, It is the parameter space determined by the tunable parameters and their value ranges. Using optimization algorithms such as stochastic gradient descent to solve the above optimization problem, the recommended parameter configuration can be obtained. .

[0063] Step 503: Construct a proximity graph of the data object according to the recommended hybrid query index parameter configuration, and based on the proximity graph, use the method of the query answering stage to answer all the historical hybrid query requests, and obtain the score vector of all the evaluation indicators corresponding to the recommended hybrid query index parameter configuration.

[0064] Specifically, a hybrid query index based on a proximity graph is constructed using the recommended hybrid query index parameter configuration, and each hybrid query request in a set of historical hybrid query requests is answered based on the index, and a score vector of all evaluation indicators of the recommended hybrid query index parameter configuration is calculated.

[0065] During MOBO, the performance of parameter configuration needs to be evaluated multiple times, and each performance evaluation requires building a hybrid query index corresponding to the parameter configuration and answering historical hybrid query requests based on the built index. During each performance evaluation process, the construction of the proximity graph is the most time-consuming part. Since the key to the construction of the proximity graph is to determine the neighbor set of each data object node, and determining the neighbor set requires calculating the fusion distance between each data object node and all other data object nodes and selecting the M neighbors with the smallest fusion distance, the time complexity of the proximity graph construction is O(N 2 M), where N is the number of data objects and M is the maximum number of neighbors per node in the tunable proximity graph.

[0066] In order to speed up the construction of multiple proximity graphs, a proximity graph of the data object is constructed according to a hybrid query index parameter configuration, including: Step 601: Divide all N data objects into multiple clusters, each cluster containing approximately but no more than M data objects, where M is the maximum number of neighbors per node in the proximity graph in the hybrid query index parameter configuration.

[0067] Specifically, all N data objects stored in the VDMS are divided into approximately N / M clusters, and each cluster contains close to but no more than M data objects. The division result needs to satisfy the requirement that the fusion distance value of data objects in the same cluster is as small as possible, and the fusion distance value of data objects in different clusters is as large as possible. This step can be implemented by using a cluster partitioning algorithm with partition balance constraints and partition size restrictions, such as a constrained k-center algorithm (such as the k-means algorithm and the k-center point algorithm) or the Metis algorithm based on multilevel graph partitioning. This embodiment does not impose restrictions on the cluster partitioning algorithm. According to the time complexity of the k-means algorithm, the time complexity of this step is O(N 2 / M) level.

[0068] Step 602: Set each of the data objects as a node of a proximity graph.

[0069] Step 603: For each data object o, select the preset L cluster centers with the smallest fusion distance to o from the cluster centers of all clusters. The L cluster centers are called target cluster centers, and the cluster in which they are located is called target cluster. M other data objects with the smallest fusion distance to o are selected from the target cluster as neighbors of o in the proximity graph, that is, add directed edges from the node corresponding to o to the nodes corresponding to the M other data objects in the proximity graph.

[0070] Specifically, for each data object o stored in the VDMS, select L cluster centers closest to o from the cluster centers obtained in the first step, and select M data objects closest to o from the clusters where these cluster centers are located as neighbors of o in the neighbor graph, where L is a tunable integer parameter introduced in the two-step construction method. For each data object o, this step requires calculating the fusion distance between o and approximately N / M cluster centers, and selecting L cluster centers with the smallest fusion distance. The time complexity of the above operation is O(NL / M). In addition, this step also requires selecting M data objects closest to o from the clusters where these L cluster centers are located. The time complexity of the above operation is O(LM). 2 ) level. Therefore, the overall time complexity is O(N 2 L / M+NLM 2 )level.

[0071] Step 604: After processing all N data objects as described above, a proximity graph of the data objects is obtained.

[0072] The cumulative time complexity of the above steps is still O(N 2 L / M+NLM 2 ) level. Compared with the time complexity of the neighboring graph construction before optimization, O(N 2Compared with the M level, the construction method proposed in this embodiment reduces the time complexity of neighbor graph construction to O(N 2 L / M+NLM 2 ) level, where N is much larger than M and L, thus significantly reducing the construction time of the proximity graph and improving the efficiency of MOBO.

[0073] In a specific embodiment, the iterative updating of the candidate data object set in the hybrid query index outputted in the index building phase includes: Step 701: randomly select m preset data objects from the hybrid query index outputted in the index building phase, where mk is a preset tunable non-negative parameter.

[0074] Specifically, m data objects are randomly selected from the core neighborhood graph of the hybrid query index, where mk is a preset non-negative parameter that encourages the initial object set to include more data objects that satisfy the attribute constraints. Since the query answering phase also occurs in the MOBO process, mk is also included in the automatically tuned parameters.

[0075] Step 702: Divide the set of m data objects into a first subset and a second subset according to the attribute constraints in the hybrid query request, wherein the first subset is composed of data objects that satisfy the attribute constraints in the hybrid query request, and the second subset is composed of data objects that do not satisfy the attribute constraints in the hybrid query request.

[0076] Specifically, m randomly selected data objects are divided into two subsets, the first subset satisfies the attribute constraint, and the second subset does not satisfy the attribute constraint.

[0077] Step 703: Select k data objects with the shortest distance to the query vector in the hybrid query request from the first subset to form a candidate data object set; if the number of data objects in the candidate data object set is less than k, select multiple data objects with the shortest distance to the query vector in the hybrid query request from the second subset to supplement the candidate data object set to k data objects.

[0078] Specifically, k data objects closest to the query vector are selected from the first subset. Only when the number p of selected data objects is less than k, kp data objects closest to the query vector are selected from the second subset, ultimately forming a candidate data object set with k elements.

[0079] Step 704: Iteratively update the candidate data object set. Each iteration inputs the candidate data object set output by the previous iteration, and updates the input candidate data object set to k data objects with a smaller distance to the query vector in the hybrid query request as the candidate data object set output by this iteration.

[0080] Specifically, each iteration will make fine adjustments based on the previous results, so that the candidate data set gradually converges to the global optimal solution.

[0081] Step 705: When the candidate data object set input in this iteration is equal to the candidate data object set output in this iteration, the iterative update process ends and the candidate data object set input in this iteration is output as the candidate data object set finally output in the iterative update process; otherwise, the iterative update of the candidate data object set continues.

[0082] In a specific embodiment, each iteration inputs the candidate data object set outputted in the previous iteration, and updates the input candidate data object set to k data objects having a smaller distance to the query vector in the hybrid query request as the candidate data object set outputted in the current iteration, including: Step 801: Based on the candidate data object set input in this iteration, calculate the union of the respective neighbor sets of all data objects in the input candidate data object set in the hybrid query index output in the index construction phase, and divide the union of the respective neighbor sets into a first subset and a second subset, the first subset consisting of data objects that meet the attribute constraints in the hybrid query request, and the second subset consisting of data objects that do not meet the attribute constraints in the hybrid query request.

[0083] Specifically, the union of neighbor sets of all data objects in the input object set is considered, and the data objects in the union are divided into two subsets, the first subset satisfies the attribute constraint, and the second subset does not satisfy the attribute constraint.

[0084] Step 802: Select k data objects with the shortest distance to the query vector in the hybrid query request from the first subset to form the candidate data object set outputted in this iteration; if there are less than k data objects in the candidate data object set, select multiple data objects with the shortest distance to the query vector in the hybrid query request from the second subset to supplement the candidate data object set outputted in this iteration to k data objects.

[0085] Specifically, the k data objects closest to the query vector are selected from the first subset. Only if the number of selected data objects, p, is less than k, the kp data objects closest to the query vector are selected from the second subset, ultimately forming an output object set with k elements. If the output object set of this iteration is equal to the input object set, the iteration stops; otherwise, the next iteration continues.

[0086] In summary, the present invention proposes a hybrid query method by extending the existing proximity graph (PG)-based ANNS algorithm. The key point of this method is to introduce a joint vector and attribute index structure based on the proximity graph. The distance metric between any two nodes in the proximity graph is defined by fusing a preset single vector distance metric with multiple attribute distance metrics. This constructs a hybrid query index based on the proximity graph, where each preset attribute distance metric reflects the distance between two data objects on a subset of attributes. In this index, each node in the proximity graph represents a data object, and the edges between nodes reflect the distance between data objects. Each data object consists of a vector and multiple attribute value pairs. This method uses the proximity graph constructed using the fused vector and attribute distance metric as the sole hybrid query index structure. Using MOBO technology, the hybrid query index parameters are automatically tuned, significantly improving the performance of hybrid query answers and achieving an optimal balance between multiple conflicting performance objectives, such as the number of queries per second and recall rate.

[0087] In a specific embodiment, the present invention relates to alternative technical details including: selection of a basic ANNS algorithm, selection of a vector distance metric, selection of an attribute distance metric, selection of an evaluation metric in MOBO, selection of a probabilistic proxy model in MOBO, selection of an algorithm for solving the EHVI maximization problem, definition of a MOBO termination condition, and selection of a clustering algorithm in the two-step proximity graph construction method. The specific selection of any of these technical details does not deviate from the technical framework and process defined by the present invention and, therefore, should not be considered to exceed the technical protection scope of the present invention.

[0088] In the specific embodiment, see Figure 4 , which is a schematic structural diagram of a hybrid query device of a vector data management system in this embodiment, including: An index construction module 901 is configured to automatically optimize the parameters of a hybrid query index based on a historical hybrid query set and a set of data objects stored in a vector data management system, and to construct a hybrid query index based on the optimized parameters using the data objects stored in the vector data management system as nodes. The query answering module 902 is configured to answer each hybrid query request submitted online by the user using the hybrid query index outputted in the index building phase.

[0089] In a specific embodiment, the third embodiment of the present application provides a computer device, including a processor and a memory; the processor is used to execute a computer program stored in the memory to implement any method described in the first embodiment of the present application.

[0090] Figure 5FIG1 shows an internal structure diagram of a computer device in an embodiment. The computer device can be a terminal or a server. Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the string retrieval method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the string retrieval method. It will be understood by those skilled in the art that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0091] In a specific embodiment, the fourth embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in any one of the first embodiments of the present application.

[0092] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

[0093] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any person skilled in the art may utilize the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes for application in other fields. However, any simple modification, equivalent change, and modification of the above embodiments made in accordance with the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A hybrid query method for a vector data management system, characterized in that: The method includes an index construction phase and a query answering phase; the index construction phase automatically tunes the parameters of the hybrid query index based on a historical hybrid query set and a data object set stored in a vector data management system, and constructs a hybrid query index based on the tuned parameters using the data objects stored in the vector data management system as nodes; The query answering stage answers each hybrid query request submitted online by the user using the hybrid query index output by the index building stage; The index building phase includes: Acquire all historical mixed query requests and all data objects in the vector data management system, where each historical mixed query request is a mixed query request submitted and saved by a user, and each data object consists of a vector and multiple attribute values; A fusion distance metric of vectors and attributes between different data objects is set according to a preset balance coefficient, a preset attribute distance metric weight, a vector distance metric between data objects, and an attribute distance metric between data objects, wherein the fusion distance metric is used to calculate the distance between any two data objects; Obtain all tunable parameters and the value range of each tunable parameter, and refer to a specific value combination of all tunable parameters as a hybrid query index parameter configuration; obtain all evaluation indicators used in the automatic parameter tuning process; and call an automatic parameter tuning method based on multi-objective Bayesian optimization to determine the optimal hybrid query index parameter configuration; Constructing a proximity graph of the data object according to the optimal hybrid query index parameter configuration, wherein the proximity graph is the hybrid query index outputted in the index construction phase; The query answering stage includes: Obtain the expected number of returned objects k, query vector, and attribute constraints in the hybrid query request submitted by the user online; Using a preset vector distance metric as a distance metric between the vector in the data object and the query vector in the hybrid query request, and simply referring the distance between the vector in the data object and the query vector in the hybrid query request as the distance between the data object and the query vector; Iteratively updating a candidate data object set in the hybrid query index outputted in the index building phase; during the iterative updating process, the candidate data object set is always maintained to consist of k data objects; the candidate data object set outputted at the end of the iterative updating process is referred to as a target data object set; Data objects that do not meet the attribute constraints are deleted from the target data object set, the remaining data objects in the target data object set are sorted in ascending order of distance from the query vector, and the sorted data object list is returned to the user as a query result.

2. The hybrid query method for a vector data management system according to claim 1, characterized in that: The fusion distance metric is obtained using the following formula: in, is the fused distance metric between two data objects, is a preset vector distance metric between two data objects, It is in i The preset attribute distance metric between two data objects on a preset attribute subset, is the preset balance coefficient, is a minimal constant that ensures the denominator is not zero. is the preset number of attribute distance metrics, It is i The weights of the preset attribute distance metrics, Represents a data object With data objects The fusion distance between Represents a data object With data objects The vector distance between Indicates in i Data objects with a preset attribute subset With data objects The attribute distance between them.

3. The hybrid query method for a vector data management system according to claim 1, characterized in that: The calling of an automatic parameter tuning method based on multi-objective Bayesian optimization to determine the optimal hybrid query index parameter configuration includes: Generating a preset number of initial hybrid query index parameter configurations according to the tunable parameters and the value range; the tunable parameters include the preset balance coefficient, the preset attribute distance metric weight, and the maximum number of neighbors per node in the proximity graph; Constructing a proximity graph for the data object according to each of the initial hybrid query index parameter configurations, and answering all of the historical hybrid query requests based on the proximity graph using the method of the query answering stage to obtain a score vector of all of the evaluation indicators for each of the initial hybrid query index parameter configurations, wherein each component of the score vector of all of the evaluation indicators is a score of one evaluation indicator; Each of the initial hybrid query index parameter configurations is used as the input of a training sample, and the score vectors of all the evaluation indicators corresponding to each initial hybrid query index parameter configuration are used as the output of the corresponding training sample to form a training set of a preset probabilistic proxy model, and train the preset probabilistic proxy model; Obtaining the hybrid query index parameter configuration recommended by the preset probabilistic proxy model after training and the corresponding score vectors of all the evaluation indicators; Determining whether the score vectors of all the evaluation indicators corresponding to the recommended hybrid query index parameter configuration meet preset performance targets; If the preset performance target is not met and the number of recommendations of the preset probabilistic proxy model does not exceed the preset recommendation number threshold, the recommended hybrid query index parameter configuration and its corresponding score vector of all evaluation indicators are added as a training sample to the training set of the preset probabilistic proxy model, and the preset probabilistic proxy model is trained again until the score vector of all evaluation indicators corresponding to the hybrid query index parameter configuration recommended by the probabilistic proxy model after training meets the preset performance target, or the number of recommendations of the preset probabilistic proxy model is equal to the preset recommendation number threshold, and then the training of the preset probabilistic proxy model is terminated; A parameter configuration that performs best on a preset primary evaluation indicator while satisfying preset constraints is selected from the final training set of the preset probabilistic proxy model and is set as the optimal hybrid query index parameter configuration.

4. The hybrid query method for a vector data management system according to claim 3, characterized in that: The obtaining of the hybrid query index parameter configuration recommended by the preset probabilistic proxy model after training and the corresponding score vectors of all evaluation indicators includes: Using a standard expected hypervolume improvement as an acquisition function for multi-objective Bayesian optimization to evaluate the degree to which a new hybrid query index parameter configuration improves a current Pareto frontier, where the current Pareto frontier is composed of all non-dominated score vectors of all evaluation metrics in a training set of the preset probabilistic proxy model, where a score vector Y in the training set is called non-dominated if and only if there is no other score vector Z in the training set, all components of Z are not inferior to corresponding components of Y, and at least one component of Z is superior to the corresponding component of Y; Calculating a new hybrid query index parameter configuration that maximizes the expected hypervolume improvement using a preset optimization algorithm, and setting the new hybrid query index parameter configuration as the recommended hybrid query index parameter configuration; According to the recommended hybrid query index parameter configuration, a proximity graph of the data object is constructed, and based on the proximity graph, all historical hybrid query requests are answered using the method of the query answering stage to obtain a score vector of all the evaluation indicators corresponding to the recommended hybrid query index parameter configuration.

5. The hybrid query method for a vector data management system according to any one of claim 1, claim 3 or claim 4, wherein: The constructing a proximity graph of the data object according to the optimal hybrid query index parameter configuration includes: Divide all N data objects into multiple clusters, each cluster containing approximately but no more than M data objects, where M is the maximum number of neighbors per node in the proximity graph in the hybrid query index parameter configuration; setting each of the data objects as a node of a proximity graph; For each data object o, select the preset L cluster centers with the smallest fusion distance to o from the cluster centers of all clusters. The L cluster centers are called target cluster centers, and the cluster they belong to is called the target cluster. M other data objects with the smallest fusion distance to o are selected from the target cluster as neighbors of o in the proximity graph. That is, a directed edge from the node corresponding to o to the nodes corresponding to the M other data objects is added to the proximity graph. After all N data objects are processed as described above, a proximity graph of the data objects is obtained.

6. The hybrid query method for a vector data management system according to claim 1, characterized in that: The iterative updating of the candidate data object set in the hybrid query index outputted in the index building phase includes: Randomly select m preset data objects from the hybrid query index output in the index building phase, where mk is a preset tunable non-negative parameter; dividing the set of m data objects into a first subset and a second subset according to the attribute constraint in the hybrid query request, wherein the first subset consists of data objects that satisfy the attribute constraint in the hybrid query request, and the second subset consists of data objects that do not satisfy the attribute constraint in the hybrid query request; Selecting k data objects with the smallest distance to the query vector in the hybrid query request from the first subset to form a candidate data object set; if the number of data objects in the candidate data object set is less than k, selecting multiple data objects with the smallest distance to the query vector in the hybrid query request from the second subset to supplement the candidate data object set to k data objects; Iteratively updating the candidate data object set, inputting the candidate data object set outputted by the previous iteration in each iteration, and updating the input candidate data object set to k data objects having a smaller distance to the query vector in the hybrid query request as the candidate data object set outputted by this iteration; When the candidate data object set input in this iteration is equal to the candidate data object set output in this iteration, the iterative update process ends and the candidate data object set input in this iteration is output as the candidate data object set finally output in the iterative update process; otherwise, the candidate data object set continues to be iteratively updated.

7. The hybrid query method for a vector data management system according to claim 6, characterized in that: Each iteration inputs the candidate data object set outputted in the previous iteration, and updates the input candidate data object set to k data objects having a smaller distance to the query vector in the hybrid query request as the candidate data object set outputted in this iteration, including: Based on the candidate data object set input in this iteration, calculating the union of the respective neighbor sets of all data objects in the input candidate data object set in the hybrid query index output in the index construction phase, and dividing the union of the respective neighbor sets into a first subset and a second subset, where the first subset consists of data objects that meet the attribute constraints in the hybrid query request, and the second subset consists of data objects that do not meet the attribute constraints in the hybrid query request; Select k data objects with the shortest distance to the query vector in the hybrid query request from the first subset to form the candidate data object set outputted in this iteration; if the number of data objects in the candidate data object set is less than k, select multiple data objects with the shortest distance to the query vector in the hybrid query request from the second subset to supplement the candidate data object set outputted in this iteration to k data objects.

8. A hybrid query device for a vector data management system, characterized in that: include: An index construction module, configured to automatically tune the parameters of a hybrid query index based on a historical hybrid query set and a set of data objects stored in a vector data management system, and to construct a hybrid query index based on the tuned parameters using the data objects stored in the vector data management system as nodes; The query answering module is used to answer each hybrid query request submitted by the user online using the hybrid query index outputted in the index building phase.

9. A computer device, characterized in that: including processor and memory; The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Approximate query processing method for solving concept drift based on incremental learning

    CN117931892A

  • Method and System for Multi-Tier Image Matching in a Mixed Media Environment

    US20060262976A1

  • Custom named entities and tags for natural language search query processing

    US20210149901A1