A method for encrypted retrieval of large-scale images

By constructing a search tree based on reverse encryption and clustering algorithms, the problems of high retrieval difficulty and computational complexity in large-scale encrypted image retrieval are solved, realizing an efficient and secure image retrieval method that maintains sequence consistency before and after encryption.

CN117708362BActive Publication Date: 2026-08-04XIDIAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2023-12-21
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing technologies for encrypted image retrieval suffer from problems such as increased retrieval difficulty after encryption, loss of order preservation, and high computational complexity, especially in large-scale image data, which affects retrieval efficiency and security.

Method used

A search tree method based on reverse encryption and clustering algorithms is adopted. By obtaining image feature vectors, reverse encryption is performed, and then the search is performed from top to bottom in a pre-constructed multi-way tree until the most similar leaf node is found. The search tree is constructed using neural networks and PCA dimensionality reduction technology, and security is ensured by random matrix encryption.

Benefits of technology

It achieves efficient image retrieval under encryption, maintains sequence consistency before and after encryption, reduces computational complexity, and improves retrieval efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117708362B_ABST
    Figure CN117708362B_ABST
Patent Text Reader

Abstract

The application discloses a large-scale image-oriented encrypted retrieval method and relates to the technical field of image retrieval. Q The application discloses a large-scale image-oriented encrypted retrieval method and relates to the technical field of image retrieval. Q The application discloses a large-scale image-oriented encrypted retrieval method and relates to the technical field of image retrieval. Q The application discloses a large-scale image-oriented encrypted retrieval method and relates to the technical field of image retrieval. Q The application discloses a large-scale image-oriented encrypted retrieval method and relates to the technical field of image retrieval. The application can realize image content-based search, and the encryption algorithm is simple to design, which is beneficial to reducing search overhead while being encrypted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image retrieval, and particularly relates to an encrypted retrieval method for large-scale images. Background Art

[0002] In recent years, with the rapid development of big data and neural networks, deep network learning has attracted wide attention in various fields of computer vision. The field of image recognition is no exception, and good results have been obtained. The accuracy rate of image recognition has exceeded 99%, which is higher than the accuracy rate obtained by the human eye. Therefore, it is the general trend to use deep learning for image recognition and retrieval.

[0003] At present, many methods for encrypting image information have emerged. For example, the image vector is indexed based on the hash method. Although this method solves the problem of image security, it will increase the difficulty of image retrieval and lose the order-preserving property before and after image encryption. And there are mainly two existing vector-based search methods, namely Euclidean distance and cosine distance. It is no longer feasible to calculate the Euclidean distance between the image feature vectors after hash encryption. Therefore, there is an urgent need for an encryption method that can ensure the same order before and after encryption.

[0004] LU et al. proposed an encrypted dataset image search algorithm Min-Hash based on order-preserving encryption. This is an encryption method in which the ciphertext maintains the order characteristics of the plaintext. That is, if the plaintext a and b satisfy a < b, then the encrypted ciphertexts E(a) and E(b) also satisfy E(a) < E(b). This method is simple in calculation operation, has the same order before and after encryption, and is convenient for searching. However, this method is only applicable to the image search algorithm based on the visual word representation of images.

[0005] There is also an image encrypted retrieval method based on homomorphic encryption in the prior art. This method fully guarantees security, but the homomorphic encryption method has too high computational complexity, and it uses a linear search method, which will affect the overall retrieval efficiency and computational performance. Summary of the Invention

[0006] In order to solve the above problems existing in the prior art, the present invention provides an encrypted retrieval method for large-scale images. The technical problems to be solved by the present invention are realized through the following technical solutions:

[0007] The present invention provides an encrypted retrieval method for large-scale images, including:

[0008] Obtain the image to be searched, and extract the feature vector of the image to be searched;

[0009] Perform reverse encryption on the feature vector of the image to be searched to obtain the ciphertext feature vector T of the image to be searchedQ ;

