Information retrieval method, device, terminal and computer readable storage medium

CN116049473BActive Publication Date: 2026-10-27ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211689143.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2026-10-27
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

[0004]本发明主要解决的技术问题是提供一种信息检索方法、装置、终端及计算机可读存储介质,解决现有技术中基于检索图像的短特征进行检索存在难样本漏召回的问题

Benefits of technology

[0042]本发明的有益效果是:区别于现有技术的情况,提供的信息检索方法、装置、终端及计算机可读存储介质,信息检索方法包括:对待查询信息进行特征提取,得到待查询信息对应的第一特征信息;基于多个特征转换模型分别对第一特征信息进行特征转换,得到各特征转换模型输出的第二特征信息;第二特征信息为第一特征信息的降维特征信息,且各特征转换模型输出的第二特征信息的维度不同;基于各第二特征信息在预设数据库中分别进行检索,得到各第二特征信息对应的候选检索数据集;候选检索数据集包括多个预设第二特征信息;将第一特征信息与候选检索数据集中各预设第二特征信息对应的预设第一特征信息进行比对,确定待查询信息对应的检索结果。本申请通过多个特征转换模型分别对第一特征信息进行特征转换,得到多个维度的第二特征信息,相比于现有技术中单一的短特征,本申请中基于短特征以及长特征与短特征之间的多个维度的第二特征信息在预设数据库中分别进行检索,避免由于短特征语义信息少出现漏召回,通过不同维度第二特征信息将相似度超过阈值的的预设第二特征信息均召回,避免出现难样本的漏召回,再基于召回的预设第二特征信息对应的预设第一特征信息与第一特征信息进行比对,既减小工作量,还能提高待查询信息的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049473B_ABST
    Figure CN116049473B_ABST
Patent Text Reader

Abstract

The application provides an information retrieval method, device, terminal and computer readable storage medium. The information retrieval method comprises: extracting features of to-be-queried information to obtain first feature information; converting the first feature information based on a plurality of feature conversion models to obtain second feature information output by each feature conversion model; respectively searching in a preset database based on each second feature information to obtain a candidate search data set corresponding to each second feature information; and comparing the first feature information with preset first feature information corresponding to each preset second feature information in the candidate search data set to determine a search result corresponding to the to-be-queried information. The application respectively searches in the preset database based on different dimension second feature information, avoids missing recall of difficult samples, and compares preset first feature information corresponding to the recalled preset second feature information with the first feature information, thereby improving the accuracy of the to-be-queried information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of retrieval technology, and in particular to an information retrieval method, apparatus, terminal, and computer-readable storage medium. Background Technology

[0002] With the widespread use of high-capacity storage devices and digital imaging equipment (camcorders, cameras), a massive amount of images of various types are generated every day, including scientific, medical, geographical, and everyday images. How to effectively retrieve these vast amounts of images, thereby facilitating people's browsing, searching, and management of images of interest, is a pressing issue that needs to be addressed.

[0003] Currently, deep learning models first compress the original image and text data into D-dimensional feature vectors. Similar content has high feature similarity, while dissimilar content has low similarity. The uploaded search image is also extracted into D-dimensional feature vectors, which are then compressed into S-dimensional feature vectors. These S-dimensional feature vectors are then compared one by one with S-dimensional feature vectors in a pre-set database to determine the search results. However, because S-dimensional feature vectors lack more semantic information than the original image's D-dimensional feature vectors, the search text itself is less reliable, resulting in inaccurate short-feature search results. Summary of the Invention

[0004] The main technical problem solved by this invention is to provide an information retrieval method, device, terminal and computer-readable storage medium, which solves the problem of poor sample recall in the prior art based on short features of retrieval images.

[0005] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is: to provide an information retrieval method, the information retrieval method comprising:

[0006] Feature extraction is performed on the information to be queried to obtain the first feature information corresponding to the information to be queried.

[0007] The first feature information is transformed by multiple feature transformation models to obtain the second feature information output by each feature transformation model. The second feature information is the dimensionality-reduced feature information of the first feature information, and the second feature information output by each feature transformation model has a different dimension.

