A visual significance image encryption and decryption method, system and storage medium

By combining a deep compression autoencoder and a Logistic chaotic map with a Glow model, a visually meaningful encrypted image is generated, solving the problems of image size expansion and quality degradation in existing technologies, and achieving high-security and high-quality image encryption.

CN120915888BActive Publication Date: 2026-05-19GUANGZHOU UNIVERSITY +3
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU UNIVERSITY
Filing Date
2025-09-05
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing visual image encryption technologies suffer from problems such as image size inflation, quality degradation, and ease of detection, making it difficult to simultaneously ensure image information security and natural appearance.

Method used

By combining a deep compression autoencoder and a Logistic chaotic map with the Glow model, a visually meaningful encrypted image is generated without the need for a carrier image through compression, encryption, and scrambling of the secret image. Security is then ensured using traditional cryptographic methods based on Logistic chaotic maps.

Benefits of technology

It achieves high-quality secret image reconstruction, reduces the risk of being detected by steganography, improves the security and quality of encrypted images, and has a large hiding capacity to meet the encryption needs of images of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915888B_ABST
    Figure CN120915888B_ABST
Patent Text Reader

Abstract

The application discloses a visual significance image encryption and decryption method and system and a storage medium, and comprises an image encryption stage of an image provider and an image decryption stage of an image user. For the image encryption stage, firstly, a three-channel color secret image is compressed and vectorized by using a deep compression autoencoder to obtain a one-dimensional vector of the image; then, a pseudo-random noise vector is generated by using a random noise generator and spliced with the one-dimensional vector to obtain a secret-containing vector; then, the secret-containing vector is encrypted and scrambled by using a Logistic chaotic mapping method; and finally, the encrypted image containing visual significance is generated by inputting the secret-containing vector into a Glow model. The image decryption stage is the inverse operation of the image encryption stage. The application realizes double protection of cryptography and visual significance by using a deep compression autoencoder, a Logistic chaotic mapping method and a Glow model, and can not only encrypt the image containing visual significance without a carrier image, but also improve the quality of the encrypted image to realize high-quality secret image reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of image encryption, specifically relating to a visual image encryption and decryption method, system, and storage medium. Background Technology

[0002] With the widespread adoption of the internet and digital communications, the volume of information has exploded, making information security and privacy protection issues increasingly serious. Images, as a core medium for information exchange, carry a large amount of personal privacy and sensitive information. With the prevalence of digital lifestyles such as social media, cloud storage, remote work, and online education, the generation, sharing, and storage of images have increased dramatically, leading to unprecedented demands for image security and privacy protection. Encrypting images using image encryption technology prevents attackers from directly reading the information, increasing the difficulty for attackers to obtain image information, thereby reducing the risk of image data leakage and ensuring the security of image data during transmission and storage. Therefore, ensuring image security and privacy is becoming increasingly important.

[0003] Traditional image encryption methods are primarily based on cryptographic principles. They involve complex mathematical transformations of image data to convert the original image into a meaningless, noisy ciphertext image, thereby protecting the image content. Mainstream image encryption methods include those based on chaotic mapping, traditional cryptography, transform domain, and DNA encoding. These methods provide a certain level of security by encrypting the appearance and pixel information of digital images and are widely used to protect image content. However, because these generated noisy images lack visual meaning, their significant random texture features easily attract the attention of attackers, making them a primary target for cryptanalysis and increasing the risk of encryption being cracked. In the field of image hiding, steganography embeds image information into a carrier image in an invisible form, generating a steganographic image similar to the carrier image. This method embeds image information by modifying the spatial or frequency domain of the carrier image. Some deep learning methods use adversarial neural networks (GANS) or invertible neural networks (INN) to embed secret images into the carrier image, generating steganographic images with high visual quality. Compared to traditional encryption techniques, steganography generates steganographic images that are visually highly similar to the carrier image. However, it inevitably modifies the statistical characteristics of the carrier image, resulting in significant differences in the statistical regularities of the steganographic image compared to the natural image. This makes the steganographic image detectable by a steganalysis tool. Furthermore, since steganography schemes lack cryptographic protection, attackers can directly extract the secret image from the steganographic image once they obtain the model or method used.

[0004] In 2015, Bao and Zhou proposed the concept of Visually Meaningful Encrypted Image (VMEI) in their paper "Image encryption: Generating visually meaningful encrypted images," and it has been used for secure visual communication. For example... Figure 1 As shown, Visually Meaningful Image Encryption (VMIE) pre-encrypts a secret image using existing encryption methods, then embeds the pre-encrypted image into a carrier image by modifying the carrier image, generating a visually meaningful encrypted image similar to the carrier image. This method combines traditional image encryption methods with image steganography to generate a visually meaningful encrypted image, achieving dual protection for the image. Although VMIE provides visually meaningful image encryption protection for secret images, it still has the following two problems: 1. The generated VMEI suffers from size inflation; that is, the size of the visually meaningful encrypted image generated from a secret image and a carrier image of the same size is four times the size of the secret image; 2. The image quality of the generated VMEI is degraded and prone to distortion, increasing the risk of detection.