[0010] According to the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The leaf node with the highest similarity; wherein, the search tree is: a multi-branch tree pre-constructed using a clustering algorithm for the images in the dataset, and each leaf node of the multi-branch tree includes the feature vector of each image in the dataset;

[0011] The ciphertext feature vector T Q The image corresponding to the leaf node with the highest similarity in the dataset is determined as the retrieval result of the image to be searched.

[0012] In one embodiment of the present invention, the search tree is constructed according to the following steps:

[0013] Obtain each image from the dataset;

[0014] Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector of each image in the dataset; the neural network model includes a convolutional neural network and VGG16.

[0015] PCA dimensionality reduction is performed on the original feature vector of each image in the dataset to obtain the dimensionality-reduced feature vector of each image in the dataset, and the transformation matrix A in the PCA dimensionality reduction process is saved.

[0016] The reduced-dimensional feature vector of each image in the dataset is used as a leaf node, and clustering is performed based on the leaf nodes to construct a search tree from bottom to top.

[0017] In one embodiment of the present invention, the step of using the dimensionality-reduced feature vector of each image in the dataset as a leaf node, and performing clustering based on the leaf nodes to construct a search tree from bottom to top includes:

[0018] The dimensionality-reduced feature vector of each image in the dataset is used as a leaf node;

[0019] The K-means algorithm is used to cluster every k leaf nodes in the leaf nodes upwards into an intermediate node of a new layer;

[0020] Determine if the number of intermediate nodes in the new layer is less than or equal to k; if so, use the K-means algorithm to cluster the intermediate nodes of the new layer into root nodes to construct a search tree; if not, use the K-means algorithm to continue clustering every k intermediate nodes into an intermediate node of the new layer.

[0021] In one embodiment of the present invention, after the step of using the dimensionality-reduced feature vector of each image in the dataset as a leaf node and performing clustering based on the leaf nodes to construct a search tree from bottom to top, the method further includes:

[0022] Each node in the search tree is encrypted and the key is stored.

[0023] In one embodiment of the present invention, the step of encrypting each node in the search tree and storing the key includes:

[0024] Obtain the dimensionality reduction feature vector of each node in the search tree, wherein the dimensionality reduction feature vector of the middle node and the dimensionality reduction feature vector of the root node are the average of the dimensionality reduction feature vectors of the child nodes contained therein;

