Watermark embedding method and device, equipment and storage medium

By performing multi-scale enhancement processing on the original image and discrete watermark embedding technology, the shortcomings of traditional image blind watermarking technology in terms of anti-attack, imperceptibility, robustness and concealment are solved, and efficient image copyright protection and information authentication are achieved.

CN120765441APending Publication Date: 2025-10-10CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510833310.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Traditional image blind watermarking technology has deficiencies in terms of anti-attack resistance, imperceptibility, balance between robustness and concealment, and applicability, and is unable to meet the growing needs of image copyright protection and information authentication.

Method used

By performing multi-scale enhancement processing on the original image, generating matrix blocks, and using discrete watermark embedding enhancement technology, including wavelet transform, pseudo-random scrambling encryption, singular value decomposition and other operations, the watermark information is embedded in the frequency domain of the image and restored to the target embedded watermark image through inverse transformation.

Benefits of technology

It significantly improves the watermark's anti-attack ability, enhances the imperceptibility of the blind watermark, achieves a balance between robustness and concealment, and greatly improves the applicability of the blind watermark, so that its extraction process does not need to rely on the original image or the watermark image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765441A_ABST
    Figure CN120765441A_ABST
Patent Text Reader

Abstract

The invention discloses a watermark embedding method and device, equipment and a storage medium, and relates to the technical field of image processing, and the watermark embedding method comprises the steps: obtaining an original image and an original watermark; performing multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks; performing discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks; and carrying out image restoration on each embedded watermark matrix block to obtain a target embedded watermark image. According to the method, the original image and the watermark are enhanced at the same time, so that the watermark is stronger, the attack resistance of the watermark is remarkably improved, the imperceptibility of the blind watermark is enhanced, the influence on the visual effect of the original image is reduced, the balance between robustness and concealment is realized, the applicability of the blind watermark is greatly improved, and the visual effect of the blind watermark is improved. The extraction process does not depend on an original image or a watermark image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a watermark embedding method, apparatus, device and storage medium. Background Art

[0002] Currently, the core of blind image watermarking technology lies in embedding watermark information into an image so that it can be extracted when needed to prove the image's origin and integrity without affecting its visual quality. Blind image watermarking technology mainly focuses on two methods: spatial domain and frequency domain.

[0003] However, spatial domain methods, such as least significant bit (LSB) embedding, embed watermark information by modifying the least significant bit of image pixels. While simple to operate, they suffer from poor compression resistance and robustness, and are easily affected by operations such as format conversion and filtering, resulting in watermark loss or destruction. Frequency domain methods, such as those based on Fourier transform and wavelet transform, utilize the frequency domain characteristics of images to embed watermarks. However, while Fourier transform-based frequency domain techniques can enhance compression resistance, they are sensitive to geometric attacks (such as scaling) and exhibit inconsistencies in frequency band selection: low-frequency embeddings can affect image quality, while high-frequency embeddings can be easily removed by compression. While wavelet transform-based frequency domain techniques can utilize multi-scale decomposition to embed watermarks, their concealment is insufficient. The embedded watermarked image differs significantly from the original image, and the watermark quality is poor and easily destroyed by local modifications.

[0004] In summary, traditional technologies have shortcomings in terms of anti-attack resistance, imperceptibility, balance between robustness and concealment, and applicability, making it difficult to meet the growing needs of image copyright protection and information authentication. Summary of the Invention

[0005] The main purpose of this application is to provide a watermark embedding method, device, equipment and storage medium, aiming to solve the problems that traditional technologies have inadequacies in anti-attack resistance, imperceptibility, balance between robustness and concealment, and applicability.

[0006] To achieve the above objectives, the present application proposes a watermark embedding method, which includes:

[0007] Get the original image and the original watermark;

[0008] Performing multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks;

[0009] Performing discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks;

[0010] Perform image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

[0011] In one embodiment, the multi-scale enhancement processing is performed on the original image to obtain a plurality of matrix blocks, including:

[0012] Performing format conversion on the original image to obtain a target format image;

[0013] Based on a preset transformation channel, performing a wavelet transform on the target format image to obtain a low-frequency component corresponding to the preset transformation channel;

[0014] Each of the low-frequency components is divided into four-dimensional blocks and converted into the plurality of matrix blocks.

[0015] In one embodiment, the discrete watermark embedding enhancement processing is performed based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks, including:

[0016] Obtaining a watermark encryption factor, and generating a plurality of one-dimensional arrays based on the watermark encryption factor;

[0017] Performing one-dimensional grayscale processing on the original watermark to obtain a grayscale watermark;

[0018] Based on each of the one-dimensional arrays, discrete watermark embedding is performed on each of the matrix blocks and the grayscale watermark to obtain a plurality of embedded watermark matrix blocks.

[0019] In one embodiment, based on each of the one-dimensional arrays, discrete watermark embedding is performed on each of the matrix blocks and the grayscale watermark to obtain a plurality of embedded watermark matrix blocks, including:

[0020] According to each of the one-dimensional arrays, the grayscale watermark is pseudo-randomly scrambled and encrypted to obtain an encrypted watermark;

[0021] According to each of the one-dimensional arrays, discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the matrix blocks to obtain a plurality of encrypted matrix blocks;

[0022] Based on a preset watermark embedding formula, the encrypted watermark is embedded into each of the encrypted matrix blocks to obtain a plurality of embedded watermark matrix blocks.

[0023] In one embodiment, the discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the one-dimensional arrays to obtain a plurality of encrypted matrix blocks, including:

[0024] Performing discrete cosine transform on each of the matrix blocks to obtain a plurality of groups of discrete cosine transform coefficients;

