Watermark extraction method and device, computer equipment, storage medium and product

By determining the target singular values ​​of image pixel blocks and performing confidence analysis, a confidence matrix is ​​constructed, which solves the problem of inaccurate watermark bitstream acquisition in webpage screenshots and achieves efficient watermark bitstream extraction even when image quality degrades.

CN122155923APending Publication Date: 2026-06-05PEKING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PEKING UNIV
Filing Date
2026-02-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

During webpage screenshotting, singular value drift of digital watermarks leads to a high probability of errors in watermark bitstream acquisition, affecting extraction accuracy.

Method used

By determining the target singular values ​​of pixel blocks in the image to be tested, watermark confidence analysis is performed to construct a confidence matrix. The watermark bitstream is obtained through adaptive binary classification, and the image data is processed using two-dimensional discrete cosine transform and singular value decomposition.

Benefits of technology

It effectively reduces the impact of screenshot operations on image quality, improves the accuracy and robustness of watermark bitstream acquisition, and can still accurately extract watermark information when image quality deteriorates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155923A_ABST
    Figure CN122155923A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of digital images, in particular to a watermark extraction method and device, computer equipment, a storage medium and a product, the method comprising the following steps: determining target singular values of at least one pixel block of a to-be-tested image; performing watermark confidence analysis extraction according to the target singular values to obtain watermark bit streams corresponding to to-be-extracted watermarks in the to-be-tested image; and the application guarantees accurate acquisition of the watermarks in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital image technology, and in particular to a watermark extraction method, apparatus, computer equipment, storage medium, and product. Background Technology

[0002] In web page data leakage prevention and tracing, digital watermarks are usually embedded in the background image of the web page. The digital watermark contains the information of the currently logged-in user. If the user takes a screenshot and spreads it, the user can be traced back from the web page background in the screenshot.

[0003] However, due to the slight drift of singular values ​​in the captured image from the webpage, there is a high probability of error in obtaining the watermark bitstream, which affects the accuracy of watermark extraction. Summary of the Invention

[0004] Therefore, it is necessary to provide a watermark extraction method, apparatus, computer equipment, storage medium, and product that can accurately obtain watermark bitstreams to address the aforementioned technical problems.

[0005] Firstly, this application provides a watermark extraction method. The method includes:

[0006] Determine the target singular value of at least one pixel block in the image to be tested;

[0007] Based on the singular values ​​of each target, watermark confidence analysis is performed to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0008] In one embodiment, the step of extracting the watermark confidence analysis based on the target singular values ​​of at least one pixel block of the image under test to obtain the watermark bitstream corresponding to the image under test includes:

[0009] Confidence analysis is performed on the target singular values ​​of at least one pixel block in the image under test to obtain a confidence matrix;

[0010] Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0011] In one embodiment, the step of performing confidence analysis based on the target singular values ​​of at least one pixel block of the image under test to obtain a confidence matrix includes:

[0012] Each of the target singular values ​​is phase-mapped to obtain at least one phase value;

[0013] Confidence scores are calculated for each phase value to obtain a confidence matrix.

[0014] In one embodiment, the step of extracting the watermark based on the confidence matrix to obtain the watermark bitstream corresponding to the image to be tested includes:

[0015] Based on the confidence matrix, calculate the average confidence level for each watermark information bit corresponding to the watermark to be extracted.

[0016] An adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0017] In one embodiment, determining the target singular value of at least one pixel block in the image to be tested includes:

[0018] Determine the low-frequency approximate sub-band corresponding to the image under test;

[0019] The low-frequency approximate subband is divided into at least one pixel block of a preset size;

[0020] Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0021] In one embodiment, determining the low-frequency approximate sub-band corresponding to the image to be tested includes:

[0022] The image to be tested is color encoded and converted to obtain a three-channel image in the YUV state of brightness and color difference;

[0023] The three-channel image is subjected to discrete wavelet transform to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0024] Secondly, this application also provides a watermark extraction device. The device includes:

[0025] The determination module is used to determine the target singular value of at least one pixel block in the image under test;