[0005] To address the aforementioned issues, some visually meaningful encrypted images based on compressed sensing have been proposed. These methods encrypt secret images using compressed sensing technology to solve the problem of image size inflation. However, since natural images are not strictly sparse, compressed sensing methods cannot achieve lossless reconstruction, resulting in poor image reconstruction quality. Furthermore, existing visually meaningful image encryption methods, which embed encrypted image information by modifying the carrier image, inevitably leave traces of modification, which can be detected by existing statistical analysis methods. Therefore, a visually meaningful encryption technology that can ensure image information security, maintain the natural appearance of the encrypted image, and solve the problems of generated image size inflation, low quality, poor quality reconstructed secret images, and difficulty in detection is currently lacking. Summary of the Invention

[0006] The main objective of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a visually meaningful image encryption and decryption method, system, and storage medium. It achieves dual protection of secret images through cryptography and visual meaning. By using a deep compression autoencoder, a Logistic chaotic mapping method, and a Glow model, it realizes visually meaningful image encryption without the need for a carrier image, providing a new paradigm for image security and privacy protection.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] This invention provides a method for encrypting and decrypting visually meaningful images, comprising the following steps:

[0009] Step 1: Image encryption by the image provider:

[0010] The three-channel color secret image is compressed using a deep compression autoencoder and quantized to obtain a one-dimensional vector of the image;

[0011] A pseudo-random noise vector is generated using a random noise generator;

[0012] A dense vector is obtained by concatenating a one-dimensional vector of the image and a pseudo-random noise vector.

[0013] The encrypted vector and the key are obtained by encrypting and scrambling the dense vector using the Logistic chaotic mapping.

[0014] The encrypted vector is input into the Glow model to generate an encrypted image with visual meaning;

[0015] Step 2: Image decryption by the image user:

[0016] The encrypted image containing visual meaning is input into the Glow model to perform inverse mapping and obtain the encrypted vector;

[0017] Obtain the key published by the image provider, and use the Logistic chaotic mapping to inversely scramble the encrypted vector to decrypt it and obtain the encrypted vector.

[0018] The secret image is obtained by inputting the secret vector into a deep compression autoencoder for decoding and reconstruction.

[0019] As a preferred technical solution, the deep compression auto encoder is an improvement on the traditional auto encoder by introducing an intermediate layer and residual connections, including an encoder, an intermediate layer and a decoder; the intermediate layer is connected to the encoder and the decoder respectively through a convolutional layer; the convolutional layer is used to adjust the number of channels.

[0020] The encoder includes multiple downsampling modules; each downsampling module is constructed using an average pooling layer as the first main branch and a residual connection as the first residual branch; the first residual branch assists the main branch in learning the residual through spatial-channel transformation;

[0021] The decoder includes multiple upsampling modules; each upsampling module is constructed using an interpolation upsampling layer as the second main branch and a residual connection as the second residual branch; the second residual branch reverse maps the residual information to assist the main branch in reconstructing details;

[0022] The intermediate layer uses multiple sets of convolution-normalization-activation operations stacked sequentially as the main branch, and uses residual connections as the third residual branch; the third residual branch is used to enhance features.

[0023] As a preferred technical solution, the generation of the pseudo-random noise vector specifically involves:

[0024] Create a random noise generator; the noise data generated by the random noise generator conforms to a normal distribution.

[0025] Read the current system timestamp and use it as the seed for the random noise generator;

[0026] The seed is used as a parameter of the random noise generator to generate a pseudo-random noise vector.

[0027] As a preferred technical solution, the length of the pseudo-random noise vector is the input length of the Glow model minus the length of the one-dimensional vector of the image.

[0028] As a preferred technical solution, the encryption and scrambling of the dense vector using Logistic chaotic mapping specifically involves:

[0029] Divide the dense vector into three sub-vectors of equal length;

[0030] Convert each subvector into a square matrix;

[0031] The key parameters for each sub-vector are generated using a Logistic chaotic mapping. x 0 and μ And based on the key parameters of each subvector x 0 and μ Generate the corresponding chaotic sequence;

[0032] Remove the first part of each chaotic sequence respectively m Each element yields a new chaotic sequence corresponding to each sub-vector;

[0033] Sort each element in the new chaotic sequence of each sub-vector in ascending order to obtain the original index position sequence of each sub-vector after sorting.

[0034] The rows and columns of the corresponding square matrix are scrambled according to the original index position sequence of each sub-vector to obtain the scrambled square matrix of each sub-vector.

[0035] The square matrix after scrambling each subvector is expanded into a one-dimensional expanded vector, and then concatenated in order to obtain the encrypted vector.

[0036] As a preferred technical solution, the scrambling of the rows and columns of the corresponding square matrix means shifting the rows and columns corresponding to the index numbers in the original index position sequence to the rows and columns corresponding to the index numbers in the original index position sequence.

[0037] As a preferred technical solution, the Glow model is trained using the CelebA-HQ dataset and reversibly generates encrypted images with visual meaning through maximum likelihood estimation.

[0038] As a preferred technical solution, the recovery of the secret image specifically involves:

[0039] The dense vector is segmented, and one-dimensional vectors are extracted from the dense vector.

[0040] The one-dimensional vector is reshaped into a latent space vector, and then decoded and reconstructed using a deep compression autoencoder to obtain the secret image.

[0041] In another aspect, the present invention provides a visually meaningful image encryption and decryption system applied to the aforementioned visually meaningful image encryption and decryption method, comprising an encryption module and a decryption module; the encryption module includes a compression encoding module, a noise generation module, a vector splicing module, an encryption scrambling module, and an image generation module; the decryption module includes an image inverse mapping module, a decryption inverse scrambling module, and an image restoration module.

