Robust two-dimensional code steganography method based on attention flow model

Through the robust QR code steganography method based on the attention flow model, the problem of insufficient anti-interference performance of steganography images in the prior art is solved, high-precision steganography and decoding are realized, and strong robustness is shown in practical applications.

CN119940388APending Publication Date: 2025-05-06EAST CHINA NORMAL UNIV

Patent Information

Application Number
CN202411954131.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art is difficult to achieve anti-interference performance while ensuring the quality of steganographic image and image decoding quality. Especially in the steganographic code, it is necessary to ensure that it can be recognized by the device after decoding, which increases the difficulty of steganographic and decoding.

Method used

A robust QR code steganography method based on attention flow model is adopted, and the carrier diagram and QR code training data set are constructed, the images are transformed and serialized using convolutional flow model and coding network, and feature distribution fitting is performed in combination with attention flow model, and finally steganography images with small visual differences from the carrier image.

Benefits of technology

It achieves better steganography and decoding accuracy, can resist various real-world image interference, and enhances ease of use in scenarios such as copyright protection and data traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940388A_ABST
    Figure CN119940388A_ABST
Patent Text Reader

Abstract

The invention discloses a robust two-dimensional code steganography method based on an attention flow model, and particularly relates to the technical field of image super-resolution. According to the method, a carrier image and a two-dimensional code image are used as input, and a steganographic image which is very small in visual difference with the carrier image is obtained. The hidden two-dimensional code can be obtained by decoding the steganographic image, and the recovered two-dimensional code image can be identified and original information can be restored. According to the method, steganography and decoding processes are simultaneously realized through a neural network based on an attention flow model. According to the method, the steganography can be allowed to bear image interference such as noise, image quality compression, printing and photographing on the premise of ensuring that the recovered two-dimensional code can be identified. The steganography model based on the attention mechanism is realized, and explicit visual loss caused by steganography can be effectively reduced. The method can be applied to actual application scenes such as copyright protection and encryption communication, and has relatively high calculation efficiency and anti-interference performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image steganography and regularized flow model intersection technology, and specifically to a robust two-dimensional code steganography method based on an attention flow model. Background Art

[0002] In the fields of copyright protection, information steganography is very useful. Currently, the copyright protection of many pictures on the Internet is not strict enough, and some authors' works may be stolen, which will harm the authors' intellectual property rights; in addition, the current images generated by artificial intelligence also lack protection mechanisms, and some works are easily used illegally. If information such as copyright can be added to the image by steganography, it will be helpful in the fields of copyright protection and information traceability. The present invention introduces a technology that encodes information through a QR code and embeds the QR code into the image through image steganography technology. The technology can embed the user-specified data under the premise of ensuring that the original image is not distorted. The technology supports robust steganography, that is, the obtained steganographic image can resist various real-world image interferences, such as JPEG compression, printing, and taking pictures, while ensuring that the embedded QR code can be decoded and recognized. The technology can be applied to a variety of practical application scenarios such as copyright protection and data traceability.

[0003] At present, image steganography technology mainly adopts spatial domain, frequency domain transformation and neural network methods. However, most of these methods cannot achieve anti-interference performance under the premise of ensuring the quality of stego-image and image decoding. In addition, most of these methods are aimed at natural image steganography rather than QR code steganography, and the QR code image needs to be successfully recognized by the camera of mobile phones and other devices after decoding, which increases the difficulty of steganography and decoding tasks. Based on the above content, the present invention proposes a robust QR code steganography method based on the attention flow model. Summary of the invention

[0004] The purpose of the present invention is to propose a robust two-dimensional code steganography method based on an attention flow model to solve the problems raised in the background technology.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A robust QR code steganography method based on attention flow model, including the following contents:

[0007] S1. Construct a vector image and a QR code training dataset, and select a vector image I from the dataset. c and a secret QR code image I with the same size as the carrier image s , input it into the QR code steganographic network;

