Image retrieval method, cloud server, first equipment and storage medium

Through encrypted index and role polynomial function verification, it is ensured that only legitimate users can access image data, solving the problem of image privacy leakage in the cloud environment and improving the security of image retrieval.

CN118802277AActive Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410238955.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-01
Publication Date
2024-10-18
Estimated Expiration
2044-03-01

AI Technical Summary

Technical Problem

Existing image retrieval methods have privacy leakage problems in cloud environments. Malicious users disguise themselves as legitimate users to steal image data, and uploading plaintext role values ​​leads to privacy leakage, which reduces the security of image retrieval.

Method used

Using encrypted index, role polynomial function and encrypted image library, encrypted role values ​​and trapdoors are used for verification to ensure that only legitimate users can access image data, avoid uploading of plain text role values, and propose lightweight access control strategies to prevent malicious users from accessing .

Benefits of technology

It effectively prevents malicious users from leaking image privacy, improves the security of image retrieval, reduces the burden of image owners to generate role polynomials, and ensures the privacy of user roles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802277A_ABST
    Figure CN118802277A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image retrieval method, a cloud server, first equipment and a storage medium, the method is applied to the cloud server, and the method comprises the steps that the cloud server receives an encryption index, a first role polynomial function and an encrypted image library sent by the first equipment; receiving a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trap door and a first encryption role value; judging whether a first user role corresponding to the first encryption role value is a first legal user role or not based on the first encryption role value and the first role polynomial function; and under the condition that the first user role is the first legal user role, the target image is determined based on the encryption index, the first encryption trap door and the encryption image library, and the target image is sent to the second equipment, so that a malicious user can be prevented from accessing a system, and the problem of image privacy disclosure is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud security technology, and in particular to an image retrieval method, a cloud server, a first device and a storage medium. Background Art

[0002] Image retrieval technology refers to the technology of searching for images of interest to users in large-scale images, but image retrieval tasks consume a lot of storage resources and computing resources. With the development of cloud technology, more and more image owners tend to upload images to cloud servers with stronger storage and computing capabilities. In the image retrieval task based on the cloud environment, the image owner uploads the image dataset to the cloud, and the cloud performs the image retrieval task and returns the retrieval results to the user.

[0003] However, current privacy-supported image retrieval technologies usually assume that users are honest and trustworthy. However, in actual applications, there are often malicious users who disguise themselves as legitimate users to access the system and steal images from image owners, resulting in privacy leakage. When verifying whether the querying user is a legitimate user, the querying user usually directly uploads the plaintext role value to the cloud for verification. The cloud may collect a collection of legitimate users, resulting in privacy leakage. Therefore, current image retrieval methods have the problem of image privacy leakage, which in turn leads to a decrease in the security of image retrieval. Summary of the invention

[0004] The implementation legislation of this application provides an image retrieval method and a cloud server, a first device and a storage medium, which can avoid image privacy leakage and thereby improve the security of image retrieval.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an image retrieval method, which is applied to a cloud server and includes:

[0007] Receiving an encryption index, a first role polynomial function, and an encrypted image library sent by a first device;

[0008] Receiving a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value;

[0009] Determining whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function;

[0010] In a case where the first user role is the first legal user role, a target image is determined based on the encryption index, the first encryption trapdoor, and the encrypted image library, and the target image is sent to the second device.

[0011] In a second aspect, an embodiment of the present application provides an image retrieval method, which is applied to a first device and includes:

[0012] Determine an encrypted user role set based on a legal user role set corresponding to the image set;

[0013] Determining a first role polynomial function based on the encrypted user role set;

[0014] The first role polynomial function, the encryption index and the encrypted image library are sent to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encryption index and the encrypted image library.

[0015] In a third aspect, an embodiment of the present application provides a cloud server, the cloud server comprising: a receiving unit, a judging unit, a first determining unit, a first sending unit,

[0016] The receiving unit is used to receive the encryption index, the first role polynomial function and the encrypted image library sent by the first device;

[0017] The receiving unit is further configured to receive a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value;

[0018] The judging unit is configured to judge whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function;

[0019] The first determining unit is configured to determine a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library when the first user role is the first legal user role;

[0020] The first sending unit is used to send the target image to the second device.

[0021] In a fourth aspect, an embodiment of the present application provides a cloud server, the cloud server comprising: a first processor and a first memory; wherein:

[0022] The first memory is used to store a computer program that can be run on the processor;

[0023] The first processor is used to execute the above-mentioned image retrieval method when running the computer program.

[0024] In a fifth aspect, an embodiment of the present application provides a first device, wherein the first device includes: a second determining unit, a second sending unit,

[0025] The second determining unit is used to determine the encrypted user role set based on the legal user role set;

[0026] The second determining unit is further configured to determine a first role polynomial function based on the encrypted user role set;

[0027] The second sending unit is used to send the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library.

[0028] In a sixth aspect, an embodiment of the present application provides a first device, the first device comprising: a second processor and a second memory; wherein:

[0029] The second memory is used to store a computer program that can be run on the processor;

[0030] The second processor is used to execute the image retrieval method as described above when running the computer program.

[0031] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that a computer program code is stored on the storage medium, and when the computer program code is executed by a computer, the image retrieval method as described above is implemented.

[0032] In an eighth aspect, a computer program product includes a computer program, wherein when the computer program is executed by a processor, it implements the image retrieval method as described above.

[0033] An embodiment of the present application provides an image retrieval method, a cloud server, a first device and a storage medium, wherein the cloud server receives an encryption index, a first role polynomial function and an encrypted image library sent by the first device; receives a first image retrieval request sent by the second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; based on the first encryption role value and the first role polynomial function, determines whether the first user role corresponding to the first encryption role value is a first legal user role; when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor and the encrypted image library, and sends the target image to the second device; the first device determines an encrypted user role set based on the legal user role set corresponding to the image set; determines the first role polynomial function based on the encrypted user role set; sends the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encrypted index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system, further avoiding the problem of image privacy leakage, and thereby improving the security of image retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 1 ;

[0035] Figure 2 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 2 ;

[0036] Figure 3 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 3 ;

[0037] Figure 4 A schematic diagram of an image retrieval system model proposed in an embodiment of the present application;

[0038] Figure 5 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 4 ;

[0039] Figure 6 Schematic diagram of the structure of the cloud server proposed in this application embodiment Figure 1 ;

[0040] Figure 7 Schematic diagram of the structure of the cloud server proposed in this application embodiment Figure 2 ;

[0041] Figure 8 Schematic diagram of the composition structure of the first device proposed in the embodiment of the present application Figure 1 ;

[0042] Fig. 9 Schematic diagram of the composition structure of the first device proposed in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for ease of description, only the parts related to the related applications are shown in the drawings.