[0008] Based on each second feature information, a search is performed in a preset database to obtain a candidate retrieval dataset corresponding to each second feature information; the candidate retrieval dataset includes multiple preset second feature information.

[0009] The first feature information is compared with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the information to be queried.

[0010] The training methods for the feature transformation model include:

[0011] Acquire multiple training data sets; associate each training data set with the corresponding first sample feature and the corresponding real nearest neighbor information sequence;

[0012] The first sample feature corresponding to the training data is input into the feature transformation model for feature transformation to obtain the second sample feature corresponding to the training data and the prediction confidence.

[0013] Based on the features of the second sample, a search is performed in the preset database to obtain the predicted nearest neighbor information sequence and pseudo-label confidence corresponding to the training data;

[0014] The feature transformation model is trained based on the error between the pseudo-label confidence and the prediction confidence of the training data.

[0015] The preset database includes an information database constructed from multiple preset information, a first feature database constructed from preset first feature information corresponding to each preset information, and a second feature database constructed from preset second feature information corresponding to each preset information; the preset information, preset first feature information, and preset second feature information in the preset database correspond one-to-one.

[0016] Methods for constructing the second feature database include:

[0017] By performing feature transformation on the preset first feature information of the preset information through multiple feature transformation models, the candidate second feature information and confidence level of the preset information output by each feature transformation model are obtained.

[0018] Based on the confidence level of the candidate second feature information corresponding to the same preset information output by each feature transformation model, candidate second feature information corresponding to confidence levels exceeding the preset confidence level is obtained.

[0019] The candidate second feature information with the smallest dimension is selected as the preset second feature information.

[0020] The multiple feature transformation models include a first feature transformation model and a second feature transformation model; the preset database includes an information database constructed from multiple preset information, a first feature database constructed from preset first feature information corresponding to each preset information, and a second feature database constructed from preset second feature information corresponding to each preset information; the preset information, preset first feature information, and preset second feature information in the preset database correspond one-to-one.

[0021] Methods for constructing the second feature database include:

[0022] The preset first feature information of the preset information is transformed by the first feature transformation model to obtain the candidate second feature information and confidence level of the preset information output by the first feature transformation model.

[0023] If the confidence level of the candidate second feature information output by the first feature transformation model exceeds the preset confidence level, then the candidate second feature information output by the first feature transformation model is used as the preset second feature information.

[0024] If the confidence level of the candidate second feature information output by the first feature transformation model does not exceed the preset confidence level, then the preset first feature information of the preset information is transformed by the second feature transformation model to obtain the candidate second feature information and confidence level of the preset information output by the second feature transformation model; the dimension of the candidate second feature information of the preset information output by the second feature transformation model is higher than that of the candidate second feature information of the preset information output by the first feature transformation model.

[0025] If the confidence level of the candidate second feature information output by the second feature transformation model exceeds the preset confidence level, then the candidate second feature information output by the second feature transformation model is used as the preset second feature information.

[0026] The second feature database includes multiple sub-feature databases, and the sub-feature databases contain the same dimension of the preset second feature information; each sub-feature database has a different dimension.

[0027] Methods for constructing a second feature database also include:

[0028] Clustering is performed on each preset second feature information in the second feature database based on the dimension of feature information to obtain multiple sub-feature databases corresponding to the second feature database.

[0029] Specifically, based on each second feature information, a search is performed in a preset database to obtain a candidate retrieval dataset corresponding to each second feature information, including:

[0030] The second feature information is compared with each preset second feature information contained in the sub-feature database with the same dimension as the second feature information in the preset database to obtain the first similarity corresponding to each preset second feature information;

[0031] Select the preset number of second feature information with the highest first similarity as the candidate retrieval dataset corresponding to each second feature information.

[0032] Specifically, the first feature information is compared with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the query information, including:

[0033] The first feature information is compared with the preset first feature information corresponding to the preset second feature information contained in each candidate retrieval dataset to obtain the second similarity corresponding to each preset first feature information;

[0034] Select the preset information corresponding to the preset first feature information with the highest second similarity as the retrieval result of the query information.

[0035] To solve the above-mentioned technical problems, the second technical solution adopted by the present invention is: to provide an information retrieval method, the information retrieval method comprising:

