An image privacy protection method based on DCT compression and nonlinear dynamics

By introducing chaotic algorithms with DCT compression and nonlinear dynamics into image encryption technology, the problem of insufficient efficiency and security in the big data era is solved, and efficient and secure image transmission is achieved.

CN118678002BActive Publication Date: 2025-02-11UNIV OF ELECTRONICS SCI & TECH OF CHINA ZHONGSHAN INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411154447.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-02-11
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The prior art lacks efficiency and security when processing large-scale image data, especially under the real-time and complexity requirements of the big data era. Traditional encryption methods are difficult to meet the needs of efficient and secure image transmission.

Method used

Using image privacy protection methods based on DCT compression and nonlinear dynamics, RGB plaintext images are reconstructed, DCT transformed, quantized and compressed, and encrypted using chaotic Rubik's Cube arrangement algorithm and image filtering and diffusion mechanism to form high compression Encrypted images with higher security.

Benefits of technology

It significantly improves the efficiency and security of image encryption, realizes high compression ratio and high-quality image recovery, and meets the needs of efficient and secure image transmission in big data environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118678002B_ABST
    Figure CN118678002B_ABST
Patent Text Reader

Abstract

This invention provides an image privacy protection method based on DCT compression and nonlinear dynamics. The method includes converting an RGB plaintext image to the YCbCr color space and sampling it; then performing Discrete Cosine Transform (DCT) and quantization; meticulously compressing and encoding the quantized DCT coefficients; and finally encrypting the reconstructed image matrix using a chaotic Rubik's Cube permutation algorithm based on nonlinear dynamics and an image filtering diffusion mechanism to obtain an encrypted image. This invention achieves high compression ratio, high-quality image recovery, and strong encryption security, effectively solving the privacy protection problem of image transmission in big data environments. By encrypting the compressed frequency domain information through chaotic Rubik's Cube and image filtering diffusion, a dynamic chaotic sequence strongly correlated with the plaintext is introduced to enhance the algorithm's resistance to cryptographic attacks, thereby forming an encrypted image with high compression ratio and high security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data information security, and in particular to an image privacy protection method based on DCT compression and nonlinear dynamics. Background Art

[0002] In the field of secure digital image transmission, existing encryption technologies mainly rely on traditional cryptographic algorithms based on permutation and diffusion. These algorithms protect data from unauthorized access by rearranging the order of image data and changing its distribution characteristics. Specifically, permutation technology hides the original structure of the data by randomly changing the position of data elements, while diffusion technology reduces the predictability of data by dispersing the statistical characteristics of data throughout the data set.

[0003] However, with the advent of the big data era, the complexity of information transmission and the surge in data volume have caused these traditional encryption methods to face a series of challenges.

[0004] First, the efficiency issue is becoming increasingly prominent. When processing large-scale image data, traditional algorithms often consume a lot of computing resources and time due to their inherent computational complexity, which is particularly insufficient in application scenarios with high real-time requirements. For example, in scenarios such as video surveillance and real-time communication, delays in the encryption and decryption process may lead to the loss or delay of key information.

[0005] Secondly, security issues cannot be ignored. Some traditional algorithms may not fully consider the development of modern cryptanalysis technology when they are designed, so their security may be threatened when facing complex cryptanalysis attacks, such as differential attacks, linear attacks, etc. In particular, when processing image data with high redundancy and strong pixel correlation, traditional algorithms often find it difficult to find a suitable balance between compression rate and recovery quality, which not only affects the transmission efficiency of the image, but also may reduce the availability of image data.

[0006] In addition, as the amount of data increases, the computational complexity and response time of traditional encryption algorithms when processing large-scale data sets are difficult to meet real-time requirements. This not only affects the user experience, but may also cause system failure at critical moments. For example, in emergency situations such as disaster response or military command, delays in encryption and decryption may have serious consequences. Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention provides an image privacy protection method based on DCT compression and nonlinear dynamics. The present invention can significantly improve the efficiency and security of image encryption, thereby obtaining an encrypted image with high compression ratio and high security, and meet the urgent demand for efficient and secure image transmission in the big data era.

