Image compression and encryption method and device based on reversible neural network

By using reversible neural networks and ternary loss functions in image encryption, the problem of high key generation and transmission costs in the existing technology is solved, the quality of image recovery is improved, and high security of images during transmission and storage is achieved. .

CN118764569APending Publication Date: 2024-10-11HOHAI UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411087238.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing image encryption methods based on deep learning have problems such as high cost and inconvenient management during key generation and transmission, and the quality of the restored image is insufficient.

Method used

A reversible neural network is used to downsample and encrypt the plaintext image. By introducing a ternary loss function and a conditional reversible coupling block, and incorporating it into the key training process, the ciphertext image is generated, and high-quality recovery of the image is achieved through the reversible scaling network.

Benefits of technology

It effectively improves the quality of image recovery, reduces the cost of key and ciphertext transmission, and ensures the security of images during transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764569A_ABST
    Figure CN118764569A_ABST
Patent Text Reader

Abstract

The invention discloses an image compression and encryption method and device based on a reversible neural network, and the method comprises the steps: firstly carrying out the down-sampling of a plaintext image through employing a reversible zooming network, and then replacing a high-frequency part of a noise image with random sampling Gaussian noise; and inputting the down-sampling plaintext image and the replaced noise image into a conditional reversible neural network to generate a corresponding ciphertext image in combination with a key. And finally, decrypting a down-sampling plaintext image by using the secret key, and performing up-sampling on the down-sampling plaintext image through a reversible scaling network to realize restoration of the plaintext image. According to the method, the quality of the recovered plaintext image is effectively improved, the security of the plaintext image in the transmission and storage process can be fully guaranteed, and a reliable solution is provided for protecting the plaintext image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to an image compression encryption method and device based on a reversible neural network. Background Art

[0002] Image encryption refers to converting a plaintext image into a ciphertext image using an encryption key, and then restoring the ciphertext image to a plaintext image using a decryption key. The essence of this process is to turn the original image into a meaningless image similar to noise, and then restore the image using the corresponding key. Image encryption makes the image content invisible without the correct key, protecting the privacy and security of the image.

[0003] At present, common image encryption methods are divided into traditional image encryption methods and deep learning-based image encryption methods. Traditional image encryption methods are mainly based on the principles of pixel quality and pixel diffusion. These methods include algorithms based on chaotic systems, cellular automata, DNA coding, wavelet transform, optical encryption, and elliptic curves. They usually use a scrambling-diffusion structure to destroy the correlation between image pixels and transform the image into a chaotic noise-like or random ciphertext image. The excellent generalization ability and ability to handle nonlinear problems of deep neural networks make them an ideal choice for image encryption because they can learn the deep features of the data and generate highly complex encryption patterns that are not only difficult to crack, but also can adapt to a variety of image content and scenarios. However, most of the existing deep learning-based image encryption methods currently use traditional encryption technology to achieve sub-key generation, or use the model's own parameters as encryption keys, which not only increases the transmission cost of the key, but also brings many inconveniences to key management. Summary of the invention

[0004] The purpose of the present invention is to provide an image compression encryption method and device based on a reversible neural network, which adopts a reversible neural network to replace the traditional encoding and decoding network, and enables the network to adapt to the correct key by incorporating the key into the network training process. A ternary loss function is introduced to increase the visual difference between the error-recovered image and the original plaintext image, which effectively improves the quality of the recovered image and reduces the key and ciphertext transmission costs.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] The present invention provides an image compression encryption method based on a reversible neural network, comprising the following steps:

[0007] (1) Downsampling the plaintext image: In order to reduce the amount of encrypted information, effectively reduce the amount of communication and reduce the difficulty of training, a reversible scaling network is used to downsample the plaintext image. The reversible scaling network consists of a downsampling module, where the downsampling module consists of a DWT and several reversible coupling blocks. After the plaintext image is input into the reversible scaling network, it is first subjected to a DWT. After the DWT, three low-frequency sub-bands and nine high-frequency sub-bands can be obtained. The low-frequency sub-bands are regarded as The high frequency subband is considered as Input into the reversible coupling block, and after transformation, we can get and This is the input to the next reversible coupling block.