[0036] The information extraction module is used to extract features from the information to be queried, and obtain the first feature information corresponding to the information to be queried.

[0037] The feature transformation module is used to perform feature transformation on the first feature information based on multiple feature transformation models to obtain the second feature information output by each feature transformation model; the second feature information is the dimensionality reduction feature information of the first feature information, and the second feature information output by each feature transformation model has a different dimension;

[0038] The first retrieval module is used to perform retrieval in a preset database based on each second feature information to obtain a candidate retrieval dataset corresponding to each second feature information; the candidate retrieval dataset includes multiple preset second feature information.

[0039] The second retrieval module is used to compare the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset, and determine the retrieval result corresponding to the information to be queried.

[0040] To solve the above-mentioned technical problems, the third technical solution adopted by the present invention is to provide a terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. The processor is used to execute program data to implement the steps in the above-mentioned information retrieval method.

[0041] To solve the above-mentioned technical problems, the fourth technical solution adopted by the present invention is to provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps in the above-mentioned information retrieval method.

[0042] The beneficial effects of this invention are as follows: Unlike existing technologies, the provided information retrieval method, apparatus, terminal, and computer-readable storage medium include: extracting features from information to be queried to obtain first feature information corresponding to the information to be queried; performing feature transformation on the first feature information based on multiple feature transformation models to obtain second feature information output by each feature transformation model; the second feature information is dimensionality-reduced feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different; performing searches in a preset database based on each second feature information to obtain candidate retrieval datasets corresponding to each second feature information; the candidate retrieval datasets include multiple preset second feature information; comparing the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval datasets to determine the retrieval result corresponding to the information to be queried. This application uses multiple feature transformation models to transform the first feature information to obtain second feature information with multiple dimensions. Compared with the single short feature in the prior art, this application performs retrieval in a preset database based on the second feature information with multiple dimensions, including the short feature and the relationship between long and short features. This avoids missed recalls due to the limited semantic information of short features. By using second feature information with different dimensions, preset second feature information with similarity exceeding a threshold is recalled, avoiding missed recalls of difficult samples. Then, the preset first feature information corresponding to the recalled preset second feature information is compared with the first feature information, which reduces the workload and improves the accuracy of the query information. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating the information retrieval method provided by the present invention;

[0045] Figure 2 This is a flowchart illustrating a specific embodiment of the feature transformation model training method in the information retrieval method provided by the present invention;

[0046] Figure 3 This is a schematic diagram of the framework of an embodiment of the information retrieval device provided by the present invention;

[0047] Figure 4 This is a schematic diagram of the framework of an embodiment of the terminal provided by the present invention;

[0048] Figure 5A schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. Detailed Implementation

[0049] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0050] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0051] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "more" in this article means two or more objects.

[0052] To enable those skilled in the art to better understand the technical solution of the present invention, the information retrieval method provided by the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] Please see Figure 1 , Figure 1 This is a flowchart illustrating the information retrieval method provided by the present invention. This embodiment provides an information retrieval method, which includes the following steps.

[0054] S1: Extract features from the information to be queried to obtain the first feature information corresponding to the information to be queried.

[0055] Specifically, the information to be queried can be image data or text data.

[0056] S2: Based on multiple feature transformation models, the first feature information is transformed to obtain the second feature information output by each feature transformation model; the second feature information is the dimensionality reduction feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different.

[0057] S3: Based on each second feature information, perform a search in the preset database to obtain the candidate retrieval dataset corresponding to each second feature information; the candidate retrieval dataset includes multiple preset second feature information.

[0058] S4: Compare the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the information to be queried.

[0059] In one embodiment, the training method for multiple feature transformation models in step S2 includes the following steps.

[0060] Multiple feature transformation models are trained separately based on the training data. The number of feature transformation models should be at least two, and the specific number should be determined based on the actual situation.

