Domain controller-based image retrieval method and computer readable storage medium

By using a domain controller-based image retrieval method, the computing unit is divided into first and second computing units, which solves the problem of low image retrieval efficiency under large data volumes and realizes the rational allocation of computing resources and the improvement of retrieval efficiency.

CN115375933BActive Publication Date: 2026-05-19CHONGQING ZHONGKE YUNCONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING ZHONGKE YUNCONG TECH CO LTD
Filing Date
2022-09-08
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing image retrieval methods are inefficient when dealing with large amounts of data, especially CPU or GPU-based implementations.

Method used

An image retrieval method based on domain controllers is adopted. By dividing multiple computing units into a first computing unit and a second computing unit, the first computing unit is used to calculate the nearest subclass of the image, and the second computing unit is used to determine the retrieval results. This method rationally matches computing resources to improve efficiency.

Benefits of technology

This enables efficient allocation of domain controller computing resources, improves image retrieval efficiency and computing resource utilization, and reduces overall computation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375933B_ABST
    Figure CN115375933B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image retrieval, and particularly provides an image retrieval method based on a domain controller and a computer readable storage medium, aiming at solving the problem of low retrieval efficiency of the existing image retrieval method. To this end, the image retrieval method provided by the present application comprises: dividing a plurality of calculation units into a first calculation unit and a second calculation unit according to the total number of cluster centers corresponding to the clustering categories of a target retrieval image set, the first similarity unit calculation duration, the preset number of adjacent subcategories, the number of standard feature vectors corresponding to each clustering category and the second similarity unit calculation duration; calculating the adjacent subcategory of the image to be queried by using the first calculation unit according to the cluster center and the preset number of adjacent subcategories; and determining the retrieval result of the image to be queried by using the second calculation unit according to the standard feature vector corresponding to the adjacent subcategory. The method can improve the utilization rate of computing resources and achieve the beneficial effect of improving the retrieval efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image retrieval technology, and specifically provides an image retrieval method based on a domain controller and a computer-readable storage medium. Background Technology

[0002] With the development of technology, image retrieval technology has been widely used in many aspects of life. The effectiveness of image retrieval technology is affected by retrieval speed, and the size of the target image database is one of the important factors affecting retrieval speed. In existing technologies, image retrieval is usually implemented based on CPU (Central Processing Unit) or GPU (Graphics Processing Unit). However, for target image databases with large amounts of data, existing image retrieval methods suffer from low retrieval efficiency. Summary of the Invention

[0003] The present invention aims to solve the above-mentioned technical problems, namely, to solve the problem of low retrieval efficiency in existing image retrieval methods.

[0004] In a first aspect, the present invention provides an image retrieval method based on a domain controller, the domain controller comprising multiple computing units, the method comprising:

[0005] The multiple calculation units are divided into a first calculation unit and a second calculation unit based on the total number of cluster centers corresponding to the cluster categories of the target image set, the calculation time of the first similarity unit, the number of preset neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the calculation time of the second similarity unit.

[0006] The trained feature extraction network is used to extract features from the query image to obtain the feature vector of the query image;

[0007] The first computing unit is used to calculate the first similarity between the feature vector of the image to be queried and the cluster center corresponding to the cluster category, and the neighboring sub-categories of the image to be queried are determined from the cluster category based on the first similarity and the preset number of neighboring sub-categories.

[0008] The second calculation unit is used to calculate the second similarity between the feature vector of the query image and the standard feature vector corresponding to the neighboring sub-category, and the retrieval result of the query image is obtained based on the second similarity.

[0009] In some embodiments, dividing the plurality of computational units into a first computational unit and a second computational unit based on the total number of cluster centers corresponding to the cluster categories of the target retrieved image set, the computation time of a first similarity unit, the number of preset neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the computation time of a second similarity unit includes:

[0010] The first computing resource quantity is determined based on the total number of cluster centers corresponding to the cluster categories of the target retrieval image set and the calculation time of the first similarity unit.

[0011] Calculate the average number of standard feature vectors for each cluster category based on the number of standard feature vectors corresponding to each cluster category; determine the second amount of computing resources based on the preset number of neighboring subclasses, the average number of standard feature vectors for each cluster category, and the calculation time for the second similarity unit;