[0008] The technical solution of the present invention is: an image privacy protection method based on DCT compression and nonlinear dynamics, comprising the following steps:

[0009] Step 1: Reconstruct the RGB plaintext image to obtain the reconstructed image matrix;

[0010] Step 2: Use the chaotic Rubik's Cube arrangement algorithm based on nonlinear dynamics and the image filtering diffusion mechanism to encrypt the reconstructed image matrix and obtain the encrypted ciphertext image.

[0011] Preferably, the reconstruction of the RGB plaintext image specifically includes the following steps:

[0012] S1), converting the RGB plaintext image to the YCbCr color space and sampling;

[0013] S2), performing discrete cosine transform (DCT) processing on the sampled image to represent the sampled image as a series of DCT coefficients;

[0014] S3), performing quantization operation on the DCT coefficients to further compress the DCT coefficients;

[0015] S4), perform detailed compression coding processing on the quantized DCT coefficients to obtain a reconstructed image matrix.

[0016] Preferably, a 4:2:0 sampling method is adopted in step S1), and in the 4:2:0 sampling, the original resolution of the luminance component Y is kept unchanged, and the resolution of the chrominance components Cb and Cr is reduced to half of the original image.

[0017] Preferably, in step S2), the DCT decomposes the sampled image into low-frequency components and high-frequency components, wherein the low-frequency components represent the main information of the image, and the high-frequency components contain the detailed information of the image.

[0018] Preferably, in step S3), the quantization operation selects a specific quantization matrix to quantize the DCT coefficients, the quantization matrix is ​​an 8x8 matrix, each element represents the quantization step of the corresponding frequency coefficient, and the quantization matrix is ​​automatically adjusted according to the statistical characteristics of the image.

[0019] Preferably, in step S3), the quantization operation is to divide the DCT coefficient by the corresponding quantization step size, and then round it off or round it down to obtain the quantized DCT coefficient, and encode the quantized DCT coefficient through Huffman coding or arithmetic coding.

[0020] Preferably, in step S3), during the quantization process, the quantization step size is dynamically selected according to the application scenario and user needs, and a larger quantization step size is used in flat areas of the image, while a smaller step size is used in areas with edges or rich textures; at the same time, the quantization error is controlled by error diffusion technology. By dispersing the error during the quantization process, the block effect or other visual artifacts that may occur in the quantization process are reduced.

[0021] Preferably, in step S4), the quantized DCT coefficients are subjected to detailed compression coding processing, which specifically includes the following steps:

[0022] S41) Extraction and compression coding of DC coefficients;

[0023] S42) Extraction and compression coding of AC coefficients;

[0024] S43), finally encoding the DC coefficient and AC coefficient after compression encoding by using entropy encoding;

[0025] S44), storing the DC and AC coefficients finally compressed and encoded by entropy coding in step S43) in binary format; after compression encoding of the R, G, and B channels, six binary bit streams are generated; these bit streams are connected to reconstruct a binary matrix whose column length is eight times that of the plaintext image;

[0026] S45), replace every eight columns of the binary matrix with a column of decimal numbers to obtain a matrix with the same length as the plaintext but different width; add a random sequence of numbers 0 and 1 as needed and record it;

[0027] S46), the matrix obtained in step S45) is evenly divided into three parts by row, and respectively allocated to R, G, and B channels to form a coded compressed reconstructed image matrix.

[0028] Preferably, in step S41), the extraction and compression coding of the DC coefficient specifically includes the following steps:

[0029] S411), extracting a DC coefficient representing an average brightness of the DCT coefficient block from each 8x8 DCT coefficient block;

[0030] S412), performing differential pulse code modulation (DPCM) processing on the extracted DC coefficient; the differential pulse code modulation (DPCM) records the difference between adjacent DC coefficients;

[0031] S413), applying run length encoding RLE to further compress the DC coefficient after differential pulse code modulation DPCM processing, and identifying and encoding continuous repeated values ​​in the data through the run length encoding RLE.

