Image retrieval method, device, electronic device and storage medium

By dividing the retrieval algorithm model package of the image retrieval business into multiple modules, and establishing a binding relationship based on the load capacity and feature storage status, the accuracy and load problems of the image retrieval business are solved, and efficient image retrieval and load balancing are achieved. .

CN114035944BActive Publication Date: 2024-09-13ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111269653.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-09-13
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of the image retrieval business is affected by changes in the binding relationship between the network data source and the retrieval feature database, and the business load is high, resulting in low retrieval efficiency.

Method used

By dividing the retrieval algorithm model package of the image retrieval business into multiple retrieval algorithm modules, and establishing a dynamic binding relationship based on the load capacity of each module and the feature storage status of the feature database, ensuring the consistency between the feature database and network data sources. Fixed binding to achieve load balancing.

Benefits of technology

It improves the accuracy of image retrieval and high business availability, reduces the retrieval load, and ensures timely updating and balanced distribution of candidate image features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035944B
    Figure CN114035944B
Patent Text Reader

Abstract

The embodiments of the present application provide an image retrieval method, apparatus, electronic device and storage medium. Based on a preset binding relationship set and a retrieval algorithm module set, each saved candidate image feature is respectively obtained from each corresponding feature library, so as to perform image retrieval based on the obtained candidate image features. The candidate image features saved in each feature library are all from a designated network data source. Due to the fixed binding relationship between the network data source and the feature library, the integrity of the candidate image features obtained when executing the image retrieval service is ensured, thereby improving the accuracy of the image retrieval. On the other hand, by realizing load balancing of each retrieval algorithm module, the retrieval load is reduced while ensuring the high availability of the image retrieval service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an image retrieval method, device, electronic device and storage medium. Background Art

[0002] The feature library is a data warehouse in the field of machine learning. It is used to achieve unified management of features and improve data processing efficiency. It has received widespread attention in the fields of feature comparison and image retrieval.

[0003] For example, before performing an image retrieval service, it is necessary to store multiple image features in a corresponding retrieval feature library. In the related art, the multiple image features are obtained by establishing a dynamic binding relationship between the retrieval feature library and a specified network data source, and analyzing the network data source in the retrieval feature library according to relevant analysis instructions.

[0004] However, the specific implementation scheme still has the following defects:

[0005] 1. Affect the accuracy of subsequent image retrieval business.

[0006] When performing image retrieval services, the binding relationship between the network data source and the retrieval feature library may change, resulting in the image features stored in the retrieval feature library not being updated in time, thereby affecting the accuracy of subsequent image retrieval services.

[0007] 2. High business load.

[0008] In the related art, in order to ensure high availability of the service, the retrieval algorithm package corresponding to the image retrieval service needs to be fixedly bound to the corresponding retrieval feature libraries. However, since the number of bound retrieval feature libraries is usually large, the load of the retrieval service is relatively high under this method. Summary of the invention

[0009] The embodiments of the present application provide an image retrieval method, an apparatus, an electronic device, and a storage medium for improving the retrieval accuracy of an image retrieval service and reducing the retrieval load.

[0010] In a first aspect, an embodiment of the present application provides an image retrieval method, comprising:

[0011] An image retrieval instruction is received, wherein the image retrieval instruction at least includes a target image feature of a target image.

[0012] A preset retrieval algorithm module set is obtained, wherein each retrieval algorithm module is used to execute an image retrieval method.

[0013] Based on a preset binding relationship set, each retrieval algorithm module and at least one feature library bound to each are determined respectively, wherein the binding relationship set includes: the association relationship between each retrieval algorithm module and each feature library, each feature library contains candidate image features of at least one candidate image, and each binding relationship is established according to the load capacity of the retrieval algorithm module and the feature storage status of the corresponding at least one feature library.

[0014] Based on the obtained candidate image feature sets corresponding to each feature library, at least one candidate image feature corresponding to the target image feature is obtained, and image retrieval is performed based on the obtained at least one candidate image feature to obtain a corresponding retrieval result.

[0015] In a second aspect, the embodiment of the present application further provides an image retrieval device, including:

[0016] The communication module is used to receive an image retrieval instruction, wherein the image retrieval instruction at least includes a target image feature of a target image.

[0017] The acquisition module is used to acquire a preset retrieval algorithm module set, wherein each retrieval algorithm module is used to execute an image retrieval method.

[0018] A binding module is used to determine, based on a preset binding relationship set, each retrieval algorithm module and at least one feature library to which each is bound, wherein the binding relationship set includes: an association relationship between each retrieval algorithm module and each feature library, each feature library containing candidate image features of at least one candidate image, and each binding relationship is established based on the load capacity of the retrieval algorithm module and the feature storage status of the corresponding at least one feature library.

[0019] The retrieval module is used to obtain at least one candidate image feature corresponding to the target image feature based on the candidate image feature sets corresponding to the obtained feature libraries, and perform image retrieval based on the obtained at least one candidate image feature to obtain the corresponding retrieval result.

[0020] In an optional embodiment, before receiving the image retrieval instruction, the binding module is further used to:

[0021] The load capacity of each retrieval algorithm module in the retrieval algorithm module set is obtained, wherein the load capacity represents a first number of candidate image features that can be processed by the corresponding retrieval algorithm module.

[0022] A preset feature library set is obtained, and a feature saving state of each feature library in the feature library set is obtained, wherein the feature saving state represents a second number of candidate image features saved in the corresponding feature library.

[0023] Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage status of each feature library in the feature library set, a preset load balancing algorithm is used to establish a binding relationship between each retrieval algorithm module and at least one corresponding feature library.

[0024] In an optional embodiment, based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage state of each feature library in the feature library set, a preset load balancing algorithm is used to respectively establish a binding relationship between each retrieval algorithm module and the corresponding at least one feature library, and the binding module is specifically used to:

[0025] Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set, the first number of candidate image features that each retrieval algorithm module can process is determined respectively, and based on the obtained first numbers, the target retrieval algorithm module is determined from the retrieval algorithm module set.