[0025] According to each of the one-dimensional arrays, performing pseudo-random scrambling encryption on each of the discrete cosine transform coefficients to obtain a plurality of groups of encrypted discrete cosine transform coefficients;

[0026] A singular value decomposition operation is performed on each of the encrypted discrete cosine transform coefficients to obtain a plurality of encrypted matrix blocks.

[0027] In one embodiment, performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image includes:

[0028] Performing inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform on each of the embedded watermark matrix blocks to obtain a plurality of decryption matrix blocks;

[0029] Perform wavelet inverse transformation on each of the decryption matrix blocks to generate the target embedded watermark image.

[0030] In one embodiment, after performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image, the method further includes:

[0031] Get the target user's watermark extraction request;

[0032] Based on the watermark extraction request, performing wavelet transform on the target watermarked image to extract one-dimensional watermark information;

[0033] Performing inverse wavelet transform on the one-dimensional watermark information to restore the one-dimensional watermark information to the original watermark in the spatial domain.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a watermark embedding device, which includes:

[0035] An acquisition module, used to obtain the original image and the original watermark;

[0036] An enhancement module, configured to perform multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks;

[0037] An embedding module, configured to perform discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks;

[0038] The restoration module is used to perform image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a watermark embedding device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the watermark embedding method described above.

[0040] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of the watermark embedding method described above are implemented.

