A semi-transparent image blind watermarking method and device based on mixed domain transformation

The semi-transparent image blind watermarking method using hybrid domain transformation solves the problem of flexible updating and robust extraction of watermarks in complex digital content, realizes the separation of the watermark layer and the content layer, and ensures the stable recovery and traceability of watermark information under dynamic display and cropping.

CN122453586APending Publication Date: 2026-07-24XIDIAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2026-04-09
Publication Date
2026-07-24

Smart Images

  • Figure CN122453586A_ABST
    Figure CN122453586A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on mixed domain transform's semi-transparent image blind watermarking method and device, comprising: adding pilot sequence to the repeated coding of the watermarks to be embedded sequence to generate effective embedding load;Original carrier image is extracted diagonal singular value matrix by DWT, DCT, SVD, according to effective embedding load modification diagonal singular value matrix, inverse SVD, inverse DCT, inverse DWT form embedding blind watermarking image;Semi-transparent superposition is carried out to embedding blind watermarking image and content background image;The semi-transparent composite image of cutting is restored to with original carrier image same size;DWT is carried out to recovery image, DCT, SVD extracts the modified diagonal singular value matrix, according to the modified diagonal singular value matrix calculation continuous detection value sequence, according to pilot sequence calculation calibration threshold to convert continuous detection value sequence into binary sequence;Pilot sequence is removed from binary sequence and extracts the watermarks to be embedded sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital watermarking technology, specifically relating to a semi-transparent image blind watermarking method based on hybrid domain transformation. Background Technology

[0002] With the growth of digital content and the spread of AIGC (Artificial Intelligence Generated Content), digital watermarking is widely used for copyright protection and source tracing. Among existing technologies, spatial domain watermarking (commonly visible watermarking) and transform domain watermarking (commonly blind watermarking) are two mainstream approaches; blind watermarking is more commonly used in copyright identification and leak tracing due to its "imperceptibility + certain robustness." Existing research also extensively employs multi-domain fusion, such as combinations of DWT (Discrete Wavelet Transform) / DCT (Discrete Cosine Transform) / SVD (Singular Value Decomposition), to balance robustness and visual quality.

[0003] However, existing blind watermarking technologies typically rely on the direct embedding of a single original carrier image (JPG / PNG, etc.), which presents inherent limitations in scenarios involving complex digital content (such as full-page web pages, dynamically generated documents, and page content containing mixed text and images): (1) If the entire webpage / document is rendered as an image and then the watermark is embedded, any minor update to the content will require a full re-embedding, which is inflexible and inefficient. (2) If each image on the page is embedded one by one, the computation and engineering processing costs are huge, and it is difficult to implement in scenarios where identity / time and other traceability information are dynamically written for different users. (3) In front-end display environments such as the Web, watermark layers often undergo spatial operations such as transparency overlay, cropping, scaling and resampling. Transparency overlay will cause global amplitude attenuation of the frequency domain watermark, and the watermark energy will be linearly weakened, resulting in a decrease in signal-to-noise ratio; scaling interpolation will introduce frequency domain distortion, further damaging the synchronization and decision stability.

[0004] (4) If the watermark layer is generated directly using the traditional DWT-DCT-SVD scheme and then superimposed, when the watermark layer has high transparency (opacity <50%) and a large embedding amount (>256 bits), the extraction error rate after recovery can exceed 30%, but it is still difficult to meet the requirements of reliable traceability.

[0005] Therefore, existing technologies present a contradiction between the dynamic display of composite content and robust watermark extraction: they must maintain the dynamic updating of the page content layer while ensuring the stable recovery of the watermark sequence even after partial truncation of any region. These issues constitute the main technical problem that this invention aims to solve. Summary of the Invention

[0006] To address the aforementioned problems in the existing technology, this invention provides a semi-transparent image blind watermarking method based on hybrid domain transformation. The technical problem to be solved by this invention is achieved through the following technical solution: In a first aspect, embodiments of the present invention provide a semi-transparent image blind watermarking method based on hybrid domain transformation, the semi-transparent image blind watermarking method comprising: After repeatedly encoding the watermark sequence to be embedded, a pilot sequence is added to generate an effective embedded payload. After performing DWT, DCT, and SVD on the original carrier image in sequence, the diagonal singular value matrix is ​​extracted. The diagonal singular value matrix is ​​modified according to the effective embedding payload. The modified diagonal singular value matrix is ​​then subjected to inverse SVD, inverse DCT, and inverse DWT in sequence to form an embedded blind watermark image. The image with the embedded blind watermark and the content background image are semi-transparently overlaid to form a semi-transparent composite image; When the semi-transparent composite image is cropped, the cropped semi-transparent composite image is restored to the same size as the original carrier image; After performing DWT, DCT, and SVD on the restored image in sequence, the modified diagonal singular value matrix is ​​extracted. A continuous detection value sequence is calculated based on the modified diagonal singular value matrix. A calibration threshold is calculated based on the pilot sequence. The continuous detection value sequence is then converted into a binary sequence based on the calibration threshold. Remove the pilot sequence from the binary sequence and extract the watermark sequence to be embedded by majority voting.

[0007] In one embodiment of the present invention, after adding a pilot sequence to the sequence to be embedded with a watermark, repeated encoding is performed to generate an effective embedded payload, including: The sequence to be embedded with watermark is encoded and converted into the original binary sequence. The original binary sequence is then repeatedly encoded to generate redundant watermarks. A pilot sequence is generated, and the pilot sequence and redundant watermark are spliced ​​together to form an effective embedded payload.

