Digital watermark embedding method and extracting method based on multi-scale frequency domain transformation and related equipment
By employing a multi-scale frequency domain transform-based digital watermark embedding and extraction method, the problem of digital watermark loss and detection failure in complex environments is solved, achieving efficient watermark information location and traceability, and improving the robustness and recognition rate of watermarks.
Patent Information
- Application Number
- CN202511851739.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-06
AI Technical Summary
Existing digital watermarking technologies are prone to loss or detection failure during transmission, compression, screenshotting, and re-encoding in various complex environments, making it impossible to accurately locate the source and ownership of content, resulting in difficulties in copyright protection and secure traceability.
A digital watermarking embedding method based on multi-scale frequency domain transformation is adopted. The original digital image is divided into blocks, and the watermark information is embedded in the mid-frequency region in the frequency domain with multiple redundancy. The watermark signal is located and extracted by combining a multi-strategy detection algorithm, thereby improving the concealment and recognition rate of the watermark.
While ensuring image quality, the robustness and anti-attack capabilities of the watermark are improved, enabling secure tracing, location, and extraction of digital watermarks.
Smart Images

Figure CN121616445A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, and in particular to a digital watermark embedding method, extraction method and related equipment based on multi-scale frequency domain transformation. Background Technology
[0002] With the widespread dissemination of digital media content across social media platforms, online transmission, streaming media playback, and cloud storage, the protection of digital content's copyright and its secure traceability have become increasingly important. To achieve the goals of tamper-proofing, anti-theft, and traceability of digital content, digital watermarking technology has become one of the industry's widely adopted solutions. By embedding imperceptible watermark information into images, videos, or audio content, copyright declarations, content verification, and traceability can be achieved without affecting the user's perceived quality. However, in the current stage of digital content transmission, compression, screenshotting, and re-encoding under various complex environments, watermark information is easily lost or fails to be detected, making it impossible to accurately locate the source and ownership of content in a timely manner, posing challenges to copyright protection and security auditing. Therefore, the concealment and recognition rate of digital watermarks need to be improved. Summary of the Invention
[0003] To address one of the aforementioned problems, the main objective of this application is to propose a digital watermark embedding method, extraction method, and related equipment based on multi-scale frequency domain transformation, aiming to improve the concealment and recognition rate of digital watermarks.
[0004] To achieve the above objectives, one aspect of this application proposes a digital watermarking embedding method based on multi-scale frequency domain transform, the method comprising the following steps: Obtain the original digital image and the watermark text to be embedded, and perform a first preprocessing on the original digital image; The original digital image after the first preprocessing is divided into blocks according to pixel blocks of at least two scales to obtain several original pixel blocks; A set of first frequency domain coefficients is obtained by performing frequency domain transformation on several original pixel blocks. An intermediate frequency set is determined based on the first frequency domain coefficient set. The frequency domain coefficients of the intermediate frequency set are modified according to a preset rule to obtain the modified first frequency domain coefficient set. The modified first frequency domain coefficient set is converted into spatial domain pixel values. The spatial domain pixel values are then subjected to multiple redundant embedding processing based on the watermark text to be embedded, resulting in a watermarked image.
[0005] In some embodiments, performing frequency domain transformation on the plurality of original pixel blocks to obtain a first frequency domain coefficient set includes: A multi-scale block matrix is established based on several original pixel blocks; The multi-scale block matrix is transformed from the spatial domain to the frequency domain to obtain the first frequency domain coefficient set.
[0006] In some embodiments, modifying the frequency domain coefficients of the intermediate frequency set according to preset rules to obtain a modified first frequency domain coefficient set includes: The frequency domain coefficients of the intermediate frequency set are modified by a quantization embedding algorithm to obtain the modified first frequency domain coefficient set.
[0007] In some embodiments, modifying the frequency domain coefficients of the intermediate frequency set using a quantization embedding algorithm includes: Determine the quantization step size, and modify the frequency domain coefficients at odd multiples of the quantization step size to the first value; The frequency domain coefficients at even multiples of the quantization step size are modified to a second value.
[0008] To achieve the above objectives, another aspect of this application proposes a digital watermark extraction method based on multi-scale frequency domain transform, the method comprising the following steps: Obtain the watermarked image and perform a second preprocessing on the watermarked image; The pre-processed watermarked image is then divided into several watermark pixel blocks using multi-scale segmentation. A number of watermark pixel blocks are frequency domain transformed to obtain a second frequency domain coefficient set. The watermark signal is located in the mid-frequency set of the second frequency domain coefficient set according to a preset rule to determine the detection set. Multiple redundancy extraction is performed on the detection set to determine the target watermark text.
[0009] In some embodiments, the step of locating the watermark signal in the intermediate frequency set of the second frequency domain coefficient set according to a preset rule to determine the detection set includes: According to preset rules, the watermark signal is located in the mid-frequency set of different watermark pixel blocks in the second frequency domain coefficient set, and the location confidence weight factor of different watermark pixel blocks is determined; The detection set is determined by weighted fusion calculation based on the watermark signal location of different watermark pixel blocks and the corresponding location confidence weight factor.
[0010] In some embodiments, multiple redundancy extraction is performed on the detection set to determine the target watermark text, including: Multiple redundancy extraction is performed on the detection set to obtain several classes of watermark texts to be determined and their corresponding confidence scores; The target watermark text is determined by weighted fusion calculation based on the several types of watermark texts to be determined and their corresponding confidence scores.
[0011] To achieve the above objectives, another aspect of this application provides an electronic device, comprising: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.
[0012] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0013] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0014] The embodiments of this application include at least the following beneficial effects: This application provides a digital watermark embedding method, extraction method, and related equipment based on multi-scale frequency domain transformation. In the digital watermark embedding process, the original digital image is divided into blocks using pixel blocks of different scales, and the images after block division are filtered and subjected to frequency domain transformation processing. Watermark information is embedded in the mid-frequency region with multiple redundancy, which improves the robustness and anti-attack capability of the watermark while ensuring image quality. In the digital watermark extraction process, the watermarked image is processed into blocks at multiple scales and subjected to frequency domain transformation, watermark signal localization, and multiple redundancy extraction. The watermarked image is analyzed in the frequency domain and the watermark is extracted using a multi-strategy detection algorithm, thereby realizing the location and extraction of digital watermark for secure traceability. Attached Figure Description
[0015] Figure 1 This is a flowchart of the digital watermarking embedding method based on multi-scale frequency domain transformation provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the process of obtaining the first frequency domain coefficient set provided in an embodiment of this application; Figure 3 This is a flowchart illustrating the modification of frequency domain coefficients provided in an embodiment of this application; Figure 4 This is a flowchart of the digital watermark extraction method based on multi-scale frequency domain transformation provided in the embodiments of this application; Figure 5 This is a flowchart illustrating the determination of the detection set provided in an embodiment of this application; Figure 6 This is a flowchart of determining the target watermark text provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of the digital watermarking embedding device based on multi-scale frequency domain transformation provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of the digital watermark extraction device based on multi-scale frequency domain transformation provided in the embodiments of this application; Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0017] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0018] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0020] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0021] Discrete Cosine Transform (DCT): A mathematical transformation method that converts spatial domain image signals to frequency domain. By performing two-dimensional DCT operations on the pixel data after image segmentation, the coefficient matrix of each frequency component is obtained, which facilitates the selection of mid-frequency regions for watermark information embedding.
[0022] Quantization Embedding: refers to a technique that hides information by adjusting the quantization values of frequency domain coefficients.
[0023] Multi-Scale Block Processing: refers to the technical method of analyzing and processing images by using block strategies with different granularities.
[0024] Robustness enhancement refers to the use of various techniques to improve the ability of watermarks to still be detected and extracted after operations such as compression, cropping, screenshotting, and noise.
[0025] In related technologies, there are several main ways to implement digital watermarking in application systems: First, there is the explicit watermarking method, which overlays text or image layers on pages, images, or videos, making the watermark information directly visible, such as the copyright logo in the lower right corner of a webpage or the logo watermark during video playback, achieving a visible watermark prompt and content protection; second, there is the implicit watermarking method based on direct modification of spatial domain pixels, which hides information by changing the least significant bit (LSB) of image pixels, has a large embedding capacity, and is suitable for scenarios where image quality requirements are not high; third, there is the watermarking method based on frequency domain transformation, which transforms the image through DCT (Discrete Cosine Transform) or DWT (Discrete Wavelet Transform) and then embeds the watermark information, which can improve the robustness of the watermark to compression, filtering, and other operations; fourth, there is the feature point-based watermarking method, which extracts the salient feature regions of the image and embeds the watermark within them to enhance resistance to geometric attacks such as rotation, scaling, and cropping, thereby improving the stability of the watermark.
[0026] Currently, there are still some challenges in the application of digital watermarking technology. On the one hand, while explicit watermarks are simple to implement, they are easily removed by methods such as screenshotting, cropping, mosaicking, and smearing, making it difficult to meet the requirements of secure traceability and anti-tampering. On the other hand, traditional implicit watermarks are prone to loss of watermark information or extraction failure after the image is compressed, scaled, cropped, or noise is added. In addition, existing watermark detection methods are prone to missed detections and false detections, failing to accurately restore complete watermark information and output reliable traceability results.
[0027] In view of this, this application provides a digital watermark embedding method, extraction method, and related device based on multi-scale frequency domain transformation. In the digital watermark embedding process, the original digital image is divided into blocks of pixel blocks at different scales, and the segmented images are then subjected to frequency domain transformation. Watermark information is embedded in the mid-frequency region with multiple redundancies, improving the robustness and anti-attack capability of the watermark while ensuring image quality. In the digital watermark extraction process, the watermarked image is divided into blocks at multiple scales, and frequency domain transformation, watermark signal localization, and multiple redundancy extraction are performed. A multi-strategy detection algorithm is used to perform frequency domain analysis and watermark extraction on the watermarked image, achieving the location and extraction of the digital watermark for secure traceability.
[0028] The digital watermarking embedding and extraction methods based on multi-scale frequency domain transformation provided in this application relate to the field of information technology. These methods can be applied to terminals, servers, or software running on either a terminal or server. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software may be an application implementing the digital watermarking embedding and extraction methods based on multi-scale frequency domain transformation, but is not limited to these forms.
[0029] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0030] See Figure 1 This application provides a digital watermarking embedding method based on multi-scale frequency domain transformation, the embedding method including steps S101 to S104.
[0031] Step S101: Obtain the original digital image and the watermark text to be embedded, and perform a first preprocessing on the original digital image; Step S102: Divide the first preprocessed original digital image into blocks according to at least two pixel scales to obtain several original pixel blocks. Step S103: Perform frequency domain transformation on several original pixel blocks to obtain a first frequency domain coefficient set; determine the intermediate frequency set based on the first frequency domain coefficient set; modify the frequency domain coefficients of the intermediate frequency set according to preset rules to obtain the modified first frequency domain coefficient set. Step S104: Convert the modified first frequency domain coefficient set into spatial domain pixel values, and perform multiple redundant embedding processing on the spatial domain pixel values according to the watermark text to be embedded to obtain the watermarked image.
[0032] The original digital image contains, but is not limited to, basic information such as RGB color space data, luminance component data, and image size information. The watermark text to be embedded is converted into binary encoding according to the format "TELECOM + user identifier + timestamp + END", and a checksum is calculated to ensure data integrity. It should be noted that the first preprocessing is determined according to the actual application, and this embodiment does not impose specific limitations, including but not limited to image size standardization, color space conversion, noise detection and analysis, and anomaly repair.
[0033] The scale and number of pixel blocks are determined according to the actual application. This embodiment does not impose specific restrictions. For example, the original image can be divided into blocks according to two scales: 8×8 pixel blocks and 16×16 pixel blocks, to ensure block boundary alignment and overlapping area processing.
[0034] Frequency domain transformation methods include, but are not limited to, 2D Discrete Cosine Transform (DCT). The frequency domain range of the intermediate frequency (IF) is determined based on the actual application. Preset rules are determined based on the actual application; this embodiment does not impose specific limitations. First, the original pixel block is transformed to the frequency domain space. Then, the frequency domain coefficients of the IF are modified in the frequency domain space to determine the watermarking position.
[0035] The inverse DCT transform is performed to restore the modified frequency domain coefficients to spatial domain pixel values. Multiple redundant embedding processing is then performed to establish a complete hybrid watermark embedding system to ensure detection reliability. The embedding method is determined according to the actual application, and this embodiment does not impose specific limitations, including but not limited to 10-fold repeated embedding, multi-spacing parallel embedding (spacing 2, 4, 8), and LSB spare embedding, etc.
[0036] In some embodiments, see Figure 2A frequency domain transformation is performed on several original pixel blocks to obtain a first set of frequency domain coefficients, including: Step S201: Establish a multi-scale block matrix based on several original pixel blocks; Step S202: Transform the multi-scale block matrix from the spatial domain to the frequency domain to obtain the first frequency domain coefficient set.
[0037] The original pixel blocks are transformed into a multi-scale block matrix. For example, the original image is divided into blocks at two scales: 8×8 pixel blocks and 16×16 pixel blocks. Dual-scale block index matrices B8={b1,b2...bm} and B16={b1,b2...bn} are then established. The multi-scale block matrix is transformed from the spatial domain to the frequency domain, resulting in the frequency domain coefficient matrix F(u,v). The energy distribution of each frequency domain coefficient, E(u,v)=|F(u,v)|², is calculated to establish a frequency domain energy map for mid-frequency position selection and adaptive adjustment of embedding strength. In the frequency domain coefficient matrix, select the set of mid-frequency region position coordinates M8={m1(x1,y1), m2(x2,y2)...m24(x24,y24)} to represent an 8×8 pixel block, and M16={m1(x1,y1), m2(x2,y2)...m8(x8,y8)} to represent a 16×16 pixel block. Each mid-frequency position corresponds to the watermark bit influence factor w1, w2, w3...wn, avoiding DC components and high-frequency noise regions.
[0038] In some embodiments, the frequency domain coefficients of the intermediate frequency set are modified according to preset rules to obtain a modified first frequency domain coefficient set, including: Step S301: Modify the frequency domain coefficients of the intermediate frequency set using a quantization embedding algorithm to obtain the modified first frequency domain coefficient set.
[0039] It should be noted that the quantization embedding algorithm is determined based on the actual application, and this embodiment does not impose specific limitations. For example, the quantization embedding algorithm includes, but is not limited to, binarization algorithms, scaling algorithms, etc.
[0040] In some embodiments, see Figure 3 Modifying the frequency domain coefficients of the intermediate frequency set through a quantization embedding algorithm includes: Step S401: Determine the quantization step size and modify the frequency domain coefficients at odd multiples of the quantization step size to the first value; Step S402: Modify the frequency domain coefficients at even multiples of the quantization step size to the second value.
[0041] It should be noted that the quantization step size, the first value, and the second value are determined according to the actual application, and this embodiment does not impose specific limitations. For example, by modifying the frequency domain coefficients through a quantization embedding algorithm and setting the quantization step size Q=12, odd quantization multiples correspond to bits "1" and even quantization multiples correspond to bits "0". At the same time, signal strength enhancement processing is performed to ensure the robustness of the embedded information under compression and noise interference.
[0042] See Figure 4 This application also provides a digital watermark extraction method based on multi-scale frequency domain transformation, the method including steps S501 to S504.
[0043] Step S501: Obtain the watermarked image and perform a second preprocessing on the watermarked image; Step S502: Perform multi-scale block processing on the pre-processed watermarked image to obtain several watermark pixel blocks; Step S503: Perform frequency domain transformation on several watermark pixel blocks to obtain a second frequency domain coefficient set; locate the watermark signal in the mid-frequency set of the second frequency domain coefficient set according to preset rules to determine the detection set. Step S504: Perform multiple redundancy extraction on the detection set to determine the target watermark text.
[0044] It should be noted that the second preprocessing is determined based on the actual application, and this embodiment does not impose specific limitations, including but not limited to image format recognition, compression degree evaluation, noise level detection, etc. A detection priority sequence Z={z1,z2,z3...zn} is set, where z1 is 8×8 block FFT detection, z2 is 16×16 block FFT detection, z3 is LSB detection, etc.
[0045] During watermark extraction, the rules for multi-scale block processing of the watermarked image are determined based on the original image embedding process. Multi-scale frequency domain analysis is performed; for example, the image is divided into blocks at the same 8×8 and 16×16 scales as in the embedding stage. The frequency domain coefficient matrix is obtained through 2D DCT transformation, and a frequency domain feature vector F'(u,v) is established for watermark signal detection and localization.
[0046] The set of intermediate frequency (IF) position coordinates for frequency domain detection, i.e., the detection set, is determined and kept completely consistent with the embedding stage, resulting in the detection position sequences M8'=[k1,k2,k3...k24] and M16'=[k1,k2,k3...k8]. Then, multiple redundancy extraction is performed on the detection set to determine the target watermark text. The watermark extraction method is determined based on the watermark embedding method. The preset rules for watermark signal localization on the IF set are the same as the preset rules in the watermark embedding process.
[0047] In some embodiments, see Figure 5According to preset rules, the watermark signal is located in the intermediate frequency set of the second frequency domain coefficient set to determine the detection set, including: Step S601: According to preset rules, locate the watermark signal in the mid-frequency set of different watermark pixel blocks in the second frequency domain coefficient set, and determine the location confidence weight factor of different watermark pixel blocks; Step S602: Perform weighted fusion calculation based on the watermark signal location of different watermark pixel blocks and the corresponding location confidence weight factor to determine the detection set.
[0048] According to the preset rules of the watermark embedding process, the watermark signal is located in the mid-frequency set of different watermark pixel blocks in the second frequency domain coefficient set, and the location confidence weight factor for different watermark pixel blocks is determined. For example, in the watermark embedding process, the frequency domain coefficients at even multiples of the quantization step size are set to 0, and the frequency domain coefficients at odd multiples of the quantization step size are set to 1. In the watermark extraction process, the parity of the quantization coefficients at each position is judged to determine the location confidence weight factor. Then, a weighted fusion calculation is performed based on the watermark signal location of different watermark pixel blocks and the corresponding location confidence weight factor to determine the detection set.
[0049] In some embodiments, see Figure 6 Multiple redundancy extraction is performed on the detection set to determine the target watermark text, including: Step S701: Perform multiple redundancy extraction on the detection set to obtain several classes of watermark texts to be determined and their corresponding confidence scores; Step S702: Perform weighted fusion calculation based on several types of watermark texts to be determined and their corresponding confidence scores to determine the target watermark text.
[0050] The watermark embedding method is detected using a confidence threshold, and watermark extraction is performed according to the corresponding method. For example, multi-spacing parallel detection (confidence threshold 0.6), ultra-strong LSB detection (confidence threshold 0.7), and statistical analysis detection are used. Each method outputs independent detection results R={r1,r2,r3...rn}, and a confidence score is calculated. Watermark information reconstruction and format recognition are performed, supporting multiple watermark formats including "TELECOM...END", "START...END", "MARK...MARK", and direct text formats. Key information such as user identifiers and timestamps are extracted through regular expression matching and character validity verification. Finally, the results are fused and quality assessed, combining the results of multiple detection strategies according to their confidence weights to generate the final watermark content and security traceability information, including detection success rate, data integrity, and timestamp verification results, outputting a complete digital content security detection report.
[0051] See Figure 7This application provides a digital watermarking embedding device based on multi-scale frequency domain transform. The embedding device includes: The original image acquisition module is used to acquire the original digital image and the watermark text to be embedded, and to perform a first preprocessing on the original digital image; The original image segmentation module is used to segment the first preprocessed original digital image into blocks according to pixel blocks of at least two scales to obtain a number of original pixel blocks. The original image selection module is used to perform frequency domain transformation on several original pixel blocks to obtain a first frequency domain coefficient set, determine an intermediate frequency set based on the first frequency domain coefficient set, and modify the frequency domain coefficients of the intermediate frequency set according to preset rules to obtain a modified first frequency domain coefficient set. The original image watermarking module is used to convert the modified first frequency domain coefficient set into spatial domain pixel values, and perform multiple redundant embedding processing on the spatial domain pixel values according to the watermark text to be embedded, so as to obtain the watermarked image.
[0052] See Figure 8 This application also provides a digital watermark extraction device based on multi-scale frequency domain transform. The extraction device includes: The watermarked image acquisition module is used to acquire the watermarked image and perform a second preprocessing on the watermarked image. The watermark image segmentation module is used to perform multi-scale segmentation processing on the pre-processed watermarked image to obtain several watermark pixel blocks; The watermark image localization module is used to perform frequency domain transformation on several watermark pixel blocks to obtain a second frequency domain coefficient set, and to locate the watermark signal in the mid-frequency set of the second frequency domain coefficient set according to preset rules to determine the detection set. The watermark image extraction module is used to perform multiple redundant extractions on the detection set to determine the target watermark text.
[0053] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0054] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0055] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0056] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the methods described in the embodiments of this application. The 903 input / output interface is used to implement information input and output. The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0057] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0058] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0059] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0060] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0061] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0062] The embodiments of this application include at least the following beneficial effects: This application provides a digital watermark embedding method, extraction method, and related equipment based on multi-scale frequency domain transformation. In the digital watermark embedding process, the original digital image is divided into blocks using pixel blocks of different scales, and the images after block division are filtered and subjected to frequency domain transformation processing. Watermark information is embedded in the mid-frequency region with multiple redundancy, which improves the robustness and anti-attack capability of the watermark while ensuring image quality. In the digital watermark extraction process, the watermarked image is processed into blocks at multiple scales and subjected to frequency domain transformation, watermark signal localization, and multiple redundancy extraction. The watermarked image is analyzed in the frequency domain and the watermark is extracted using a multi-strategy detection algorithm, thereby realizing the location and extraction of digital watermark for secure traceability.
[0063] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0064] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0065] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0066] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0067] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0068] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0069] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0070] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for digital watermark embedding based on multi-scale frequency domain transform, characterized in that, The method comprises the following steps: Obtain the original digital image and the watermark text to be embedded, and perform first preprocessing on the original digital image; Block processing is performed on the original digital image after first preprocessing according to pixel blocks of at least two scales, to obtain a plurality of original pixel blocks; The plurality of original pixel blocks are converted into frequency domain to obtain a first frequency domain coefficient set, a middle frequency set is determined according to the first frequency domain coefficient set, the frequency domain coefficients of the middle frequency set are modified according to a preset rule, and a modified first frequency domain coefficient set is obtained; The modified first frequency domain coefficient set is converted into a spatial domain pixel value, and the spatial domain pixel value is subjected to multiple redundant embedding processing according to the watermark text to be embedded, to obtain a watermarked image.
2. The method of claim 1, wherein, The plurality of original pixel blocks are converted into frequency domain to obtain a first frequency domain coefficient set, comprising: A multi-scale block matrix is established according to the plurality of original pixel blocks; The multi-scale block matrix is converted from the spatial domain to the frequency domain to obtain a first frequency domain coefficient set.
3. The method of claim 1, wherein, The frequency domain coefficients of the middle frequency set are modified according to a preset rule to obtain a modified first frequency domain coefficient set, comprising: The frequency domain coefficients of the middle frequency set are modified by a quantization embedding algorithm to obtain a modified first frequency domain coefficient set.
4. The method of claim 3, wherein, The frequency domain coefficients of the middle frequency set are modified by a quantization embedding algorithm, comprising: A quantization step is determined, and the frequency domain coefficients at odd multiple positions of the quantization step are modified to a first value; The frequency domain coefficients at even multiple positions of the quantization step are modified to a second value.
5. A method of digital watermark extraction based on multi-scale frequency domain transform, characterized by, The method comprises the following steps: Obtain the watermarked image, and perform second preprocessing on the watermarked image; Multi-scale block processing is performed on the watermarked image after second preprocessing to obtain a plurality of watermark pixel blocks; The plurality of watermark pixel blocks are converted into frequency domain to obtain a second frequency domain coefficient set, a middle frequency set of the second frequency domain coefficient set is subjected to watermark signal positioning according to a preset rule, and a detection set is determined; Multiple redundant extraction is performed on the detection set to determine a target watermark text.
6. The method of any one of claim 5, characterized in that, The middle frequency set of the second frequency domain coefficient set is subjected to watermark signal positioning according to a preset rule to determine a detection set, comprising: The middle frequency sets of different watermark pixel blocks of the second frequency domain coefficient set are subjected to watermark signal positioning according to a preset rule, and position confidence weight factors of different watermark pixel blocks are determined; Weighted fusion calculation is performed according to the watermark signal positioning of different watermark pixel blocks and the corresponding position confidence weight factors to determine a detection set.
7. The method of claim 5, wherein, Multiple redundant extraction is performed on the detection set to determine a target watermark text, comprising: Multiple redundant extraction is performed on the detection set to obtain a plurality of types of watermark texts to be determined and corresponding confidence scores; Weighted fusion calculation is performed according to the plurality of types of watermark texts to be determined and the corresponding confidence scores to determine a target watermark text.
8. An electronic device, comprising: Comprise: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method of any one of claims 1-7.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program, which when executed by a processor, implements the method of any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that, The computer program, which when executed by a processor, implements the method of any one of claims 1 to 7.