Constructive information hiding method based on diffusion model and style migration
By employing a constructive information hiding method based on diffusion models and style transfer, this method addresses the issues of insufficient quality and steganalysis resistance in existing technologies for densely packed images. It generates high-quality densely packed images and achieves effective information hiding, making it suitable for fields such as privacy protection and secure communication.
Patent Information
- Application Number
- CN202610085542.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2046-01-22
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 the 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 CN121563756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a constructive information hiding method based on diffusion models and style transfer, belonging to the fields of computer vision and information security technology. Background Technology
[0002] Information hiding is a technique that conceals secret information within a carrier image for covert transmission. Early information hiding methods hid the secret image by modifying the carrier image, making it highly susceptible to detection by steganalysis algorithms.
[0003] However, existing constructive information hiding algorithms have the following problems: 1. Existing construction algorithms are insufficient, resulting in low-quality generated dense images; 2. Existing hiding algorithms are insufficient, and the generated dense images lack resistance to steganalysis. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art. The principle of constructive information hiding is to directly generate a secret image based on secret information. Since it does not require modification of the image, it can theoretically resist steganalysis. This invention provides a constructive information hiding method based on diffusion model and style transfer.
[0005] To achieve the above objectives / to solve the above technical problems, the present invention is implemented using the following technical solution: A constructive information hiding method based on diffusion model and style transfer, the method comprising: Get the style image; Based on preset mapping rules, the secret information to be hidden is mapped as content noise; The content image is obtained by denoising the content noise using a diffusion model, and then the content image is encoded using a diffusion model to obtain the content image attention features at each time step. The style image is encoded using a diffusion model to obtain style noise and style image attention features at each time step; The style noise and the content noise are fused to generate initial noise, which is then denoised using a diffusion model. Finally, content image attention features and style image attention features are injected to generate a dense image. The dense image is noise-added, and the initial noise is restored by injecting content image attention features and style image attention features. The content noise is calculated by inverse fusion to restore the initial noise, and the secret information of the content noise is extracted by inverse mapping rules.
[0006] Optionally, mapping the secret information to be hidden into content noise based on a preset mapping rule includes: According to secret information Generate steganographic noise The formula is as follows: ,in It is an interval mapping function.
[0007] Optionally, the step of using a diffusion model to denoise the content noise to obtain a content image, and then using a diffusion model to encode the content image to obtain the content image attention features at each time step, includes: Will The reverse process of input to the diffusion model In the middle, obtain the content image : ; Will Forward process of input into diffusion model In order to generate noise Obtain query features from content image attention features : .
[0008] Optionally, encoding the style image using a diffusion model to obtain style noise and style image attention features at each time step includes: encoding the style image... Forward process of input diffusion model In order to obtain style noise And collect key features from style image attention features. Sum value characteristics : Among them, style images Forward process of input diffusion model Including: 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. : .
[0009] Optionally, fusing the style noise and the content noise to generate the initial noise includes: Using Adaptive Instance Normalization Network Content noise and style noise Fusion yields the initial dense noise. : .
[0010] Optionally, the step of adding noise to the dense image, injecting content image attention features and style image attention features to restore the initial noise, calculating the content noise to restore the initial noise using inverse fusion, and then extracting the secret information of the content noise through inverse mapping rules includes: The initial noise is restored by applying a diffusion model to a dense image and then replacing it using attention features. The inverse fusion network is used to recover the content noise from the recovered initial noise; By combining the recovered content noise with the inverse mapping method, the recovered secret information is finally obtained.
[0011] Optionally, the initial noise obtained by applying a diffusion model to the dense image and replacing it using attention features includes: Using the forward process of the diffusion model for dense images Add noise, synchronize the saved attention parameters, and obtain the recovered dense initial noise. : ; in, To query features, Key features, Value features.
[0012] Optionally, the use of an inverse fusion network to recover content noise from the recovered initial noise includes: By using The network recovers from the initial dense noise. Content noise recovery : ,in Network is reverse network.
[0013] Optionally, the method of combining the recovered content noise and the inverse mapping to finally obtain the recovered secret information includes: The restored content noise The secret information can be recovered by using the inverse mapping method. : ,in, It is an interval inverse mapping function.
[0014] Optionally, the preset mapping rules include: Design a mapping rule to generate two random numbers that conform to a uniform distribution within the range of 0 to 1. and Using the Box-Muller transformation, a standard Gaussian distributed random variable is generated. : ; Design the secret information M and random variables. Mapping rules; Adjusting 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: In the formula, This represents the function that takes the absolute value. It is an auto-incrementing variable starting from 1. Indicates the embedding interval of secret information; Based on the mapping rule, the inverse mapping rule is written. In the extraction part, the initial noise is recovered using the noise addition process of the diffusion model. Based on the recovered initial noise, the... The network recovers the content noise from the recovered initial noise and obtains the secret information using the inverse mapping rule: ; Among them, the design secret information M and random variables The mapping rules include: Modify random variables according to embedding interval The rules have been modified 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. .
[0015] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention proposes a constructive information hiding framework based on a diffusion model and style transfer. It maps secret information into content noise and performs style transfer during image generation using the diffusion model to generate images with different styles for information hiding. This addresses current issues in information hiding such as insufficient quality of encrypted images and inadequate resistance to steganalysis. This invention utilizes a diffusion model and style transfer for information hiding, providing a new approach and showing promising applications in areas such as covert communication. It can be applied to privacy protection and secure communication, digital rights protection and traceability, and other fields. Attached Figure Description
[0016] Figure 1 The image shown is a schematic diagram of a secret information of the present invention being generated into a secret image that conforms to the style of the image through a frame. Figure 2 The diagram shows the workflow of generating stylized dense images according to the present invention. Figure 3 The diagram shows the workflow for extracting secret information according to the present invention. Figure 4 The diagram shown is a flowchart of an embodiment of the present invention. Detailed Implementation
[0017] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0018] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are used only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0019] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0020] like Figures 1-4 As shown, a constructive information hiding method based on a diffusion model and style transfer is disclosed. This method is implemented through the collaborative work of a hiding end and an extraction end, as follows: Figure 4 As shown, the steps are as follows: Step 1: Select an image with a distinct style as the style image. Based on a preset mapping rule, map the secret information to be hidden as content noise. The hiding end first uses a diffusion model to denoise the content noise to obtain the content image, and then uses the diffusion model to encode the content image to obtain the content image attention features at each time step. Next, the diffusion model is used to encode the style image to obtain the style noise and the style image attention features at each time step. The style noise and the content noise are fused to generate initial noise. The initial noise is then denoised using a diffusion model, and the content image attention features and style image attention features are injected to generate the hidden image. Step 2: The extraction end adds noise to the dense image and injects content image attention features and style image attention features to restore the initial noise. The content noise that restores the initial noise is calculated using inverse fusion, and then the secret information of the content noise is extracted through inverse mapping rules.
[0021] Step 1 includes the following steps: Step 1-1: Map the secret information into content noise, then perform denoising and noise addition processes on the content noise, add noise to the style image to obtain style noise, and save the attention features of the content image and the attention features of the style image in the two noise addition processes respectively. Steps 1-2 involve fusing content noise and style noise to obtain new noise, which is then used as the initial noise. Steps 1-3 involve inputting the initial noise into the diffusion model, and during this process, some replacements are made using the saved content image attention features and style image attention features to obtain the final dense image.
[0022] In step 1-1, to achieve noise generation and attention feature extraction, the secret information is first used as the basis. Generate steganographic noise The formula is as follows: ,in It is an interval mapping function; Will The image is input into the back diffusion process 1 to obtain the content image. : ; Will The noise is input into forward diffusion process 1 to generate noise. Obtain query features from content image attention features : ; On the other hand, choose a style image Input into forward diffusion process 2 to obtain style noise And collect key features from style image attention features. Sum value characteristics : .
[0023] Steps 1-2 include: utilizing an adaptive instance normalization network Content noise and style noise Fusion yields the initial dense noise. : .
[0024] Steps 1-3, the following will The input to the reverse diffusion process 2 includes: 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. : .
[0025] Step 2 includes the following steps: 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; Step 2-2: Use an inverse fusion network to recover the content noise from the recovered initial noise; Steps 2-3 combine the recovered content noise and the inverse mapping method to finally obtain the recovered secret information.
[0026] Step 2-1 includes: using forward diffusion process 3 to process dense images Add noise, synchronize the saved attention parameters, and obtain the recovered dense initial noise. : ; in, To query features, Key features, Value features.
[0027] 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 : .
[0028] In steps 2-3, by combining the recovered content noise and the inverse mapping method, the recovered secret information is finally obtained, including: The restored content noise The secret information can be recovered by using the inverse mapping method. : ,in, It is an interval inverse mapping function.
[0029] The preset mapping rules in this embodiment include: 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, using the Box-Muller transformation, a standard Gaussian distributed random variable is generated. : ; Step B involves further designing the secret information M and random variables. The mapping rules. First, modify the random variable according to the embedding interval. The specific modification rules are 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. The embedding interval represents the secret information, and its size determines the capacity of the mapping rule. This indicates the threshold for modification, and its size determines the robustness of the mapping rule. yes China satisfies And the closest position The elements. If the generated random variable In, greater than If the quantity is insufficient, proceed to step A to generate the required quantity. .
[0030] Step C, adjust the random variable Then, given a secret message If the current secret information is Then use Mapping this secret information to complete steganography is done as follows: In the formula, This represents the function that takes the absolute value.
[0031] Step D: 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. Based on the recovered initial noise, use... Network, i.e., reverse The network recovers the content noise from the recovered initial noise, and then uses the inverse mapping rule to obtain the secret information: .
[0032] This invention provides a constructive information hiding method based on a diffusion model and style transfer. (The method involves taking a Van Gogh painting...) (Style images, 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 for 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.
[0033] 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: 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.
[0034] 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 range of values is [0, 1]. Then, using the Box-Muller transformation, a random variable with a standard normal distribution (mean 0, variance 1) is generated. Random noise distributed according to a standard normal distribution is generated through the Box-Muller transform, and then the secret information is mapped to it. The interval is fixed at... The secret information will be combined with the generated above. If the secret information is 0, then the corresponding... Change to a negative number; if the secret information is 1, then change the corresponding... It becomes a positive number. And at the corresponding time, if the number at that position is less than... Then, find the number that is closest to this number and greater than it among all the generated numbers. Swap the positions of the numbers with it. Adjust The size can be used to adjust the size of the embedded secret information. The larger the value, the higher the accuracy of the final extraction, but it cannot be too large, otherwise the quality of the generated image will be poor.
[0035] Step 102: Record attention parameters. First, record the attention parameters. The image is input into the back diffusion process 1 to obtain the content image. : ; Next, The noise is input into forward diffusion process 1 to generate noise. ,and It does not participate in subsequent processes; its generation purpose is to obtain query features from the content image attention features. : ; Step 103: Select a style image This is then fed into forward diffusion process 2 to obtain style noise. And collect key features from style image attention features. Sum value characteristics : ; Step 104: Utilize the adaptive instance normalization network The content noise and style noise Fusion, resulting in steganalytic fusion noise : ; in, and These are the mean and standard deviation, respectively. Then, they are input into the back diffusion process 2 ( Figure 2 In this process, the inverse process of the diffusion model is used to reduce the initial noise. Denoising is performed, and some replacements are made using the previously saved attention features to generate a dense image. : ; The specific process is to first start from all time steps... Obtaining attention parameters ,from Obtaining attention parameters and .
[0036] Then, during the steganography generation process, at each time step from Get the original query And calculate as follows : ; Next, modify the keys in the stylization process. AND value Use the style image key directly. AND value Substitute, calculate , and Cross attention between As shown below: ; ; in, Represents attention characteristics, It is a normalization function. It is a scaling factor used to prevent excessively large dot product values from causing instability.
[0037] Step 2: At the extraction end, through stylized dense images... During the forward noise addition process of the input to the diffusion model, and using the same attention replacement method as in the previous hiding process, the fused noise is recovered. Then, based on the recovered fusion noise use The noise containing the dense content was recovered. Finally, the secret information is recovered using the inverse mapping rule. . Figure 3 This describes the entire process of extracting secret information.
[0038] Step 201: Steganographic Transfer Image and cross attention Input to forward diffusion process 3 ( Figure 3 In order to recover the dense initial noise : ; Step 202: Using three parameters , and ,use To recover noise from dense content As shown below: ; Step 203: Recover the dense content noise The secret information can be recovered by using the inverse mapping method. : ; Step 3: To generate high-quality stylized dense images and recover high-quality secret images, a perfect correspondence method for mapping and inverse mapping needs to be designed. This invention designs a method for mapping and inverse mapping.
[0039] Step 301: To generate a high-quality dense image, a noise conforming to the labeled Gaussian distribution is needed. Therefore, two random numbers conforming to a uniform distribution are first generated in the range of 0 to 1. and Then, using the Box-Muller transformation, a standard Gaussian distributed random variable is generated. : ; Step 302: Further design the secret information M and random variables. The mapping rules. First, modify the random variable according to the embedding interval. The specific modification rules are 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. The embedding interval represents the secret information, and its size determines the capacity of the mapping rule. This indicates the threshold for modification, and its size determines the robustness of the mapping rule. yes China 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. .
[0040] 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: In the formula, This represents the function that takes the absolute value.
[0041] 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: ;
[0042] 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.
[0043] This method can be applied in areas such as privacy protection and secure communication, digital rights protection and traceability.
[0044] 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 constructive information hiding method based on diffusion model and style transfer, characterized in that, The method includes: Get the style image; Based on preset mapping rules, the secret information to be hidden is mapped as content noise; The content image is obtained by denoising the content noise using a diffusion model, and then the content image is encoded using a diffusion model to obtain the content image attention features at each time step. The style image is encoded using a diffusion model to obtain style noise and style image attention features at each time step; The style noise and the content noise are fused to generate initial noise, which is then denoised using a diffusion model. Finally, content image attention features and style image attention features are injected to generate a dense image. The dense image is noise-added, and the initial noise is restored by injecting content image attention features and style image attention features. The content noise is calculated by inverse fusion to restore the initial noise, and the secret information of the content noise is extracted by inverse mapping rules.
2. The constructive information hiding method based on diffusion model and style transfer according to claim 1, characterized in that, The process of mapping the secret information to be hidden into content noise based on preset mapping rules includes: According to secret information Generate steganographic noise The formula is as follows: ,in It is an interval mapping function.
3. The constructive information hiding method based on diffusion model and style transfer according to claim 2, characterized in that, The content image is obtained by denoising the content noise using a diffusion model, and then the content image is encoded using a diffusion model to obtain the content image attention features at each time step, including: Will The reverse process of input to the diffusion model In the middle, obtain the content image : ; Will Forward process of input into diffusion model In order to generate noise Obtain query features from content image attention features : .
4. The constructive information hiding method based on diffusion model and style transfer according to claim 1, characterized in that, The process of encoding the style image using a diffusion model to obtain style noise and style image attention features at each time step includes: encoding the style image... Forward process of input diffusion model In order to obtain style noise And collect key features from style image attention features. Sum value characteristics : Among them, style images Forward process of input diffusion model Including: 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. : .
5. The constructive information hiding method based on diffusion model and style transfer according to claim 4, characterized in that, The step of fusing the style noise and the content noise to generate the initial noise includes: Using Adaptive Instance Normalization Network Content noise and style noise Fusion yields the initial dense noise. : .
6. The constructive information hiding method based on diffusion model and style transfer according to claim 1, characterized in that, The process involves adding noise to the dense image, injecting content image attention features and style image attention features to restore the initial noise, calculating the content noise by inverse fusion to restore the initial noise, and then extracting the secret information of the content noise through inverse mapping rules, including: The initial noise is restored by applying a diffusion model to a dense image and then replacing it using attention features. The inverse fusion network is used to recover the content noise from the recovered initial noise; By combining the recovered content noise with the inverse mapping method, the recovered secret information is finally obtained.
7. The constructive information hiding method based on diffusion model and style transfer according to claim 6, characterized in that, The initial noise obtained by applying a diffusion model to a dense image and then replacing it using attention features includes: Using the forward process of the diffusion model for dense images Add noise, synchronize the saved attention parameters, and obtain the recovered dense initial noise. : ; in, To query features, Key features, Value features.
8. The constructive information hiding method based on diffusion model and style transfer according to claim 6, characterized in that, The process of using an inverse fusion network to recover content noise from the recovered initial noise includes: By using The network recovers from the initial dense noise. Content noise recovery : ,in Network is reverse network.
9. The constructive information hiding method based on diffusion model and style transfer according to claim 6, characterized in that, The method combining the recovered content noise and the inverse mapping ultimately yields the recovered secret information, including: The content noise will be restored The secret information can be recovered by using the inverse mapping method. : ,in, It is an interval inverse mapping function.
10. The constructive information hiding method based on diffusion model and style transfer according to claim 1, characterized in that, The preset mapping rules include: Design a mapping rule to generate two random numbers that conform to a uniform distribution within the range of 0 to 1. and Using the Box-Muller transformation, a standard Gaussian distributed random variable is generated. : ; Design the secret information M and random variables. Mapping rules; Adjusting 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: ; In the formula, This represents the function that takes the absolute value. It is an auto-incrementing variable starting from 1. Indicates the embedding interval of secret information; Based on the mapping rule, the inverse mapping rule is written. In the extraction part, the initial noise is recovered using the noise addition process of the diffusion model. Based on the recovered initial noise, the... The network recovers the content noise from the recovered initial noise and obtains the secret information using the inverse mapping rule: ; Among them, the design secret information M and random variables The mapping rules include: Modify random variables according to embedding interval The rules have been modified 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
Constructive information hiding method based on automatic contour generation
CN113610878A
Image generation method based on style feature injection
CN119648517A
Method for quickly generating stylized text to image based on diffusion model
CN120543365A
Universal style migration method based on diffusion model and stroke enhancement
CN120852565A
Simulation image generation method, device and system and storage medium
CN120876650A