The invention provides an I / O efficient approximate
nearest neighbor search method and device based on
function learning, equipment and a medium, and the method comprises the steps: obtaining three billion-scale data sets, carrying out the deduplication and random sampling, and constructing a basic
data set and a query set; dividing the
data set into a plurality of clusters by adopting a clustering
algorithm, training a clustering selection model, and predicting the cluster with the highest probability to which the query point belongs; constructing a Hash model, and mapping high-dimensional data into low-dimensional Hash codes by fusing a composite
loss function based on
ranking and distance; constructing an index to realize directional retrieval of a target cluster, and obtaining a candidate
point set through a
priority queue mechanism; training a hash code reconstruction model, reconstructing the hash code of the candidate
point set into a vector close to
original data, calculating the distance between the reconstructed vector and a query point, and obtaining a top-K approximate nearest neighbor result, so as to solve the problems that index structure optimization is not combined in a
hash function learning process, and a large amount of expensive random I / O cost exists.