[0008] In one embodiment of the present invention, modifying the diagonal singular value matrix according to the effective embedded load includes: Set an embedding coercion factor for additive or multiplicative modulation; Modify the diagonal singular value matrix based on the embedding coercion factor and the bit value of the effective embedding payload.

[0009] In one embodiment of the present invention, the diagonal singular value matrix is ​​modified, as expressed by the formula: ; in, express The modified value, Describes the i-th singular value matrix in the diagonal A singular value, Indicates embedded forced factor, Indicates the first effective embedded load Each bit value.

[0010] In one embodiment of the present invention, modifying the diagonal singular value matrix according to the effective embedded load includes: Set a quantization step size; The singular values ​​in the diagonal singular value matrix are modulated to the quantization reference positions corresponding to the bit values ​​of the effective embedded payload.

[0011] In one embodiment of the present invention, modulating the singular values ​​in the diagonal singular value matrix to the quantization reference positions corresponding to the bit values ​​of the effective embedded payload includes: When the effective embedded payload bit value is 0, the corresponding quantization reference position is: ; When the effective embedded payload bit value is 1, the corresponding quantization reference position is: ; in, Indicates the quantization step size. This represents the rounding function. Describes the i-th singular value matrix in the diagonal A singular value, Singular values ​​indicating that the effective embedded payload has a bit value of 0 The corresponding quantitative reference position, Singular values ​​indicating that the effective embedded payload bit value is 1 The corresponding quantitative reference position.

[0012] In one embodiment of the present invention, a semi-transparent composite image is formed by semi-transparently overlaying an embedded blind watermark image and a content background image, including: Based on the factor that controls the transparency of the watermark, the image with the embedded blind watermark and the content background image are linearly superimposed to form a semi-transparent composite image.

[0013] In one embodiment of the present invention, calculating a continuous detection value sequence based on the modified diagonal singular value matrix includes: For each singular value in the modified diagonal singular value matrix, the process includes: calculating the quantization reference position corresponding to the nearest bit value of 0 and 1 for the singular value; calculating the distance between the singular value and the quantization reference position corresponding to the singular value for the bit value of 0 and 1 respectively; and calculating the continuous detection value sequence based on the quantization reference position distance.

[0014] In one embodiment of the present invention, calculating the calibration threshold based on the pilot sequence includes: Calculate the average weights corresponding to bit values ​​of 0 and 1 in the pilot sequence, and adaptively calculate the calibration threshold based on the average weights.

[0015] Secondly, embodiments of the present invention provide a semi-transparent image blind watermarking device based on hybrid domain transformation, the semi-transparent image blind watermarking device comprising: The watermark sequence preprocessing module is used to repeatedly encode the watermark sequence to be embedded and then add a pilot sequence to generate an effective embedded payload. The hybrid domain embedding module is used to sequentially perform DWT, DCT, and SVD on the original carrier image, extract the diagonal singular value matrix, modify the diagonal singular value matrix according to the effective embedding payload, and sequentially perform inverse SVD, inverse DCT, and inverse DWT on the modified diagonal singular value matrix to form an embedded blind watermark image. The semi-transparent composite overlay module is used to semi-transparently overlay the embedded blind watermark image and the content background image to form a semi-transparent composite image; The recovery module is used to restore the cropped semi-transparent composite image to the same size as the original carrier image when the semi-transparent composite image is cropped. The extraction and calibration module is used to extract the modified diagonal singular value matrix after sequentially performing DWT, DCT, and SVD on the restored image, calculate the continuous detection value sequence based on the modified diagonal singular value matrix, calculate the calibration threshold based on the pilot sequence, and convert the continuous detection value sequence into a binary sequence based on the calibration threshold. The majority voting error correction module is used to remove the pilot sequence from the binary sequence and extract the watermark sequence to be embedded by majority voting.

[0016] The beneficial effects of this invention are: This invention proposes a semi-transparent image blind watermarking method based on hybrid domain transformation. Addressing the limitations of existing solutions in adapting to complex digital content and instability in extraction under semi-transparent overlay and cropping attacks, this innovative method embeds the watermark into an independent watermark layer, which is then overlaid on the content layer in a semi-transparent manner. This achieves separation between the watermark and content layers, allowing the content layer to be updated while the watermark layer can be reused. Even when any area of ​​the page is cropped, the system can still recover the watermark layer information and extract the source text from the overlaid cropped image.

[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a semi-transparent image blind watermarking method based on hybrid domain transformation provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the framework of the semi-transparent image blind watermarking method based on hybrid domain transformation provided in the embodiments of the present invention; Figures 3(a) to 3(b) This is a schematic diagram of the overlay layer A before and after embedding a watermark, provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the background layer B for simulating webpage display provided in an embodiment of the present invention; Figure 5 This is a schematic diagram showing the overlay of a background layer B after the watermark information is embedded in the overlay layer A, as provided in an embodiment of the present invention. Figure 6 This is provided by the embodiments of the present invention. Figure 5 A partial cropping diagram is obtained when the cropping ratio is 20%. Figure 7 This is a provision provided by the embodiments of the present invention that only uses Figure 6 A schematic diagram of the overlay layer obtained by inversely restoring the partial cropped image shown. Detailed Implementation

[0019] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0020] Firstly, please see Figure 1 and Figure 2 This invention provides a semi-transparent image blind watermarking method based on hybrid domain transformation. The semi-transparent image blind watermarking method includes: S10. After repeatedly encoding the watermark sequence to be embedded, add a pilot sequence to generate an effective embedded payload.

