Image diffusion method based on matryoshka and differential encoding

CN117278691BActive Publication Date: 2026-10-20CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311412561.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2026-10-20
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

[0004]本发明的目的:针对目前图像扩散方法扩散不充分,扩散效率低等问题,提出了一种基于俄罗斯套娃和差分编码的图像扩散方法

Benefits of technology

[0007]有益效果:本发明针对现有的图像扩散方法加密效率低或安全性弱等缺点,提出了一种基于俄罗斯套娃和差分编码的图像扩散方法。主要贡献为:(1)将图像像素值转换为二进制,构造成俄罗斯套娃;(2)依次对每层俄罗斯套娃的六个面差分编码,操作简单且扩散效果好;(3)结合俄罗斯套娃结构,提出了一种基于俄罗斯套娃和差分编码的图像扩散方法,该方法安全性强且高效,扩散效果良好,可实现图像信息的网络传输和存储安全。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278691B_ABST
    Figure CN117278691B_ABST
Patent Text Reader

Abstract

The application discloses a doll-based and differential coding image diffusion method, and belongs to the field of information encryption. With the rapid development of current network technology, network information transmission security problems are increasingly serious. In order to solve the network transmission and storage security problems of image content, the application provides a doll-based and differential coding image diffusion method. First, the plaintext image is converted into binary and constructed into a Russian doll; second, six faces of each layer of the Russian doll are converted into one-dimensional vectors for differential coding in sequence to generate a diffusion image; and finally, the experimental results show that the method has strong security, good diffusion effect and high efficiency, and can guarantee that image information is not stolen in the network transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This method relates to an information encryption technique, and in particular to an image diffusion method. Background Technology

[0002] With the rapid development of internet technology, images are gradually becoming an important information carrier in social communication. They are characterized by their intuitiveness, vividness, and large information content, and are widely used in fields such as communications, military, and medicine. However, due to the openness of network platforms, solving the problem of image information leakage and decryption during transmission has become a significant challenge. Therefore, to prevent images from being accessed without authorization or maliciously attacked, leading to information leakage, researching secure and efficient image encryption methods is particularly important.

[0003] To protect the security of image transmission and storage over networks, an image diffusion method based on the Russian nesting doll structure and differential coding is proposed. This method constructs the plaintext image into a Russian nesting doll shape, then sequentially converts the six faces of each layer of the doll into one-dimensional vectors for differential coding, fully diffusing the plaintext image. This lays the foundation for further image encryption and improves the security and efficiency of image diffusion. Summary of the Invention

[0004] The purpose of this invention is to address the problems of insufficient diffusion and low diffusion efficiency in current image diffusion methods by proposing an image diffusion method based on Russian nesting dolls and differential coding.

[0005] The technical solution of this invention: To achieve the above-mentioned objective, the technical solution adopted is an image diffusion method based on Russian nesting dolls and differential coding, where the sender is Alice and the receiver is Bob; Alice's diffusion steps are detailed below: Step 1: Constructing a Russian nesting doll: Let the original image be... I 1 Its size is m × n Using formula (1) I 1 Each decimal pixel value is converted to an 8-bit binary value, resulting in I 2 ; I 2 = dec2bin ( I 1 , 8), (1) in, dec2bin (·) is the decimal to binary conversion function; then use formula (2) to convert... I 2 Construct into a size of w ×v × h 3D matrix E 1 ,Bundle E 1 Imagine them as Russian nesting dolls composed of the numbers 0 and 1; E 1 = reshape ( I 2 , w , v , h ), (2) in, reshape (·) is the matrix dimension reconstruction function; Step 2: Calculate the number of layers in a Russian nesting doll: E 1 The outermost layer, consisting of six faces made up of the numbers 0 and 1, is called the first layer of a Russian nesting doll. R 1 , E 1 The outermost layer, consisting of six faces with values ​​of 0 and 1, is called the second layer of a Russian nesting doll. R 2 ..., progressing step by step, until... E 1 The innermost layer R g The first one known as the Russian nesting doll g Layers; the total number of layers in a Russian nesting doll g for: g = floor ( min ( w , v , h )÷2), (3) in, floor (·) is the floor function. min (·) is the minimum value function; Step 3: Generate chaotic sequences: The Logistic mapping is defined as: x n+1 = u × x n ×(1- x n ), (4) Among them, the iteration value x n ∈(0, 1), control parameters u ∈(3.57, 4]; Randomly select the control parameters for the Logistic mapping.u and initial value x 0, iterate formula (4) 1000+ times w × v × h After discarding the first 1000 iterations, a length of [length missing] is obtained. w × v × h chaotic sequence X ; Step 4: Integerization of the chaotic sequence: Using formula (5) to convert the chaotic sequence into integers. X Convert to a length of w × v × h Integer chaotic sequence Y ; Y = round ( X ), (5) in, round (·) is the rounding function that takes the nearest integer. Step 5: Segment the chaotic sequence: Segment the chaotic sequence Y Divided into g The subsequences are as follows: Y 1 , Y 2 , …, Y g ,forward g -1 length of subsequence l i The length of the last subsequence is calculated using formula (6). l g Calculated using formula (7); l i =(( w -2× i +2)×( v -2× i +2)+( h -2× i )×( v -2× i +2)+( h -2× i )×( v -2× i ))×2, (6) in, i =1, 2, …, g ; l g =(( w -2×g +2)×( v -2× g +2))×2; (7) Step 6: Differential coding: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] R 1 , R 2 , …, R g Convert the numerical value to g There are n one-dimensional vectors, namely: V 1 , V 2 ,…, V g Using formula (8) to sequentially V 1 , V 2 , …, V g By performing differential encoding, we can obtain g A one-dimensional vector after differential encoding S 1 , S 2 , …, S g And sequentially form a size of w × v × h Russian nesting dolls E 2 ; s i j = s i j-1 ⊕ v i j ⊕ y i j , (8) in, i =1, 2, …, g ; j =2, 3, …, l i , s i j ∈ S i , v i j ∈ V i , yi j ∈ Y i ⊕ is the XOR operator; Step 7: Generate diffusion image: Use formula (9) to... E 2 Converting to decimal, we get a number of size . w × v × h Decimal three-dimensional matrix E 3 Then use formula (10) to... E 3 Convert to a picture of size m × n Image E 4 This is a diffusion image. E 3 = bin2dec ( E 2 ), (9) E 4 = reshape ( E 3 , m , n ), (10) in, bin2dec (·) is the binary to decimal conversion function.