[0032] Preferably, in step S42), the extraction and compression coding of the AC coefficient specifically includes the following steps:

[0033] S421), extracting AC coefficients representing texture and detail information of the image from each 8x8 DCT coefficient block;

[0034] S422), using Zig-Zag scanning of AC coefficients, the Zig-Zag scanning converts the two-dimensional AC coefficient matrix into a one-dimensional array; the Zig-Zag scanning starts from the DC coefficient in the upper left corner, and then sequentially accesses the remaining AC coefficients along the Zig-Zag path;

[0035] S423), encoding the AC coefficient sequence after Zig-Zag scanning and sorting by run length encoding RLE;

[0036] S424), dynamically adjust the threshold and encoding parameters of the run length encoding RLE according to the energy distribution of the AC coefficient.

[0037] Preferably, in step S43), the entropy coding is Huffman coding or arithmetic coding.

[0038] Preferably, step 2 specifically includes the following steps:

[0039] S51), chaotic initial value perturbation and sequence preprocessing;

[0040] S52), the reconstructed image matrix is ​​divided into three layers of images through RGB layered processing, and each layer of image is encrypted to obtain a ciphertext image ;

[0041] S53), design a filter, and use the designed filter to encrypt the ciphertext image Perform filtering and diffusion processing to obtain the ciphertext image after filtering and diffusion processing .

[0042] Preferably, step S51) specifically includes the following steps:

[0043] S511), use SHA256 to calculate the hash value of the plaintext image, and then divide the hash value into 32 parts, which are represented as follows: , , ,…, ;

[0044] S512), obtain interference parameters according to the 32 components of the hash value; namely:

[0045]

[0046] In the formula, ~ are the interference parameters of the key respectively;

[0047] S513) The key The six components of ~ Add together to get ;Right now:

[0048]

[0049] S514), generate two sets of control keys for iterative chaotic function 2D-LSCM; namely:

[0050]

[0051] In the formula, represents the first set of keys of 2D-LSCM; represents the second set of keys of 2D-LSCM; represents the remainder function;

[0052] S515), using the first set of keys Perform the first iteration; then use the second set of keys Perform the second iteration and generate a chaotic pseudo-random sequence , , ,Right now:

[0053]

[0054] Where, 2D-LSCM() is a chaotic function used to generate chaotic pseudo-random sequences; Indicates the height of the image. Indicates the width of the image.

[0055] Preferably, step S52) specifically includes the following steps:

[0056] S521), first reconstruct a grayscale image of the image matrix Encryption processing is performed; The size is of Grayscale image;

[0057] S522), from the chaotic pseudo-random sequence Take out H bits, from a chaotic pseudo-random sequence Take out W Bit;

[0058] S523), determine the maximum number of iterations And the counter Initialized to 0;

[0059] S524), the counter Increase by 1;

[0060] S525) for grayscale images Each line of m Perform left or right shift operations;

[0061] S526) for grayscale images Each column of n Move up or down to get a scrambled image ;

[0062] S527) Using chaotic pseudo-random sequences After shuffling the image Each row of operator; that is:

[0063]

[0064] In the formula, Represents the image obtained by bitwise XOR operation on each row; is the bitwise exclusive OR operator; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed;

[0065] S528), using chaotic pseudo-random sequence After shuffling the image Each column uses the bitwise operator; that is:

[0066]

[0067] In the formula, The ciphertext image after bitwise XOR operation on each column; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed;

[0068] S529) If ; then the grayscale image The encryption is completed, generating the arranged ciphertext image ; Otherwise, repeat steps S524)-S528);

[0069] S530), repeat steps SS522) - S529) to complete the encryption of the remaining two layers of grayscale images; finally synthesize the arranged ciphertext image .

[0070] Preferably, in step S53), the filter size used in the image diffusion process is set to 2x2; the weight of the lower right corner corresponds to the current pixel, that is, K (2,2) = 1; the other three weights use chaotic pseudo-random sequences Generated as a subkey.

