A zero-watermarking method and system based on dynamic block orthogonal encryption diffusion model

The diffusion model zero-watermarking method, based on dynamic block orthogonal encryption, solves the balance problem between generation quality and robustness in diffusion model watermarking methods, achieving lossless and training-free copyright protection and improving the copyright protection capability of the diffusion model.

CN122413403BActive Publication Date: 2026-11-10HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610883486.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-11-10
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

Existing diffusion model watermarking methods struggle to balance generation quality, robustness, and training-free deployment, and traditional zero-watermarking techniques cannot effectively utilize the mathematical properties of diffusion models to achieve stable, unique, and secure copyright protection.

Method used

A zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption is adopted. User seeds are generated through hash message authentication codes, latent space fingerprints are allocated using the Box-Muller algorithm, and orthogonal transformation operators are constructed to encrypt latent variables. Copyright ownership verification is achieved by combining diffusion inversion and inverse orthogonal transformation.

Benefits of technology

It maintains the same generation quality, improves robustness to image processing operations, reduces computational load and key storage requirements, provides a huge key space and ill-conditioned fingerprint inversion, prevents forgery attacks, and supports large-scale real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122413403B_ABST
    Figure CN122413403B_ABST
Patent Text Reader

Abstract

This invention relates to the field of digital copyright protection technology for AI-generated content, and discloses a zero-watermarking method and system based on dynamic block orthogonal encryption for a diffusion model. The method utilizes a hash message authentication code algorithm to generate user seeds corresponding to each user, and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; it generates a session key based on the user's generation request session information and user seeds, and constructs an orthogonal transformation operator; it encrypts the latent space fingerprint using the orthogonal transformation operator to obtain encrypted latent variables; it inputs the encrypted latent variables into a pre-trained latent diffusion model to generate an image; it performs a deterministic diffusion model inversion operation on the image to be detected to recover approximate initial latent variables; it decrypts the recovered approximate initial latent variables using an inverse decryption operator to obtain the restored latent space fingerprint; if the similarity exceeds a preset threshold, it determines that the image copyright belongs to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital copyright protection technology for AI-generated content, and in particular to a zero-watermarking method and system based on a diffusion model of dynamic block orthogonal encryption. Background Technology

[0002] With the rapid development of deep learning technology, Latent Diffusion Models (LDMs), represented by Stable Diffusion, have made groundbreaking progress in the field of image generation, endowing users with unprecedented creative capabilities. However, this has also triggered a growing digital trust crisis, including copyright infringement, illegal content generation, and the spread of misinformation. Therefore, establishing a reliable content ownership authentication mechanism to achieve copyright protection and traceability of AI-generated content has become an urgent task.

[0003] Existing diffusion-based copyright protection technologies mainly rely on digital watermarking, which can be broadly categorized into three types: Post-processing embedding: This method modifies the frequency domain coefficients (such as DCT and DWT) after image generation to embed the watermark. This type of method is prone to image distortion and has poor robustness against attacks such as compression and cropping.

[0004] Model fine-tuning: This involves fine-tuning the decoder to implant the watermark into the network. This requires expensive training and the fine-tuning process may compromise the original model's generative capabilities, affecting the quality of the generated data.

[0005] Latent-based embedding: This method directly injects the watermark signal into the latent space or constructs latent variables with a specific distribution. However, this type of method inevitably introduces an external watermark signal, which violates the original standard Gaussian distribution assumption of the diffusion model and leads to a decrease in generation quality.

[0006] While the aforementioned methods are effective to some extent, they all face the challenge of striking a balance between Fidelity, robustness, and training-free deployment. Furthermore, although traditional zero-watermarking techniques do not modify the original data and achieve protection through feature extraction and registration, for content generated based on diffusion models, the key challenge lies in leveraging the mathematical properties of these models to establish a stable, unique, and secure mapping between generated content and user identity. This would enable robust, lossless, and training-free forensics methods, which are crucial for the practical application of generative diffusion models. Summary of the Invention

[0007] To address the technical challenges of existing diffusion model watermarking methods, such as image quality loss, high model fine-tuning costs, susceptibility to statistical attacks on static watermarking patterns, latent variable distribution shifts, and difficulties in multi-user attribution, this invention provides a diffusion model latent space zero-watermarking method based on dynamic block-based orthogonal encryption. While maintaining the initial standard Gaussian distribution of latent variables, this method dynamically binds user identity to the generated session and verifies copyright ownership through diffusion inversion and inverse orthogonal transformation.

