A blockchain-assisted privacy-preserving image retrieval method
Image retrieval and data integrity verification are implemented in a multi-cloud environment through blockchain technology and hash algorithms, which solves the problems of privacy protection and retrieval result accuracy, and improves retrieval efficiency and security.
Patent Information
- Application Number
- CN202210071061.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The existing technology has problems such as privacy information leakage, inaccurate retrieval results, and difficulty in data integrity verification in multi-cloud environments in image retrieval. Especially in content-based image retrieval and multi-cloud environments, it is difficult to achieve efficient and secure privacy protection and Data integrity verification.
Blockchain technology is used combined with local sensitive hash algorithm and KNN algorithm to encrypt image features, build Merkle hash tree and index table, achieve decentralized image retrieval through alliance chain, and verify cloud data integrity through ring signature technology .
It achieves fast and efficient image retrieval and data integrity verification in a multi-cloud environment, ensuring user privacy protection and data security, and improving the efficiency and accuracy of retrieval solutions.
Smart Images

Figure CN114579787B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing and data auditing, and specifically relates to a blockchain-assisted privacy-preserving image retrieval method. Background Art
[0002] With the increasing popularity of mobile devices, a large number of high-resolution images are generated every day for a variety of purposes, including publishing, education, and medicine. Due to the limited storage space of electronic devices, most image owners choose to store their images in cloud services, such as Apple Cloud, Baidu Cloud, Tencent Cloud, Alibaba Cloud, etc. Faced with large image datasets, effective image retrieval has become a common need. At present, there are two main techniques for image retrieval: text-based retrieval and content-based retrieval. Text-based image retrieval methods require the generation of text descriptors for each image, so there are some shortcomings. First, the accuracy of the retrieval results depends entirely on the accuracy of the image text annotation, but it is difficult to accurately annotate text for most images. Second, this method requires a lot of manual work to annotate images, which is not efficient for large-scale image retrieval. Due to the limitations of text-based image retrieval techniques, researchers' interest has gradually shifted to content-based image retrieval, which retrieves images from a database by querying the visual features of the image.
[0003] As we all know, images usually contain sensitive privacy information, so it is very necessary to encrypt images before storing them on cloud servers. Recognizing the importance of image privacy, researchers and social media sites have developed various privacy policies and tools to protect the privacy of image owners. However, most of the current research results focus on encrypted images rather than the characteristics of encrypted images, which exposes the user's retrieval intention. Searchable encryption can achieve ciphertext domain image search without losing data confidentiality. Although this method protects the user's search intention, it also brings a higher computational and storage burden.
[0004] With the explosive growth of image data, people hope to retrieve more images similar to the query image through multiple cloud servers instead of one cloud server. Most of the existing image retrieval works focus on a single semi-trusted cloud server, and the research on multi-cloud image retrieval is very limited. In addition, there are two security issues that need to be addressed in multi-cloud image retrieval. On the one hand, since the central retrieval server of the multi-cloud may return false or incomplete search results in order to obtain commercial profits, the accuracy of the retrieval is reduced, which seriously damages the interests of users. For example, a user pays and wants to download similar images from a cloud server, but the retrieved image is far from what he / she wants. On the other hand, in order to save computing and bandwidth resources, the cloud server may delete or tamper with images that users do not frequently access, thereby destroying the integrity of the image data, resulting in the loss of important information of the image owner, or errors in the user's decryption of the image.
[0005] Blockchain is a new network model with the characteristics of decentralization, anonymity and data consistency. It utilizes technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. In a blockchain network, each node has a public-private key pair. When a node ends a transaction, it first uses its private key to sign the transaction content and attaches the signature to the transaction. After receiving the broadcast message, other nodes first verify the attached signature of the transaction. Only after completing the verification of message integrity and transaction legitimacy can they confirm the transaction. Due to the above characteristics, blockchain can replace the central retrieval server to realize decentralized image retrieval.
[0006] In summary, in a multi-cloud environment, it is necessary to build a privacy-preserving image retrieval solution based on blockchain. Summary of the invention
[0007] Purpose of the invention: The present invention proposes a blockchain-assisted privacy-preserving image retrieval method, which combines the local sensitive hashing algorithm to build an index table and uses the secure KNN algorithm to encrypt image features. It can not only retrieve images on multiple clouds quickly and efficiently, but also detect whether the cloud image data has been deleted or tampered with.
[0008] Technical solution: A blockchain-assisted privacy-preserving image retrieval method according to the present invention comprises the following steps:
[0009] (1) The image owner uses a convolutional neural network model to extract image features;
[0010] (2) Use kNN algorithm to encrypt each image feature;
[0011] (3) Each image is encrypted using the SM4 algorithm and the ciphertext image is uploaded to the cloud server;
[0012] (4) The image owner calculates the hash of the ciphertext image and generates a Merkle hash tree;
[0013] (5) Use the position-sensitive hashing algorithm to build an index table of encrypted image features, and upload the index table and Merkle hash tree to the consortium chain;
[0014] (6) The user encrypts the features of the query image and uploads it to the consortium chain;
[0015] (7) Query the index table and retrieve the IDs of the first k images similar to the query image;
[0016] (8) The k IDs are returned to the cloud, which sends the corresponding image to the user, who decrypts the image to obtain the plaintext image;
[0017] (9) The image owner sends a verification request and challenge message to the cloud server;
[0018] (10) The cloud server returns the corresponding image, auxiliary verification information, and root hash value to the image owner based on the challenge information;
[0019] (12) The image owner calculates the hash of the returned image and then calculates a new root hash value based on the hash of the returned image and the auxiliary verification information;
[0020] (12) Compare the new root hash value with the root hash value returned by the cloud server to see if they are equal. If they are equal, it proves that the image data is complete; otherwise, it proves that the image data is incomplete.
[0021] Furthermore, the implementation process of step (2) is as follows:
[0022] For each image I i The eigenvector F i =(F i1 ,F i2 ,…,F in ), the image owner expands F i F i '=(F i1 ,F i2 ,…,F in ,||F i || 2 ) T , then calculate
[0023]
[0024] Where S j ∈S, S is a random bit string, v is a random value; finally, the encrypted image features are obtained Where M1 and M2 are two reversible matrices.
[0025] Furthermore, the implementation process of step (4) is as follows:
[0026] For each ciphertext image c i , calculate its hash H in turn i =Hash(c i ), in order to build the index table, calculate the following hash values in sequence
[0027] H {1,2} =Hash(H1||H2);
[0028] H {3,4} =Hash(H3||H4);
[0029] H {1,4} =Hash(H {1 , 2} ||H {3,4} );
[0030] H {1,n / 2} =Hash(H {1,n / 4} ||H {n / 4,n / 2} );
[0031] H {n / 2,n} =Hash(H {n / 2,3n / 4} ||H {3n / 4,n} );
[0032] Finally, calculate the root hash value Hr = Hash (H {1,n / 2} ||H {n / 2,n} ).
[0033] Furthermore, the implementation process of step (6) is as follows:
[0034] When a user wants to retrieve an image q, for a query image q, the user expands q to
[0035] q'=(q1,q2,…,q n ,||q i || 2 ) T , then calculate
[0036]
[0037] Where S j ∈S, S is a random bit string, v is a random value; finally, the encrypted query feature is obtained Where 0<α<1, M1 and M2 are two reversible matrices.
[0038] Furthermore, the implementation process of step (7) is as follows:
[0039] By querying the index table, we locate a class containing images similar to the query image, and then calculate the distance E between the ciphertext features of each image in this class and the ciphertext features of the query image. T ·E i , where E T is the transpose of the encrypted query feature E, and finds the IDs of the top k images with the smallest distance.
[0040] Furthermore, the implementation process of step (10) is as follows:
[0041] When the image owner wants to verify the integrity of the data stored in the cloud, he first sends a verification request and a randomly generated bit string {b l}, where l represents the ID of the image; if b l =1, the image owner sends the image ID to the cloud server, the cloud server sends the corresponding image to the image owner, and then the image owner calculates the hash of these images; and returns auxiliary information such as the hash value of the adjacent nodes and the root hash value Hr stored in the blockchain to the image owner.
[0042] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects: The present invention adopts advanced ring signature technology to design data tags, which can not only quickly and effectively verify the integrity of cloud data, but also ensure security; at the same time, it solves the problem of data integrity verification in a multi-cloud environment and improves the efficiency of such verification schemes. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flowchart of blockchain-assisted image retrieval;
[0044] Figure 2 It is a flow chart of data integrity verification. DETAILED DESCRIPTION
[0045] The present invention is further described in detail below with reference to the accompanying drawings.
[0046] The present invention proposes a blockchain-assisted privacy-preserving image retrieval method, such as Figure 1 As shown, the specific steps include:
[0047] Before uploading the data to the cloud, the data is processed first. The processing process is as follows:
[0048] First, the image owner uses a convolutional neural network model to extract image features; then the kNN algorithm is used to encrypt each image feature. The specific process is as follows:
[0049] For each image I i The eigenvector F i =(F i1,F i2 ,…,F in ), the image owner expands F i F i '=(F i1 ,F i2 ,…,F in ,||F i || 2 ) T , then F i 'Divide into two parts F i 1 and F i 2 , calculated as follows:
[0050]
[0051] Among them, S j ∈S,F ij ∈(F i1 ,F i2 ,…,F in ), S is a random bit string, v is a random value, F i is image I i The eigenvector of i1 ,F i2 ,…,F in Yes F i Each component of . Finally, the encrypted image features are obtained Where M1 and M2 are two reversible matrices.
[0052] Each image is encrypted using the SM4 algorithm and the ciphertext image is uploaded to the cloud server; secondly, the image owner calculates the hash of the ciphertext image and generates a Merkle hash tree. The specific process is as follows:
[0053] For each ciphertext image c i , calculate its hash H in turn i =Hash(c i ), in order to build the index table, the following hash values are calculated in sequence:
[0054] H {1,2} =Hash(H1||H2);
[0055] H {3,4} =Hash(H3||H4);
[0056] H {1,4} =Hash(H {1 , 2} ||H {3,4} );
[0057] H{1,n / 2} =Hash(H {1,n / 4} ||H {n / 4,n / 2} );
[0058] H {n / 2,n} =Hash(H {n / 2,3n / 4} ||H {3n / 4,n} );
[0059] Then calculate the root hash value Hr = Hash (H {1,n / 2} ||H {n / 2,n} ).
[0060] The image owner uses the position-sensitive hashing algorithm to build an index table of encrypted image features and uploads the index table and Merkle hash tree to the consortium chain; when the user wants to retrieve image q, for the query image q, the user expands q to q'=(q1,q2,…,q n ,||q i || 2 ) T , then calculate:
[0061]
[0062] Where S j ∈S, S is a random bit string, v is a random value. Finally, the encrypted query image features are obtained Where 0<α<1, M1 and M2 are two reversible matrices.
[0063] By querying the index table, the IDs of the first k images similar to the query image are retrieved. The specific process is as follows:
[0064] First, by querying the index table, locate the class containing images similar to the query image, and then calculate the distance E between the ciphertext features of each image in this class and the ciphertext features of the query image T ·E i , find the IDs of the first k images with the smallest distance. Return the k IDs to the cloud, the cloud sends the corresponding image to the user, and the user decrypts the image to obtain the plaintext image.
[0065] The image owner sends a verification request and challenge information to the cloud server. The cloud server returns the corresponding image, auxiliary verification information and root hash value to the image owner based on the challenge information. When the image owner wants to verify whether the data stored in the cloud is complete, he first sends a verification request and a randomly generated bit string {b l}, where l represents the ID of the image. l =1, the image owner sends the image ID to the cloud server, the cloud server sends the corresponding image to the image owner, and then the image owner calculates the hash of these images.
[0066] The hash values of the adjacent nodes and the root hash value Hr stored in the blockchain and other auxiliary information are returned to the image owner. Finally, the image owner calculates a new root hash value Hr' based on the hash value of the image and the auxiliary verification information. The new root hash value is compared with the root hash value returned by the cloud server to see if they are equal. If they are equal, it proves that the image data is complete, otherwise it proves that the image data is damaged. Figure 2 shown.
[0067] The present invention adopts blockchain technology, which can not only quickly and effectively retrieve images on multiple clouds, but also verify the integrity of image data stored in the cloud. At the same time, it solves the problem of image retrieval in a multi-cloud environment and improves the efficiency of such retrieval solutions.
[0068] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A blockchain-assisted privacy-preserving image retrieval method, characterized in that: The following steps are involved: (1) The image owner uses a convolutional neural network model to extract image features; (2) Use kNN algorithm to encrypt each image feature; (3) Each image is encrypted using the SM4 algorithm and the ciphertext image is uploaded to the cloud server; (4) The image owner calculates the hash of the ciphertext image and generates a Merkle hash tree; (5) Use the position-sensitive hashing algorithm to build an index table of encrypted image features, and upload the index table and Merkle hash tree to the consortium chain; (6) The user encrypts the features of the query image and uploads it to the consortium chain; (7) Query the index table and retrieve the IDs of the first k images similar to the query image; (8) The k IDs are returned to the cloud, which sends the corresponding image to the user, who decrypts the image to obtain the plaintext image; (9) The image owner sends a verification request and challenge message to the cloud server; (10) The cloud server returns the corresponding image, auxiliary verification information, and root hash value to the image owner based on the challenge information; (11) The image owner calculates the hash of the returned image and then calculates a new root hash value based on the hash of the returned image and the auxiliary verification information; (12) Compare the new root hash value with the root hash value returned by the cloud server to see if they are equal. If they are equal, it proves that the image data is complete; otherwise, it proves that the image data is incomplete.
2. The blockchain-assisted privacy-preserving image retrieval method according to claim 1, characterized in that: The implementation process of step (2) is as follows: For each image I i The eigenvector F i =(F i1 ,F i2 ,…,F in ), the image owner expands F i F i '=(F i1 ,F i2 ,…,F in ,||F i || 2 ) T , then calculate Where S j ∈S, S is a random bit string, v is a random value; finally, the encrypted image features are obtained Where M1 and M2 are two reversible matrices.
3. The blockchain-assisted privacy-preserving image retrieval method according to claim 1, characterized in that: The implementation process of step (4) is as follows: For each ciphertext image c i , calculate its hash H in turn i =Hash(c i ), in order to build the index table, calculate the following hash values in sequence H {1,2} =Hash(H1||H2); H {3,4} =Hash(H3||H4); H {1,4} =Hash(H {1 , 2} ||H {3,4} ); H {1,n / 2} =Hash(H {1,n / 4} ||H {n / 4,n / 2} ); H {n / 2,n} =Hash(H {n / 2,3n / 4} ||H {3n / 4,n} ); Finally, calculate the root hash value Hr = Hash (H {1,n / 2} ||H {n / 2,n} ).
4. The blockchain-assisted privacy-preserving image retrieval method according to claim 1, characterized in that: The implementation process of step (6) is as follows: When a user wants to retrieve an image q, for the query image q, the user expands q to q' = (q1, q2, ..., q n ,||q i || 2 ) T , then calculate Where S j ∈S, S is a random bit string, v is a random value; finally, the encrypted query feature is obtained Where 0<α<1, M1 and M2 are two reversible matrices.
5. The blockchain-assisted privacy-preserving image retrieval method according to claim 1, characterized in that: The implementation process of step (7) is as follows: By querying the index table, locate the class containing images similar to the query image, and then calculate the distance E between the ciphertext features of each image in this class and the ciphertext features of the query image T ·E i , where E T is the transpose of the encrypted query feature E, and finds the IDs of the top k images with the smallest distance.
6. The blockchain-assisted privacy-preserving image retrieval method according to claim 1, characterized in that: The implementation process of step (10) is as follows: When the image owner wants to verify the integrity of the data stored in the cloud, he first sends a verification request and a randomly generated bit string {b l }, where l represents the ID of the image; if b l =1, the image owner sends the image ID to the cloud server, the cloud server sends the corresponding image to the image owner, and then the image owner calculates the hash of these images; Auxiliary information such as the hash values of adjacent nodes and the root hash value Hr stored in the blockchain are returned to the image owner.