[0012] The plurality of computing units are divided into the first computing unit and the second computing unit based on the first computing resource quantity and the second computing resource quantity.

[0013] In some embodiments, dividing the plurality of computing units into the first computing unit and the second computing unit based on the first computing resource quantity and the second computing resource quantity includes:

[0014] The proportion of the first computing unit and / or the second computing unit in the plurality of computing units is determined based on the ratio of the first computing resource quantity to the second computing resource quantity.

[0015] The plurality of computing units are divided into the first computing unit and the second computing unit according to the proportion.

[0016] In some embodiments, the domain controller further includes a local memory configured corresponding to each computing unit, and the method further includes pre-storing clustering information of the target retrieval image set to the local memory, wherein the clustering information includes the cluster category and the cluster center and the standard feature vector corresponding to the cluster category;

[0017] Calculating the first similarity between the feature vector of the query image and the cluster centers corresponding to the cluster categories using the first computing unit includes:

[0018] The cluster center is read from the local memory corresponding to the first computing unit, and the first similarity between the feature vector of the image to be queried and the cluster center is calculated using the first computing unit.

[0019] In some embodiments, determining the nearest subclass of the query image from the clustering categories based on the first similarity and the preset number of nearest subclasses includes:

[0020] The first similarity is read from the first calculation unit and sorted from smallest to largest; the neighboring subclass of the image to be queried is determined according to the cluster center corresponding to the number of the first similarities with the highest number of the preset neighboring subclasses in the sorting.

[0021] And / or,

[0022] The step of obtaining the retrieval result of the query image based on the second similarity includes:

[0023] Read the second similarity from the second calculation unit and sort the second similarity from smallest to largest;

[0024] The retrieval result of the query image is obtained based on the standard feature vector corresponding to the second similarity of the number of preset neighboring features ranked first.

[0025] In some embodiments, the target image set includes at least one image to be retrieved, and the method further includes:

[0026] For each retrieved image, the trained feature extraction network is used to extract features from the retrieved image to obtain an initial standard feature vector; the initial standard feature vector includes feature values ​​of the primary dimension and feature values ​​of the secondary dimension.

[0027] The feature values ​​of the secondary dimension are binarized, and the adjusted standard feature vector is obtained based on the feature values ​​of the primary dimension and the binarized feature values ​​of the secondary dimension.

[0028] The target retrieval image set is clustered based on the adjusted standard feature vector to obtain clustering information of the target retrieval image set. The clustering information includes the cluster category, the cluster center corresponding to the cluster category, and the standard feature vector.

[0029] In some embodiments, after obtaining the clustering information of the target retrieval image set, the method further includes hashing and storing the clustering information.

[0030] In some embodiments, the method further includes obtaining the trained feature extraction network through the following steps:

[0031] Obtain a retrieval image sample set, which includes a retrieval image training sample subset and a retrieval image test sample subset;

[0032] The feature extraction network to be trained is trained using the subset of retrieved image training samples to obtain an initial feature extraction network. The feature extraction network includes a feature extraction layer and a weight configuration layer. The feature extraction layer extracts features from each retrieved image training sample in the subset to obtain an initial feature vector. The initial feature vector includes feature values ​​for a primary dimension and feature values ​​for a secondary dimension. The weight configuration layer configures weights for the secondary dimensions to obtain a final feature vector based on the product of the feature values ​​of the secondary dimensions and the weights, plus the feature values ​​of the primary dimensions. The sum of the weights for all secondary dimensions is less than a preset threshold.

[0033] The initial feature extraction network is trained using the subset of retrieved image test samples to obtain the test results for each retrieved image test sample in the subset. Based on the test results, the network parameters of the feature extraction layer and the weights of the weight configuration layer in the initial feature extraction network are adjusted to obtain the trained feature extraction network.

[0034] In a second aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the domain controller-based image retrieval method described in any one of the preceding claims.

[0035] In a third aspect, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the domain controller-based image retrieval method described in any of the preceding claims.