[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the watermark embedding method described above are implemented.

[0042] The present application provides a watermark embedding method, apparatus, device, and storage medium. The watermark embedding method obtains an original image and an original watermark, and then performs multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks. Based on each of the matrix blocks and the original watermark, a discrete watermark embedding enhancement process is performed to obtain a plurality of embedded watermark matrix blocks. Then, image restoration is performed on each of the embedded watermark matrix blocks to obtain a target embedded watermark image, thereby significantly improving the watermark's anti-attack capability, enhancing the imperceptibility of the blind watermark, and reducing the impact on the visual effect of the original image, thereby achieving a balance between robustness and concealment, greatly improving the applicability of the blind watermark, and making its extraction process independent of the original image or the watermark image. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 A schematic diagram of the process flow provided for the first embodiment of the watermark embedding method of this application;

[0046] Figure 2 A flow chart of the second embodiment of the watermark embedding method of this application is provided;

[0047] Figure 3 A schematic diagram of the watermark extraction process provided for the watermark embedding method of this application;

[0048] Figure 4 A brief flowchart of the watermark embedding method provided in this application;

[0049] Figure 5 This is a schematic diagram of the module structure of the watermark embedding device according to an embodiment of the present application;

[0050] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the watermark embedding method in the embodiment of the present application.

[0051] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a big data service platform, a watermark embedding system, etc. The following uses the watermark embedding system as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the embodiment of the present application provides a watermark embedding method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the watermark embedding method of this application.

[0056] In this embodiment, the watermark embedding method includes steps S11 to S14:

[0057] Step S11, obtaining the original image and the original watermark;

[0058] It should be noted that the original image refers to an image that has not been processed by any watermark embedding. It can be in any format, such as JPEG, PNG, BMP, etc., and can be a color or grayscale image. The original watermark refers to the watermark information to be embedded in the original image, usually in the form of an image or text, and is used for purposes such as copyright protection and content authentication.

[0059] Specifically, the process of obtaining the original image and the original watermark can be automated or manual. In the case of automated acquisition, the system can obtain these data from a designated server or database through a network interface; in the case of manual acquisition, the user can upload these data through a graphical user interface (GUI). There is no restriction here and it can be set according to actual conditions.

[0060] Step S12, performing multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks;

[0061] It should be noted that the multi-scale enhancement processing refers to an image processing technology that decomposes the image into frequency components of different scales by performing wavelet transform on the image, thereby enhancing the characteristics of the image at different scales, that is, embedding watermarks at different scales, thereby improving the robustness and concealment of the watermark.

[0062] It should be further explained that the matrix blocks refer to small blocks into which the image is divided. These small blocks can be of fixed size, such as 4x4 or 8x8, or of variable size, depending on the specific application requirements, which is not limited here.

[0063] Specifically, the original image is format converted to obtain a target format image, and then the target format image is wavelet transformed based on a preset transformation channel to obtain low-frequency components corresponding to the preset transformation channel, and each of the low-frequency components is divided into four-dimensional blocks and converted into the multiple matrix blocks.

[0064] Step S13, performing discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks;

[0065] It should be noted that the discrete watermark embedding enhancement process refers to a watermark embedding technology that embeds watermark information into the frequency domain of the image by performing operations such as discrete cosine transform (DCT), pseudo-random scrambling encryption, and singular value decomposition (SVD) on matrix blocks. The embedded watermark matrix blocks refer to matrix blocks that have undergone watermark embedding processing. These matrix blocks contain both the original image information and the watermark information.

[0066] Specifically, a watermark encryption factor is obtained, and a plurality of one-dimensional arrays are generated based on the watermark encryption factor, and then the original watermark is subjected to one-dimensional grayscale processing to obtain a grayscale watermark, and then based on each of the one-dimensional arrays, each of the matrix blocks and the grayscale watermark is discretely watermarked to obtain a plurality of embedded watermark matrix blocks.

[0067] Step S14: performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

[0068] It should be noted that the image restoration refers to the process of restoring the matrix block after embedding the watermark into an image through an inverse transformation operation, including steps such as inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform, so as to convert the modified frequency domain data back to the spatial domain to obtain the final watermarked image.

[0069] It should be further explained that the target watermarked image refers to the target image obtained after the watermark is finally embedded in the original image.

[0070] Specifically, each watermarked matrix block is subjected to inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform to obtain a plurality of decrypted matrix blocks, and then each decrypted matrix block is subjected to inverse wavelet transform to generate the target watermarked image.

[0071] This embodiment obtains an original image and an original watermark, and then performs multi-scale enhancement processing on the original image to obtain a number of matrix blocks. Based on each of the matrix blocks and the original watermark, discrete watermark embedding enhancement processing is then performed to obtain a number of embedded watermark matrix blocks. Image restoration is then performed on each of the embedded watermark matrix blocks to obtain a target embedded watermark image. This significantly improves the watermark's anti-attack capability, enhances the blind watermark's imperceptibility, and reduces its impact on the original image's visual effects, thereby achieving a balance between robustness and concealment. This significantly enhances the applicability of the blind watermark, allowing its extraction process to no longer rely on the original image or the watermarked image.

[0072] Based on this, the embodiment of the present application provides a watermark embedding method, referring to Figure 2 , Figure 2 This is a flow chart of the second embodiment of the watermark embedding method of this application.

[0073] In a feasible implementation manner, the multi-scale enhancement processing is performed on the original image to obtain a plurality of matrix blocks, including:

[0074] Step S21, performing format conversion on the original image to obtain a target format image;

[0075] It should be noted that format conversion refers to converting an original image from one data format to another to accommodate a specific image processing algorithm or to optimize the image data for subsequent processing. The target format image refers to the converted image, which has characteristics more suitable for wavelet transforms or other image processing operations.

[0076] Specifically, the original image is format converted to obtain a target format image. In one embodiment, the format conversion includes color space conversion, for example, from RGB (red, green, and blue) color space to YUV (luminance-chrominance) color space. Because the human eye is more sensitive to luminance information (Y channel) than chrominance information (U and V channels), this conversion helps to reduce the amount of data while maintaining the visual effect of the image and improve processing efficiency.

[0077] Step S22, performing wavelet transform on the target format image based on a preset transform channel to obtain a low-frequency component corresponding to the preset transform channel;

[0078] It should be noted that the preset transform channel refers to one or more channels selected for wavelet transform in the image after format conversion. The wavelet transform is a method of converting an image from a spatial domain to a frequency domain, which can decompose the image into components of different frequencies, including low-frequency components and high-frequency components. The low-frequency components refer to slowly changing parts of the image, which usually contain the main structure and contour information of the image, while the high-frequency components contain the details of the rapid changes in the image.

[0079] Specifically, based on the preset transform channel, the target format image is subjected to wavelet transform to obtain a low-frequency component corresponding to the preset transform channel. In an embodiment, the three channels (i.e., Y channel, U channel, and V channel) of the target format image in YUV format obtained after format conversion are subjected to wavelet transform to obtain low-frequency components ca and horizontal, vertical, and diagonal high frequencies corresponding to the three channels. The low-frequency part contains the main content of the image, and the high-frequency part is the details of the image. Embedding a watermark into the low-frequency part of the image can improve its robustness, so that only the three low-frequency components ca of the three channels are operated subsequently to ensure that the watermark information is combined with the main features of the image, thereby improving the concealment and robustness of the watermark.

[0080] In two-dimensional discrete wavelet transform, the low-frequency component ca can be obtained by wavelet decomposition of the image. For example, using the dwt2 function in MATLAB or the pywt.dwt2 function in Python, the image can be decomposed into a low-frequency component (ca) and a high-frequency component (ch, cv, cd). The low-frequency component ca is the approximation coefficient after wavelet decomposition, which corresponds to the low-frequency part of the image and is usually used for subsequent image processing and analysis.

[0081] Step S23: Each of the low-frequency components is subjected to four-dimensional blocking to convert into a plurality of matrix blocks.

[0082] It should be noted that the four-dimensional blocking refers to dividing the low-frequency component of the image into a plurality of small blocks, each of which is a matrix, so that the watermark embedding is more fine and controllable. Because each matrix block can be independently subjected to watermark embedding processing, i.e., the watermark can be embedded on multiple scales and multiple regions of the image, thereby improving the robustness of the watermark, making it able to resist various image processing operations such as compression, cropping, filtering, etc., while ensuring that the watermark information is uniformly distributed in the entire image, thereby improving the concealment and attack resistance of the watermark.

[0083] Specifically, each of the low-frequency components is divided into four-dimensional blocks and converted into the plurality of matrix blocks. In one embodiment, the system first converts the original image from the RGB color space to the YUV color space, and then performs a wavelet transform on the three channels. For example, the Y channel is selected for wavelet transform to obtain the low-frequency component of the Y channel. The low-frequency component of the Y channel is as follows:

[0084]

[0085] Each low-frequency component is regarded as a two-dimensional matrix and converted into a four-dimensional matrix consisting of n 4*4 matrices. Each matrix block will be used for subsequent watermark embedding processing to obtain r*s block-divided low-frequency components ca_block, as shown below:

[0086]

[0087] This processing method not only improves the concealment and robustness of the watermark, but also makes the watermark embedding process more flexible and efficient.

[0088] This embodiment converts the format of the original image to obtain a target format image, and then performs wavelet transform on the target format image based on a preset transformation channel to obtain low-frequency components corresponding to the preset transformation channel, thereby performing four-dimensional block division on each of the low-frequency components and converting them into the multiple matrix blocks. The structure of the image data is then optimized through format conversion to make it more suitable for subsequent wavelet transform processing, thereby improving image processing efficiency. At the same time, the image is decomposed into features of different scales, so that the watermark information is more evenly distributed in the image, that is, the watermark embedding is made more refined and controllable, thereby improving the concealment and robustness of the watermark, and enabling the watermark to resist various image processing operations such as compression and filtering.

[0089] In a feasible implementation manner, the discrete watermark embedding enhancement processing is performed based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks, including:

[0090] Step S31, obtaining a watermark encryption factor, and generating a plurality of one-dimensional arrays based on the watermark encryption factor;

[0091] It should be noted that obtaining the watermark encryption factor refers to determining one or more parameters used to generate a pseudo-random sequence. These parameters can be numbers, strings, or other forms of data, without limitation. This ensures that the generated pseudo-random sequence is unpredictable, thereby improving the security of the watermark. The one-dimensional array refers to an array of a certain length, in which the elements are arranged in a pseudo-random order for the subsequent watermark embedding process.

[0092] Specifically, a watermark encryption factor is obtained, and several one-dimensional arrays are generated based on the watermark encryption factor. The process of obtaining the watermark encryption factor can be user-specified or automatically generated by the system. In one possible implementation, the system can automatically generate one or more watermark encryption factors based on user input or a specific algorithm, and then use a pseudo-random array generator to input the watermark encryption factor to obtain r*s one-dimensional arrays of length 4*4 for subsequent scrambling encryption.

[0093] Step S32, performing grayscale one-dimensional processing on the original watermark to obtain a grayscale watermark;

[0094] It should be noted that the grayscale one-dimensional processing refers to converting the original watermark image into a grayscale image and converting the two-dimensional data of the grayscale image into a one-dimensional array. The grayscale watermark refers to the watermark data after grayscale and one-dimensional processing. This form of watermark is more suitable for embedding in the frequency domain of the image.

[0095] Specifically, the original watermark is grayscaled into one dimension to obtain a grayscale watermark, for example, a color watermark image is converted into a grayscale image, and then the pixel values ​​of the grayscale image are arranged into a one-dimensional array in row or column order, thereby simplifying the watermark data and making it easier to merge with the image data.

[0096] Step S33: Based on each of the one-dimensional arrays, discrete watermark embedding is performed on each of the matrix blocks and the grayscale watermark to obtain a plurality of embedded watermark matrix blocks.

[0097] It should be noted that the watermark embedded matrix blocks refer to image matrix blocks that have undergone watermark embedding processing, and these matrix blocks contain original image information and watermark information.

[0098] Specifically, according to each of the one-dimensional arrays, the grayscale watermark is pseudo-randomly scrambled and encrypted to obtain an encrypted watermark, and then according to each of the one-dimensional arrays, discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the matrix blocks to obtain a number of encrypted matrix blocks, and then based on a preset watermark embedding formula, the encrypted watermark is embedded into each of the encrypted matrix blocks to obtain a number of embedded watermark matrix blocks.

[0099] This embodiment obtains a watermark encryption factor and generates several one-dimensional arrays based on the watermark encryption factor, and then performs grayscale one-dimensional processing on the original watermark to obtain a grayscale watermark, and then based on each one-dimensional array, discrete watermark embeds each matrix block and the grayscale watermark to obtain several embedded watermark matrix blocks, thereby increasing the complexity of the watermark information, making the watermark more difficult to be analyzed or cracked by unauthorized users. At the same time, the embedding of the grayscale watermark will not significantly affect the visual quality of the image, and enhance the concealment of the watermark. Discrete watermark embedding is then performed on multiple scales and multiple areas of the image to improve the robustness of the watermark. Even if the image is compressed, filtered, cropped, etc., the watermark information can still be effectively extracted. Therefore, it can be applied to different types of images and watermark information. Whether it is a text watermark or an image watermark, it can be effectively embedded through this method.

[0100] In a feasible implementation, based on each of the one-dimensional arrays, discrete watermark embedding is performed on each of the matrix blocks and the grayscale watermark to obtain a plurality of embedded watermark matrix blocks, including:

[0101] Step S41, performing pseudo-random scrambling encryption on the grayscale watermark according to each of the one-dimensional arrays to obtain an encrypted watermark;

[0102] It should be noted that the pseudo-random scrambling encryption is an encryption method that uses a pseudo-random sequence in a one-dimensional array to rearrange the grayscale watermark data to generate an encrypted watermark to improve the security of the watermark. Before the watermark is embedded in the image, its information has been effectively protected and is not easily identified or tampered with by unauthorized users.

[0103] Specifically, according to each of the one-dimensional arrays, the grayscale watermark is pseudo-randomly scrambled and encrypted to obtain an encrypted watermark. The pseudo-random scrambled encryption process may include rearranging each data point of the grayscale watermark in the order specified by the one-dimensional array, thereby generating an encrypted watermark, wherein an algorithm can be used to ensure the consistency and reversibility of the encryption.

[0104] Step S42, performing discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations on each of the matrix blocks according to each of the one-dimensional arrays to obtain a plurality of encrypted matrix blocks;

[0105] It should be noted that the discrete cosine transform (DCT) is a mathematical transformation that converts data from the spatial domain to the frequency domain, which helps decompose an image or signal into components of different frequencies. Pseudo-random scrambling encryption is applied to the DCT (discrete cosine transform) coefficients in this step to increase the randomness of the data, thereby improving security. Singular value decomposition (SVD) is a method that decomposes a matrix into a series of specific matrix products, which helps extract and process the main features of the image.

[0106] Specifically, a discrete cosine transform is performed on each of the matrix blocks to obtain several groups of discrete cosine transform coefficients, and then, according to each of the one-dimensional arrays, each of the discrete cosine transform coefficients is pseudo-randomly scrambled and encrypted to obtain several groups of encrypted discrete cosine transform coefficients, and then a singular value decomposition operation is performed on each of the encrypted discrete cosine transform coefficients to obtain several encrypted matrix blocks.

[0107] Step S43: embedding the encrypted watermark into each of the encrypted matrix blocks based on a preset watermark embedding formula to obtain a plurality of embedded watermark matrix blocks.

[0108] It should be noted that the preset watermark embedding formula is a specific algorithm or rule used to guide how to embed the encrypted watermark information into the encrypted matrix block. The purpose of this process is to combine the watermark information with the image data to generate the final embedded watermark matrix block.

[0109] Specifically, based on a preset watermark embedding formula, the system can embed the encrypted watermark information into the SVD coefficients of each encrypted matrix block according to a specific pattern or rule. For example, the watermark information is embedded in the matrix after SVD decomposition. The watermark information is usually embedded in the singular value matrix Σ because singular values ​​have a small impact on the visual quality of the image. In one possible implementation, the 1-bit data of the encrypted watermark is combined with the image frequency domain according to a custom watermark embedding formula. This process can be achieved by adjusting specific values ​​in the SVD coefficients, thereby achieving effective embedding of the watermark information without significantly affecting image quality. After performing the above embedding process on each matrix block of the three channels, n sets (n>1) of complete watermark data will eventually be embedded in the frequency domain of the entire image.

[0110] For example, in one specific implementation, the system first performs pseudo-random scrambling encryption on the grayscale watermark based on a one-dimensional array to obtain an encrypted watermark. The system then performs DCT, pseudo-random scrambling encryption, and SVD operations on each matrix block to obtain several encrypted matrix blocks. Finally, based on a preset watermark embedding formula, the system embeds the encrypted watermark into each encrypted matrix block to obtain several embedded watermark matrix blocks. This method not only improves the security and concealment of the watermark, but also enhances its robustness and anti-attack capabilities.

[0111] This embodiment performs pseudo-random scrambling encryption on the grayscale watermark according to each of the one-dimensional arrays to obtain an encrypted watermark. Then, discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the matrix blocks according to each of the one-dimensional arrays to obtain a plurality of encrypted matrix blocks. Then, based on a preset watermark embedding formula, the encrypted watermark is embedded into each of the encrypted matrix blocks to obtain a plurality of embedded watermark matrix blocks. Then, the watermark information is rearranged using a pseudo-random sequence, making the distribution of the watermark information unpredictable, thereby significantly improving the security of the watermark, preventing unauthorized users from easily detecting or extracting the watermark information, and improving the concealment of the watermark. This not only increases the complexity of the data, but also enables the watermark to better resist various image processing operations, such as compression, filtering, and cropping, thereby improving the robustness of the watermark. Moreover, due to the multiple layers of encryption and transformation, the watermark has stronger anti-attack capabilities. Even in the face of complex attack methods, the watermark information can be effectively protected and extracted.

[0112] In a feasible implementation manner, the discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the one-dimensional arrays to obtain a plurality of encrypted matrix blocks, including:

[0113] Step S51, performing discrete cosine transform on each matrix block to obtain several groups of discrete cosine transform coefficients;

[0114] It's important to note that the discrete cosine transform (DCT) is a transform technique widely used in image processing and data compression. It's related to the Fourier transform, but specifically designed for processing real data. The DCT converts the spatial information of an image block into the frequency domain. Low-frequency coefficients contain the block's primary energy and visual information, while high-frequency coefficients contain detail and noise. This transforms image data into a domain more suitable for embedding watermark information.

[0115] Specifically, when performing DCT, each matrix block is converted into a set of DCT coefficients, which represent the components of the image block at different frequencies. In one possible implementation, the system selectively retains low-frequency coefficients because they have the greatest impact on the visual effect of the image. Appropriately modifying these coefficients can be used to embed watermark information.

[0116] Step S52, performing pseudo-random scrambling encryption on each of the discrete cosine transform coefficients according to each of the one-dimensional arrays to obtain a plurality of groups of encrypted discrete cosine transform coefficients;

[0117] It should be noted that the pseudo-random permutation encryption is a method of rearranging data by using a pseudo-random sequence, which increases the randomness of the data, so that the original pattern of the data is not easy to be identified. In the embodiments of the present application, the pseudo-random permutation encryption is used to improve the security of the watermark, to prevent unauthorized users from extracting or destroying the watermark information by analyzing the DCT coefficients.

[0118] Specifically, a one-dimensional array is generated by the watermark encryption factor, which defines the permutation order of the DCT coefficients. In this way, each DCT coefficient is rearranged according to the indication in the one-dimensional array, generating a set of encrypted DCT coefficients, to ensure that only users with the correct one-dimensional array can correctly decrypt and extract the watermark information.

[0119] Step S53, singular value decomposition operation is performed on each of the encrypted discrete cosine transform coefficients to obtain a plurality of encrypted matrix blocks.

[0120] It should be noted that the singular value decomposition (SVD) is a method of decomposing a matrix into a series of specific matrix products to reveal the internal structure of the matrix, which is decomposed into a series of singular values and corresponding left and right singular vectors.

[0121] Specifically, the SVD operation is performed on the encrypted DCT coefficients, and the SVD decomposition is performed on the permuted DCT coefficient matrix to obtain three matrices: the left singular matrix U, the diagonal matrix Σ (singular value matrix) and the right singular matrix V, to generate encrypted matrix blocks, which will be used in the subsequent watermark embedding step. In one possible implementation, the system will use the results of SVD to adjust the characteristics of the image block in order to embed the watermark information without significantly affecting the image quality.

[0122] The embodiments of the present application obtain a plurality of sets of discrete cosine transform coefficients by performing discrete cosine transform on each of the matrix blocks, and then perform pseudo-random permutation encryption on each of the discrete cosine transform coefficients according to each of the one-dimensional arrays to obtain a plurality of sets of encrypted discrete cosine transform coefficients, and then perform singular value decomposition operation on each of the encrypted discrete cosine transform coefficients to obtain a plurality of encrypted matrix blocks, and then convert the image data from the spatial domain to the frequency domain by DCT, i.e. concentrate the energy of the image in a few low-frequency coefficients to better represent the frequency characteristics of the image, increase the unpredictability of the watermark information, and at the same time, through the pseudo-random permutation encryption, the watermark information has been encrypted before being embedded into the image, increasing the difficulty of cracking, thereby improving the security of the watermark, and through SVD (singular value decomposition operation) to extract and process the main features of the image, thereby improving the robustness of the watermark, so that the watermark can resist various image processing operations such as compression, filtering, cropping, etc., and enhance the anti-attack ability of the watermark.

[0123] In a feasible implementation manner, performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image includes:

[0124] Step S61, performing inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform on each of the embedded watermark matrix blocks to obtain a plurality of decryption matrix blocks;

[0125] It should be noted that the inverse singular value decomposition can restore the singular value decomposition matrix to its original state. During the watermark embedding process, singular value decomposition is used to modify the image data to embed the watermark, while the inverse singular value decomposition is used to restore the original data structure. Pseudo-random scrambling decryption refers to using the same pseudo-random sequence as used during encryption to restore the encrypted data to its original order, thereby ensuring the security and accuracy of the watermark information. The inverse discrete cosine transform (Inverse DCT) is an operation that converts data from the frequency domain back to the spatial domain. It corresponds to the discrete cosine transform and is used to restore the spatial domain representation of the image.

[0126] Specifically, each of the embedded watermark matrix blocks is subjected to inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform to obtain a number of decrypted matrix blocks, wherein the inverse singular value decomposition operation can restore the original image data structure from the encrypted singular values ​​and singular vectors, the pseudo-random scrambling decryption ensures that the order of the data is correctly restored, and the inverse DCT operation converts the frequency domain data back to the spatial domain, so that the image block is restored to a state close to the original state while retaining the embedded watermark information.

[0127] Step S62: performing inverse wavelet transform on each of the decryption matrix blocks to generate the target embedded watermark image.

[0128] It should be noted that the inverse wavelet transform is an operation that converts image data from the frequency domain back to the spatial domain, corresponding to the wavelet transform. During the watermark embedding process, the wavelet transform is used to decompose the image into components of different frequencies so that the watermark can be embedded in the frequency domain. The inverse wavelet transform is used to recombine the processed image data to generate the final watermarked image.

[0129] Specifically, the decrypted matrix block is subjected to an inverse wavelet transform to restore the image embedded with the watermark. This involves recombining the various frequency components to reconstruct the spatial domain representation of the image, thereby generating an image containing watermark information. The image is visually similar to the original image, but contains watermark information for copyright protection or content authentication. This not only improves the security and concealment of the watermark, but also enhances the robustness and adaptability of the watermark, so that the watermark can remain stable under various image processing operations while ensuring that the image quality is not significantly affected.

[0130] The embodiment obtains a plurality of decrypted matrix blocks by performing inverse singular value decomposition, pseudo-random scrambling decryption and inverse discrete cosine transform on each of the embedded watermark matrix blocks, and then performs inverse wavelet transform on each of the decrypted matrix blocks to generate the target embedded watermark image, thereby recovering the original image information in the encrypted matrix blocks, which helps to maintain image quality, reduce the impact of watermark embedding on image visual effects, restore the processed image data to the original spatial domain representation, maintain the integrity of image data, make the embedded watermark image as similar as possible to the original image in visual effect, and improve the robustness of the watermark. Since the inverse wavelet transform can convert image data from the frequency domain back to the spatial domain, the watermark information is more integrated with the image content, and it is not easy to be detected by unauthorized users, which helps to further hide the watermark information and enhance the security of the watermark.

[0131] In a possible implementation, after the image restoration of each of the embedded watermark matrix blocks to obtain the target embedded watermark image, the method further includes:

[0132] Step S71, obtaining a watermark extraction request of a target user;

[0133] It should be noted that the watermark extraction request requires extracting previously embedded watermark information from a specific image, where the request can be automatic or manually initiated by the user through an interface. The target user refers to an individual or entity authorized to access and extract watermark information.

[0134] Specifically, the process of obtaining a request can involve user identity verification to ensure that only authorized users can extract watermark information. In addition, the request can include specific parameters such as the identifier of the image, the type of watermark or the detailed requirements for extraction, etc., which are not limited herein.

[0135] Step S72, based on the watermark extraction request, performing wavelet transform on the target embedded watermark image to extract one-dimensional watermark information;

[0136] It should be noted that performing wavelet transform on the target embedded watermark image means using wavelet transform technology to convert the image from the spatial domain to the frequency domain, so as to locate and extract watermark information in different frequency subbands. The one-dimensional watermark information refers to the data representing the watermark extracted from a plurality of frequency subbands of the image, which is usually contained in the low-frequency or intermediate-frequency subband of the image.

[0137] Specifically, based on the watermark extraction request, the target watermarked image is subjected to a wavelet transform to extract the one-dimensional watermark information. The wavelet transform allows the system to analyze image features at different scales, thereby effectively extracting the watermark information. In one possible implementation, the system selects the same wavelet basis and decomposition level as used during watermark embedding to ensure that the watermark information can be accurately extracted from the wavelet coefficients.

[0138] Step S73: performing inverse wavelet transform on the one-dimensional watermark information to restore the one-dimensional watermark information to the original watermark in the spatial domain.

[0139] It should be noted that the inverse wavelet transform can convert the extracted watermark information from the frequency domain back to the spatial domain to restore the original watermark image or text. The original watermark in the spatial domain refers to the original form of the watermark before it is embedded into the image, which can be an image or watermark text.

[0140] Specifically, the inverse wavelet transform is the inverse process of the wavelet transform, which can reconstruct the spatial domain image from the frequency domain data. The one-dimensional watermark information is subjected to an inverse wavelet transform to restore the one-dimensional watermark information to the original watermark in the spatial domain. Thus, the system uses the same wavelet basis and parameters as when the watermark was embedded to perform the inverse transform to ensure that the watermark information can be accurately restored. Figure 3 .

[0141] This embodiment obtains a watermark extraction request from the target user, and then based on the watermark extraction request, performs a wavelet transform on the target embedded watermark image to extract the one-dimensional watermark information, and then performs an inverse wavelet transform on the one-dimensional watermark information to restore the one-dimensional watermark information to the original watermark in the spatial domain. By extracting the watermark information embedded in the image, the authenticity and integrity of the image can be verified, which helps prevent the image from being illegally tampered with or forged, ensures the reliability of the image content, and ensures the reversibility of the watermark information. Due to the multi-scale enhancement processing of the original image and the discrete watermark embedding enhancement processing of this scheme, the watermark data is randomly and discretely distributed in the frequency domain of the original image at each scale, and the number of embeddings is greater than one group. Therefore, it is possible to directly extract the watermark information from the embedded blind watermark image without the need for the original image and the watermark image.

[0142] For example, to help understand the implementation process of the watermark embedding method, please refer to Figure 4 , Figure 4 This is a brief flow chart of the watermark embedding method provided in this application.

[0143] Specifically, the implementation flow shown in the figure illustrates the complete process of image-enhanced watermarking. First, the original image is subjected to a wavelet transform. The image is then converted to grayscale and sparsely processed to generate a watermark. The image is then partitioned into four-dimensional blocks, and the watermark information is embedded into the image blocks through a process called high-scatter cosine transform, pseudo-random scrambling encryption, and singular value decomposition. For example, given an original image and a text watermark, the system first converts the image to YUV format, extracts three channels for wavelet transform, and then converts the text watermark into a one-dimensional array and encrypts it. After four-dimensional partitioning, each block undergoes a DCT transform and SVD decomposition, with the watermark information embedded into the singular values ​​according to a custom formula. Finally, the image blocks are recovered through the inverse process, and the processed blocks are reassembled into the final watermarked image using an inverse wavelet transform. This not only improves the concealment and security of the watermark, but also enhances its robustness to various image processing operations.

[0144] It should be noted that the examples in the figure are only used to understand the present application and do not constitute a limitation on the watermark embedding method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0145] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0146] This application also provides a watermark embedding device, please refer to Figure 5 , the watermark embedding device includes:

[0147] An acquisition module 51 is used to acquire the original image and the original watermark;

[0148] An enhancement module 52 is configured to perform multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks;

[0149] an embedding module 53, configured to perform discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks;

[0150] The restoration module 54 is configured to perform image restoration on each of the watermark-embedded matrix blocks to obtain a target watermark-embedded image.

[0151] The watermark embedding device is further used for:

[0152] Performing format conversion on the original image to obtain a target format image;

[0153] Based on a preset transformation channel, performing a wavelet transform on the target format image to obtain a low-frequency component corresponding to the preset transformation channel;

[0154] The low-frequency components are four-dimensionally blocked and converted into the matrix blocks.

[0155] The watermark embedding device is further configured to:

[0156] Obtain watermark encryption factors and generate one-dimensional arrays based on the watermark encryption factors;

[0157] Perform gray one-dimensional processing on the original watermark to obtain a gray watermark;

[0158] Based on the one-dimensional arrays, perform discrete watermark embedding on the matrix blocks and the gray watermark to obtain embedded watermark matrix blocks.

[0159] The watermark embedding device is further configured to:

[0160] Perform pseudo-random permutation encryption on the gray watermark according to the one-dimensional arrays to obtain an encrypted watermark;

[0161] Perform discrete cosine transform, pseudo-random permutation encryption, and singular value decomposition operations on the matrix blocks according to the one-dimensional arrays to obtain encrypted matrix blocks;