[0044] Image retrieval technology refers to the technology of searching for images of interest to users in large-scale images. However, image retrieval tasks consume a lot of storage and computing resources. With the development of cloud technology, more and more image owners tend to upload images to cloud servers with stronger storage and computing capabilities. In the image retrieval task based on the cloud environment, the image owner uploads the image dataset to the cloud, which performs the image retrieval task and returns the retrieval results to the user. However, the cloud server is considered to be "honest and curious". It will honestly perform the image retrieval task, but it may analyze the stored images to learn more information, resulting in privacy leakage; and malicious users may disguise themselves as legitimate users, resulting in privacy leakage. Therefore, it is necessary to study the privacy-supporting image retrieval scheme based on access control.

[0045] "A secure retrieval method for large-scale images in a cloud environment" This patent discloses a large-scale image secure retrieval method in a cloud environment. The image owner generates an encrypted image library and a security index locally and outsources them to a cloud server. The cloud server can return the image most similar to the query image without decryption during retrieval; this method combines the bag-of-words model and the minimum hashing principle, and has high efficiency in large-scale image secure retrieval, but the scheme directly assumes that the user is completely trustworthy, does not consider the situation where the user is a malicious user, and cannot avoid the situation where malicious users steal image privacy. "A secure image retrieval method based on secret sharing in a cloud environment" This patent discloses a secure image retrieval scheme based on Shamir secret sharing in a cloud environment. In the offline stage, an image index is generated through secret sharing technology and outsourced to multiple cloud servers for storage together with the encrypted image library. In the query stage, the user generates an image trapdoor and sends it to multiple cloud servers respectively. After data interaction between multiple servers, the retrieval results of interest to the user are returned to the user; this method improves a secure multi-party computing method, which can realize image secure retrieval in a multi-cloud server environment without exposing the true Euclidean distance of the image. However, the original intention of this method is to achieve multi-server image security retrieval, but it does not take into account the situation where the user is a malicious user, and cannot identify malicious users.

[0046] Current image retrieval methods have the following problems: (1) Privacy-supporting image retrieval technology usually assumes that users are honest and trustworthy. However, in practical applications, there are often malicious users who disguise themselves as legitimate users to access the system and steal images from image owners, thereby causing privacy leaks. (2) When verifying whether the query user is a legitimate user, the query user usually directly uploads the plaintext role value to the cloud for verification. The cloud may collect the set of legitimate users, resulting in privacy leaks. (3) When the set of legitimate users is updated, that is, when the set of legitimate users is added or reduced, the image owner is usually required to regenerate the role polynomial and upload it to the cloud, which increases the burden on the image owner.

[0047] In order to solve the problem of image privacy leakage in current image retrieval methods, which in turn leads to a decrease in the security of image retrieval, an embodiment of the present application provides an image retrieval method, a cloud server, a first device and a storage medium, wherein the cloud server receives an encrypted index, a first role polynomial function and an encrypted image library sent by the first device; receives a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encrypted role value; based on the first encryption role value and the first role polynomial function, determines whether the first user role corresponding to the first encryption role value is a first legal user role; when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor and the encrypted image library, and sends the target image to the second device; the first device determines an encrypted user role set based on the legal user role set corresponding to the image set; determines a first role polynomial function based on the encrypted user role set; sends the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encrypted index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system, further avoiding the problem of image privacy leakage, and thereby improving the security of image retrieval.

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0049] Embodiment 1

[0050] The present application embodiment provides an image retrieval method, which is applied to a cloud server. Figure 1 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 1 ,like Figure 1 As shown, the image retrieval method may include the following steps:

[0051] Step 101: Receive an encryption index, a first role polynomial function, and an encrypted image library sent by a first device.

[0052] In an embodiment of the present application, the cloud server may receive an encrypted index, a first role polynomial function, and an encrypted image library sent by the first device.

[0053] It should be noted that, in the embodiments of the present application, the first device may be a physical device corresponding to the image owner, and the present application does not specifically limit the type of the first device.

[0054] It should be noted that, in the embodiment of the present application, the first role polynomial function can be expressed by the following formula (1).

[0055]

[0056] Where f(v) represents the first role polynomial function, represents the root of the function, v represents the user's role, c i Indicates v i The coefficient of .

[0057] It should be noted that, in the embodiment of the present application, the encryption index can be expressed by the following formula (2).

[0058]

[0059] Among them, ‖f i ‖ 2 =f i,1 2 +f i,2 2 +...+f i,n 2 , indicating f i The Euclidean form of c1, c2, ..., c m are the coefficients of the role-based polynomial function, f i,1 ,f i,2 ,...,f i,l An image m representing the image library i The corresponding feature vector, i represents the sequence number of the image in the image library, and l represents the dimension of the feature.

[0060] It should be noted that, in the embodiments of the present application, the encrypted image library may be obtained by encrypting based on an image encryption algorithm, and the image encryption algorithm may be an Advanced Encryption Standard (AES) algorithm. The present application does not specifically limit the type of the image encryption algorithm.

[0061] Step 102: Receive a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value.

[0062] In an embodiment of the present application, the cloud server can receive an encrypted index, a first role polynomial function, and an encrypted image library sent by a first device, and can also receive a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value.

[0063] It should be noted that, in the embodiments of the present application, the second device may be a user device, and the present application does not specifically limit the type of the second device.

[0064] It should be noted that, in the embodiment of the present application, the encryption trapdoor can be expressed by the following formula (3).

[0065]

[0066] Where v is the role of the query user, β, α are random positive numbers, q1, q2, ..., q l Denotes the query image q i The corresponding feature vector, l represents the dimension of the feature.

[0067] It should be noted that, in the embodiment of the present application, the first encrypted role value may be obtained by encrypting the user's role. For example, the user's role v may be encrypted to generate the first encrypted role value g. v .

[0068] Step 103: Determine whether the first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function.

[0069] In an embodiment of the present application, the cloud server receives an encrypted index, a first role polynomial function, and an encrypted image library sent by a first device; and a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encrypted role value, and then can determine whether the first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function.

[0070] It should be noted that in an embodiment of the present application, when the cloud server determines whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, the first encrypted role value can be input into the first role polynomial function to obtain an output value; when the output value is a first preset value, the first user role is determined to be the first legal user role; when the output value is not the first preset value, the first user role is determined not to be the first legal user role.

[0071] It should be noted that, in the embodiments of the present application, the first preset value may be 0, and the present application does not specifically limit the size of the first preset value.

[0072] Exemplarily, in the embodiment of the present application, it is assumed that the first encryption role value is The first encrypted role value is input into the first role polynomial function, i.e., the above formula (1), to obtain an output value; when the output value is 0, the first user role is determined to be the first legal user role; when the output value is not 0, the first user role is determined not to be the first legal user role.