[0026] Based on the feature saving status of each feature library in the feature library set, the second quantity of the candidate image features saved in each corresponding feature library is determined respectively, and based on the obtained second quantities, the obtained feature libraries are sorted in order from large to small, and based on the sorting of each feature library, the target feature library is determined in turn.

[0027] A preset load balancing algorithm is used to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library.

[0028] In an optional embodiment, when determining the target retrieval algorithm module from the retrieval algorithm module set based on each obtained first quantity, the binding module is specifically used to:

[0029] The first quantities obtained are read in sequence, and each time the first quantities are read, the following operations are performed: the first quantity currently read is compared with the first quantity read last time.

[0030] If the first number currently read is greater than the first number read last time, the retrieval algorithm module corresponding to the first number currently read is used as the target retrieval algorithm module.

[0031] If the first number currently read is not greater than the first number read last time, the retrieval algorithm module corresponding to the first number read last time is maintained as the target retrieval algorithm module.

[0032] In an optional embodiment, after a preset load balancing algorithm is adopted to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library, the binding module is further used to:

[0033] Determine the binding relationship between the target retrieval algorithm module and the corresponding target feature library, and update the first number of candidate image features that can be processed by the target retrieval algorithm module according to the second number of candidate image features saved in the target feature library when the binding relationship is determined.

[0034] In an optional embodiment, when acquiring at least one candidate image feature corresponding to the target image feature based on the obtained candidate image feature sets corresponding to each feature library, the retrieval module is specifically configured to:

[0035] For each candidate image feature in the candidate image feature set corresponding to each feature library obtained, the following operations are performed for each candidate image feature: the cosine similarity method is used to calculate the cosine value of the angle between a candidate image feature and the target image feature, and the cosine value is used as the matching degree between a candidate image feature and the target image feature.

[0036] If the obtained matching degree is greater than a preset matching degree threshold, the candidate image feature is determined to be the candidate image feature corresponding to the target image feature.

[0037] If the obtained matching degree is not greater than a preset matching degree threshold, it is determined that the candidate image feature does not correspond to the target image feature.

[0038] In an optional embodiment, when performing image retrieval based on at least one candidate image feature to obtain corresponding retrieval results, the retrieval module is specifically configured to:

[0039] For at least one candidate image feature obtained, the following operations are performed respectively: using scale-invariant feature transform matching method SIFT or fast nearest neighbor search bag method FLANN, based on the candidate image features, image retrieval is performed in the image database, and the obtained retrieval image is used as the corresponding retrieval result.

[0040] In a third aspect, an embodiment of the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements any one of the image retrieval methods in the first aspect above.

[0041] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image retrieval method of the first aspect is implemented.

[0042] In an embodiment of the present application, a retrieval algorithm model package for implementing an image retrieval service is divided into multiple retrieval algorithm modules, and each retrieval algorithm module is dynamically bound to at least one corresponding feature library while ensuring its own load balancing, wherein each feature library is fixedly bound to a corresponding network data source. Based on the above method, on the one hand, since the binding relationship between the feature library and the network data source will not be easily changed, when the data in the network data source changes, the candidate image features saved in the corresponding feature library can be updated in time, and then when the image retrieval service is executed, the integrity of the candidate image feature set obtained by each retrieval algorithm module is ensured, thereby improving the accuracy of image retrieval.

[0043] On the other hand, in an embodiment of the present application, based on dividing the retrieval algorithm model package into multiple retrieval algorithm modules, the retrieval load of the retrieval algorithm model package is distributed to each retrieval algorithm module. Furthermore, by analyzing the load capacity of each retrieval algorithm module and the feature storage status of the corresponding feature library, while ensuring the load balance of each retrieval algorithm module, the binding relationship between each retrieval algorithm module and each adaptive feature library is established respectively. In this way, through each retrieval algorithm module, the candidate image feature set saved in each feature library can still be obtained, thereby ensuring the high availability of the image retrieval service. At the same time, the load balancing of each retrieval algorithm module is achieved, thereby reducing the load of the retrieval service. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A system architecture diagram of an image retrieval system provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of fixed binding between a network data source and a feature library provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of a process for obtaining a binding relationship set provided in an embodiment of the present application;

[0047] Figure 4 An example diagram of obtaining a binding relationship set provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of a process for establishing a binding relationship provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of a flow chart of a target retrieval algorithm module provided in an embodiment of the present application;

[0050] Figure 7 A schematic diagram of a process for establishing a binding relationship between a target retrieval algorithm module and a target feature library provided in an embodiment of the present application;

[0051] Figure 8 A schematic diagram of a flow chart of an image retrieval method provided in an embodiment of the present application;

[0052] Fig. 9 A schematic diagram of a process for obtaining corresponding candidate image features provided in an embodiment of the present application;

[0053] Fig.10 A schematic diagram of an image retrieval device provided in an embodiment of the present application;

[0054] Fig.11 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to improve the retrieval accuracy of the image retrieval service and reduce the retrieval load, in an embodiment of the present application, by ensuring a fixed binding relationship between each feature library and the corresponding network data source, it is ensured that the image features stored in each feature library can be updated in a timely manner, thereby improving the accuracy of the image retrieval service; at the same time, by dividing the image retrieval service into multiple algorithm modules, and establishing a dynamic binding relationship between each algorithm module and at least one corresponding feature library, it is ensured that the load of each algorithm module is balanced, thereby reducing the retrieval load.

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

[0057] See also Figure 1 As shown, in the embodiment of the present application, the image retrieval system includes a task scheduling module 100, a retrieval algorithm module 110, a feature library storage module 120, and a resource scheduling module 130, wherein:

[0058] The task scheduling module 100 is used to select the corresponding retrieval algorithm module 110 according to the image retrieval instruction, so that the retrieval algorithm module 110 executes the corresponding image retrieval method; specifically, the task scheduling module 100 can be an electronic device with computing capabilities, such as a mobile phone, a tablet computer, a PC, etc.