[0025] The dimensionality-reduced feature vector F of the i-th node i ={f1,f2,...,f n Expanded to Where n represents the dimensionality-reduced eigenvector F i The dimension, f j Represents the dimensionality reduction eigenvector F i In the j-th dimension, a1, a2, ..., a n-1 All are random numbers;

[0026] Generate a random matrix M, random numbers Γ, and a random vector ε of dimension 2n. i Afterwards, Encryption is performed to obtain the ciphertext feature vector of the i-th node:

[0027]

[0028] Save the inverse matrix M of the random matrix M -1 As a key.

[0029] In one embodiment of the present invention, the step of acquiring the image to be searched and extracting the feature vector of the image to be searched includes:

[0030] Get the image to be searched;

[0031] Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector of the image to be searched; wherein, the neural network model includes a convolutional neural network and VGG16;

[0032] The original feature vector of the image to be searched is reduced in dimensionality using PCA using the transformation matrix A to obtain the dimensionality-reduced feature vector Q of the image to be searched.

[0033] In one embodiment of the present invention, the feature vector of the image to be searched is reverse encrypted to obtain the ciphertext feature vector T of the image to be searched. Q The steps include:

[0034] The dimensionality-reduced feature vector Q = {q1, q2, ..., q} of the image to be searched is... n Expanded to Where n represents the dimension of the dimensionality-reduced feature vector Q, and q1,q2,...,q n Let γ, β1, β2, ..., β be the 1st, 2nd, ..., nth dimensions of the dimensionality-reduced eigenvector Q, respectively. n-1 All are random numbers;

[0035] Generate a random vector ε of dimension 2n q Using key M -1 right Perform reverse encryption to obtain the ciphertext feature vector T of the image to be searched. Q :

[0036]

[0037] In the formula, T represents transpose.

[0038] In one embodiment of the present invention, based on the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The steps to find the leaf node with the highest similarity include:

[0039] Calculate the ciphertext feature vectors of each intermediate node in the next level below the root node in the search tree and the ciphertext feature vector T of the image to be searched. Q The similarity between them;

[0040] For the encrypted feature vector T of the image to be searched Q For the intermediate node with the highest similarity, determine whether each node in its next layer is a leaf node; if so, calculate the encrypted feature vector T between each leaf node and the image to be searched. Q The similarity between them is used to determine the encrypted feature vector T of the image to be searched. Q The leaf node with the highest similarity;

[0041] If not, then calculate the ciphertext feature vector of each intermediate node in the next layer and the ciphertext feature vector T of the image to be searched. Q The similarity between them is calculated, and the encrypted feature vector T for the image to be searched is returned. Q The step is to determine whether each node in the next level of the intermediate node with the highest similarity is a leaf node.

[0042] In one embodiment of the present invention, the ciphertext feature vector of any node and the ciphertext feature vector T are calculated according to the following formula. Q Similarity between them:

[0043]

[0044] In the formula, Indicates rounding up. Represents the ciphertext feature vector of any node.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0046] This invention provides an encrypted retrieval method for large-scale images, which utilizes the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The leaf node with the highest similarity is used to identify the image in the dataset that is most similar to the image to be searched. Since the search tree is a multi-branch tree pre-constructed using a clustering algorithm for the images in the dataset, each leaf node of the multi-branch tree contains the feature vector of each image in the dataset, while the intermediate nodes act as indexes, thus realizing a search based on image content.

[0047] Furthermore, the encryption algorithm of this invention is simple to design, and the computational complexity between ciphertexts is infinitely close to that of plaintexts, which helps to reduce search overhead while encrypting.

[0048] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0049] Figure 1 This is a flowchart of an encrypted retrieval method for large-scale images provided in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of a search tree provided in an embodiment of the present invention. Detailed Implementation

[0051] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0052] Figure 1 This is a flowchart of an encrypted retrieval method for large-scale images provided in an embodiment of the present invention. Figure 1 As shown, this embodiment of the invention provides an encrypted retrieval method for large-scale images, including:

[0053] S101. Obtain the image to be searched and extract its feature vector;

[0054] S102. Perform reverse encryption on the feature vector of the image to be searched to obtain the ciphertext feature vector T of the image to be searched. Q ;

[0055] S103, Based on the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The leaf node with the highest similarity; where the search tree is: a multi-branch tree pre-constructed using a clustering algorithm for the images in the dataset, and each leaf node of the multi-branch tree includes the feature vector of each image in the dataset;

[0056] S104, Combine with the ciphertext feature vector T Q The image corresponding to the leaf node with the highest similarity in the dataset is determined as the retrieval result of the image to be searched.

[0057] In this embodiment, the search tree is constructed according to the following steps:

[0058] Retrieve each image from the dataset;

[0059] Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector for each image in the dataset; the neural network models include convolutional neural networks and VGG16.

[0060] PCA is used to reduce the dimensionality of the original feature vector of each image in the dataset to obtain the dimensionality-reduced feature vector of each image in the dataset, and the transformation matrix A in the PCA dimensionality reduction process is saved.

[0061] The search tree is constructed from the bottom up by using the reduced-dimensional feature vector of each image in the dataset as a leaf node and performing clustering based on the leaf nodes.