[0026] The extraction module is used to perform watermark confidence analysis and extraction based on the target singular values ​​of at least one pixel block in the image under test, so as to obtain the watermark bitstream corresponding to the watermark to be extracted in the image under test.

[0027] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0028] Determine the target singular value of at least one pixel block in the image to be tested;

[0029] Based on the singular values ​​of each target, watermark confidence analysis is performed to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0030] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0031] Determine the target singular value of at least one pixel block in the image to be tested;

[0032] Based on the singular values ​​of each target, watermark confidence analysis is performed to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0033] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0034] Determine the target singular value of at least one pixel block in the image to be tested;

[0035] Based on the singular values ​​of each target, watermark confidence analysis is performed to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0036] The aforementioned watermark extraction method, apparatus, computer equipment, storage medium, and product determine the target singular values ​​of at least one pixel block in the image under test; and extract the watermark bitstream corresponding to the watermark to be extracted in the image under test by performing watermark confidence analysis based on each target singular value. As can be seen from the above, this application first determines the target singular values ​​of at least one pixel block in the image under test during the watermark extraction process, ensuring the effective acquisition of singular values, providing a data foundation for subsequent processes, and effectively reducing the impact of screenshot operations on image quality by using target singular values, thus ensuring the effective acquisition of the watermark bitstream during subsequent watermark confidence extraction. Attached Figure Description

[0037] Figure 1 An application environment diagram of a watermark extraction method provided in this application embodiment;

[0038] Figure 2 A flowchart illustrating the first watermark extraction method provided in this application embodiment;

[0039] Figure 3 A flowchart illustrating the second watermark extraction method provided in this application embodiment;

[0040] Figure 4 A flowchart illustrating the third watermark extraction method provided in this application embodiment;

[0041] Figure 5 A flowchart illustrating the fourth watermark extraction method provided in this application embodiment;

[0042] Figure 6 A structural block diagram of a watermark extraction device provided in an embodiment of this application;

[0043] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0044] 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 and not intended to limit the scope of this application.

[0045] The watermark extraction method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. At least one modulated candidate singular value is obtained by quantizing and modulating the candidate singular values ​​of at least one pixel block of the image under test; image reconstruction is performed based on the at least one modulated candidate singular value to obtain the image under test; watermark confidence analysis is performed based on the target singular values ​​of at least one pixel block of the image under test to obtain the watermark bitstream corresponding to the watermark to be extracted in the image under test. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.

[0046] In one embodiment, such as Figure 2 As shown, a watermark extraction method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0047] S201, determine the target singular value of at least one pixel block in the image to be tested.

[0048] Here, the target singular value refers to the singular value at a preset position in the singular value matrix corresponding to each pixel block of the image under test.

[0049] Furthermore, since the elements on the diagonal of the singular value matrix represent the energy distribution of image patches, the first singular value concentrates the vast majority of energy (usually over 90%), and modifying it will lead to a significant decrease in image quality (a reduction in peak signal-to-noise ratio (PSNR)); while later singular values ​​represent high-frequency texture details, which are easily lost in lossy compression or filtering. Therefore, choosing the second singular value avoids the principal energy components to ensure image quality while retaining sufficient stability to resist attacks. Therefore, the k-th singular value in the singular value matrix can be selected as the target singular value; preferably, k=2.

[0050] As an example, the process of determining the singular value matrix may include the following: determining the low-frequency approximate subband corresponding to the image under test; dividing the low-frequency approximate subband into at least one pixel block of a preset size; performing a two-dimensional discrete cosine transform on each pixel block to obtain a coefficient matrix; and performing singular value decomposition on the coefficient matrix to obtain the singular value matrix.

[0051] S202, perform watermark confidence analysis and extraction based on the singular values ​​of each target to obtain the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0052] It should be noted that when it is necessary to perform watermark confidence analysis and extraction based on the target singular values ​​of at least one pixel block of the image under test to obtain the watermark bitstream corresponding to the image under test, the following can be included: perform confidence analysis based on the target singular values ​​of at least one pixel block of the image under test to obtain a confidence matrix; and extract the watermark based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0053] The aforementioned watermark extraction method involves determining the target singular values ​​of at least one pixel block in the image under test; then, based on each target singular value, performing watermark confidence analysis to extract the watermark bitstream corresponding to the watermark to be extracted in the image under test. As can be seen from the above, this application first determines the target singular values ​​of at least one pixel block in the image under test during the watermark extraction process, ensuring the effective acquisition of singular values ​​and providing a data foundation for subsequent processes. Furthermore, by using the target singular values, the impact of screenshotting operations on image quality is effectively reduced, ensuring the effective acquisition of the watermark bitstream during subsequent watermark confidence extraction.