[0036] By employing the above technical solution, this invention provides an image retrieval method based on a domain controller. The domain controller includes multiple computing units. These computing units are divided into a first computing unit and a second computing unit based on the total number of cluster centers corresponding to the cluster categories of the target image set, the computation time per first similarity unit, the preset number of neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the computation time per second similarity unit. Based on the cluster centers and the preset number of neighboring subclasses, the first computing unit calculates the neighboring subclasses of the query image. Based on the standard feature vectors corresponding to the neighboring subclasses, the second computing unit determines the retrieval result for the query image. This method effectively allocates the computing resources of the domain controller, improves the utilization rate of computing resources, and achieves the beneficial effect of improving retrieval efficiency. Attached Figure Description

[0037] The preferred embodiments of the present invention are described below with reference to the accompanying drawings, in which:

[0038] Figure 1 This is a schematic diagram of the structure of a domain controller provided by the present invention;

[0039] Figure 2 This is a schematic diagram of an image retrieval method based on a domain controller provided in an embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of a training method for a feature extraction network provided in an embodiment of the present invention;

[0041] Figure 4 This is a schematic flowchart of a method for obtaining clustering information of a target retrieval image set provided by an embodiment of the present invention. Detailed Implementation

[0042] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0043] With the development of technology, image retrieval technology has been widely used in many aspects of life. The effectiveness of image retrieval technology is affected by retrieval speed, and the size of the target image database is one of the important factors affecting retrieval speed. In existing technologies, image retrieval is usually implemented based on CPU (Central Processing Unit) or GPU (Graphics Processing Unit). However, for target image databases with large amounts of data, existing image retrieval methods suffer from low retrieval efficiency.

[0044] Typically, image retrieval involves first determining the nearest subclass, and then determining the standard feature vectors of the nearest subclasses. Both steps are performed within the same computational unit, resulting in low image retrieval efficiency.

[0045] In view of this, the present invention provides an image retrieval method based on a domain controller. The domain controller includes multiple computing units. The multiple computing units are divided into a first computing unit and a second computing unit by determining the first computing resource quantity, the first similarity unit computation time, the preset number of neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the second similarity unit computation time based on the total number of cluster centers corresponding to the cluster categories of the target image set. Based on the cluster centers and the preset number of neighboring subclasses, the first computing unit calculates the neighboring subclasses of the query image. Based on the standard feature vectors corresponding to the neighboring subclasses, the second computing unit determines the retrieval result of the query image. This method can effectively allocate the computing resources of the domain controller, rationally match computing resources by combining the computation time of the first and second similarities, and enable the first and second computing units to perform collaborative parallel computation, thereby improving the utilization rate of computing resources, reducing the overall computation time, and achieving the beneficial effect of improving retrieval efficiency.

[0046] See Figure 1 As shown, Figure 1 This is a schematic diagram of a domain controller provided by the present invention, which may include multiple computing units: computing unit 1, computing unit 2... computing unit M, wherein each computing unit may include multiple private memories: private memory 1, private memory 2... private memory K, and each private memory may correspond to a computing thread. In addition, the domain controller may also include a global memory and multiple local memories: local memory 1, local memory 2... local memory M, with each local memory corresponding to a computing unit. Furthermore, the domain controller may also include constant memory (not shown in the figure).

[0047] See Figure 2 As shown, Figure 2 This is a schematic diagram of an image retrieval method based on a domain controller provided in an embodiment of the present invention, which may include:

[0048] Step S11: Divide multiple calculation units into a first calculation unit and a second calculation unit based on the total number of cluster centers corresponding to the cluster categories of the target image set, the calculation time of the first similarity unit, the number of preset neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the calculation time of the second similarity unit.

[0049] Step S12: Use the trained feature extraction network to extract features from the query image to obtain the feature vector of the query image;

[0050] Step S13: Calculate the first similarity between the feature vector of the image to be queried and the cluster center corresponding to the cluster category using the first computing unit, and determine the neighboring sub-categories of the image to be queried from the cluster category based on the first similarity and the preset number of neighboring sub-categories;

[0051] Step S14: Calculate the second similarity between the feature vector of the query image and the standard feature vector corresponding to the neighboring subcategories using the second computing unit, and obtain the retrieval result of the query image based on the second similarity.

[0052] In some embodiments, step S11 may specifically be:

[0053] The first computational resource quantity is determined based on the total number of cluster centers corresponding to the cluster categories of the target image set and the computation time of the first similarity unit corresponding to each cluster category.

[0054] The average number of standard feature vectors for each cluster category is calculated based on the number of standard feature vectors corresponding to each cluster category; the second computing resource quantity is determined based on the preset number of neighboring subclasses, the average number of standard feature vectors for each cluster category, and the calculation time for the second similarity unit.