[0073] That is to say, in an embodiment of the present application, the cloud server can verify the user role. If the user role belongs to a legitimate user, the image retrieval operation is allowed to continue; if the user is not a legitimate user, the image retrieval operation is not allowed to continue, thereby preventing malicious users from disguising themselves as legitimate users to access the system and steal images of image owners, thereby avoiding image privacy leaks.

[0074] It should be noted that in an embodiment of the present application, after the cloud server determines whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, it can determine the second role polynomial function based on a preset random number and the first role polynomial function.

[0075] It should be noted that, in the embodiments of the present application, the preset random number can be any positive integer, and the present application does not specifically limit the size of the preset random number.

[0076] It should be noted that, in the embodiment of the present application, the second role polynomial function can be expressed by the following formula (4).

[0077] f ′ (v)=mf(v) (4)

[0078] Wherein, m represents a preset random number, and f(v) represents a first role polynomial function.

[0079] It should be noted that, in an embodiment of the present application, the cloud server uses the preset random number to reset the first role polynomial function, so that the role polynomial function is updated for each query, thereby preventing attackers from stealing the legitimate user set based on the role polynomial function.

[0080] It should be noted that, in an embodiment of the present application, the cloud server can also receive a second image retrieval request sent by a second device; wherein the second image retrieval request carries a second encryption trapdoor and a second encryption role value; based on the second encryption role value and the second role polynomial function, it is determined whether the second user role corresponding to the second encryption role value is the first legal user role; when the second user role is the first legal user role, the target image is determined based on the encryption index, the second encryption trapdoor and the encrypted image library.

[0081] That is to say, in an embodiment of the present application, after receiving the second image retrieval request sent by the second device next time, the cloud server can determine whether the second user role corresponding to the second encrypted role value is the first legal user role based on the updated second role polynomial function and the second encrypted role value.

[0082] Step 104: When the first user role is a first legal user role, determine a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library, and send the target image to the second device.

[0083] In an embodiment of the present application, after the cloud server determines whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, it can determine the target image based on the encryption index, the first encryption trapdoor and the encrypted image library when the first user role is the first legal user role, and send the target image to the second device.

[0084] It should be noted that, in the embodiments of the present application, the encrypted index includes N encrypted index vectors, where N is a positive integer, and the present application does not specifically limit the number of encrypted index vectors.

[0085] It should be noted that in an embodiment of the present application, when the cloud server determines the target image based on the encryption index, the first encryption trapdoor and the encrypted image library, it can determine the target encryption index vector based on the first encryption trapdoor and N encryption index vectors; and then the target image can be determined based on the target encryption index vector and the encrypted image library.

[0086] Exemplarily, in an embodiment of the present application, the cloud server can calculate the product of the first encryption trapdoor and N encryption index vectors. The image corresponding to the encryption index with the smallest product (target encryption index) is the image of interest to the user, that is, the target image. The calculation formula is shown in the following formula (5).

[0087]

[0088] Among them, q represents the encryption trapdoor, f i,r represents a certain encrypted index vector, α represents a random positive number, and since the user has been verified as a legitimate user, f(v)=0.

[0089] It should be noted that, in an embodiment of the present application, the cloud server can receive role function information sent by the first device; wherein the role function information includes the first role function, and / or, the second role function; and then the first role polynomial function can be updated based on the role function information.

[0090] It should be noted that, in the embodiment of the present application, the first role function may be a function generated based on a newly added user role.

[0091] It should be noted that, in the embodiment of the present application, the second role function may be a function generated based on the reduced user roles.

[0092] Exemplarily, in an embodiment of the present application, it is assumed that after receiving the first role function sent by the first device, the cloud server can update the first role polynomial function based on the first role function, and the updated role polynomial function is shown in the following formula (6).

[0093] f ′ (v) = f new (v)f(v) (6)

[0094] Among them, f new (v) represents the first role function, and f(v) represents the first role polynomial function.

[0095] Exemplarily, in an embodiment of the present application, it is assumed that after receiving the second role function sent by the first device, the cloud server can update the first role polynomial function based on the second role function, and the updated role polynomial function is shown in the following formula (7).

[0096] f ′ (v) = f(v) / f r (v) (7)

[0097] Among them, f r (v) represents the second role function.

[0098] That is to say, in an embodiment of the present application, the cloud server can update the first role polynomial function based on the received role function information without the first device having to regenerate the role polynomial function and upload it to the cloud server, thereby reducing the burden on the first device.

[0099] In summary, after receiving the encrypted index, the first role polynomial function and the encrypted image library sent by the first device; the first image retrieval request sent by the second device; wherein the first image retrieval request carries the first encryption trapdoor and the first encrypted role value, the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, that is, the cloud server can verify the user role, and if the user role belongs to a legal user, the image retrieval operation is allowed to continue; if the user is not a legal user, the image retrieval operation is not allowed to continue, thereby preventing malicious users from disguising themselves as legal users to access the system and stealing the image of the image owner, thus avoiding image privacy leakage. The cloud server can also receive the role function information sent by the first device; wherein the role function information includes the first role function, and / or, the second role function; then the first role polynomial function can be updated based on the role function information, without the need for the first device to regenerate the role polynomial function and upload it to the cloud server, thereby reducing the burden on the first device.

[0100] An embodiment of the present application provides an image retrieval method, which is applied to a cloud server, wherein the cloud server receives an encrypted index, a first role polynomial function, and an encrypted image library sent by a first device; receives a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; based on the first encryption role value and the first role polynomial function, determines whether a first user role corresponding to the first encryption role value is a first legal user role; when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library, and sends the target image to the second device. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encrypted index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system, further avoiding the problem of image privacy leakage, and thereby improving the security of image retrieval.

[0101] Embodiment 2

[0102] Based on the above embodiment, another embodiment of the present application provides an image retrieval method, which is applied to a first device. Figure 2The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 2 ,like Figure 2 As shown, the image retrieval method may include the following steps:

[0103] Step 201: Determine an encrypted user role set based on a legal user role set corresponding to an image set.

[0104] In an embodiment of the present application, the first device may determine the encrypted user role set based on the legal user role set corresponding to the image set.

[0105] It should be noted that, in the embodiments of the present application, the first device may be a physical device corresponding to the image owner, and the present application does not specifically limit the type of the first device.

[0106] For example, in the embodiment of the present application, it is assumed that the role of user i can be represented by an integer v i The legal user role set corresponding to the image set can be expressed as ε = {v1,v2,...,v m}, where m represents the total number of users who can access the data set.