[0008] S2. Use the convolutional flow model to input the carrier image Ic and secret QR code image I s Transform and obtain c The QR code image after the transformation of image semantic information I s ';

[0009] S3, use two encoding networks to encode the carrier image I c And the transformed QR code I s 'Sequence them separately to get two sets of sequence representations T c and T s ;

[0010] S4, the sequence of carrier images obtained in S3 is represented by T c and the sequence representation T of the secret QR code image s Input the attention flow model to obtain the QR code steganographic image I steg .

[0011] Preferably, the two-dimensional code steganographic image I steg Decoding and hidden information acquisition, including the following:

[0012] S5, the stego-image I obtained in S4 steg Perform adversarial training and then perform stego-image I steg Perform simulated noise superposition to simulate image interference in the real world, and then obtain the interfered steganographic image I steg ';

[0013] S6, the steganographic image I after being disturbed steg 'Input the two encoding networks used in S3 and perform the reverse calculation process to obtain the restored two-dimensional code image I s-rec .

[0014] Preferably, the carrier image training dataset adopts the train2017 dataset in the open source dataset COCO, which includes 110,000 natural images; the QR code training dataset is constructed using the ISO / IEC 18004 standard, and includes 50,000 QR code images that encode random information.

[0015] Preferably, S2 specifically includes the following contents:

[0016] S2.1, the convolutional flow model includes n affine transformation layers, each layer uses 3 DenseNet modules to learn the feature transformation equation, and each DenseNet module extracts features through 5 layers of residual convolution;

[0017] S2.2, the i-th affine transformation layer divides the two sets of input image features, a total of 6 channels, into two sets of 3-channel features and They correspond to the carrier image channel and the secret image channel respectively, and are transformed by the following equations:

[0018]

[0019] Among them, φ(·), ρ(·), η(·) represent three DenseNet modules respectively; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product;

[0020] S2.3, the transformed S2.2 and Merge as the input of the i+1th affine transformation layer, and so on, to get and in, As the transformed two-dimensional code image I s '.

[0021] Preferably, the two-dimensional code image I s The reverse decoding process of ' includes the following:

[0022] Reversely traverse the n affine transformation layers of the convolutional flow model and obtain the restored QR code image through the inverse calculation process of equations (1) and (2):

[0023]

[0024]

[0025] Based on the above, we finally get This is the restored QR code image I s-rec .

[0026] Preferably, S3 specifically includes the following contents:

[0027] S3.1. The first layer of the encoding network is a serialization based on linear mapping, which divides the image into multiple small blocks of size 16×16 pixels, and maps the pixels of each small block to the intermediate dimension dim through a fully connected network, obtaining a tensor of shape [batch, num_token, dim], where batch is the number of inputs of a single batch in batch training; num_token is the number of small blocks into which the image is divided;

[0028] S3.2. After the first layer of the encoding network is serialized, there are several transformer layers, each of which contains an attention layer and a fully connected layer, and transforms the input x according to the following equation:

[0029] q=W q (x); k = W k(x); v = W v (x) (5)

[0030]

[0031] x=FeedForward(x) (7)

[0032] Among them, W q , W k , W v represents three learnable parameter matrices; Softmax(·) represents a normalized exponential function; FeedForward(·) represents a fully connected network;

[0033] S3.3, after the encoding network in S3.1 and S3.2, the sequence representation T of the carrier image is obtained c and the sequence representation T of the secret QR code image s .

[0034] Preferably, the S4 specifically includes the following contents:

[0035] S4.1. The attention flow model includes t attention coupling layers. Each attention coupling layer uses three multi-head self-attention modules for feature extraction and a multi-head cross-attention module for feature superposition. The i-th attention coupling layer performs feature distribution fitting through the following equation:

[0036]

[0037] Among them, MSA 1~3 (·) and MCA(·) denote the multi-head self-attention and multi-head cross-attention modules, respectively; α i represents a learnable coefficient; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product;