[0059] For example, the task scheduling module 100 can also be a corresponding image retrieval server, wherein there can be multiple image retrieval servers. According to the received image retrieval instruction, the image retrieval server can select one or more corresponding retrieval algorithm modules to compare the target image features in the image retrieval instruction with the loaded candidate image feature set according to the image retrieval methods executed by the selected one or more retrieval algorithm modules 110, so as to obtain the corresponding image retrieval results.

[0060] The retrieval algorithm module 110 is used to load the stored candidate image features from the corresponding feature library and execute the corresponding image retrieval method, wherein there may be multiple retrieval algorithm modules 110, each retrieval algorithm module 110 is used to execute an image retrieval method. Specifically, the retrieval algorithm module 110 may be an electronic device with computing capabilities, such as a mobile phone, a tablet computer, a PC, etc., or the retrieval algorithm module 110 may also be a processor inside an electronic device, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), etc.

[0061] For example, there are multiple retrieval algorithm modules 110, and each retrieval algorithm module 110 includes one or more image retrieval servers. Through the image retrieval instructions received by the task scheduling module 100, each retrieval algorithm module 110 can respectively execute the corresponding image retrieval algorithm. Specifically, each retrieval algorithm module 110 respectively loads the saved candidate image features in its corresponding feature library, and compares the target image features with the obtained candidate image feature set, so as to obtain the corresponding image retrieval results.

[0062] The feature library storage module 120 is used to provide a candidate image feature storage function, wherein there may be multiple feature library storage modules 120, each of which stores a corresponding feature library, and the feature libraries stored in all feature library storage modules 120 respectively contain at least one candidate image feature derived from a fixed network data source. Specifically, the feature library storage module 120 is a storage medium, such as a floppy disk, a hard disk, etc.

[0063] For example, see Figure 2As shown, there are multiple feature library storage modules 120, each of which contains a corresponding feature library. Each feature library contains at least one candidate image feature, and each candidate image feature comes from a fixed network data source. Specifically, each feature library has a fixed binding relationship with the corresponding network data source. Through this fixed binding relationship, the corresponding network data source is analyzed in the feature library to obtain at least one corresponding candidate image feature.

[0064] Based on the fixed binding relationship between the feature library and the corresponding network data source, it can be ensured that when the corresponding network data source changes, the candidate image features saved in the corresponding feature library can be updated in time, thereby ensuring the accuracy of subsequent image retrieval services.

[0065] The resource scheduling module 130 is used to obtain the load capacity of each retrieval algorithm module 110 in the retrieval algorithm module set and the feature storage status of each feature library in the feature library set, and bind each retrieval algorithm module 110 to at least one corresponding feature library based on the load balancing algorithm.

[0066] Specifically, the resource scheduling module 130 obtains the first number of candidate image features that each retrieval algorithm module 110 can process to determine the load capacity of each retrieval algorithm module 110; the resource scheduling module 130 obtains the second number of candidate image features saved in each feature library to determine the feature saving status of each feature library.

[0067] For example, the resource scheduling module 130 determines that the first number of candidate image features that the retrieval algorithm module x can process is 100 based on the actual hardware information, then the resource retrieval algorithm module 130 sets the corresponding load capacity to 100 based on the first number of candidate image features that the retrieval algorithm module x can process.

[0068] For another example, the resource scheduling module 130 obtains that in the current state, the second number of candidate image features saved in the feature library x is 50, then the resource scheduling module 130 determines the feature saving status of the feature library x based on the second number 50 of candidate image features saved in the feature library x.

[0069] Based on the above system architecture, see Figure 3 As shown, in the embodiment of the present application, the specific manner in which the image retrieval system obtains the binding relationship set is as follows:

[0070] Step 301: Obtain the load capacity of each retrieval algorithm module in a preset retrieval algorithm module set, wherein the load capacity represents a first number of candidate image features that can be processed by the corresponding retrieval algorithm module.

[0071] Specifically, based on the hardware information corresponding to each retrieval algorithm module in the actual scenario, the first number of candidate image features that each retrieval algorithm module can process is determined to judge the load capacity of each retrieval algorithm module.

[0072] For example, assuming that each retrieval algorithm module corresponds to an image retrieval server, based on the hardware information of the central processing unit in each image retrieval server, the load capacity of each corresponding retrieval algorithm module is determined, that is, the first number of candidate image features that each retrieval algorithm module can process. It is assumed that the determined load capacity of each retrieval algorithm module is shown in the following Table 1:

[0073] Table 1

[0074] Retrieval algorithm module Retrieval Algorithm Module 1 Retrieval algorithm module 2 Retrieval algorithm module 3 Load Capacity 100 80 90

[0075] Step 302: Obtain a preset feature library set, and obtain a feature saving status of each feature library in the feature library set, wherein the feature saving status represents a second number of candidate image features saved in the corresponding feature library.

[0076] Specifically, according to the actual situation, the second number of candidate image features stored in each feature library fixedly bound to the designated network data source is used to determine the feature storage status of each feature library.

[0077] For example, assuming that each feature library contains at least one candidate image feature of a candidate image, wherein each candidate image feature comes from a specified network data source. When the network data source changes, the candidate image features stored in the corresponding feature libraries also increase or decrease accordingly, ensuring that the candidate image features stored in each feature library are updated in a timely manner. Assuming that in the current state, the feature storage status of each feature library is shown in Table 2 below:

[0078] Table 2

[0079] Feature Library Feature Library 1 Feature Library 2 Feature Library 3 Feature Library 4 Feature Library 5 Feature Save Status 50 30 20 70 110

[0080] Step 303: Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage status of each feature library in the feature library set, a preset load balancing algorithm is used to establish a binding relationship between each retrieval algorithm module and at least one corresponding feature library.

[0081] Specifically, based on the obtained load capacities, while ensuring that each retrieval algorithm module does not exceed its own load, at least one corresponding feature library is bound as much as possible, thereby ensuring that each retrieval algorithm module can achieve load balancing.