[0071] Preferably, in step S53), the weight generation of the filter specifically includes the following steps:

[0072] S531), take a 96-bit chaotic pseudo-random sequence and split it into three 32-bit sequences, then convert the three sequences into integers ;

[0073] S532) for integers Sort the elements of to get the index vector ;

[0074] S533), using index vector Perturb three integers to obtain the perturbed set of elements :

[0075]

[0076] Therefore, the filter can be expressed as: .

[0077] Preferably, in step S53), a filter is used Diffusion treatment is performed, specifically:

[0078] First, use the ciphertext image of the scrambled result Initialize the filter diffusion result C; then use the filter operation to update the value of each pixel in C; thus obtaining the ciphertext image after filter diffusion processing ,Right now:

[0079]

[0080] because K (2,2)=1, so the above formula can be written as:

[0081]

[0082] In the formula, Represents the ciphertext image after filtering and diffusion processing; Represents a ciphertext image gray level.

[0083] Preferably, step S525) specifically includes the following steps:

[0084] S5251), calculate the m - th The sum of all elements in the row :

[0085]

[0086] In the formula, m =1,2…, W ;

[0087] S5252) and calculate the m - th The sum of all elements in the row Modulo 2 ;

[0088]

[0089] S5253) m - th Shift rows left or right in a loop Positions, that is, the image pixels are shifted left or right positions, the first pixel moves to the last pixel.

[0090] Preferably, step S526) specifically includes the following steps:

[0091] S5261) and calculate the n - th The sum of all elements in the column :

[0092]

[0093] In the formula, n =1,2…, H ;

[0094] S5262) ​​and calculate the n - th The sum of all elements in the column Modulo 2 ;

[0095]

[0096] S5263) n - th Move columns down or up locations.

[0097] The beneficial effects of the present invention are:

[0098] 1. The present invention achieves high compression ratio, high-quality recovery and strong encryption security of images, effectively solving the privacy protection problem of image transmission in a big data environment;

[0099] 2. The present invention significantly reduces the amount of data that needs to be processed and stored by converting the plaintext image into the YCbCr color space and adopting 4:2:0 sampling, and improves the compression efficiency without significantly sacrificing the image quality;

[0100] 3. The present invention converts the image from the space domain to the frequency domain through DCT transformation; and realizes effective compression of image data through quantization operation, and ensures the visual quality of the compressed image by controlling the quantization step size and optimizing the quantization matrix;

[0101] 4. The present invention encrypts the compressed frequency domain information through chaotic Rubik's Cube transformation and image filtering diffusion algorithm, introduces a dynamic chaotic sequence strongly correlated with the plaintext to enhance the algorithm's resistance to cryptographic attacks; thereby forming an encrypted image with high compression ratio and high security. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0103] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:

[0104] like Figure 1 As shown, this embodiment provides an image privacy protection method based on DCT compression and nonlinear dynamics, comprising the following steps:

[0105] S1), converting the RGB plaintext image to the YCbCr color space and sampling;

[0106] In this embodiment, the YCbCr color space divides the color of the RGB plain text image into a brightness component Y and chrominance components Cb and Cr; the brightness component Y carries most of the visual information of the image, and the chrominance components Cb and Cr contain color information, thereby more effectively representing the color information of the image. In order to further optimize the compression efficiency; this embodiment adopts a 4:2:0 sampling method, and in 4:2:0 sampling, the brightness component Y maintains the original resolution unchanged, and the resolution of the chrominance components Cb and Cr is reduced to half of the original image. Specifically, in each 2x2 pixel block, only one Cb and one Cr sample are retained, and the chrominance values ​​of the other three pixels are obtained by interpolation. In this way, the amount of data that needs to be processed and stored can be significantly reduced, thereby improving compression efficiency without significantly sacrificing image quality.

[0107] S2), performing discrete cosine transform (DCT) processing on the sampled image to represent the sampled image as a series of DCT coefficients;