[0162] Embed the encrypted watermark into the encrypted matrix blocks based on a preset watermark embedding formula to obtain embedded watermark matrix blocks.

[0163] The watermark embedding device is further configured to:

[0164] Perform discrete cosine transform on the matrix blocks to obtain groups of discrete cosine transform coefficients;

[0165] Perform pseudo-random permutation encryption on the discrete cosine transform coefficients according to the one-dimensional arrays to obtain groups of encrypted discrete cosine transform coefficients;

[0166] Perform singular value decomposition operations on the encrypted discrete cosine transform coefficients to obtain encrypted matrix blocks.

[0167] The watermark embedding device is further configured to:

[0168] Perform inverse singular value decomposition, pseudo-random permutation decryption, and inverse discrete cosine transform on the embedded watermark matrix blocks to obtain decrypted matrix blocks;

[0169] Perform inverse wavelet transform on the decrypted matrix blocks to generate the target embedded watermark image.

[0170] The watermark embedding device is further configured to:

[0171] Obtain a watermark extraction request of a target user;

[0172] Based on the watermark extraction request, performing wavelet transform on the target watermarked image to extract one-dimensional watermark information;

[0173] Performing inverse wavelet transform on the one-dimensional watermark information to restore the one-dimensional watermark information to the original watermark in the spatial domain.