[0082] For example, see Figure 4 As shown, assuming that the binding relationship between each retrieval algorithm module and the corresponding at least one feature library is established based on the load capacity of each retrieval algorithm module and the feature storage status of each feature library, refer to the following Table 3:

[0083] Table 3

[0084] Retrieve algorithm module ID Retrieval Algorithm Module 1 Retrieval algorithm module 2 Retrieval algorithm module 3 Feature library ID Feature Library 4 Feature Library 3 Feature library 1, feature library 2

[0085] See also Figure 5 As shown, in an optional embodiment, in order to ensure the load balance of each retrieval algorithm module, the specific manner in which the image retrieval system establishes the binding relationship is as follows:

[0086] Step 501: Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set, determine the first number of candidate image features that each retrieval algorithm module can process, and based on the obtained first numbers, determine the target retrieval algorithm module from the retrieval algorithm module set.

[0087] To ensure that each retrieval algorithm module can process all candidate image features saved in at least one corresponding bound feature library, therefore, based on the load capacity of each retrieval algorithm module, that is, the first number of candidate image features that each retrieval algorithm module can process, when binding each feature library, a corresponding target retrieval algorithm module is selected from the retrieval algorithm module set, thereby ensuring that the target retrieval algorithm module can load all saved candidate image features in the bound feature library. Optionally, the retrieval algorithm module with the strongest load capacity in the retrieval algorithm module set, that is, the retrieval algorithm module with the largest first number of candidate image features that can be processed, is selected as the target retrieval algorithm module.

[0088] In the above Table 1, the load capacity of each retrieval algorithm module is taken as an example, wherein the resource scheduling module 130 obtains the load capacity of retrieval algorithm module 1 as 100; the load capacity of retrieval algorithm module 2 is 80; the load capacity of retrieval algorithm module 3 is 90; then the resource scheduling module 130 takes retrieval algorithm module 1 as the target retrieval algorithm module.

[0089] See also Figure 6 As shown, in an optional embodiment, when executing step 501, it is assumed that the total number of first quantities obtained is n, and the first quantities obtained are N1 to N n , the image retrieval system determines the target retrieval algorithm module from the retrieval algorithm module set, specifically in the following way:

[0090] Step 5011: Read a first quantity N obtained x, where the initial value of x is set to 1.

[0091] Specifically, according to the respective load capacities of each retrieval algorithm module in the obtained retrieval algorithm module set, determine the corresponding first quantity set, and based on the order of obtaining each load capacity, sequentially read each first quantity obtained.

[0092] Taking the respective load capacities of each retrieval algorithm module in Table 1 above as an example, the first quantities obtained are, in sequence: 100, 80, 90, that is, the corresponding N1 = 100, N2 = 80, N3 = 90.

[0093] Step 5012: Compare the currently read first quantity N x with the previously read first quantity N x-1 to determine whether the currently read first quantity N x is greater than the previously read first quantity N x-1 ? That is, N x > N x-1 ? If so, execute Step 5013, otherwise, execute Step 5014. When executing Step 5012, if the currently read first quantity N x is N1, then set the previously read first quantity N x-1 to 0.

[0094] Step 5013: Take the retrieval algorithm module corresponding to the currently read first quantity as the target retrieval algorithm module.

[0095] Step 5014: Continue to take the retrieval algorithm module corresponding to the previously read first quantity as the target retrieval algorithm module.

[0096] Step 5015: Read the current value of x, and compare the current value of x with the total number n of the first quantities obtained to determine whether x is less than n, that is, x < n? If so, execute Step 5016, otherwise, execute Step 5017.

[0097] Step 5016: Increment the value of x by 1, that is, x = x + 1, and then execute Step 5011.

[0098] Step 5017: Output the currently read first quantity N x and determine that the retrieval algorithm module corresponding to the currently read first quantity N x is the target retrieval algorithm module. Based on the above method, the image retrieval system can determine the target retrieval algorithm module from the retrieval algorithm module set based on the first quantities obtained.

[0099] Step 502: Based on the feature saving status of each feature library in the feature library set, determine the second quantity of candidate image features saved in each corresponding feature library respectively, and sort the obtained feature libraries in order from large to small based on the obtained second quantities, and determine the target feature library in turn based on the sorting of each feature library.

[0100] Specifically, in order to ensure that each feature library is bound as much as possible, thereby ensuring the high availability of the image retrieval service, the resource scheduling module 130 determines the second number of candidate image features saved in each feature library according to the feature storage status of each feature library in the obtained feature library set, and sorts each feature library in order from large to small according to the obtained second numbers, so as to determine the target feature library in turn according to the arrangement order.

[0101] In Table 2 above, taking the feature saving status of each feature library as an example, it can be seen from Table 2 that in each feature library, the second numbers of saved candidate image features are 50, 30, 20, 70, and 110 respectively. Then, according to the second numbers obtained above, the corresponding feature libraries are sorted, that is, the arrangement order is: feature library 5, feature library 4, feature library 1, feature library 2, and feature library 3. Then, according to the above arrangement order, the target feature library is determined in turn.

[0102] Step 503: Using a preset load balancing algorithm, a binding relationship between the target retrieval algorithm module and the corresponding target feature library is established.

[0103] In order to ensure that the target retrieval algorithm module is load balanced and all the saved candidate image features in the corresponding target feature library can be obtained through the target retrieval algorithm module, a binding relationship between the target retrieval algorithm module and the corresponding target feature library is established according to a preset load balancing algorithm based on the load capacity of the target retrieval algorithm module and the feature saving status of the target feature library.

[0104] For example, assuming that the target retrieval algorithm module is the retrieval algorithm module 1 recorded in Table 1 above, where the load capacity corresponding to the retrieval algorithm module 1 is 100; the target feature library is the feature library 4 recorded in Table 2 above, where the feature storage status corresponding to the feature library 4 is 70, then the resource scheduling module 130 adopts a preset load balancing algorithm to establish a binding relationship between the retrieval algorithm module 1 and the corresponding feature library 4.