[0055] Multiple computing units are divided into a first computing unit and a second computing unit based on the first computing resource quantity and the second computing resource quantity.

[0056] In some embodiments, the target retrieval image set may include multiple retrieval images, which may be clustered to obtain at least one cluster category, and each cluster category corresponds to a cluster center and at least one standard feature vector of the target retrieval image.

[0057] As an example, the first computational resource quantity can be represented as T1, T1 = N·t1, where N represents the total number of cluster centers and t1 represents the computation time per unit of the first similarity score; the second computational resource quantity can be represented as T2. in, t2 represents the average number of standard feature vectors for cluster categories, t2 is the calculation time for the second similarity unit, and k1 is the preset number of neighboring subclasses; It can be determined based on the ratio of the sum of the number of standard feature vectors corresponding to each cluster category to the total number of cluster centers.

[0058] In some embodiments, dividing multiple computing units into a first computing unit and a second computing unit based on a first computing resource quantity and a second computing resource quantity can specifically be as follows:

[0059] The proportion of the first computing unit and / or the second computing unit in the multiple computing units is determined based on the ratio of the first computing resource quantity and the second computing resource quantity.

[0060] Based on the proportion, multiple calculation units are divided into the first calculation unit and the second calculation unit.

[0061] As an example, when there are M computing units, the first computing resource is T1, and the second computing resource is T2, the proportion of the first computing unit among the multiple computing units can be calculated as follows: The corresponding proportion of the second computing unit in the multiple computing units is: 1-β .

[0062] In some embodiments, to improve the accuracy of image retrieval, the query image may be preprocessed before step S12. In some embodiments, a white balance algorithm and / or a wide dynamic range algorithm may be used to preprocess the query image to improve the image quality of the query image and avoid problems such as obvious color casts and unclear mixing of dark and bright areas.

[0063] In some embodiments, clustering information of the target image set is pre-stored in local memory, wherein the clustering information includes cluster categories and cluster centers and standard feature vectors corresponding to the cluster categories. In other embodiments, the clustering information of the target image set may also be stored in global memory.

[0064] In some embodiments, in order to improve reading efficiency, the feature length can be preset before step S12. Preferably, the feature length can be set to 3 to read features from the dimension of 3·pow(2), where pow(2) represents 2 to the power of x, and x can be set as needed.

[0065] In some embodiments, calculating the first similarity between the feature vector of the query image and the cluster center corresponding to the cluster category using the first computing unit in step S13 may include: reading the cluster center from the local memory corresponding to the first computing unit, and calculating the first similarity between the feature vector of the query image and the cluster center using the first computing unit.

[0066] By storing clustering information in local memory, reading from global memory can be avoided, which helps improve reading speed and thus improves the efficiency of image retrieval.

[0067] In some embodiments, the first similarity can be obtained by calculating the inner product between the feature vector of the image to be queried and the cluster center.

[0068] In some embodiments, determining the nearest subclasses of the image to be queried from the cluster categories in step S13 based on the first similarity and the preset number of nearest subclasses includes:

[0069] The first similarity is read from the first calculation unit and sorted from smallest to largest; the neighboring subclass of the image to be queried is determined according to the cluster center corresponding to the number of first similarities with the highest number of preset neighboring subclasses in the sorting.

[0070] In this system, cluster centers and cluster categories correspond to each other. The corresponding cluster centers can be determined based on the first similarity of the number of the top-ranked preset neighboring subcategories, and the cluster categories corresponding to the determined cluster centers are used as the neighboring subcategories of the image to be queried.

[0071] By directly reading the first similarity from the first computing unit for determining neighboring subcategories, access to global or local memory can be reduced.

[0072] In some embodiments, calculating the second similarity between the feature vector of the query image and the standard feature vector corresponding to the neighboring sub-categories using the second computing unit in step S14 may include: reading the standard feature vector corresponding to the neighboring sub-categories from the global memory, and calculating the second similarity between the feature vector of the query image and the standard feature vector corresponding to the neighboring sub-categories using the second computing unit.

[0073] In some embodiments, the second similarity can be obtained by calculating the inner product of the feature vector of the image to be queried and the standard feature vectors corresponding to the neighboring subcategories.