[0107] For example, in an embodiment of the present application, after determining the legal user role set corresponding to the image set, the first device may encrypt the legal user role set to generate an encrypted user role set. Where g represents a random integer.

[0108] Step 202: Determine a first role polynomial function based on the encrypted user role set.

[0109] In an embodiment of the present application, after the first device determines the encrypted user role set based on the legal user role set corresponding to the image set, it may determine the first role polynomial function based on the encrypted user role set.

[0110] Exemplarily, in an embodiment of the present application, the first device generates an encrypted user role set Afterwards, you can encrypt the user role collection based on The determined first role polynomial function is as shown in the above formula (1).

[0111] It should be noted that in an embodiment of the present application, the first device can determine the corresponding N feature vectors based on the N images in the image set; where N is a positive integer; then N encryption index vectors can be determined based on the N feature vectors; and then the encryption index can be determined based on the N encryption index vectors.

[0112] Exemplarily, in an embodiment of the present application, the first device may determine N corresponding feature vectors f based on N images in the image set. i =(f i,1 ,f i,2 ,...,f i,l ), i represents the sequence number of the image in the image library, l represents the dimension of the feature, and then N feature vectors can be used to determine N encryption index vectors, and then the encryption index can be determined based on the N encryption index vectors. The encryption index can be expressed by the above formula (2).

[0113] It should be noted that in an embodiment of the present application, when a second legal user role is added, the first device can determine a third encrypted role value based on the second legal user role; and then determine the first role function based on the third encrypted role value; when the third legal user role is reduced, the first device can determine a fourth encrypted role value based on the third legal user role; and then determine the second role function based on the fourth encrypted role value; and then send the role function information to the cloud server; wherein the role function information includes the first role function, and / or, the second role function.

[0114] For example, in the embodiment of the present application, when a second legal user role is added, it is assumed that the second legal user role added is v new , the first device can be based on the second legal user role v new Determine the third encryption role value Then, the first role function can be determined based on the third encrypted role value, and the first role function is shown in the following formula (8).

[0115]

[0116] in, represents the third encrypted role value, and v represents the role of the user.

[0117] Exemplarily, in the embodiment of the present application, in the case of reducing the third legal user role, it is assumed that the reduced third legal user role is v r , the first device can be based on the third legal user role v r Determine the fourth encryption role value Then, a second role function may be determined based on the fourth encrypted role value, and the second role function is shown in the following formula (9).

[0118]

[0119] in, represents the fourth encrypted role value, and v represents the role of the user.

[0120] Step 203: Send the first role polynomial function, the encryption index, and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index, and the encrypted image library.

[0121] In an embodiment of the present application, after determining the first role polynomial function based on the encrypted user role set, the first device can send the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library.

[0122] It should be noted that, in an embodiment of the present application, the first device may use an image encryption algorithm to encrypt the image library. The encryption algorithm may be an Advanced Encryption Standard (AES). The present application does not specifically limit the type of the image encryption algorithm.

[0123] To summarize, the first device can first determine the set of legitimate user roles of the image set, and then determine the encrypted user role set based on the legitimate user role set corresponding to the image set; and then determine the first role polynomial function based on the encrypted user role set, that is, when generating the first role polynomial function, the present application can encrypt the legitimate user role set, and send the first role polynomial function, the encrypted index, and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encrypted index, and the encrypted image library.

[0124] The embodiment of the present application provides an image retrieval method, which is applied to a first device, wherein the first device determines an encrypted user role set based on a set of legal user roles corresponding to an image set; determines a first role polynomial function based on the encrypted user role set; and sends the first role polynomial function, the encrypted index, and the encrypted image library to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encrypted index, and the encrypted image library. It can be seen that the first device can determine an encrypted user role set based on a set of legal user roles corresponding to an image set; and then can determine the first role polynomial function based on the encrypted user role set, that is, when generating the first role polynomial function, the present application can encrypt the legal user role set, thereby ensuring the privacy of the user role, and sends the first role polynomial function, the encrypted index, and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encrypted index, and the encrypted image library.

[0125] Embodiment 3

[0126] Based on the above embodiment, another embodiment of the present application provides an image retrieval method, which is applied to a cloud server and a first device. Figure 3 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 3 ,like Figure 3 As shown, the image retrieval method may include the following steps:

[0127] Step 301: The first device determines an encrypted user role set based on a legal user role set corresponding to an image set.

[0128] It should be noted that, in the embodiments of the present application, the first device may be a physical device corresponding to the image owner, and the present application does not specifically limit the type of the first device.

[0129] For example, in the embodiment of the present application, it is assumed that the role of user i can be represented by an integer v i The legal user role set corresponding to the image set can be expressed as ε = {v1,v2,...,v m}, where m represents the total number of users who can access the data set.

[0130] For example, in an embodiment of the present application, after determining the legal user role set corresponding to the image set, the first device may encrypt the legal user role set to generate an encrypted user role set. Where g represents a random integer.

[0131] Step 302: The first device determines a first role polynomial function based on the encrypted user role set.

[0132] Exemplarily, in an embodiment of the present application, the first device generates an encrypted user role set Afterwards, you can encrypt the user role collection based on The determined first role polynomial function is as shown in the above formula (1).

[0133] It should be noted that in an embodiment of the present application, the first device can determine the corresponding N feature vectors based on the N images in the image set; where N is a positive integer; then N encryption index vectors can be determined based on the N feature vectors; and then the encryption index can be determined based on the N encryption index vectors.

[0134] Exemplarily, in an embodiment of the present application, the first device may determine N corresponding feature vectors f based on N images in the image set. i =(f i,1 ,f i,2 ,...,f i,l), i represents the sequence number of the image in the image library, l represents the dimension of the feature, and then N feature vectors can be used to determine N encryption index vectors, and then the encryption index can be determined based on the N encryption index vectors. The encryption index can be expressed by the above formula (2).

[0135] It should be noted that in an embodiment of the present application, when a second legal user role is added, the first device can determine a third encrypted role value based on the second legal user role; and then determine the first role function based on the third encrypted role value; when the third legal user role is reduced, the first device can determine a fourth encrypted role value based on the third legal user role; and then determine the second role function based on the fourth encrypted role value; and then send the role function information to the cloud server; wherein the role function information includes the first role function, and / or, the second role function.

[0136] For example, in the embodiment of the present application, when a second legal user role is added, it is assumed that the second legal user role added is v new , the first device can be based on the second legal user role v new Determine the third encryption role value Then, the first role function can be determined based on the third encrypted role value, and the first role function is shown in the above formula (8).

[0137] Exemplarily, in the embodiment of the present application, in the case of reducing the third legal user role, it is assumed that the reduced third legal user role is v r , the first device can be based on the third legal user role v r Determine the fourth encryption role value Then, a second role function may be determined based on the fourth encrypted role value, and the second role function is as shown in the above formula (9).