[0105] See also Figure 7 As shown, in an optional embodiment, when executing step 503, the image retrieval system specifically adopts the following method to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library:

[0106] Step 5031: Obtain the target load capacity of the target retrieval algorithm module, determine the first number of candidate image features that the target load capacity can process; and obtain the target feature saving status of the target feature library, determine the second number of candidate image features saved in the target feature library.

[0107] For example, assuming that the target retrieval algorithm module obtained is the retrieval algorithm module 1 recorded in Table 1 above, it is determined that the first number of candidate image features that the corresponding target load capacity can process is 100; the target feature library is feature library 4 recorded in Table 2 above, then it is determined that the second number of candidate image features saved in the corresponding target feature library is 70.

[0108] Step 5032: Determine whether the obtained first quantity is greater than the corresponding second quantity. If so, execute step 5033; otherwise, execute step 5034.

[0109] Specifically, to ensure that the target retrieval algorithm module can process all candidate image features saved in the bound target feature library, a judgment is made based on the first number of candidate image features that the target retrieval algorithm module can process and the second number of candidate image features saved in the corresponding target feature library.

[0110] Step 5033: Establish a binding relationship between the target retrieval algorithm module and the target feature library.

[0111] Specifically, if it is determined that the obtained first number is greater than the corresponding second number, it means that the target retrieval algorithm module is able to process all saved candidate image features in the target feature library. Then, based on the load capacity of the target retrieval algorithm module and the feature saving status of the target feature library, a binding relationship between the target retrieval algorithm module and the target feature library is established.

[0112] For example, assuming that the target retrieval algorithm module is the retrieval algorithm module 1 recorded in Table 1 above, and the first number of candidate image features that it can process is 100; the target feature library is the feature library 4 recorded in Table 2 above, and the second number of candidate image features that it has saved is 70, then the resource scheduling module 130 determines that the retrieval algorithm module 1 can process all the saved candidate image features in the feature library 4 based on the obtained first number and second number, then the resource scheduling module 130 establishes a binding relationship between the retrieval algorithm module 1 and the feature storage status of the feature library 4 based on the load capacity of the retrieval algorithm module 1.

[0113] Step 5034: Remove the corresponding target feature library from the obtained feature library set.

[0114] Specifically, if it is determined that the obtained first number is not greater than the corresponding second number, it means that the target retrieval algorithm module cannot process all the saved candidate image features in the target feature library, then the corresponding target feature library is removed from the obtained feature library set.

[0115] For example, assuming that the target retrieval algorithm module is the retrieval algorithm module 1 recorded in Table 1 above, and the first number of candidate image features that it can process is 100; the target feature library is the feature library 5 recorded in Table 2 above, and the second number of candidate image features that it has saved is 110, then the resource scheduling module 130 determines, based on the obtained first and second numbers, that the retrieval algorithm module 1 cannot process all the saved candidate image features in the feature library 4, then the resource scheduling module 130 removes the corresponding feature library 4 from the obtained feature library set.

[0116] Furthermore, after establishing the binding relationship between the target retrieval algorithm module and the corresponding target feature library, the image retrieval system may also perform the following operations:

[0117] When the binding relationship is determined, the first number of candidate image features that can be processed by the target retrieval algorithm module is updated according to the second number of candidate image features stored in the target feature library.

[0118] Specifically, when determining the binding relationship, since the target retrieval algorithm module needs to process the candidate image features saved in the corresponding target feature library, the corresponding load capacity of the target retrieval algorithm module changes, that is, the first number of candidate image features that can be processed changes. Based on the second number of candidate image features saved in the target feature library when the binding relationship is determined, the first number of candidate image features that can be processed by the target retrieval algorithm module is updated.

[0119] For example, suppose that the binding relationship between the retrieval algorithm module 1 and the feature library 4 is determined, wherein the first number of candidate image features that the retrieval algorithm module 1 can process is 100, and the second number of candidate image features saved in the feature library 4 is 70. When the binding relationship between the retrieval algorithm module 1 and the feature library 4 is determined, the first number of candidate image features that the retrieval algorithm module 1 can process at this time is updated to 30 according to the second number of candidate image features saved in the feature library 4.

[0120] Based on the above method, each retrieval algorithm module can be respectively established, and the binding relationship between each and the corresponding at least one feature library can be established, as shown in the following Table 4:

[0121] Table 4

[0122] Retrieve algorithm module ID Retrieval Algorithm Module 1 Retrieval algorithm module 2 Retrieval algorithm module 3 Feature library ID Feature Library 4 Feature Library 3 Feature library 1, feature library 2

[0123] Through the above method, the image retrieval algorithm model package is divided into various retrieval algorithm modules. By dispersing and binding various feature libraries to corresponding retrieval algorithm modules, and ensuring that each retrieval algorithm module can process all candidate image features in at least one bound feature library, the load of the retrieval business is reduced while ensuring the normal operation of the image retrieval business.

[0124] Based on the above preprocessing process, after each retrieval algorithm module is bound to the corresponding at least one feature library, the image retrieval system can obtain the corresponding candidate image feature set based on the binding relationship of each retrieval algorithm module that has been set, and then perform image retrieval based on the obtained candidate image feature set; for details, refer to Figure 8 As shown, in the embodiment of the present application, the specific process of the image retrieval system performing corresponding image retrieval based on the obtained candidate image feature set is as follows:

[0125] Step 801: Receive an image retrieval instruction, wherein the image retrieval instruction at least includes a target image feature of a target image.

[0126] For example, assume that an image retrieval system receives an image retrieval instruction from a target object, wherein the image retrieval instruction includes a target image feature of a target image, and assume that the received target image feature is M.

[0127] Step 802: Obtain a preset retrieval algorithm module set, wherein each retrieval algorithm module is used to execute an image retrieval method.

[0128] Specifically, according to the received image retrieval instruction, the image retrieval system determines to execute the corresponding image retrieval algorithm model package, and further, according to the above image retrieval algorithm model package, obtains the corresponding retrieval algorithm module set.