[0074] In some embodiments, obtaining the retrieval result of the query image based on the second similarity in step S14 includes:

[0075] Read the second similarity from the second calculation unit and sort the second similarity from smallest to largest;

[0076] The retrieval results for the query image are obtained based on the standard feature vector corresponding to the second similarity of the number of pre-defined neighboring features ranked first.

[0077] In this process, by extracting features from each retrieved image in the target retrieval image set, a standard feature vector corresponding to the retrieved image is obtained. Therefore, the target retrieval image can be determined from the target retrieval image set based on the standard feature vector corresponding to the second similarity of the number of pre-ordered neighboring features, and the target retrieval image is used as the retrieval result.

[0078] The above describes an image retrieval method based on a domain controller provided by an embodiment of the present invention. The domain controller includes multiple computing units. A first computing resource quantity is determined based on the total number of cluster centers corresponding to the cluster categories of the target image set and the computation time per first similarity unit. A second computing resource quantity is determined based on the preset number of neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the computation time per second similarity unit. The multiple computing units are divided into a first computing unit and a second computing unit based on the first and second computing resource quantities. The first computing unit calculates the neighboring subclasses of the query image based on the cluster centers and the preset number of neighboring subclasses. The second computing unit determines the retrieval result of the query image based on the standard feature vectors corresponding to the neighboring subclasses. This method can effectively allocate the computing resources of the domain controller, reasonably match computing resources by combining the computation time of the first and second similarities, and enable the first and second computing units to perform collaborative parallel computation, thereby improving the utilization rate of computing resources, reducing the overall computation time, and achieving the beneficial effect of improving retrieval efficiency.

[0079] To avoid the impact of low-quality feature values ​​on the accuracy of image retrieval, the feature extraction network can be optimized, as described below.

[0080] See Figure 3 As shown, Figure 3 This is a schematic diagram of a training method for a feature extraction network provided in an embodiment of the present invention, which may include:

[0081] Step S21: Obtain the retrieval image sample set, which includes a subset of retrieval image training samples and a subset of retrieval image test samples;

[0082] Step S22: Train the feature extraction network to be trained using a subset of retrieved image training samples to obtain an initial feature extraction network. The feature extraction network includes a feature extraction layer and a weight configuration layer. The feature extraction layer extracts features from each retrieved image training sample in the subset, obtaining an initial feature vector for the retrieved image training sample. The initial feature vector includes feature values ​​for the primary dimension and feature values ​​for the secondary dimension. The weight configuration layer configures weights for the secondary dimensions to obtain the final feature vector based on the product of the feature values ​​of the secondary dimensions and their weights, as well as the feature values ​​of the primary dimension. The sum of the weights for all secondary dimensions is less than a preset threshold.

[0083] Step S23: Train the initial feature extraction network using a subset of retrieved image test samples to obtain the test results for each retrieved image test sample in the subset. Adjust the network parameters of the feature extraction layer and the weights of the weight configuration layer in the initial feature extraction network based on the test results to obtain a trained feature extraction network.

[0084] The retrieval image training sample subset may include multiple retrieval image training samples, and the retrieval image test sample subset may include multiple retrieval image test samples.

[0085] As an example, when using facial images of people wearing masks as training samples for retrieval images, the facial images can include multiple features, such as eyes, nose, and mouth. The nose and mouth can be used as secondary features, and the influence of masks on image retrieval results can be avoided by reducing the weight of the nose and mouth feature dimensions.

[0086] In some embodiments, the preset threshold can be a value less than 1.

[0087] The above describes a training method for a feature extraction network provided by an embodiment of the present invention. The feature extraction network includes a feature extraction layer and a weight configuration layer. By configuring weights for secondary dimensions in the weight configuration layer, the influence of low-quality feature values ​​on image retrieval results can be effectively avoided. Furthermore, by retraining the initial feature extraction network using a subset of test samples of retrieved images, the network parameters of the feature extraction layer and the weights of the weight configuration layer can be adjusted, thereby further optimizing the feature extraction network. Applying the feature extraction network trained using the above method to extract features from the query image yields a feature vector; and performing retrieval based on the feature vector of the query image effectively improves the accuracy of image retrieval.