[0008] To achieve the above objectives, the present invention adopts the following technical solution, including: A diffusion model zero-watermarking method based on dynamic block orthogonal encryption includes the following steps: S1, obtain the user's unique identifier and model master key, and use the hash message authentication code algorithm to perform key derivation on the user's unique identifier to generate a user seed corresponding to the user. S2 initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; S3, based on the user's generated request session information, obtain the session index of the generated request, combine the user seed and the session index to generate a session key, and construct an orthogonal transformation operator based on the session key; S4, use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variables; S5, the encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model to generate images under the guidance of text prompts; S6. Perform a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; reconstruct the inverse decryption operator based on the candidate user and candidate session indexes, decrypt the recovered approximate initial latent variables, and obtain the restored latent space fingerprint. S7. Calculate the similarity between the restored latent space fingerprint and the latent space fingerprint. If the similarity exceeds a preset threshold, it is determined that the image copyright belongs to the user.

[0009] Preferably, the specific steps of step S1 are as follows: Define the user set as... For users Using a hash message authentication code algorithm, a user-defined authentication code is generated. Corresponding deterministic user seed : ; in, For the model master key, A unique identifier for the user. This is a hash message authentication code algorithm.

[0010] Preferably, the specific steps of step S2 are as follows: S21, using user seeds Initialize the cryptographically secure pseudo-random number generator to generate two independent sequences of uniformly distributed random variables. ,in ; S22, Using the Box-Muller transform to transform a uniformly distributed random variable sequence Mapped to latent space fingerprint : ; in, For element index, For users Latent space fingerprints, .

[0011] Preferably, the specific steps of step S3 are as follows: S31, based on user The The session information for the generated request is then obtained, along with the session index of that generated request. ; S32, based on user seed and user session index Calculate the session seed and its corresponding random permutation seed Calculate the session key : ; in, For session key; For hash message authentication code algorithms; S33, Construct a block-diagonal orthogonal matrix based on the session key and latent space fingerprint. ; S34, using random seed arrangement Generate a global random scramble matrix ; S35, Constructing Orthogonal Transformation Operators : .

[0012] Preferably, the specific operation steps of step S32 are as follows: S321 divides the latent space fingerprint into The size is The sub-block; S322, using session seed and The size is The sub-blocks are generated A number of independent random Gaussian matrices ; S323, for the first j Gaussian matrices Perform QR decomposition to obtain the first j orthogonal sub-blocks , : ; in, This is the weight coefficient matrix; S324, Construct a block-diagonal orthogonal matrix : ; in, These are matrix operation functions; For direct sum operators; Preferably, the specific operation steps of step S4 are as follows: using an orthogonal transformation operator. latent space fingerprints Perform the transformation to obtain the encrypted latent variable. : ; in, This means flattening the tensor into a vector. This means converting a vector back into a tensor. It is a block-diagonal orthogonal matrix. This is a globally randomized scrambled matrix.

[0013] Preferably, the specific steps of step S6 are as follows: S61, using the deterministic DDIM Inversion algorithm, the image to be detected... Mapping back to approximate initial latent variables : ; in, For empty conditions / no conditions, 1 represents the number of complete inversion steps. These are the parameters of the pre-trained potential diffusion model. This is a reverse denoising inversion operation; S62, assuming the user to be verified is... The user generates the request session information as the first... Next, utilizing the property that the inverse of an orthogonal matrix is ​​equal to its transpose, a latent space fingerprint restored by inverse transformation is constructed. : ; in, This is the transpose of a block diagonal orthogonal matrix. This is the transpose of the globally randomized scrambled matrix. To restore a vector to a tensor.

[0014] Preferably, the specific operation steps of step S7 are as follows: calculate the restored latent space fingerprint. With latent space fingerprints cosine similarity : ; If similarity , If a preset threshold is set, the image copyright is determined to belong to the user corresponding to the latent space fingerprint, thus confirming that the image copyright belongs to the user. , It is the cosine operator.