[0108] In this embodiment, the discrete cosine transform DCT decomposes the sampled image into low-frequency components and high-frequency components, wherein the low-frequency components represent the main information of the image, and the high-frequency components contain the detailed information of the image. The DCT coefficients obtained by the discrete cosine transform DCT are sorted according to their energy importance, and generally the low-frequency coefficients have higher energy, while the high-frequency coefficients have lower energy.

[0109] S3), performing quantization operation on the DCT coefficients to further compress the DCT coefficients;

[0110] In this embodiment, the quantization operation selects a specific quantization matrix to quantize the DCT coefficients. In this embodiment, the quantization matrix is ​​an 8x8 matrix, each element represents the quantization step of the corresponding frequency coefficient, and the quantization matrix is ​​automatically adjusted according to the statistical characteristics of the image.

[0111] The DCT coefficient is divided by the corresponding quantization step size and then rounded or rounded down to obtain a quantized DCT coefficient, and the quantized DCT coefficient is encoded by Huffman coding or arithmetic coding.

[0112] In the quantization process, the quantization step size is dynamically selected according to the application scenario and user needs, and a larger quantization step size is used in flat areas of the image, while a smaller step size is used in areas with edges or rich textures. At the same time, the quantization error is controlled by error diffusion technology. By dispersing the error during the quantization process, the block effect or other visual artifacts that may occur in the quantization process are reduced.

[0113] S4), performing detailed compression coding processing on the quantized DCT coefficients to obtain a compressed reconstructed image matrix; specifically comprising the following steps:

[0114] S41), extraction and encoding of DC coefficients;

[0115] S42), extraction and encoding of AC coefficients;

[0116] S43), finally encoding the DC and AC coefficients after compression encoding by using entropy encoding, and the entropy encoding assigns code words of different lengths according to the probability of occurrence of symbols;

[0117] S44), storing the DC and AC coefficients compressed by entropy coding in step S43) in binary format; generating six binary bit streams after compression coding of the three color channels R, G, and B; connecting these bit streams to reconstruct a binary matrix whose column length is eight times that of the plaintext image;

[0118] S45), replace every eight columns of the binary matrix with a column of decimal numbers to obtain a matrix with the same length as the plaintext but different width; add a random sequence of numbers 0 and 1 as needed and record it;

[0119] S46), the matrix obtained in step S45) is evenly divided into three parts by row, and respectively allocated to R, G, and B channels to form a coded compressed reconstructed image matrix.

[0120] S5), using the chaotic Rubik's Cube arrangement algorithm based on nonlinear dynamics and the image filtering diffusion mechanism to encrypt the compressed reconstructed image matrix to obtain the encrypted ciphertext image, specifically including the following steps:

[0121] S51), chaotic initial value perturbation and sequence preprocessing;

[0122] S52), the reconstructed image matrix is ​​layered through RGB, and each layer is encrypted to obtain a ciphertext image ;

[0123] S53), design a filter, and use the designed filter to encrypt the ciphertext image Perform filtering and diffusion processing to obtain the ciphertext image after filtering and diffusion processing .

[0124] As a preferred embodiment of this embodiment, in step S41), the extraction and encoding of the DC coefficient specifically includes the following steps:

[0125] S411), extracting a DC coefficient representing an average brightness of the DCT coefficient block from each 8x8 DCT coefficient block;

[0126] S412), performing differential pulse code modulation (DPCM) processing on the extracted DC coefficient; the differential pulse code modulation (DPCM) records the difference between adjacent DC coefficients;

[0127] S413), applying run length encoding RLE to further compress the DC coefficient after differential pulse code modulation DPCM processing, and identifying and encoding continuous repeated values ​​in the data through the run length encoding RLE.

[0128] As a preferred embodiment of this embodiment, in step S42), the extraction, compression and coding of the AC coefficient specifically includes the following steps:

[0129] S421), extracting AC coefficients representing texture and detail information of the image from each 8x8 DCT coefficient block;

[0130] S422), using Zig-Zag scanning of AC coefficients, the Zig-Zag scanning converts the two-dimensional AC coefficient matrix into a one-dimensional array; the Zig-Zag scanning starts from the DC coefficient in the upper left corner, and then sequentially accesses the remaining AC coefficients along the Zig-Zag path;

