US 12,339,853 B2
Data query apparatus, method, and storage medium
Chao Xie, San Francisco, CA (US); Bolong Zheng, Shanghai (CN); Qi Hu, Shanghai (CN); and Ziyang Yue, Shanghai (CN)
Assigned to STARLORD (CAYMAN) LIMITED, Grand Cayman (KY)
Filed by STARLORD (CAYMAN) LIMITED, Grand Cayman (KY)
Filed on Sep. 13, 2022, as Appl. No. 17/931,671.
Prior Publication US 2024/0086408 A1, Mar. 14, 2024
Int. Cl. G06F 16/2455 (2019.01); G06F 16/22 (2019.01); G06F 16/28 (2019.01)
CPC G06F 16/24554 (2019.01) [G06F 16/2237 (2019.01); G06F 16/285 (2019.01)] 17 Claims
OG exemplary drawing
 
1. An apparatus comprising:
a memory storing instructions; and
a processor configured to execute the instructions to:
receive a query request for a storage device storing vector data, wherein:
the vector data is divided into a plurality of data partitions, each of the data partitions includes a center vector, and
the query request comprises a query vector and a result number;
predict, via a pre-trained deep learning model, a number of the plurality of data partitions to be queried based on the query vector, the result number, and a vector corresponding to one or more distances between the query vector and the center vector of each of the data partitions,
determine from the plurality of data partitions at least one target data partition having a corresponding center vector that is least distant from the query vector, wherein the number of the at least one target data partitions is the same as the number of data partitions to be queried,
determine a query result corresponding to the query request from the at least one target data partition,
determine an intermediate query result, wherein a number of result vectors included in the intermediate query result is the same as the result number;
determine first type vectors of each at least one target data partition, wherein:
an absolute value of difference between a distance between a corresponding first type vector and a corresponding center vector of a corresponding data partition of the at least one target data partition storing the corresponding first type vector and a first distance is smaller than the distance between the corresponding first type vector and the query vector,
the first type vectors are a vector type having a largest distance from the query vector in the intermediate query result, and
the first distance is the distance between the center vector of the corresponding data partition of the at least one target data partition storing the corresponding first type vector and the query vector;
determine distances between the query vector and the first vector types;
update the intermediate query result according to the distances between the query vector and the first type vectors; and
take the intermediate query result as the query result of the query request after at least one target data partition are queried.