Color image encryption method based on deep learning and four-dimensional Lorentz chaotic system

By combining deep learning and four-dimensional Lorentz chaotic system, a CNN network is constructed to extract color image features, and the improved four-dimensional Lorentz equation is used for recursive diffusion, which solves the problem of low encryption strength in existing color image encryption methods and achieves high security and accurate restoration encryption effect.

CN120658831APending Publication Date: 2025-09-16JIAMUSI UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510711300.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing color image encryption methods have low encryption strength and fail to fully utilize the characteristics of color images. In addition, traditional methods have limited anti-attack capabilities when processing high-resolution color images.

Method used

Combining deep learning with the four-dimensional Lorentz chaotic system, the features of color images are extracted through the CNN deep learning network, and the improved four-dimensional Lorentz equation is used to generate a random chaotic sequence for Arnold scrambling and recursive diffusion to achieve encryption of color images.

Benefits of technology

It improves the security and unpredictability of encryption, realizes the avalanche effect of encryption results, ensures the accurate restoration of decryption, and enhances the strength and randomness of color image encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658831A_ABST
    Figure CN120658831A_ABST
Patent Text Reader

Abstract

The invention discloses a color image encryption method based on deep learning and a four-dimensional Lorentz chaotic system, and belongs to the field of information security and image encryption. According to the method, a CNN deep learning network is constructed, a color image is divided into RGB channels, features of a pixel matrix of each channel are extracted as initial conditions of a chaotic differential equation, and a data set is obtained through solving by a variable-step-size fourth-order Runge-Kutta method and used for training the CNN network. And carrying out first round encryption on the pixel matrix by using a key sequence generated by the trained CNN network, carrying out Arnold scrambling and forward and reverse recursive diffusion on the pixel matrix by using a random chaos sequence generated by an improved four-dimensional Lorentz equation to complete second round encryption, merging the RGB three-channel pixel matrix, and outputting a final color encrypted image. The problems that an existing color image encryption method is low in encryption strength and cannot make full use of color image characteristics are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a color image encryption method based on deep learning and a four-dimensional Lorentz chaotic system, and belongs to the field of information security and image encryption. Background Art

[0002] With the rapid development of information technology and the internet, digital images, as important information carriers, are widely disseminated online. However, these images may contain private information, commercial secrets, and sensitive content. Consequently, image encryption technology has received increasing attention. Traditional image encryption methods are based on classical cryptographic principles, such as symmetric encryption algorithms like DES and AES, or asymmetric encryption algorithms like RSA. These methods often suffer from low computational efficiency and complex key management when processing large-scale image data.

[0003] In recent years, chaotic systems have been widely used in image encryption due to their excellent randomness, sensitive initial value dependence, and unpredictability. Three-dimensional Lorentz chaotic systems are a commonly used type of chaotic system. However, when processing high-resolution color images, these systems often suffer from insufficient encryption strength and limited anti-attack capabilities. Furthermore, traditional image encryption methods typically treat all three RGB channels identically, failing to fully exploit the unique characteristics of color images.

[0004] On the other hand, deep learning technology has made breakthroughs in image processing, and its powerful feature extraction and pattern recognition capabilities provide new ideas for image encryption. However, existing technologies do not organically combine deep learning, chaotic systems, and the characteristics of color images.

[0005] The existing color image encryption methods mainly have the problems of low encryption strength and inability to fully utilize the characteristics of color images. To address the above problems, the present invention proposes a color image encryption method based on deep learning and four-dimensional Lorentz chaotic system. Summary of the Invention

[0006] The present invention aims to solve the problems that existing image encryption methods have low encryption strength and cannot fully utilize the characteristics of color images, and proposes a color image encryption method based on deep learning and four-dimensional Lorentz chaotic system.

[0007] A color image encryption method based on deep learning and four-dimensional Lorentz chaotic system includes the following steps: Step 1: Resize and normalize the color image to be encrypted to obtain the pixel matrix of the three channels of the processed image. 、 、 ; Step 2: Pixel matrix of step 1 、 、 Perform bit plane extraction to obtain the initial feature vector ; , , , , , , Among them, the size of the pixel matrix is , Represents pixel points The R channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The G channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The B channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Indicates a bitwise AND operation. The values ​​17, 34, 68, and 136 are the binary numbers 00010001, 00100010, 01000100, and 10001000. The feature information of different bit planes is extracted through the AND operation.