[0129] For example, it is assumed that the image retrieval system determines the corresponding retrieval algorithm modules according to the received image retrieval instruction, which are retrieval algorithm module 1, retrieval algorithm module 2, and retrieval algorithm module 3.

[0130] Step 803: Based on the preset binding relationship set, determine each retrieval algorithm module and at least one feature library bound to each module.

[0131] Specifically, the preset binding relationship set includes: the association relationship between each retrieval algorithm module and each feature library, wherein each feature library contains candidate image features of at least one candidate image, and each binding relationship is established based on the load capacity of the retrieval algorithm module and the feature saving status of the corresponding at least one feature library.

[0132] For example, taking the binding relationship set shown in Table 4 above as an example, it is determined that there is a binding relationship between retrieval algorithm module 1 and feature library 4, there is a binding relationship between retrieval algorithm module 2 and feature library 3, and there is a binding relationship between retrieval algorithm module 3 and both feature library 1 and feature library 2.

[0133] Step 804: Based on the obtained candidate image feature sets corresponding to the various feature libraries, at least one candidate image feature corresponding to the target image feature is obtained, and image retrieval is performed based on the obtained at least one candidate image feature to obtain a corresponding retrieval result.

[0134] Specifically, each retrieval algorithm module obtains at least one corresponding candidate image feature from at least one bound feature library, and obtains at least one candidate image feature corresponding to the target image feature from the candidate image feature set obtained by each retrieval algorithm module, so that image retrieval is performed separately according to the obtained at least one candidate image feature to obtain corresponding retrieval results.

[0135] For example, suppose that through the retrieval algorithm module 1, each candidate image feature in the feature library 4 is obtained: (D1, D2, ..., D n ); Through the retrieval algorithm module 2, the candidate image features in the feature library 3 are obtained: (C1, C2, ..., C n ); Through the retrieval algorithm module 3, the candidate image features in the feature library 1 are obtained: (A1, A2, ..., A n ), and obtain each candidate image feature in feature library 2: (B1, B2, ..., B n ), then the target image feature M is compared with each candidate image feature in the obtained candidate image feature set, that is, (A1~A n , B1~B n , C1~C n , D1~D n ) are compared one by one to obtain candidate image features A1 and candidate image features C2 corresponding to the target image feature M, and then image retrieval is performed based on the obtained candidate image features A1 and candidate image features C2 to obtain corresponding retrieval results.

[0136] In an optional embodiment, when executing step 804, refer to Fig. 9 As shown, the image retrieval system specifically adopts the following method to obtain at least one candidate image feature corresponding to the target image feature:

[0137] Step 8041: For each candidate image feature in the candidate image feature set corresponding to each feature library obtained, the following operations are performed: using the cosine similarity method, the cosine value of the angle between a candidate image feature and the obtained target image feature is calculated, and the obtained cosine value is used as the matching degree between a candidate image feature and the target image feature.

[0138] Specifically, in order to confirm each candidate image feature corresponding to the target image feature, the image retrieval system uses the cosine similarity method to calculate the cosine value of the angle between the corresponding candidate image feature and the obtained target image feature, and uses the obtained cosine value as the matching degree between the candidate image feature and the target image feature.

[0139] For example, take the candidate image feature A1 as an example, where the candidate image feature A1 is a vector, represented as [x1, x2, …, x 5000 ], the target image feature M is a vector, expressed as [y1, y2, …, y 5000 ], the cosine similarity method is used to calculate the cosine value of the angle between the candidate image feature A1 and the target image feature M The value of cosθ is used as the matching degree between the candidate image feature A1 and the target image feature M.

[0140] Step 8042: Determine whether the obtained matching degree is greater than a preset matching degree threshold. If yes, execute step 8043; otherwise, execute step 8044.

[0141] Specifically, in order to determine at least one candidate image feature corresponding to the target image feature, based on the cosine similarity method, the matching degree between each candidate image feature and the target image feature is obtained in turn, and each matching degree is read in turn. If the obtained matching degree is greater than a preset matching degree threshold, the image retrieval system determines that the candidate image feature corresponding to the currently read matching degree corresponds to the target image feature, otherwise, they do not correspond.

[0142] Step 8043: Determine candidate image features, which are candidate image features corresponding to the target image features.

[0143] Step 8044: Determine that the candidate image features do not correspond to the target image features.

[0144] Further, in the embodiment of the present application, when executing step 804, the image retrieval system may specifically adopt, but not limited to, the following methods to perform image retrieval based on the obtained at least one candidate image feature:

[0145] Method 1: Use the scale-invariant feature transform matching method SIFT (Scale-invariant feature transform, SIFT) to perform image retrieval in the corresponding image database.

[0146] Method 2: Use the Fast Approximate Nearest Neighbor Search Library (FLANN) to perform image retrieval in the corresponding image database.

[0147] For example, assuming that the SIFT method is used, the candidate image feature A1 corresponding to the target image feature is retrieved in the corresponding image database to obtain the corresponding target retrieval image A1; at the same time, the FLANN method is used to search the candidate image feature C2 corresponding to the target image feature in the corresponding image database to obtain the corresponding target retrieval image C2.

[0148] See also Fig.10 As shown, the embodiment of the present application provides an image retrieval device, including a communication module 1001, an acquisition module 1002, a binding module 1003 and a retrieval module 1004, wherein:

[0149] The communication module 1001 is used to receive an image retrieval instruction, wherein the image retrieval instruction at least includes a target image feature of a target image.

[0150] The acquisition module 1002 is used to acquire a preset retrieval algorithm module set, wherein each retrieval algorithm module is used to execute an image retrieval method.

[0151] The binding module 1003 is used to determine each retrieval algorithm module and at least one feature library bound to each retrieval algorithm module based on a preset binding relationship set, wherein the binding relationship set includes: the association relationship between each retrieval algorithm module and each feature library, each feature library contains candidate image features of at least one candidate image, and each binding relationship is established based on the load capacity of the retrieval algorithm module and the feature storage status of the corresponding at least one feature library.