[0174] The watermark embedding device provided in this application, employing the watermark embedding method of the aforementioned embodiment, can resolve the technical problems described in the background art. Compared to the prior art, the beneficial effects of the watermark embedding device provided in this application are the same as those of the watermark embedding method of the aforementioned embodiment. Other technical features of the watermark embedding device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0175] The present application provides a watermark embedding device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the watermark embedding method in the above-mentioned embodiment 1.

[0176] Reference below Figure 6 , which shows a schematic diagram of the structure of a watermark embedding device suitable for implementing the embodiments of the present application. The watermark embedding device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The watermark embedding device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application.

[0177] like Figure 6As shown, the watermark embedding device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the watermark embedding device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or a hard disk; and a communication device 1009. The communication device 1009 can allow the watermark embedding device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a watermark embedding device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.

[0178] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0179] The watermark embedding device provided in this application, employing the watermark embedding method of the aforementioned embodiment, can resolve the technical problems described in the background art. Compared to the prior art, the beneficial effects of the watermark embedding device provided in this application are the same as those of the watermark embedding method of the aforementioned embodiment. Other technical features of the watermark embedding device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0180] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0181] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0182] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the watermark embedding method in the above embodiment.

[0183] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0184] The computer-readable storage medium may be included in the watermark embedding device; or may exist independently without being assembled into the watermark embedding device.