[0015] A diffusion model zero-watermarking system based on dynamic block orthogonal encryption is proposed, applicable to the aforementioned diffusion model zero-watermarking method based on dynamic block orthogonal encryption. The diffusion model zero-watermarking system includes: Seed generation module: Obtains the user's unique identifier and model master key, uses the hash message authentication code algorithm to perform key derivation on the user's unique identifier, and generates a user seed corresponding to the user; Fingerprint construction module: Initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; Block encryption module: Based on the user's generation request session information, obtain the session index of the generation request, generate a session key by combining the user seed and the session index, construct an orthogonal transformation operator based on the session key, and use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variable; Lossless generation module: The encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model to generate images under the guidance of text prompts; The tracing module performs a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; it reconstructs the inverse decryption operator based on the candidate user and candidate session indexes to decrypt the recovered approximate initial latent variables and obtain the restored latent space fingerprint. Copyright determination module: Calculates the similarity between the restored fingerprint and the registered fingerprint. If the similarity exceeds a preset threshold, the copyright of the image is determined to belong to the user.

[0016] An electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned diffusion model zero-watermarking method based on dynamic block orthogonal encryption.

[0017] The advantages of this invention are: 1. This invention proves the iso-interval invariance of encryption operations, and the encrypted latent variables strictly follow a standard Gaussian distribution, eliminating artifacts and quality degradation introduced by traditional watermarking due to the embedding of external signals.

[0018] 2. This invention does not embed any explicit watermark signal, but binds the identity to the inherent characteristics of the initial noise. Within a preset perturbation intensity range, the method can maintain the detectable correlation between the restored fingerprint and the registered fingerprint, thereby improving the robustness to common post-processing operations such as compression, scaling, noise addition, and brightness adjustment.

[0019] 3. The present invention adopts a dynamic key mechanism with a huge key space (2256), and fingerprint inversion is an ill-conditioned problem, so attackers cannot deceive the system by forging fingerprints.

[0020] 4. The present invention adopts a multiplexing block and matrix parallel strategy, which significantly reduces the amount of encryption computation and key storage requirements, and supports large-scale real-time detection. Attached Figure Description

[0021] Figure 1 The flowchart shows a zero-watermarking method based on dynamic block orthogonal encryption diffusion model provided in Example 1.

[0022] Figure 2 This is a schematic diagram of a diffusion model zero-watermarking system based on dynamic block orthogonal encryption, provided in Example 2.

[0023] Figure 3 This is a schematic diagram illustrating the storage and encryption analysis results.

[0024] Figure 4 This is a schematic diagram of the experimental results for detecting efficiency. Detailed Implementation

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Example 1 Please see Figure 1 , Figure 1This is a flowchart of a diffusion model zero-watermarking method based on dynamic block orthogonal encryption provided in this embodiment. The diffusion model zero-watermarking method includes the following steps: S1, obtain the user's unique identifier and model master key, and use the hash message authentication code algorithm to perform key derivation on the user's unique identifier to generate a user seed corresponding to the user. In this embodiment, the user's unique identifier is obtained. and model master key Define the user set as For users Using the Hash-based Message Authentication Code (HMAC) algorithm, a unique identifier is generated for the user. Corresponding deterministic user seed : ; in, For the model master key, A unique identifier for the user. This is a hash message authentication code algorithm.

[0027] S2 initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; In this embodiment, the specific operation steps of step S2 are as follows: S21, using user seeds Initialize a cryptographically secure pseudo-random number generator (CSPRNG) to generate two independent sequences of uniformly distributed random variables. ,in ; S22, using the Box-Muller algorithm to process uniformly distributed random variable sequences Mapped to latent space fingerprint : ; in, This is the element index after the latent space fingerprint is flattened. Each element follows a standard normal distribution, i.e. .

[0028] S3, based on the user's generated request session information, obtain the session index of the generated request, combine the user seed and the session index to generate a session key, and construct an orthogonal transformation operator based on the session key; In this embodiment, the specific operation steps of step S3 are as follows: S31, based on user The The session information for the generated request is then obtained, along with the session index of that generated request. ; S32, based on user seed and user session index Calculate the session seed and its corresponding random permutation seed : ; in, For session key; This is a hash message authentication code algorithm.

[0029] S32, construct a block diagonal orthogonal matrix based on the session key and latent space fingerprint; S321, fingerprint scanning in the latent space Divided into several sizes sub-block; S322, using session seed and A number of sizes Sub-blocks, generated A number of independent random Gaussian matrices ; S323, for each Gaussian matrix QR decomposition yields orthogonal sub-blocks , : ; in, This is the weight coefficient matrix; S324, Construct a block-diagonal orthogonal matrix : ; in, These are matrix operation functions; For direct sum operators; S33, using random seed arrangement Generate a global random scramble matrix It is also an orthogonal matrix; S34, Constructing Orthogonal Transformation Operators : .