[0054] In one embodiment, such as Figure 3 As shown, when it is necessary to perform watermark confidence analysis and extraction based on the target singular values ​​of at least one pixel block in the image under test to obtain the watermark bitstream corresponding to the image under test, the following can be included:

[0055] S301, perform confidence analysis based on the target singular values ​​of at least one pixel block in the image to be tested to obtain a confidence matrix.

[0056] It should be noted that when it is necessary to perform confidence analysis based on the target singular values ​​of at least one pixel block of the image under test to obtain a confidence matrix, the following can be included: performing phase mapping on each target singular value to obtain at least one phase value; and calculating the confidence based on each phase value to obtain a confidence matrix.

[0057] In one embodiment of this application, when it is necessary to perform phase mapping on each target singular value, the target singular value can be mapped to the phase space of [0, 2π]. Specifically, the following calculation formula can be used.

[0058] ;

[0059] Where phase refers to the phase value; S' refers to the target singular value; and d refers to the preset quantization step size.

[0060] In another embodiment of this application, after calculating the confidence level based on each phase value, the confidence score corresponding to each phase value is obtained, and a confidence matrix is ​​constructed based on each confidence score.

[0061] The formula for calculating the confidence level for each phase value is as follows:

[0062] Confidence=—sin(phase);

[0063] Here, Confidence refers to the confidence score; phase refers to the phase value.

[0064] By introducing Confidence = -sin(phase), strong robustness is guaranteed, and a continuous mapping from singular value drift to confidence is constructed. When the screenshot causes a small shift in the singular value, it only manifests as a small decrease in the confidence value (e.g., from 1.0 to 0.9), and the polarity of the signal tends to remain unchanged. This smooth transition characteristic preserves the statistical characteristics of the noise, allowing positive and negative noise to cancel each other out in the subsequent averaging operation.

[0065] The principle is as follows: If the embedded phase value is 0, the ideal phase is... ,at this time , (representing an extremely high probability of 0).

[0066] If the embedded phase value is 1, the ideal phase is ,at this time (This represents an extremely high probability of 1).

[0067] If the data is corrupted and the phase value falls within an intermediate ambiguity zone (such as π), then , indicating an extremely low confidence level.

[0068] It should be noted that the process of determining the target singular value includes: dividing the low-frequency approximate sub-band of the image under test into blocks to obtain at least one pixel block; performing row DCT transformation on each pixel block, and then performing SVD decomposition on the transformed coefficient matrix. The k-th singular value is extracted from the singular value matrix obtained by decomposition to obtain the target singular value.

[0069] S302, extract the watermark based on the confidence matrix to obtain the watermark bitstream corresponding to the image to be tested.

[0070] It should be noted that when watermark extraction is required based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test, the following can be included: calculate the average confidence level corresponding to each watermark information bit corresponding to the watermark to be extracted based on the confidence matrix; perform adaptive binary classification on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0071] The confidence matrix is ​​a (3, N) matrix; where 3 represents the three color channels Y, U, and V, and N represents the total number of pixel blocks in the image. Each element in the matrix represents the confidence level of the hidden information in the corresponding channel and the corresponding pixel block.