[0138] Step 303: The first device sends the first role polynomial function, the encryption index, and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index, and the encrypted image library.

[0139] It should be noted that, in an embodiment of the present application, the first device may use an image encryption algorithm to encrypt the image library. The encryption algorithm may be an Advanced Encryption Standard (AES). The present application does not specifically limit the type of the image encryption algorithm.

[0140] Step 304: The cloud server receives a first image retrieval request sent by the second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value.

[0141] It should be noted that, in the embodiments of the present application, the second device may be a user device, and the present application does not specifically limit the type of the second device.

[0142] It should be noted that, in the embodiment of the present application, the encryption trapdoor can be expressed by the above formula (3).

[0143] It should be noted that, in the embodiment of the present application, the first encrypted role value may be obtained by encrypting the user's role. For example, the user's role v may be encrypted to generate the first encrypted role value g. v .

[0144] Step 305: The cloud server determines whether the first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function.

[0145] It should be noted that in an embodiment of the present application, when the cloud server determines whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, the first encrypted role value can be input into the first role polynomial function to obtain an output value; when the output value is a first preset value, the first user role is determined to be the first legal user role; when the output value is not the first preset value, the first user role is determined not to be the first legal user role.

[0146] It should be noted that, in the embodiments of the present application, the first preset value may be 0, and the present application does not specifically limit the size of the first preset value.

[0147] Exemplarily, in the embodiment of the present application, it is assumed that the first encryption role value is The first encrypted role value is input into the first role polynomial function, i.e., the above formula (1), to obtain an output value; when the output value is 0, the first user role is determined to be the first legal user role; when the output value is not 0, the first user role is determined not to be the first legal user role.

[0148] That is to say, in an embodiment of the present application, the cloud server can verify the user role. If the user role belongs to a legitimate user, the image retrieval operation is allowed to continue; if the user is not a legitimate user, the image retrieval operation is not allowed to continue, thereby preventing malicious users from disguising themselves as legitimate users to access the system and steal images of image owners, thereby avoiding image privacy leaks.

[0149] It should be noted that in an embodiment of the present application, after the cloud server determines whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, it can determine the second role polynomial function based on a preset random number and the first role polynomial function.

[0150] It should be noted that, in the embodiments of the present application, the preset random number can be any positive integer, and the present application does not specifically limit the size of the preset random number.

[0151] It should be noted that, in the embodiment of the present application, the second role polynomial function can be expressed by the above formula (4).

[0152] It should be noted that, in an embodiment of the present application, the cloud server uses the preset random number to reset the first role polynomial function, so that the role polynomial function is updated for each query, thereby preventing attackers from stealing the legitimate user set based on the role polynomial function.

[0153] It should be noted that, in an embodiment of the present application, the cloud server can also receive a second image retrieval request sent by a second device; wherein the second image retrieval request carries a second encryption trapdoor and a second encryption role value; based on the second encryption role value and the second role polynomial function, it is determined whether the second user role corresponding to the second encryption role value is the first legal user role; when the second user role is the first legal user role, the target image is determined based on the encryption index, the second encryption trapdoor and the encrypted image library.

[0154] That is to say, in an embodiment of the present application, after receiving the second image retrieval request sent by the second device next time, the cloud server can determine whether the second user role corresponding to the second encrypted role value is the first legal user role based on the updated second role polynomial function and the second encrypted role value.

[0155] Step 306: When the first user role is the first legal user role, the cloud server determines the target image based on the encryption index, the first encryption trapdoor, and the encrypted image library, and sends the target image to the second device.

[0156] It should be noted that, in the embodiments of the present application, the encrypted index includes N encrypted index vectors, where N is a positive integer, and the present application does not specifically limit the number of encrypted index vectors.

[0157] It should be noted that in an embodiment of the present application, when the cloud server determines the target image based on the encryption index, the first encryption trapdoor and the encrypted image library, it can determine the target encryption index vector based on the first encryption trapdoor and N encryption index vectors; and then the target image can be determined based on the target encryption index vector and the encrypted image library.

[0158] Exemplarily, in an embodiment of the present application, the cloud server can calculate the product of the first encryption trapdoor and N encryption index vectors. The image corresponding to the encryption index with the smallest product (target encryption index) is the image of interest to the user, that is, the target image. The calculation formula is shown in the above formula (5).

[0159] It should be noted that, in an embodiment of the present application, the cloud server can receive role function information sent by the first device; wherein the role function information includes the first role function, and / or, the second role function; and then the first role polynomial function can be updated based on the role function information.

[0160] It should be noted that, in the embodiment of the present application, the first role function may be a function generated based on a newly added user role.

[0161] It should be noted that, in the embodiment of the present application, the second role function may be a function generated based on the reduced user roles.

[0162] Exemplarily, in an embodiment of the present application, it is assumed that after receiving the first role function sent by the first device, the cloud server can update the first role polynomial function based on the first role function, and the updated role polynomial function is shown in the above formula (6).

[0163] Exemplarily, in an embodiment of the present application, it is assumed that after receiving the second role function sent by the first device, the cloud server can update the first role polynomial function based on the second role function, and the updated role polynomial function is shown in the above formula (7).

[0164] That is to say, in an embodiment of the present application, the cloud server can update the first role polynomial function based on the received role function information without the first device having to regenerate the role polynomial function and upload it to the cloud server, thereby reducing the burden on the first device.

[0165] In summary, after receiving the encrypted index, the first role polynomial function and the encrypted image library sent by the first device; the first image retrieval request sent by the second device; wherein the first image retrieval request carries the first encryption trapdoor and the first encrypted role value, the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, that is, the cloud server can verify the user role, and if the user role belongs to a legal user, the image retrieval operation is allowed to continue; if the user is not a legal user, the image retrieval operation is not allowed to continue, thereby preventing malicious users from disguising themselves as legal users to access the system and stealing the image of the image owner, thus avoiding image privacy leakage. The cloud server can also receive the role function information sent by the first device; wherein the role function information includes the first role function, and / or, the second role function; then the first role polynomial function can be updated based on the role function information, without the need for the first device to regenerate the role polynomial function and upload it to the cloud server, thereby reducing the burden on the first device.

[0166] An embodiment of the present application provides an image retrieval method, which is applied to a cloud server and a first device, the cloud server receives an encryption index, a first role polynomial function and an encrypted image library sent by the first device; receives a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; based on the first encryption role value and the first role polynomial function, determines whether the first user role corresponding to the first encryption role value is a first legal user role; when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor and the encrypted image library, and sends the target image to the second device; the first device determines an encrypted user role set based on a legal user role set corresponding to an image set; determines a first role polynomial function based on the encrypted user role set; sends the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encrypted index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system, further avoiding the problem of image privacy leakage, and thereby improving the security of image retrieval.