[0042] The compression encoding module is used to compress the three-channel color secret image using a deep compression autoencoder and quantize it into a one-dimensional vector of the image;

[0043] The noise generation module is used to generate pseudo-random noise vectors through a random noise generator.

[0044] The vector concatenation module is used to concatenate a one-dimensional vector of an image and a pseudo-random noise vector to obtain a dense vector;

[0045] The encryption and scrambling module is used to encrypt and scramble the encrypted vector using a Logistic chaotic mapping to obtain the encryption vector and the key.

[0046] The image generation module is used to input the encryption vector into the Glow model to generate an encrypted image with visual meaning;

[0047] The image inverse mapping module is used to input the encrypted image containing visual meaning into the Glow model for inverse mapping to obtain the encrypted vector;

[0048] The decryption and inverse scrambling module is used to obtain the key published by the image provider, and then inversely scramble the encrypted vector using the Logistic chaotic mapping to decrypt and obtain the encrypted vector.

[0049] The image restoration module is used to input the secret vector into a depth compression autoencoder for decoding and reconstruction to obtain the secret image.

[0050] In another aspect, the present invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the aforementioned method for encrypting and decrypting visually meaningful images.

[0051] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0052] This invention proposes a visually meaningful image encryption and decryption method, innovatively introducing the stream-based generative model Glow into image information security. It utilizes a deep compression autoencoder to encode, compress, decode, and reconstruct the secret image, solving the problems of limited hiding space and image size expansion inherent in the Glow model. Compared to existing technologies, this invention does not require modifying the carrier image to generate a visually meaningful encrypted image; instead, it directly generates the visually meaningful encrypted image from the encryption vector using the Glow model. This encryption method not only significantly improves the quality of the encrypted image but also greatly reduces the risk of detection by steganalysis, achieving a near-random detection rate. Furthermore, this invention employs a Logistic chaotic mapping method to ensure the security of the encryption method through traditional cryptographic techniques. The key space of this encryption method is approximately 2^32^22^3 ... 300 Furthermore, it exhibits good key sensitivity; it also introduces random noise vectors during the encryption process, breaking the deterministic "key-ciphertext" correspondence in traditional cryptographic systems. This ensures that the visually meaningful encrypted images generated each time are different with the same key and image, thereby enhancing resistance to cryptanalysis attacks and further improving encryption security. In addition, this invention has a large hiding capacity. By adjusting the structure of the deep compression autoencoder, it can encrypt images of different sizes. In full-size image encryption, the loss between the reconstructed image and the original image is negligible, and the loss remains acceptable in encrypting secret images four times the size of the generated image, achieving high-quality secret image reconstruction. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a technical roadmap for existing visual image encryption technologies in embodiments of the present invention.

[0055] Figure 2This is an overall flowchart of a visual image encryption and decryption method according to an embodiment of the present invention.

[0056] Figure 3 This is a schematic diagram of the structure of a deep compression automatic encoder in an embodiment of the present invention.

[0057] Figure 4 This is a schematic diagram of a real image generated during the training of the Glow model in an embodiment of the present invention.

[0058] Figure 5 This is a schematic diagram of an encrypted image with visual significance generated in an embodiment of the present invention.

[0059] Figure 6 The diagram shows the ROC curves of the method of the present invention and existing methods in the embodiments of the present invention.

[0060] Figure 7 This is an overall block diagram of a visual image encryption and decryption system according to an embodiment of the present invention. Detailed Implementation

[0061] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0062] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0063] like Figure 2 As shown, this embodiment provides a visual image encryption and decryption method, which mainly includes two steps: image encryption by the image provider and image decryption by the image user.

[0064] For image encryption by the image provider, the steps include:

[0065] S1.1. The three-channel color secret image is compressed using a deep compression autoencoder and quantized to obtain a one-dimensional vector of the image.

[0066] S1.2 Generate pseudo-random noise vectors using a random noise generator.

[0067] S1.3. The one-dimensional vector of the image and the pseudo-random noise vector are concatenated to obtain the dense vector.

[0068] S1.4. Encrypt and scramble the dense vector using Logistic chaotic mapping to obtain the encrypted vector and key.

[0069] S1.5 Input the encryption vector into the Glow model to generate an encrypted image with visual meaning.

[0070] For image decryption by the image user, the steps include:

[0071] S2.1 Input the encrypted image containing visual meaning into the Glow model and perform inverse mapping to obtain the encrypted vector.

[0072] S2.2 Obtain the key published by the image provider, and use the Logistic chaotic mapping to inversely scramble the encrypted vector to decrypt it and obtain the encrypted vector.

[0073] S2.3. Input the secret vector into a deep compression autoencoder to decode and reconstruct the secret image.

[0074] Furthermore, such as Figure 3 As shown, the deep compression autoencoder in this invention is an improvement on the traditional autoencoder by introducing an intermediate layer and residual connections, thereby achieving high-quality image compression and decoding reconstruction.

