Double-copyright protection method based on diffusion model and zero watermark
By combining the diffusion model and zero watermark, using the XOR operation of the noise image and the zero watermark image to construct copyright information, and using the diffusion model to generate the secret image, it solves the problem of complexity and low efficiency of the existing diffusion model copyright protection method, and achieves Efficient image copyright protection and model copyright authentication.
Patent Information
- Application Number
- CN202410850478.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
The existing diffusion model copyright protection method requires understanding the specific parameters of the model and fine-tuning, which is complex and inefficient. Moreover, the diffusion model and zero watermark have not been jointly applied in image copyright protection.
A dual copyright protection method based on the diffusion model and zero watermark is used to construct the image copyright information through the XOR operation of the generated noise image and the zero watermark image, and the forward and backward sampling of the diffusion model is used to generate the encrypted image to achieve image copyright authentication and traceability. , no need to adjust the diffusion model.
It improves the efficiency and security of image copyright protection, simplifies the operation process, and realizes the authentication and traceability of diffusion model copyright without affecting image semantics.
Smart Images

Figure CN118735761A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of copyright protection, and in particular to a dual copyright protection method based on a diffusion model and a zero watermark. Background Art
[0002] In recent years, many new methods have emerged in the field of copyright protection, such as steganography based on diffusion models and zero watermarks. Diffusion models use small changes in data processing to hide information in order to achieve the purpose of covert transmission; while zero watermark technology is committed to embedding invisible identifiers in digital content to track and verify the source and integrity of the content. At present, diffusion models and zero watermarks have been applied to copyright protection of images, but the records are all used separately, and there is no record of diffusion models and zero watermarks being used together for image copyright protection.
[0003] The diffusion model is an important generative model that has been applied to image generation, audio generation, video generation, 3D generation and other fields. Building a diffusion model requires a lot of computing power and time, and its copyright protection is particularly important. Most existing diffusion model copyright protection methods require first understanding the specific parameters of the model, then fine-tuning the model and then embedding the model copyright watermark, which is complex and inefficient. Summary of the invention
[0004] The present invention aims to solve the above technical problems existing in the prior art and provides a dual copyright protection method based on a diffusion model and a zero watermark.
[0005] The technical solution of the present invention is: a dual copyright protection method based on a diffusion model and a zero watermark, the sender sequentially follows steps 1-4, and the receiver sequentially follows steps 5-8:
[0006] Step 1: Generate copyright information for the secret image
[0007] Step 1.1 reads the copyright watermark image and determines whether it is a grayscale image. If not, converts it into a grayscale image;
[0008] Step 1.2: scramble the image copyright watermark image to generate a scrambled image copyright watermark image W;
[0009] Step 1.3: perform integer wavelet transform on the secret image X and perform bit plane decomposition on the low frequency approximation subband CA;
[0010] Step 1.4: Select the three high-order bit planes CA1, CA2, and CA3 after decomposition, and perform XOR operation with W according to formula (1) to construct three zero-watermark images F1, F2, and F3;
[0011]
[0012] Step 1.5: The three constructed zero-watermark images F1, F2, and F3 are stored in the copyright certification center as image copyright information;
[0013] Step 2: The secret image X is forward sampled and denoised by the diffusion model to obtain the noisy image Z1
[0014] Step 2.1 Read the secret image X, set X0 = X, use X0 as the input of the diffusion model, perform the forward sampling process of the diffusion model, and gradually add noise from X0 to obtain the noise image X of the tth step t , t is the time step, t=1, 2, 3, ...T;
[0015] Step 2.2 outputs the noise image of step T, denoted as noise image Z1;
[0016] Step 3: Generate model copyright information
[0017] Step 3.1 reads the model copyright watermark image and determines whether it is a grayscale image. If not, converts it into a grayscale image;
[0018] Step 3.2 scrambles the model copyright watermark image to generate a scrambled model copyright watermark image M;
[0019] Step 3.3 Perform integer wavelet transform on the noise image Z1 and apply it to the low-frequency approximation subband CA ’ Perform bit plane decomposition;
[0020] Step 3.4 Select the three high-order bit planes CA after decomposition ’ 1. CA ’ 2. CA ’ 3. According to formula (2), perform XOR operation with M to construct three zero-watermark images F4, F5, and F6;
[0021]
[0022] Step 3.5: The three constructed zero-watermark images F4, F5, and F6 are stored in the copyright certification center as model copyright information;
[0023] Step 4: Generate a encrypted image
[0024] The noise image Z1 is used as the input of the diffusion model backward sampling, and the public key K1 is used as the prompt word. After backward sampling, the secret image Cont is generated. The public key K1 describes the content of the secret image. The diffusion model parameters are the same as those of step 2.
[0025] Step 5: Add noise to the secret image Cont to obtain the noise image Z2
[0026] Step 5.1 Read the encrypted image Cont, let X’ 0 = Cont, X ’ 0 is used as the input of the diffusion model to perform the forward sampling process of the diffusion model, starting from X ’ 0 Step by step noise is added to get the noise image X of step t ’ t , t is the time step, t=1, 2, 3, ...T, and the diffusion model parameters are the same as the diffusion model parameters in step 2;
[0027] Step 5.2 outputs the noise image of step T, denoted as noise image Z2;
[0028] Step 6: Model Copyright Certification
[0029] Step 6.1: perform integer wavelet transform on the noise image Z2 and perform bit plane decomposition on the low-frequency approximation sub-image CA”;
[0030] Step 6.2 extracts three zero-watermark images F4, F5, and F6 from the copyright certification center;
[0031] Step 6.3: Select the three high-order bit planes CA”1, CA”2, CA”3 after decomposition of CA”, and perform XOR operation with F4, F5, F6 according to formula (3) to obtain M1, M2, M3;
[0032]
[0033] Step 6.4 extracts the zero watermark according to formula (4):
[0034]
[0035] Step 6.5 for M a De-scrambling to get the model copyright watermark M b ;
[0036] Step 6.6 Model Copyright Image M b Perform median filtering to remove noise and obtain the model copyright information image;
[0037] Step 6.7 authenticates or traces the extracted model copyright information;
[0038] Step 7: Secret Image Restoration
[0039] The noise Z2 is used as the input of the diffusion model backward sampling, and the secret key K2 is used as the prompt word. The secret image is restored through backward sampling. The public key K2 describes the content of the secret image. The diffusion model parameters are the same as those of the diffusion model in step 4.
[0040] Step 8: Secret Image Copyright Verification
[0041] Step 8.1 extracts three zero-watermark images F1, F2, and F3 from the copyright certification center;
[0042] Step 8.2: perform integer wavelet transform on the restored secret image and perform bit plane decomposition on the low-frequency approximation sub-image CA'';
[0043] Step 8.3: Select three high-order bit planes CA''1, CA''2, CA''3, and perform XOR operations with F1, F2, F3 respectively according to formula (5) to obtain W1, W2, W3:
[0044]
[0045] Step 8.4 extracts the zero watermark according to formula (6):
[0046]
[0047] Step 8.5: W a Descramble to get the image copyright watermark W b ;
[0048] Step 8.6: extract the copyright watermark W of the image b Perform median filtering to remove noise and obtain the image copyright information image;
[0049] Step 8.8 authenticates or traces the copyright information of the extracted image.
[0050] On the one hand, the present invention uses a zero watermark to steganographically record a secret image, inputs the secret image into a diffusion model to add noise to obtain a noise image in the generation stage, then uses a public key as a prompt word of the diffusion model to generate a secret image, then inputs the secret image into the diffusion model to add noise to obtain a noise image in the restoration stage, and finally uses the secret key as a prompt word of the diffusion model to restore the image, extracts the watermark through the restored image, obtains the copyright information of the image, and performs authentication or tracing, thereby better protecting the copyright of the image; on the other hand, with the help of the two generated noise images and the zero watermark, the copyright authentication and tracing of the diffusion model are realized, without the need to adjust the diffusion model, and the operation is simple and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of an embodiment of the present invention.
[0052] Figure 2 It is the image copyright watermark image of the embodiment of the present invention.
[0053] Figure 3 It is the copyright image extracted by the embodiment of the present invention.
[0054] Figure 4 This is the copyright information image after median filtering and denoising according to the embodiment of the present invention.
[0055] Figure 5 is a model copyright image of an embodiment of the present invention.
[0056] Figure 6 is a model copyright image extracted by an embodiment of the present invention.
[0057] Figure 7 This is the model copyright information image after median filtering and denoising according to an embodiment of the present invention.
[0058] Figure 8 It is a noise image in the secret image generation stage of an embodiment of the present invention.
[0059] Fig. 9 It is a noise image in the secret image restoration stage of an embodiment of the present invention.
[0060] Fig.10 It is a schematic diagram of an original image, a encrypted image, and a restored image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The present invention provides a dual copyright protection method based on a diffusion model and a zero watermark, such as Figure 1 As shown, the sender follows steps 1-4 in sequence, and the receiver follows steps 5-8 in sequence:
[0062] Step 1: Generate copyright information for the secret image
[0063] Step 1.1 Read Figure 2 The copyright watermark image shown is judged whether it is a grayscale image, and if not, it is converted into a grayscale image;
[0064] Step 1.2 Arnold scrambling is performed on the copyright watermark image to generate a scrambled copyright watermark image W;
[0065] Step 1.3: perform integer wavelet transform on the secret image X and perform bit plane decomposition on the low frequency approximation subband CA;
[0066] Step 1.4: Select the three high-order bit planes CA1, CA2, and CA3 after decomposition, and perform XOR operation with W according to formula (1) to construct three zero-watermark images F1, F2, and F3;
[0067]
[0068] Step 1.5: The three constructed zero-watermark images F1, F2, and F3 are stored in the copyright certification center as image copyright information;
[0069] Step 2: The secret image X is forward sampled and denoised by the diffusion model to obtain the noisy image Z1
[0070] Step 2.1 Read the secret image X, set X0 = X, use X0 as the input of the diffusion model (Stable Diffusion), perform the forward sampling process of the diffusion model, and gradually add noise from X0 to obtain the noise image X of the tth step t , t is the time step, t=1, 2, 3, ...T;
[0071] Step 2.2 outputs the noise image of step T, denoted as noise image Z1, as Figure 8 As shown;
[0072] Step 3: Generate model copyright information
[0073] Step 3.1 Read Figure 5 The model copyright watermark image shown is judged whether it is a grayscale image, and if not, it is converted into a grayscale image;
[0074] Step 3.2 performs Arnold scrambling on the model copyright watermark image to generate a scrambled model copyright watermark image M;
[0075] Step 3.3 Perform integer wavelet transform on the noise image Z1 and apply it to the low-frequency approximation subband CA ’ Perform bit plane decomposition;
[0076] Step 3.4 Select the three high-order bit planes CA after decomposition ’ 1. CA ’ 2. CA ’ 3. According to formula (2), perform XOR operation with M to construct three zero-watermark images F4, F5, and F6;
[0077]
[0078] Step 3.5: The three constructed zero-watermark images F4, F5, and F6 are stored in the copyright certification center as model copyright information;
[0079] Step 4: Generate a encrypted image
[0080] The noise image Z1 is used as the input of the diffusion model backward sampling, and the public key K1 is used as the prompt word. After backward sampling, the secret image Cont is generated. The public key K1 describes the content of the secret image. The diffusion model parameters are the same as those of step 2.
[0081] If the original secret image is an image of a kitten, and the kitten image is used to generate a puppy image as the secret image through the diffusion model, then the public key K1 is 'a dog';
[0082] Step 5: Add noise to the secret image Cont to obtain the noise image Z2
[0083] Step 5.1 Read the encrypted image Cont, let X ’ 0 = Cont, X ’ 0 is used as the input of the diffusion model to perform the forward sampling process of the diffusion model, starting from X ’ 0 Step by step noise is added to get the noise image X of step t ’ t , t is the time step, t=1, 2, 3, ...T, and the diffusion model parameters are the same as the diffusion model parameters in step 2;
[0084] Step 5.2 outputs the noise image of step T, denoted as noise image Z2, as Fig. 9 As shown;
[0085] Since the trajectories of the forward sampling process and the backward sampling process of the diffusion model are similar, the noise image Z2 is basically the same as the noise image Z1;
[0086] Step 6: Model Copyright Certification
[0087] Step 6.1: perform integer wavelet transform on the noise image Z2 and perform bit plane decomposition on the low-frequency approximation sub-image CA”;
[0088] Step 6.2 extracts three zero-watermark images F4, F5, and F6 from the copyright certification center;
[0089] Step 6.3: Select the three high-order bit planes CA”1, CA”2, CA”3 after decomposition of CA”, and perform XOR operation with F4, F5, F6 according to formula (3) to obtain M1, M2, M3;
[0090]
[0091] Step 6.4 extracts the zero watermark according to formula (4):
[0092]
[0093] Step 6.5 for M a The reverse scrambling is obtained as Figure 6 Model copyright watermark M shown b ;
[0094] Step 6.6 Model Copyright Image M b Perform median filtering to denoise and obtain Figure 7 Model copyright information image shown;
[0095] Step 6.7 authenticates or traces the extracted model copyright information;
[0096] The extracted model copyright image M b,The similarity comparison between the model copyright information image and the original image under different attack methods is shown in Table 1:
[0097] Table 1
[0098]
[0099] Step 7: Secret Image Restoration
[0100] The noise Z2 is used as the input of the diffusion model backward sampling, and the secret key K2 is used as the prompt word. The secret image is restored through backward sampling. The secret key K2 describes the content of the secret image. The diffusion model parameters are the same as those of the diffusion model in step 4.
[0101] If the original secret image is an image of a kitten, and the kitten image is used to generate a puppy image as the secret image through the diffusion model, then the secret key K2 is 'a cat';
[0102] Since the noise image Z1 is almost the same as the noise image Z2, the restored image and the secret image generated under the same model parameters are also almost the same, which has no effect on the image semantics;
[0103] Step 8: Secret Image Copyright Verification
[0104] Step 8.1 extracts three zero-watermark images F1, F2, and F3 from the copyright certification center;
[0105] Step 8.2: perform integer wavelet transform on the restored secret image and perform bit plane decomposition on the low-frequency approximation sub-image CA'';
[0106] Step 8.3: Select three high-order bit planes CA''1, CA''2, CA''3, and perform XOR operations with F1, F2, F3 respectively according to formula (5) to obtain W1, W2, W3:
[0107]
[0108] Step 8.4 extracts the zero watermark according to formula (6):
[0109]
[0110] Step 8.5: W a The reverse scrambling is obtained as Figure 3 The images shown are copyright watermarked W b ;
[0111] Step 8.6: extract the copyright watermark W of the image b Perform median filtering to denoise and obtain Figure 4 Copyright information images shown;
[0112] Step 8.8 authenticates or traces the copyright information of the extracted image.
[0113] The extracted image copyright image W b ,The similarity of the image copyright information image is compared with the original image under different attack methods. The results are shown in Table 2:
[0114] Table 2
[0115]
[0116] From Table 1 and Table 2, it can be seen that the similarity between the model copyright watermark extracted by the present invention and the image copyright watermark after denoising is the same as the original Figure 10 The results are very close and robust after being attacked.
[0117] Five groups of experiments were conducted in the present invention. Fig.10 The images shown in a, d, g, j, and m are secret images, and the corresponding secret images are as follows: Fig.10 As shown in b, e, h, k, and n in the figure, the corresponding restored image is as follows Fig.10 As shown in c, f, i, l, and o.
[0118] from Fig.10 It can be seen that the generated secret image has a large semantic difference from the secret image, and the restored secret image has a better effect.
Claims
1. A dual copyright protection method based on diffusion model and zero watermark, characterized by: The sender follows steps 1-4 in sequence, and the receiver follows steps 5-8 in sequence: Step 1: Generate copyright information for the secret image Step 1.1 reads the copyright watermark image and determines whether it is a grayscale image. If not, converts it into a grayscale image; Step 1.2: scramble the image copyright watermark image to generate a scrambled image copyright watermark image W; Step 1.3: perform integer wavelet transform on the secret image X and perform bit plane decomposition on the low frequency approximation subband CA; Step 1.4: Select the three high-order bit planes CA1, CA2, and CA3 after decomposition, and perform XOR operation with W according to formula (1) to construct three zero-watermark images F1, F2, and F3; Step 1.5: The three constructed zero-watermark images F1, F2, and F3 are stored in the copyright certification center as image copyright information; Step 2: The secret image X is forward sampled and denoised by the diffusion model to obtain the noisy image Z1 Step 2.1 Read the secret image X, set X0 = X, use X0 as the input of the diffusion model, perform the forward sampling process of the diffusion model, and gradually add noise from X0 to obtain the noise image X of the tth step t , t is the time step, t=1, 2, 3, ...T; Step 2.2 outputs the noise image of step T, denoted as noise image Z1; Step 3: Generate model copyright information Step 3.1 reads the model copyright watermark image and determines whether it is a grayscale image. If not, converts it into a grayscale image; Step 3.2 scrambles the model copyright watermark image to generate a scrambled model copyright watermark image M; Step 3.3 Perform integer wavelet transform on the noise image Z1 and apply it to the low-frequency approximation subband CA ’ Perform bit plane decomposition; Step 3.4 Select the three high-order bit planes CA after decomposition ’ 1. CA ’ 2. CA ’ 3. According to formula (2), perform XOR operation with M to construct three zero-watermark images F4, F5, and F6; Step 3.5: The three constructed zero-watermark images F4, F5, and F6 are stored in the copyright certification center as model copyright information; Step 4: Generate a encrypted image The noise image Z1 is used as the input of the diffusion model backward sampling, and the public key K1 is used as the prompt word. After backward sampling, the secret image Cont is generated. The public key K1 describes the content of the secret image. The diffusion model parameters are the same as those of step 2. Step 5: Add noise to the secret image Cont to obtain the noise image Z2 Step 5.1 Read the encrypted image Cont, let X ’ 0 = Cont, X ’ 0 is used as the input of the diffusion model to perform the forward sampling process of the diffusion model, starting from X ’ 0 Step by step noise is added to get the noise image X of step t ’ t , t is the time step, t=1, 2, 3, ...T, and the diffusion model parameters are the same as the diffusion model parameters in step 2; Step 5.2 outputs the noise image of step T, denoted as noise image Z2; Step 6: Model Copyright Certification Step 6.1: perform integer wavelet transform on the noise image Z2 and perform bit plane decomposition on the low-frequency approximation sub-image CA”; Step 6.2 extracts three zero-watermark images F4, F5, and F6 from the copyright certification center; Step 6.3: Select the three high-order bit planes CA”1, CA”2, CA”3 after decomposition of CA”, and perform XOR operation with F4, F5, F6 according to formula (3) to obtain M1, M2, M3; Step 6.4 extracts the zero watermark according to formula (4): Step 6.5 for M a De-scrambling to get the model copyright watermark M b ; Step 6.6 Model Copyright Image M b Perform median filtering to remove noise and obtain model copyright information; Step 6.7 authenticates or traces the extracted model copyright information; Step 7: Secret Image Restoration The noise Z2 is used as the input of the diffusion model backward sampling, and the secret key K2 is used as the prompt word. The secret image is restored through backward sampling. The public key K2 describes the content of the secret image. The diffusion model parameters are the same as those of the diffusion model in step 4. Step 8: Secret Image Copyright Verification Step 8.1 extracts three zero-watermark images F1, F2, and F3 from the copyright certification center; Step 8.2: perform integer wavelet transform on the restored secret image and perform bit plane decomposition on the low-frequency approximation sub-image CA''; Step 8.3: Select three high-order bit planes CA'1, CA'2, CA'3, and perform XOR operations with F1, F2, F3 respectively according to formula (5) to obtain W1, W2, W3: Step 8.4 extracts the zero watermark according to formula (6): Step 8.5: W a Descramble to get the image copyright watermark W b ; Step 8.6: extract the copyright watermark W of the image b Perform median filtering to remove noise and obtain image copyright information; Step 8.8 authenticates or traces the copyright information of the extracted image.
Citation Information
Cited By
AIGC image watermarking method and system based on diffusion model generation path deflection
CN120339030A
Diffusion model intellectual property protection method and system based on plug-in type zero watermark
CN121438039A
Plug-in type zero watermark-based diffusion model intellectual property protection method and system
CN121438039B
