A constructional information hiding method based on diffusion model and style transfer
By using a constructive information hiding method based on diffusion models and style transfer, high-quality dense images are generated and resistant to steganalysis. This solves the problem of insufficient quality and steganalysis resistance of dense images in existing technologies, and is applicable to fields such as privacy protection and secure communication, digital rights protection and traceability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-04-10
AI Technical Summary
Existing constructive information hiding algorithms generate dense images of insufficient quality and lack resistance to steganalysis.
A constructive information hiding method based on diffusion model and style transfer is adopted. By mapping secret information to content noise, a dense image is generated using diffusion model, and images of different styles are generated through style transfer to hide information.
The generated encrypted images are of high quality and can effectively resist steganalysis, providing a new approach to information hiding, and are applicable to fields such as privacy protection and secure communication, digital rights protection and traceability.
Smart Images

Figure CN121563756B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a diffusion model and style transfer based constructive information hiding method, belonging to the technical field of computer vision and information security. BACKGROUND
[0002] Information hiding is a technology of hiding secret information into a carrier image for covert transmission. Early information hiding hides secret images by modifying the carrier image, which may be detected by steganalysis algorithms.
[0003] However, the existing constructive information hiding algorithm has the following problems:
[0004] 1. The existing construction algorithm is insufficient, and the quality of the generated secret-containing image is insufficient;
[0005] 2. The existing hiding algorithm is insufficient, and the generated secret-containing image has insufficient steganalysis resistance. SUMMARY
[0006] The purpose of the present application is to overcome the shortcomings of the prior art. The principle of the constructive information hiding is to directly generate a secret-containing image according to the secret information. Since it does not need to modify the image, it can theoretically resist steganalysis, and a diffusion model and style transfer based constructive information hiding method is provided.
[0007] To achieve the above-mentioned purpose / To solve the above-mentioned technical problems, the present application adopts the following technical solutions:
[0008] A diffusion model and style transfer based constructive information hiding method, the method comprising:
[0009] Obtaining a style image;
[0010] Mapping the secret information to be hidden to content noise based on a preset mapping rule;
[0011] Using a diffusion model to denoise the content noise to obtain a content image, and then using the diffusion model to encode the content image to obtain content image attention features at each time step;
[0012] Using a diffusion model to encode the style image to obtain style noise and style image attention features at each time step;
[0013] Fusing the style noise and the content noise to generate an initial noise, denoising the initial noise by the diffusion model, and injecting the content image attention features and the style image attention features to generate a secret-containing image;
[0014] The secret image is added with noise, and the content image attention feature and the style image attention feature are injected to restore the initial noise; the content noise of the initial noise is calculated by inverse fusion, and the secret information of the content noise is extracted by inverse mapping rule.
[0015] Optionally, the preset mapping rule is used to map the secret information to be hidden into the content noise, including:
[0016] According to the secret information Generate steganographic content noise , the formula is as follows: , wherein is an interval mapping function.
[0017] Optionally, the content noise is denoised by using the diffusion model to obtain the content image, and the diffusion model is used to encode the content image to obtain the content image attention feature at each time step, including:
[0018] The is input into the reverse process of the diffusion model to obtain the content image : ;
[0019] The is input into the forward process of the diffusion model to generate noise , and the query feature in the content image attention feature is obtained: .
[0020] Optionally, the diffusion model is used to encode the style image to obtain the style noise and the style image attention feature at each time step, including: the style image is input into the forward process of the diffusion model to obtain the style noise , and the key feature and the value feature in the style image attention feature are collected: ; wherein, the style image is input into the forward process of the diffusion model , including:
[0021] The initial secret noise is denoised, and the attention parameters are synchronized to the diffusion reverse process and replace the original attention feature, so as to generate the secret image : .
[0022] Optionally, the fusing the style noise and the content noise to generate an initial noise comprises:
[0023] Using an adaptive instance normalization network fusing the content noise and the style noise to obtain an initial secret-containing noise : .
[0024] Optionally, the adding noise to the secret-containing image, and injecting content image attention features and style image attention features to restore the initial noise, using an inverse fusion network to calculate the content noise of the restored initial noise, and using an inverse mapping method to finally obtain the restored secret information comprises:
[0025] adding noise to the secret-containing image using a diffusion model, and replacing the noise using attention features to obtain the restored initial noise;
[0026] using an inverse fusion network to restore the content noise from the restored initial noise;
[0027] combining the restored content noise and the inverse mapping method to finally obtain the restored secret information.
[0028] Optionally, the adding noise to the secret-containing image using a diffusion model, and replacing the noise using attention features to obtain the restored initial noise comprises:
[0029] adding noise to the secret-containing image using a diffusion model, and synchronously saving the attention parameters to obtain the restored secret-containing initial noise : . ;
[0030] wherein, the query feature, the key feature, and the value feature.
[0031] Optionally, the using an inverse fusion network to restore the content noise from the restored initial noise comprises:
[0032] using an inverse diffusion network to restore the content noise from the restored secret-containing initial noise : . wherein the inverse diffusion network is an inverse network.
[0033] Optionally, the combining the restored content noise and the inverse mapping method to finally obtain the restored secret information comprises:
[0034] recovered content noise The secret information is recovered by inverse mapping method : , wherein, is an interval inverse mapping function.
[0035] Optionally, the preset mapping rule comprises:
[0036] The mapping rule is designed to generate two random numbers conforming to uniform distribution in the range of 0~1 and The Box-Muller transformation is used to generate a standard Gaussian distribution random variable : ;
[0037] The mapping rule of the secret information M and the random variable is designed.
[0038] After adjusting the random variable , a secret message is given, if the current secret information is , the secret information is mapped using to complete steganography, as shown below:
[0039] ; in the formula, represents the absolute value function, is an auto-increment variable starting from 1, represents the embedding interval of the secret information.
[0040] According to the mapping rule, the inverse mapping rule is written, in the extraction part, the initial noise is recovered by using the noise adding process of the diffusion model, and the content noise is recovered from the recovered initial noise by network, and the secret information is obtained by using the inverse mapping rule:
[0041] ;
[0042] The mapping rule of the secret information M and the random variable is designed, comprising:
[0043] The random variable is modified according to the embedding interval, and the modification rule is as follows: ; in the formula, represents the position exchange function, represents the element value of at the first position, wherein is an auto-increment variable starting from 1, represents the embedding interval of the secret information. a modification threshold is represented, is satisfies and the element closest to , if the generated random variable , the number greater than cannot satisfy the requirement of content noise , the generated standard Gaussian distribution random variable until the generated content noise meets the requirements .
[0044] Compared with the prior art, the beneficial effects achieved by the present application are:
[0045] The present application proposes a construction type information hiding framework based on diffusion model and style transfer, maps secret information into content noise, and generates images of different styles and hides information through style transfer in the process of generating images by diffusion model, which can solve the problems of insufficient quality of stego images and insufficient anti-steganalysis performance in the current information hiding field. The present application uses diffusion model and style transfer for information hiding, providing a new idea for information hiding, and has good application prospect in the field of covert communication. It can be applied to the fields of privacy protection and secure communication, digital copyright protection and traceability. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 The secret information generated by the framework of the present application is shown in the stego image diagram conforming to the style of the image;
[0047] Figure 2 The working flow chart of generating stylized stego image of the present application is shown;
[0048] Figure 3 The working flow chart of extracting secret information of the present application is shown;
[0049] Figure 4 The flow chart of the embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] In order to make the technical means, creative features, purposes and effects realized by the present application easy to understand, the present application is further described below in combination with specific embodiments.
[0051] In the description of the present application, it needs to be understood that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" and the like are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined with "first", "second" and the like can be explicitly or implicitly included one or more. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0052] In the description of the present application, it needs to be understood that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood through specific circumstances.
[0053] As shown in Figures 1-4 , a diffusion model and style transfer based construction information hiding method is disclosed, which is realized by the cooperation of the hiding end and the extraction end, as shown in Figure 4 , the steps are as follows:
[0054] Step 1, select an image with obvious style as style image, map the secret information to be hidden to content noise based on a preset mapping rule, the hiding end first denoises the content noise by using diffusion model to obtain content image, then encodes the content image by using diffusion model to obtain content image attention feature at each time step; Then the style image is encoded by using diffusion model to obtain style noise and style image attention feature at each time step, respectively, the style noise and the content noise are fused to generate initial noise, the initial noise is denoised by diffusion model, and the content image attention feature and the style image attention feature are injected to generate a secret-containing image;
[0055] Step 2, the extraction end adds noise to the secret-containing image, and injects content image attention feature and style image attention feature to restore the initial noise, calculates the content noise of the restored initial noise by using inverse fusion, and extracts the secret information of the content noise by inverse mapping rule.
[0056] Step 1 comprises the following steps:
[0057] Step 1-1, the secret information is mapped into content noise, and then the content noise is denoised and noised, and the style image is noised to obtain style noise, and the content image attention features and the style image attention features in the two noising processes are saved respectively;
[0058] Step 1-2, the content noise and the style noise are fused to obtain new noise as initial noise;
[0059] Step 1-3, the initial noise is input into the diffusion model, and the saved content image attention features and style image attention features are used for some replacement in the process, to obtain the final secret-containing image.
[0060] In step 1-1, to realize the generation of noise and the extraction of attention features, first, according to the secret information Generate steganographic content noise , the formula is as follows:
[0061] , wherein is an interval mapping function;
[0062] Input into the reverse diffusion process 1 to obtain the content image : ;
[0063] Input into the forward diffusion process 1 to generate noise , and obtain the query feature in the content image attention feature : ;
[0064] On the other hand, select a style image Input into the forward diffusion process 2 to obtain the style noise , and collect the key feature and the value feature in the style image attention feature: .
[0065] Step 1-2 comprises: using an adaptive instance normalization network , the content noise and the style noise are fused to obtain the initial secret-containing noise : .
[0066] Step 1-3, the input of into the reverse diffusion process 2 comprises:
[0067] For initial dense noise Denoising is performed, and the attention parameters are synchronized to the diffusion inversion process, replacing the original attention features, thereby generating a dense image. : .
[0068] Step 2 includes the following steps:
[0069] Step 2-1: Add noise to the dense image using a diffusion model and replace it with the previously saved content image attention features and style image attention features to obtain the restored initial noise;
[0070] Step 2-2: Use an inverse fusion network to recover the content noise from the recovered initial noise;
[0071] Steps 2-3 combine the recovered content noise and the inverse mapping method to finally obtain the recovered secret information.
[0072] Step 2-1 includes: using forward diffusion process 3 on the dense image Add noise, synchronize the saved attention parameters, and obtain the recovered dense initial noise. : ;
[0073] in, To query features, Key features, Value features.
[0074] In step 2-2, the inverse fusion network is used to recover the content noise from the recovered initial noise, by using... Network, i.e., reverse The network recovers from the initial dense noise. Content noise recovery : .
[0075] In steps 2-3, by combining the recovered content noise and the inverse mapping method, the recovered secret information is finally obtained, including:
[0076] The restored content noise The secret information can be recovered by using the inverse mapping method. : ,in, It is an interval inverse mapping function.
[0077] The preset mapping rules in this embodiment include:
[0078] Step A: Design a mapping rule to generate two random numbers that conform to a uniform distribution within the range of 0 to 1. and then generate standard Gaussian distribution random variables by using Box-Muller transformation : ;
[0079] Step B, further design the mapping rule of secret information M and random variable First, modify random variable according to embedding interval, and the specific modification rule is as follows: ; wherein, denotes a position exchange function, denotes the element value at the first position, wherein is an auto-increment variable starting from 1, denotes the embedding interval of secret information, and the size determines the capacity of the mapping rule. denotes the modification threshold, and the size determines the robustness of the mapping rule. is the element in that satisfies and whose position is closest to If the generated random variable is not enough, generate that meets the requirement by performing step A again.
[0080] Step C, after adjusting random variable , give a secret message , if the current secret information is , use to map the secret information to complete steganography, as follows:
[0081] ; wherein, denotes an absolute value function.
[0082] Step D, write the inverse mapping rule according to the mapping rule, in the extraction part, restore the initial noise by using the noise adding process of the diffusion model, and restore the content noise from the restored initial noise by using network, namely inverse network, and then obtain the secret information by using the inverse mapping rule:
[0083] .
[0084] The embodiment of the application provides a construction type information hiding method based on a diffusion model and style migration. A Van Gogh oil painting (style image, such as Figure 2(Image in the lower left corner) and a piece of binary information M (secret information, such as...) Figure 2 Using the information M (as indicated in the figure) as input, the method generates a set of dense content noise that conforms to a normal distribution by utilizing the secret information M and the Box-Muller transform. Secondly, a diffusion model is used to analyze style images. Add noise to obtain style noise. Then, style noise With dense noise in the content The network is merged to obtain an initial noise. Then the initial noise The input is fed into a diffusion model to generate a stylized dense image. At the extraction end, the dense image is... The initial noise is reconstructed by inverting the input to the diffusion model. By using The network recovers from the initial dense noise. Recovery of Dense Content Noise Finally, the secret information can be recovered using the inverse mapping method. The stylized dense images generated by this invention have good security, while also having considerable capacity and image quality.
[0085] This method specifically includes: using a diffusion model and style transfer at the hidden end to generate high-quality, diverse, stylized, and densely packed images from the secret information. At the extraction end, it is possible to extract from stylized dense images The secret information was extracted. The specific process of hiding and extracting the information is as follows:
[0086] Step 1: At the hidden end, select an image with a distinct style as the style image. The secret information is used to generate content noise using mapping rules, such as... Figure 2 This illustrates the complete workflow for generating stylized dense images. Using... , , as well as They represent Figure 2 Mapping, forward diffusion, Network and reverse diffusion.
[0087] Step 101, based on secret information Generate steganographic noise The formula is as follows: ;in It is an interval mapping function. This invention proposes a reversible mapping rule. This rule first generates two uniformly distributed random numbers. and The value range of is [0, 1], and then a random variable of standard normal distribution (mean 0, variance 1) is generated by using Box-Muller transformation The random noise of standard normal distribution generated by Box-Muller transformation is then corresponding to the secret information. The secret information is corresponding to the generated every other position is fixed, if the secret information is 0, the corresponding is changed to a negative number; if the secret information is 1, the corresponding is changed to a positive number. And when corresponding, if the number of the position is less than , find a number closest to this number and greater than in all generated numbers and exchange positions. Adjusting the size of can be used to adjust the size of embedding secret information, The larger the last extraction accuracy is higher, but it cannot be too large, which will lead to the generated image quality is not good. Step 102, record the attention parameters, first input
[0088] into the reverse diffusion process 1 to obtain the content image : ; Next, input
[0089] into the forward diffusion process 1 to generate noise , and does not participate in the subsequent process, and the purpose of its generation is to obtain the query feature in the content image attention feature : ; Step 103, select one style image
[0090] and input it into the forward diffusion process 2 to obtain the style noise , and collect the key feature and value feature in the style image attention feature : ;
[0091] Step 104, using the adaptive instance normalization network , the content noise and the style noise are fused to obtain the steganographic fusion noise : ;
[0092] Wherein, and respectively, mean and standard deviation. Then input into the inverse diffusion process 2 ( ) Figure 2 ) to denoise the initial noise and replace some of the saved attention features to generate the stego image : ;
[0093] The detailed process is first to obtain the attention parameters from at all time steps, and obtain the attention parameters from and .
[0094] Then, in the stego image generation process, the original query is obtained from at each time step, and is calculated as follows: ;
[0095] Then modify the keys and values in the stylization process, directly replace them with the keys and values of the style image, and calculate the cross-attention , and between as follows:
[0096] ;
[0097] ;
[0098] where represents the attention feature, is a normalization function, is a scaling factor to prevent unstable point product values caused by too large values.
[0099] Step 2, at the extraction end, input the stego image into the forward noise addition process of the diffusion model, and use the same attention replacement method in the hidden process to recover the fusion noise , then according to the recovered fusion noise use to recover the stego content noise , and finally use the inverse mapping rule to recover the secret information . Figure 3 is the entire extraction process of extracting secret information.
[0100] Step 201, steganographic migration image and cross attention Input into the forward diffusion process 3 ( Figure 3 ) to recover the stego initial noise : ;
[0101] Step 202, using three parameters , and , use to recover the stego content noise , as follows:
[0102] ;
[0103] Step 203, the recovered stego content noise is recovered by the inverse mapping method, thereby recovering the secret information : ;
[0104] Step 3, in order to generate high-quality stego images and recover high-quality secret images, a perfect mapping and inverse mapping method needs to be designed. The present application designs a mapping and inverse mapping method.
[0105] Step 301, in order to generate high-quality stego images, a noise conforming to the labeled Gaussian distribution is needed, so first two random numbers conforming to the uniform distribution in the range 0~1 and are generated, then a standard Gaussian distribution random variable is generated using the Box-Muller transformation:
[0106] ;
[0107] Step 302, further design the mapping rule of the secret information M and the random variable . First, modify the random variable according to the embedding interval, the specific modification rule is as follows: ; in the formula, denotes the position exchange function, denotes the element value of at the th position, where is an auto-increment variable starting from 1, denotes the embedding interval of the secret information, the size of which determines the capacity of the mapping rule. denotes the modification threshold, the size of which determines the robustness of the mapping rule. is the that satisfies And the closest position The elements. If the generated random variable In, greater than If the quantity is insufficient, proceed to step 3-1 to generate the required quantity. .
[0108] Step 303: Adjust the random variables Then, given a secret message If the current secret information is Then use Mapping this secret information to complete steganography is done as follows:
[0109] In the formula, This represents the function that takes the absolute value.
[0110] Step 304: Write the inverse mapping rule based on the mapping rule. In the extraction part, recover the initial noise using the noise addition process of the diffusion model. Then, based on the recovered initial noise... The content noise is recovered from the initial noise, and then the secret information is obtained using the inverse mapping rule:
[0111] ;
[0112] The proposed mapping rule generates steganalytic content features based on secret information and following a standard Gaussian distribution, and uses intervals... and threshold To balance the trade-off between capacity and extraction accuracy.
[0113] This method can be applied in areas such as privacy protection and secure communication, digital rights protection and traceability.
[0114] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A constructional information hiding method based on a diffusion model and style transfer, characterized in that, The method comprises: Obtaining a style image; Mapping secret information to be hidden into content noise based on a preset mapping rule; Using a diffusion model to denoise the content noise to obtain a content image, and then using the diffusion model to encode the content image to obtain content image attention features at each time step; Using a diffusion model to encode the style image to obtain style noise and style image attention features at each time step; Fusing the style noise and the content noise to generate initial noise, denoising the initial noise through the diffusion model, and injecting the content image attention features and the style image attention features to generate a secret-containing image; Adding noise to the secret-containing image, injecting the content image attention features and the style image attention features to restore the initial noise, calculating the content noise of the restored initial noise by using inverse fusion, and extracting secret information of the content noise through an inverse mapping rule; The method comprises: According to the secret information Generating stego content noise , as follows: , where is an interval mapping function; The method comprises: To diffuse the model Input to the reverse process of the diffusion model In which the content image is obtained : To diffuse the model Input to the forward process of the diffusion model In order to generate noise Obtain query features in content image attention features : ; The style image is encoded by using the diffusion model to obtain style noise and style image attention features at each time step, including: inputting the style image Forward process of the input diffusion model In order to obtain style noise And collect key features in style image attention features And value features : ; wherein the style image Forward process of the input diffusion model , including: Denoising is performed on the initial image containing dense noise and the attention parameters are synchronized into the diffusion reverse process and replace the original attention features, thus generating an image containing dense noise : . 2.The diffusion model and style transfer based constructional information hiding method according to claim 1, wherein, The method comprises: Utilizing adaptive instance normalization network combining content noise and style noise to obtain initial secret-containing noise : . 3.The diffusion model and style transfer based constructional information hiding method according to claim 1, wherein, The method comprises: The method comprises: Adding noise to the secret-containing image, injecting the content image attention features and the style image attention features to restore the initial noise, calculating the content noise of the restored initial noise by using inverse fusion, and extracting secret information of the content noise through an inverse mapping rule; Performing diffusion model noise addition on the secret-containing image and replacing by using the attention features to obtain restored initial noise; 4. The diffusion model and style transfer based constructional information hiding method according to claim 3, characterized in that, Using an inverse fusion network to restore the content noise from the restored initial noise; Using a diffusion model forward process on a stegimage Performing noise addition, synchronizing saved attention parameters, obtaining a recovered steginitial noise : ; wherein, is a query feature, is a key feature, is a value feature.
5. The diffusion model and style transfer based constructional information hiding method according to claim 3, characterized in that, Combining the restored content noise and an inverse mapping method to finally obtain restored secret information. By using the network, the content noise is recovered from the recovered noisy initial noise containing noise : wherein network for inverse network.
6. The diffusion model and style transfer based constructional information hiding method according to claim 3, characterized in that, The method comprises: The restored content noise The secret information can be recovered by using the inverse mapping method. : wherein is the interval inverse mapping function.
7. The diffusion model and style transfer based constructional information hiding method according to claim 1, wherein, The method comprises: The method comprises: The preset mapping rule comprises: Design mapping rules, generate two random numbers in the range 0~1 that conform to uniform distribution And , using Box-Muller transformation, generate standard Gaussian distribution random variable : ; The mapping rule of the design secret information M and the random variable is designed. adjusting random variables After, given a secret message , if the current secret information is , then use to map the secret information to complete steganography, as follows: ; In the formula, represents an absolute value function, is an auto-increment variable starting from 1, represents an embedding interval of secret information; According to the mapping rule, an inverse mapping rule is written, in the extraction part, the initial noise is recovered by using the noise adding process of the diffusion model, and according to the recovered initial noise, the content noise is recovered from the recovered initial noise, and the secret information is obtained by using the inverse mapping rule: network, the content noise is recovered from the recovered initial noise, and the secret information is obtained by using the inverse mapping rule: ; The mapping rule of the design secret information M and the random variable includes: Modifying random variables according to embedding interval The modification rule is as follows: In the formula, This represents the position swapping function. express In the The element value at position, where It is an auto-incrementing variable starting from 1. Indicates the embedding interval of secret information. This indicates that the threshold has been modified. yes China satisfies And the closest position The elements, if the generated random variable In, greater than The quantity is insufficient to meet the content noise requirements. To meet the requirements, generate standard Gaussian distributed random variables. Until the required content noise is generated. .
Citation Information
Patent Citations
Method for quickly generating stylized text to image based on diffusion model
CN120543365A
Generative image steganography method and system based on diffusion model and face key points
CN121329748A