[0075] Traditional autoencoders are unsupervised learning models based on neural networks. Their core objective is to achieve efficient representation of input data through compression and reconstruction processes. They consist of an encoder and a decoder, learning the latent features of the data to achieve functions such as data compression, denoising, and feature extraction. An autoencoder can be viewed as a symmetrical model structure that minimizes the input and output data, compressing high-dimensional data into a low-dimensional latent space through the encoder, and then reconstructing the high-dimensional input data through the decoder. Traditional convolutional autoencoders (CAEs) for image compression tasks consist of multiple convolutional and pooling layers. The convolutional layers extract input features, and the pooling layers downsample the features; the decoder upsamples the input image through deconvolution and interpolation. The deep autoencoder in this invention is an improved model based on traditional autoencoders. By introducing intermediate layers and residual connections, it achieves image encoding compression and decoding reconstruction, including an encoder, intermediate layers, and a decoder. The intermediate layers are connected to both the encoder and decoder via convolutional layers; the convolutional layers are used to adjust the number of channels. In this embodiment, a 1×1 convolution is used to linearly map the recombined high-channel features, adjusting the number of channels to match the dimension of the main branch. This process preserves spatial information while reducing the number of parameters and improving computational efficiency.

[0076] like Figure 3As shown, the encoder section contains multiple downsampling modules, whose main function is to extract and compress features from the input image, converting high-dimensional image data into low-dimensional feature representations while preserving key image information. Each downsampling module introduces residual connections, allowing the model to more easily learn identity mappings during training. This design, through shortcut connections, directly passes the original input information, effectively alleviating the gradient vanishing problem and improving model training stability and convergence speed. The residual structure allows the model to focus on learning the residual between the input and output, rather than directly learning the complete mapping, making it particularly suitable for handling information transfer problems in deep networks. For each sampling module, an average pooling layer is used as the first main branch to directly reduce the spatial size. By calculating the average value of local regions, this operation reduces the feature map dimension while preserving overall texture information, avoiding the detail loss problem that max pooling might cause. The stride of average pooling is typically set to 2, halving the feature map size (e.g., from H×W to H / 2×W / 2). The residual connection, as the first residual branch, assists the main branch in learning the residual through spatial-channel transformation, transforming the spatial features of the feature map into channel features. That is, it reorganizes the input tensor shape [B, C, H, W] (batch size, number of channels, height, width) into the shape [B, p2C, H / p, W / p]. Traditional pooling operations directly discard some spatial information through downsampling, while spatial-channel transformation "encodes" the spatial dimension information into the channels, avoiding information loss.

[0077] The intermediate layer uses multiple sets of convolution-normalization-activation operations stacked sequentially as the main branch, combined with residual connections as the third residual branch to achieve deep feature mining. This allows for more in-depth mining and enhancement of the features extracted by the encoder, improving the model's feature representation ability and learning performance. Specifically, the main branch is the input feature map, and the residual branch is the residual feature map extracted through convolution. This method further enhances the features extracted by the encoder, enriching the feature representation ability through multiple convolution and normalization operations. Simultaneously, residual connections are used to alleviate the gradient vanishing problem, prevent feature degradation, and improve the model's training efficiency and performance.

[0078] The decoder section comprises multiple upsampling modules, forming a symmetrical structure with the encoder. Its main function is to recover and reconstruct the feature information compressed by the encoder, outputting a reconstructed image with the same size as the input image. Each upsampling module also incorporates residual connections, which allows the model to learn identity mappings more easily during training, helping to alleviate the vanishing gradient problem and significantly improving training efficiency and performance. Through residual connections, the model can better preserve and transfer feature information during training, avoiding information loss and gradient instability caused by increasing network depth. Similarly, each upsampling module consists of a main branch and a residual branch; the second main branch uses an interpolation upsampling layer to directly increase the spatial size. In this embodiment, the interpolation upsampling layer uses nearest-neighbor interpolation upsampling, copying the values ​​of adjacent pixels to fill the newly added spatial locations, thereby quickly enlarging the feature map size. This method can preserve the information structure of the original features to a certain extent.

[0079] The second residual branch assists the main branch in reconstructing details by inversely mapping residual information. In this embodiment, the second residual branch adjusts the number of channels using 1×1 convolutions, and then uses a PixelShuffle layer (a sub-pixel convolutional layer) to transform the channel-dimensional information back into the spatial dimension. Specifically, the 1×1 convolution can flexibly adjust the number of channels in the feature map to meet the needs of subsequent PixelShuffle operations. The PixelShuffle layer then rearranges the information in the channels into the spatial dimension, realizing the recovery of spatial information.

[0080] Therefore, the image compression process of the encoder in the above-mentioned depth compression autoencoder can be represented as: h i = g ( x i ),in, h i ∈ R q It is the latent vector representation of the encoder output, which the encoder uses a function g : R n ⟶ R q Image encoding has been implemented. In a deep compression autoencoder, the decoder can be used with functions. f express: ,in The process of the decoder reconstructing the image is called minimization. x i and Therefore, for a size of N × N The Secret of Three-Channel Color xsecret Image (data size is) N × N (×3), data compression and encoding are performed by mapping to a low-dimensional latent space using a deep compression autoencoder, resulting in image encoding. h And vectorize to obtain a length of L 1 one-dimensional latent vector z 1; where length L 1 should be less than N × N ×3.

[0081] Furthermore, the method for generating pseudo-random noise vectors is as follows:

[0082] S1.2.1 Create a random noise generator whose generated noise data conforms to a normal distribution. X ~ N ( μ , σ 2 ).

[0083] S1.2.2 Read the current system timestamp and use it as the seed for the random noise generator. seed .

[0084] S1.2.3, Place the seeds seed As a parameter of the random noise generator, the generation length is... L 2 pseudo-random noise vector z 2.