[0061] In one embodiment, the multiple feature transformation models include a first feature transformation model, a second feature transformation model, and a third feature transformation model. A D-dimensional long feature map corresponding to the training data is input into the first, second, and third feature transformation models, respectively. The first feature transformation model performs feature transformation on the long feature map, outputting a short feature map with a dimension of D / 8 of the long feature map's dimension; the second feature transformation model performs feature transformation on the long feature map, outputting a short feature map with a dimension of D / 4 of the long feature map's dimension; and the third feature transformation model performs feature transformation on the long feature map, outputting a short feature map with a dimension of D / 2 of the long feature map's dimension. In other embodiments, the dimension of the short feature map can also be D / 16, D / 32, etc., of the long feature map's dimension.

[0062] For example, the dimension of the long feature corresponding to the training data is 512, the dimension of the feature map output by the first feature transformation model is 64, the dimension of the feature map output by the second feature transformation model is 128, and the dimension of the feature map output by the third feature transformation model is 256. In this embodiment, the long feature map is relative to the short feature map; the short feature map contains less semantic information about the training data than the long feature map. The smaller the dimension of the short feature map, the less semantic information it contains about the training data; the larger the dimension, the more semantic information it contains about the training data.

[0063] Please see Figure 2 , Figure 2 This is a flowchart illustrating a specific embodiment of the feature transformation model training method in the information retrieval method provided by the present invention.

[0064] S21: Obtain multiple training data; associate the first sample features corresponding to each training data with the real nearest neighbor information sequence corresponding to the training data.

[0065] Specifically, the type of training data is determined based on the type of data to be detected. Training data can be either training image data or training text data.

[0066] The first sample features corresponding to the training data are obtained by extracting features from the training data. The dimension of the first sample features is the same as the dimension of the first feature information corresponding to the query information.

[0067] Based on the features of the first sample, a search is performed in a pre-defined database to obtain multiple nearest neighbor information corresponding to the training data. Specifically, the similarity between the features of the first sample and the corresponding preset first feature information in the pre-defined database is calculated. The preset information corresponding to each preset first feature information is sorted according to the similarity to obtain the sequence of real nearest neighbor information corresponding to the training data.

[0068] S22: Input the first sample features corresponding to the training data into the feature transformation model to perform feature transformation, and obtain the second sample features corresponding to the training data and the prediction confidence.

[0069] Specifically, the feature transformation model includes a feature transformation branch and a confidence detection branch.

[0070] The first sample features corresponding to the training data are input into the feature transformation model, where feature transformation is performed through the feature transformation branch to obtain the second sample features corresponding to the training data. The reliability of the prediction result of the second sample features is then determined by the confidence detection branch in the feature transformation model.

[0071] The first sample features corresponding to the training data are input into different feature transformation models, and the second sample features of the training data output by different feature transformation models have different dimensions.

[0072] S23: Based on the features of the second sample, a search is performed in the preset database to obtain the predicted nearest neighbor information sequence and pseudo-label confidence corresponding to the training data.

[0073] Specifically, a search is performed in a pre-defined database based on the features of the second sample. The similarity between the features of the second sample and each pre-defined first feature in the pre-defined database is calculated. Based on the similarity, the pre-defined information corresponding to each pre-defined first feature in the pre-defined database is sorted to obtain the predicted nearest neighbor information sequence corresponding to the training data.

[0074] Calculate the error between the true nearest neighbor sequence and the predicted nearest neighbor sequence corresponding to the training data. The larger the error, the lower the confidence level. That is, confidence level = 1 - error value. Determine the pseudo-label confidence level corresponding to the training data based on the error between the true and predicted nearest neighbor sequences. Use the pseudo-label confidence level as supervised information to optimize the predicted confidence level output by the feature transformation model.

[0075] S24: Train the feature transformation model based on the error between the pseudo-label confidence and the prediction confidence corresponding to the training data.

[0076] Specifically, the feature transformation model is iteratively trained based on the error between the pseudo-label confidence and the prediction confidence corresponding to the training data until the feature transformation model converges.

[0077] Through steps S21 to S24, the first feature transformation model, the second feature transformation model, and the third feature transformation model are trained respectively, resulting in trained first feature transformation models, second feature transformation models, and third feature transformation models. These trained models then perform feature transformations on the first feature information, yielding the second feature information and confidence scores output by each model. Furthermore, the dimensionality of the second feature information output by the first, second, and third feature transformation models increases sequentially, moving closer to a longer feature map.

