The invention relates to a robust watermarking method of a
diffusion model based on an error
correction code, which belongs to the technical field of
large model watermarking, and comprises the following steps of: encoding a
watermark message by using a Reed-Solomon error
correction code to generate a
code word containing redundancy check information; carrying out
randomization processing on the
code word to generate a pseudo-random bit
stream; embedding the pseudo-random bit
stream into a variable of an initial
Gaussian potential space of a
diffusion model by adopting a distribution preserving sampling technology; and finally, generating an image with a
watermark through a denoising process of the
diffusion model. When the
watermark is extracted,
reverse diffusion processing is carried out on an image which is possibly damaged to recover an approximate value of a
potential space variable, a
code word which is possibly damaged is extracted from the approximate value, and original watermark information is recovered by utilizing the error correction capability of a Reed-Solomon decoder. On the premise of keeping the generation performance, the robustness of the watermark to compression,
noise,
cutting and other potential tampering attacks is enhanced.