[0008] Step 3: The chaotic differential equation is: , The initial eigenvector X in step 2 As the initial condition of the chaotic differential equation, substitute the chaotic differential equation ,The time evolution trajectory of the state variables is solved by the fourth-order Runge-Kutta method with variable step size, and the data set matrix is ​​obtained. The first 80 rows of the data set matrix are used as the training set.

[0009] Step 4: Build a CNN deep learning network, including: input layer, first convolution layer, first normalization layer, first ReLU layer, second convolution layer, second normalization layer, second ReLU layer, Dropout layer, fully connected layer and regression layer; The input layer is connected to the input of the first convolutional layer, the output of the first convolutional layer is connected to the input of the first batch of normalization layers, the output of the first batch of normalization layers is connected to the input of the first ReLU layer, the output of the first ReLU layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second batch of normalization layers, the output of the second batch of normalization layers is connected to the input of the second ReLU layer, the output of the second ReLU layer is connected to the input of the Dropout layer, the output of the Dropout layer is connected to the input of the fully connected layer, the output of the fully connected layer is connected to the input of the regression layer, and the output of the regression layer is the output of the CNN deep learning network.

[0010] Use the training set described in step 3 to train the CNN deep learning network and calculate the mean square error loss between the predicted value and the true value. The loss function is: , in, is the sample size, represents the true value, represents the predicted value; The network parameters are adjusted by the stochastic gradient descent method to obtain a trained CNN deep learning network.

[0011] Step 5: Input rows 81-300,000 of the data set matrix described in step 3 into the trained CNN deep learning network described in step 4 to obtain a key sequence, and perform a modulo 256 operation on the key sequence to obtain key sequence 1.

[0012] Step 6: The pixel matrix described in step 1 、 、 Perform L-type scrambling and reshape the one-dimensional array obtained after scrambling into a size of Convert the two-dimensional matrix to double precision type, traverse each pixel point along the anti-diagonal direction, use the key sequence 1 in step 5 to perform an XOR operation on the three channel matrices of each pixel, and obtain the pixel matrix after the first round of encryption 、 、 .

[0013] Step 7: The improved four-dimensional Lorentz equation is: , in, 、 、 、 are time-varying variables, and o, p, q, d, e, f, g, and h are system parameters. When the system parameters take specific values, the four-dimensional Lorentz system exhibits chaotic characteristics. The evolution trajectory of the state variables over time is solved by the fourth-order Runge-Kutta method with a variable step size, and the values ​​of the four variables at all time points are obtained to form a four-column matrix. The first column is recorded as sequence s, and the sequence s is transformed to obtain the integer sequence , convert the sequence Divide into two equal-length sequences u and v, process the sequence s to obtain a discrete integer sequence S, and divide S into two equal-length sequences and .

[0014] Use the sequences u and v to map the pixel matrix described in step 6 、 、 Perform Arnold pixel scrambling: , Indicates swapping the pixel at position k with the pixel at the calculated position w. and Represents the one-dimensional linear position index of sequences u and v, where k ranges from 1 to M×N.

[0015] Using Sequences Perform forward diffusion on the scrambled matrix first: ; in, is the pixel at position k after Arnold pixel scrambling, for The encrypted output value, is the initial value, set to a random constant, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise exclusive OR operation.

[0016] Reuse sequence Perform reverse diffusion: ; in, is the matrix after forward diffusion, is the initial value, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise exclusive OR operation.

[0017] Get the pixel matrix after the second round of encryption 、 、 .

[0018] Step 8: The pixel matrix described in step 7 、 、 Merge and output the final color encrypted image.

