Encryption method based on chemical process flow image
Through the encryption method that combines Sobel operator edge detection, chaos system and deep learning technology, the problem of information leakage and tampering during the image transmission process of the chemical enterprise's process flow is solved, achieving high security and privacy image encryption, and building a complete The network security defense system ensures the safe transmission of process flow images.
Patent Information
- Application Number
- CN202410799294.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-20
AI Technical Summary
Chemical companies are vulnerable to hacker attacks when transmitting process flow images, leading to information leakage and tampering. Existing traditional image encryption methods are difficult to meet their high security and privacy needs, especially in complex geographical environments and large amounts of data. Easily stolen and low security.
The Sobel operator is used for edge detection, and the chaotic system and deep learning technology are combined to encrypt the image. DNA coding is used to scramble and diffuse the pixels to generate an unpredictable chaotic sequence, and the LSTM model is used to process the sequence to build a complex Encryption algorithm, automatically turns on the image encryption function, and monitors and decrypts in real time during the transmission process.
It improves the recognition ability and security of image encryption, builds a complete network security defense system, can effectively resist hacker attacks, ensures the security and privacy of process flow images during transmission, prevents leakage and tampering, and improves the algorithm's Complexity and confidentiality.
Smart Images

Figure CN118677999A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of information security, and mainly relates to an encryption method based on chemical process flow images. Background Art
[0002] Driven by digital technology, the network security of chemical enterprises faces difficulties in process flow transmission and is vulnerable to hacker attacks. The data and information generated in computer networks are increasing in number and variety, and the data transmission methods are diverse. Criminals will take advantage of the openness of the network to find technical loopholes to attack and steal other people's data information for illegal interests. With the development of intelligence, chemical enterprises gradually synchronize their information data and other resources to the internal network of the enterprise. In the face of the transmission of private images such as process flow charts, the internal security of the enterprise is not taken seriously enough, resulting in the leakage of important information such as enterprise data and commercial secrets. This has caused serious damage to the development of chemical enterprises. Many chemical enterprises in the society use encryption technology to maintain data security. In the process of transmission and operation, they do a good job in data transmission confidentiality, reduce labor costs, and ensure the normal operation of the system.
[0003] Chemical companies mainly use digital image encryption to protect the confidentiality, integrity and availability of sensitive information and prevent potential risks, damage and legal liabilities. Privacy images may include information about the production process. Unauthorized access can easily lead to knowledge leakage, thus affecting product quality and the company's technological advantages. Unauthorized access, network attacks or other security threats can lead to the leakage, tampering and destruction of privacy images. This poses a threat to the company's operations and business continuity and has a negative impact on the company's reputation. In order to ensure the security of its transmission, chemical companies need to take relevant network security measures to encrypt privacy images.
[0004] The disadvantages of the existing technology are: the chemical enterprise process images have high security, strong privacy, complex geographical environment and large data volume. Traditional image encryption methods are difficult to overcome these difficulties, resulting in illegal theft of ciphertext and low security. In order to solve the above problems, a method that can be targeted, has fast calculation speed and good confidentiality is provided. The present invention provides the following technical solutions. Summary of the invention
[0005] The purpose of the present invention is to provide an encryption method based on chemical process flow images to solve the problem that chemical images are easily stolen or tampered with during transmission, thereby affecting the privacy security of enterprises.
[0006] The purpose of the present invention can be achieved through the following technical solutions: An encryption method based on chemical process flow images. When facing hacker intrusion in the data transmission part, a complete network security defense system is built, active early warning response, and the image encryption algorithm function is automatically turned on to encrypt and transmit the plaintext image. After the R&D workshop obtains the process flow chart, data processing and decryption are performed. When an abnormal situation is found, the computer control room will intervene manually in time, take vulnerability alarms, respond, and perform firewall maintenance in time. In terms of technical algorithms, based on the idea of selective encryption, the Sobel operator is first used for edge detection, and the image binarization is used to separate the results after edge detection. Finally, the separated position data is embedded into the input of the encryption algorithm. The chaotic system Lorenz is used to generate chaotic sequences and deep learning is used to process the generated chaotic sequences, and the image pixels are scrambled and diffused using DNA coding to obtain the final encrypted image.
[0007] The above encryption method based on chemical process flow image includes the following steps: Step 1: In the data transmission part, select the N×N image as the original plaintext image, extract the ROI area, and use the Sobel operator to generate the image after edge detection. Binarize the image after edge detection, set a suitable threshold, set pixels greater than the threshold to 1, and set pixels less than or equal to the threshold to 0. It can distinguish whether it is an ROI area according to the different thresholds, so as to separate and process the pixels of the area of interest in the image and successfully extract the ROI area. The Sobel operator is a commonly used edge detection operator, which is a combination of Gaussian smoothing and differential operation. It has strong anti-noise ability and high practical application efficiency. The second step is to use the hyperchaotic Lorenz system and the core SHA-256 function of the key generator to calculate the initial key of the original image P, and process the key, dividing it into groups of 8 bits each to obtain a 32-bit segmented key stream. , and calculate the initial value of the chaotic system state And generate a pseudo-random sequence for diffusion ; The third step is to use the fourth-order Runge-Kutta method to perform a four-step piecewise approximation on the differential equation within a certain solution time interval to obtain characteristics with higher calculation accuracy. The initial key obtained in the second step is discretized and iteratively processed to obtain a new key sequence for image training, scrambling and diffusion. , , , , its discretization equation is: ; Step 4: Set the parameters of LSTM to process the preprocessed sequence , , , Conduct training, and cut off part of its length l for deep learning, and finally obtain the new pseudo-random sequence X, Y, Z, W for scrambling and diffusion, thereby solving the problem of low sequence complexity; Step 5: Encrypt the selected ROI area, use ROI replacement, cut and merge the coordinate position of the identified encrypted target area with the original image, and obtain an encrypted image that only shows the ROI area. Use the above processed sequence to encrypt the plaintext image, use the traditional scrambling diffusion principle, and use the DNA coding rule to encrypt the image. Encode each block of the plaintext image according to the DNA coding rule, and its rule is determined by the sequence X to obtain the matrix , encode the plaintext image according to Y, and get the scrambled matrix ; The coded blocks are coded according to the rules of sequence Z and Perform DNA calculations to obtain an encrypted matrix ; Finally, use W to Perform DNA decoding and merge each block to obtain the final encrypted image ; Step 6. When the chemical image is transmitted to the R&D workshop, it needs to be decrypted in time for the staff to use. Matrix transformation is used to decompose it into a binary image. The image is decrypted and reverse scrambled using DNA coding to obtain the plaintext image P.
[0008] The beneficial effects of the present invention are: The present invention provides an encryption method based on a chemical process image, which uses an edge detection method to perform edge detection on an image, and is combined with a chaotic system to better identify and hide information in the image. By utilizing the data processing advantages of a long short-term memory neural network LSTM, the generated data sequence is processed to generate a new chaotic signal, which has the characteristics of unpredictability and a large key space. At the same time, a scrambling-diffusion system is used to encrypt the plaintext image, which increases the complexity of the algorithm. The algorithm is used in the process transmission part of a chemical enterprise, and a complete network security defense system is constructed when facing hacker intrusion, an active alarm response is made, and the image encryption algorithm function is automatically turned on. After being transmitted to the R&D workshop, lossless data decryption can be performed, which better protects the process flow of the chemical enterprise from being leaked, and has a high use value in terms of confidentiality.
[0009] The present invention has the following innovative features: (1) It is proposed to use the Sobel operator to detect the edge of the plaintext image, use the image binarization processing to diffuse the image after edge detection, and separate the results, and use the recognition position information as new input data to solve the problem of large data volume during transmission; (2) Based on the current status of image encryption, this paper proposes to build an image privacy encryption model for chemical enterprises by combining edge detection and deep learning encryption algorithm; (3) Deep learning networks are used in encryption algorithms to process the generated chaotic sequences and increase the complexity of the sequences. DNA coding is added during the scrambling process, which can effectively scramble the image pixels and improve the security of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 Chemical enterprise process encryption flow chart Figure 2 Image encryption flow chart Figure 3 Plaintext image Figure 4 Sobel detection image during encryption Figure 5 Binarization of images during encryption Figure 6 ROI ciphertext image Figure 7 Cipher Image Figure 8 Decrypting the image DETAILED DESCRIPTION
[0011] In order to make the purpose, technical solutions and advantages of the invention more clearly explained, the embodiments of the invention are further described in detail below with reference to the accompanying drawings.
[0012] An encryption method based on a chemical process flow image, comprising: Step 1: Encrypt the process flow of chemical enterprises, which includes the transmission part of the process flow, the data return part, and the data processing part. Figure 1 The figure shows the process flow chart of a chemical enterprise. In the transmission part, an N×N image is selected as the original plaintext image, and the ROI region is extracted. The Sobel operator is used to convolve the image in the horizontal and vertical directions to generate an image after edge detection. Figure 4 , and edge diffusion is performed through binarization. The processed image is Figure 5 The Sobel operator is a commonly used edge detection operator. It is a combination of Gaussian smoothing and differential operation. It takes the plaintext image P as input and uses the essence of gradient calculation to calculate the weighted difference of the grayscale values of the upper, lower, left and right adjacent pixels. According to formula (6-8) and The approximate gradient can be calculated ; ; ; .
[0013] Step 2: Use the chaotic sequence to generate the subsequent chaotic sequence, and use the hyperchaotic Lorenz system. The Lorenz chaotic system is a three-dimensional nonlinear ordinary differential equation system, which is composed of three coupled nonlinear differential equations. It has good chaotic characteristics and initial value sensitivity, and is often used as a classic pseudo-random number generator in the field of image encryption. The definition of the hyperchaotic Lorenz system is as follows: ; in, , , , represents the chaotic state of the system, a, b, c and r are the control parameters of the system, when the control parameters satisfy a=10, b=8 / 3, c=28, and When , the system is in a hyper-chaotic state, calculate the initial value of the chaotic system state .
[0014] Step 3: Preprocess the chaotic sequence to eliminate the transient effect of the sequence. The initial value generated in step 2 is discretized and iterated. The discretization equation is: ; Among them, the next value The current value Add time interval and an estimated slope product. is the slope of the starting time period, , is the slope at the midpoint of the time period, is the slope of the end point. The Lorenz chaotic system is discretized using RK4 and iterated T+MN times, the first T times are discarded, the transient effect is eliminated to increase security, and four new sequences of image training, scrambling and diffusion are obtained. , , , ; The key associated with the plaintext is obtained by the following formula , generates a pseudo-random sequence for subsequent diffusion ; .
[0015] Step 4: By setting parameters, the sequence obtained in step 3 , , , , put it into the LSTM model for training, and finally the 4 new pseudo-random sequences X, Y, Z, W after training are trained, thus solving the problem of low sequence complexity. The LSTM model adds three logical control units, namely input threshold, output threshold, and forget threshold, to the structure of the RNN model, and each is connected to a multiplication element. At time t, the LSTM definition formula is: ; ; ; ; ; ; in, , , , They represent forget gate, input gate, output gate and memory unit respectively. They represent the recursive connection weights of the corresponding thresholds, and Represents two activation functions.
[0016] Step 5. Use the above processed sequence to encrypt the plaintext image, use the traditional scrambling diffusion principle, and use the DNA coding rule to encrypt the image to obtain an encrypted image of the N×N image. In the computer system, the complementary pairing rule is similar to the pairing rule of binary coding 0 and 1, so the four types of deoxynucleotides can be represented by two binary numbers. According to the DNA coding rules, the 8 coding rules in Table 1 can be selected. Each pixel of the grayscale image can be represented by 8-bit binary numbers 0 and 1. Each pixel value can be represented by a DNA sequence of length 4. For example, the decimal number 245 can be represented by binary as 11110101, and can be converted into the DNA sequence GGAA according to DNA coding rule 3. Encode each block of the original image P according to the rules in Table 1. The coding rule is determined by the pseudo-random sequence X, and the matrix is obtained. , encode the plaintext image according to Y, and get the scrambled matrix ; The coded blocks are coded according to the rules of sequence Z and Perform DNA calculations to obtain an encrypted matrix ; Finally, use W to Perform DNA decoding and merge each block to obtain the final encrypted image , Figure 2 Encryption flow chart for specific images; Table 1 DNA coding rules Base Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6 Rule 7 Rule 8 A 00 00 01 01 10 10 11 11 T 11 11 10 10 01 01 00 00 C 01 10 00 11 00 11 01 10 G 10 01 11 00 11 00 10 01 Table 2 DNA addition and subtraction rules + A T C G - A T C G A A T C G A A T C G T T A G C T T T A C C C G A T C C C G T G G C T A G G G C A .
[0017] Step 6: Encrypt the selected ROI area, use ROI replacement, cut and merge the coordinate position of the identified encrypted target area with the original image, and obtain an encrypted image that only shows the ROI area. Figure 6 ; Perform matrix transformation on the N×N image, decompose it into a binary image, decrypt the image, use DNA coding to reverse scramble, and obtain the plaintext image P, such as Figure 7 , Figure 8 As shown in the figure, this is the encryption and decryption effect diagram of the complete image of a chemical enterprise. It can be seen that the encrypted image has completely lost the information of the original image, and the attacker cannot obtain useful information from the image. It is sufficient to resist common attack methods such as differential attacks and brute force attacks. The algorithm has a good encryption effect.
[0018] The above is a detailed introduction to an encryption method based on a chemical process flow image provided by the present invention. The description of the specific embodiment is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. An encryption method based on chemical process flow images, characterized in that: Encrypting and decrypting images includes the following steps: Step 1: Use the Sobel operator to perform edge detection on the plaintext image to obtain the image after edge detection, use the image binarization processing to perform diffusion processing on the image after edge detection to obtain the image after binarization processing, and separate the results, and use the recognition position information as new input data; Step 2: Use the chaotic system to generate a chaotic sequence and set the initial key ; Step 3: discretize and iterate the sequence obtained in step 2 to generate a sequence for subsequent image training and scrambling; Step 4: Put the sequence obtained in step 3 into the LSTM model for training to solve the problem of low sequence complexity; Step 5: Use DNA coding to scramble the plaintext image, use the scrambled sequence generated in step 4, select appropriate DNA coding and DNA operation methods, scramble the pixels of the image, and obtain an encrypted image of the N×N image; Step 6: Replace the ROI area identified by binarization in step 1 with the encrypted ROI area so that the image only displays the processed image. Perform matrix transformation on the N×N image to decompose it into the binary processed image. Decrypt the image and use DNA coding to inversely scramble it to obtain the plaintext image P.
2. The encryption method based on chemical process flow image according to claim 1 is characterized in that: The Sobel operator is used to convolve the image in the horizontal and vertical directions, and an image after edge detection is generated, and the image is diffused using binarization processing, wherein: the Sobel operator described in step 1 is a commonly used edge detection operator, which is a combination of Gaussian smoothing and differential operations. It takes the plaintext image P as input, and uses the essence of gradient calculation to calculate the weighted difference of the grayscale values adjacent to the upper, lower, left and right pixels.
3. According to the encryption method based on chemical process flow image described in claim 2, it is characterized in that: The chaotic system is used to generate the subsequent chaotic sequence, where: the chaotic system described in step 2 uses the Lorenz chaotic system, which overcomes the problems of small parameter interval and uneven sequence distribution of the traditional Logistic mapping, and uses the key sequence generator to calculate the initial value of the chaotic system using (1-4) ; ; ; ; 。 4. According to the encryption method based on chemical process flow image described in claim 3, it is characterized in that: The chaotic sequence is preprocessed, discretized and iterated to avoid the transient effect of the sequence. The fourth-order Runge-Kutta method is used to solve the differential. Within a certain solution time interval, the differential equation is approximated in four steps to obtain higher calculation accuracy. The discretization equation is: ; At the same time, use formula (5) to generate the key related to the plaintext , which can generate pseudo-random sequences for subsequent diffusion ; 。 5. According to the encryption method based on chemical process flow image described in claim 4, it is characterized in that: The LSTM model is used for training, wherein: the LSTM model can intercept the pseudo-random sequence processed in step 3 by setting parameters. , , , Set the initial learning rate and the learning rate reduction factor to obtain the 4 new pseudo-random sequences X, Y, Z, and W after the final training.
6. The encryption method based on chemical process flow image according to claim 5 is characterized in that: Use the processed sequence to encrypt the plaintext image, using the traditional scrambling diffusion principle, where: mainly use the DNA coding rule to scramble the image, and generate the key obtained in the key generation stage , perform diffusion processing in the following way to obtain a new image. Used for diffusion, it is a diffusion processing method based on XOR operation. Represents the plaintext image pixel value, Represents a new image; ; 。 7. The encryption method based on chemical process flow image according to claim 6 is characterized in that: Only the processed ROI area is displayed, and the image is decrypted using DNA inverse scrambling, where: ROI replacement is the process of cutting and merging the coordinate position of the identified encrypted target area with the original image; DNA is a coding method that can scramble the row and column pixels of an image according to different rules and arrangement orders. It is composed of four deoxynucleotides, among which the four base pairs are complementary to each other, A and T are complementary, and G and C are complementary. At the same time, according to the pairing rules of binary coding 0 and 1, a total of 8 coding rules are generated. In the use of DNA coding, there are DNA addition, subtraction and XOR operations.