[0038] S4.2. After t attention coupling layers, we get After a layer of full connection, it is deformed into the shape of the original image, that is, the final steganographic image I is obtained. steg .

[0039] Preferably, the stego-image I steg The reverse decoding process includes the following:

[0040] Traverse the attention coupling layer backwards and obtain T through the reverse calculation process of equations (8) and (9) c and T s ; Then recover the T c and T s Through the QR code image I s The reverse decoding process of 'recovers the restored two-dimensional code image Is-rec :

[0041]

[0042] Among them, MSA 1~3 (·) and MCA(·) denote the multi-head self-attention and multi-head cross-attention modules, respectively; α i represents a learnable coefficient; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product.

[0043] Preferably, the adversarial training in S5 is implemented based on a discriminator, the structure of the discriminator is a 4-layer downsampling convolution, and a GELU activation function is used; the adversarial training specifically includes the following contents: first, the stego image I generated by the network is steg and the original carrier image I c Input the discriminator and train it to distinguish the carrier image from the stego image. In this process, the gradient is only passed back to the discriminator, and the stego network is not trained. Then the stego image I steg Inputting the discriminator and training the steganalysis network can generate a steganalysis graph that cannot be recognized by the discriminator. In this process, the gradient is only passed back to the steganalysis network, and the discriminator is not trained.

[0044] Preferably, the simulated noise includes any one or more of Gaussian noise, Gaussian filtering, HUE shift, brightness shift, and contrast change; steg Perform simulated noise superposition to simulate image interference in the real world. Specifically, steg Perform simulated noise overlay to simulate image interference in the real world.

[0045] Preferably, a hybrid loss function is used to steganographic image I steg and the restored QR code image I s-rec Perform end-to-end optimization, including the following:

[0046] 1) For the stego-image I steg Optimize it to make it close to the carrier image I c :

[0047]

[0048] Among them, formula (12) and formula (13) are used to calculate the steganographic image I steg and carrier image I c The L1 error and structural similarity SSIM between them;

[0049] 2) Recover the secret QR code image I s-rec Optimize to make it close to the original QR code image I s :

[0050]

[0051] 4) For the stego-image I steg Perform adversarial optimization:

[0052]

[0053] Among them, D(·) represents the discriminator, l real and l fake Represent the labels of positive and negative samples respectively.

[0054] Compared with the prior art, the present invention provides a robust two-dimensional code steganography method based on the attention flow model, which has the following beneficial effects:

[0055] The present invention proposes a robust two-dimensional code steganography method based on the attention flow model. Compared with the prior art, it has better steganography and decoding accuracy, and can embed secret information in a variety of practical application scenarios such as copyright protection and data traceability. At the same time, the present invention realizes more robust steganography, and the steganographic graph can resist various real-world image interferences, enhancing its ease of use in practical use scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flowchart of the robust two-dimensional code steganography method based on the attention flow model proposed in Example 1 of the present invention;

[0057] Figure 2 This is a flowchart of the example processing mentioned in Example 3 of the present invention. DETAILED DESCRIPTION

[0058] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are described in further detail below.

[0059] Embodiment 1:

[0060] The present invention proposes a robust two-dimensional code steganography method based on an attention flow model. After a user inputs a carrier image and a two-dimensional code image encoding secret information, a convolutional flow model is used to transform the two-dimensional code image based on the characteristics of the carrier image, so that the transformed two-dimensional code image can be easily embedded in the carrier image while ensuring decoding accuracy. Afterwards, the carrier image and the transformed two-dimensional code image are converted into serialized representations through two encoding networks. Then, the serialized representation of the above image is fitted with feature distribution through an attention flow model based on multi-head self-attention and multi-head cross-attention modules, and finally a steganographic image with little visual difference from the carrier image is obtained. During the decoding process, the user can input the steganographic image after interference with the real-world image into the network for decoding, thereby obtaining the restored two-dimensional code, and then obtaining the hidden information by recognizing the two-dimensional code.