[0030] S4, use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variables; In this embodiment, an orthogonal transformation operator is used. latent space fingerprints Perform the transformation to obtain the encrypted latent variable. : ; in, This means flattening the tensor into a vector. This means restoring the vector to a tensor; because and Since they are all orthogonal matrices, the orthogonal transformation operator... It is also an orthogonal matrix (i.e.) According to the Gaussian distribution's isometric invariance theorem, if Then the transformed It still follows a standard Gaussian distribution .

[0031] S5, the encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model, and an iterative denoising and generation process is performed under the guidance of text prompts to generate an image; In this embodiment, the encrypted latent variable is... Input a pre-trained latent diffusion model (such as StableDiffusion) into the text prompt word and guiding scale Denoising is generated under the control of the image. : ; in, For denoising function, For text prompts, To guide the scale, These are the parameters of the pre-trained potential diffusion model.

[0032] Due to input noise The distribution of the latent diffusion model parameters perfectly matches the prior distribution during model pre-training, therefore, it is not necessary to modify the parameters of the pre-trained latent diffusion model. The generation process theoretically guarantees zero quality loss regardless of any fine-tuning or modification.

[0033] S6. Perform a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; reconstruct the inverse decryption operator based on the candidate user and candidate session indexes, decrypt the recovered approximate initial latent variables, and obtain the restored latent space fingerprint. In this embodiment, the specific operation steps of step S6 are as follows: S61, using the deterministic DDIM Inversion algorithm (or other ODE inverter), the image to be detected... Mapping back to the approximate initial latent space state : ; in, For empty conditions / no conditions (no text / category guidance), 1 represents the total number of inversion steps. These are the parameters of the pre-trained potential diffusion model. This is a reverse denoising inversion operation; S62, assuming the user to be verified is... The user generates request session information for the user. The This generates a request for session information. It utilizes the property that the inverse of an orthogonal matrix is ​​equal to its transpose. Construct inverse transform to recover fingerprint : ; in, This is the transpose of a block diagonal orthogonal matrix. This is the transpose of the globally randomized scrambled matrix. To restore a vector to a tensor.

[0034] S7. Calculate the similarity between the restored fingerprint and the latent space fingerprint. If the similarity exceeds a preset threshold, determine that the image copyright belongs to the user corresponding to the latent space fingerprint.

[0035] Calculate fingerprint recovery With latent space fingerprints cosine similarity : ; If similarity , If a preset threshold is set, the image copyright is determined to belong to the user corresponding to the latent space fingerprint, thus confirming that the image copyright belongs to the user. , This is a cosine operator. Based on the phenomenon of measure concentration in high-dimensional spaces, the probability of fingerprint collisions is extremely low, ensuring the accuracy of authentication.

[0036] Existing latent diffusion models (LDMs) all assume, during training and inference, that the initial latent variables (noise) of the input strictly follow a standard normal distribution. Traditional latent space watermarking methods often embed watermarks by superimposing external signals or modifying the distribution, which violates the above prior assumptions and leads to artifacts in the generated images. This invention solves this problem by constructing a special orthogonal encryption operator.

[0037] Specifically, the orthogonal transformation operator constructed in this invention By block diagonal orthogonal matrix and global scrambling matrix Composed of multiple components, i.e. Among them, the scrambling matrix It is a rearrangement of vector elements, belonging to orthogonal matrices; block diagonal matrices. The sub-blocks are all orthogonal matrices. According to matrix theory, the orthogonal group... Closed to multiplication, the orthogonal transformation operator M must satisfy the orthogonality condition: ; Secondly, based on the isometric invariance theorem of Gaussian distribution, we prove that the distribution of the latent variables remains unchanged after encryption. Let the original user fingerprint... Follows a standard normal distribution The encrypted latent variable is defined as We analyze the statistical properties of the encrypted latent variables by calculating their first moment (mean) and second moment (covariance): 1. Mean invariance: Due to the properties of linear transformation, the mean after encryption is: ; 2. Covariance invariance, using orthogonal matrices The property of the encrypted covariance is: ; Since the multivariate Gaussian distribution is completely determined by its mean and covariance matrix, we can conclude that: This means that the encrypted data is statistically identical to standard noise, and will not introduce any distribution bias when input into the diffusion model, thus theoretically guaranteeing zero quality loss in the generation.