[0131] S423), encoding the AC coefficient sequence after Zig-Zag scanning and sorting by run length encoding RLE;

[0132] S424), dynamically adjust the threshold and encoding parameters of the run length encoding RLE according to the energy distribution of the AC coefficient.

[0133] As a preferred embodiment of this embodiment, in step S43), the entropy coding is Huffman coding or arithmetic coding.

[0134] As a preferred embodiment of this invention, step S51) specifically includes the following steps:

[0135] S511), use SHA256 to calculate the plaintext image Hash value , and then the hash value Divided into 32 equal parts, namely , , ,…, ;

[0136] S512), according to the hash value The interference parameters are obtained by using 32 components of

[0137]

[0138] In the formula, ~ are the interference parameters of the key respectively;

[0139] S513) The key The six components of ~ Add together to get ;Right now:

[0140]

[0141] S514), generate two sets of control keys for iterating 2D-LSCM; namely:

[0142]

[0143] In the formula, represents the first set of keys of 2D-LSCM; represents the second set of keys of 2D-LSCM; mod represents the remainder function;

[0144] S515), using the first set of keys Perform the first iteration; then use the second set of keys Perform the second iteration and generate a chaotic pseudo-random sequence , , ,Right now:

[0145]

[0146] Where, 2D-LSCM() is a chaotic function used to generate chaotic pseudo-random sequences; Indicates the height of the image. Indicates the width of the image.

[0147] As a preferred embodiment of this invention, step S52) specifically includes the following steps:

[0148] S521), first reconstruct a grayscale image of the image matrix Encryption processing is performed; The size is of Grayscale image;

[0149] S522), from the chaotic pseudo-random sequence Take out H bits, from a chaotic pseudo-random sequence Take out W Bit;

[0150] S523), determine the maximum number of iterations And the counter Initialized to 0;

[0151] S524), the counter Increase by 1;

[0152] S525) for grayscale images Each line of m Perform left or right shift operations;

[0153] S526) for grayscale images Each column of n Move up or down to get a scrambled image ;

[0154] S527) Using chaotic pseudo-random sequences After shuffling the image Each row of operator; that is:

[0155]

[0156] In the formula, Represents the image obtained by bitwise XOR operation on each row; is the bitwise exclusive OR operator; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed;

[0157] S528), using chaotic pseudo-random sequence After shuffling the image Each column uses the bitwise operator; that is:

[0158]

[0159] In the formula, The ciphertext image after bitwise XOR operation on each column; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed;

[0160] S529) If ; then the grayscale image The encryption is completed, generating the arranged ciphertext image ; Otherwise, repeat steps S524)-S528);

[0161] S530), repeat steps SS522) - S529) to complete the encryption of the remaining two layers of grayscale images; finally synthesize the arranged ciphertext image .

[0162] As a preferred embodiment of this invention, step S525) specifically includes the following steps:

[0163] S5251), calculate the m - th The sum of all elements in the row :

[0164]

[0165] In the formula, m =1,2…, W ;

[0166] S5252) and calculate the m - th The sum of all elements in the row Modulo 2 ;

[0167]

[0168] S5253) m - th Shift rows left or right in a loop Positions, that is, the image pixels are shifted left or right positions, the first pixel moves to the last pixel.

[0169] Preferably, step S526) specifically includes the following steps:

[0170] S5261) and calculate the n - th The sum of all elements in the column :

[0171]

[0172] In the formula, n =1,2…, H ;

[0173] S5262) ​​and calculate the n - th The sum of all elements in the column Modulo 2 ;

[0174]

[0175] S5263) n - th Move columns down or up locations.

[0176] As a preferred embodiment of the present invention, in step S53), the filter size used in the image diffusion process is set to 2x2; the weight of the lower right corner corresponds to the current pixel, that is, K (2,2) = 1; the other three weights use chaotic pseudo-random sequences Generated as a subkey.