[0061] See also Figure 1 , this example embeds the information of the visualization image according to the following steps:

[0062] Step 1: Input a carrier image I c and secret QR code image I s ;

[0063] Step 2: Through the convolutional flow model, based on I c The characteristic pair I s Transform to obtain the transformed two-dimensional code image I s ';

[0064] Step 3: Use the encoding network to convert I c and I s 'Convert to sequence representation T c and T s ;

[0065] Step 4: The serialized representation of the two images is T c and T s Input the attention flow model to obtain the steganographic image I steg ;

[0066] Step 5: Steganographic Image I steg After various interferences (noise, printing and taking photos, etc.), the disturbed image I is obtained. steg ';

[0067] Step 6: The disturbed steganagram I steg 'Input the above two networks and perform the reverse calculation process to obtain the restored QR code image I s-rec .

[0068] Embodiment 2:

[0069] Based on Example 1, but different in that the robust two-dimensional code steganography method based on the attention flow model proposed in the present invention specifically includes the following contents:

[0070] Step 1) Input a vector image I of size h×w c , where h is the carrier image I c The number of pixels per vertical column, w is I c Number of pixels per horizontal row; also input a secret QR code image I with the same size as the carrier image s ;

[0071] Step 2) construct a vector map and a QR code training dataset, where the vector map dataset uses the train2017 dataset in the open source dataset COCO, which contains 110,000 natural images; the QR code dataset is constructed using the ISO / IEC 18004 standard to obtain 50,000 QR code images encoded with random information;

[0072] Step 3) Use the convolutional flow model to transform the input carrier image I c and secret QR code image I s Transform and obtain c The QR code image after the transformation of image semantic information I s ';

[0073] Step 3-1) The convolutional flow model contains n affine transformation layers, each layer uses 3 DenseNet modules to learn the feature transformation equation, and each DenseNet extracts features through 5 layers of residual convolution;

[0074] Step 3-2) The i-th affine transformation layer divides the two sets of input image features, a total of 6 channels, into two sets of 3-channel features and They correspond to the carrier image channel and the secret image channel respectively, and are transformed by the following equations:

[0075]

[0076] Step 3-3) In formula (1) and formula (2), φ(·), ρ(·), and η(·) represent the three DenseNet modules, exp(·) represents the natural logarithm function, and ⊙ represents the Hammond product. The above transformation yields and The merged value is used as the input of the i+1th affine transformation layer, and so on, and finally we get and in As the transformed QR code I s ';

[0077] Step 3-4) In the reverse process, the above affine transformation layer is traversed in reverse, and the recovered secret QR code image can be obtained by using the reverse calculation process of formulas (1) and (2):

[0078]

[0079] The final result That is the recovered secret QR code image I s-rec ;

[0080] Step 4) Use two encoding networks to encode the carrier image I c And the transformed QR code I s 'Sequence them separately to get two sets of sequence representations T c and T s ;

[0081] Step 4-1) The first layer of the encoding network is a serialization based on linear mapping. First, the encoding network divides the image into multiple small blocks of size 16×16 pixels, and maps the pixels of each small block to the intermediate dimension dim through a fully connected network, obtaining a tensor of shape [batch, num_token, dim], where batch is the number of inputs of a single batch in batch training, and num_token is the number of small blocks into which the image is divided;

[0082] Step 4-2) After the first layer of the encoding network is serialized, there are several transformer layers, each of which contains an attention layer and a fully connected layer, and transforms the input x according to the following equation:

[0083] q=W q (x); k = W k (x); v = W v (x) (5)

[0084]

[0085] x=FeedForward(x) (7)

[0086] Where W q , W k , W v are three learnable parameter matrices, Softmax(·) is a normalized exponential function, and FeedForward(·) represents a fully connected network;

[0087] Step 4-3) After the above encoding network, the sequence representation T of the carrier image is obtained c and the sequence representation T of the secret QR code image s ;