[0167] Embodiment 4

[0168] Based on the above embodiment, another embodiment of the present application provides an image retrieval method, which is applied to an image retrieval system model. Figure 4 This is a schematic diagram of the image retrieval system model proposed in the embodiment of the present application, such as Figure 4 As shown, the image retrieval system model includes four entities: cloud server, image owner (first device), and user (second device); among them, the image owner (first device): it owns the image database, encrypts the image database and uploads it to the cloud server; it generates an encrypted index based on the image and uploads it to the cloud server; it sets an access control policy for the system, generates a role polynomial (first role polynomial function) and uploads it to the cloud server to identify the user's access rights; cloud server: stores the encrypted database and encrypted index; it performs the image retrieval task and returns the final query result to the user (second device); user: it generates an encrypted trapdoor (first encrypted trapdoor) based on the query image and uploads it to the cloud server; after the cloud server performs the image retrieval task, it decrypts and obtains the image of interest (target image).

[0169] It should be noted that, in the embodiments of the present application, Figure 5 The image retrieval method proposed in this embodiment of the present application is shown in FIG. Figure 4 ,like Figure 5 As shown, the image retrieval method may include the following process, step 401, the image owner (first device) generates an encrypted role set (encrypted user role set) based on a legal user set (legal user role set), generates a role polynomial (first role polynomial function), an encrypted index and an encrypted image library and uploads them to a cloud server; step 402, the user generates and uploads an encrypted trapdoor (first encrypted trapdoor) and an encrypted role (first encrypted role value) to the cloud server; step 403, the cloud server verifies the identity of the user (the first user role corresponding to the first encrypted role value) based on the user role (first encrypted role value) and the role polynomial (first role polynomial function), if the verification is successful, proceed to step 404, the cloud server finds the image (target image) of interest to the user based on the encrypted trapdoor (first encrypted trapdoor) and the encrypted index, and sends it to the user; step 405, the user decrypts to obtain a plaintext image; if the verification fails, proceed to step 406, ending the retrieval.

[0170] It should be noted that, in the embodiment of the present application, the process performed by the image owner (first device) is as follows: Step 1: Generate a role-based polynomial function (first role polynomial function). Assume that the role of user i can be represented by an integer v iAssume that the legal role set (legal user role set) of a selectable image set is represented by ε = {v1, v2, ..., v m}, where m represents the total number of users who can access the data set. Only when the user's role belongs to the set, can the user have access to the data set. Encrypt the user's role set to generate an encrypted role set (encrypted user role set) Where g represents a random integer. For a selectable image set, its access control policy role polynomial (first role polynomial function) is as shown in the above formula (1); further, the coefficient set of the role polynomial is expressed as {c0, c1, c2, ..., c m}; Step 2: Generate an unencrypted index (plaintext index), the image owner (first device) extracts the image m from the image library i The characteristics of the feature vector f i =(f i,1 ,f i,2 ,...,f i,l ), where i represents the sequence number of the image in the image library, and l represents the dimension of the feature; Step 3: The image owner generates an encrypted index, which can be expressed by the above formula (2); Step 4: Encrypt the image library using an image encryption algorithm, such as the AES encryption algorithm, and upload the encrypted image library and the encrypted index, and the role-based polynomial function (the first role polynomial function) to the cloud server.

[0171] It should be noted that, in the embodiment of the present application, the process performed by the user (second device) is as follows: Step 1: Encrypt the user's role v to generate the encrypted role g of the query user v (first encrypted role value); Step 2: Generate an unencrypted trapdoor (plaintext trapdoor), the user extracts the query image q i The characteristics of the feature vector q i =(q1,q2,...,q l ), where l represents the dimension of the feature; Step 3: The user generates an encryption trapdoor, which can be expressed by the above formula (3); Step 4: The encryption trapdoor and the encryption role g v (first encrypted role value) is uploaded to the cloud server together.

[0172] It should be noted that in the embodiment of the present application, the process performed by the cloud server is as follows: Step 1: Role verification: The cloud server verifies the identity of the user based on the user's role. The user's role value (first encrypted role value) is used as input and input into the role polynomial function. The first role polynomial function can be expressed by the above formula (1). If the output is 0 (first preset value), it means that the user (first user role) is a legal user and the image retrieval operation is allowed to continue; otherwise, the user (first user role) is not a legal user and the image retrieval operation is not allowed to continue. After the verification is completed, the cloud generates a random number m (preset random number) and uses the random number to reset the polynomial function (first role polynomial function) so that the polynomial function is updated for each query to prevent attackers from stealing the legal user set based on the polynomial function. The new polynomial function (second role polynomial function) is expressed by the above formula (4); Step 2: Similarity comparison: The cloud server calculates the product of all encryption trapdoors (first encryption trapdoors) and encryption indexes. The image corresponding to the encryption index with the smallest product (target encryption index vector) is the image of interest to the user (target image), that is, the query result; wherein, the encryption trapdoor is calculated. and an encrypted index The product of is calculated as shown in the above formula (5). Step 3: The cloud server returns the query result to the user, and the user decrypts it to obtain the plaintext image.

[0173] It should be noted that, in the embodiments of the present application, the encrypted index includes N encrypted index vectors, where N is a positive integer, and the present application does not specifically limit the number of encrypted index vectors.

[0174] It should be noted that in the embodiment of the present application, the comparison relationship between the plaintext trapdoor and the Euclidean distance of the plaintext index is shown in the following formula (10). Since β>0, α>0, it can be known that Equivalent to dist 2 (f i ,q) <dist 2 (f j ,q). Therefore, the smaller the product of the encryption trapdoor and the encryption index is, the smaller the Euclidean distance between the plaintext trapdoor and the plaintext index is, and the more similar the image corresponding to the plaintext index is to the query image.

[0175]

[0176] It should be noted that in the embodiment of the present application, when a legal role is added or reduced, a role polynomial updating method is given. Imagine the work of the owner (first device): when a legal role (second legal user role) is added, it is assumed that the role of the newly added user (second legal user role) is represented by v new, the image owner generates a first role function, which is shown in the above formula (8) and uploaded to the cloud server; when the legal role (third legal user role) is reduced, it is assumed that the role of the reduced user (third legal user role) is expressed as v r , the image owner generates a second role function, which is shown in the above formula (9), and uploads it to the cloud server. The operation of the cloud server: When the legal role increases, the new role polynomial (updated role polynomial function) is shown in the above formula (6); when the legal role decreases, the new role polynomial (updated role polynomial function) is shown in the above formula (7).