[0008]

[0009]

[0010] in ρ, η are arbitrary functions, and ⊙ is the dot product operation. After being processed by several reversible coupling blocks, the final downsampled plaintext image P can be obtained. d .

[0011] (2) Encrypting the downsampled plaintext image: In step (1), the downsampled plaintext image P is obtained. d At the same time, a noise image N with the same size as the plaintext image needs to be generated. The downsampled plaintext image P is d Encryption is performed to obtain the ciphertext image C.

[0012] (2.1) Use DWT to transform the 3-channel noise image N and the 3-channel downsampled plaintext image P d Decomposed into 3 low-frequency sub-bands and 12 high-frequency sub-bands, the purpose of wavelet transform is to improve the quality of restored images and accelerate the training process. This process is shown in the following formula:

[0013] N 1 =DWT(N)

[0014]

[0015] (2.2) In order to improve the quality of the restored downsampled plaintext image, N is generated by wavelet transform of the noise image N. 1 The high frequency part will be discarded, the low frequency part will be retained, and the clean information will be sampled in the Gaussian distribution as the new high frequency part. The resampled high frequency part will be combined with N 1 The low-frequency parts of the images are concatenated in the channel dimension.

[0016] (2.3)N 1 and It will be input into several conditional reversible coupling blocks. The conditional reversible coupling block used here consists of three nonlinear functions It is composed of ψ and η.

[0017] (2.4) In order to reduce the transmission cost of the key, the method in this chapter adds the key to the entire training process and inputs it as a condition to Specifically, a 1×W×H random matrix containing only 0 and 1 is generated, called key k, and DWT is performed on key k to map it to a four-channel key K. This process is shown in the following formula:

[0018] K=DWT(k)

[0019] (2.5) According to step (2.4), the size of the key K is Then use the key K as a condition and input to The tensors in the ψ and η functions are concatenated in the channel dimension. The shape of the input tensor changes as shown below:

[0020]

[0021] The channel is 12, which is the number of channels of the noise image after wavelet transformation. The key K is concatenated to the tensor and then After the ψ and η functions are mapped, the output tensor can still maintain the same data shape as the input tensor. This process is shown in the following formula:

[0022]

[0023]

[0024] (2.6) According to step (2.5), after channel splicing, Replace with N i Replace with N i oK, where 1≤i≤12, o represents the channel concatenation operation, α represents the transformed sigmoid function, and the range of its output data is determined by the constant factor multiplied by it, which is mainly used to constrain the output image data. After passing through several conditional reversible coupling blocks, the output data is converted from the frequency domain to the spatial domain after IWT, as shown in the following formula:

[0025] C=IWT(N 12 )

[0026]

[0027] Among them, C represents the ciphertext image output after IWT, r represents the loss information, and C will be similar to the noise image N, thus ensuring the effectiveness of encryption.

[0028] (3) Decrypting the ciphertext image: In order to improve the quality of the restored downsampled plaintext image, the loss information r obtained in step (2.6) is discarded, and it is necessary to continue to randomly sample the auxiliary recovery information Z from the Gaussian distribution. The auxiliary recovery information Z and the ciphertext image C after DWT processing are input into the conditional reversible neural network to obtain the restored downsampled plaintext image. and the noise image N * .

[0029] (3.1) Perform DWT on the sampled auxiliary recovery information Z and the ciphertext image C, and convert them from the spatial domain to the frequency domain for processing. Since the decryption module is the inverse process of the encryption module, the first process to enter is the 12th conditional reversible coupling block of the conditional reversible neural network. This process is shown in the following formula:

[0030] C 12 =DWT(C)

[0031] Z 12 =DWT(Z)

[0032] (3.2) During the recovery process, the key K is still concatenated to the input tensor in the channel dimension, and the auxiliary recovery information Z and the ciphertext image C will be transformed as follows:

[0033] Z i =(Z i+1 -η(C i+1 oK))⊙exp(-α(ρ(C i+1 oK)))