[0152] The retrieval module 1004 is used to obtain at least one candidate image feature corresponding to the target image feature based on the candidate image feature sets corresponding to the obtained feature libraries, and perform image retrieval based on the obtained at least one candidate image feature to obtain corresponding retrieval results.

[0153] In an optional embodiment, before receiving the image retrieval instruction, the binding module 1003 is further used to:

[0154] The load capacity of each retrieval algorithm module in the retrieval algorithm module set is obtained, wherein the load capacity represents a first number of candidate image features that can be processed by the corresponding retrieval algorithm module.

[0155] A preset feature library set is obtained, and a feature saving state of each feature library in the feature library set is obtained, wherein the feature saving state represents a second number of candidate image features saved in the corresponding feature library.

[0156] Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage status of each feature library in the feature library set, a preset load balancing algorithm is used to establish a binding relationship between each retrieval algorithm module and at least one corresponding feature library.

[0157] In an optional embodiment, based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage state of each feature library in the feature library set, a preset load balancing algorithm is used to respectively establish a binding relationship between each retrieval algorithm module and the corresponding at least one feature library, and the binding module 1003 is specifically used to:

[0158] Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set, the first number of candidate image features that each retrieval algorithm module can process is determined respectively, and based on the obtained first numbers, the target retrieval algorithm module is determined from the retrieval algorithm module set.

[0159] Based on the feature saving status of each feature library in the feature library set, the second quantity of the candidate image features saved in each corresponding feature library is determined respectively, and based on the obtained second quantities, the obtained feature libraries are sorted in order from large to small, and based on the sorting of each feature library, the target feature library is determined in turn.

[0160] A preset load balancing algorithm is used to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library.

[0161] In an optional embodiment, when determining the target retrieval algorithm module from the retrieval algorithm module set based on each obtained first quantity, the binding module 1003 is specifically used to:

[0162] The first quantities obtained are read in sequence, and each time the first quantities are read, the following operations are performed: the first quantity currently read is compared with the first quantity read last time.

[0163] If the first number currently read is greater than the first number read last time, the retrieval algorithm module corresponding to the first number currently read is used as the target retrieval algorithm module.

[0164] If the first number currently read is not greater than the first number read last time, the retrieval algorithm module corresponding to the first number read last time is maintained as the target retrieval algorithm module.

[0165] In an optional embodiment, after a preset load balancing algorithm is adopted to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library, the binding module 1003 is further used to:

[0166] Determine the binding relationship between the target retrieval algorithm module and the corresponding target feature library, and update the first number of candidate image features that can be processed by the target retrieval algorithm module according to the second number of candidate image features saved in the target feature library when the binding relationship is determined.

[0167] In an optional embodiment, when acquiring at least one candidate image feature corresponding to the target image feature based on the obtained candidate image feature sets corresponding to each feature library, the retrieval module 1004 is specifically configured to:

[0168] For each candidate image feature in the candidate image feature set corresponding to each feature library obtained, the following operations are performed for each candidate image feature: the cosine similarity method is used to calculate the cosine value of the angle between a candidate image feature and the target image feature, and the cosine value is used as the matching degree between a candidate image feature and the target image feature.

[0169] If the obtained matching degree is greater than a preset matching degree threshold, the candidate image feature is determined to be the candidate image feature corresponding to the target image feature;

[0170] If the obtained matching degree is not greater than a preset matching degree threshold, it is determined that the candidate image feature does not correspond to the target image feature.

[0171] In an optional embodiment, when performing image retrieval based on at least one candidate image feature to obtain corresponding retrieval results, the retrieval module 1004 is specifically configured to:

[0172] For at least one candidate image feature obtained, the following operations are performed respectively: using scale-invariant feature transform matching method SIFT or fast nearest neighbor search bag method FLANN, based on the candidate image features, image retrieval is performed in the image database, and the obtained retrieval image is used as the corresponding retrieval result.

[0173] Based on the same inventive concept as the above-mentioned application embodiment, the present application embodiment also provides an electronic device, which can be used for image retrieval. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. In this embodiment, the structure of the electronic device can be as follows: Fig.11 As shown, it includes a memory 111 , a communication interface 113 and one or more processors 112 .

[0174] The memory 111 is used to store computer programs executed by the processor 112. The memory 111 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0175] The memory 111 may be a volatile memory, such as a random-access memory (RAM); the memory 111 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 111 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 111 may be a combination of the above memories.

[0176] The processor 112 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 112 is used to implement the above-mentioned image retrieval method when calling the computer program stored in the memory 111 .

[0177] The communication interface 113 is used to communicate with terminal devices and other servers.

[0178] The specific connection medium between the memory 111, the communication interface 113 and the processor 112 is not limited in the embodiment of the present application. Fig.11 In the embodiment, the memory 111 and the processor 112 are connected via a bus 114. Fig.11 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus 114 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0179] According to one aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the image retrieval methods in the above-mentioned embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0180] In an embodiment of the present application, a retrieval algorithm model package for implementing an image retrieval service is divided into multiple retrieval algorithm modules, and each retrieval algorithm module is dynamically bound to at least one corresponding feature library while ensuring its own load balancing, wherein each feature library is fixedly bound to a corresponding network data source. Based on the above method, on the one hand, since the binding relationship between the feature library and the network data source will not be easily changed, when the data in the network data source changes, the candidate image features saved in the corresponding feature library can be updated in time, and then when the image retrieval service is executed, the integrity of the candidate image feature set obtained by each retrieval algorithm module is ensured, thereby improving the accuracy of image retrieval.

