The invention relates to database safety technology and data anonymization, and specifically relates to an anonymous digital watermarking embedding and extracting method. The embedding method comprises steps of determining watermarking information needing to be embedded, carrying out hash processing, carrying out salted hash calculation, carrying out watermarking index calculation, and obtaining an anonymous data set with a copyright mark after watermarking is embedded; the extracting method comprises steps of reading the anonymous data set, carrying out watermarking index calculation to each row of data, extracting watermarking, reducing watermarking information through a voting mechanism after all rows of data is extracted, and outputting the extracted watermarking information. According to the invention, data is anonymized, at the same time, digital watermarking information is embedded, the imperceptibility is good, private data is prevented from being leaked, rights of the data publisher are guaranteed at the same time, dynamic data publishing is supported, and multi-data source data publishing is supported.