[0034]

[0035] C 12 and Z 12 After being sent to the conditional reversible coupling block, the output of the i-th block is C i and Z i , after the last conditional reversible coupling block, we can get C 1 and Z 1 , and finally after IWT, the restored downsampled plaintext image can be obtained

[0036] (3.3) When using the correct key or the wrong key during training and testing, two different restored images will be generated. Specifically, the correctly restored downsampled plaintext image and the noise image are represented as and N * , the process is shown as follows:

[0037]

[0038] N* =IWT(Z 1 )

[0039] The error-recovered downsampled image and the noisy image are represented as and N # , as shown below:

[0040]

[0041] N # =IWT(Z 1 )

[0042] (4) Upsampling to restore the original plaintext image: After obtaining the restored downsampled plaintext image After that, it is still necessary to upsample it through a reversible scaling network to restore the size of the original image. This process is the inverse process of downsampling, and the restored original plaintext image P can be obtained. * .

[0043] (4.1) The upsampling module consists of an IWT and several reversible coupling blocks. When restoring the plaintext image, it is also necessary to sample auxiliary recovery information from the Gaussian distribution to restore the plaintext image.

[0044] (4.2) The randomly sampled auxiliary recovery information Z is combined with the recovered downsampled plaintext image They are input into the upsampling module together, and after several reversible coupling blocks and one IWT, the restored plaintext image P of the original size can be obtained. * , this process is shown as follows:

[0045]

[0046]

[0047] The beneficial effects achieved by the present invention are:

[0048] The present invention first downsamples the plaintext image by applying a reversible scaling network, then replaces the high-frequency part of the noise image with randomly sampled Gaussian noise, and then inputs the downsampled plaintext image and the replaced noise image into a conditional reversible neural network and a joint key to generate a corresponding ciphertext image. Finally, the downsampled plaintext image is decrypted using the key, and then the reversible scaling network is used to upsample it to restore the plaintext image. The method of the present invention not only effectively improves the quality of the restored plaintext image, but also fully guarantees the security of the plaintext image during transmission and storage by incorporating the key into the network training process so that the network can adapt to the correct key, providing a reliable solution for protecting the plaintext image. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is the original plaintext image P in the embodiment of the present invention;

[0050] Figure 2 is a noise image N in an embodiment of the present invention;

[0051] Figure 3 is the downsampled image P in the embodiment of the present invention d ;

[0052] Figure 4 is the ciphertext image C in the embodiment of the present invention;

[0053] Figure 5 is the randomly sampled auxiliary recovery information Z in the embodiment of the present invention;

[0054] Figure 6 is the correctly restored downsampled image in the embodiment of the present invention

[0055] Figure 7 is the downsampled image of error recovery in the embodiment of the present invention

[0056] Figure 8 is the restored original plaintext image P in the embodiment of the present invention * ;

[0057] Fig. 9 is a pixel correlation coefficient graph of the ciphertext image C in the embodiment of the present invention;

[0058] Fig.10 It is an overall flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The technical solution of the present invention is described in detail below, and examples of the implementation modes are shown in the accompanying drawings. However, the protection scope of the present invention is not limited to the embodiments.

[0060] This specific embodiment uses Matlab software for simulation. The original plaintext image uses a standard test color image of size 448×448, which is randomly selected from the DIV2K data set. Figure 1 As shown; the noise image uses a standard test color image of size 224×224, which is generated by the program, as shown in Figure 2 shown.

[0061] The present invention designs an image compression encryption method based on a reversible neural network. The method first downsamples the plaintext image, then inputs the noise image and the downsampled plaintext image into the encryption network to obtain the ciphertext image; in the decryption stage, the ciphertext image and auxiliary recovery information are input to restore the downsampled plaintext image, and then upsamples it to restore the plaintext image. The specific implementation steps are as follows:

[0062] (1) Downsampling plaintext image: The number of reversible blocks in the reversible scaling network is set to 16, that is, the downsampling rate is 1 / 4, and note that ρ, η are both selected as DenseNet as random functions. The plaintext image P is downsampled using the reversible scaling network to obtain the downsampled image P d like Figure 3 As shown, the plaintext image P is 448×448 in size, and the downsampled image P d The size is 224×224;

[0063] (2) Encrypting the downsampled plaintext image: Encrypt two 224×224 noise images N and downsampled images P of the same size. d Input into the conditional reversible neural network and encrypt with the key to obtain the ciphertext image C.

[0064] (2.1) Use DWT to transform the color noise image N and the color downsampled image P d Decomposed into 3 low-frequency sub-bands and 12 high-frequency sub-bands, the dimension of each sub-band is (6, 12, 112, 112), and the DWT transformed and N 1 .

[0065] (2.2) The three low-frequency subbands of the noise image N are retained, and the 12 high-frequency subbands are discarded. Random sampling is performed from the Gaussian distribution as the new high-frequency part of the noise image N, and the resampled high-frequency part is concatenated with the low-frequency part in the channel dimension, and the dimension size remains unchanged.

[0066] (2.3) The number of reversible blocks in the conditional reversible network is set to 12, and the random functions in the reversible blocks all use DenseNet, and the parameters are independent. and N 1 The signal is input into 12 conditional reversible coupling blocks and processed by each conditional reversible coupling block in turn.

[0067] (2.4) Generate a 1×224×224 random matrix containing only 0 and 1 as the key k. Note that it needs to be used as a condition input into the random function for joint training during the training process. At the same time, perform DWT on the key k to generate a four-channel key K with dimensions of (6, 12, 112, 112), which is the same as and N 1Keep it the same.

[0068] (2.5) At this time, the size of the key K is 4×112×112. The key K is then used as a condition to concatenate the tensor input to the random function in the channel dimension. After the key K is concatenated to the tensor, the number of channels becomes channel+4 (i.e. 16). The number of input channels of the ψ,η function is 16, and the number of output channels is 12. After the mapping of ψ and η functions, the output tensor can still maintain the same data shape as the input tensor.

[0069] (2.6) After 12 conditionally reversible coupling blocks, we get N with dimensions (6, 12, 112, 112) respectively. 12 and Then input it into IWT for inverse transformation, and the ciphertext image C and loss information r of dimension (6,3,224,224) can be generated, where the ciphertext image C is as follows: Figure 4 As shown. Note that during the training process, it is necessary to construct an encryption loss. For the noise image N and the ciphertext image C, the loss is constructed so that C maintains the characteristics of the noise. For this purpose, the encryption loss can be defined as:

[0070]

[0071] Where θ is the network parameter, N represents the number of training samples, and l2 represents the l2 norm.

[0072] (3) Decrypting the ciphertext image: Randomly sample auxiliary recovery information Z from a Gaussian distribution with a dimension of (6, 3, 22% 224), which is the same as the ciphertext image C. The sampled auxiliary recovery information Z is as follows: Figure 5 The auxiliary recovery information Z and the ciphertext image C after DWT processing are input into the conditional reversible neural network to obtain the restored downsampled plaintext image and the noise image N * .

[0073] (3.1) Perform DWT transformation on the auxiliary recovery information Z and the ciphertext image C to obtain C with a dimension size of (6, 12, 112, 112) 12 and Z 12 , input into the conditional reversible neural network, and processed by the 12th to 1st conditional reversible coupling blocks in sequence. The output of the i-th block is C i and Z i , and we get C with dimension size (6,12,112,112) 1 and Z 1 .

[0074] (3.2) C 1 and Z 1After the inverse transform of IWT again, we can get the restored downsampled plaintext image with a dimension of (6,3,224,224). and the noise image N * , where the downsampled plaintext image is recovered using the correct key like Figure 6 As shown, the downsampled plaintext image recovered using the wrong key like Figure 7 As shown. Note that during the training process, it is necessary to construct the decryption loss and the ternary loss. For the downsampled plaintext image P d And the restored downsampled plaintext image Construct the loss so that the auxiliary recovery information Z can recover P d , and make P d and Indistinguishable, therefore, the decryption loss is L rev (θ) can be defined as:

[0075]

[0076] To optimize the correct recovery of the downsampled plaintext image The quality of the downsampled plaintext image is With the downsampled plaintext image P d As the gap increases, the ternary loss function is defined as follows, optimizing both the correctly restored image and the incorrectly restored image.

[0077]

[0078] Among them, l2 represents the l2 norm, l mi stands for mutual information loss, which represents the l2 norm and mutual information loss as the metric distance of the ternary loss function.

[0079] The overall loss function when training the model can be expressed as:

[0080] L total =λ e L en +λ r L rev +λ t L triple

[0081] (4) Upsampling to restore the original plaintext image: Get the restored downsampled plaintext image After that, it is still necessary to upsample it through the reversible scaling network to restore the size of the original image. This process is the inverse process of downsampling. The upsampling module is still composed of one IWT and 16 reversible coupling blocks, and the restored original plaintext image P can be obtained. * .

[0082] (4.1) When restoring the plaintext image, it is also necessary to sample auxiliary restoration information from the Gaussian distribution to restore the plaintext image. The number of channels of the sampled auxiliary restoration information Z is the same as the number of channels of the high-frequency part of the plaintext image P, that is, the dimension size of the auxiliary restoration information Z is (6, 9, 224, 224), and the restored downsampled plaintext image The dimension size is (6,3,224,224).

[0083] (4.2) The randomly sampled auxiliary recovery information Z is combined with the recovered downsampled plaintext image They are input into the upsampling module together, and after being processed by 16 reversible coupling blocks, a low-frequency subband with a dimension size of (6, 3, 224, 224) and three high-frequency subbands with a dimension size of (6, 9, 224, 224) are generated. After an inverse transformation of IWT, the restored plaintext image P of the original size can be obtained. * like Figure 8 shown.

[0084] The following is a performance analysis of the embodiment in conjunction with the accompanying drawings and experimental data:

[0085] 1. Ciphertext image quality analysis

[0086] For the ciphertext image quality analysis, four indicators are used for evaluation, including image information entropy, normalized pixel change rate (UACI), unified average change intensity (NPCR) and pixel correlation coefficient, and the relevant definitions are as follows:

[0087] Image information entropy can be used to describe the grayscale distribution and spatial characteristics of an image. The larger the image information entropy, the more uniform the grayscale distribution of the image and the more diverse the image. The smaller the image information entropy, the more concentrated the grayscale distribution of the image and the more monotonous and simple the image. For ciphertext images, image information entropy can reflect the randomness of image information. The calculation formula of image information entropy is as follows:

[0088]

[0089] where p i It represents the probability that a gray value i appears in the image. If the information entropy of the image is closer to 8, it is closer to a random image.

[0090] The Normalized Pixel Change Rate (UACI) measures the average change in pixel values ​​in an encrypted image. The UACI is calculated by comparing the encrypted image with the original image at the pixel level, counting the change in each pixel in the two images, and then taking the average. The calculation formula for UACI is as follows:

[0091]

[0092] Wherein, W is the image width, H is the image height, T(i, j) is the pixel value of the image at position (i, j), and the ideal value of UACI is 33.46%.

[0093] The uniform average change strength (NPCR) is a measure of the sensitivity of a ciphertext image to small changes in the plaintext image. The specific calculation method is to compare two encrypted images of the same size at the pixel level, count the number of different pixels in the two images, and divide it by the total number of pixels to get the pixel change rate. The calculation formula of NPCR is as follows:

[0094]

[0095] Where D(i, j) indicates whether T1(i, j) is equal to T2(i, j), that is, whether the pixel values ​​of the two images at the same position are equal. If they are equal, D(i, j) is 1, otherwise D(i, j) is 0. The ideal value of NPCR is 99.61%.

[0096] The correlation of adjacent pixels reflects the correlation degree of pixel values ​​at adjacent positions of the image. The correlation of the ciphertext image should be as close to 0 as possible. Generally, the pixel correlation coefficients in the horizontal, vertical and diagonal directions of the image are analyzed. The formula is as follows:

[0097]

[0098] where x i and i Represents two pixel sequences, and N is the length of the sequence.

[0099] Table 1 lists the ciphertext images ( Figure 4 ) in terms of the performance of three image evaluation indicators: information entropy, normalized pixel change rate (UACI) and unified average change strength (NPCR). It can be seen that the information entropy of the ciphertext image is close to 8, UACI is above 11%, and NPCR is above 98%, indicating that the complexity and randomness of the ciphertext image have reached a high level and have good diffusion performance.

[0100] Table 1 Ciphertext image quality

[0101]

[0102] The correlation coefficients of the ciphertext image in the horizontal, vertical and diagonal analysis are shown in Table 2. Fig. 9 The pixel distribution of the ciphertext image is shown. It can be seen that the horizontal, vertical and diagonal pixel correlations of the ciphertext image are close to zero, which shows that the encryption effect of the proposed method is relatively good and there is no obvious correlation between the pixel values ​​in different directions.

[0103] Table 2. Correlation coefficients of ciphertext image pixels

[0104]

[0105] 2. Analysis of restored image quality

[0106] At present, the most widely used image quality evaluation indicators are peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). The larger the PSNR value and the closer the MSSIM is to 1, the better the image visual quality. The relevant definitions are as follows:

[0107] Peak signal-to-noise ratio (PSNR) is the most commonly used image quality evaluation indicator. It evaluates the quality of an image by quantizing the error. The calculation process is as follows:

[0108]

[0109]

[0110] Structural similarity (SSIM) evaluates the structural similarity between an image and a comparison image by comparing the brightness, contrast, and structural similarity of local image blocks. The calculation formula is shown below:

[0111]

[0112] where μ X and μ Y is the average value of image X and Y pixels, σ X and σ Y is the variance of image X and Y pixels, and σ XY Represents the covariance between images X and Y.

[0113] Table 2 lists the restored downsampled plaintext images ( Figure 6 ) in terms of peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). It can be seen from the table that the PSNR of the restored image is above 46dB and the SSIM exceeds 0.99, indicating that the proposed method has good recovery capabilities. In addition, the data in Table 3 reflect the effectiveness of adding the key. It can be analyzed that when using the wrong key, the PSNR value of the restored image has dropped to less than 10dB, and the SSIM is less than 0.1, which means that the original appearance of the wrong restored image can no longer be seen by the naked eye, confirming the important role of the key in the method.

[0114] Table 2 Correct key recovery image quality

[0115]

[0116] Table 3 Image quality of error key recovery

[0117]

[0118] The above description is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technology can understand and think of any changes or substitutions within the technical scope disclosed by the present invention, which should be included in the scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An image compression encryption method based on a reversible neural network, characterized in that: include: Input the plaintext image into the reversible scaling network to obtain a downsampled plaintext image; Generate a noise image of the same size as the downsampled plaintext image and perform DWT transformation with the downsampled plaintext image; Replace the high-frequency part of the noisy image with noise sampled from a Gaussian distribution; The noise image and the downsampled plaintext image are input into the conditional reversible neural network together, and the ciphertext image is generated by combining the key; Random sampling from Gaussian distribution to assist in recovering the downsampled plaintext image; Perform DWT on the sampled auxiliary recovery information and ciphertext image and input them into the conditional reversible neural network; The restored downsampled plaintext image is then upsampled through a reversible scaling network to obtain a restored plaintext image.

2. According to the image compression encryption method based on reversible neural network in claim 1, the plaintext image is input into the reversible scaling network to obtain a downsampled plaintext image, characterized in that: include: The reversible scaling network consists of a downsampling module, which consists of a DWT and several reversible coupling blocks. After DWT, 3 low-frequency subbands and 9 high-frequency subbands can be obtained as shown in the following formula. The low-frequency subband is regarded as The high frequency subband is considered as Input into the reversible coupling block, and after transformation, we can get and This is the input to the next reversible coupling block.