[0038] The fingerprint recognition method of this invention relies on the cosine similarity between the reconstructed fingerprint and the latent space fingerprint. Mathematically, the reliability of this process is guaranteed by the concentration of measure phenomenon in high-dimensional probability theory.

[0039] In this invention, the latent space dimension Maximum (e.g.) ), where the latent space vector consists of a dimension of The three-dimensional feature map is flattened to obtain the result that satisfies the condition. , For the number of channels, For height, Let be the width. For any two independent random fingerprint vectors (or an attacker's random guess vector), the probability that they are approximately orthogonal on a high-dimensional sphere is extremely high. We define cosine similarity. This is used as an authentication metric. Based on high-dimensional geometric theory, the similarity between independent random vectors... Greater than a certain threshold Collision probability There exists a strict exponential upper bound: ; The above formula shows that, with the dimension As the fingerprint increases, the probability of false positives decreases exponentially. In the high-dimensional latent space of practical applications, this probability asymptotically approaches zero. Therefore, the probability of an attacker bypassing authentication through random collisions without a key is mathematically negligible, thus ensuring the uniqueness of the fingerprint and the system's resistance to impersonation.

[0040] The security of this invention is based on the computational difficulty and the ill-posedness of the inverse problem, and is mainly reflected in two aspects: resistance to key recovery and resistance to fingerprint forgery.

[0041] (1) Anti-key recovery capability The orthogonal transformation operator of the present invention It is derived from the session seed using a cryptographically secure pseudo-random number generator (CSPRNG), and the seed is derived from the root key. If an attacker attempts to recover the encryption matrix, it is equivalent to guessing the seed within a vast key space. For a key length of... With a seed of 256 bits or less, the probability of an attacker succeeding is: ; The computational cost of exhaustively exploring this space far exceeds the current physical computing limits, therefore brute-force is computationally infeasible.

[0042] (2) Anti-fingerprint forgery capability Attackers might attempt to reverse engineer a user's original fingerprint by collecting a large number of "image-inversion latent variable" pairs. Assuming the attacker obtains the first... The observed value is Its observation equation can be expressed as: ; in Unknown errors are introduced into the model inversion. This is a severely underdetermined system of equations because of the unknown parameters (orthogonal transformation operators). The degrees of freedom are approximately The number of equations is far greater than the number of observation equations. ).

[0043] Even if the attacker tries to... To eliminate randomness by averaging the observations, and using the law of large numbers, the convergence limit of the sample mean is: ; Due to orthogonal transformation operators In the orthogonal group For uniform sampling, the expected value is a zero matrix, i.e. Therefore, the above equation converges to: ; The above derivation proves that the result after statistical averaging converges only to the systematic bias of the model, while the fingerprint signal containing user identity... It was completely eliminated. This mathematically proves that attackers cannot extract valid fingerprints from the observation data, thus ensuring the system's security.

[0044] Example 2 Please see Figure 2 , Figure 2 This is a schematic diagram of a diffusion model zero-watermarking system based on dynamic block orthogonal encryption provided in this embodiment. The diffusion model zero-watermarking system includes: Seed generation module: Obtains the user's unique identifier and model master key, uses the hash message authentication code algorithm to perform key derivation on the user's unique identifier, and generates a user seed corresponding to the user; Fingerprint construction module: Initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; Block encryption module: Based on the user's generation request session information, obtain the session index of the generation request, generate a session key by combining the user seed and the session index, construct an orthogonal transformation operator based on the session key, and use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variable; Lossless generation module: The encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model to generate images under the guidance of text prompts; The tracing module performs a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; it reconstructs the inverse decryption operator based on the candidate user and candidate session indexes to decrypt the recovered approximate initial latent variables and obtain the restored latent space fingerprint. Copyright determination module: Calculates the similarity between the restored fingerprint and the registered fingerprint. If the similarity exceeds a preset threshold, the copyright of the image is determined to belong to the user.

[0045] Example 3 To verify the effectiveness of the method proposed in Example 1, this example uses the Stable Diffusion V2.1 model for verification: 1. Robustness verification.

[0046] Robustness tests were conducted on the watermarked generated image, which is the original watermarked image. The attacks included image rotation, scaling, JPEG compression, Gaussian noise, and brightness adjustment. Test results show that the proposed method achieves a TPR@1%FPR of no less than 0.99 and an AUC above 0.99 under all attack conditions, as shown in Table 1.

[0047] Table 1: Comparison of robustness performance of different methods

[0048] Under the same testing environment, the DwtDctSvd method (a joint method of discrete wavelet-discrete cosine-singular value decomposition) saw its TPR@1%FPR decrease to 0.428 and AUC (area under the ROC curve) decrease to 0.729 under perturbation; the StableSig method (a stable signature watermarking method for latent diffusion models) saw its TPR@1%FPR decrease to 0.893 and AUC decrease to 0.859 under perturbation; and the TreeRing method (a tree ring fingerprint watermarking method for diffusion models) saw its TPR@1%FPR decrease to 0.680 and AUC decrease to 0 under perturbation. 894; The GauShad method (diffusion model Gaussian coloring invisible watermarking method) reduces TPR@1%FPR to 0.944 and AUC to 0.928 under perturbation conditions; the PRC method (diffusion model PRC frequency domain watermarking method) reduces TPR@1%FPR to 0.971 and AUC to 0.832 under perturbation conditions; the BlockW method (diffusion model block-based robust watermarking method) reduces TPR@1%FPR to 0.654 and AUC to 0.884 under perturbation conditions. The indicators of this method are significantly better than the above existing methods, demonstrating superior robustness.

[0049] TPR@1%FPR means: the TPR value when the model is tuned to have an FPR of exactly 1%; AUC refers to the area under the ROC curve.

[0050] 2. Non-destructive testing A t-test was used to evaluate the impact of watermark embedding on the quality deviation of the generated images. Watermarked / unwatermarked image pairs were generated separately, and the differences between FID and CLIP-Score were calculated, as shown in Table 2. Experimental data show that the t-value of our method is 0.21 for FID and 0.18 for CLIP score, both significantly lower than the TreeRing method (1.87 / 1.92) and the StableSignature method (2.43 / 2.31).

[0051] Table 2: Comparison of generation quality using different methods

[0052] 3. Verification of storage and detection efficiency.

[0053] This method employs a multiplexing block encryption strategy, with a single watermark encryption taking only 0.11ms and the storage overhead of the pre-computed key table being only 0.31MB. Figure 3 As shown. In large-scale user retrieval tests (10,000 concurrent users), using a matrix parallel computing strategy (batch size=256), the latency for a single watermark detection was 73.72ms, which is lower than the 100ms threshold typically required for real-time applications. Figure 4 As shown, it meets the needs of practical scenarios such as online content review and real-time copyright tracking.

[0054] This embodiment fully validates the effectiveness of the proposed method on Stable Diffusion V2.1: it maintains high robustness under various attacks, has no significant impact on generation quality, and possesses efficient detection capabilities. Its overall performance is significantly superior to the TreeRing and Stable Signature schemes.

[0055] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A zero-watermarking method based on a diffusion model using dynamic block-based orthogonal encryption, characterized in that, Includes the following steps: S1, obtain the user's unique identifier and model master key, and use the hash message authentication code algorithm to perform key derivation on the user's unique identifier to generate a user seed corresponding to the user. S2 initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; S3, based on the user's generated request session information, obtain the session index of the generated request, combine the user seed and the session index to generate a session key, and construct an orthogonal transformation operator based on the session key; S4, use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variables; S5, the encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model to generate images under the guidance of text prompts; S6. Perform a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; reconstruct the inverse decryption operator based on the candidate user and candidate session indexes, decrypt the recovered approximate initial latent variables, and obtain the restored latent space fingerprint. S7. Calculate the similarity between the restored latent space fingerprint and the latent space fingerprint. If the similarity exceeds a preset threshold, it is determined that the image copyright belongs to the user.

2. The zero-watermarking method based on dynamic block orthogonal encryption diffusion model according to claim 1, characterized in that, The specific steps of step S1 are as follows: Define the user set as... For users Using a hash message authentication code algorithm, a user-defined authentication code is generated. Corresponding deterministic user seed : ; in, For the model master key, A unique identifier for the user. This is a hash message authentication code algorithm.

3. The zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption according to claim 1, characterized in that, The specific steps for step S2 are as follows: S21, using user seeds Initialize the cryptographically secure pseudo-random number generator to generate two independent sequences of uniformly distributed random variables. ,in ; S22, Using the Box-Muller transform to transform a uniformly distributed random variable sequence Mapped to latent space fingerprint : ; in, For element index, For users Latent space fingerprints, .

4. The zero-watermarking method based on dynamic block orthogonal encryption diffusion model according to claim 1, characterized in that, The specific steps for step S3 are as follows: S31, based on user The The session information for the generated request is then obtained, along with the session index of that generated request. ; S32, based on user seed and user session index Calculate the session seed and its corresponding random permutation seed Calculate the session key : ; in, For session key; For hash message authentication code algorithms; S33, Construct a block-diagonal orthogonal matrix based on the session key and latent space fingerprint. ; S34, using random seed arrangement Generate a global random scramble matrix ; S35, Constructing Orthogonal Transformation Operators : 。 5. A zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption according to claim 4, characterized in that, The specific steps of step S32 are as follows: S321 divides the latent space fingerprint into The size is The sub-block; S322, using session seed and The size is The sub-blocks are generated A number of independent random Gaussian matrices ; S323, for the first j Gaussian matrices Perform QR decomposition to obtain the first j orthogonal sub-blocks , : ; in, This is the weight coefficient matrix; S324, Construct a block-diagonal orthogonal matrix : ; in, These are matrix operation functions; This is a direct summation operator.

6. A zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption according to claim 3, characterized in that, The specific steps of step S4 are as follows: Use orthogonal transformation operators. latent space fingerprints Perform the transformation to obtain the encrypted latent variable. : ; in, This means flattening the tensor into a vector. This means converting a vector back into a tensor. It is a block-diagonal orthogonal matrix. This is a globally randomized scrambled matrix.

7. A zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption according to claim 3, characterized in that, The specific steps for step S6 are as follows: S61, using the deterministic DDIM Inversion algorithm, the image to be detected... Mapping back to approximate initial latent variables : ; in, For empty conditions / no conditions, 1 represents the number of complete inversion steps. These are the parameters of the pre-trained potential diffusion model. This is a reverse denoising inversion operation; S62, assuming the user to be verified is... The user generates the request session information as the first... Next, utilizing the property that the inverse of an orthogonal matrix is ​​equal to its transpose, a latent space fingerprint restored by inverse transformation is constructed. : ; in, This is the transpose of a block-diagonal orthogonal matrix. This is the transpose of the globally randomized scrambled matrix. To restore a vector to a tensor.

8. A zero-watermarking method based on a diffusion model with dynamic block orthogonal encryption according to claim 1, characterized in that, The specific steps of step S7 are as follows: Calculate the restored latent space fingerprint. With latent space fingerprints cosine similarity : ; If similarity , If a preset threshold is set, the image copyright is determined to belong to the user corresponding to the latent space fingerprint, thus confirming that the image copyright belongs to the user. , It is the cosine operator.

9. A zero-watermarking system based on a diffusion model of dynamic block orthogonal encryption, characterized in that, A diffusion model zero-watermarking method based on dynamic block orthogonal encryption, applicable to any one of claims 1-8, comprises: Seed generation module: Obtains the user's unique identifier and model master key, uses the hash message authentication code algorithm to perform key derivation on the user's unique identifier, and generates a user seed corresponding to the user; Fingerprint construction module: Initializes the pseudo-random number generator using user seeds and assigns a unique latent space fingerprint to each user using the Box-Muller algorithm; Block encryption module: Based on the user's generation request session information, obtain the session index of the generation request, generate a session key by combining the user seed and the session index, construct an orthogonal transformation operator based on the session key, and use the orthogonal transformation operator to encrypt the latent space fingerprint to obtain the encrypted latent variable; Lossless generation module: The encrypted latent variables are used as initial noise input into the pre-trained latent diffusion model to generate images under the guidance of text prompts; The tracing module performs a deterministic diffusion model inversion operation on the image to be detected to recover the approximate initial latent variables; it reconstructs the inverse decryption operator based on the candidate user and candidate session indexes to decrypt the recovered approximate initial latent variables and obtain the restored latent space fingerprint. Copyright determination module: Calculates the similarity between the restored fingerprint and the registered fingerprint. If the similarity exceeds a preset threshold, the copyright of the image is determined to belong to the user.

10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a diffusion model zero-watermarking method based on dynamic block orthogonal encryption as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Data tracing method and device based on cooperative training, equipment and medium

    CN121054031A

  • Medical image digital watermarking method based on perceptual hash and data enhancement

    WO2022205853A1