[0088] Step 5) The sequence representation of the carrier image and the secret QR code image is obtained, T c and T s Input the attention flow model to obtain the steganographic image I steg ;

[0089] Step 5-1) The above attention flow model contains t attention coupling layers. Each attention coupling layer uses 3 multi-head self-attention modules for feature extraction and a multi-head cross-attention module for feature superposition. The i-th attention coupling layer performs feature distribution fitting through the following equation:

[0090]

[0091] MSA in formula (8) and formula (9) 1~3 (·) and MCA(·) represent multi-head self-attention and multi-head cross-attention modules, respectively; α i represents a learnable coefficient, exp(·) represents the natural logarithm function, and ⊙ represents the Hammond product;

[0092] Step 5-2) After t attention coupling layers, we get After a layer of full connection, it is deformed into the shape of the original image to obtain the final steganographic image I steg ;

[0093] Step 5-3) In the reverse recovery process, the above attention coupling layer is traversed in reverse, and the recovered T is obtained by the reverse calculation process of formulas (8) and (9). c and T s , and then input the two into the reverse process in step 3) to get the recovered QR code:

[0094]

[0095] Step 6) Use a discriminator to analyze the stego image I obtained in step 5) steg Conduct adversarial training; the discriminator structure is 4 layers of downsampling convolution, using GELU activation function; during the training process, the steganographic image I generated by the network is first steg and the original carrier image I c Input the discriminator and train it to distinguish between the carrier image and the stego image. In this process, the gradient is only passed back to the discriminator, and the stego network is not trained. Then the stego image I steg Inputting the discriminator and training the steganalysis network can generate a steganalysis graph that cannot be recognized by the discriminator. In this process, the gradient is only passed back to the steganalysis network, and the discriminator is not trained;

[0096] Step 7) In the process of QR code image recovery, at the input stage, the steganographic image I generated by the network issteg Simulate noise superposition to simulate image interference in the real world; simulated noise includes Gaussian noise, Gaussian filtering, HUE offset, brightness offset, and contrast change; for each batch of training, a different noise combination is used, and each noise is assigned a random coefficient; in actual use, the user directly inputs the obtained image containing noise (printing, taking photos, image compression, etc.) into the network for decoding, and the restored QR code image can be obtained, thereby obtaining the hidden information in the image;

[0097] Step 8) The network is trained using end-to-end optimization and a hybrid loss function;

[0098] Step 8-1) For the stego-image I steg Optimize it to make it close to the carrier image I c :

[0099]

[0100] The above two formulas respectively calculate the stego-image I steg and carrier image I c L1 error and structural similarity (SSIM) between them;

[0101] Step 8-2) Recover the secret QR code image I s-rec Optimize to make it close to the original QR code image I s :

[0102]

[0103] Step 8-3) For the stego-image I steg Perform adversarial optimization:

[0104]

[0105] The above two formulas correspond to the two optimization objectives in step 6).

[0106] Embodiment 3:

[0107] Based on Example 1-2, but with the difference that, the present invention is further described in detail below by taking the embedding of a two-dimensional code into a carrier image as an example:

[0108] See also Figure 2 In this example, the following steps are used to embed a QR code into the carrier image:

[0109] Step 1) Input a vector image I of size h×w c , where h is the carrier image I c The number of pixels per vertical column, w is I cNumber of pixels per horizontal row; also input a secret QR code image I with the same size as the carrier image s ;

[0110] Step 2) Use the convolutional flow model to transform the input carrier image I c and secret QR code image I s Transform and obtain c The QR code image after the transformation of image semantic information I s '; The convolutional flow model contains several affine transformation layers, each layer uses 3 DenseNet modules to learn the feature transformation equation, and each DenseNet extracts features through 5 layers of residual convolution;

[0111] Step 3) Use two encoding networks to encode the carrier image I c And the transformed QR code I s 'Sequence them separately to get two sets of sequence representations T c and T s ; The first layer of the encoding network is a serialization based on linear mapping, followed by several layers of transformer layers, which realize feature extraction and serialization encoding through attention calculation and fully connected dimension mapping;