[0177] In summary, after receiving the encrypted index, the first role polynomial function and the encrypted image library sent by the first device; the first image retrieval request sent by the second device; wherein the first image retrieval request carries the first encryption trapdoor and the first encrypted role value, the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function, that is, the cloud server can verify the user role, and if the user role belongs to a legal user, the image retrieval operation is allowed to continue; if the user is not a legal user, the image retrieval operation is not allowed to continue, thereby preventing malicious users from disguising themselves as legal users to access the system and stealing the image of the image owner, thus avoiding image privacy leakage. The cloud server can also receive the role function information sent by the first device; wherein the role function information includes the first role function, and / or, the second role function; then the first role polynomial function can be updated based on the role function information, without the need for the first device to regenerate the role polynomial function and upload it to the cloud server, thereby reducing the burden on the first device.

[0178] An embodiment of the present application provides an image retrieval method, which is applied to a cloud server and a first device, the cloud server receives an encryption index, a first role polynomial function and an encrypted image library sent by the first device; receives a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; based on the first encryption role value and the first role polynomial function, determines whether the first user role corresponding to the first encryption role value is a first legal user role; when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor and the encrypted image library, and sends the target image to the second device; the first device determines an encrypted user role set based on a legal user role set corresponding to an image set; determines a first role polynomial function based on the encrypted user role set; sends the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encrypted index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system, further avoiding the problem of image privacy leakage, and thereby improving the security of image retrieval.

[0179] Embodiment 5

[0180] Based on the above embodiments, the present application provides a cloud server. Figure 6 Schematic diagram of the cloud server structure Figure 1 ,like Figure 6 As shown, the cloud server 10 includes: a receiving unit 11, a judging unit 12, a first determining unit 13, and a first sending unit 14;

[0181] The receiving unit 11 is used to receive the encryption index, the first role polynomial function and the encrypted image library sent by the first device;

[0182] The receiving unit 11 is further configured to receive a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value;

[0183] The judging unit 12 is configured to judge whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function;

[0184] The first determining unit 13 is configured to determine a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library when the first user role is the first legal user role;

[0185] The first sending unit 14 is used to send the target image to the second device.

[0186] In the embodiments of the present application, further, Figure 7 Schematic diagram of the cloud server structure Figure 2 ,like Figure 7 As shown, the cloud server 10 proposed in the embodiment of the present application may also include a first processor 15, a first memory 16 storing executable instructions of the first processor 15, and further, the cloud server 10 may also include a first communication interface 17, and a first bus 18 for connecting the first processor 15, the first memory 16 and the first communication interface 17.

[0187] In an embodiment of the present application, the first processor 15 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application is not specifically limited. The cloud server 10 may also include a first memory 16, which may be connected to the first processor 15, wherein the first memory 16 is used to store executable program code, the program code including computer operation instructions, and the first memory 16 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.

[0188] In the embodiment of the present application, the first bus 18 is used to connect the first communication interface 17, the first processor 15 and the first memory 16, and the mutual communication between these devices.

[0189] In the embodiment of the present application, the first memory 16 is used to store instructions and data.

[0190] Further, in an embodiment of the present application, the above-mentioned first processor 15 is used for the cloud server to receive the encryption index, the first role polynomial function and the encrypted image library sent by the first device; receive the first image retrieval request sent by the second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; based on the first encryption role value and the first role polynomial function, determine whether the first user role corresponding to the first encryption role value is a first legal user role; in the case that the first user role is the first legal user role, determine the target image based on the encryption index, the first encryption trapdoor and the encrypted image library, and send the target image to the second device.

[0191] In practical applications, the first memory 16 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 15.

[0192] An embodiment of the present application provides a cloud server, which receives an encryption index, a first role polynomial function, and an encrypted image library sent by a first device; receives a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; determines whether a first user role corresponding to the first encryption role value is a first legal user role based on the first encryption role value and the first role polynomial function; and when the first user role is the first legal user role, determines a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library, and sends the target image to the second device. It can be seen that the role value received by the cloud server is the first encrypted role value rather than the plaintext role value, thereby avoiding the privacy leakage problem that may be caused by uploading the plaintext role, and the present application proposes a lightweight access control strategy, that is, the identity information of the first user role corresponding to the first encrypted role value can be verified, and the cloud server can determine whether the first user role corresponding to the first encrypted role value is the first legal user role based on the first encrypted role value and the first role polynomial function. When the first user role is verified to be the first legal user role, the target image can be determined based on the encryption index, the first encryption trapdoor and the encrypted image library, thereby preventing malicious users from accessing the system and further avoiding the problem of image privacy leakage.

[0193] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the image retrieval method as described above is implemented.

[0194] Specifically, the program instructions corresponding to an image retrieval method in this embodiment can be stored in a storage medium such as a CD, a hard disk, a USB flash drive, etc. When the program instructions corresponding to an image retrieval method in the storage medium are read or executed by an electronic device, the following steps are included:

[0195] Receiving an encryption index, a first role polynomial function, and an encrypted image library sent by a first device;

[0196] Receiving a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value;

[0197] Determining whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function;

[0198] In a case where the first user role is the first legal user role, a target image is determined based on the encryption index, the first encryption trapdoor, and the encrypted image library, and the target image is sent to the second device.

[0199] In the embodiments of the present application, further, Figure 8 Schematic diagram of the composition structure of the first device Figure 1 ,like Figure 8 As shown, the first device 20 includes: a second determining unit 21, a second sending unit 22;

[0200] The second determining unit 21 is used to determine the encrypted user role set based on the legal user role set;

[0201] The second determining unit 21 is further configured to determine a first role polynomial function based on the encrypted user role set;

[0202] The second sending unit 22 is used to send the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library.

[0203] In the embodiments of the present application, further, Fig. 9 Schematic diagram of the composition structure of the first device Figure 2 ,like Fig. 9 As shown, the first device 20 proposed in the embodiment of the present application may also include a second processor 23, a second memory 24 storing executable instructions of the second processor 23, and further, the first device 20 may also include a second communication interface 25, and a second bus 26 for connecting the second processor 23, the second memory 24 and the second communication interface 25.

[0204] In the embodiment of the present application, the second processor 23 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiment of the present application is not specifically limited. The first device 20 can also include a second memory 24, which can be connected to the second processor 23, wherein the second memory 24 is used to store executable program code, the program code includes computer operation instructions, and the second memory 24 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.

[0205] In the embodiment of the present application, the second bus 26 is used to connect the second communication interface 25, the second processor 23 and the second memory 24, and the mutual communication between these devices.

[0206] In the embodiment of the present application, the second memory 24 is used to store instructions and data.