[0085] In this embodiment, the system refers to the physical device (e.g., server, computer, embedded device, etc.) and its running operating system (e.g., Windows, Linux, Android, etc.). The acquisition of the timestamp relies on the system's underlying clock module, which is jointly maintained by hardware (e.g., crystal oscillator) and the operating system's clock management mechanism to ensure the uniqueness and real-time nature of the timestamp. The system timestamp records the current moment in milliseconds or nanoseconds based on UTC (Coordinated Universal Time). The number of seconds from January 1, 1970 to the present is obtained, converted to a millisecond-level timestamp, and used as a seed. This timestamp dynamically changes with the real-time nature of subsequent encryption operations, ensuring that the seed is different for each encryption.

[0086] Furthermore, the length of the pseudo-random noise vector L 2. Input length of the Glow model L Subtract the length of the one-dimensional vector of the image L 1. Conclusion.

[0087] Finally, the one-dimensional potential vector z 1 and pseudo-random noise vector z 2. Concatenate to obtain a dense vectorz , length is L = L 1+ L 2.

[0088] Furthermore, the Logistic chaotic map is a classic one-dimensional discrete chaotic system that generates sequences with chaotic properties through simple nonlinear iteration. Based on the pseudo-randomness, aperiodicity, and sensitivity to initial values ​​of the generated chaotic sequences, it is frequently used in encryption algorithms in cryptography and information security to enhance the security of information transmission and storage. Therefore, this application uses the Logistic chaotic map to encrypt and scramble dense vectors, specifically as follows:

[0089] S1.4.1, The dense vector z (size is) N × N ×3) Divide into three sub-vectors of equal length: z a , z b , z c The length of each subvector is N × N Because the size of the image generated by the Glow model must be consistent with the dimension of the input vector, the Glow model generates... N × N The required input vector length for a three-channel visually meaningful image of this size L Should be N × N ×3. Therefore, regardless of the length of the input vector, it can always be decomposed into three equal-length sub-vectors that can form a square matrix.

[0090] S1.4.2, each N × N The subvectors are respectively converted into a N × N Square array of size M i .

[0091] S1.4.3. Use Logistic chaotic mapping to generate the key parameters corresponding to each sub-vector. x 0 and μ And based on the key parameters of each subvector x 0 and μ Generate the corresponding chaotic sequence C i The generation process is described as follows:

[0092] x n+1 = μxn (1- x n ), n ≥0,

[0093] in, x n+1 The first in the chaotic sequence n +1 element, x n The first in the chaotic sequence n Each element. This invention will use the key parameters of each subvector. μ and x 0 is used as a key parameter, where μ For the control parameters of the Logistic chaotic mapping system, x 0 represents the state variable of the Logistic chaotic mapping system. When x 0∈(0,1), μ When ∈ [3.67, 4], the entire system can be considered to be in a chaotic state. In a chaotic state, the system is extremely sensitive to initial conditions; even small changes in initial values ​​(such as...) can cause significant damage. x 0 of 10 -15 Level differences can lead to complete deviations in the iterative sequence, resulting in a non-periodic, non-convergent sequence with pseudo-randomness. Therefore, for specific parameters... μ and x 0 will generate a specific chaotic sequence.

[0094] S1.4.4, Remove each chaotic sequence separately. C i Center front m Each element yields a new chaotic sequence corresponding to each sub-vector. , is represented as: .

[0095] S1.4.5, For each sub-vector, a new chaotic sequence Sort each element in the array in ascending order to obtain the original index position sequence of each subvector after sorting. T i = { t 1, t 2, …, t N}

[0096] S1.4.6, Based on the original index position sequence of each sub-vector T i For the corresponding square matrix M i The rows and columns are scrambled separately to obtain a square matrix after scrambling each subvector. .

[0097] Furthermore, the scrambling process specifically involves:

[0098] Original index position sequence T i The index number in the square matrix M i The corresponding rows and columns are shifted to the rows and columns corresponding to the index numbers in the original index position sequence. For example: the original index position sequence of a subvector. T ={5,1,4,3,2}, its corresponding square matrix M If the rows or columns are {a, b, c, d, e}, then the scrambled square matrix is... M’ The rows or columns are {e,a,d,c,b}.

[0099] S1.4.7, The square matrix after scrambling each subvector Expand into a one-dimensional expansion vector , , The encrypted vector is obtained by concatenating the one-dimensional expanded vectors corresponding to each equal-length subvector in order. .

[0100] Furthermore, this invention uses a stream-based generative model (Glow model) to generate encrypted images with visual meaning. This model is trained using the CelebA-HQ dataset (containing 30,000 high-resolution face images) and generates images from normally distributed sampled noise data. N × N A three-channel color real human face image of various sizes, such as Figure 4 As shown. The specific process involves reversibly generating an encrypted image with visual meaning through maximum likelihood estimation. The specific formula is:

[0101] z ~ p θ ( z ), x ~ g θ ( z ),

[0102] in, z It is a latent variable, and is usually chosen as a Gaussian distribution with a mean of 0. p θ ( z ) = N ( z ;0, I ). g θ It is an invertible bijective function, that is, given a data... x availablez = f θ ( x )= Invertible function f θ enter x Latent variables can be obtained z ; z Through inverse transformation Can be restored x .function f θ Designed as , x and z The relationship can be written as:

[0103] ,

[0104] This flow-based method uses maximum likelihood estimation to transform inputs with simple distributions. x Transformed into a complex distribution z The core formula for a bijective mapping is:

[0105] ,

[0106] in, h i For the first of a series of intermediate transformation steps i The result after step transformation, the entire from x arrive z Complex bijective mappings may not be completed in one step, but rather broken down into... k A series of transformation steps h 1. h 2、…、 h k Each h i These are all intermediate state features represented during the transformation process. p θ ( x )and p θ ( z ) is a description of the model parameters θ The probability density function of the original input, i.e. x or z probability density function p .

[0107] Therefore, based on the Glow model described above, the encryption vector is... z ’ As input, it is mapped to the real image distribution through maximum likelihood estimation, generating a size of N ×N Encrypted images with visual meaning x VMEI (like Figure 5 (As shown).

[0108] Furthermore, image decryption for the image user is the reverse process of image encryption. First, the encrypted image containing visual meaning is decrypted. x VMEI The encryption vector is obtained by inverse mapping the input to a stream-based generative model. z ’ Then obtain the key published by the image provider. x 0 and μ By combining the Logistic chaotic mapping to inversely scramble the encrypted vector, decryption can be performed. z ’ Obtain dense vector z ; Ultimately, the dense vector will be z The secret image is obtained by decoding and reconstructing the input deep compression autoencoder. x recover The decoding and reconstruction steps are as follows:

[0109] For dense vectors z Divide into segments and extract those segments with a length of [length missing]. L 1 one-dimensional latent vector z 1;

[0110] Then the one-dimensional potential vector z 1. Re-adjust to latent image features h The secret image is obtained by decoding and reconstructing it using the decoder in a deep compression autoencoder. x recover .

[0111] To illustrate the performance and superiority of this method, this embodiment also provides three comparative experiments for verification to demonstrate the technical effects achieved by the method of the present invention.

[0112] Comparative Experiment 1: Compared with traditional visually meaningful image encryption methods [1-3], the quality of secret image reconstruction was evaluated using two evaluation metrics: PSNR and SSIM. PSNR represents the ratio between the maximum possible power of a signal and the power of destructive noise that affects its representation accuracy, quantifying the image reconstruction quality affected by lossy compression. When compressing or processing images, noise or distortion may be introduced, leading to a decrease in image quality. Therefore, a higher PSNR value indicates better image quality and a lower image distortion rate. SSIM is a metric used to measure the similarity between two images. Unlike traditional metrics such as mean square error (MSE), SSIM considers the structural information of the image, better reflecting the human visual system's perception of image quality. The final similarity result is mainly obtained by comparing the brightness, contrast, and structural changes of the two images. This comparative experiment 1 was conducted on the public datasets coco2017_val and DIV2K_valid. The comparison results are shown in Table 1 below.

[0113] Table 1. Image quality results of the method of the present invention and existing methods.

[0114]

[0115] As shown in Table 1, the PSNR and SSIM of the method of the present invention are superior to those of existing methods on the public datasets coco2017_val and DIV2K_valid [1-3], indicating that the reconstructed image quality of the method of the present invention is excellent and the distortion rate is low.

[0116] Comparative Experiment 2: The open-source steganalysis tool StegExpos was used to evaluate the anti-steganography detection capability of the generated images produced by the method of this invention compared with existing methods [1-3]. ROC curves were plotted to compare the method of this invention with other schemes; the ROC curve represents the accuracy of StegExpos in detecting visually meaningful encrypted images. The closer the curve is to 1, the higher the detection accuracy. AUC was also used as an evaluation metric to measure the classifier's ability to correctly sort positive samples (encrypted images) and negative samples (natural images). AUC=1 indicates perfect classification, and AUC=0.5 indicates that the classification effect is no different from random guessing. The results are as follows: Figure 6 As shown in the figure. Curve Wang represents the existing method [1], curve ICMCE represents the existing method [2], and curve MCE represents the existing method [3]. It can be seen from the figure that the detection accuracy of the method of the present invention is close to 0.5, which is basically equivalent to random guessing. Because the present method does not require any modification to the cover image, but directly generates VMEI from the cryptic information; therefore, steganalysis tools cannot effectively distinguish between cipher images and ordinary images, which shows that the method of the present invention has strong resistance to steganalysis detection.

[0117] Comparative Experiment 3: Evaluating the generation quality of VMEI using the FID (Fréchet Inception Distance) metric. FID is a metric used to evaluate the quality of images generated by models such as Generative Adversarial Networks (GANs). It measures the distribution difference between the generated image and the real image. The high-level semantic features of the image were extracted using a pre-trained deep neural network (Inceptionv3). A lower FID value indicates higher quality generated images and a distribution closer to that of the real image. The results are shown in Table 2 below:

[0118] Table 2. FID values ​​of images generated by different visual meaning encryption methods.

[0119]

[0120] As can be seen, the FID value of the method of the present invention is significantly lower than that of existing encryption methods with different visual meanings. The quality of the generated image is high, and the distribution is close to that of the real image, which ensures the natural appearance of the generated image and reduces the possibility of modification traces being discovered.

[0121] References for existing methods:

[0122] [1] Wang X, Liu C, Jiang D. A novel visually meaningful image encryption algorithm based on parallel compressive sensing and adaptive embedding[J]. Expert Systems with Applications, 2022, 209: 118426.

[0123] [2] Shiwei J, Jianjun L. An image encryption algorithm forvisuallymeaningful ciphertext based on adaptive compressed, 2D-IICMhyperchaos and histogram cyclic shift[J]. Multimedia Tools and Applications, 2024, 83(24): 64177-64204.

[0124] [3] Tang Z, Jing S, Li J, et al. Image compression and meaningfulciphertext encryption based on histogram shift embedding[C] / / Internationalcomputer symposium. Singapore: Springer Nature Singapore, 2022:398-406.64204.

[0125] It should be noted that, for the sake of simplicity, the aforementioned method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously.

[0126] Based on the same idea as the visually meaningful image encryption and decryption method in the above embodiments, the present invention also provides a visually meaningful image encryption and decryption system, which can be used to execute the above-described visually meaningful image encryption and decryption method. For ease of explanation, the structural schematic diagram of an embodiment of a visually meaningful image encryption and decryption system only shows the parts related to the embodiments of the present invention. Those skilled in the art will understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0127] like Figure 6 As shown, another embodiment of the present invention provides a visual image encryption and decryption system, including an encryption module and a decryption module; wherein, the encryption module includes a compression encoding module, a noise generation module, a vector splicing module, an encryption scrambling module, and an image generation module; the decryption module includes an image inverse mapping module, a decryption inverse scrambling module, and an image restoration module;