[0088] In this embodiment of the invention, clustering information of the target retrieval image set can also be obtained in advance, wherein the target retrieval image set includes at least one retrieval image, see [link to relevant documentation]. Figure 4 As shown, Figure 4 This diagram illustrates a method for obtaining clustering information of a target retrieval image set according to an embodiment of the present invention, which may include:

[0089] Step S31: For each retrieved image, use the trained feature extraction network to extract features from the retrieved image to obtain an initial standard feature vector; the initial standard feature vector includes feature values ​​of the main dimension and feature values ​​of the secondary dimension.

[0090] Step S32: Binarize the feature values ​​of the secondary dimension, and obtain the adjusted standard feature vector based on the feature values ​​of the primary dimension and the binarized feature values ​​of the secondary dimension;

[0091] Step S33: Cluster the target retrieval image set based on the adjusted standard feature vector to obtain the clustering information of the target retrieval image set. The clustering information includes the cluster category and the cluster center and standard feature vector corresponding to the cluster category.

[0092] In some embodiments, in step S31, the feature extraction network trained in steps S21 to S23 can be used to extract features from the retrieved image to avoid the influence of secondary dimensions on the retrieval.

[0093] In some embodiments, step S32 may specifically set a feature threshold corresponding to the secondary dimension, binarize the feature values ​​of the secondary dimension according to the feature threshold, and obtain an adjusted standard feature vector based on the feature values ​​of the primary dimension and the binarized feature values ​​of the secondary dimension.

[0094] Binarizing the feature values ​​of secondary dimensions can effectively remove invalid data, thereby improving the clustering effect.

[0095] In some embodiments, step S33 may specifically involve using the k-means algorithm or learning vectorization to cluster the target retrieval image set based on the adjusted standard feature vectors, so as to obtain the cluster categories of the target retrieval image set, the cluster centers corresponding to the cluster categories, and the standard feature vectors corresponding to each cluster category.

[0096] In some embodiments, after step S33, the clustering information can be hashed and stored to improve the efficiency of subsequent queries on the target image set, thereby improving the image retrieval speed.

[0097] In addition, clustering information can be stored in global memory and local memory. Storing clustering information in local memory can help improve the utilization rate of domain controllers and increase image retrieval speed.

[0098] The above describes a method for obtaining clustering information of a target retrieval image set according to an embodiment of the present invention. The method involves using a trained feature extraction network to extract features from the retrieval images, obtaining an initial standard feature vector; binarizing the feature values ​​of the secondary dimensions in the initial standard feature vector; and obtaining an adjusted standard feature vector based on the feature values ​​of the primary dimensions and the binarized feature values ​​of the secondary dimensions. The target retrieval image set is then clustered based on the adjusted standard feature vector to obtain the clustering information of the target retrieval image set. This method effectively removes invalid data by binarizing the feature values ​​of the secondary dimensions, thereby improving the clustering effect.

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0100] Another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the domain controller-based image retrieval method in any of the above embodiments. The computer-readable storage medium can be a storage device comprising various electronic devices; optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.

[0101] Another aspect of the present invention provides an electronic device that may include:

[0102] The system includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the domain controller-based image retrieval method described in the above embodiments.

[0103] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. An image retrieval method based on a domain controller, wherein the domain controller comprises multiple computing units, characterized in that, The method includes: The multiple calculation units are divided into a first calculation unit and a second calculation unit based on the total number of cluster centers corresponding to the cluster categories of the target image set, the calculation time of the first similarity unit, the number of preset neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the calculation time of the second similarity unit. The trained feature extraction network is used to extract features from the query image to obtain the feature vector of the query image; The first computing unit is used to calculate the first similarity between the feature vector of the image to be queried and the cluster center corresponding to the cluster category, and the neighboring sub-categories of the image to be queried are determined from the cluster category based on the first similarity and the preset number of neighboring sub-categories. The second computing unit calculates a second similarity between the feature vector of the query image and the standard feature vector corresponding to the neighboring sub-categories, and obtains the retrieval result of the query image based on the second similarity; the target retrieval image set includes at least one retrieval image, and the method further includes: For each retrieved image, the trained feature extraction network is used to extract features from the retrieved image to obtain an initial standard feature vector; the initial standard feature vector includes feature values ​​of the primary dimension and feature values ​​of the secondary dimension. The feature values ​​of the secondary dimension are binarized, and the adjusted standard feature vector is obtained based on the feature values ​​of the primary dimension and the binarized feature values ​​of the secondary dimension. The target retrieval image set is clustered based on the adjusted standard feature vector to obtain clustering information of the target retrieval image set. The clustering information includes the cluster category, the cluster center corresponding to the cluster category, and the standard feature vector.