[0185] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the watermark embedding device, the watermark embedding device:

[0186] Get the original image and the original watermark;

[0187] Performing multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks;

[0188] Performing discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks;

[0189] Perform image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

[0190] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0191] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0192] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0193] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the watermark embedding method described above, and can solve the technical problems described in the background art. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the watermark embedding method provided in the above embodiments, and are not further elaborated here.

[0194] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the watermark embedding method described above when executed by a processor.

[0195] The computer program product provided in this application can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the watermark embedding method provided in the above embodiment, which will not be repeated here.

[0196] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A watermark embedding method, characterized in that: include: Get the original image and the original watermark; Performing multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks; Performing discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks; Perform image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

2. The watermark embedding method according to claim 1, wherein: The multi-scale enhancement process is performed on the original image to obtain a plurality of matrix blocks, including: Performing format conversion on the original image to obtain a target format image; Based on a preset transformation channel, performing a wavelet transform on the target format image to obtain a low-frequency component corresponding to the preset transformation channel; Each of the low-frequency components is divided into four-dimensional blocks and converted into the plurality of matrix blocks.

3. The watermark embedding method according to claim 1, wherein: The discrete watermark embedding enhancement process is performed based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks, including: Obtaining a watermark encryption factor, and generating a plurality of one-dimensional arrays based on the watermark encryption factor; Performing one-dimensional grayscale processing on the original watermark to obtain a grayscale watermark; Based on each of the one-dimensional arrays, discrete watermark embedding is performed on each of the matrix blocks and the grayscale watermark to obtain a plurality of embedded watermark matrix blocks.