[0062] Specifically, for the images in the dataset, this embodiment utilizes a Convolutional Neural Network (CNN) and the existing VGG16 model to extract the original feature vectors. A CNN is a multi-layered neural network with a basic structure including an input layer, convolutional layers, pooling layers, fully connected layers, and an output layer. The VGG16 model is a commonly used model in classification and localization tasks. After extraction by the CNN and VGG16 model, a 256-dimensional original feature vector can be extracted from each image, which is an array of double-float numbers. Considering the scale of this number of feature vectors, the computational cost is excessive, whether for memory storage, tree construction, or retrieval. Therefore, PCA dimensionality reduction is performed on the original feature vectors of each image.

[0063] It should be understood that the PCA (Principal Component Analysis) algorithm uses orthogonal transformation to map the original feature vectors to a new dimension in a projection manner. The vector data of the new dimension is more concise and can summarize most of the key information in the original feature vectors with a relatively low dimension. Therefore, low-dimensional vector data can be used to replace the original feature vectors for subsequent processing.

[0064] The core idea of ​​PCA is to find a set of orthogonal bases v such that the variance of all original feature vectors projected along these bases is maximized. For example, if there are M original feature vectors of N dimensions, PCA dimensionality reduction can be performed as follows:

[0065] First, the original feature vectors are arranged into an N x M matrix X = {x1, x2, ..., xn}. i ...x M}, and zero-mean normalize each row of matrix X, that is, subtract the mean of that row: Next, the covariance matrix of matrix X is calculated. Then, the eigenvalues ​​of the covariance matrix are calculated, resulting in M ​​sorted eigenvalues: λ1≥λ2≥...≥λ i ≥...≥λ M and the eigenvector w corresponding to the eigenvalues i Similarly, the feature vector w i Arrange the corresponding eigenvalues ​​in rows from top to bottom, forming a matrix W = (w1, w2, ... w...). i ,...,w M Take the first n rows of matrix W to form matrix A = (w1, w2, ..., wn). i ...w n Let Y = AX, which is the matrix after dimensionality reduction to n dimensions, and matrix A is the transformation matrix.

[0066] After obtaining the dimensionality-reduced feature vector of each image in the dataset, the dimensionality-reduced feature vector of each image is used as a leaf node, and clustering is performed based on the leaf nodes to build a search tree from bottom to top.

[0067] It should be noted that in order to perform synchronous dimensionality reduction on the original feature vector of the search image during the subsequent retrieval process, the transformation matrix used should be consistent with the transformation matrix used when constructing the search tree. Therefore, the transformation matrix A of PCA dimensionality reduction should be saved during the construction of the search tree for use in subsequent retrieval.

[0068] Optionally, the step of using the dimensionality-reduced feature vector of each image in the dataset as a leaf node, and clustering based on the leaf nodes to construct the search tree from bottom to top includes:

[0069] Use the dimensionality-reduced feature vector of each image in the dataset as a leaf node;

[0070] The K-means algorithm is used to cluster every k leaf nodes into an intermediate node of a new layer.

[0071] Determine if the number of intermediate nodes in the new layer is less than or equal to k; if so, use the K-means algorithm to cluster the intermediate nodes in the new layer into root nodes and construct a search tree; if not, use the K-means algorithm to continue clustering every k intermediate nodes into an intermediate node in the new layer.

[0072] Figure 2 This is a schematic diagram of a search tree provided in an embodiment of the present invention. Specifically, using... Figure 2 Taking the search tree shown as an example, in the process of constructing the search tree, the 12 dimensionality-reduced feature vectors are first used as 12 leaf nodes, that is, each leaf node stores a corresponding dimensionality-reduced feature vector. Then, k=4 is set, and the dimensionality-reduced feature vectors in these leaf nodes are used as data points for distribution. The K-means algorithm is used to cluster every 4 leaf nodes into an intermediate node (cluster). The cluster center of this intermediate node is the average of the dimensionality-reduced feature vectors of the 4 leaf nodes. In this way, a new layer of 3 intermediate nodes can be formed. Since the number of intermediate nodes is less than k=4 at this time, the K-means algorithm is directly used to cluster the 3 intermediate nodes into the root node, thus obtaining the search tree.