[0019] The beneficial effects of the present invention are: The present invention constructs a CNN deep learning network, divides a color image into three channels (RGB), extracts the features of the pixel matrices of each channel as the initial conditions of a chaotic differential equation, and solves a dataset using a variable-step fourth-order Runge-Kutta method to train the CNN network. The pixel matrix is ​​encrypted in the first round using a key sequence generated by the trained CNN network. A random chaotic sequence generated by an improved four-dimensional Lorentz equation is then used to perform Arnold scrambling and forward and reverse recursive diffusion on the pixel matrix to complete the second round of encryption. The RGB three-channel pixel matrices are then merged to output the final encrypted color image. The CNN deep learning network increases the security and unpredictability of encryption. The recursive diffusion mechanism increases encryption strength, enabling even small changes to lead to large-scale changes in the overall encryption result, achieving an "avalanche effect" of encryption. Separate processing of the three RGB channels increases the randomness of encryption while ensuring accurate decryption. This addresses the problems of existing color image encryption methods, which suffer from low encryption strength and fail to fully utilize the characteristics of color images. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is the encryption flow chart of the present invention; Figure 2 This is the CNN deep learning network architecture diagram. DETAILED DESCRIPTION Specific implementation method one: This embodiment is a color image encryption method based on deep learning and a four-dimensional Lorentz chaotic system, comprising the following steps: Step 1: Resize and normalize the color image to be encrypted to obtain the pixel matrix of the three channels of the processed image. 、 、 .

[0022] Step 2: Pixel matrix of step 1 、 、 Perform bit plane extraction to obtain the initial feature vector ; , , , , , , Among them, the size of the pixel matrix is , Represents pixel points The R channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The G channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The B channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Indicates bitwise AND operation. The values ​​17, 34, 68, and 136 are the binary numbers 00010001, 00100010, 01000100, and 10001000. The feature information of different bit planes is extracted by AND operation. When performing a bitwise AND operation with mask 17, only the pixel values ​​corresponding to bits set to 1 in the mask remain set to 1; all other bits are set to 0. Bit masks 17, 34, 68, and 136 extract information from bits 0 and 4, 1 and 5, 2 and 6, and 3 and 7, respectively. The initial features serve as the initial parameters for the CNN network and chaotic system, enhancing sensitivity to the original image content and thus improving encryption strength.

[0023] Step 3: The chaotic differential equation is: , The eigenvalue of the initial eigenvector X in step 2 is used as the initial condition of the chaotic differential equation. Substitute into the chaotic differential equation , the six state variables are solved in the time interval [0,2000] by the fourth-order Runge-Kutta method with variable step size to The evolution trajectory over time results in a six-column data set matrix, where each row represents the value of six state variables at a time point, and each column corresponds to the value of a state variable at all time points. The first 80 rows of the data set matrix are used as the training set.

[0024] Step 4: Build a CNN deep learning network, such as Figure 2As shown, it includes: input layer, first convolution layer, first batch normalization layer, first ReLU layer, second convolution layer, second batch normalization layer, second ReLU layer, Dropout layer, fully connected layer and regression layer; The input layer is connected to the input of the first convolutional layer, the output of the first convolutional layer is connected to the input of the first batch of normalization layers, the output of the first batch of normalization layers is connected to the input of the first ReLU layer, the output of the first ReLU layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second batch of normalization layers, the output of the second batch of normalization layers is connected to the input of the second ReLU layer, the output of the second ReLU layer is connected to the input of the Dropout layer, the output of the Dropout layer is connected to the input of the fully connected layer, the output of the fully connected layer is connected to the input of the regression layer, and the output of the regression layer is the output of the CNN deep learning network.

[0025] Use the training set described in step 3 to train the CNN deep learning network. During training, input the first five columns of each row into the CNN deep learning network and calculate the mean square error loss between the predicted value and the sixth column. The loss function is: , in, is the sample size, represents the true value, represents the predicted value; The network parameters are adjusted by the stochastic gradient descent method to obtain a trained CNN deep learning network.

[0026] Step 5: Input rows 81-300,000 of the data set matrix described in step 3 into the trained CNN deep learning network described in step 4 to obtain a key sequence, and perform a modulo 256 operation on the key sequence to obtain key sequence 1.