[0207] Furthermore, in an embodiment of the present application, the above-mentioned second processor 23 is used to determine an encrypted user role set based on a legitimate user role set corresponding to an image set; determine a first role polynomial function based on the encrypted user role set; and send the first role polynomial function, the encryption index, and the encrypted image library to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encryption index, and the encrypted image library.

[0208] In practical applications, the second memory 24 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the second processor 23.

[0209] The embodiment of the present application provides a first device, which determines an encrypted user role set based on a set of legal user roles corresponding to an image set; determines a first role polynomial function based on the encrypted user role set; and sends the first role polynomial function, the encryption index, and the encrypted image library to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encryption index, and the encrypted image library. It can be seen that the first device can determine an encrypted user role set based on a set of legal user roles corresponding to an image set; and then can determine the first role polynomial function based on the encrypted user role set, that is, when generating the first role polynomial function, the present application can encrypt the legal user role set, thereby ensuring the privacy of the user role, and sends the first role polynomial function, the encryption index, and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index, and the encrypted image library.

[0210] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the image retrieval method as described above is implemented.

[0211] Specifically, the program instructions corresponding to an image retrieval method in this embodiment can be stored in a storage medium such as a CD, a hard disk, a USB flash drive, etc. When the program instructions corresponding to an image retrieval method in the storage medium are read or executed by an electronic device, the following steps are included:

[0212] Determine an encrypted user role set based on a legal user role set corresponding to the image set;

[0213] Determining a first role polynomial function based on the encrypted user role set;

[0214] The first role polynomial function, the encryption index and the encrypted image library are sent to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encryption index and the encrypted image library.

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

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

[0217] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

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

[0219] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. An image retrieval method, It is characterized in that The method is applied to a cloud server, and the method comprises: Receiving an encryption index, a first role polynomial function, and an encrypted image library sent by a first device; Receiving a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; Determining whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function; In a case where the first user role is the first legal user role, a target image is determined based on the encryption index, the first encryption trapdoor, and the encrypted image library, and the target image is sent to the second device.

2. The method according to claim 1, It is characterized in that The determining, based on the first encrypted role value and the first role polynomial function, whether the first user role corresponding to the first encrypted role value is a first legal user role includes: Inputting the first encrypted role value into the first role polynomial function to obtain an output value; When the output value is a first preset value, determining that the first user role is the first legal user role; When the output value is not the first preset value, it is determined that the first user role is not the first legal user role.

3. The method according to claim 1 or 2, It is characterized in that After determining whether the first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function, the method further includes: A second role polynomial function is determined based on a preset random number and the first role polynomial function.

4. The method according to claim 3, It is characterized in that The method further comprises: receiving a second image retrieval request sent by the second device; wherein the second image retrieval request carries a second encryption trapdoor and a second encryption role value; Determining whether a second user role corresponding to the second encrypted role value is the first legal user role based on the second encrypted role value and the second role polynomial function; In a case where the second user role is the first legal user role, a target image is determined based on the encryption index, the second encryption trapdoor, and the encrypted image library.

5. The method according to claim 1, It is characterized in that The encryption index includes N encryption index vectors, where N is a positive integer, and determining the target image based on the encryption index, the first encryption trapdoor, and the encrypted image library includes: Determine a target encryption index vector based on the first encryption trapdoor and the N encryption index vectors; The target image is determined based on the target encryption index vector and the encrypted image library.

6. The method according to claim 1, It is characterized in that The method further comprises: Receiving role function information sent by the first device; wherein the role function information includes a first role function and / or a second role function; The first role polynomial function is updated based on the role function information.

7. An image retrieval method, It is characterized in that The method is applied to a first device, and the method includes: Determine an encrypted user role set based on a legal user role set corresponding to the image set; Determining a first role polynomial function based on the encrypted user role set; The first role polynomial function, the encryption index and the encrypted image library are sent to a cloud server, so that the cloud server determines a target image based on the first role polynomial function, the encryption index and the encrypted image library.

8. The method according to claim 7, It is characterized in that The method further comprises: Determine corresponding N feature vectors based on the N images in the image set; wherein N is a positive integer; Determine N encrypted index vectors based on the N feature vectors; The encryption index is determined based on the N encryption index vectors.

9. The method according to claim 7, It is characterized in that The method further comprises: In the case where a second legal user role is added, determining a third encrypted role value based on the second legal user role; determining a first role function based on the third encrypted role value; In case of reducing the third legal user role, determining a fourth encrypted role value based on the third legal user role; determining a second role function based on the fourth encrypted role value; Sending role function information to the cloud server; wherein the role function information includes the first role function and / or the second role function.

10. A cloud server, It is characterized in that The cloud server includes: a receiving unit, a judging unit, a first determining unit, and a first sending unit; The receiving unit is used to receive the encryption index, the first role polynomial function and the encrypted image library sent by the first device; The receiving unit is further configured to receive a first image retrieval request sent by a second device; wherein the first image retrieval request carries a first encryption trapdoor and a first encryption role value; The judging unit is configured to judge whether a first user role corresponding to the first encrypted role value is a first legal user role based on the first encrypted role value and the first role polynomial function; The first determining unit is configured to determine a target image based on the encryption index, the first encryption trapdoor, and the encrypted image library when the first user role is the first legal user role; The first sending unit is used to send the target image to the second device.

11. A cloud server, It is characterized in that The cloud server comprises: a first processor and a first memory; wherein, The first memory is used to store a computer program that can be run on the processor; The first processor is configured to execute the method according to any one of claims 1 to 6 when running the computer program.

12. A first device, It is characterized in that The first device includes: a second determining unit, a second sending unit, The second determining unit is used to determine the encrypted user role set based on the legal user role set; The second determining unit is further configured to determine a first role polynomial function based on the encrypted user role set; The second sending unit is used to send the first role polynomial function, the encryption index and the encrypted image library to the cloud server, so that the cloud server determines the target image based on the first role polynomial function, the encryption index and the encrypted image library.

13. A first device, It is characterized in that The first device comprises: a second processor and a second memory; wherein, The second memory is used to store a computer program that can be run on the processor; The second processor is used to execute the method according to any one of claims 7 to 9 when running the computer program.

14. A computer-readable storage medium, It is characterized in that The storage medium stores computer program codes, which, when executed by a computer, execute the method described in any one of claims 1 to 6 or 7 to 9.

15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1-6 or 7-9.

Citation Information

Patent Citations

  • Searchable image encryption algorithm

    CN106875325A

  • Privacy-protected encrypted image retrieval method and system

    CN112528064A

  • Space keyword search method based on cloud computing privacy protection

    CN113177167A

  • Verifiable fine-grained encrypted image retrieval method and system

    CN113420175A

  • Structure Preserving Database Encryption Method and System

    US20080133935A1