Quantum image encryption method and device, electronic equipment, storage medium and computer program product
By employing quantization processing and an adaptive quantum encryption algorithm, the encryption algorithm is selected based on the image complexity, thus solving the problems of computational overhead and insufficient security in existing technologies and achieving efficient and secure quantum image encryption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-16
AI Technical Summary
Existing quantum image encryption technologies fail to adaptively adjust encryption strength according to image complexity, resulting in excessive computational overhead for low-complexity images or insufficient encryption strength for high-complexity images, making it difficult to meet the security and computational efficiency requirements of practical encryption scenarios.
The image to be encrypted is represented as a quantum image through quantization processing, its complexity is determined, and a suitable quantum encryption algorithm is selected for encryption based on the complexity. This includes feature extraction, feature weight determination, quantum state evolution, and probability distribution measurement. A chaotic sequence is generated using a coupled hyperchaotic Lorenz system and a Logistic system for encryption.
It achieves dynamic adjustment of encryption strength based on image complexity, reducing the computational overhead of low-complexity images and improving the security of high-complexity images, thus meeting the requirements of both computational efficiency and security.
Smart Images

Figure CN122222797A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum encryption technology, and in particular to a quantum image encryption method, device, electronic device, storage medium, and computer program product. Background Technology
[0002] Currently, quantum image encryption technology is an innovative technology that uses quantum computing and quantum information processing theory to protect image data, aiming to achieve efficient image confidentiality and anti-counterfeiting. Summary of the Invention
[0003] To address the related technical issues, embodiments of this application provide a quantum image encryption method, apparatus, electronic device, storage medium, and computer program product.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a quantum image encryption method, the method comprising: The image to be encrypted is represented as a quantum image through quantization processing; Determine the complexity of the quantum image; The target quantum encryption algorithm is determined by utilizing the complexity of the quantum image. The quantum image is encrypted using the target quantum encryption algorithm.
[0005] In the above scheme, determining the complexity of the quantum image includes: The quantum image is subjected to feature extraction to obtain quantum image features; Determine the feature weight corresponding to each quantum image feature; The complexity of the quantum image is determined by using all quantum image features and their corresponding feature weights.
[0006] In the above scheme, determining the feature weight corresponding to each quantum image feature includes: The quantum image features are preprocessed to obtain preprocessed features; Based on amplitude encoding, the preprocessed features are mapped to quantum state features; Based on the quantum attention mechanism, the quantum state features are evolved to obtain evolved quantum state features, which characterize the nonlinear correlation between the quantum image features; The probability distribution of the quantum image features is obtained by measuring the evolved quantum state characteristics. The adaptive attention weights of the quantum image features are determined using the probability distribution of the quantum image features. The complexity of the quantum image is obtained by weighting the quantum image features using the adaptive attention weights.
[0007] In the above scheme, determining the target quantum encryption algorithm using the complexity of the quantum image includes: When the complexity of the quantum image is greater than or equal to the first threshold, the first quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the first threshold and greater than or equal to the second threshold, the second quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the second threshold, the third quantum encryption algorithm is used as the target quantum encryption algorithm. The encryption strength of the first quantum encryption algorithm is greater than that of the second quantum encryption algorithm, and the encryption strength of the second quantum encryption algorithm is greater than that of the third quantum encryption algorithm.
[0008] In the above scheme, encrypting the quantum image using the target quantum encryption algorithm includes: The first chaotic sequence is generated based on the coupled hyperchaotic Lorenz system. A second chaotic sequence is generated based on the Logistic system. Using the first chaotic sequence, a quantum XOR operation and a quantum right circular shift operation are performed on the quantum image to obtain the manipulated quantum image; Using the second chaotic sequence, the three primary colors of the quantum image after the operation are interchanged to obtain an encrypted quantum image.
[0009] In the above scheme, generating the first chaotic sequence based on the coupled hyperchaotic Lorenz system includes: Based on the coupled hyperchaotic Lorenz system, a first initial chaotic sequence is generated; The first initial chaotic sequence is processed using a quantum long short-term memory network (QLSTM) to obtain the first chaotic sequence. The generation of the second chaotic sequence based on the Logistic system includes: Based on the Logistic system, a second initial chaotic sequence is generated; The second initial chaotic sequence is processed using QLSTM to obtain the second chaotic sequence.
[0010] This application also provides a quantum image encryption device, including: Quantumization unit, used to represent the image to be encrypted as a quantum image; The first determining unit is used to determine the complexity of the quantum image; The second determining unit is used to determine the target quantum encryption algorithm by utilizing the complexity of the quantum image; An encryption unit is used to encrypt the quantum image using the target quantum encryption algorithm.
[0011] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor. When the processor runs the computer program, it executes the steps of any of the above methods.
[0012] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0013] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0014] The quantum image encryption method, apparatus, electronic device, storage medium, and computer program product provided in this application represent the image to be encrypted as a quantum image through quantization processing; determine the complexity of the quantum image; determine a target encryption algorithm using the complexity of the quantum image; and encrypt the quantum image using the target encryption algorithm. The scheme provided in this application selects a suitable quantum encryption algorithm for encryption based on the complexity of the quantum image corresponding to the image to be encrypted. Thus, when the complexity of the image to be encrypted is low, a low-strength encryption algorithm can be used, thereby reducing encryption computational overhead and meeting computational efficiency requirements; and when the complexity of the image to be encrypted is high, a high-strength encryption algorithm can be used, thereby ensuring the security of the encrypted image and meeting security requirements. Attached Figure Description
[0015] Figure 1 This is a schematic flowchart of the quantum image encryption method according to an embodiment of this application; Figure 2 This is a schematic diagram of the evolution layer quantum circuit structure in an embodiment of this application; Figure 3 This is a flowchart illustrating an adaptive quantum image encryption method based on quantum image complexity assessment, which serves as an application example of this application. Figure 4 A schematic diagram illustrating the process of high-strength quantum image encryption, an application example of this application; Figure 5 This is a schematic diagram of the quantum image encryption device according to an embodiment of this application; Figure 6 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0016] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0017] Quantum image encryption technology possesses the superposition, entanglement, and non-cloning properties of quantum states. Therefore, when using quantum image encryption technology for image encryption, unique processing methods are required to achieve higher security.
[0018] Currently, encryption algorithms (or encryption schemes) that utilize quantum image encryption technology mainly include: image perturbation encryption based on quantum gate operations, quantum image encryption based on chaos theory, frequency domain encryption using quantum Fourier transform (QFT), information hiding through quantum superposition and entanglement, and encryption based on introducing uncertainty through quantum measurement.
[0019] For each encryption algorithm, its encryption strength can be defined based on the computational resource consumption required for image encryption and the security of the encrypted image information. This strength represents the cryptographic system's ability to resist various attacks (such as brute-force attacks, statistical analysis, and differential attacks). For example, encryption algorithms based on simple quantum gates (such as Hadamard and Pauli-X gates) require little computation and offer basic security; therefore, they are considered low-strength quantum image encryption algorithms. On the other hand, quantum image encryption technology based on chaos theory combines the pseudo-randomness of classical chaotic systems with the high parallelism of quantum computing, fusing chaotic mapping with quantum state operations. By introducing the pseudo-randomness of chaotic sequences, it increases the difficulty of cracking, resulting in high computational complexity. It can generate encryption keys with high randomness and sensitive initial value dependence, thus significantly improving the security of the encryption system; therefore, it is considered a high-strength quantum image encryption algorithm.
[0020] As can be seen from the above description, quantum image encryption technology, by utilizing the unique properties of quantum mechanics, has significant advantages in terms of security and encryption efficiency. However, when applying quantum image encryption technology for image encryption, the complexity of the image to be encrypted is often not considered. This can lead to problems such as excessively high computational costs for quantum encryption of low-complexity images and insufficient encryption strength for quantum encryption of high-complexity images, making it difficult to meet the needs of practical encryption scenarios. Image complexity refers to the amount of information contained in an image, the richness of its texture, or the strength of its randomness. For example, low-complexity images are usually simple and smooth, with low entropy and high correlation, such as blue skies and white walls; conversely, high-complexity images are usually rich in texture, detail, and complex edges, with high entropy and low correlation, such as forests and crowds.
[0021] In practical applications, low-complexity images (such as simple graphics and background images) have few pixel value variations and high data redundancy. In such cases, simple encryption algorithms (such as Logistic mapping or basic quantum gates) can be used to completely "scramble" the image histogram, making it more uniform (i.e., providing better security). Therefore, lower-strength encryption algorithms can be used to reduce encryption computational overhead (e.g., saving on quantum circuit depth and computation time) and improve encryption efficiency. Conversely, high-complexity images (such as remote sensing images and medical images) typically contain extremely rich high-frequency details and sensitive information, resulting in poor histogram uniformity and potentially specific texture patterns. These images are often large in volume and high in value. In such cases, using low-strength encryption algorithms (such as simple XOR or scrambling) makes it difficult to completely break the statistical characteristics of texture and histogram distribution. This could allow attackers to recover some information through statistical analysis, compromising security. Therefore, high-strength encryption algorithms are required to ensure the security of the encrypted image.
[0022] As can be seen from the above description, images with different image complexities require different encryption strengths. Currently, there is an urgent need for a quantum image encryption scheme that can adaptively adjust the encryption strength based on image complexity in order to simultaneously meet the requirements of security and computational efficiency.
[0023] Based on this, in various embodiments of this application, a suitable quantum encryption algorithm is selected for encryption according to the complexity of the quantum image corresponding to the image to be encrypted. Thus, when the complexity of the image to be encrypted is low, a low-strength encryption algorithm can be used to encrypt it, thereby reducing the encryption computation overhead and meeting the computational efficiency requirements; and when the complexity of the image to be encrypted is high, a high-strength encryption algorithm can be used to encrypt it, thereby ensuring the security of the encrypted image and meeting the security requirements.
[0024] This application provides a quantum image encryption method, applied to electronic devices, such as... Figure 1 As shown, the method includes: Step 101: Represent the image to be encrypted as a quantum image through quantization processing; Step 102: Determine the complexity of the quantum image; Step 103: Determine the target quantum encryption algorithm using the complexity of the quantum image; Step 104: Encrypt the quantum image using the target quantum encryption algorithm.
[0025] In practical applications, the electronic device may include devices with corresponding processing, storage, and communication capabilities, such as computers, servers, etc. For example, electronic devices in a quantum image encryption system or electronic devices in an operation and maintenance system. This application embodiment does not limit this, as long as its function is achieved.
[0026] In practical applications, when the electronic device performs quantum encryption on the image to be encrypted, it needs to first acquire the color image to be encrypted (i.e., the image to be encrypted mentioned above), and represent the color image to be encrypted as a quantum image (which can also be understood as preparing a quantum image), so that the quantum image can be directly processed when encrypting it based on the quantum image encryption algorithm.
[0027] Based on this, in some optional embodiments, the method may further include: Obtain the image to be encrypted.
[0028] After acquiring the image to be encrypted, in step 101, the electronic device can represent the image to be encrypted as a quantum image using a quantum image representation model; wherein, the quantum image representation model can make full use of properties such as quantum superposition and entanglement to represent the image data to be encrypted as an efficient and secure quantum state.
[0029] In practical applications, when the electronic device prepares a quantum image of the image to be encrypted, the quantum image representation scheme used may include: Flexible Representation of Quantum Color Images (FRQCI), etc. FRQCI has probabilistic amplitude encoding characteristics, which can directly map the quantum coherence characteristics of the image; at the same time, preparing a quantum image through FRQCI can encode color information into quantum state vector directions, providing a foundation for subsequent quantum image encryption.
[0030] After obtaining the quantum image, in step 102, the electronic device can determine the complexity of the quantum image (which can also be understood as image complexity, etc.) based on the characteristics of the quantum image, and then select a quantum encryption algorithm that matches the complexity to encrypt the image.
[0031] Based on this, in some optional embodiments, the specific implementation of step 102 may include: The quantum image is subjected to feature extraction to obtain quantum image features; Determine the feature weight corresponding to each quantum image feature; The complexity of the quantum image is determined by using all quantum image features and their corresponding feature weights.
[0032] The quantum image features may include at least one or more of the following (one or more may also be understood as at least one): Quantum state entropy (also known as quantum state entropy) characterizes the amount of information contained in the quantum image. Quantum coherence characterizes the superposition property of the quantum picture. Spatial correlation (also known as spatial correlation) characterizes the correlation between adjacent pixels in the quantum image. Frequency domain features (FDMA) characterize the proportion of high-frequency energy in the quantum image.
[0033] The quantum state entropy mentioned here is a generalization of Shannon information entropy in the quantum realm. It measures the uncertainty or randomness of a quantum system and is positively correlated with the complexity of the quantum image. In an image, a higher entropy value means a more uniform and unpredictable distribution of pixels (or quantum states), resulting in a greater amount of information contained in the image and thus higher complexity. Conversely, a solid color or simple structure image has a concentrated pixel value distribution, low uncertainty, and a low entropy value.
[0034] For example, when the image to be encrypted is a pure white picture, the quantum states of all pixels point to the same state, the uncertainty is zero, so the quantum state entropy is close to 0, and the image is very simple; or, when the image to be encrypted is a noisy random image, the quantum states of each pixel are highly random and extremely uniformly distributed, the uncertainty reaches its maximum, the quantum state entropy is close to the theoretical limit (e.g., 8 bits / pixel), and the image is very complex.
[0035] Quantum coherence, derived from the principle of quantum superposition, describes the phase correlations between quantum states. This is a characteristic not found in purely classical images and is positively correlated with the complexity of the quantum image. In a quantum image, coherence can reflect non-classical correlations between quantum states at different locations or color channels. Quantum coherence itself represents a higher order of complexity; higher coherence implies more complex quantum interference effects and superposition modes within the image.
[0036] For example, when the image to be encrypted is an ordinary photograph generated by a classical light source, the quantum states of each pixel in the corresponding quantum image are relatively independent, lacking global quantum superposition correlation, and the coherence is low; or, when the image to be encrypted is a "ghost image" generated by quantum entangled photon pairs, the visible information of the image is not stored in the intensity of a single photon, but is encoded in the spatial quantum correlation (a kind of coherence) between photon pairs. This non-classical correlation structure makes the complexity of the image far exceed its visual appearance.
[0037] Spatial correlation measures the similarity between adjacent pixels and is negatively correlated with the complexity of the quantum image. Natural images typically have high spatial correlation because adjacent pixels tend to belong to the same object or region, and their color and brightness variations are gradual. High correlation implies high image redundancy and predictability, thus resulting in low complexity. Encrypting or adding details to an image essentially destroys this correlation, making adjacent pixels unrelated, thereby increasing the image's complexity.
[0038] For example, when the image to be encrypted is a photo of a clear blue sky, any pixel and its neighboring pixels are almost exactly the same color, with a correlation coefficient close to 1, resulting in a monotonous image with low complexity; or, when the image to be encrypted is an encrypted ciphertext image or a forest photo with extremely rich details, the value of any pixel cannot be predicted by its neighbors, with a correlation coefficient close to 0, resulting in an image full of unpredictable variations and high complexity.
[0039] Frequency domain features are used to measure the proportion of high-frequency energy in a quantum image and are negatively correlated with the complexity of the quantum image. When a quantum image is transformed from the spatial domain to the frequency domain using QFT, low-frequency components represent smooth, slowly changing regions in the image, such as the background; while high-frequency components correspond to rapidly changing parts of the image, such as edges, contours, and fine textures.
[0040] For example, when the image to be encrypted is a blurred background of a human portrait, after QFT, most of the image energy is concentrated in the center of the frequency domain (low frequency region), and the energy in the edge region (high frequency region) is very low, indicating that the image lacks detail and has low complexity; or, when the image to be encrypted is an image containing dense text or a complex circuit board, there are a lot of sharp edges and fine structures in the image, and after QFT, a lot of high-energy points will be generated at the edges of the frequency domain, indicating that the high frequency component accounts for a high proportion and the image is very complex.
[0041] As can be seen from the above description, the four quantum image features can quantify the complexity of a quantum image from different dimensions, collectively depicting the richness of image information, structural regularity, and quantum properties. Therefore, the complexity of the quantum image can be obtained through these quantum image features.
[0042] In practical applications, the electronic device can extract the quantum state entropy of the quantum image according to the color channels (such as the R channel, G channel, and B channel in the red-green-blue (RGB) mode), which can be specifically expressed as formula (1): (1) in, Represents the calculation of quantum state entropy. This represents the density matrix of the quantum image in the three color channels. Represents the density matrix Logarithmic operation, Represents the trace operation of a matrix; It can also be expressed as the quantum state entropy of the three color channels. , , .
[0043] get Then, the electronic device can extract the coherence of the quantum image by channel. The coherence of the quantum image can also be understood as relative entropy quantum coherence (which can be expressed as Relative Entropy of Coherence, or simply rel.ent), and can be specifically expressed as formula (2): (2) in, These represent the diagonal density matrices obtained after removing the off-diagonal terms from the three color channels, i.e., the incoherent states. The coherence of the quantum image can also be represented by color channels. , , .
[0044] The electronic device can extract the spatial correlation of each coordinate position according to each color channel in the quantum image, and obtain the spatial correlation of the quantum image (which can also be understood as the quantum correlation between quantum states at adjacent positions) through the spatial correlation of all coordinates, which can be specifically expressed as formula (3) and formula (4): (3) (4) in, Represents the coordinates in the quantum image quantum state at (This coordinate density matrix) ) and coordinates quantum state at The inner product, Represents the coordinates in the quantum image quantum state at With coordinates quantum state at The inner product; The upper limit of the horizontal coordinate value in the quantum image is an integer greater than 1; The value of the vertical coordinate in the quantum image is an upper limit, which is an integer greater than 1; The spatial correlation of the quantum image can also be represented by color channels. , , .
[0045] The electronic device can use QFT to extract the frequency domain features of the quantum image, which can be specifically expressed as formulas (5) and (6): (5) (6) in, It represents the root of unit (i.e., the root in the complex plane). This represents the total number of frequency components in the frequency domain (the dimension of the quantum state space (i.e., the total number of ground states)). The meaning is the first corresponding to the QFT transformation. A frequency ground state, express The first frequency component The amplitude of each frequency component is used to reflect the intensity of that frequency component in the quantum image; Greater than or equal to and less than or equal to integers, This represents the probability amplitude corresponding to the ground state, and its physical meaning is the probability amplitude of the first state in the quantum image. The image information encoding coefficients at each pixel location can be obtained by normalizing the gray value or RGB components of the pixel, and are used to realize the mapping from classical image to quantum state.
[0046] After obtaining the frequency domain features (i.e., the amplitude of each frequency component) of the quantum image, the electronic device can further calculate the energy distribution of the frequency domain features of each color channel to obtain the energy proportion of the high-frequency feature components, which can be specifically expressed as formula (7): (7) in, This represents the energy of the high-frequency components. Represents total energy. Indicates the proportion of high-frequency energy. This represents the frequency division threshold. The frequency domain features of the quantum image can also be represented by color channels. , , .
[0047] After extracting the quantum image features, the electronic device can use a quantum-classical hybrid self-attention mechanism (QCSA) to assign weights to each quantum image feature.
[0048] Based on this, in some optional embodiments, determining the feature weight corresponding to each quantum image feature includes: The quantum image features are preprocessed to obtain preprocessed features; Based on amplitude encoding, the preprocessed features are mapped to quantum state features; Based on the quantum attention mechanism, the quantum state features are evolved to obtain evolved quantum state features, which characterize the nonlinear correlation between the quantum image features; The probability distribution of the quantum image features is obtained by measuring the evolved quantum state characteristics. The adaptive attention weights of the quantum image features are determined using the probability distribution of the quantum image features. The complexity of the quantum image is obtained by weighting the quantum image features using the adaptive attention weights.
[0049] In practical applications, the specific implementation of preprocessing by the electronic device may include: performing Z-Score normalization on each quantum image feature to obtain the normalized features. To satisfy the standard normal distribution, the differences in dimensions, units, and magnitudes between different features are eliminated, thereby reducing errors and enabling fair comparison and weighting of different features; then, the standardized features are... Zero-padding is performed to meet the requirement of the number of quantum states corresponding to the amplitude-encoded qubits.
[0050] For example, suppose the quantum image features obtained after feature extraction include: quantum state entropy. , , Quantum coherence , , Spatial correlation , , and frequency domain features , , There are a total of 12 quantum image features. In this case, at least 4 qubits are needed to represent all the features, and 4 qubits can correspond to a maximum of 12 features. =16 quantum states, therefore, based on the 12 quantum image features, 4 zero features can be added to expand to 16-dimensional features. To adapt to 4-qubit amplitude encoding.
[0051] After obtaining the preprocessed features, the electronic device can evolve the quantum state features based on a quantum attention mechanism module (which can also be understood as a quantum attention core module) comprising an encoding layer, an evolution layer, and a measurement layer. The encoding layer is used to encode the preprocessed features based on amplitude. Mapped to quantum states; the evolutionary layer, such as Figure 2 As shown, a parameterized quantum circuit with a multi-layered cyclic structure is constructed. Each layer contains a single-qubit rotation gate and / or a ring-shaped uncontrolled-NOT (CNOT) entanglement gate (which can also be understood as containing one or more of the single-qubit rotation gate and the ring-shaped CNOT entanglement gate). The evolution layer is used to perform quantum entanglement and interference on the quantum state through the parameterized quantum circuit to extract nonlinear correlations between features. The measurement layer is used to measure the quantum state of the qubit, such as performing Z-basis measurements, to obtain the quantum probability distribution corresponding to each feature (i.e., the probability distribution of the quantum image features). When using 4 qubits, .
[0052] In practical applications, the electronic device can measure the quantum probability distribution. By performing residual correction, a more accurate probability distribution result has been obtained.
[0053] The specific implementation of residual correction in the electronic device may include: converting the measured quantum probability distribution... With preprocessing features Perform feature concatenation to obtain concatenated features. When using 4 qubits, Then, a trainable classical fully connected layer is used to generate the residual correction. Specifically, it can be expressed as formula (8): (8) in, The weight matrix represents the residual mapping. Indicates the bias term. and The specific value can be configured according to actual needs, and this application embodiment does not limit it. After obtaining the residual correction amount, the electronic device can perform linear correction on the quantum probability distribution based on the residual correction amount, which can be specifically expressed as formula (9): (9) in, This represents the modified quantum probability distribution.
[0054] After obtaining the corrected quantum probability distribution, the electronic device can use this distribution to determine the adaptive attention weight for each quantum image feature. Specifically, the process may include: introducing learnable parameters. The modified quantum probability distribution is weighted, which can be expressed as formula (10): (10) in, Indicates the first The weighted probability distribution of each quantum state. Indicates preprocessing features The corresponding number of quantum states, when using 4 qubits, The value is 16. In this case, In practical applications, parameters can be adjusted based on the actual quantum state probability distribution. Make corrections.
[0055] After obtaining the weighted probability distribution of the quantum states, the electronic device can generate normalized adaptive attention weights using Sofmax. Specifically, it can be expressed as formula (11): (11) After obtaining the adaptive attention weights corresponding to each quantum image feature, the electronic device can determine the complexity of the quantum image (which can also be understood as a complexity score, etc.) by weighted summation, which can be expressed as formula (12): (12) in, The complexity of the quantum image is represented. This indicates the number of quantum image features (e.g., 12, etc.).
[0056] As can be seen from the above description, the complexity of a quantum image can be accurately reflected by its multidimensional features (such as spatial features and frequency domain features), thus providing a basis for selecting a suitable quantum encryption algorithm.
[0057] After obtaining the complexity of the quantum image, in step 103, the electronic device can select a suitable quantum encryption algorithm based on the complexity of the quantum image. For example, when the complexity is low, a low-strength encryption algorithm can be used to encrypt the image, thereby reducing the encryption computation overhead and meeting the computational efficiency requirements. Alternatively, when the complexity is high, a high-strength encryption algorithm can be used to encrypt the image, thereby ensuring the security of the encrypted image and meeting the security requirements.
[0058] Based on this, in some optional embodiments, determining the target quantum encryption algorithm using the complexity of the quantum image includes: When the complexity of the quantum image is greater than or equal to the first threshold, the first quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the first threshold and greater than or equal to the second threshold, the second quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the second threshold, the third quantum encryption algorithm is used as the target quantum encryption algorithm. The encryption strength of the first quantum encryption algorithm is greater than that of the second quantum encryption algorithm, and the encryption strength of the second quantum encryption algorithm is greater than that of the third quantum encryption algorithm.
[0059] The names and values of the first threshold and the second threshold can be set according to actual needs, and this application embodiment does not limit them.
[0060] The first quantum encryption algorithm can also be understood as a high-strength quantum image encryption algorithm, the second quantum encryption algorithm can also be understood as a medium-strength quantum image encryption algorithm, and the third quantum encryption algorithm can also be understood as a low-strength quantum image encryption algorithm. This application does not limit the specific implementation of the algorithm.
[0061] In practical applications, for quantum images with a complexity less than the second threshold, the encryption process of the electronic device using the third quantum encryption algorithm in step 104 may include: generating a key stream based on the Logistic mapping; and then using the value of the key stream to control the quantum gate application, which can be specifically expressed as formula (13). (13) in, Indicates control parameters, Indicates the first The key value of one qubit. It is an integer greater than or equal to 1. Then, the electronic device can implement interactive encryption of qubits based on one or more of the following: Hadamard gate, Pauli-X gate, and phase gate, specifically expressed as formula (14): (14) in, Indicates the first color channel One quantum bit, Indicates the corresponding encrypted number One quantum bit, This indicates the Hadamard door operation. This indicates the Pauli-X gate operation. This indicates a Phase gate operation.
[0062] In practical applications, for quantum images with a complexity less than the first threshold and greater than or equal to the second threshold, the process of encrypting the electronic device using the second quantum encryption algorithm in step 104 may include: generating six chaotic sequences based on the coupled hyperchaotic Lorenz system, which can be specifically expressed as formula (15). (15) in, This represents the state change vector of a coupled hyperchaotic Lorenz system. Indicates control parameters, The coupling parameter is given an initial value and iterated repeatedly to generate a sequence with the same number of bits as the quantum image. Then, the six generated sequences are subjected to modulo and integer calculations and prepared into corresponding quantum bit sequences encoded in binary form (which can also be understood as quantum state sequences), specifically expressed as formulas (16) to (21): (16) (17) (18) (19) (20) (twenty one) After obtaining the qubit sequence, the electronic device can construct a quantum XOR operator based on the first three chaotic sequences in the above sequence. Specifically, it can be expressed as formula (22): (twenty two) in, This represents the direct product operation. Indicates the pixel position as The quantum state at that point, The unit gate represents 24 qubits. , representing pixels The corresponding quantum XOR operator; , , Represents pixels The corresponding three quantum color values Bits of binary data; , , Represents pixels The corresponding three chaotic sequences bit This represents the XOR operation, corresponding to the quantum CNOT gate.
[0063] Construct a quantum right circular shift operator based on the last three sequences. S ; (twenty three) in, This is used to perform a right circular shift of the binary order of the encoded grayscale values in the R, G, and B color channels.
[0064] Finally, the operator Sum Operator S The quantum image is applied sequentially to obtain an encrypted quantum image result, which can be specifically expressed as formulas (24) to (25): (twenty four) (25) in, This represents the encrypted quantum image result. Indicates the action operator The subsequent quantum image, This represents the quantum state of the quantum image.
[0065] In practical applications, for quantum images with a complexity greater than or equal to the first threshold, in step 104, the electronic device uses a first quantum encryption algorithm for encryption, which may specifically include encryption based on an improved chaotic system encryption algorithm.
[0066] In related technologies, chaotic system encryption algorithms suffer from problems such as "periodicity caused by digital precision (which can also be understood as dynamic degradation effect)" and "predictability caused by low-dimensional mapping (which can also be understood as parameter space degradation and trajectory predictability)," which may lead to poor sequence chaos performance and encryption security performance.
[0067] The dynamic degradation effect refers to the fact that chaos theory is typically defined in the real number field (infinite precision), while computers and quantum simulators can only perform calculations using finite precision (such as 32-bit or 64-bit floating-point numbers). Under finite precision, the continuous chaotic phase space is discretized. This causes the originally aperiodic chaotic trajectory to inevitably fall into a short-period cycle after a certain number of iterations. Once the trajectory enters a cycle, the generated keystream will repeat, and the randomness of the encryption system will collapse instantly.
[0068] For example, suppose we use the classic Logistic mapping. In mathematical theory, when... The sequence obtained when 0.234 = 4 is chaotic. However, after hundreds or thousands of iterations in a computer, the sequence may suddenly become a cycle like 0.234->0.567->0.234... In this case, if an attacker intercepts a long enough ciphertext, they can discover this periodic pattern through statistical analysis and thus crack the key.
[0069] Parameter space degradation and trajectory predictability refer to the fact that many low-dimensional chaotic systems (such as Logistic and Tent mappings) have a narrow range of chaotic parameters and uneven distribution of phase space trajectories. The following problems exist: The system exhibits a narrow parameter range, meaning it only becomes chaotic within a very small interval. This makes it easy for attackers to analyze the system parameters using exhaustive methods or bifurcation graphs. Uneven distribution: Chaotic sequences appear with a much higher probability in some regions than in others, resulting in poor statistical properties of the generated key stream (e.g., an unbalanced distribution of 0 and 1).
[0070] For example, if a two-dimensional chaotic map is poorly designed, its phase space trajectory may only be distributed on certain specific stripes instead of uniformly traversing the entire space. By drawing the phase space diagram of the ciphertext, an attacker can deduce which chaotic map (such as the Henon map or the Lorenz system) was used, and then use a known-plaintext attack to recover the key.
[0071] Based on this, in order to improve the encryption strength of the algorithm, the first quantum encryption algorithm used by the electronic device can employ double chaotic coupling (Lorenz + Logistic) to increase the system dimension and expand the key space. That is, in some optional embodiments, the specific implementation of step 104 may include: The first chaotic sequence is generated based on the coupled hyperchaotic Lorenz system. A second chaotic sequence is generated based on the Logistic system. Using the first chaotic sequence, a quantum XOR operation and a quantum right circular shift operation are performed on the quantum image to obtain the manipulated quantum image; Using the second chaotic sequence, the three primary colors of the quantum image after the operation are interchanged to obtain an encrypted quantum image.
[0072] In practical applications, the electronic device can couple a hyperchaotic Lorenz system to generate six first chaotic sequences with the same number of qubits as the quantum image, and a Logistic system to generate a second chaotic sequence with the same number of qubits as the quantum image. Simultaneously, the electronic device improves the chaotic sequences using a QLSTM network. QLSTM, as a powerful nonlinear function approximator, is used to learn and predict the evolution trend of the chaotic sequences. It does not directly output the chaotic sequences, but rather performs "post-processing" or "correction" on the sequences generated by the classical chaotic system. Through the complex internal state evolution of QLSTM, it can break the periodic loops caused by finite precision, generating a new sequence that is statistically closer to ideal chaos and has an extremely long period.
[0073] Based on this, in some optional embodiments, generating the first chaotic sequence based on the coupled hyperchaotic Lorenz system includes: Based on the coupled hyperchaotic Lorenz system, a first initial chaotic sequence is generated; The first initial chaotic sequence is processed using QLSTM to obtain the first chaotic sequence. The generation of the second chaotic sequence based on the Logistic system includes: Based on the Logistic system, a second initial chaotic sequence is generated; The second initial chaotic sequence is processed using QLSTM to obtain the second chaotic sequence.
[0074] In practical applications, QLSTM processing significantly increases the randomness and unpredictability of the keystream. A keystream without a clear period and with excellent statistical properties effectively resists statistical analysis attacks, making it impossible for attackers to find any clues about the key in the intercepted ciphertext.
[0075] Meanwhile, low-dimensional chaotic systems (such as the Logistic map) have relatively simple structures, and their phase space trajectories may be confined to specific attractors. Attackers can use techniques such as phase space reconstruction to deduce the chaotic system model and its parameters from a ciphertext sequence; this type of attack is called a "structure-identifiable attack." The core of QLSTM is the Variational Quantum Circuit (VQC), which utilizes the superposition and entanglement properties of quantum states to process information in high-dimensional Hilbert spaces. When a chaotic sequence passes through a QLSTM, it is equivalent to being mapped into a quantum feature space with extremely high dimensions and a highly complex structure. The output of QLSTM is the result after this complex quantum nonlinear transformation. This process is equivalent to dressing the original chaotic sequence in a "quantum camouflage suit," thereby masking the structural characteristics of the underlying classical chaotic system. Even if an attacker intercepts the key stream, they cannot identify its original generating model, increasing the "nonlinear complexity" of the sequence. This greatly increases the difficulty of cracking the code and effectively resists attacks targeting the structure of chaotic systems.
[0076] It is evident that introducing QLSTM networks to improve chaotic sequences has the following advantages: QLSTM introduces high-dimensional nonlinear mapping relationships by combining gating structures with quantum circuits, which significantly improves the complexity of sequences. QLSTM has temporal memory capabilities, which makes the generated sequence dependent on historical state information, thereby enhancing the unpredictability of the sequence; By using quantum superposition and interference mechanisms, the statistical distribution of the sequence is optimized to make it closer to an ideal random sequence, thereby increasing information entropy.
[0077] In practical applications, the specific calculation steps of QLSTM can be expressed as formula (26): (26) in, This indicates the current time step, signifying that the computation is performed sequentially. This represents the input data at the current time step. It represents the hidden state of the previous time step and carries the previous sequence information; The forget gate determines how much cell state information from the previous moment is retained. Its value is between 0 and 1, where 0 represents complete forgetting and 1 represents complete retention. This represents the input gate, which determines how much new information from the current input needs to be written into the cell state; its value is between 0 and 1. This represents the candidate cell state and characterizes the new memory content generated based on the current input, with a value between -1 and 1. It represents the cell state after the current update, which is "the old memory after forgetting" plus "the new memory after input gate filtering"; It represents the cell state at the previous moment (long-term memory). This represents the output gate, which determines how much information in the current cell state will be output as a new hidden state. Its value is between 0 and 1. This represents the final output (hidden state) at the current moment; that is, the "output gate" controls the degree of exposure of the "current cell state". , , , Representing a variable quantum circuit, it acts as a quantum feature extractor, responsible for mapping input data to a high-dimensional quantum space for nonlinear transformation, thereby enhancing the expressive power of the model. This represents the Sigmoid activation function. This represents the hyperbolic tangent activation function. Two activation functions are used to compress the output of a quantum circuit to a specific numerical range in order to implement gated logic.
[0078] After obtaining the improved first chaotic sequence and the second chaotic sequence, the electronic device can use the improved first chaotic sequence to perform a quantum XOR operation on the quantum image. And quantum right circular shift operation The quantum image after the operation is obtained; then, based on the improved second chaotic sequence, the three primary colors of the quantum image are interchanged, thereby increasing the complexity of the algorithm structure and preventing the structure from being identified. The three primary colors interchange can be specifically expressed as formula (27):
[0079] (27) in, , , The rotation matrices representing the interchange of the RG, GB, and BR color channels can be expressed as formulas (28) to (30): (28) (29) (30) in, The Pauli matrix can be represented by formula (31): (31) It is based on quantum states Bloch coordinates The defined axis of rotation can be specifically expressed as formula (32): (32) , and The rotation angles resulting from RG interchange, GB interchange, and RB interchange can be specifically expressed as formulas (33) to (35): (33) (34) (35) In practical applications, the electronic device can obtain the image encryption result by performing a three-primary-color swap based on the quantum image after the operation, which can be specifically expressed as formula (36): (36) in, This represents the quantum image after the operation.
[0080] The quantum image encryption method provided in this application embodiment represents the image to be encrypted as a quantum image through quantization processing; determines the complexity of the quantum image; determines a target encryption algorithm using the complexity of the quantum image; and encrypts the quantum image using the target encryption algorithm. The scheme provided in this application embodiment selects a suitable quantum encryption algorithm for encryption based on the complexity of the quantum image corresponding to the image to be encrypted. Thus, when the complexity of the image to be encrypted is low, a low-strength encryption algorithm can be used, thereby reducing the encryption computational overhead and meeting computational efficiency requirements; and when the complexity of the image to be encrypted is high, a high-strength encryption algorithm can be used, thereby ensuring the security of the encrypted image and meeting security requirements.
[0081] The following section provides a more detailed description of this application with reference to application examples.
[0082] This application provides an application example of an adaptive quantum image encryption method based on quantum image complexity evaluation, such as... Figure 3 As shown, it includes the following steps: Step 301: Quantum image preparation; then, proceed to step 302; Among them, the quantum image representation model makes full use of properties such as quantum superposition and entanglement, providing a more efficient and secure way to store image data.
[0083] In practical applications, the FRQCI quantum image representation method is selected to represent the input original color digital image.
[0084] Step 302: Quantum image complexity assessment; then, proceed to step 303; In practical applications, the specific process for evaluating the complexity of quantum images includes: Step 1: Extract and normalize the features of the input quantum image; then, perform step 2. Among them, the quantum state entropy of quantum images is extracted by channel. , , Quantum coherence , , Spatial correlation , , and frequency domain features , , A total of 12 features; Step 2: Assign feature weights based on the quantum-classical hybrid self-attention module; then, proceed to step 3; The quantum attention core module includes an encoding layer, an evolution layer, and a measurement layer. In the encoding layer, preprocessed features are encoded based on amplitude. The process involves mapping the data to quantum states. Secondly, in the evolution layer, a multi-layered, cyclically structured parameterized quantum circuit is constructed. Each layer consists of a single-qubit rotation gate and a ring-shaped CNOT entanglement gate. Nonlinear correlations between features are extracted through quantum entanglement and interference. Finally, in the measurement layer, Z-basis measurements are performed on the four qubits to obtain the measurement probability distribution of each qubit. .
[0085] Then, the quantum probability distribution is linearly corrected using a classical residual correction module. This involves first performing feature concatenation to transform the quantum probability distribution... Compared with the original input features By piecing them together, we obtain Secondly, residual mapping is performed, and residual correction values are generated through trainable classical fully connected layers. Finally, the residual correction amount is used. Linear correction is applied to the quantum probability distribution.
[0086] Finally, the adaptive attention weights are determined using the adaptive weight output module. This involves first modulating trainable parameters by introducing classical learnable parameters. The corrected mixed features are weighted to obtain Secondly, normalized adaptive attention weights are generated using Sofmax. .
[0087] Step 3: Calculation of the complexity score of the quantum image In practical applications, the normalized features are weighted and summed with the corresponding adaptive weights to obtain the complexity score of the quantum image.
[0088] Step 303: Encryption strength decision; then, proceed to step 304; In practical applications, the score is based on complexity. Dynamically select encryption scheme.
[0089] when Less than the threshold When the threshold (i.e., the second threshold mentioned above) is reached, the image is determined to be a low-complexity image, and a low-strength encryption algorithm is used, such as an encryption algorithm based on a simple quantum gate. when It is in the middle range, that is ≤ < When an image is determined to be of medium complexity, a medium-strength encryption algorithm is used, such as an encryption algorithm based on a coupled hyperchaotic Lorenz system. when Not lower than the threshold When the threshold (i.e., the first threshold mentioned above) is reached, the image is considered a high-complexity image and a high-strength encryption algorithm is used, such as the encryption algorithm based on the improved dual chaotic system of QLSTM proposed in this proposal.
[0090] In practical applications, low-complexity images typically have high pixel redundancy and low information entropy. Even if partially cracked, the recoverable effective information is limited, so their security requirements are relatively low. High-complexity images, on the other hand, contain richer structural information and detailed features. Once cracked, they will leak a large amount of effective information, so they need to be protected with stronger encryption strategies.
[0091] Therefore, by constructing a quantum image complexity evaluation model, using complexity as a characterization index of image information content, and dynamically adjusting the encryption strength accordingly, an adaptive encryption mechanism of "high information content, high strength protection, low information content, low cost processing" is achieved. This effectively reduces the overall computational overhead while ensuring security, and improves the practicality and efficiency of the system.
[0092] Step 304: Perform quantum image encryption at low, medium, or high strength according to the selected algorithm.
[0093] The process of low-strength quantum image encryption can include: first, generating a key stream based on a simple Logistic mapping; second, using the value of the key stream to control the application of quantum gates, and realizing interactive encryption of qubits based on Hadamard gates, Pauli-X gates and phase gates.
[0094] The process of medium-strength quantum image encryption may include: First, generating six chaotic sequences based on a coupled hyperchaotic Lorenz system; second, performing modulo and integer operations on the six generated sequences and preparing corresponding qubit sequences encoded in binary form; third, constructing a quantum XOR operator based on the first three sequences. A quantum right circular shift operator is constructed based on the last three sequences. S Finally, the operator and S The original quantum image is applied sequentially to obtain the encrypted quantum image result.
[0095] The process of high-strength quantum image encryption can include: using a novel high-strength quantum image encryption method based on a dual chaotic system improved by QLSTM for encryption. The specific improvements are: first, using QLSTM to improve the sequence generated by the system, increasing the chaoticity of the sequence; second, adding a Logistic chaotic system to add a step of quantum image three-channel color swap encryption operation after quantum XOR and right cyclic shift encryption, further improving the image encryption strength and ensuring security.
[0096] In practical applications, such as Figure 4 As shown, firstly, a coupled hyperchaotic Lorenz system generates six sequences with the same number of bits as the quantum image, and a Logistic system generates one sequence with the same number of bits as the quantum image. These sequences are then input into a QLSTM network for improvement. Secondly, based on the improved sequences from the coupled hyperchaotic Lorenz system, quantum XOR and quantum right circular shift operations are performed on the quantum image. Finally, based on the improved sequences from the Logistic system, the three primary colors of the quantum image are interchanged, resulting in the encrypted image. .
[0097] The application example provided in this application combines multi-dimensional quantitative indicators such as quantum state entropy, quantum coherence, spatial correlation, and frequency domain features in the proposed quantum image complexity evaluation module. It proposes a feature weight allocation method based on quantum-classical hybrid self-attention to dynamically generate image complexity scores. Based on the complexity scores, quantum images are classified into low, medium, and high complexity, and quantum encryption algorithms of different strengths are adaptively matched, thereby optimizing resource allocation while ensuring security. Specifically, for matching high-complexity images, this application further proposes a novel high-strength quantum image encryption method based on a QLSTM-improved dual-chaotic system, increasing the chaos of the sequence and enhancing encryption security. This system not only achieves dynamic adaptation between encryption strength and image characteristics but also fully utilizes multi-dimensional image features, improving encryption efficiency and anti-attack capabilities, providing a practical solution for the secure transmission and storage of large-scale quantum images.
[0098] Compared with existing quantum image encryption technologies, the solution provided in this application example has the following advantages: A novel method for fusing multiple features and calculating image complexity scores based on a quantum-classical hybrid self-attention mechanism is proposed. Compared to ordinary self-attention mechanisms, the introduction of quantum entanglement and interference significantly reduces computational complexity and enhances the ability to capture nonlinear correlations. Furthermore, the spatial and frequency domain characteristics of quantum images are fully considered in the complexity assessment, making the assessment results more representative and providing a reliable basis for the selection of adaptive encryption strategies for quantum images.
[0099] The proposed adaptive encryption strategy dynamically selects the encryption strength based on the complexity score. It employs weaker encryption for low-complexity images to reduce computational overhead, while choosing a medium-to-stronger encryption scheme to enhance security for medium-to-high-complexity images. Compared to existing quantum image encryption methods, this approach adaptively adjusts the encryption strategy according to image characteristics, more efficiently adapting to images of varying complexity, thereby improving computational efficiency while ensuring the security of quantum image encryption.
[0100] To address high-strength encryption scenarios, a quantum image encryption method based on an improved dual-chaotic system using QLSTM is proposed. This method optimizes the initial chaotic sequence generated by a coupled hyperchaotic Lorenz system and a Logistic system using QLSTM, and then uses the optimized Logistic sequence to perform RGB three-channel primary color swapping in the quantum image. Compared to the original coupled hyperchaotic Lorenz system encryption, this method not only increases the chaos of the generated sequence but also further improves the image encryption strength, ensuring security.
[0101] To implement the method of the embodiments of this application, the embodiments of this application also provide a quantum image encryption device, applied to electronic devices, such as... Figure 5 As shown, the device includes: Quantumization unit 501 is used to represent the image to be encrypted as a quantum image; The first determining unit 502 is used to determine the complexity of the quantum image; The second determining unit 503 is used to determine the target quantum encryption algorithm by utilizing the complexity of the quantum image; The encryption unit 504 is used to encrypt the quantum image using the target quantum encryption algorithm.
[0102] In some optional embodiments, the device may further include: An acquisition unit is used to acquire the image to be encrypted.
[0103] In some optional embodiments, the first determining unit 502 is specifically used for: The quantum image is subjected to feature extraction to obtain quantum image features; Determine the feature weight corresponding to each quantum image feature; The complexity of the quantum image is determined by using all quantum image features and their corresponding feature weights.
[0104] In some optional embodiments, the first determining unit 502 is specifically used for: The quantum image features are preprocessed to obtain preprocessed features; Based on amplitude encoding, the preprocessed features are mapped to quantum state features; Based on the quantum attention mechanism, the quantum state features are evolved to obtain evolved quantum state features, which characterize the nonlinear correlation between the quantum image features; The probability distribution of the quantum image features is obtained by measuring the evolved quantum state characteristics. The adaptive attention weights of the quantum image features are determined using the probability distribution of the quantum image features. The complexity of the quantum image is obtained by weighting the quantum image features using the adaptive attention weights.
[0105] In some optional embodiments, the second determining unit 503 is specifically used for: When the complexity of the quantum image is greater than or equal to the first threshold, the first quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the first threshold and greater than or equal to the second threshold, the second quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the second threshold, the third quantum encryption algorithm is used as the target quantum encryption algorithm. The encryption strength of the first quantum encryption algorithm is greater than that of the second quantum encryption algorithm, and the encryption strength of the second quantum encryption algorithm is greater than that of the third quantum encryption algorithm.
[0106] In some optional embodiments, the encryption unit 504 is specifically used for: The first chaotic sequence is generated based on the coupled hyperchaotic Lorenz system. A second chaotic sequence is generated based on the Logistic system. Using the first chaotic sequence, a quantum XOR operation and a quantum right circular shift operation are performed on the quantum image to obtain the manipulated quantum image; Using the second chaotic sequence, the three primary colors of the quantum image after the operation are interchanged to obtain an encrypted quantum image.
[0107] In some optional embodiments, the encryption unit 504 is specifically used for: Based on the coupled hyperchaotic Lorenz system, a first initial chaotic sequence is generated; The first initial chaotic sequence is processed using QLSTM to obtain the first chaotic sequence. The generation of the second chaotic sequence based on the Logistic system includes: Based on the Logistic system, a second initial chaotic sequence is generated; The second initial chaotic sequence is processed using QLSTM to obtain the second chaotic sequence.
[0108] In practical applications, the acquisition unit can be implemented by the processor in the quantum image encryption device in combination with the communication interface. The quantization unit 501, the first determination unit 502, the second determination unit 503, and the encryption unit 504 can be implemented by the processor in the quantum image encryption device.
[0109] It should be noted that the quantum image encryption device provided in the above embodiments is only illustrated by the division of the above-described program units when performing quantum image encryption. In practical applications, the above processing can be assigned to different program units as needed, that is, the internal structure of the device can be divided into different program units to complete all or part of the processing described above. In addition, the quantum image encryption device and the quantum image encryption method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0110] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device, such as... Figure 6 As shown, the electronic device 600 includes: The communication interface 601 enables information exchange with other devices; The processor 602 is connected to the communication interface 601 to enable information interaction with other devices and to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; The computer program is stored in memory 603.
[0111] Specifically, the processor 602 is used for: The image to be encrypted is represented as a quantum image through quantization processing; Determine the complexity of the quantum image; The target quantum encryption algorithm is determined by utilizing the complexity of the quantum image. The quantum image is encrypted using the target quantum encryption algorithm.
[0112] In some optional embodiments, the communication interface 601 is used for: Obtain the image to be encrypted.
[0113] In some alternative embodiments, the processor 602 is specifically used for: The quantum image is subjected to feature extraction to obtain quantum image features; Determine the feature weight corresponding to each quantum image feature; The complexity of the quantum image is determined by using all quantum image features and their corresponding feature weights.
[0114] In some alternative embodiments, the processor 602 is specifically used for: The quantum image features are preprocessed to obtain preprocessed features; Based on amplitude encoding, the preprocessed features are mapped to quantum state features; Based on the quantum attention mechanism, the quantum state features are evolved to obtain evolved quantum state features, which characterize the nonlinear correlation between the quantum image features; The probability distribution of the quantum image features is obtained by measuring the evolved quantum state characteristics. The adaptive attention weights of the quantum image features are determined using the probability distribution of the quantum image features. The complexity of the quantum image is obtained by weighting the quantum image features using the adaptive attention weights.
[0115] In some alternative embodiments, the processor 602 is specifically used for: When the complexity of the quantum image is greater than or equal to the first threshold, the first quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the first threshold and greater than or equal to the second threshold, the second quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the second threshold, the third quantum encryption algorithm is used as the target quantum encryption algorithm. The encryption strength of the first quantum encryption algorithm is greater than that of the second quantum encryption algorithm, and the encryption strength of the second quantum encryption algorithm is greater than that of the third quantum encryption algorithm.
[0116] In some alternative embodiments, the processor 602 is specifically used for: The first chaotic sequence is generated based on the coupled hyperchaotic Lorenz system. A second chaotic sequence is generated based on the Logistic system. Using the first chaotic sequence, a quantum XOR operation and a quantum right circular shift operation are performed on the quantum image to obtain the manipulated quantum image; Using the second chaotic sequence, the three primary colors of the quantum image after the operation are interchanged to obtain an encrypted quantum image.
[0117] In some alternative embodiments, the processor 602 is specifically used for: Based on the coupled hyperchaotic Lorenz system, a first initial chaotic sequence is generated; The first initial chaotic sequence is processed using QLSTM to obtain the first chaotic sequence. The generation of the second chaotic sequence based on the Logistic system includes: Based on the Logistic system, a second initial chaotic sequence is generated; The second initial chaotic sequence is processed using QLSTM to obtain the second chaotic sequence.
[0118] It should be noted that the specific processing procedures of the processor 602 and the communication interface 601 can be understood with reference to the above method.
[0119] Of course, in practical applications, the various components in electronic device 600 are coupled together through bus system 603. It can be understood that bus system 603 is used to realize the connection and communication between these components. In addition to a data bus, bus system 603 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 6 The general designated all buses as Bus System 603.
[0120] The memory 603 in this embodiment is used to store various types of data to support the operation of the electronic device 600. Examples of such data include any computer program used to operate on the electronic device 600.
[0121] The methods disclosed in the embodiments of this application can be applied to the processor 602, or implemented by the processor 602. The processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 602 or by instructions in the form of software. The processor 602 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 602 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 603. The processor 602 reads the information in the memory 603 and combines its hardware to complete the steps of the aforementioned method.
[0122] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0123] It is understood that the memory (memory 603) in this embodiment of the application can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0124] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 603 storing a computer program, which can be executed by the processor 602 of the electronic device 600 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0125] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by the processor 602 of the electronic device 600 to complete the steps described in the aforementioned method.
[0126] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0127] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0128] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A quantum image encryption method, characterized in that, The method includes: The image to be encrypted is represented as a quantum image through quantization processing; Determine the complexity of the quantum image; The target quantum encryption algorithm is determined by utilizing the complexity of the quantum image. The quantum image is encrypted using the target quantum encryption algorithm.
2. The method according to claim 1, characterized in that, Determining the complexity of the quantum image includes: The quantum image is subjected to feature extraction to obtain quantum image features; Determine the feature weight corresponding to each quantum image feature; The complexity of the quantum image is determined by using all quantum image features and their corresponding feature weights.
3. The method according to claim 2, characterized in that, The determination of the feature weight corresponding to each quantum image feature includes: The quantum image features are preprocessed to obtain preprocessed features; Based on amplitude encoding, the preprocessed features are mapped to quantum state features; Based on the quantum attention mechanism, the quantum state features are evolved to obtain evolved quantum state features, which characterize the nonlinear correlation between the quantum image features; The probability distribution of the quantum image features is obtained by measuring the evolved quantum state characteristics. The adaptive attention weights of the quantum image features are determined using the probability distribution of the quantum image features. The complexity of the quantum image is obtained by weighting the quantum image features using the adaptive attention weights.
4. The method according to claim 1, characterized in that, The step of determining the target quantum encryption algorithm using the complexity of the quantum image includes: When the complexity of the quantum image is greater than or equal to the first threshold, the first quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the first threshold and greater than or equal to the second threshold, the second quantum encryption algorithm is used as the target quantum encryption algorithm. When the complexity of the quantum image is less than the second threshold, the third quantum encryption algorithm is used as the target quantum encryption algorithm. The encryption strength of the first quantum encryption algorithm is greater than that of the second quantum encryption algorithm, and the encryption strength of the second quantum encryption algorithm is greater than that of the third quantum encryption algorithm.
5. The method according to claim 1, characterized in that, The encryption of the quantum image using the target quantum encryption algorithm includes: The first chaotic sequence is generated based on the coupled hyperchaotic Lorenz system. A second chaotic sequence is generated based on the Logistic system. Using the first chaotic sequence, a quantum XOR operation and a quantum right circular shift operation are performed on the quantum image to obtain the manipulated quantum image; Using the second chaotic sequence, the three primary colors of the quantum image after the operation are interchanged to obtain an encrypted quantum image.
6. The method according to claim 5, characterized in that, The generation of the first chaotic sequence based on the coupled hyperchaotic Lorenz system includes: Based on the coupled hyperchaotic Lorenz system, a first initial chaotic sequence is generated; The first initial chaotic sequence is processed using a quantum long short-term memory network (QLSTM) to obtain the first chaotic sequence. The generation of the second chaotic sequence based on the Logistic system includes: Based on the Logistic system, a second initial chaotic sequence is generated; The second initial chaotic sequence is processed using QLSTM to obtain the second chaotic sequence.
7. A quantum image encryption device, characterized in that, include: Quantumization unit, used to represent the image to be encrypted as a quantum image; The first determining unit is used to determine the complexity of the quantum image; The second determining unit is used to determine the target quantum encryption algorithm by utilizing the complexity of the quantum image; An encryption unit is used to encrypt the quantum image using the target quantum encryption algorithm.
8. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.