[0006] During the decryption process, the same chaotic sequence is used to analyze the diffusion image. E 4 By performing the operation, the original image can be recovered. I 1 Bob's decryption process is the reverse of Alice's diffusion process.

[0007] Beneficial effects: This invention addresses the shortcomings of existing image diffusion methods, such as low encryption efficiency or weak security, by proposing an image diffusion method based on Russian nesting dolls and differential coding. The main contributions are: (1) converting image pixel values ​​into binary to construct Russian nesting dolls; (2) performing differential coding on the six faces of each layer of Russian nesting dolls sequentially, which is simple to operate and has a good diffusion effect; (3) combining the Russian nesting doll structure, proposing an image diffusion method based on Russian nesting dolls and differential coding, which is highly secure and efficient, has a good diffusion effect, and can realize the network transmission and storage security of image information. Attached Figure Description

[0008] Figure 1 Diffusion flowchart; Figure 2 Original image; Figure 3 : Diffusion image. Detailed Implementation

[0009] The implementation process of the present invention will be further described in detail below with reference to specific accompanying drawings and examples.

[0010] Figure 1 This is the diffusion flowchart of this method.

[0011] The programming software used was Matlab R2022b, and the 512×512 Peppers grayscale image shown in Figure 2 was selected as the original image. The proposed image diffusion method based on Russian nesting dolls and differential coding was employed, and Alice details the diffusion process of the original image below.

[0012] Step 1: Constructing a Russian nesting doll: Let the original image be... I 1 Its size is 512×512, and it is calculated using formula (1). I 1 Each decimal pixel value is converted to an 8-bit binary value, resulting in I 2 ;In formula (2) w The value is 512. v The value is 512. h The value is 8. I 2 Construct a three-dimensional matrix of size 512×512×8. E 1 ,Bundle E 1 Imagine it as a Russian nesting doll composed of the numbers 0 and 1.

[0013] Step 2: Calculate the number of layers of the Russian nesting doll: The total number of layers of the Russian nesting doll can be calculated using formula (3). g It is 4; E 1 The outermost layer, consisting of six faces made up of the numbers 0 and 1, is called the first layer of a Russian nesting doll. R 1 , E 1 The outermost layer, consisting of six faces with values ​​of 0 and 1, is called the second layer of a Russian nesting doll. R 2 ..., progressing step by step, until... E 1 The innermost layer R 4 This is the fourth layer of what is known as a Russian nesting doll.

[0014] Step 3: Generate a chaotic sequence: Randomly select an initial value of 0.3967 and a control parameter of 3.9802, and iterate according to formula (4) for 1000 + 2097152 iterations. Discard the first 1000 iterations to obtain a chaotic sequence of length 2097152. X .

[0015] Step 4: Integerization of the chaotic sequence: Using formula (5) to convert the chaotic sequence into integers. X Convert to a chaotic sequence of integers of length 2097152 Y .

[0016] Step 5: Segment the chaotic sequence: Segment the chaotic sequence Y Divided into 4 subsequences, respectively Y 1 , Y 2 , …, Y 4 The lengths of the first three subsequences are calculated using formula (6), and the length of the last subsequence is calculated using formula (7).