[0072] In one embodiment of this application, each bit stream of the watermark to be extracted is traversed ( (where L is the watermark length). The confidence matrix is ​​sliced ​​according to a step size L to extract the confidence scores of all blocks embedded in the bitstream. The extracted values ​​include observations from all three channels (Y / U / V) and all spatially repeated positions. The arithmetic mean of these values ​​is calculated as the final average confidence score for the watermark bit.

[0073] The above process utilizes not only spatial redundancy (to resist local occlusion and cropping) but also color redundancy (to resist color shift or single-channel attacks). Even if a channel or part of the image is severely damaged, as long as weak signals remain in other parts, averaging can still enhance the signal strength and cancel out random noise.

[0074] In another embodiment of this application, the one-dimensional K-Means clustering algorithm is used to perform adaptive binary classification on the average confidence score, automatically calculate the optimal segmentation threshold, and restore the continuous confidence score values ​​to the final 0 / 1 watermark bit stream.

[0075] The above watermark extraction method determines the confidence matrix and extracts the watermark based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test. This ensures the effective acquisition of the watermark bitstream during watermark confidence extraction and improves the accuracy of watermark bitstream acquisition.

[0076] In one embodiment, such as Figure 4 As shown, when it is necessary to determine the target singular value of at least one pixel block in an image to be tested, the following may be included:

[0077] S401, determine the low-frequency approximate sub-band corresponding to the image to be tested.

[0078] It should be noted that when it is necessary to determine the low-frequency approximate sub-band corresponding to the image under test, the following can be included: performing color encoding conversion on the image under test to obtain a three-channel image in the brightness and color difference YUV state; performing discrete wavelet transform on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0079] In one embodiment of this application, the RGB (Red, Green, Blue) to YUV (Luminance, Blue-differencechroma, Red-differencechroma) conversion matrix and inverse conversion matrix can be pre-loaded and resident in the GPU memory. After receiving the image data to be tested, it is converted into a PyTorch tensor and uploaded to the GPU. Tensor dot product operations are performed using the resident matrix to convert the image from RGB space to YUV state.

[0080] To further explain, a first-order discrete wavelet transform (DWT) is performed on each of the three-channel images. Specifically, the Daubechies (db4) wavelet basis can be used to obtain the low-frequency approximate subbands of each channel.

[0081] The wavelet basis was selected based on the following criteria: compared to the discontinuous Haar wavelet, db4 has a longer support and a higher vanishing moment, providing a smoother frequency decomposition and better energy concentration characteristics, significantly improving the watermark recovery success rate under resampling attacks. db8 or other asymmetric wavelet bases also have similar effects to db4.

[0082] S402, divide the low-frequency approximate subband into at least one pixel block of a preset size.

[0083] In one embodiment of this application, the low-frequency approximate subband can be divided into at least one pixel block of M×M; wherein, M is preferably 6;

[0084] Since pixel block size directly determines the redundancy and concealment of the watermark, while 4×4 blocks offer high redundancy and robustness, they easily introduce noticeable blocky noise in smooth areas of the image. 8×8 blocks, while providing better visual effects, weaken resistance to attacks. Extensive experimental verification has shown that 6×6 blocks achieve the optimal balance between visual imperceptibility and robustness against screenshots. The image size may not perfectly divide M, but M is generally small enough that pixels at the edges can be discarded.

[0085] S403, perform two-dimensional discrete cosine transform decomposition on each pixel block, and perform singular value decomposition on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0086] In one embodiment of this application, a two-dimensional discrete cosine transform is performed on each pixel block to obtain a coefficient matrix; singular value decomposition is performed on the coefficient matrix to obtain a singular value matrix. The Kth singular value of each singular value matrix is ​​selected as the embedding point (preferably k=2, i.e., the index is 1).

[0087] The watermark extraction method described above provides a data foundation for subsequent watermark confidence analysis and extraction by determining the target singular value of at least one pixel block in the image under test, thus ensuring the smooth progress of the subsequent process.

[0088] In one embodiment, such as Figure 5 As shown, when watermark confidence analysis and extraction are required, the following can be included:

[0089] S501 performs color encoding conversion on the original image to obtain a three-channel image in the YUV state of brightness and color difference.

[0090] S502 performs discrete wavelet transform on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0091] It should be noted that when it is necessary to determine the low-frequency approximate sub-band corresponding to the original image, the following can be included: performing color encoding conversion on the original image to obtain a three-channel image in the brightness and color difference YUV state; performing discrete wavelet transform on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0092] In one embodiment of this application, the RGB (Red, Green, Blue) to YUV (Luminance, Blue-differencechroma, Red-differencechroma) conversion matrix and inverse conversion matrix can be pre-loaded and resident in the GPU memory. After receiving the raw image data, it is converted into a PyTorch tensor and uploaded to the GPU. Tensor dot product operations are performed using the resident matrix to convert the image from RGB space to YUV state.