[0181] On the other hand, in an embodiment of the present application, based on dividing the retrieval algorithm model package into multiple retrieval algorithm modules, the retrieval load of the retrieval algorithm model package is distributed to each retrieval algorithm module. Furthermore, by analyzing the load capacity of each retrieval algorithm module and the feature storage status of the corresponding feature library, while ensuring the load balance of each retrieval algorithm module, the binding relationship between each retrieval algorithm module and each adaptive feature library is established respectively. In this way, through each retrieval algorithm module, the candidate image feature set saved in each feature library can still be obtained, thereby ensuring the high availability of the image retrieval service. At the same time, the load balancing of each retrieval algorithm module is achieved, thereby reducing the load of the retrieval service.

[0182] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0183] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0184] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0186] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An image retrieval method, It is characterized in that include: receiving an image retrieval instruction, wherein the image retrieval instruction at least includes a target image feature of a target image; Obtaining a preset retrieval algorithm module set, wherein each retrieval algorithm module is used to execute an image retrieval method; Based on a preset binding relationship set, each of the retrieval algorithm modules and at least one feature library bound thereto are respectively determined, wherein the binding relationship set includes: an association relationship between each of the retrieval algorithm modules and each feature library, wherein each feature library contains candidate image features of at least one candidate image, and each of the binding relationships is established according to a load capacity of the retrieval algorithm module and a feature preservation state of each corresponding at least one feature library, wherein the feature preservation state represents a second number of candidate image features that have been preserved in the corresponding feature library; Based on the obtained candidate image feature sets corresponding to each feature library, at least one candidate image feature corresponding to the target image feature is obtained, and image retrieval is performed based on the at least one candidate image feature to obtain a corresponding retrieval result.

2. The method according to claim 1, It is characterized in that Before receiving the image retrieval instruction, the method further includes: Acquire the load capacity of each of the retrieval algorithm modules in the retrieval algorithm module set, wherein the load capacity represents a first number of candidate image features that can be processed by the corresponding retrieval algorithm module; Acquire a preset feature library set, and acquire a feature saving state of each feature library in the feature library set, wherein the feature saving state represents a second number of candidate image features saved in the corresponding feature library; Based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage status of each feature library in the feature library set, a preset load balancing algorithm is used to establish a binding relationship between each retrieval algorithm module and at least one corresponding feature library.

3. The method according to claim 2, It is characterized in that The method includes: based on the load capacity of each retrieval algorithm module in the retrieval algorithm module set and the feature storage state of each feature library in the feature library set, using a preset load balancing algorithm to establish a binding relationship between each retrieval algorithm module and the corresponding at least one feature library, including: Based on the load capacity of each of the retrieval algorithm modules in the retrieval algorithm module set, respectively determine the first number of candidate image features that each of the retrieval algorithm modules can process, and based on each of the first numbers obtained, determine a target retrieval algorithm module from the retrieval algorithm module set; Based on the feature storage status of each feature library in the feature library set, the second number of candidate image features stored in each corresponding feature library is determined respectively, and based on each obtained second number, the obtained feature libraries are sorted in order from large to small, and based on the sorting of each feature library, the target feature library is determined in sequence; A preset load balancing algorithm is adopted to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library.

4. The method according to claim 3, It is characterized in that The step of determining a target retrieval algorithm module from the retrieval algorithm module set based on each of the first quantities obtained includes: The first quantities are read in sequence, and each time the quantities are read, the following operations are performed: Compare the first quantity currently read with the first quantity read last time; If the first number currently read is greater than the first number read last time, the retrieval algorithm module corresponding to the first number currently read is used as the target retrieval algorithm module; If the first number currently read is not greater than the first number read last time, the retrieval algorithm module corresponding to the first number read last time is maintained as the target retrieval algorithm module.

5. The method according to claim 3, It is characterized in that After the preset load balancing algorithm is used to establish a binding relationship between the target retrieval algorithm module and the corresponding target feature library, the method further includes: Based on the second number of candidate image features stored in the target feature library, the first number of candidate image features that can be processed by the target retrieval algorithm module is updated.

6. The method according to any one of claims 1 to 5, It is characterized in that The step of obtaining at least one candidate image feature corresponding to the target image feature based on the obtained candidate image feature sets corresponding to the respective feature libraries comprises: For each candidate image feature in the candidate image feature set corresponding to each feature library obtained, the following operations are performed respectively: Using a cosine similarity method, a cosine value of an angle between a candidate image feature and the target image feature is calculated, and the cosine value is used as a matching degree between the candidate image feature and the target image feature; If the matching degree is greater than a preset matching degree threshold, determining the one candidate image feature as the candidate image feature corresponding to the target image feature; If the matching degree is not greater than a preset matching degree threshold, it is determined that the one candidate image feature does not correspond to the target image feature.

7. The method according to any one of claims 1 to 5, It is characterized in that The performing image retrieval based on the at least one candidate image feature to obtain a corresponding retrieval result includes: For at least one obtained candidate image feature, the following operations are performed respectively: The scale-invariant feature transform matching method SIFT or the fast nearest neighbor search bag method FLANN is used to perform image retrieval in the image database based on a candidate image feature, and the obtained retrieval image is used as the corresponding retrieval result.

8. An image retrieval device, It is characterized in that include: A communication module, used for receiving an image retrieval instruction, wherein the image retrieval instruction at least includes a target image feature of a target image; An acquisition module, used to acquire a preset retrieval algorithm module set, wherein each retrieval algorithm module is used to execute an image retrieval method; A binding module, used to determine, based on a preset binding relationship set, each of the retrieval algorithm modules and at least one feature library to which each of the retrieval algorithm modules is bound, wherein the binding relationship set includes: an association relationship between each of the retrieval algorithm modules and each of the feature libraries, each of the feature libraries containing candidate image features of at least one candidate image, each of the binding relationships being established based on a load capacity of the retrieval algorithm module and a feature preservation state of each of the corresponding at least one feature library, wherein the feature preservation state represents a second number of candidate image features that have been preserved in the corresponding feature library; The retrieval module is used to obtain at least one candidate image feature corresponding to the target image feature based on the candidate image feature sets corresponding to the obtained feature libraries, and perform image retrieval based on the at least one candidate image feature to obtain corresponding retrieval results.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the image retrieval method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.