[0073] After constructing the search tree, it remains in plaintext, posing a risk of data leakage. Therefore, it requires order-preserving encryption. Following the steps of using the reduced-dimensional feature vector of each image in the dataset as leaf nodes and performing clustering based on these leaf nodes to construct the search tree from the bottom up, the process also includes:

[0074] Encrypt each node in the search tree and save the key.

[0075] Specifically, the steps of encrypting each node in the search tree and storing the key include:

[0076] S201. Obtain the dimensionality reduction feature vector of each node in the search tree, wherein the dimensionality reduction feature vector of the middle node and the dimensionality reduction feature vector of the root node are the average of the dimensionality reduction feature vectors of their child nodes.

[0077] S202, reduce the dimensionality of the eigenvector F of the i-th node. i ={f1,f2,...,f n Expanded to Where n represents the dimensionality-reduced eigenvector F i The dimension, fj Represents the dimensionality reduction eigenvector F i In the j-th dimension, a1, a2, ..., a n-1 All are random numbers;

[0078] S203. Generate a random matrix M, a random number Γ, and a random vector ε of dimension 2n. i Afterwards, Encryption is performed to obtain the ciphertext feature vector of the i-th node:

[0079]

[0080] S204. Store the inverse matrix M of the random matrix M. -1 As a key.

[0081] In steps S202 to S203 above, the n-dimensional reduced eigenvector F i ={f1,f2,...,f n After expansion, it forms a 2n-dimensional array. right Further encryption yields the ciphertext feature vector of the i-th node, and this ciphertext feature vector is irreversible, ensuring the security of the information.

[0082] Similarly, the dimensionality-reduced feature vector Q of the image to be searched is obtained using the same method as the dimensionality-reduced feature vectors of each image in the dataset. Step S101, which involves obtaining the image to be searched and extracting its feature vector, includes:

[0083] Get the image to be searched;

[0084] Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector of the image to be searched; the neural network model includes a convolutional neural network and VGG16.

[0085] PCA is used to reduce the dimensionality of the original feature vector of the image to be searched by the transformation matrix A, resulting in the dimensionality-reduced feature vector Q of the image to be searched.

[0086] Optionally, in step S102, the feature vector of the image to be searched is reverse-encrypted to obtain the ciphertext feature vector T of the image to be searched. Q The steps include:

[0087] The dimensionality-reduced feature vector Q = {q1, q2, ..., q} of the image to be searched is... n Expanded to Where n represents the dimension of the dimensionality-reduced feature vector Q, and q1,q2,...,q n Let γ, β1, β2, ..., β be the 1st, 2nd, ..., nth dimensions of the dimensionality-reduced eigenvector Q, respectively.n-1 All are random numbers;

[0088] Generate a random vector ε of dimension 2n q Using key M -1 right Perform reverse encryption to obtain the ciphertext feature vector T of the image to be searched. Q :

[0089]

[0090] In the formula, T represents transpose.

[0091] In step S103, based on the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The steps to find the leaf node with the highest similarity include:

[0092] Calculate the encrypted feature vectors of each intermediate node in the next level below the root node in the search tree and the encrypted feature vector T of the image to be searched. Q The similarity between them;

[0093] For the encrypted feature vector T of the image to be searched Q For the intermediate node with the highest similarity, determine whether each node in its next layer is a leaf node; if so, calculate the encrypted feature vector T between each leaf node and the image to be searched. Q The similarity between them is used to determine the encrypted feature vector T of the image to be searched. Q The leaf node with the highest similarity;

[0094] If not, then calculate the ciphertext feature vector of each intermediate node in the next layer and the ciphertext feature vector T of the image to be searched. Q The similarity between them is calculated, and the encrypted feature vector T for the image to be searched is returned. Q The step is to determine whether each node in the next level of the intermediate node with the highest similarity is a leaf node.

[0095] Still with Figure 2 Taking the search tree shown as an example, since there is only one root node in the search tree, the retrieval process can start from the intermediate node at the next level below the root node, and calculate the encrypted feature vectors of the four intermediate nodes and the encrypted feature vector T of the image to be searched. Q The similarity between them determines the encrypted feature vector T of the image to be searched. Q The most similar intermediate node is then used to further calculate the ciphertext feature vectors of the four leaf nodes contained in this intermediate node and the ciphertext feature vector T of the image to be searched. QThe similarity between the images is used to determine the image in the dataset that is closest to the image to be searched, based on the leaf node with the highest similarity.

[0096] It should be noted that the ciphertext feature vector and the ciphertext feature vector T of any node can be calculated using the following formula. Q Similarity between them:

[0097]

[0098] In the formula, Indicates rounding up. Represents the ciphertext feature vector of any node.

[0099] As can be seen from the above embodiments, the beneficial effects of the present invention are as follows:

[0100] This invention provides an encrypted retrieval method for large-scale images, which utilizes the ciphertext feature vector T Q The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector T. Q The leaf node with the highest similarity is used to identify the image in the dataset that is most similar to the image to be searched. Since the search tree is a multi-branch tree pre-constructed using a clustering algorithm for the images in the dataset, each leaf node of the multi-branch tree contains the feature vector of each image in the dataset, while the intermediate nodes act as indexes, thus realizing a search based on image content.

[0101] Furthermore, the encryption algorithm of this invention is simple to design, and the computational complexity between ciphertexts is infinitely close to that of plaintexts, which helps to reduce search overhead while encrypting.

[0102] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0103] The use of terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples" indicates that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0104] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A method for encrypted retrieval of large-scale images, characterized in that, include: Build and encrypt the search tree; The steps for constructing and encrypting the search tree include: Obtain each image in the dataset and extract the dimensionality-reduced feature vector of each image in the dataset; The reduced feature vector of each image in the dataset is used as a leaf node, and a multi-branch tree is constructed by using the K-means algorithm to cluster the images from bottom to top based on the leaf nodes. In the process of constructing a multi-way tree, when a node in the next layer is clustered as a node in the previous layer, the dimensionality reduction feature vector of the node in the previous layer is the average of the dimensionality reduction feature vectors of all its child nodes. Each node in the multi-way tree is encrypted to obtain a pre-constructed search tree; wherein, when encrypting any node, the node's dimensionality-reduced feature vector is expanded into a vector containing random numbers before encryption; Obtain the image to be searched and extract the feature vector of the image to be searched; The feature vector of the image to be searched is reverse-encrypted to obtain the ciphertext feature vector of the image to be searched. The feature vector of the image to be searched is then reverse-encrypted to obtain the ciphertext feature vector of the image to be searched. The steps include: The dimensionality-reduced feature vector of the image to be searched Expanded to ,in, Represents the dimensionality reduction feature vector Dimensions They represent the dimensionality-reduced feature vectors respectively. The 1st, 2nd, ..., n dimension, All are random numbers; The generation dimension is 2 n random vectors Using the key right Perform reverse encryption to obtain the ciphertext feature vector of the image to be searched. : ; In the formula, Indicates transpose; According to the ciphertext feature vector The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector. The leaf node with the highest similarity; wherein, the search tree is: a multi-branch tree pre-constructed using a clustering algorithm for the images in the dataset, and each leaf node of the multi-branch tree includes the feature vector of each image in the dataset; will be compared with the ciphertext feature vector The image corresponding to the leaf node with the highest similarity in the dataset is determined as the retrieval result of the image to be searched.

2. The encrypted retrieval method for large-scale images according to claim 1, characterized in that, Construct the search tree according to the following steps: Obtain each image from the dataset; Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector of each image in the dataset; the neural network model includes a convolutional neural network and VGG16. PCA dimensionality reduction is performed on the original feature vector of each image in the dataset to obtain the dimensionality-reduced feature vector of each image in the dataset, and the transformation matrix A in the PCA dimensionality reduction process is saved. The reduced-dimensional feature vector of each image in the dataset is used as a leaf node, and clustering is performed based on the leaf nodes to construct a search tree from bottom to top.

3. The encrypted retrieval method for large-scale images according to claim 2, characterized in that, The steps of using the reduced-dimensional feature vector of each image in the dataset as a leaf node, and clustering based on the leaf nodes to construct a search tree from bottom to top include: The dimensionality-reduced feature vector of each image in the dataset is used as a leaf node; The K-means algorithm is used to cluster every k leaf nodes in the leaf nodes upwards into an intermediate node of a new layer; Determine if the number of intermediate nodes in the new layer is less than or equal to k; if so, use the K-means algorithm to cluster the intermediate nodes of the new layer into root nodes to construct a search tree; if not, use the K-means algorithm to continue clustering every k intermediate nodes into an intermediate node of the new layer.

4. The encrypted retrieval method for large-scale images according to claim 2, characterized in that, After the step of using the dimensionality-reduced feature vector of each image in the dataset as a leaf node and performing clustering based on the leaf nodes to construct the search tree from bottom to top, the method further includes: Each node in the search tree is encrypted and the key is stored.

5. The encrypted retrieval method for large-scale images according to claim 4, characterized in that, The steps of encrypting each node in the search tree and storing the key include: Obtain the dimensionality reduction feature vector of each node in the search tree, wherein the dimensionality reduction feature vector of the middle node and the dimensionality reduction feature vector of the root node are the average of the dimensionality reduction feature vectors of the child nodes contained therein; The dimensionality-reduced feature vector of the i-th node Expanded to ,in, Represents the dimensionality reduction feature vector Dimensions Represents the dimensionality reduction feature vector The first in j dimension, All are random numbers; Generate random matrices Random numbers and dimension 2 n random vectors Afterwards, Encryption is performed to obtain the ciphertext feature vector of the i-th node: ; Save the random matrix inverse matrix As a key.

6. The encrypted retrieval method for large-scale images according to claim 2, characterized in that, The steps of acquiring the image to be searched and extracting the feature vector of the image to be searched include: Get the image to be searched; Feature extraction is performed using a pre-trained neural network model to obtain the original feature vector of the image to be searched; wherein, the neural network model includes a convolutional neural network and VGG16; The original feature vector of the search image is reduced to its dimensionality using PCA by the transformation matrix A, resulting in the dimensionality-reduced feature vector of the search image. .

7. The encrypted retrieval method for large-scale images according to claim 1, characterized in that, According to the ciphertext feature vector The search proceeds from top to bottom through a pre-built search tree until a match is found with the ciphertext feature vector. The steps to find the leaf node with the highest similarity include: Calculate the encrypted feature vectors of each intermediate node in the next level below the root node in the search tree and the encrypted feature vector of the image to be searched. The similarity between them; For the encrypted feature vector of the image to be searched For the intermediate node with the highest similarity, determine whether each node in its next layer is a leaf node; if so, calculate the encrypted feature vector of each leaf node and the image to be searched. The similarity between them is used to determine the encrypted feature vector of the image to be searched. The leaf node with the highest similarity; If not, then calculate the ciphertext feature vector of each intermediate node in the next layer and the ciphertext feature vector of the image to be searched. The similarity between them is calculated, and the encrypted feature vector for the image to be searched is returned. The step is to determine whether each node in the next level of the intermediate node with the highest similarity is a leaf node.

8. The encrypted retrieval method for large-scale images according to claim 5, characterized in that, The ciphertext feature vector of any node is calculated using the following formula. Similarity between them: ; In the formula, Indicates rounding up. Represents the ciphertext feature vector of any node.