[0093] To further explain, a first-order discrete wavelet transform (DWT) is performed on each of the three-channel images. Specifically, the Daubechies (db4) wavelet basis can be used to obtain the low-frequency approximate subbands of each channel.

[0094] The wavelet basis was selected based on the following criteria: compared to the discontinuous Haar wavelet, db4 has a longer support and a higher vanishing moment, providing a smoother frequency decomposition and better energy concentration characteristics, significantly improving the watermark recovery success rate under resampling attacks. db8 or other asymmetric wavelet bases also have similar effects to db4.

[0095] S503 divides the low-frequency approximate subband into at least one pixel block of a preset size.

[0096] In one embodiment of this application, the low-frequency approximate subband can be divided into at least one pixel block of M×M; wherein, M is preferably 6;

[0097] Since pixel block size directly determines the redundancy and concealment of the watermark, while 4×4 blocks offer high redundancy and robustness, they easily introduce noticeable blocky noise in smooth areas of the image. 8×8 blocks, while providing better visual effects, weaken resistance to attacks. Extensive experimental verification has shown that 6×6 blocks achieve the optimal balance between visual imperceptibility and robustness against screenshots. The image size may not perfectly divide M, but M is generally small enough that pixels at the edges can be discarded.

[0098] S504 performs a two-dimensional discrete cosine transform decomposition on each pixel block to obtain the candidate singular values ​​corresponding to each pixel block.

[0099] In one embodiment of this application, a two-dimensional discrete cosine transform is performed on each pixel block to obtain a coefficient matrix; singular value decomposition is performed on the coefficient matrix to obtain a singular value matrix. The Kth singular value of each singular value matrix is ​​selected as the embedding point (preferably k=2, i.e., the index is 1).

[0100] S505, quantize and modulate the candidate singular values ​​of at least one pixel block to obtain at least one target singular value.

[0101] In one embodiment of this application, the following calculation formula can be used for processing:

[0102] ;

[0103] Where Snew refers to the modulated target singular value; S refers to the candidate singular value; d1 refers to the quantization step size; and bit refers to the watermark information bit.

[0104] Furthermore, the selection of the quantization step size can be based on the following: it controls the strength of the watermark embedding and is a key parameter that balances perceived transparency and robustness. A larger d1 value results in greater modification of singular values ​​and stronger noise resistance, but also more noticeable image distortion; conversely, a smaller d1 value provides better concealment but is more fragile. A value of 28 is empirically optimal, ensuring that the watermark is imperceptible to the naked eye while effectively resisting common webpage screenshots, scaling, and JPEG compression operations.

[0105] This formula ensures that when the embedded bit is 0, the singular value is quantized to... nearby;

[0106] When the embedded bit=1, the singular value is quantized to... nearby.

[0107] S506, perform image reconstruction based on the target singular values ​​to obtain the image to be tested.

[0108] In one embodiment of this application, since the target singular values ​​are determined based on the singular value matrix corresponding to each pixel block of the original image, when it is necessary to restore the image based on each target singular value, the following steps may be included: reconstructing the singular value matrix using the modulated target singular values, and performing inverse singular value decomposition by combining the left singular vector matrix (U) and the right singular vector matrix (V) obtained by SVD decomposition to obtain the inverse coefficient matrix; performing inverse two-dimensional discrete cosine transform on each inverse coefficient matrix to obtain at least one inverse pixel block; and performing inverse discrete wavelet transform on each inverse pixel block to achieve image restoration and obtain a reference image.

[0109] S507, perform phase mapping on each target singular value to obtain at least one phase value.

[0110] S508, calculate the confidence level for each phase value to obtain the confidence matrix.

[0111] S509, Calculate the average confidence level of each watermark information bit corresponding to the watermark to be extracted based on the confidence matrix.

[0112] S510 performs adaptive binary classification on the average confidence level corresponding to each watermark information bit to obtain the watermark bit stream corresponding to the image under test.