3. The image compression encryption method based on a reversible neural network according to claim 1 is characterized in that: Generate a noise image of the same size as the downsampled plaintext image, and perform DWT transformation on the downsampled plaintext image, including: inputting a 3-channel noise image and a 3-channel downsampled plaintext image, and using DWT to decompose the two into 3 low-frequency sub-bands and 12 high-frequency sub-bands respectively.

4. The image compression encryption method based on a reversible neural network according to claim 1, characterized in that: Replace the high-frequency parts of the noisy image with noise sampled from a Gaussian distribution, including: The wavelet transform of the noise image discards its high-frequency part, retains the low-frequency part, and samples clean information in the Gaussian distribution as the new high-frequency part.

5. The image compression encryption method based on a reversible neural network according to claim 1, characterized in that: The noise image and the downsampled plaintext image are input into the conditional reversible neural network together, and the ciphertext image is generated by combining the key, including: The noise image and downsampled plaintext image after DWT transformation are input to several conditionally reversible coupling blocks; The key is added throughout the training process and is used as a conditional input into the conditional reversible coupling block; After being processed by several conditional reversible coupling blocks, the output data is transformed from the frequency domain to the spatial domain through IWT to obtain the ciphertext image and loss information.

6. The image compression encryption method based on a reversible neural network according to claim 1, characterized in that: Perform DWT on the sampled auxiliary recovery information and ciphertext image and input them into the conditional reversible neural network, including: In the encryption stage, the loss information is discarded, and it is necessary to randomly sample the Gaussian distribution to obtain the auxiliary recovery information. The auxiliary recovery information and the ciphertext image are also required to perform DWT; The decryption process is the inverse process of the encryption process. The above two need to first enter the last conditional reversible coupling block of the conditional reversible neural network.

7. The image compression encryption method based on a reversible neural network according to claim 1, characterized in that: The restored downsampled plaintext image is then upsampled through a reversible scaling network to obtain a restored plaintext image, including: The upsampling process is the inverse process of downsampling. The upsampling module consists of one IWT and several reversible coupling blocks; It is also necessary to sample auxiliary recovery information from the Gaussian distribution to obtain the restored plaintext image.

8. The image compression encryption method based on a reversible neural network according to claim 5 is characterized in that: The noisy image and downsampled plaintext image after DWT transformation are input to several conditionally reversible coupling blocks, including: The conditional reversible coupling block used consists of three nonlinear functions It is composed of ψ and η.

9. The image compression encryption method based on a reversible neural network according to claim 5, characterized in that: The key is added throughout the training process and is input as a condition into the conditional reversible coupling block, including: A random matrix containing only 0 and 1 is generated and DWT is performed on it to map it into a four-channel key. The key is then input as a condition to the conditional reversible coupling block for splicing in the channel dimension.

10. An image compression and encryption device based on a reversible neural network, characterized in that: The image compression and encryption method based on a reversible neural network as claimed in any one of claims 1 to 9 is used for secure image transmission, comprising: A downsampling module, used for inputting a plaintext image into a reversible scaling network for downsampling to obtain a downsampled image; An encryption module, used for inputting the downsampled image and the generated noise image into the conditional reversible neural network and encrypting them with a key to obtain a plaintext image; A decryption module is used to input the ciphertext image and the auxiliary recovery information randomly sampled from the Gaussian distribution into the reversible scaling network to obtain the recovered noise image and the recovered downsampled image. The decryption module is the inverse process of the encryption module. An upsampling module is used to input the restored downsampled image and the auxiliary restored information randomly sampled from the Gaussian distribution into the conditional reversible neural network to obtain the restored original plaintext image. The upsampling module is the inverse process of the downsampling module. The random sampling module is used to obtain auxiliary recovery information by random sampling from Gaussian distribution.

Citation Information

Cited By

  • General neural network symmetric encryption method, sending end and receiving end

    CN121940229A

  • General neural network symmetric encryption method and sending end and receiving end

    CN121940229B

  • Anti-interference perception encryption method for unmanned aerial vehicle image

    CN122293803A