[0112] Step 4) The sequence representation of the carrier image and the secret QR code image is obtained, T c and T s Input the attention flow model to obtain the steganographic image I steg The attention flow model contains t attention coupling layers. Each attention coupling layer uses 3 multi-head self-attention modules for feature extraction and a multi-head cross-attention module for feature superposition. After several attention coupling layers, it is finally deformed into the shape of the original image after a full connection layer to obtain the final stego image I. steg ;

[0113] Step 5) In the process of QR code image recovery, at the input stage, the steganographic image I generated by the network is steg Simulate noise superposition to simulate image interference in the real world; simulated noise includes Gaussian noise, Gaussian filtering, HUE offset, brightness offset, and contrast change; for each batch of training, a different noise combination is used, and each noise is assigned a random coefficient; in actual use, the user directly inputs the obtained image containing noise (printing, taking photos, image compression, etc.) into the network for decoding, and the restored QR code image can be obtained, thereby obtaining the hidden information in the image;

[0114] Step 6) In the reverse recovery process, the above attention coupling layer is traversed in reverse, and the recovered T is obtained by using the reverse calculation process of formulas (8) and (9). c and Ts , and then input the two into the reverse process in step 3) to obtain the recovered QR code. The user can then identify the recovered QR code to recover the hidden information.

[0115] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A robust QR code steganography method based on an attention flow model, characterized in that: Includes the following: S1. Construct a vector image and a QR code training dataset, and select a vector image I from the dataset. c and a secret QR code image I with the same size as the carrier image s , input it into the QR code steganographic network; S2. Use the convolutional flow model to input the carrier image I c and secret QR code image I s Transform and obtain c The QR code image after the transformation of image semantic information I s '; S3, use two encoding networks to encode the carrier image I c And the transformed QR code I s 'Sequence them separately to get two sets of sequence representations T c and T s ; S4, the sequence of carrier images obtained in S3 is represented by T c and the sequence representation T of the secret QR code image s Input the attention flow model to obtain the QR code steganographic image I steg .

2. According to claim 1, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: Steganographic image of QR code I steg Decoding and hidden information acquisition, including the following: S5, the stego-image I obtained in S4 steg Perform adversarial training and then perform stego-image I steg Perform simulated noise superposition to simulate image interference in the real world, and then obtain the interfered steganographic image I steg '; S6, the steganographic image I after being disturbed steg 'Input the two encoding networks used in S3 and perform the reverse calculation process to obtain the restored QR code image I s-rec .

3. According to claim 1, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: The S2 specifically includes the following contents: S2.1, the convolutional flow model includes n affine transformation layers, each layer uses 3 DenseNet modules to learn the feature transformation equation, and each DenseNet module extracts features through 5 layers of residual convolution; S2.2, the i-th affine transformation layer divides the two sets of input image features, a total of 6 channels, into two sets of 3-channel features and They correspond to the carrier image channel and the secret image channel respectively, and are transformed by the following equations: Among them, φ(·), ρ(·), η(·) represent three DenseNet modules respectively; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product; S2.3, the transformed S2.2 and Merge as the input of the i+1th affine transformation layer, and so on, to get and in, As the transformed two-dimensional code image I s '.

4. According to claim 3, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: QR code image I s The reverse decoding process of ' includes the following: Reversely traverse the n affine transformation layers of the convolutional flow model and obtain the restored QR code image through the inverse calculation process of equations (1) and (2): Based on the above content, the final This is the restored QR code image I s-rec .

5. According to claim 1, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: The S3 specifically includes the following contents: S3.

1. The first layer of the encoding network is a serialization based on linear mapping, which divides the image into multiple small blocks of size 16×16 pixels, and maps the pixels of each small block to the intermediate dimension dim through a fully connected network, obtaining a tensor of shape [batch, num_token, dim], where batch is the number of inputs of a single batch in batch training; num_token is the number of small blocks into which the image is divided; S3.