[0177] As a preferred embodiment of this invention, in step S53), the weight generation of the filter specifically includes the following steps:

[0178] S531), take a 96-bit chaotic pseudo-random sequence and split it into three 32-bit sequences, then convert the three sequences into integers ;

[0179] S532) for integers Sort the elements of to get the index vector ;

[0180] S533), using index vector Perturb three integers to obtain the perturbed set of elements :

[0181] ;

[0182] Therefore, the filter can be expressed as: .

[0183] Preferably, in S53), a filter is used Diffusion treatment is performed, specifically:

[0184] First, use the ciphertext image of the scrambled result Initialize the filter diffusion result C; then use the filtering operation to update the value of each pixel in the filter diffusion result C; thus obtaining the ciphertext image after the filter diffusion process ,Right now:

[0185]

[0186] because K (2,2)=1, so the above formula can be written as:

[0187]

[0188] In the formula, Represents the ciphertext image after filtering and diffusion processing; Represents a ciphertext image gray level.

[0189] According to the inverse operation of step S5-S1), the ciphertext image The decryption process is performed and finally the restored image is obtained, thereby realizing the viewing of the restored image.

[0190] In addition, the specific process of image filtering diffusion is described in the present embodiment using the following example:

[0191] First build a The image matrix , and use three chaos initial parameters , , Generate a chaotic pseudo-random sequence for image filtering encryption; where the image matrix It is expressed as:

[0192]

[0193] Then use image filter diffusion to filter the image matrix Encrypt and obtain the encrypted image matrix ,

[0194]

[0195] The same filter can be used during decryption K To recover the ciphertext image P , the inverse formula is expressed as:

[0196]

[0197] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.

Claims

1. An image privacy protection method based on DCT compression and nonlinear dynamics, characterized in that: The following steps are involved: Step 1: Reconstruct the RGB plaintext image to obtain the reconstructed image matrix; Step 2: Encrypt the reconstructed image matrix using the chaotic Rubik's Cube arrangement algorithm based on nonlinear dynamics and the image filtering diffusion mechanism to obtain the encrypted ciphertext image; specifically, the following steps are included: S51), chaotic initial value disturbance and sequence preprocessing; specifically including the following steps: S511), use SHA256 to calculate the hash value of the plaintext image, and then divide the hash value into 32 parts, which are represented as follows: , , ,…, ; S512), obtain interference parameters according to the 32 components of the hash value; namely: In the formula, are the interference parameters of the key respectively; S513) The key The six components of Add; that is: S514), using the following formula to generate two sets of control keys for iterative chaotic function 2D-LSCM; Right now: In the formula, represents the first set of keys of 2D-LSCM; represents the second set of keys of 2D-LSCM; 2D-LSCM represents the remainder function; S515), using the first set of keys Perform the first iteration; then use the second set of keys Perform the second iteration and generate a chaotic pseudo-random sequence , , ,Right now: Where, 2D-LSCM() is a chaotic function used to generate chaotic pseudo-random sequences; Indicates the height of the image. Indicates the width of the image; S52), the reconstructed image matrix is ​​divided into three layers of images through RGB layered processing, and each layer of image is encrypted to obtain a ciphertext image ; S53), design a filter, and use the designed filter to encrypt the ciphertext image Perform filtering and diffusion processing to obtain the ciphertext image after filtering and diffusion processing .

2. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 1, characterized in that: The reconstruction of the RGB plaintext image specifically includes the following steps: S1), converting the RGB plaintext image to the YCbCr color space and sampling; S2), performing discrete cosine transform (DCT) processing on the sampled image to represent the sampled image as a series of DCT coefficients; S3), performing quantization operation on the DCT coefficients to further compress the DCT coefficients; S4), perform detailed compression coding processing on the quantized DCT coefficients to obtain a reconstructed image matrix.

3. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 2, characterized in that: In step S4), the quantized DCT coefficients are subjected to detailed compression coding processing, which specifically includes the following steps: S41) Extraction and compression coding of DC coefficients; S42) Extraction and compression coding of AC coefficients; S43), finally encoding the DC coefficient and AC coefficient after compression encoding by using entropy encoding; S44), storing the DC and AC coefficients finally compressed and encoded by entropy coding in step S43) in a binary format; After compression encoding, the R, G, and B channels generate six binary bit streams; These bit streams are concatenated to reconstruct a binary matrix; S45), replacing each eight columns of the binary matrix with a column of decimal numbers, to obtain a matrix with the same length as the plaintext but different width; Add random sequences of 0s and 1s as needed and record them; S46), the matrix obtained in step S45) is evenly divided into three parts by row, and respectively allocated to R, G, and B channels to form a coded compressed reconstructed image matrix.

4. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 3, characterized in that: In step S41), the extraction and encoding of the DC coefficient specifically includes the following steps: S411), extracting DC coefficients from each DCT coefficient block; S412), performing differential pulse code modulation DPCM processing on the extracted DC coefficient; S413), applying run length encoding RLE to further compress the DC coefficient after differential pulse code modulation DPCM processing.

5. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 3, characterized in that: In step S42), the extraction and compression coding of the AC coefficient specifically includes the following steps: S421), extracting AC coefficients from each DCT coefficient block; S422) Use Zig-Zag to scan the AC coefficient; S423), encoding the AC coefficient sequence after Zig-Zag scanning and sorting by run length encoding RLE; S424), dynamically adjust the threshold and encoding parameters of the run length encoding RLE according to the energy distribution of the AC coefficient.

6. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 1, characterized in that: Step S52) specifically includes the following steps: S521), first reconstruct a grayscale image of the image matrix Perform encryption processing; S522), from chaotic pseudo-random sequence Take out H bits, from a chaotic pseudo-random sequence Take out W Bit; S523), determine the maximum number of iterations And the counter Initialized to 0; S524), the counter Increase by 1; S525) for grayscale images Each line of m Perform left or right shift operations; S526) for grayscale images Each column of n Move up or down to get a scrambled image ; S527) Using chaotic pseudo-random sequences After shuffling the image Each row of operator; that is: In the formula, Represents the image obtained by bitwise XOR operation on each row; is the bitwise exclusive OR operator; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed; S528), using chaotic pseudo-random sequence After shuffling the image Each column uses the bitwise operator; that is: In the formula, The ciphertext image after bitwise XOR operation on each column; Indicates the use of chaotic pseudo-random sequence The flip from left to right is performed; S529) If ; then the grayscale image The encryption is completed, generating the arranged ciphertext image ; Otherwise, repeat steps S524)-S528); S530), repeat steps S522) - S529) to complete the encryption of the remaining two layers of grayscale images; finally synthesize the arranged ciphertext image .

7. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 6, characterized in that: In step S53), the filter size used in the image diffusion process is set to 2x2; the lower right corner weight corresponds to the current pixel, that is, K (2,2) = 1; the other three weights use chaotic pseudo-random sequences Generate as a subkey; specifically include the following steps: S531), take a 96-bit chaotic pseudo-random sequence and split it into three 32-bit sequences, then convert the three sequences into integers ; S532) for integers Sort the elements of to get the index vector ; S533), using index vector Perturb three integers to obtain the perturbed set of elements : Therefore, the filter can be expressed as: .

8. The image privacy protection method based on DCT compression and nonlinear dynamics according to claim 7, characterized in that: In step S53), a diffusion process is performed using filter K, specifically: First, use the ciphertext image of the scrambled result Initialize the filter diffusion result C; then use the filter operation to update the value of each pixel in C; thus obtaining the ciphertext image after filter diffusion processing ,Right now because K (2,2)=1, so the above formula can be written as: In the formula, Represents the ciphertext image after filtering and diffusion processing; Represents a ciphertext image gray level.

Citation Information

Patent Citations

  • Digital image compressing, encrypting and encoding combined method

    CN104144343A

  • Chaotic image encryption algorithm based on three-dimensional Rubik's cube scrambling and diffusion

    CN115623139A