[0078] In one embodiment, the preset database in step S3 is constructed in the following manner.

[0079] The preset database includes an information database constructed from multiple preset information, a first feature database constructed from preset first feature information corresponding to each preset information, and a second feature database constructed from preset second feature information corresponding to each preset information; the preset information, preset first feature information, and preset second feature information in the preset database correspond one-to-one.

[0080] In one embodiment, multiple feature transformation models are used to transform the preset first feature information of the preset information to obtain the candidate second feature information and confidence level of the preset information output by each feature transformation model; based on the confidence level of the candidate second feature information corresponding to the same preset information output by each feature transformation model, candidate second feature information corresponding to confidence levels exceeding the preset confidence level is selected; the candidate second feature information with the smallest dimension is selected as the preset second feature information of the preset information.

[0081] In one embodiment, a first feature transformation model is used to transform preset first feature information of preset information to obtain candidate second feature information and confidence level of preset information output by the first feature transformation model. If the confidence level of candidate second feature information output by the first feature transformation model exceeds a preset confidence level, then the candidate second feature information output by the first feature transformation model is used as the preset second feature information of preset information. If the confidence level of candidate second feature information output by the first feature transformation model does not exceed the preset confidence level, then a second feature transformation model is used to transform the preset first feature information of preset information to obtain candidate second feature information and confidence level of preset information output by the second feature transformation model. When the confidence level does not exceed the preset confidence level, the dimension of the feature map is increased to improve the confidence level. The dimension of candidate second feature information of preset information output by the second feature transformation model is higher than that of candidate second feature information of preset information output by the first feature transformation model; if the confidence level of candidate second feature information output by the second feature transformation model exceeds the preset confidence level, then the candidate second feature information output by the second feature transformation model is used as the preset second feature information of preset information.

[0082] The confidence level represents the reliability of the candidate second feature information. The higher the confidence level, the more reliable the candidate second feature information; the lower the confidence level, the less reliable the candidate second feature information.

[0083] In this embodiment, the confidence level of the candidate second feature information is determined by the error value between the true nearest neighbor information sequence corresponding to the candidate second feature information and the predicted nearest neighbor information sequence. The true nearest neighbor information sequence corresponding to the second feature information is determined by ranking the similarity between the preset first feature information corresponding to the candidate second feature information and the preset first feature information of other preset information in the preset database. The predicted nearest neighbor information sequence corresponding to the second feature information is determined by ranking the similarity between the candidate second feature information and the preset first feature information of other preset information in the preset database.

[0084] The preset first feature information and preset second feature information corresponding to each preset information are obtained through the above method. Each preset information corresponds to one preset second feature information. When the confidence levels of all candidate second feature information output by the feature transformation model do not exceed a preset confidence level, only the preset first feature information corresponding to the preset information is retained.

[0085] In one specific embodiment, the second feature database includes multiple sub-feature databases, and the sub-feature databases contain preset second feature information with the same dimension; each sub-feature database corresponds to a different dimension.

[0086] Clustering is performed on each preset second feature in the second feature database based on the dimension of the feature information to obtain multiple sub-feature databases corresponding to the second feature database. For example, the second feature database includes a D / 8-dimensional sub-feature database, a D / 4-dimensional sub-feature database, a D / 2-dimensional sub-feature database, and a D-dimensional sub-feature database.

[0087] Specifically, an index table is established between the second feature database, the first feature database, and the information database, and this index table is loaded into the hardware resources used for retrieval. The second feature database is stored permanently in device memory, such as CPU memory, GPU video memory, or the memory of other NPUs such as MLU or Ascend.

[0088] In one specific embodiment, the second feature database and index table are loaded onto the GPU. Since the GPU is used to compare the information to be queried with each preset second feature information in the second feature database, the comparison efficiency can be greatly improved.

[0089] The first feature information of the information to be queried is input into each feature transformation model. Each feature transformation model performs feature transformation on the first feature information. Each feature transformation model is then input into the second feature information of the information to be queried.

[0090] In one embodiment, the candidate retrieval dataset corresponding to each second feature information is obtained in step S3 in the following manner.