[0021] In this embodiment of the invention, after adding a pilot sequence to the watermark sequence to be embedded, repeated encoding is performed to generate an effective embedding payload. This includes: encoding the watermark sequence to be embedded and converting it into an original binary sequence; repeatedly encoding the original binary sequence multiple times to generate a redundant watermark; generating a pilot sequence; and concatenating the pilot sequence and the redundant watermark to form an effective embedding payload.

[0022] More specifically: In this embodiment of the invention, the watermark sequence to be embedded is... Encode and convert to the original binary sequence Generate a pilot sequence of fixed length. It contains a known bit distribution used for calibration of the extracted watermark sequence. The original binary sequence... conduct Repeated encoding generates redundant watermarks. This enhances robustness against clipping and noise. The pilot sequence... and redundant watermarks splicing together to form the final effective embedded load. Among them, the total embedding length Due to the length of the pilot sequence and the length of the original binary sequence Decision, that is Effective embedded load pilot sequence and redundant watermarks splicing, that is , Indicates the number of times the embedding is repeated. This indicates a splicing operation.

[0023] S20. After performing DWT, DCT, and SVD on the original carrier image in sequence, the diagonal singular value matrix is ​​extracted. The diagonal singular value matrix is ​​modified according to the effective embedding payload. The modified diagonal singular value matrix is ​​then subjected to inverse SVD, inverse DCT, and inverse DWT in sequence to form an embedded blind watermark image.

[0024] This invention utilizes DWT to perform multi-resolution decomposition of the image, selecting the low-frequency sub-band carrying the main energy as the embedding substrate to ensure the watermark's resistance to conventional signal processing attacks. Then, block DCT is performed on the selected sub-band, diffusing the watermark energy across multiple frequency coefficients to improve robustness. Next, SVD transform is performed on each DCT block, embedding the watermark bits by modifying the singular values ​​representing the stable geometry of the image block. This aims to leverage the inherent invariance of singular values ​​to minor perturbations.