4. The watermark embedding method according to claim 3, wherein: Based on each of the one-dimensional arrays, each of the matrix blocks and the grayscale watermark is discretely watermarked to obtain a plurality of embedded watermark matrix blocks, including: According to each of the one-dimensional arrays, the grayscale watermark is pseudo-randomly scrambled and encrypted to obtain an encrypted watermark; According to each of the one-dimensional arrays, discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the matrix blocks to obtain a plurality of encrypted matrix blocks; Based on a preset watermark embedding formula, the encrypted watermark is embedded into each of the encrypted matrix blocks to obtain a plurality of embedded watermark matrix blocks.

5. The watermark embedding method according to claim 4, wherein: According to each of the one-dimensional arrays, discrete cosine transform, pseudo-random scrambling encryption, and singular value decomposition operations are performed on each of the matrix blocks to obtain a plurality of encrypted matrix blocks, including: Performing discrete cosine transform on each of the matrix blocks to obtain a plurality of groups of discrete cosine transform coefficients; According to each of the one-dimensional arrays, performing pseudo-random scrambling encryption on each of the discrete cosine transform coefficients to obtain a plurality of groups of encrypted discrete cosine transform coefficients; A singular value decomposition operation is performed on each of the encrypted discrete cosine transform coefficients to obtain a plurality of encrypted matrix blocks.

6. The watermark embedding method according to claim 1, wherein: The performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image includes: Performing inverse singular value decomposition, pseudo-random scrambling decryption, and inverse discrete cosine transform on each of the embedded watermark matrix blocks to obtain a plurality of decryption matrix blocks; Perform wavelet inverse transformation on each of the decryption matrix blocks to generate the target embedded watermark image.

7. The watermark embedding method according to claim 1, wherein: After performing image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image, the method further includes: Get the target user's watermark extraction request; Based on the watermark extraction request, performing wavelet transform on the target watermarked image to extract one-dimensional watermark information; Performing inverse wavelet transform on the one-dimensional watermark information to restore the one-dimensional watermark information to the original watermark in the spatial domain.

8. A watermark embedding device, characterized in that: include: An acquisition module, used to obtain the original image and the original watermark; An enhancement module, configured to perform multi-scale enhancement processing on the original image to obtain a plurality of matrix blocks; An embedding module, configured to perform discrete watermark embedding enhancement processing based on each matrix block and the original watermark to obtain a plurality of embedded watermark matrix blocks; The restoration module is used to perform image restoration on each of the embedded watermark matrix blocks to obtain a target embedded watermark image.

9. A watermark embedding device, characterized in that: The watermark embedding device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the watermark embedding method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the watermark embedding method according to any one of claims 1 to 7 are implemented.