[0091] Each second feature information corresponding to the information to be queried is compared with each preset second feature information contained in a sub-feature database with the same dimension as the second feature information in the preset database to obtain the first similarity corresponding to each preset second feature information; the preset number of preset second feature information with the largest first similarity is selected as the candidate retrieval dataset corresponding to each second feature information.

[0092] Specifically, the similarity between the D / 8-dimensional second feature information corresponding to the information to be queried and each preset second feature information contained in the D / 8-dimensional sub-feature database is calculated to obtain the first similarity corresponding to each preset second feature information. Based on the magnitude of the first similarity, the preset second feature information contained in the D / 8-dimensional sub-feature database is sorted, and the preset number of preset second feature information with the largest first similarity is selected as the candidate retrieval dataset corresponding to the D / 8-dimensional second feature information of the information to be queried.

[0093] The above methods are used to obtain candidate retrieval datasets corresponding to the second feature information in D / 4, D / 2, and D dimensions of the information to be queried.

[0094] In one embodiment, the retrieval results of the information to be queried in step S4 are obtained in the following manner.

[0095] Since the time required to transfer data from CPU / memory to GPU / NPU is not low, the CPU should be used to directly compare the first feature information corresponding to each preset second feature information in the candidate retrieval dataset with the first feature information corresponding to the information to be queried after reading the preset first feature information from the disk to the CPU memory.

[0096] Based on the index table, the preset first feature information corresponding to the preset second feature information contained in the candidate retrieval dataset for all dimensions is loaded, extracted, and merged.

[0097] The first feature information corresponding to the query information is compared with the preset first feature information corresponding to the preset second feature information contained in each candidate retrieval dataset to obtain the second similarity for each preset first feature information. All extracted preset first feature information is sorted based on the magnitude of the second similarity. The preset information corresponding to the preset first feature information with the highest preset number of second similarities is selected as the retrieval result for the query information.

[0098] In one embodiment, the more feature transformation models there are, the more comparisons the first feature information refinement part needs to make, potentially increasing the time consumption of this part. It is necessary to consider the time ratio between the first and second feature information comparisons, while also taking resource consumption into account. The more sub-feature databases corresponding to the second feature database, the less resource consumption, but the higher the time consumption of the first feature information comparison. Unless the time consumption of the first feature information comparison part is significantly lower than that of the second feature information comparison, grouping can be added to utilize this idle time in exchange for resource consumption.

[0099] The information retrieval method provided in this embodiment includes: extracting features from the information to be queried to obtain first feature information corresponding to the information to be queried; performing feature transformation on the first feature information based on multiple feature transformation models to obtain second feature information output by each feature transformation model; the second feature information is the dimensionality-reduced feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different; performing a search in a preset database based on each second feature information to obtain a candidate retrieval dataset corresponding to each second feature information; the candidate retrieval dataset includes multiple preset second feature information; comparing the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the information to be queried. This application performs feature transformation on the first feature information using multiple feature transformation models to obtain second feature information of multiple dimensions, and then performs a search in a preset database based on the second feature information of different dimensions to recall the preset second feature information similar to the second feature information of different dimensions, avoiding missed recall of difficult samples. Then, the preset first feature information corresponding to the recalled preset second feature information is compared with the first feature information, which reduces the workload and improves the accuracy of the information to be queried.

[0100] Please see Figure 3 , Figure 3 This is a schematic diagram of the framework of an embodiment of the information retrieval device provided by the present invention. This embodiment provides an information retrieval device 60, which includes an information extraction module 61, a feature conversion module 62, a first retrieval module 63, and a second retrieval module 64.

[0101] The information extraction module 61 is used to extract features from the information to be queried, and obtain the first feature information corresponding to the information to be queried.

[0102] The feature transformation module 62 is used to perform feature transformation on the first feature information based on multiple feature transformation models to obtain the second feature information output by each feature transformation model; the second feature information is the dimensionality reduction feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different.

[0103] The first retrieval module 63 is used to perform retrieval in a preset database based on each second feature information to obtain a candidate retrieval dataset corresponding to each second feature information; the candidate retrieval dataset includes multiple preset second feature information.