[0128] More specifically, the compression encoding module is used to compress the three-channel color secret image using a deep compression autoencoder and convert it into a one-dimensional vector of the quantized image;

[0129] The noise generation module is used to generate pseudo-random noise vectors through a random noise generator;

[0130] The vector concatenation module is used to concatenate a one-dimensional vector of an image and a pseudo-random noise vector to obtain a dense vector;

[0131] The encryption and scrambling module is used to encrypt and scramble a ciphertext using a Logistic chaotic mapping to obtain an encryption vector and a key.

[0132] The image generation module is used to take the encrypted vector as input and generate an encrypted image with visual meaning based on the Glow model;

[0133] The image inverse mapping module is used to inversely map the input of a visually meaningful encrypted image based on the Glow model to obtain an encrypted vector;

[0134] The decryption and inverse scrambling module is used to obtain the key published by the image provider, and then uses the Logistic chaotic mapping to inverse scramble the encrypted vector to decrypt it and obtain the encrypted vector.

[0135] The image restoration module is used to decode and reconstruct the secret image by inputting the dense vector into a depth compression autoencoder.

[0136] It should be noted that the visual meaning image encryption and decryption system of the present invention corresponds one-to-one with the visual meaning image encryption and decryption method of the present invention. The technical features and beneficial effects described in the embodiments of the above-mentioned visual meaning image encryption and decryption method are applicable to the embodiments of the visual meaning image encryption and decryption system. For details, please refer to the description in the embodiments of the method of the present invention, which will not be repeated here.

[0137] Furthermore, in the above embodiment of a visually meaningful image encryption and decryption system, the logical division of each program module is merely an example. In actual applications, the above functions can be assigned to different program modules as needed, for example, for the sake of corresponding hardware configuration requirements or the convenience of software implementation. That is, the internal structure of the visually meaningful image encryption and decryption system can be divided into different program modules to complete all or part of the functions described above.

[0138] In one embodiment, a computer-readable storage medium is provided, storing a program in a memory. When the program is executed by a processor, it implements the aforementioned visual image encryption / decryption method, specifically:

[0139] Step 1: Image encryption by the image provider:

[0140] The three-channel color secret image is compressed using a deep compression autoencoder and quantized to obtain a one-dimensional vector of the image;

[0141] A pseudo-random noise vector is generated using a random noise generator;

[0142] A dense vector is obtained by concatenating a one-dimensional vector of the image and a pseudo-random noise vector.

[0143] The encrypted vector and the key are obtained by encrypting and scrambling the dense vector using the Logistic chaotic mapping.

[0144] The encrypted vector is input into the Glow model to generate an encrypted image with visual meaning;

[0145] Step 2: Image decryption by the image user:

[0146] The encrypted image containing visual meaning is input into the Glow model to perform inverse mapping and obtain the encrypted vector;

[0147] Obtain the key published by the image provider, and use the Logistic chaotic mapping to inversely scramble the encrypted vector to decrypt it and obtain the encrypted vector.

[0148] The secret image is obtained by inputting the secret vector into a deep compression autoencoder for decoding and reconstruction.

[0149] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0150] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0151] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for encrypting and decrypting visually meaningful images, characterized in that, Includes the following steps: Step 1: Image encryption by the image provider: A three-channel color secret image is compressed and quantized to obtain a one-dimensional vector. The deep compression autoencoder is an improvement on a traditional autoencoder by introducing intermediate layers and residual connections, comprising an encoder, intermediate layers, and a decoder. The intermediate layer is connected to both the encoder and decoder via a convolutional layer, which adjusts the number of channels. The encoder includes multiple downsampling modules; each downsampling module is constructed using an average pooling layer as the first main branch and residual connections as the first residual branch. The first residual branch assists the first main branch in learning residuals through spatial-channel transformation. The decoder includes multiple upsampling modules; each upsampling module is constructed using an interpolation upsampling layer as the second main branch and residual connections as the second residual branch. The second residual branch reverse-maps residual information to assist the second main branch in reconstructing details. The intermediate layer uses multiple sets of convolution-normalization-activation operations stacked sequentially as the third main branch and residual connections as the third residual branch; the third residual branch is used to enhance features. A pseudo-random noise vector is generated using a random noise generator, specifically as follows: Create a random noise generator; the noise data generated by the random noise generator conforms to a normal distribution. Read the current system timestamp and use it as the seed for the random noise generator; The seed is used as a parameter of the random noise generator to generate a pseudo-random noise vector; A dense vector is obtained by concatenating a one-dimensional vector of the image and a pseudo-random noise vector. The encrypted vector and the key are obtained by encrypting and scrambling the dense vector using the Logistic chaotic mapping. The encrypted vector is input into the Glow model to generate an encrypted image with visual meaning; Step 2: Image decryption by the image user: The encrypted image containing visual meaning is input into the Glow model to perform inverse mapping and obtain the encrypted vector; Obtain the key published by the image provider, combine it with the Logistic chaotic mapping to inversely scramble the encrypted vector, and decrypt it to obtain the encrypted vector; The secret image is obtained by inputting the secret vector into a deep compression autoencoder for decoding and reconstruction.