[0113] The aforementioned watermark extraction method involves determining the target singular values ​​of at least one pixel block in the image under test; then, based on each target singular value, performing watermark confidence analysis to extract the watermark bitstream corresponding to the watermark to be extracted in the image under test. As can be seen from the above, this application first determines the target singular values ​​of at least one pixel block in the image under test during the watermark extraction process, ensuring the effective acquisition of singular values ​​and providing a data foundation for subsequent processes. Furthermore, by using the target singular values, the impact of screenshotting operations on image quality is effectively reduced, ensuring the effective acquisition of the watermark bitstream during subsequent watermark confidence extraction.

[0114] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0115] Based on the same inventive concept, this application also provides a watermark extraction device for implementing the watermark extraction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more watermark extraction device embodiments provided below can be found in the limitations of the watermark extraction method described above, and will not be repeated here.

[0116] In one embodiment, such as Figure 6 As shown, a watermark extraction device is provided, comprising: an acquisition module 10 and an extraction module 20, wherein:

[0117] Determining module 10 is used to determine the target singular value of at least one pixel block in the image under test;

[0118] The extraction module 20 is used to perform watermark confidence analysis and extraction based on the target singular value of at least one pixel block in the image under test, so as to obtain the watermark bitstream corresponding to the watermark to be extracted in the image under test.

[0119] In one embodiment, a confidence matrix is ​​obtained by performing confidence analysis based on the target singular values ​​of at least one pixel block in the image under test.

[0120] Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0121] In one embodiment, phase mapping is performed on each target singular value to obtain at least one phase value;

[0122] The confidence level is calculated for each phase value to obtain the confidence matrix.

[0123] In one embodiment, the average confidence level corresponding to each watermark information bit corresponding to the watermark to be extracted is calculated based on the confidence matrix.

[0124] Adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0125] In one embodiment, a low-frequency approximate subband corresponding to the image under test is determined;

[0126] Divide the low-frequency approximate subband into at least one pixel block of a preset size;

[0127] Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0128] In one embodiment, the image to be tested is color encoded to obtain a three-channel image in the brightness and color difference YUV state;

[0129] Discrete wavelet transform is performed on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0130] The aforementioned watermark extraction device determines the target singular values ​​of at least one pixel block in the image under test; it then performs watermark confidence analysis based on each target singular value to extract the watermark bitstream corresponding to the watermark to be extracted in the image under test. As can be seen from the above, this application first determines the target singular values ​​of at least one pixel block in the image under test during the watermark extraction process, ensuring the effective acquisition of singular values ​​and providing a data foundation for subsequent processes. Furthermore, by using the target singular values, the impact of screenshot operations on image quality is effectively reduced, ensuring the effective acquisition of the watermark bitstream during subsequent watermark confidence extraction.

[0131] Each module in the aforementioned print extraction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0132] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an image extraction method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0133] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0134] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0135] Determine the target singular value of at least one pixel block in the image to be tested;

[0136] Watermark confidence analysis is performed on the singular values ​​of each target to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0137] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0138] Confidence analysis is performed on the singular values ​​of at least one pixel block in the image under test to obtain a confidence matrix;

[0139] Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0140] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0141] Each target singular value is phase-mapped to obtain at least one phase value;

[0142] The confidence level is calculated for each phase value to obtain the confidence matrix.

[0143] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0144] Based on the confidence matrix, calculate the average confidence level for each watermark information bit corresponding to the watermark to be extracted.

[0145] Adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] Determine the low-frequency approximate sub-band corresponding to the image under test;

[0148] Divide the low-frequency approximate subband into at least one pixel block of a preset size;

[0149] Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0151] The image to be tested is color encoded and converted to obtain a three-channel image in the YUV state of brightness and color difference;

[0152] Discrete wavelet transform is performed on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0154] Determine the target singular value of at least one pixel block in the image to be tested;

[0155] Watermark confidence analysis is performed on the singular values ​​of each target to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0156] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0157] Confidence analysis is performed on the singular values ​​of at least one pixel block in the image under test to obtain a confidence matrix;

[0158] Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0159] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0160] Each target singular value is phase-mapped to obtain at least one phase value;