[0104] The second retrieval module 64 is used to compare the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset, and determine the retrieval result corresponding to the information to be queried.

[0105] The information retrieval device provided in this embodiment performs feature transformation on the first feature information through multiple feature transformation models to obtain second feature information in multiple dimensions. Then, it performs retrieval in a preset database based on the second feature information in different dimensions to recall preset second feature information similar to the second feature information in different dimensions, avoiding missed recall of difficult samples. Finally, it compares the preset first feature information corresponding to the recalled preset second feature information with the first feature information, which reduces the workload and improves the accuracy of the information to be queried.

[0106] Please see Figure 4 , Figure 4 This is a schematic diagram of a terminal embodiment provided by the present invention. The terminal 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps of any of the above-described information retrieval method embodiments. In a specific implementation scenario, the terminal 80 may include, but is not limited to, a microcomputer or a server. In addition, the terminal 80 may also include mobile devices such as laptops and tablets, which are not limited here.

[0107] Specifically, processor 82 controls itself and memory 81 to implement the steps of any of the above-described information retrieval method embodiments. Processor 82 may also be referred to as a CPU (Central Processing Unit). Processor 82 may be an integrated circuit chip with signal processing capabilities. Processor 82 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 82 may be implemented using integrated circuit chips.

[0108] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 90 stores program instructions 901 that can be executed by a processor. The program instructions 901 are used to implement the steps of any of the above-described information retrieval method embodiments.

[0109] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0110] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0111] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0114] The above are merely embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An information retrieval method, characterized in that, The information retrieval method includes: Feature extraction is performed on the information to be queried to obtain the first feature information corresponding to the information to be queried; The first feature information is transformed by multiple feature transformation models to obtain the second feature information output by each feature transformation model; the second feature information is the dimensionality-reduced feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different; the second feature information output by multiple feature transformation models is a short feature map, and the dimensions of the second feature information output by each model increase sequentially. Based on each of the second feature information, a search is performed in a preset database to obtain a candidate retrieval dataset corresponding to each of the second feature information; the candidate retrieval dataset includes multiple preset second feature information. The first feature information is compared with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the information to be queried; The training method for the feature transformation model includes: Acquire multiple training data sets; associate each training data set with a corresponding first sample feature and a sequence of real nearest neighbor information corresponding to the training data set. The first sample feature corresponding to the training data is input into the feature transformation model for feature transformation to obtain the second sample feature corresponding to the training data and the prediction confidence; different feature transformation models output second sample features of the training data with different dimensions; Based on the second sample features, a search is performed in the preset database to obtain the predicted nearest neighbor information sequence and pseudo-label confidence level corresponding to the training data; wherein, the pseudo-label confidence level corresponding to the training data is determined according to the error value between the real nearest neighbor information sequence and the predicted nearest neighbor information sequence. The feature transformation model is trained based on the error between the pseudo-label confidence and the prediction confidence corresponding to the training data.

2. The information retrieval method according to claim 1, characterized in that, The preset database includes an information database constructed from multiple preset information, a first feature database constructed from the preset first feature information corresponding to each of the preset information, and a second feature database constructed from the preset second feature information corresponding to each of the preset information; The preset information, the preset first feature information, and the preset second feature information in the preset database correspond one-to-one; The method for constructing the second feature database includes: The preset first feature information of the preset information is transformed by the multiple feature transformation models respectively, so as to obtain the candidate second feature information and confidence level of the preset information output by each feature transformation model; Based on the confidence level of the candidate second feature information corresponding to the same preset information output by each feature transformation model, candidate second feature information corresponding to the confidence level exceeding the preset confidence level is obtained; The candidate second feature information with the smallest dimension is selected as the preset second feature information of the preset information.

