Image encryption and retrieval method and system based on four-dimensional memristor chaotic system
Through the image encryption and retrieval method based on the four-dimensional memristor chaotic system, the security index and query trap mechanism are used to solve the problems of security and efficiency in image encryption and retrieval, and efficient and secure image retrieval is achieved, taking into account the privacy and efficiency of cloud storage.
Patent Information
- Application Number
- CN202411991903.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art is difficult to take into account the security and retrieval efficiency of data in image encryption and retrieval. Especially in cloud storage, the retrieval function of the ciphertext domain is limited and cannot effectively prevent the leakage of sensitive information.
Image encryption and search method based on four-dimensional memristor chaotic system is adopted to encrypt images by generating chaotic sequences, and efficient retrieval of image ciphertext is achieved using secure index and query trap gate mechanism. This method is based on random matrix and feature extension technology to ensure that the privacy of users’ queries is not leaked and to achieve access control of unauthorized users.
It significantly improves the security of image encryption, realizes efficient retrieval of image ciphertext, significantly reduces the risk of data leakage, solves the security of retrieval, and takes into account the privacy and efficiency of cloud storage.
Smart Images

Figure CN119834949A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field related to image encryption and image retrieval, and specifically, to an image encryption and retrieval method and system based on a four-dimensional memristor chaotic system. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] With the rapid development of Internet technology and cloud computing, cloud storage has attracted a large number of users to outsource local data to the cloud due to its low price, high convenience, high integration and high resource utilization. However, as a non-fully trusted third party, cloud servers face data security and privacy protection risks after users outsource data to the cloud, especially when storing and managing sensitive image data. To ensure data security, users need to encrypt image data before storing it, and also require efficient retrieval in an encrypted state to meet actual application needs.
[0004] Image retrieval refers to finding images that match the query conditions from an image database based on the query conditions provided by the user. At present, some studies have proposed methods that combine content-based image retrieval and chaotic encryption. These methods protect the privacy information of images during transmission and storage through encryption technology, and realize secure retrieval of images through ciphertext domain retrieval. However, chaotic encryption is mainly used to protect the storage and transmission security of data, but when ciphertext domain retrieval is required, chaotic encryption algorithms cannot support retrieval operations well. This is because chaotic encryption usually does not support homomorphic operations or retrieve specific ciphertext features, resulting in limited retrieval functions in the ciphertext domain. In addition, sensitive information leakage cannot be effectively prevented during the retrieval process, making it difficult to ensure retrieval security. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes an image encryption and retrieval method and system based on a four-dimensional memristor chaotic system, which realizes the retrieval of image ciphertext threshold through security index and query trapdoor, solves the retrieval security problem, and takes into account the privacy and efficiency of cloud storage. The proposed query trapdoor construction method is based on random matrix and feature expansion, which ensures the privacy of users when querying, and also realizes access control for unauthorized users.
[0006] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0007] One or more embodiments provide an image encryption and retrieval method based on a four-dimensional memristor chaotic system, comprising the following steps:
[0008] Obtain the plaintext image to generate a key, generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and upload the encrypted image to the cloud server;
[0009] Extract plaintext image features from the acquired plaintext image, encrypt the image features to obtain a security index, and upload the security index to the cloud server;
[0010] The obtained query image is constructed into a query trapdoor using a key, and a retrieval request is made to the cloud server so that the cloud server calculates the similarity between the query trapdoor and the security index, and uses the image corresponding to the security index that meets the similarity requirements as the image retrieval result.
[0011] One or more embodiments provide an image encryption and retrieval system based on a four-dimensional memristor chaotic system, including:
[0012] A plaintext acquisition module is configured to acquire a plaintext image to generate a key, generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and upload the encrypted image to a cloud server;
[0013] A security index generation module is configured to extract plaintext image features from the acquired plaintext image, encrypt the image features to obtain a security index, and upload the security index to a cloud server;
[0014] The query module is configured to use a key to construct the obtained query image into a query trapdoor, and submit a retrieval request to the cloud server so that the cloud server calculates the similarity between the query trapdoor and the security index, and uses the image corresponding to the security index that meets the similarity requirements as the image retrieval result.
[0015] An electronic device includes a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps in the above-mentioned image encryption and retrieval method based on a four-dimensional memristor chaotic system are completed.
[0016] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the steps in the above-mentioned image encryption and retrieval method based on a four-dimensional memristor chaotic system are completed.
[0017] Compared with the prior art, the present invention has the following beneficial effects:
[0018] The present invention adopts a four-dimensional memristor chaos system with high chaotic characteristics to encrypt images, which greatly improves the security of encryption; through the mechanism of security index and query trapdoor, efficient retrieval of image ciphertext is realized. During the retrieval process, the security index and encrypted image are stored in the cloud server in ciphertext form, which significantly reduces the risk of data leakage, thereby effectively solving the security problem of retrieval. In addition, the proposed query trapdoor construction method is based on random matrix and feature expansion technology, which not only ensures that the privacy of users is not leaked during query, but also realizes access control for unauthorized users. This solution comprehensively solves the security problem of image data, while making up for the problem that traditional encrypted images cannot be retrieved and the retrieval efficiency and accuracy are insufficient, taking into account the privacy and efficiency of cloud storage.
[0019] The advantages of the present disclosure and the advantages of additional aspects will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and the description thereof are used to explain the present disclosure but do not constitute a limitation of the present disclosure.
[0021] Figure 1 A flowchart of an image encryption and retrieval method based on a four-dimensional memristor chaotic system provided in Embodiment 1 of the present disclosure;
[0022] Figure 2 The attractor diagram of the four-dimensional memristor chaotic system provided in Embodiment 1 of the present disclosure;
[0023] Figure 3 A schematic diagram of the TZC algorithm provided in Embodiment 1 of the present disclosure;
[0024] Figure 4 A flowchart of image encryption upload provided in Embodiment 1 of the present disclosure;
[0025] Figure 5 This is a comparison chart of image encryption and decryption processing of an example image in Embodiment 1 of the present disclosure. DETAILED DESCRIPTION
[0026] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0027] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0028] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the various embodiments in the present disclosure and the features in the embodiments can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.
[0029] Example 1
[0030] In response to the problems in the background technology, the image encryption and retrieval method and system based on a four-dimensional memristor chaotic system proposed in this embodiment protects images through chaotic encryption and uses secure indexes for retrieval, thereby improving the confidentiality of images and the security of retrieval. It can enable client terminals to send image data to cloud servers as well as query and retrieve image data, and improve the security of image data sending, query and retrieval processes, which is explained below with specific embodiments.
[0031] In the technical solutions disclosed in one or more embodiments, Figures 1 to 5 As shown, the image encryption and retrieval method based on the four-dimensional memristor chaotic system is configured to be implemented in a client terminal, including the following steps:
[0032] Step S1: The image owner terminal obtains the plaintext image to generate a key, generates a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and uploads the encrypted image to the cloud server;
[0033] Step S2: The image owner terminal extracts plaintext image features from the acquired plaintext image, encrypts the image features to obtain a security index, and uploads the security index to the cloud server;
[0034] Step S3: The image user terminal uses the key to construct the query image into a query trapdoor, and submits a search request to the cloud server, so that the cloud server calculates the similarity between the query trapdoor and the security index, and takes the image corresponding to the security index that meets the similarity requirement as the image search result;
[0035] The client terminal may include an image owner terminal and an image user terminal, and the image owner terminal and the image user terminal may be the same terminal or different terminal devices;
[0036] This embodiment uses a four-dimensional memristor chaos system with high chaos characteristics to encrypt images, which greatly improves the security of encryption; through the mechanism of security index and query trapdoor, efficient retrieval of image ciphertext is achieved. During the retrieval process, the security index and encrypted image are stored in the cloud server in ciphertext form, which significantly reduces the risk of data leakage, thereby effectively solving the security problem of retrieval. In addition, the proposed query trapdoor construction method is based on random matrix and feature expansion technology, which not only ensures that the privacy of users is not leaked during queries, but also realizes access control for unauthorized users. This solution comprehensively solves the security problem of image data, while making up for the problem that traditional encrypted images cannot be retrieved and the retrieval efficiency and accuracy are insufficient, taking into account the privacy and efficiency of cloud storage.
[0037] Furthermore, in step S1, generating a key to encrypt the image specifically includes the following steps:
[0038] Step S11: key generation, generating a key for each plaintext image, and inputting it into the four-dimensional memristor chaotic system to obtain a chaotic sequence;
[0039] Step S111: converting the plaintext image into a grayscale image;
[0040] Step S112: Calculate the hash value of each grayscale image;
[0041] Specifically, use step SHA-256 to calculate the hash value of each grayscale image and obtain a 64-character hash value, such as: "26fa6aa354f51c2f799d0a0944b0ce347ad27031c8f6459c2dac94e64d8a5906";
[0042] Step S113: Divide the hash value into small blocks, and convert each small block into a decimal number;
[0043] Specifically, the hexadecimal hash value is divided into 32 small blocks of 2 characters, and each small block is converted into a decimal number. Assume that the four-digit decimal number is [38, 250, 106, 163];
[0044] Step S114: converting the decimal number into a binary string;
[0045] Specifically, each decimal number is converted into an 8-bit binary string, and the above four-digit decimal number is converted into ["00100110""11111010""01101010""10100011"];
[0046] Step S115: performing an XOR operation on two adjacent binary numbers;
[0047] Specifically, two adjacent binary numbers are subjected to an XOR operation to generate a 16-bit binary number; the above four binary numbers are subjected to an XOR operation to obtain "11011100" and "11001001";
[0048] Step S116: grouping the binary numbers obtained after the XOR operation, and performing an XOR operation on adjacent binary numbers in the group;
[0049] Specifically, the 16 binary numbers are divided into four groups, adjacent binary numbers in each group are XORed, and then the results are accumulated. The expression is as follows:
[0050]
[0051] Among them, the symbol is the XOR symbol, x is a binary array, and the subscript represents the number of bits;
[0052] Step S117: Divide the four obtained results by a set value such as 100 respectively to obtain the key Key.
[0053] Step S118: transferring the key Key into the four-dimensional memristor chaotic system to obtain four chaotic sequences X, Y, Z and W;
[0054] Specifically, the number of times the four-dimensional memristor chaotic system is set is 500+MN, where M and N are the length and width of the plaintext image, and then the first 1000 digits are discarded to eliminate transient effects, and chaotic sequences X, Y, Z and W are obtained, and the first chaotic sequence X is used as the position scrambled sequence;
[0055] like Figure 2 As shown in the figure, it is an attractor diagram of a four-dimensional memristor chaotic system, which can intuitively display the chaotic motion of a chaotic system. The chaotic attractor is one of the main characteristics of chaotic motion. It is a specific state space trajectory in a chaotic system, which exhibits complex behaviors in long-term evolution. The chaotic attractor diagram can better understand the fractal and nonlinear characteristics of the attractor.
[0056] The differential equation expression of the four-dimensional memristor chaotic system is as follows:
[0057]
[0058] Among them, x, y, z, w are the initial values of the four-dimensional memristor chaotic system; a, b, c, k, e, n can be set to 35, 3, 28, 0.5, 0.2, 0.1 respectively.
[0059] Step S12: performing wavelet transform on the acquired plaintext image;
[0060] Step S13: Set the threshold T to perform threshold processing on the plaintext image after wavelet transformation. The expression is as follows:
[0061] P(abs(P)≤T)=0 (4)
[0062] Step S14: Use the chaotic sequence X to scramble the image. The expression is as follows:
[0063] P ′ (i) = P(X(i)) (5)
[0064] Step S15: using the chaotic sequence X, Y, Z to scramble the image, and executing the TZC algorithm to perform intra-block, inter-block, and inter-channel Zigzag scrambling;
[0065] The achievable, intra-block, inter-block, and inter-channel Zigzag scrambling methods are as follows: Figure 3 As shown, the following steps are included:
[0066] Step S151: Identify the size of the image outputted in step S14 and divide it into image blocks;
[0067] Specifically, identify the size of the image, check whether the image size is a multiple of 8, divide the image into 8×8 blocks, and calculate the number of image blocks n;
[0068] Step S152: Process the chaotic sequences Y and Z, extract the first n elements, and transform the chaotic sequence values into numbers between 1 and 16;
[0069] Step S153: using the chaotic sequence X and the processed chaotic sequence Y, calculating the Zigzag initial chaotic position of the image block;
[0070] According to the processed chaotic sequence, the initial chaotic position of Zigzag between image blocks is calculated. The calculation formula is as follows:
[0071]
[0072] Among them, Z x , Z y Represent the number of rows and columns respectively, indicating which row and column in the matrix to start from when performing the Zigzag operation;
[0073] Step S154: Based on the obtained initial chaotic position, perform intra-block and inter-block Zigzag operations on each image block to obtain a first scrambled image;
[0074] Specifically, inter-block / intra-block Zigzag is performed on each channel, the image is processed into 8*8 blocks, the initial confusion position in the block is obtained according to the chaotic sequences X and Y, the Zigzag operation is performed within the block, and the Zigzag operation is performed according to the initial confusion position between image blocks to obtain the processed result;
[0075] Step S155: Zigzag operation is performed on the first scrambled image in the order of image channels and spliced into a three-channel image to obtain a scrambled image;
[0076] Specifically, according to the channel order RGB, a Zigzag operation is performed between the three channels in turn, then the channel order is changed to GBR, the Zigzag operation is performed, and finally the channel order is changed to BRG, the Zigzag operation is performed, and the obtained results are spliced into a three-channel image to obtain the final result.
[0077] Zigzag operation is a scanning method used to arrange and reorganize two-dimensional data (such as pixels in an image block). It extracts data from a two-dimensional matrix along a specific zigzag path.
[0078] This embodiment increases the complexity of the encryption algorithm by performing zigzag within blocks, between blocks and between channels, and the zigzag within blocks and between blocks can be performed simultaneously, which reduces the time complexity, improves the scrambling effect, and increases the difficulty of being cracked;
[0079] Step S16: compressing the scrambled image using compressed sensing; this step uses compressed sensing to reduce the dimension of the image, thereby reducing the transmission overhead in the subsequent transmission process and the calculation overhead during encryption;
[0080] Step S161: constructing a measurement matrix φ of size [M*cr, N] using a random matrix according to the image sizes M and N and the set compression ratio cr;
[0081] Step S162: compress the image using the measurement matrix, which is expressed as follows:
[0082] P ′ =φ×P (6)
[0083] Among them, P is the image to be compressed, P ′ The compressed image.
[0084] Step S163: quantize the compressed image. The expression is as follows:
[0085]
[0086] Among them, round is the rounding function; P min is the minimum value of the compressed image pixel, Pmax is the maximum value of the compressed image pixel;
[0087] Step S17: Use the chaotic sequence W to perform two diffusion scrambling operations on the image to obtain an encrypted image, i.e., a ciphertext image;
[0088] Step S171: Firstly, the chaotic sequence W is processed, and its expression is as follows:
[0089] W ′ =Mod(Floor(W×10 10 ),256) (8)
[0090] Among them, Mod is the modulo function, and Floor is the rounding function.
[0091] Step S172: Use the processed chaotic sequence W′ to perform a diffusion operation, which is expressed as follows:
[0092] P ′ =Mod(P i +W i ,256) (9)
[0093] Here, i is the number of image pixels.
[0094] In the above scheme, a four-dimensional memristor chaos system is adopted to generate complex keys by utilizing higher-dimensional chaotic characteristics. Combined with multi-level TZC scrambling algorithm (intra-block, inter-block and inter-channel scrambling) and compressed sensing technology, it not only significantly improves the randomness and anti-attack capabilities of encryption.
[0095] Furthermore, in step S2, extracting plaintext image features to generate a security index specifically includes the following steps:
[0096] Step S21: extracting features from the acquired plaintext image;
[0097] Optionally, the features of the image can be extracted using an existing deep learning model, and CNN can be used to extract the l-dimensional features f of the plaintext image;
[0098] Step S22: Use the UMAP algorithm to reduce the dimension of the feature;
[0099] Optionally, the dimensionality reduction algorithm may use a UMAP algorithm for dimensionality reduction, use an autoencoder for nonlinear dimensionality reduction, etc.
[0100] Step S23: clustering the features after dimensionality reduction to obtain multiple cluster centers;
[0101] Optionally, the K-means algorithm can be used to cluster the features and obtain K cluster centers;
[0102] Step S24: using random numbers r1, r2 and a random matrix R to expand and encrypt the feature to obtain a security index;
[0103] In this embodiment, a security index is generated for each plaintext image to be encrypted. During retrieval, only the security index needs to be retrieved and identified, and the image corresponding to the security index is the retrieval result image.
[0104] Further: in the step S24, generating a security index specifically includes the following steps:
[0105] Step S241: Initialize the random function to obtain random numbers r1, r2 and a random matrix R;
[0106] Step S242: using random numbers r1 and r2 to expand the cluster center and intra-cluster features obtained in step 23;
[0107] Specifically, the extended dimension is set, for example, the dimension can be extended to l+3, and the function expression is as follows:
[0108]
[0109] Among them, f i ,f 2 ,…,f l Represents the features after clustering, i = 1, 2, 3, ... l;
[0110] Step S243: Use the inverse matrix of the random matrix R to encrypt the expanded features to obtain a security index corresponding to the ciphertext image Its function expression is as follows:
[0111]
[0112] In this embodiment, a security index is established based on the encrypted clustering results for quickly locating and retrieving images, which can optimize the retrieval efficiency. When querying, only the security index needs to be accessed instead of traversing the entire data set, thereby realizing the retrieval of images encrypted by chaos at the ciphertext threshold.
[0113] Furthermore, in step S3, the image user terminal uses the key to construct the query image into a query trapdoor, which specifically includes the following steps:
[0114] S31: extracting image features q from the acquired query image and performing dimension reduction;
[0115] In this step, the query image is a similar image of the example, such as searching for images of "trees", obtaining images of trees for retrieval, so that the cloud server provides a batch of images of trees for return, and uses similar images to retrieve images;
[0116] S32: Obtain a random number r3 and a random matrix R according to the key, and use the random number r3 to expand the extracted image features as query features Its function expression is as follows:
[0117]
[0118] The random number r3 and the random matrix R are obtained according to the key. Specifically, the random number and the random matrix R are obtained by using the key as a random number seed through a random function;
[0119] S33: Use the transposed matrix R of the random matrix R T , and the query features are combined with the matrix R T The product of is used as the query trapdoor, and its function expression is as follows:
[0120]
[0121] Use the query trapdoor to send a query request to the cloud server. After receiving the query request, the server uses the query trapdoor to match the cluster center of the security index and calculates the similarity between the matched cluster center and the features within the cluster. The expression for similarity calculation is as follows:
[0122]
[0123] Among them, q T represents the transpose of the query feature, and f represents the unencrypted image feature;
[0124] d=f·q T
[0125] In the above scheme, in order to improve the retrieval efficiency, the features are clustered. In the similarity matching process, similar cluster centers are matched first, and then matching is performed in the clusters of cluster centers, which improves the efficiency and accuracy of the retrieval.
[0126] In this embodiment, the secure retrieval of encrypted images is achieved through innovative image feature encryption and query trapdoor mechanism, and a secure index generation scheme based on CNN feature extraction, UMAP dimension reduction and K-means clustering is proposed. The privacy of features is protected through random matrix encryption to ensure the retrievability of encrypted images in cloud storage. For the query process, the query trapdoor mechanism is introduced, the query features are expanded using random matrix encryption, and accurate retrieval is performed in the matching clusters, achieving a balance between retrieval efficiency and privacy protection.
[0127] Furthermore, the process of decrypting the retrieved image to obtain a plaintext image is also included, and the steps are as follows:
[0128] Step S351: The client terminal, such as the image user terminal, inputs the key into the four-dimensional memristor chaotic system to obtain the chaotic sequence X, Y, Z, W;
[0129] Step S352: Use the chaotic sequence W to retrieve the ciphertext image P i ′ performs two inverse diffusion scrambling operations, and its expression is as follows:
[0130] P=Mod(P i ′-W i ,256) (14)
[0131] Step S353: reconstruct the image using the SL0 reconstruction algorithm to restore the image dimension;
[0132] Step S354: using the chaotic sequences Y, Z and the image to perform the inverse operation of the TZC algorithm, and perform the Zigzag inverse scrambling within the block, between blocks, and between channels;
[0133] Step S355: Use the chaotic sequence X to perform inverse position scrambling on the image. The function expression is as follows:
[0134] P(X i )=P i ′;
[0135] Step S356: Perform inverse wavelet transform on the image after inverse position scrambling to obtain the original image.
[0136] Using the above method, the image is encrypted and decrypted, such as Figure 5 As shown, the original image has clear texture and color information. After encryption, the distribution of pixels becomes random, which looks like a noise image. By converting the original image data into an incomprehensible ciphertext form, the original features of the image, such as color, texture, and shape, completely disappear and become randomly distributed noise, thus achieving data privacy protection. This shows that the encryption algorithm of this embodiment can effectively hide the key information of the image. The randomness and unpredictability enhance the security of the image and prevent leakage and illegal access. The decrypted image is basically the same as the original image, and all visible information is restored, which verifies the reversibility of the encryption algorithm, that is, the original image can be restored losslessly through the correct key and decryption algorithm.
[0137] Example 2
[0138] Based on Example 1, this embodiment provides an image encryption and retrieval system based on a four-dimensional memristor chaotic system, including:
[0139] A plaintext acquisition module is configured to acquire a plaintext image to generate a key, generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and upload the encrypted image to a cloud server;
[0140] A security index generation module is configured to extract plaintext image features from the acquired plaintext image, encrypt the image features to obtain a security index, and upload the security index to a cloud server;
[0141] The query module is configured to use a key to construct the obtained query image into a query trapdoor, and submit a retrieval request to the cloud server so that the cloud server calculates the similarity between the query trapdoor and the security index, and uses the image corresponding to the security index that meets the similarity requirements as the image retrieval result.
[0142] It should be noted here that the various modules in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation process is the same, which will not be repeated here.
[0143] Example 3
[0144] This embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps in the image encryption and retrieval method based on a four-dimensional memristive chaotic system of Embodiment 1 are completed.
[0145] Example 4
[0146] This embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps in the image encryption and retrieval method based on a four-dimensional memristor chaotic system of Embodiment 1 are completed.
[0147] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
[0148] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. An image encryption and retrieval method based on a four-dimensional memristor chaotic system, characterized in that: The steps include: Obtain the plaintext image to generate a key, generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and upload the encrypted image to the cloud server; Extract plaintext image features from the acquired plaintext image, encrypt the image features to obtain a security index, and upload the security index to the cloud server; The obtained query image is constructed into a query trapdoor using a key, and a retrieval request is made to the cloud server so that the cloud server calculates the similarity between the query trapdoor and the security index, and uses the image corresponding to the security index that meets the similarity requirements as the image retrieval result.
2. The image encryption and retrieval method based on the four-dimensional memristor chaotic system as claimed in claim 1, characterized in that: Obtain a plaintext image to generate a key, and generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, specifically including the following steps: Generate a key for each plaintext image and pass it into the four-dimensional memristor chaotic system to obtain the chaotic sequences X, Y, Z and W; Perform wavelet transform on the acquired plaintext image; Set the threshold T and perform threshold processing on the plaintext image after wavelet transformation; Use the chaotic sequence X to scramble the position of the image after threshold processing; Use the chaotic sequences X, Y and Z to scramble the image, and execute the TZC algorithm to perform Zigzag scrambling within blocks, between blocks and between channels; Compress the scrambled image; The chaotic sequence W is used to perform two diffusion scrambling operations on the image to obtain the encrypted image, i.e., the ciphertext image.
3. The image encryption and retrieval method based on a four-dimensional memristor chaotic system as claimed in claim 2, characterized in that: The key generation method comprises the following steps: Convert the plaintext image to grayscale; Calculate the hash value of each grayscale image; Split the hash value into small blocks and convert each small block into a decimal number; Convert a decimal number to a binary string; Perform XOR operation on two adjacent binary numbers; The binary numbers obtained after the XOR operation are grouped, and the adjacent binary numbers in the group are XORed, and the obtained results are divided by the set value as the key.
4. The image encryption and retrieval method based on a four-dimensional memristor chaotic system as claimed in claim 2, characterized in that: The Zigzag scrambling method within a block, between blocks, and between channels includes the following steps: Identify the image size after position scrambling and divide it into image blocks; Process the chaotic sequences Y and Z, extract the first n elements, and transform the chaotic sequence values into numbers between 1 and 16; Using the chaotic sequence X and the processed chaotic sequence Y, the Zigzag initial chaotic position of the image block is calculated; Based on the obtained initial chaotic position, performing intra-block and inter-block Zigzag operations on each image block to obtain a first scrambled image; The first scrambled image is subjected to a Zigzag operation in the order of image channels and is concatenated into a three-channel image to obtain a scrambled image.
5. The image encryption and retrieval method based on a four-dimensional memristor chaotic system as claimed in claim 1, characterized in that: Extracting plaintext image features to generate a security index includes the following steps: Perform feature extraction on the acquired plaintext image; Use the UMAP algorithm to reduce the dimension of features; Cluster the features after dimensionality reduction to obtain multiple cluster centers; The features are expanded and encrypted using random numbers r1, r2 and a random matrix R to obtain a secure index.
6. The image encryption and retrieval method based on a four-dimensional memristor chaotic system as claimed in claim 1, characterized in that: The query image is constructed into a query trapdoor using the key, which includes the following steps: Extract image features q from the acquired query image and perform dimension reduction; The random number r3 and the random matrix R are obtained according to the key, and the random number r3 is used to expand the extracted image features as query features Use the transpose matrix R of the random matrix R T , and the query features are combined with the matrix R T The product of is used as the query trapdoor.
7. The image encryption and retrieval method based on a four-dimensional memristor chaotic system as claimed in claim 1, characterized in that: In the process of similarity matching between query trapdoors and security indexes, firstly, similar cluster centers are matched, and then matching is performed in the clusters of cluster centers; Alternatively, the process of decrypting the retrieved image to obtain the plaintext image is as follows: Input the key into the four-dimensional memristor chaotic system to obtain the chaotic sequences X, Y, Z and W; Using the chaotic sequence W, the retrieved ciphertext image P i 'Perform two inverse diffusion scrambling; Reconstruct the image and restore the image dimension; The chaotic sequences Y, Z and the restored image are used to perform the inverse operation of the TZC algorithm, and perform the intra-block, inter-block, and inter-channel Zigzag inverse scrambling; Use the chaotic sequence X to scramble the image in reverse position; Perform inverse wavelet transform on the image after inverse position scrambling to obtain the original image.
8. Image encryption and retrieval system based on four-dimensional memristor chaotic system, characterized in that: include: A plaintext acquisition module is configured to acquire a plaintext image to generate a key, generate a chaotic sequence based on a four-dimensional memristor chaotic system to encrypt the image, and upload the encrypted image to a cloud server; A security index generation module is configured to extract plaintext image features from the acquired plaintext image, encrypt the image features to obtain a security index, and upload the security index to a cloud server; The query module is configured to use a key to construct the obtained query image into a query trapdoor, and submit a retrieval request to the cloud server so that the cloud server calculates the similarity between the query trapdoor and the security index, and uses the image corresponding to the security index whose similarity meets the requirements as the image retrieval result.
9. An electronic device, characterized in that: It comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the image encryption and retrieval method based on a four-dimensional memristor chaotic system described in any one of claims 1 to 7 are completed.
10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the image encryption and retrieval method based on a four-dimensional memristor chaotic system as described in any one of claims 1 to 7.