2. The visually meaningful image encryption and decryption method according to claim 1, characterized in that, The length of the pseudo-random noise vector is the input length of the Glow model minus the length of the one-dimensional vector of the image.

3. The visually meaningful image encryption and decryption method according to claim 1, characterized in that, The encryption and scrambling of dense vectors using Logistic chaotic mapping specifically involves: Divide the dense vector into three sub-vectors of equal length; Convert each subvector into a square matrix; The key parameters for each sub-vector are generated using a Logistic chaotic mapping. x 0 and μ And based on the key parameters of each subvector x 0 and μ Generate the corresponding chaotic sequence; Remove the first part of each chaotic sequence respectively m Each element yields a new chaotic sequence corresponding to each sub-vector; Sort each element in the new chaotic sequence of each sub-vector in ascending order to obtain the original index position sequence of each sub-vector after sorting. The rows and columns of the corresponding square matrix are scrambled according to the original index position sequence of each sub-vector to obtain the scrambled square matrix of each sub-vector. The square matrix after scrambling each subvector is expanded into a one-dimensional expanded vector, and then concatenated in order to obtain the encrypted vector.

4. The visually meaningful image encryption and decryption method according to claim 3, characterized in that, The scrambling of the rows and columns of the corresponding matrix refers to shifting the rows and columns corresponding to the index numbers in the original index position sequence to the rows and columns corresponding to the index numbers in the original index position sequence.

5. The visually meaningful image encryption and decryption method according to claim 1, characterized in that, The Glow model is trained using the CelebA-HQ dataset and reversibly generates encrypted images with visual meaning through maximum likelihood estimation.

6. The visually meaningful image encryption and decryption method according to claim 1, characterized in that, The reconstructed secret image is specifically as follows: The dense vector is segmented, and one-dimensional vectors are extracted from the dense vector. The one-dimensional vector is reshaped into a latent space vector, and then decoded and reconstructed using a deep compression autoencoder to obtain the secret image.

7. A visually meaningful image encryption and decryption system, characterized in that, A visual image encryption and decryption method applicable to any one of claims 1-6 includes an encryption module and a decryption module; the encryption module includes a compression encoding module, a noise generation module, a vector splicing module, an encryption scrambling module, and an image generation module; the decryption module includes an image inverse mapping module, a decryption inverse scrambling module, and an image restoration module; The compression encoding module is used to compress a three-channel color secret image using a deep compression autoencoder and quantize it to obtain a one-dimensional vector of the image. The deep compression autoencoder is an improvement on the traditional autoencoder by introducing an intermediate layer and residual connections, including an encoder, an intermediate layer, and a decoder. The intermediate layer is connected to the encoder and decoder respectively through a convolutional layer. The convolutional layer is used to adjust the number of channels. The encoder contains multiple downsampling modules. Each downsampling module is constructed using an average pooling layer as the first main branch and a residual connection as the first residual branch. The first residual branch assists the first main branch in learning the residual through spatial-channel transformation. The decoder contains multiple upsampling modules. Each upsampling module is constructed using an interpolation upsampling layer as the second main branch and a residual connection as the second residual branch. The second residual branch reverse maps the residual information to assist the second main branch in reconstructing details. The intermediate layer uses multiple sets of convolution-normalization-activation operations stacked in sequence as the third main branch and uses residual connections as the third residual branch. The third residual branch is used to enhance features. The noise generation module is used to generate pseudo-random noise vectors through a random noise generator, specifically: Create a random noise generator; the noise data generated by the random noise generator conforms to a normal distribution. Read the current system timestamp and use it as the seed for the random noise generator; The seed is used as a parameter of the random noise generator to generate a pseudo-random noise vector; The vector concatenation module is used to concatenate a one-dimensional vector of an image and a pseudo-random noise vector to obtain a dense vector; The encryption and scrambling module is used to encrypt and scramble the encrypted vector using a Logistic chaotic mapping to obtain the encryption vector and the key. The image generation module is used to input the encryption vector into the Glow model to generate an encrypted image with visual meaning; The image inverse mapping module is used to input the encrypted image containing visual meaning into the Glow model for inverse mapping to obtain the encrypted vector; The decryption and inverse scrambling module is used to obtain the key published by the image provider, and then inversely scramble the encrypted vector using the Logistic chaotic mapping to decrypt and obtain the encrypted vector. The image restoration module is used to input the secret vector into a depth compression autoencoder for decoding and reconstruction to obtain the secret image.

8. A computer-readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements a visual image encryption / decryption method according to any one of claims 1-6.