[0025] More specifically: The embodiments of the present invention address the original carrier image. (Covering layer A) undergoes multi-level discrete wavelet transform (DWT) to decompose it into multi-resolution sub-bands, typically selecting the low-frequency sub-band. (For example or This is used as the embedding region. It carries the main energy of the image and has good resistance to signal processing attacks (such as filtering and compression). Next, the selected... The sub-bands are divided into blocks, and a Discrete Cosine Transform (DCT) is applied to each block. The coefficient matrix of the DCT block is... Perform singular value decomposition (SVD) to extract the singular value matrix. ,Right now .in, and It is an orthogonal matrix. It is a diagonal singular value matrix. This represents the intrinsic geometry of the image patch.

[0026] Based on effective embedded load The bit values ​​for the singular value matrix Modify each position (singular value) to be embedded.

[0027] This invention provides an embodiment for modifying a diagonal singular value matrix based on the effective embedding payload, including: setting an embedding forcing factor for additive or multiplicative modulation; and modifying the diagonal singular value matrix based on the embedding forcing factor and the bit values ​​of the effective embedding payload. It can be seen that an embedding strength factor... Perform additive or multiplicative modulation. For example, watermarking. pass Modulation singularity The modified version was obtained. ,Right now: ; in, express The modified value, Describes the i-th singular value matrix in the diagonal A singular value, Indicates embedded forced factor, Indicates the first effective embedded load Each bit value.

[0028] This invention provides another embodiment that modifies the diagonal singular value matrix according to the effective embedding payload, including: setting a quantization step size; and modulating the singular values ​​in the diagonal singular value matrix to the quantization reference positions corresponding to the bit values ​​of the effective embedding payload. For example, let the quantization step size be... When the bit value for At that time, Modulated to the quantization reference position corresponding to bit 0; when the bit value At that time, The modulated value is then applied to the quantization reference position corresponding to bit 1, thus obtaining the modified singular value. ,Right now ,in, It refers to the basis right Apply the specified quantification rules.

[0029] For example, when the effective embedded payload bit value is 0, the corresponding quantization reference position is: ; When the effective embedded payload bit value is 1, the corresponding quantization reference position is: ; in, Indicates the quantization step size. This represents the rounding function. Describes the i-th singular value matrix in the diagonal A singular value, Singular values ​​indicating that the effective embedded payload has a bit value of 0 The corresponding quantitative reference position, Singular values ​​indicating that the effective embedded payload bit value is 1 The corresponding quantization reference position. Thus, singular values Modify to 0,2 These types of locations, singular values Modified to ,3 These types of locations.

[0030] Finally, the inverse SVD, inverse DCT, and inverse DWT operations are performed sequentially to reconstruct the modified singular value matrix back into the spatial domain, resulting in an image with an embedded blind watermark. .

[0031] S30. The embedded blind watermark image and the content background image are semi-transparently superimposed to form a semi-transparent composite image.

[0032] In this embodiment of the invention, a semi-transparent composite image is formed by semi-transparently superimposing an embedded blind watermark image and a content background image (background layer B) to form a semi-transparent composite image (shown in Figure C). This includes: linearly superimposing the embedded blind watermark image and the content background image based on a factor that controls the transparency of the watermark to form a semi-transparent composite image.

[0033] More specifically: This invention will embed blind watermark images. With content background image (For example, web page content) is overlaid with a semi-transparent layer to create a semi-transparent composite image. . Images embedded with blind watermarks and content background image Linearly mixed, i.e. .in, (satisfy This is used to control the transparency of the watermark.

[0034] S40. When the semi-transparent composite image is cropped, restore the cropped semi-transparent composite image to the same size as the original carrier image.

[0035] When a semi-transparent composite image is cropped, embodiments of the present invention aim to accurately inversely recover the embedded blind watermark image of the cropped area from the cropped semi-transparent composite image. The specific operation is as follows: .in, This represents the cropped image after a semi-transparent composite image, with a cropping ratio of [value missing]. , This represents the cropped portion corresponding to the background image. In this way, the embedded blind watermark image of the cropped region can be obtained. Then, paste it back onto a blank canvas of the same size as the original carrier image to obtain the restored image. During the reply process, it is necessary to ensure that the embedded blind watermark image is maintained. Move to the corresponding cropping area.

[0036] S50. After performing DWT, DCT, and SVD on the restored image in sequence, extract the modified diagonal singular value matrix, calculate the continuous detection value sequence based on the modified diagonal singular value matrix, calculate the calibration threshold based on the pilot sequence, and convert the continuous detection value sequence into a binary sequence based on the calibration threshold.

[0037] This invention provides an embodiment for calculating a continuous detection value sequence based on a modified diagonal singular value matrix. The process includes: for each singular value in the modified diagonal singular value matrix, calculating the quantization reference positions corresponding to the nearest bit values ​​of 0 and 1; calculating the distances between the singular value and the corresponding quantization reference positions based on the singular value and the quantization reference positions; and calculating the continuous detection value sequence based on the quantization reference position distances. Another embodiment of this invention provides an embodiment for calculating a calibration threshold based on a pilot sequence. This process includes: calculating the average weights corresponding to bit values ​​of 0 and 1 in the pilot sequence; and adaptively calculating the calibration threshold based on the average weights.

[0038] More specifically: The embodiments of the present invention restore images Perform DWT, DCT, and SVD sequentially to extract the modified singular value matrix. and read the first Singular values ​​at each embedding location .because Slight shifts occur after semi-transparent overlay, cropping, and noise interference, making it unsuitable as the final extraction result. Therefore, separate calculations are performed. The distance to the quantization reference position corresponding to bit values ​​0 and 1 is obtained as follows: , .in, and Respectively represent and The quantization reference positions corresponding to the most recent bit values ​​0 and 1. Furthermore, the sequence of continuous detection values ​​can be defined as: .when When closer to the quantization reference position corresponding to bit value 1, Smaller Larger; when When closer to the quantization reference position corresponding to bit value 0, Smaller The value is relatively small. Subsequently, adaptive threshold calibration is performed using the pilot sequence P. Specifically: first, the adaptive threshold is calculated. ,in and These are the average weights for the corresponding bit values ​​0 and 1 in the pilot sequence P. Then, the continuous detection value sequence... Convert to a binary sequence using the following formula: .

[0039] S60 removes the pilot sequence from the binary sequence and extracts the watermark sequence to be embedded by majority voting.

[0040] Embodiments of the present invention use binary sequences Remove the pilot sequence from the middle, and then... Redundant replicas A majority vote is conducted to correct bit errors caused by pruning or random noise. Among them, the majority voting function The specific meaning is as follows: .in, In this way, we can eventually obtain a series of The extracted watermark information is the sequence of watermarks to be embedded.

[0041] As can be seen from the above, the embodiments of the present invention separate the watermark layer and the content layer, and realize an overall framework in which dynamic content does not need to be re-embedded and traceability is still possible even when any region is truncated. The pilot sequence adaptive threshold calibration strategy for pruning attacks can improve decoding stability under the conditions of watermark energy decay and decision drift. The error correction mechanism of redundant repetition coding combined with majority voting can alleviate the frequency domain energy decay and synchronization information loss caused by pruning, and improve decodeability under low signal-to-noise ratio conditions. The complete process of coupling DWT-DCT-SVD hybrid domain embedding with layer overlay / robust extraction mechanism (including inverse recovery, re-pasting, and re-transform extraction) forms an engineering-implementable end-to-end method.

[0042] For example, let's illustrate the above implementation process: I. Implementation Environment and Input Data The embodiments of the present invention were completed based on the following prototype environment: Programming language: Python 3 Image processing libraries: NumPy, Pillow Blind watermarking module: The current prototype calls the DWT-DCT-SVD type frequency domain blind watermarking engine. This invention illustrates a method for embedding a frequency domain blind watermark into a semi-transparent overlay layer in a dynamic webpage content display scenario, and for restoring the overlay layer content and extracting traceability information after user screenshotting and cropping. It should be noted that the frequency domain blind watermark embedding module described in this invention can be implemented by any frequency domain blind watermarking engine with equivalent functionality; the current prototype uses a DWT-DCT-SVD type frequency domain engine to complete the bit-level blind watermark embedding and extraction of the overlay layer. The input data and key parameter settings of this invention are shown in Table 1.

[0043] Table 1 Input Data and Key Parameter Settings

[0044] The pilot sequence consists of the first 64 bits of 1s and the last 64 bits of logic 0s; the effective embedded payload is constructed as follows: ; In this embodiment of the invention, the frequency domain blind watermarking module employs single-layer Haar wavelet decomposition, The combined structure of block discrete cosine transform and singular value modulation has quantization intensity parameters of d1=36 and d2=20.

[0045] II. Layer Construction and Semi-transparent Overlay (1) Construct background layer B Background layer B is a simulated webpage content image, measuring 960×640. This image features a white background and black text in a two-column layout. The top section contains the webpage title, the middle section contains the body text, and the bottom section contains a line of code-style text, such as... Figure 4 This structure is similar to the display format of dynamic content pages, document browsing pages, or knowledge base pages, and is used to simulate the target content that users actually view and screenshot.

[0046] (2) Constructing the covering layer A Overlay layer A is also a 960×640 RGB image. In this embodiment of the invention, overlay layer A uses a pure light blue image as an example carrier, with its color values ​​fixed at (220, 235, 247), to carry the frequency domain blind watermark sequence. After embedding the 896-bit effective embedding payload into the RGB data of overlay layer A, the watermark-embedded overlay layer is obtained. .

[0047] Figures 3(a) to 3(b) The overlay layer A and the overlay layer after embedding the watermark are given respectively. Figure 3(a) shows the overlay layer A without watermark, and Figure 3(b) shows the overlay layer with watermark. Since the watermark embedding occurs in the frequency domain, the difference between the two is minimal to the naked eye.

[0048] (3) Set the transparency and create a display image In this embodiment of the invention, the transparency of the overlay layer A with the embedded watermark is selected as follows: ; Overlay with embedded watermark The background layer B is semi-transparently overlaid to obtain the display image C that the user sees.

[0049] Figure 4 A schematic diagram of background layer B is given. Figure 5 A schematic diagram of the semi-transparent overlay display image C is given.

[0050] III. Watermark Embedding and Recovery Process Step 1: Text to Bit The string "Transparent overlay watermarking" is converted to a binary bit stream using UTF-8 encoding, resulting in a 256-bit sequence of watermarks to be embedded (grouped by byte): 01010100011100100110000101101110011100110111000001100001011100110010101101110011101000010000001101111011101100110010101110010 0110110001100001011110010010000001110111011000010111010011001010111001001101101011000010111100100111001011011011001100111 Step 2: Effectively embedding load structure Add a 128-bit pilot sequence before the sequence to be embedded with the watermark. And to be embedded in the watermark sequence After repeated splicing, a pilot sequence is added to obtain the effective embedded payload. In this embodiment of the invention, the pilot sequence is fixed as follows: the first 64 bits are all 1s and the last 64 bits are all 0s, i.e.: 1111111111111111111111111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000 Therefore, the splicing structure that effectively embeds the load is specifically as follows: [128-bit pilot sequence] ]+[ ,256 bit]+[ ,256 bit]+[ [256 bit] The effective embedded payload length is: 128 + 256 × 3 = 896 bits.

[0051] Step 3: Frequency Domain Blind Watermark Embedding Effectively embedding the load By embedding the RGB data of overlay layer A, the overlay layer with the embedded watermark is obtained. In the current prototype, this step is completed by a DWT-DCT-SVD type frequency domain blind watermarking engine. The processing includes: performing single-layer Haar wavelet decomposition on the original carrier image; dividing the selected sub-band into 4×4 blocks; performing discrete cosine transform on the blocks; performing singular value decomposition on the block coefficients and modulating the bits to be embedded into the singular value parameters; and reconstructing the embedded blind watermark image through inverse transform.

[0052] Step 4: Semi-transparent overlay Set transparency = ,according to Overlay with embedded watermark The image is composited with background layer B to obtain display image C. When the user browses the page, the content seen is the text information of background layer B and the overlay layer. The result of superimposing visual elements, such as Figure 5 As shown.

[0053] Step 5: Screenshot and Crop Simulation Simulate a user cropping the displayed image C, such as cropping it proportionally on all four sides. Taking a 20% cropping ratio as an example, if the original image size is 960×640, then 192px will be cropped from the left and right sides, and 128px from the top and bottom, resulting in an image area of ​​576×384. Taking a 30% cropping ratio as an example, 288px is cropped from the left and right sides, and 192px from the top and bottom, resulting in an image area of ​​384×256. The cropped image is shown below. Figure 6 As shown.

[0054] Step 6: Restore the overlay Based on the known cropping portion corresponding to background layer B and transparency For the cropped semi-transparent image Accurate restoration is performed to obtain an image with an embedded blind watermark. : ; Next, the precisely reconstructed image with embedded blind watermark is cropped. Paste it back onto a blank canvas of the same size as the original carrier image to obtain the restored overlay. .

[0055] For example: For In the case of a 20% crop, the position where it is pasted back onto the blank canvas is offset from the top left corner (192, 128); for In the case of a 30% crop, the image is pasted back into the blank canvas at a position offset from the top left corner (288, 192). This step maintains the full-image geometric synchronization structure required at the extraction end and can be combined with other programs to automatically paste it back into the corresponding position in the blank canvas. The final restored image is as follows. Figure 7 As shown.

[0056] Step 7: Pilot Threshold Estimation and Binarization Decision From restored images Extracting continuous detection value sequences Take the pilot sequence corresponding to the first 128 bits, and calculate the mean of the subsequences with bit values ​​of 1 and 0 respectively to obtain the adaptive threshold: In the embodiments of the present invention = , In the 30% of proposed schemes, there are 64 detection values ​​in the subsequence with a bit value of 1, of which 49 are 1 and 15 are 0, therefore the mean is Similarly, in the subsequence with a bit value of 0, all 64 detection values ​​are 0 (no change), thus the mean is... Therefore, the adaptive threshold is specifically: Furthermore, the continuous detection value sequence is converted into a binary sequence based on an adaptive threshold.

[0057] Step 8: Majority vote to restore the watermark to be embedded Because each original bit is repeatedly embedded Therefore, the three extracted results are grouped bit by bit, and a majority vote is performed to restore the final watermark bits, i.e., the watermark sequence to be embedded. In this embodiment of the invention... , In the 20% proposal, the majority vote result of the first 16 bits is: 0101010001110010, and the actual record is shown in Table 2 (only the first 8 bits are listed).

[0058] Table 2 Actual Records

[0059] This result is consistent with the first 16 bits of the sequence to be embedded with the watermark, and the corresponding first two UTF-8 bytes are as follows:

[0060]

[0061] This yields the final user tracing information. At all 256 bit positions, the extraction end performs the aforementioned majority voting process, grouping each group into sets of three repeating observations.

[0062] IV. Extraction Results Based on the existing experimental results of the current prototype, regarding transparency = and cutting proportions Under conditions of 20% and 30% respectively, the correct decoding rate and corresponding binary output of the proposed scheme and the baseline scheme (the baseline scheme for comparison is: the original watermark sequence is directly embedded in the embedding stage, and only the inverse recovery method is used in the extraction stage, without pilot threshold decision and majority voting) can be described as follows. The space-free binary sequence to be embedded with the watermark is: 010101000111001001100001011011100111001101110000011000010111001001100101011011100111010000100000011011110111011001100101 01110010011011000110000101111001001000000111011101100001011101001100101011100100110110101100001011110010011100100111011011001100111 In transparency = Cutting proportions Under the condition of 20%, the correct decoding rate of the baseline scheme is 0.882812, and the correct decoding rate of the proposed scheme is 1.000000. The corresponding binary decoding results are as follows: Baseline scheme extraction results: 01010100011000000110000101101110011000000111000011000010111001001010101010011000000000000011010010110010101010 10010001011000110000100011000000000000110011001100001011101000110010101001001101101100001010000001101010011010000110011000100111 Extraction results of the present invention: 0101010001110010011000010110111001110011011100000110000101110010011001010110111001110101000010000001101111011101100110101011 100100110110001100001011110010010000001110111011000010111010010101110010011011011000010111001001110010011011011010010110111001100111 In transparency = Cutting proportions With a 30% accuracy rate, the baseline scheme achieves a correct decoding rate of 0.585938, while the proposed scheme achieves 0.875000. The corresponding binary decoding results without spaces are as follows: Baseline scheme extraction results: 0001000000000000000000000000100001000000000000000100000101000001100001000010000000000000000000010000010000000000000100000 00010000001000000000000010000000000001000100110 ... Extraction results of the present invention: 0001010000110000010000010010011000110011001100000100001011100000110010101101000011101000010000011010010100010001100101011 00010001011000110000101110001001000000111011101100001010100010000010111001001101001000000101110010011010011011011010010000100000100110 To verify the effectiveness of the semi-transparent image blind watermarking method based on hybrid domain transformation provided in this embodiment of the invention, the following experiments were conducted.

[0063] To evaluate the performance of the proposed blind watermarking algorithm, the experimental hardware platform used a computer equipped with an AMD Ryzen 7 8845H processor and 32GB of memory, running Windows 11. The development environment was based on Python 3.12.7, and the core algorithm flow and data analysis were implemented using libraries such as NumPy, PIL, Pandas, and Matplotlib. For test data, four 512×512 pixel color standard images—Mandrill (aka Baboon), Airplane (F-16), Sailboat on Lake, and Peppers—were selected as the host images. To verify the universality of the algorithm on images with different texture characteristics, a 256-bit random text sequence was used.

[0064] To comprehensively evaluate the performance of multiple algorithms, this invention sets quantitative indicators from two dimensions: invisibility and robustness. Invisibility is measured using Peak Signal-to-Noise Ratio (PSNR), Mean Squared Error (MSE), and Structural Similarity Index (SSIM); robustness is comprehensively evaluated using Correct Decoding Rate (CDR) and Normalized Correlation (NC), thereby systematically analyzing the information preservation capability of watermarks under different conditions.

[0065] Among the metrics for invisibility, MSE measures the original image. With watermarked images The mean squared difference (MSE) between pixel values. A smaller MSE indicates higher image quality, and its calculation is as follows: .in, It is the size of the image. It refers to the number of channels.

[0066] Peak Signal-to-Noise Ratio (PSNR) is one of the most commonly used metrics for measuring image quality, and it is inversely proportional to Image Sequence Size (MSE). A higher PSNR generally indicates better imperceptibility; a PSNR greater than 30 dB is typically considered to indicate good imperceptibility. The specific calculation method is as follows: .in, For image The maximum pixel value (e.g., 255 for an 8-bit image).

[0067] Structural similarity index (SSIM) is a metric designed to better align with human visual system (HVS) perception, taking into account brightness, contrast, and structural information. The closer an SSIM is to 1, the higher the structural similarity between two images. Its calculation process is shown in the following formula: .in, Represents the average value. Represents variance. Represents covariance, c1 represents the stability constant of the brightness term, and c2 represents the stability constant of the contrast term, which are generally determined based on the brightness and contrast of the image.

[0068] This invention achieves a PSNR of approximately 38 dB and an SSIM exceeding 0.98 in terms of imperceptibility, indicating high visual consistency with the original image after embedding; in terms of robustness, when When the value is in the range of [32, 192] and the pruning ratio reaches 20%, the CDR can be maintained above 98%. When the pruning ratio is increased to 30%, compared with the baseline scheme that does not use pilot threshold calibration and majority voting, the present invention can increase the minimum CDR from 52.32% to 86.33%, which shows that it can still maintain decodeability under high transparency and complex attacks.

[0069] The robustness and accuracy test scenario targeted by this invention involves overlaying a semi-transparent layer and a content layer, followed by spatial operations such as cropping and scaling, to obtain the correct decoding rate (CDR) for extracting information. The specific calculation method is as follows: The closer this value is to 100%, the higher the degree of matching between the extracted information and the original embedded information, and the higher the robustness of the blind watermarking scheme is generally.

[0070] The normalized correlation coefficient (NC) primarily measures the global statistical similarity between the embedded and extracted sequences and is not very sensitive to local distortions. Its calculation method is as follows: .in, and It is a length of The embedded sequence and the extracted sequence, where each bit takes the value of either 0 or 1. Because for binary sequences, Therefore, in the denominator That is, the square root of the number of "1"s in the original watermark sequence.

[0071] For the blind watermark embedding and extraction framework proposed in this invention, the baseline scheme for comparison is as follows: the original watermark sequence is directly embedded in the embedding stage, and only the inverse recovery method is used in the extraction stage, without pilot threshold decision and majority voting. The test scheme parameters are R=3, pilot sequence length is 64 bits, and watermark length is 256 bits. Both schemes embed the watermark in the blind watermark layer, then overlay it with the content layer and perform the same cropping operation. During the experiment, the cropping ratio is the percentage of the cut length to the image's length and width, and the transparency is... The minimum value is 0 (completely transparent), and the maximum value is 255 (completely opaque).

[0072] Experimental results show that as the opacity of the watermark layer decreases, both the correct decoding rate (CDR) and the normalized correlation coefficient (NC) decrease to varying degrees. This is because increased transparency weakens the frequency domain embedding energy retained by the watermark layer, making it more susceptible to interference and distortion from the image content itself during extraction, thus reducing the recognizability of the watermark signal. With a cropping ratio of 20%, the proposed scheme maintains a CDR of over 98% under different transparency conditions, demonstrating strong information recovery capabilities. However, when the cropping ratio increases to 30%, the remaining image area is only 49% (0.7 × 0.7) of the original image. At this point, both CDR and NC values ​​decrease significantly, indicating that although the algorithm is well-adapted to light cropping, under large-scale geometric cropping attacks, frequency domain distortion caused by spatial structure destruction remains the main factor affecting watermark extraction performance. It is worth noting that, in comparison with baseline methods, the present invention can improve the minimum CDR from 52.32% to 86.33%, demonstrating a significant enhancement in robustness against sophisticated attacks while maintaining the visual invisibility of highly transparent watermarks.

[0073] Furthermore, under the same experimental conditions, the effects of different cropping ratios on CDR and NC were tested at opacities of 96% and 160%. Experimental results show that when the cropping ratio is 5% or 10%, both watermarking schemes can achieve near-perfect CDR and NC values. This indicates that when the image information is fully preserved or only slightly cropped, the embedded information can be fully recovered from the semi-transparent watermark layer using only standard inverse transform operations, reflecting the effectiveness of the watermarking algorithm under ideal conditions. However, as the cropping ratio increases to 20% and 30%, the effective image area is significantly reduced, leading to a sharp decline in watermark extraction quality, highlighting the destructive impact of geometric cropping on the frequency domain watermark sequence. This invention effectively alleviates the problems of frequency domain energy attenuation and synchronization information loss caused by cropping by introducing redundant coding and pilot signals in the watermark construction stage and employing adaptive threshold adjustment and majority voting mechanisms in the extraction stage. This, to a certain extent, maintains the decodability of the watermark and improves robustness under low signal-to-noise ratio conditions.

[0074] In summary, the semi-transparent image blind watermarking method based on hybrid domain transformation proposed in this invention addresses the problems of existing solutions being difficult to adapt to complex digital content and unstable extraction under semi-transparent overlay and cropping attacks. It innovatively proposes a semi-transparent image blind watermarking method: embedding the watermark into an independent watermark layer, and then displaying it in a semi-transparent manner overlaid with the content layer, thereby achieving separation between the watermark layer and the content layer. The content layer can be updated while the watermark layer can be reused. When any area of ​​the page is cropped, the system can still recover the watermark layer information and extract the source text from the overlaid cropped image.

[0075] Secondly, embodiments of the present invention provide a semi-transparent image blind watermarking device based on hybrid domain transformation, the semi-transparent image blind watermarking device comprising: The watermark sequence preprocessing module is used to repeatedly encode the watermark sequence to be embedded and then add a pilot sequence to generate an effective embedded payload. The hybrid domain embedding module is used to sequentially perform DWT, DCT, and SVD on the original carrier image, extract the diagonal singular value matrix, modify the diagonal singular value matrix according to the effective embedding payload, and sequentially perform inverse SVD, inverse DCT, and inverse DWT on the modified diagonal singular value matrix to form an embedded blind watermark image. The semi-transparent composite overlay module is used to semi-transparently overlay the embedded blind watermark image and the content background image to form a semi-transparent composite image; The recovery module is used to restore the cropped semi-transparent composite image to the same size as the original carrier image when the semi-transparent composite image is cropped. The extraction and calibration module is used to extract the modified diagonal singular value matrix after sequentially performing DWT, DCT, and SVD on the restored image, calculate the continuous detection value sequence based on the modified diagonal singular value matrix, calculate the calibration threshold based on the pilot sequence, and convert the continuous detection value sequence into a binary sequence based on the calibration threshold. The majority voting error correction module is used to remove the pilot sequence from the binary sequence and extract the watermark sequence to be embedded by majority voting.

[0076] As the apparatus embodiment of the second aspect is basically similar to the method embodiment of the first aspect, the description is relatively simple, and relevant details can be found in the description of the method embodiment of the first aspect.

[0077] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0078] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the specification and accompanying drawings, will understand and implement other variations of the disclosed embodiments in carrying out the claimed invention. In the specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. While certain measures are described in different embodiments, this does not mean that these measures cannot be combined to produce good results.

[0079] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A semi-transparent image blind watermarking method based on hybrid domain transform, characterized in that, The semi-transparent image blind watermarking method includes: After repeatedly encoding the watermark sequence to be embedded, a pilot sequence is added to generate an effective embedded payload. After performing DWT, DCT, and SVD on the original carrier image in sequence, the diagonal singular value matrix is ​​extracted. The diagonal singular value matrix is ​​modified according to the effective embedding payload. The modified diagonal singular value matrix is ​​then subjected to inverse SVD, inverse DCT, and inverse DWT in sequence to form an embedded blind watermark image. The image with the embedded blind watermark and the content background image are semi-transparently overlaid to form a semi-transparent composite image; When the semi-transparent composite image is cropped, the cropped semi-transparent composite image is restored to the same size as the original carrier image; After performing DWT, DCT, and SVD on the restored image in sequence, the modified diagonal singular value matrix is ​​extracted. A continuous detection value sequence is calculated based on the modified diagonal singular value matrix. A calibration threshold is calculated based on the pilot sequence. The continuous detection value sequence is then converted into a binary sequence based on the calibration threshold. Remove the pilot sequence from the binary sequence and extract the watermark sequence to be embedded by majority voting.

2. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, After repeatedly encoding the watermark sequence to be embedded, a pilot sequence is added to generate an effective embedding payload, including: The sequence to be embedded with watermark is encoded and converted into the original binary sequence. The original binary sequence is then repeatedly encoded to generate redundant watermarks. A pilot sequence is generated, and the pilot sequence and redundant watermark are spliced ​​together to form an effective embedded payload.

3. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, Modifying the diagonal singular value matrix based on the effective embedded load includes: Set an embedding coercion factor for additive or multiplicative modulation; Modify the diagonal singular value matrix based on the embedding coercion factor and the bit value of the effective embedding payload.

4. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 3, characterized in that, Modify the diagonal singular value matrix, as expressed by the formula: ; in, express The modified value, Describes the i-th singular value matrix in the diagonal A singular value, Indicates embedded forced factor, Indicates the first effective embedded load Each bit value.

5. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, Modifying the diagonal singular value matrix based on the effective embedded load includes: Set a quantization step size; The singular values ​​in the diagonal singular value matrix are modulated to the quantization reference positions corresponding to the bit values ​​of the effective embedded payload.

6. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 5, characterized in that, Modulating the singular values ​​in the diagonal singular value matrix to the quantization reference positions corresponding to the bit values ​​of the effective embedded payload includes: When the effective embedded payload bit value is 0, the corresponding quantization reference position is: ; When the effective embedded payload bit value is 1, the corresponding quantization reference position is: ; in, Indicates the quantization step size. This represents the rounding function. Describes the i-th singular value matrix in the diagonal A singular value, Singular values ​​indicating that the effective embedded payload has a bit value of 0 The corresponding quantitative reference position, Singular values ​​indicating that the effective embedded payload bit value is 1 The corresponding quantitative reference position.

7. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, A semi-transparent composite image is formed by semi-transparently overlaying an image with an embedded blind watermark and a content background image, including: Based on the factor that controls the transparency of the watermark, the image with the embedded blind watermark and the content background image are linearly superimposed to form a semi-transparent composite image.

8. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, The continuous detection value sequence is calculated based on the modified diagonal singular value matrix, including: For each singular value in the modified diagonal singular value matrix, the process includes: calculating the quantization reference position corresponding to the nearest bit value of 0 and 1 for the singular value; calculating the distance between the singular value and the quantization reference position corresponding to the singular value for the bit value of 0 and 1 respectively; and calculating the continuous detection value sequence based on the quantization reference position distance.

9. The semi-transparent image blind watermarking method based on hybrid domain transformation according to claim 1, characterized in that, The calibration threshold is calculated based on the pilot sequence, including: Calculate the average weights corresponding to bit values ​​of 0 and 1 in the pilot sequence, and adaptively calculate the calibration threshold based on the average weights.

10. A semi-transparent image blind watermarking device based on hybrid domain transform, characterized in that, The semi-transparent image blind watermarking device includes: The watermark sequence preprocessing module is used to repeatedly encode the watermark sequence to be embedded and then add a pilot sequence to generate an effective embedded payload. The hybrid domain embedding module is used to sequentially perform DWT, DCT, and SVD on the original carrier image, extract the diagonal singular value matrix, modify the diagonal singular value matrix according to the effective embedding payload, and sequentially perform inverse SVD, inverse DCT, and inverse DWT on the modified diagonal singular value matrix to form an embedded blind watermark image. The semi-transparent composite overlay module is used to semi-transparently overlay the embedded blind watermark image and the content background image to form a semi-transparent composite image; The recovery module is used to restore the cropped semi-transparent composite image to the same size as the original carrier image when the semi-transparent composite image is cropped. The extraction and calibration module is used to extract the modified diagonal singular value matrix after sequentially performing DWT, DCT, and SVD on the restored image, calculate the continuous detection value sequence based on the modified diagonal singular value matrix, calculate the calibration threshold based on the pilot sequence, and convert the continuous detection value sequence into a binary sequence based on the calibration threshold. The majority voting error correction module is used to remove the pilot sequence from the binary sequence and extract the watermark sequence to be embedded by majority voting.