3. The information retrieval method according to claim 1, characterized in that, The plurality of feature transformation models include a first feature transformation model and a second feature transformation model; the preset database includes an information database constructed from a plurality of preset information, a first feature database constructed from the preset first feature information corresponding to each of the preset information, and a second feature database constructed from the preset second feature information corresponding to each of the preset information; The preset information, the preset first feature information, and the preset second feature information in the preset database correspond one-to-one; The method for constructing the second feature database includes: The preset first feature information of the preset information is transformed by the first feature transformation model to obtain the candidate second feature information and confidence level of the preset information output by the first feature transformation model. If the confidence level of the candidate second feature information output by the first feature transformation model exceeds a preset confidence level, then the candidate second feature information output by the first feature transformation model is used as the preset second feature information of the preset information. If the confidence level of the candidate second feature information output by the first feature transformation model does not exceed a preset confidence level, then the preset first feature information of the preset information is transformed by the second feature transformation model to obtain the candidate second feature information and confidence level of the preset information output by the second feature transformation model; the dimension of the candidate second feature information of the preset information output by the second feature transformation model is higher than that of the candidate second feature information of the preset information output by the first feature transformation model. If the confidence level of the candidate second feature information output by the second feature transformation model exceeds the preset confidence level, then the candidate second feature information output by the second feature transformation model is used as the preset second feature information of the preset information.

4. The information retrieval method according to claim 2 or 3, characterized in that, The second feature database includes multiple sub-feature databases, wherein the preset second feature information contained in the sub-feature databases has the same dimension; and the dimensions corresponding to each sub-feature database are different. The method for constructing the second feature database also includes: Clustering is performed on each of the preset second feature information in the second feature database based on the dimension of the feature information to obtain multiple sub-feature databases corresponding to the second feature database.

5. The information retrieval method according to claim 4, characterized in that, The step of searching a preset database based on each of the second feature information to obtain a candidate retrieval dataset corresponding to each of the second feature information includes: The second feature information is compared with each of the preset second feature information contained in the sub-feature database that has the same dimension as the second feature information in the preset database to obtain the first similarity corresponding to each preset second feature information; Select the preset number of the second feature information with the highest first similarity as the candidate retrieval dataset corresponding to each second feature information.

6. The information retrieval method according to claim 1, characterized in that, The step of comparing the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset to determine the retrieval result corresponding to the query information includes: The first feature information is compared with the preset first feature information corresponding to the preset second feature information contained in each candidate retrieval dataset to obtain the second similarity corresponding to each preset first feature information; Select the preset information corresponding to the preset first feature information with the highest second similarity as the retrieval result of the query information.

7. An information retrieval method, characterized in that, The information retrieval method includes: The information extraction module is used to extract features from the information to be queried to obtain the first feature information corresponding to the information to be queried. The feature transformation module is used to perform feature transformation on the first feature information based on multiple feature transformation models to obtain the second feature information output by each feature transformation model; the second feature information is the dimensionality-reduced feature information of the first feature information, and the dimensions of the second feature information output by each feature transformation model are different; the second feature information output by multiple feature transformation models is a short feature map, and the dimensions of the second feature information output by each model increase sequentially. The first retrieval module is used to perform retrieval in a preset database based on each of the second feature information to obtain a candidate retrieval dataset corresponding to each of the second feature information; the candidate retrieval dataset includes multiple preset second feature information. The second retrieval module is used to compare the first feature information with the preset first feature information corresponding to each preset second feature information in the candidate retrieval dataset, and determine the retrieval result corresponding to the information to be queried; The training method for the feature transformation model includes: Acquire multiple training data sets; associate each training data set with a corresponding first sample feature and a sequence of real nearest neighbor information corresponding to the training data set. The first sample feature corresponding to the training data is input into the feature transformation model for feature transformation to obtain the second sample feature corresponding to the training data and the prediction confidence; different feature transformation models output second sample features of the training data with different dimensions; Based on the second sample features, a search is performed in the preset database to obtain the predicted nearest neighbor information sequence and pseudo-label confidence level corresponding to the training data; wherein, the pseudo-label confidence level corresponding to the training data is determined according to the error value between the real nearest neighbor information sequence and the predicted nearest neighbor information sequence. The feature transformation model is trained based on the error between the pseudo-label confidence and the prediction confidence corresponding to the training data.

8. A terminal, characterized in that, The terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor, the processor being used to execute program data to implement the steps in the information retrieval method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the information retrieval method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Picture retrieval method and device, computer equipment and storage medium

    CN112100412A