[0161] The confidence level is calculated for each phase value to obtain the confidence matrix.

[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0163] Based on the confidence matrix, calculate the average confidence level for each watermark information bit corresponding to the watermark to be extracted.

[0164] Adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0165] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0166] Determine the low-frequency approximate sub-band corresponding to the image under test;

[0167] Divide the low-frequency approximate subband into at least one pixel block of a preset size;

[0168] Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0169] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0170] The image to be tested is color encoded and converted to obtain a three-channel image in the YUV state of brightness and color difference;

[0171] Discrete wavelet transform is performed on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0172] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0173] Determine the target singular value of at least one pixel block in the image to be tested;

[0174] Watermark confidence analysis is performed on the singular values ​​of each target to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

[0175] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0176] Confidence analysis is performed on the singular values ​​of at least one pixel block in the image under test to obtain a confidence matrix;

[0177] Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

[0178] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0179] Each target singular value is phase-mapped to obtain at least one phase value;

[0180] The confidence level is calculated for each phase value to obtain the confidence matrix.

[0181] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0182] Based on the confidence matrix, calculate the average confidence level for each watermark information bit corresponding to the watermark to be extracted.

[0183] Adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0185] Determine the low-frequency approximate sub-band corresponding to the image under test;

[0186] Divide the low-frequency approximate subband into at least one pixel block of a preset size;

[0187] Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0189] The image to be tested is color encoded and converted to obtain a three-channel image in the YUV state of brightness and color difference;

[0190] Discrete wavelet transform is performed on the three-channel image to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

[0191] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0192] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0193] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0194] The above embodiments merely illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application's patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A watermark extraction method, characterized in that, The method includes: Determine the target singular value of at least one pixel block in the image to be tested; Based on the singular values ​​of each target, watermark confidence analysis is performed to extract the watermark bitstream corresponding to the watermark to be extracted in the image to be tested.

2. The method according to claim 1, characterized in that, The step of extracting the watermark bitstream corresponding to the image under test by performing watermark confidence analysis based on the target singular values ​​of at least one pixel block of the image under test includes: Confidence analysis is performed on the target singular values ​​of at least one pixel block in the image under test to obtain a confidence matrix; Watermark extraction is performed based on the confidence matrix to obtain the watermark bitstream corresponding to the image under test.

3. The method according to claim 2, characterized in that, The confidence analysis based on the target singular values ​​of at least one pixel block in the image under test, to obtain a confidence matrix, includes: Each of the target singular values ​​is phase-mapped to obtain at least one phase value; Confidence scores are calculated for each phase value to obtain a confidence matrix.

4. The method according to claim 2, characterized in that, The step of extracting the watermark based on the confidence matrix to obtain the watermark bitstream corresponding to the image to be tested includes: Based on the confidence matrix, calculate the average confidence level for each watermark information bit corresponding to the watermark to be extracted. An adaptive binary classification is performed on the average confidence level corresponding to each watermark information bit to obtain the watermark bitstream corresponding to the image under test.

5. The method according to any one of claims 1-4, characterized in that, Determining the target singular value of at least one pixel block in the image to be tested includes: Determine the low-frequency approximate sub-band corresponding to the image under test; The low-frequency approximate subband is divided into at least one pixel block of a preset size; Two-dimensional discrete cosine transform decomposition is performed on each pixel block, and singular value decomposition is performed on the transformed coefficient matrix to obtain the target singular value of at least one pixel block of the image under test.

6. The method according to claim 5, characterized in that, Determining the low-frequency approximate sub-band corresponding to the image under test includes: The image to be tested is color encoded and converted to obtain a three-channel image in the YUV state of brightness and color difference; The three-channel image is subjected to discrete wavelet transform to obtain the low-frequency approximate sub-band corresponding to the three-channel image.

7. A print extraction device, characterized in that, The device includes: The determination module is used to determine the target singular value of at least one pixel block in the image under test; The extraction module is used to perform watermark confidence analysis and extraction based on the target singular values ​​of at least one pixel block in the image under test, so as to obtain the watermark bitstream corresponding to the watermark to be extracted in the image under test.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.