2. After the first layer of the encoding network is serialized, there are several transformer layers, each of which contains an attention layer and a fully connected layer, and transforms the input x according to the following equation: q=W q (x);k=W k (x);v=W v (x) (5) x=FeedForward(x) (7) Among them, W q , W k , W v represents three learnable parameter matrices; Softmax(·) represents a normalized exponential function; FeedForward(·) represents a fully connected network; S3.3, after the encoding network in S3.1 and S3.2, the sequence representation T of the carrier image is obtained c and the sequence representation T of the secret QR code image s .

6. According to claim 1, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: The S4 specifically includes the following contents: S4.

1. The attention flow model includes t attention coupling layers. Each attention coupling layer uses three multi-head self-attention modules for feature extraction and a multi-head cross-attention module for feature superposition. The i-th attention coupling layer performs feature distribution fitting through the following equation: Among them, MSA 1~3 (·) and MCA(·) denote the multi-head self-attention and multi-head cross-attention modules, respectively; α i represents a learnable coefficient; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product; S4.

2. After t attention coupling layers, we get After a layer of full connection, it is deformed into the shape of the original image, that is, the final steganographic image I is obtained. steg .

7. A robust two-dimensional code steganography method based on an attention flow model according to claim 4 or 6, characterized in that: Steganographic Image I steg The reverse decoding process includes the following: Traverse the attention coupling layer backwards and obtain T through the reverse calculation process of equations (8) and (9) c and T s ; Then recover the T c and T s Through the QR code image I s The reverse decoding process of 'recovers the restored two-dimensional code image I s-rec : Among them, MSA 1~3 (·) and MCA(·) denote the multi-head self-attention and multi-head cross-attention modules, respectively; α i represents a learnable coefficient; exp(·) represents the natural logarithm function; ⊙ represents the Hammond product.

8. According to claim 2, a robust two-dimensional code steganography method based on an attention flow model is characterized in that: The adversarial training in S5 is implemented based on a discriminator, the structure of which is a 4-layer downsampling convolution and uses a GELU activation function; the adversarial training specifically includes the following contents: first, the stego image I generated by the network is steg and the original carrier image I c Input the discriminator and train it to distinguish between the carrier image and the stego image. In this process, the gradient is only passed back to the discriminator, and the stego network is not trained. Then the stego image I steg Inputting the discriminator and training the steganalysis network can generate a steganalysis graph that cannot be recognized by the discriminator. In this process, the gradient is only passed back to the steganalysis network, and the discriminator is not trained.

9. A robust two-dimensional code steganography method based on an attention flow model according to claim 2, characterized in that: The simulated noise includes any one or more of Gaussian noise, Gaussian filtering, HUE offset, brightness offset, and contrast change; steg Perform simulated noise superposition to simulate image interference in the real world. Specifically, steg Perform simulated noise overlay to simulate image interference in the real world.

10. A robust two-dimensional code steganography method based on an attention flow model according to claim 1 or 2, characterized in that: Use the hybrid loss function to steganographic image I steg and the restored QR code image I s-rec Perform end-to-end optimization, including the following: 1) For the stego-image I steg Optimize it to make it close to the carrier image I c : Among them, formula (12) and formula (13) are used to calculate the steganographic image I steg and carrier image I c The L1 error and structural similarity SSIM between them; 2) Recover the secret QR code image I s-rec Optimize to make it close to the original QR code image I s : 3) For the stego-image I steg Perform adversarial optimization: Among them, D(·) represents the discriminator, l real and l fake Represent the labels of positive samples and negative samples respectively.

Citation Information

Patent Citations

  • Transform-based image information hiding method

    CN117527983A

  • Image steganography method based on lightweight reversible neural network

    CN117788270A

Cited By

  • High-confidentiality scene confidentiality operation video security management method

    CN120378627A

  • Deep steganography image secret information blind extraction method based on self-supervised learning

    CN120543358A