The invention discloses an online cross-
modal retrieval method and
system based on similarity re-learning, and the method comprises the steps: obtaining an
original data sample, dividing the
original data sample into a plurality of groups, and constructing a
training set; constructing an objective function of Hash code learning, training the objective function by utilizing the
training set to obtain a Hash code and a
Hash function corresponding to each batch of data, and storing the Hash code and the
Hash function into a retrieval
library; generating a hash code of the to-be-queried sample according to the sample external expansion mapping; updating the hash code of the original sample data in the retrieval
library based on the new sample data in the
data stream; and comparing the hash code of the to-be-queried sample with the updated hash code in the retrieval
library, sorting according to the
Hamming distance from small to large, and returning a
retrieval result. According to the method, the Hash representation is generated for the new data on the premise of not retraining the
original data, and meanwhile, the retrieval precision is greatly improved by mining the similarity relationship between the new data and the old data and utilizing the
label information of the new data.