[0027] Step 6: The pixel matrix described in step 1 、 、 Perform L-type scrambling. The specific process is as follows: Get the dimensions of the input matrix , create a one-dimensional array to store the rearranged pixels, from the pixel point Start by traversing vertically down to the pixel point , traverse right to the pixel point , and then from the pixel point Start by traversing vertically down to the pixel point , traverse right to the pixel point , and then from the pixel point Start by traversing vertically down to the pixel point , traverse right to the pixel point ... and so on, each time the traversal is indented one pixel inward until all the pixels are traversed, and the rearranged one-dimensional array is obtained, and the obtained one-dimensional array is reshaped into a size of A two-dimensional matrix; Reshape the one-dimensional array obtained after scrambling into a size of Convert the two-dimensional matrix to double precision type, such as Figure 1 As shown, traverse each pixel point along the anti-diagonal direction from the upper right corner to the lower left corner, use the key sequence 1 described in step 5 to perform an XOR operation on the three channel matrices of each pixel to obtain the pixel matrix after the first round of encryption 、 、 .

[0028] Step 7: The improved four-dimensional Lorentz equation is: , in, 、 、 、 are time-varying variables, and o, p, q, d, e, f, g, and h are system parameters. When the system parameters take specific values ​​of o=2, p=20, q=15, d=11, e=10, f=1, g=0.05, and h=0.5, the four-dimensional Lorentz system exhibits chaotic characteristics. The fourth-order Runge-Kutta method is used to solve the time evolution trajectory of the state variables in the time interval [0,3000], and the values ​​of the four variables at all time points are obtained, forming a four-column matrix.

[0029] Take the first column as sequence s, and transform sequence s to get integer sequence , the transformation formula is: , Among them, floor means rounding down, mod means taking the remainder; Divided into two equal-length sequences u and v, , , where “:” indicates indexing the sequence.

[0030] The sequence s is processed to obtain the discrete integer sequence S. The processing process is: , Among them, floor means rounding down, mod means taking the remainder; divide S into two sequences of equal length and , , , where ":" indicates indexing the sequence Use the sequences u and v to map the pixel matrix described in step 6 、 、 Perform Arnold pixel scrambling: , Indicates swapping the pixel at position k with the pixel at the calculated position w. and Represents the one-dimensional linear position index of sequences u and v, where k ranges from 1 to M×N.

[0031] Using Sequences Perform forward diffusion on the scrambled matrix first: , in, is the pixel at position k after Arnold pixel scrambling, for The encrypted output value, is the initial value, set to a random constant, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise XOR operation. The diffusion process recursively associates each pixel with the previous processing result and the diffusion sequence.

[0032] Reuse sequence Perform reverse diffusion: , in, is the matrix after forward diffusion, is the initial value, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise XOR operation. The diffusion process recursively associates each pixel with the previous processing result and the diffusion sequence.

[0033] Get the pixel matrix after the second round of encryption 、 、 .

[0034] Step 8: The pixel matrix described in step 7 、 、 Merge and output the final color encrypted image.

Claims

1. A color image encryption method based on deep learning and four-dimensional Lorentz chaotic system, characterized in that: The following steps are involved: Step 1: Resize and normalize the color image to be encrypted to obtain the pixel matrix of the three channels of the processed image. 、 、 ; Step 2: Pixel matrix of step 1 、 、 Perform bit plane extraction to obtain the initial feature vector X; Step 3: Using the eigenvalues ​​of the initial eigenvector X in step 2 as the initial conditions of the chaotic differential equation, solving the time evolution trajectory of the state variable using the fourth-order Runge-Kutta method with a variable step size to obtain a data set matrix, and using the first 80 rows of the data set matrix as the training set; Step 4: Build a CNN deep learning network, use the training set described in step 3 to train the CNN deep learning network, calculate the mean square error loss between the predicted value and the true value, and adjust the network parameters by stochastic gradient descent to obtain a trained CNN deep learning network. Step 5: Input rows 81-300,000 of the data set matrix described in step 3 into the CNN deep learning network trained in step 4 to obtain a key sequence, and perform a modulo 256 operation on the key sequence to obtain key sequence 1; Step 6: The pixel matrix described in step 1 、 、 Perform L-type scrambling and reshape the one-dimensional array obtained after scrambling into a size of Convert the two-dimensional matrix to double precision type, traverse each pixel point along the anti-diagonal direction, use the key sequence 1 in step 5 to perform an XOR operation on the three channel matrices of each pixel, and obtain the pixel matrix after the first round of encryption 、 、 ; Step 7: Set the initial conditions and system parameters for the improved four-dimensional Lorentz equation, use the variable step size fourth-order Runge-Kutta method to solve the evolution trajectory of the state variables over time, obtain the values ​​of the four variables at each time point, form a four-column matrix, take the first column as sequence s, and transform the sequence s to obtain the integer sequence , convert the sequence Divide into two equal-length sequences u and v, process the sequence s to obtain a discrete integer sequence S, and divide S into two equal-length sequences and , use the sequence u and v to the pixel matrix described in step six 、 、 Perform Arnold pixel scrambling using a sequence First perform forward diffusion on the scrambled matrix, and then use the sequence Perform reverse diffusion to obtain the pixel matrix after the second round of encryption 、 、 ; Step 8: The pixel matrix described in step 7 、 、 Merge and output the final color encrypted image.

2. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The initial eigenvector X in step 2 is: , , , , , , Among them, the size of the pixel matrix is , Represents pixel points The R channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The G channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Represents pixel points The B channel pixel value, that is, the pixel matrix Medium pixel The corresponding pixel value, Indicates a bitwise AND operation. The values ​​17, 34, 68, and 136 are the binary numbers 00010001, 00100010, 01000100, and 10001000. The feature information of different bit planes is extracted through the AND operation.

3. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The chaotic differential equation described in step 3 is: , The eigenvector X Substitute into the chaotic differential equation ,The 4th-order Runge-Kutta method with variable step size is used to solve the time evolution trajectory of the state variables and obtain the data set matrix.

4. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The CNN deep learning network described in step 4 includes: an input layer, a first convolutional layer, a first batch of normalization layers, a first ReLU layer, a second convolutional layer, a second batch of normalization layers, a second ReLU layer, a Dropout layer, a fully connected layer, and a regression layer; The input layer is connected to the input of the first convolutional layer, the output of the first convolutional layer is connected to the input of the first batch of normalization layers, the output of the first batch of normalization layers is connected to the input of the first ReLU layer, the output of the first ReLU layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second batch of normalization layers, the output of the second batch of normalization layers is connected to the input of the second ReLU layer, the output of the second ReLU layer is connected to the input of the Dropout layer, the output of the Dropout layer is connected to the input of the fully connected layer, the output of the fully connected layer is connected to the input of the regression layer, and the output of the regression layer is the output of the CNN deep learning network.

5. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The loss function for calculating the mean square error between the predicted value and the true value in step 4 is: , in, is the sample size, represents the true value, Represents the predicted value.

6. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The improved four-dimensional Lorentz equation described in step 7 is: , in, 、 、 、 are time-varying variables, and o, p, q, d, e, f, g, and h are system parameters. When the system parameters take specific values, the four-dimensional Lorentz system exhibits chaotic characteristics. The fourth-order Runge-Kutta method with a variable step size is used to solve the evolution trajectory of the state variables over time, and the values ​​of the four variables at all time points are obtained, forming a four-column matrix.

7. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The Arnold pixel scrambling method described in step 7 is: , Indicates swapping the pixel at position k with the pixel at the calculated position w. and Represents the one-dimensional linear position index of sequences u and v, where k ranges from 1 to M×N.

8. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1 is characterized in that: The forward diffusion in step seven is: , in, is the pixel at position k after Arnold pixel scrambling, for The encrypted output value, is the initial value, set to a random constant, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise exclusive OR operation.

9. The color image encryption method based on deep learning and four-dimensional Lorentz chaotic system according to claim 1, characterized in that: The reverse diffusion in step seven is: , in, is the matrix after forward diffusion, is the initial value, Representation sequence One-dimensional linear position index, k ranges from 1 to M×N, Represents a bitwise exclusive OR operation.

Citation Information

Cited By

  • Diffusion-scrambling-diffusion image encryption method and system

    CN121217875A

  • Bit-level image encryption method and system based on chaos sequence of diffusion model

    CN121334323A