2. The method according to claim 1, characterized in that, The process of dividing the multiple computational units into a first computational unit and a second computational unit based on the total number of cluster centers corresponding to the cluster categories of the target image set, the computation time of the first similarity unit, the number of preset neighboring subclasses, the number of standard feature vectors corresponding to each cluster category, and the computation time of the second similarity unit includes: The first computing resource quantity is determined based on the total number of cluster centers corresponding to the cluster categories of the target retrieval image set and the calculation time of the first similarity unit. Calculate the average number of standard feature vectors for each cluster category based on the number of standard feature vectors corresponding to each cluster category; determine the second amount of computing resources based on the preset number of neighboring subclasses, the average number of standard feature vectors for each cluster category, and the calculation time for the second similarity unit; The plurality of computing units are divided into the first computing unit and the second computing unit based on the first computing resource quantity and the second computing resource quantity.

3. The method according to claim 2, characterized in that, The step of dividing the plurality of computing units into the first computing unit and the second computing unit based on the first computing resource quantity and the second computing resource quantity includes: The proportion of the first computing unit and / or the second computing unit in the plurality of computing units is determined based on the ratio of the first computing resource quantity to the second computing resource quantity. The plurality of computing units are divided into the first computing unit and the second computing unit according to the proportion.

4. The method according to claim 1, characterized in that, The domain controller further includes a local memory configured corresponding to each computing unit, and the method further includes pre-storing clustering information of the target retrieval image set to the local memory, wherein the clustering information includes the cluster category and the cluster center and the standard feature vector corresponding to the cluster category; Calculating the first similarity between the feature vector of the query image and the cluster centers corresponding to the cluster categories using the first computing unit includes: The cluster center is read from the local memory corresponding to the first computing unit, and the first similarity between the feature vector of the image to be queried and the cluster center is calculated using the first computing unit.

5. The method according to any one of claims 1 to 4, characterized in that, Determining the nearest subclass of the query image from the clustering categories based on the first similarity and the preset number of nearest subclasses includes: The first similarity is read from the first calculation unit and sorted from smallest to largest; the neighboring subclass of the image to be queried is determined according to the cluster center corresponding to the number of the first similarities with the highest number of the preset neighboring subclasses in the sorting. And / or, The step of obtaining the retrieval result of the query image based on the second similarity includes: Read the second similarity from the second calculation unit and sort the second similarity from smallest to largest; The retrieval result of the query image is obtained based on the standard feature vector corresponding to the second similarity of the number of preset neighboring features ranked first.

6. The method according to claim 1, characterized in that, After obtaining the clustering information of the target retrieval image set, the method further includes hashing and storing the clustering information.

7. The method according to claim 1, characterized in that, The method further includes obtaining the trained feature extraction network through the following steps: Obtain a retrieval image sample set, which includes a retrieval image training sample subset and a retrieval image test sample subset; The feature extraction network to be trained is trained using the subset of retrieved image training samples to obtain an initial feature extraction network. The feature extraction network includes a feature extraction layer and a weight configuration layer. The feature extraction layer extracts features from each retrieved image training sample in the subset to obtain an initial feature vector. The initial feature vector includes feature values ​​for a primary dimension and feature values ​​for a secondary dimension. The weight configuration layer configures weights for the secondary dimensions to obtain a final feature vector based on the product of the feature values ​​of the secondary dimensions and the weights, plus the feature values ​​of the primary dimensions. The sum of the weights for all secondary dimensions is less than a preset threshold. The initial feature extraction network is trained using the subset of retrieved image test samples to obtain the test results for each retrieved image test sample in the subset. Based on the test results, the network parameters of the feature extraction layer and the weights of the weight configuration layer in the initial feature extraction network are adjusted to obtain the trained feature extraction network.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the domain controller-based image retrieval method according to any one of claims 1 to 7.

9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, which, when executed by the processor, implements the domain controller-based image retrieval method according to any one of claims 1 to 7.