[0017] Step 6: Differential coding: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] R 1 , R 2 , …, R 4 The numerical values ​​are converted into four one-dimensional vectors, which are: V 1 , V 2 ,…, V 4 Using formula (8) to sequentially V 1 , V 2 , …, V 4 Differential encoding yields four differentially encoded one-dimensional vectors. S 1 , S 2 , …, S 4 They are arranged in sequence to form a Russian nesting doll with a size of 2,097,152. E 2 .

[0018] Step 7: Generate encrypted image: Use formula (9) to... E 2 Converting to decimal, we get a three-dimensional decimal matrix of size 512×512×8. E 3 Then use formula (10) to... E3 Convert to a 512×512 image E 4 This is a diffusion image, such as Figure 3 As shown.

[0019] During the decryption process, the same chaotic sequence is used to manipulate the diffused image to obtain the original image, such as... Figure 2 As shown, Bob's decryption process is the reverse of Alice's diffusion process.

Claims

1. An image diffusion method based on Russian nesting dolls and differential coding, characterized in that, The diffusion process includes the following steps: Step 1: Constructing a Russian nesting doll: Let the original image be... I 1 Its size is m × n Using formula (1) I 1 Each decimal pixel value is converted to an 8-bit binary value, resulting in I 2 ; I 2 = dec2bin ( I 1 ,8), (1) in, dec2bin (·) is the decimal to binary conversion function; then use formula (2) to convert... I 2 Construct into a size of w × v × h 3D matrix E 1 ,Bundle E 1 Imagine them as Russian nesting dolls composed of the numbers 0 and 1; E 1 = reshape ( I 2 , w , v , h ), (2) in, reshape (·) is the matrix dimension reconstruction function; Step 2: Calculate the number of layers in a Russian nesting doll: E 1 The outermost layer, consisting of six faces made up of the numbers 0 and 1, is called the first layer of a Russian nesting doll. R 1 , E 1 The outermost layer, consisting of six faces with values ​​of 0 and 1, is called the second layer of a Russian nesting doll. R 2 ..., progressing step by step, until... E 1 The innermost layer R g The first one known as the Russian nesting doll g Layers; the total number of layers in a Russian nesting doll g for: g = floor ( min ( w , v , h )÷2), (3) in, floor (·) is the floor function. min (·) is the minimum value function; Step 3: Generate chaotic sequences: The Logistic mapping is defined as: x n+1 = u × x n ×(1- x n ), (4) Among them, the iteration value x n ∈(0,1), control parameters u ∈(3.57,4]; Randomly select the control parameters for the Logistic mapping. u and initial value x 0, iterate formula (4) 1000+ times w × v × h After discarding the first 1000 iterations, a length of [length missing] is obtained. w × v × h chaotic sequence X ; Step 4: Integerization of the chaotic sequence: Using formula (5) to convert the chaotic sequence into integers. X Convert to a length of w × v × h Integer chaotic sequence Y ; Y = round ( X ), (5) in, round (·) is the rounding function that takes the nearest integer. Step 5: Segment the chaotic sequence: Segment the chaotic sequence Y Divided into g The subsequences are as follows: Y 1 , Y 2 ,…, Y g ,forward g -1 length of subsequence l i The length of the last subsequence is calculated using formula (6). l g Calculated using formula (7); l i =(( w -2× i +2)×( v -2× i +2)+( h -2× i )×( v -2× i +2)+( h -2× i )×( v -2× i ))×2,(6) in, i =1,2,…, g ; l g =(( w -2× g +2)×( v -2× g +2))×2; (7) Step 6: Differential coding: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] R 1 , R 2 ,…, R g Convert the numerical value to g There are n one-dimensional vectors, namely: V 1 , V 2 ,…, V g Using formula (8) to sequentially V 1 , V 2 ,…, V g By performing differential encoding, we can obtain g A one-dimensional vector after differential encoding S 1 , S 2 ,…, S g And sequentially form a size of w × v × h Russian nesting dolls E 2 ; s i j = s i j-1 ⊕ v i j ⊕ y i j , (8) in, i =1,2,…, g ; j =2,3,…, l i , s i j ∈ S i , v i j ∈ V i , y i j ∈ Y i ⊕ is the XOR operator; Step 7: Generate diffusion image: Use formula (9) to... E 2 Converting to decimal, we get a number of size . w × v × h Decimal three-dimensional matrix E 3 Then use formula (10) to... E 3 Convert to a picture of size m × n Image E 4 This is a diffusion image. E 3 = bin2dec ( E 2 ), (9) E 4 = reshape ( E 3 , m , n ), (10) in, bin2dec (·) is the binary to decimal conversion function.