Watermark embedding method, watermark identification method and electronic equipment
Through the ring-type embedding method and improved Schur decomposition, combined with the deep learning model, the shortcomings of the existing blind watermark method under combined attacks are solved, the robustness and security of watermarks are improved, and the effect of multi-copyright sharing is achieved.
Patent Information
- Application Number
- CN202510197691.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-02-21
AI Technical Summary
The existing blind watermarking method is difficult to extract clear copyrighted images under combined attacks, and it fails to effectively consider the correction of watermark information errors after the attack, which affects the clarity of the extracted watermark image. The encryption method is single, and the security is insufficient, so copyright sharing cannot be achieved.
The circular embedding method is adopted to embed watermark information in the low-frequency domain of the carrier image, and the robustness and security of watermarks are improved through improved Schur decomposition and deep learning models, and multi-copyright sharing is realized.
It improves the security and robustness of watermark information, can effectively extract clear copyrighted images in multiple attack situations, and realizes multi-copyright sharing, enhancing the security of information.
Smart Images

Figure CN120163699A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of watermark processing, and in particular, to a watermark embedding method, a watermark recognition method, and an electronic device. Background Art
[0002] In existing blind watermark algorithms, watermark information is embedded in the low-frequency domain or singular values of an image. When resisting a single type of attack, good resistance performance can be obtained, that is, it has strong robustness against geometric attacks, but poor robustness against non-geometric attacks, or shows good resistance performance against non-geometric attacks, while the clear copyright image cannot be extracted for geometric attacks.
[0003] Currently, the following deficiencies still exist in blind watermark methods:
[0004] Most existing blind watermark methods use traditional frequency domain transformation methods to embed watermark information in the low frequency and the largest singular value of the carrier image, and good robustness can be obtained for non-geometric attacks or geometric attacks, but it is still difficult to extract a clear copyright image under combined attacks.
[0005] Most existing watermark methods are based on block-by-block embedding of watermark information. When the image undergoes geometric deformation, the synchronization of the watermark will be seriously affected.
[0006] Existing blind watermarks do not consider the correction of watermark information errors after attacks, resulting in a serious impact on the clarity of the extracted watermark image. Moreover, the encryption method is relatively single, which is not conducive to information security and cannot achieve copyright sharing. Summary of the Invention
[0007] In view of this, this application provides a watermark embedding method, a watermark recognition method, and an electronic device to solve the above technical problems.
[0008] In a first aspect, an embodiment of this application provides a watermark embedding method, including:
[0009] Processing the carrier image to obtain a first low-frequency feature, and generating s first sub-loops based on the first low-frequency feature;
[0010] Processing the watermark image to obtain a second low-frequency feature, and generating s second sub-loops based on the second low-frequency feature;
[0011] Encrypting the s second sub-loops to obtain s encrypted second sub-loops;
[0012] Determining s zero watermarks based on the s first sub-loops and the corresponding encrypted second sub-loops;
[0013] Embedding the s zero watermarks into the carrier image to obtain a carrier image containing watermark information.
[0014] In some possible implementations, processing the carrier image to obtain a first low-frequency feature, and generating s first sub-loops based on the first low-frequency feature, including:
[0015] Converting the carrier image to the YCbCr color space to obtain the Y component;
[0016] Performing a dual-tree complex wavelet transform on the Y component to obtain the first low-frequency feature where e represents the number of levels of decomposition of the dual-tree complex wavelet transform, and t represents the frequency domain sub-bands in different directions;
[0017] Dividing s first sub-loops on the first low-frequency feature: h1, h2,... h s , where h i is the i-th first sub-loop, 1 ≤ i ≤ s.
[0018] In some possible implementations, encrypting s second sub-loops to obtain s encrypted second sub-loops; including:
[0019] Randomly generating s positioning matrices M1, M2,... M s , the i-th positioning matrix M i represents the i-th secret key key i ;
[0020] Using the i-th secret key key i to perform an encryption operation on the i-th second sub-loop w i to obtain the encrypted i-th second sub-loop
[0021]
[0022] where is the exclusive OR operation.
[0023] In some possible implementations, determining s zero watermarks based on s first sub-loops and the corresponding encrypted second sub-loops, including:
[0024] Performing an improved Schur decomposition on the i-th first sub-loop h i to obtain the i-th upper triangular matrix
[0025] Performing a binarization operation on the i-th upper triangular matrix to obtain the i-th binary feature matrix F i :
[0026]
[0027] where mod is the modulo operation function;
[0028] The i-th second sub-ring based on encryption and the i-th binary feature matrix F i , to obtain the i-th zero watermark Z i :
[0029]
[0030] wherein, is the exclusive OR operation.
[0031] In some possible implementations, embedding the zero watermark into the carrier image to obtain the carrier image containing the watermark information includes:
[0032] Based on the i-th zero watermark Z i , processing the element in the first row and first column of the upper triangular matrix of the i-th first sub-ring to obtain the maximum singular value of the i-th upper triangular matrix with embedded watermark
[0033]
[0034] where Δ is the quantization step and μ is the embedding strength; rem 1,i is the first remainder value:
[0035] Reconstructing the i-th upper triangular matrix with embedded watermark to obtain the i-th feature matrix containing the watermark information
[0036]
[0037]
[0038] where U is a unitary matrix and U T is the transpose matrix of U; Reconstructing the i-th feature matrix containing the watermark information
[0039] to obtain the i-th third sub-ring containing the watermark information;
[0040] Performing the inverse dual-tree complex wavelet transform on the i-th third sub-ring containing the watermark information to obtain the i-th fourth sub-ring;
[0040] Performing image reconstruction on all the fourth sub-rings to obtain the carrier image containing the watermark information.
[0041] In a second aspect, an embodiment of the present application provides a watermark recognition method, including:
[0042] Processing the carrier image containing the watermark information to obtain the third low-frequency feature, and generating s fifth sub-rings based on the third low-frequency feature;
[0043] Perform an improved Schur decomposition on each fifth sub-ring to obtain s upper triangular matrices;
[0044] Based on the s upper triangular matrices, determine s first watermarks;
[0045] Use s secret keys to decrypt the corresponding first watermarks respectively to obtain s second watermarks, where the second watermark is the decrypted first watermark;
[0046] Process the s second watermarks using a pre-trained optimization network to obtain s third watermarks.
[0047] In a possible implementation, based on the s upper triangular matrices, determining s first watermarks includes:
[0048] Based on the i-th upper triangular matrix Determine the i-th first watermark W i e :
[0049]
[0050] where Δ is the quantization step size and μ is the embedding strength: rem 2,i is the second remainder: is the matrix the element in the first row and first column.
[0051] In a possible implementation, the optimization network includes a downsampling unit, a first convolutional layer, a first batch processing layer, a first ReLU function, a second convolutional layer, a second batch processing layer, a second ReLU function, a third convolutional layer, a third batch processing layer, a third ReLU function, and a fully connected layer connected in sequence; where the convolutional kernel size of the first convolutional layer is 3×3; the convolutional kernel size of the second convolutional layer is 3×3; the convolutional kernel size of the third convolutional layer is 3×3;
[0052] The method further includes:
[0053] Establish a training set, where the training set includes: multiple groups of watermark image samples, and each group of watermark image samples includes an original watermark image and an attacked watermark image;
[0054] Process the attacked watermark image using the optimization network to obtain an optimized watermark image;
[0055] Based on the optimized watermark image and the original watermark image, determine a loss value;
[0056] Update the parameters of the optimization network based on the loss value.
[0057] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the watermark embedding method or the watermark recognition method of the embodiment of the present application is implemented.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the watermark embedding method or the watermark recognition method of the embodiment of the present application is implemented.
[0059] The present application performs circular encryption on the carrier image and the copyright watermark, which can improve the security of the watermark information and can achieve multi-copyright sharing. Description of the Drawings
[0060] In order to more clearly illustrate the specific implementation manners of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific implementation manners or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0061] Figure 1 It is a schematic diagram of the circular sub-band division provided by the embodiment of the present application;
[0062] Figure 2 It is a flowchart of the watermark embedding method provided by the embodiment of the present application;
[0063] Figure 3 It is a flowchart of the watermark recognition method provided by the embodiment of the present application;
[0064] Figure 4 It is a schematic diagram of the carrier image and the encrypted watermark sequence provided by the embodiment of the present application;
[0065] Figure 5 It is provided by the embodiment of the present application Figure 4 Schematic diagram of the peak signal-to-noise ratio after embedding the encrypted watermark in the carrier image;
[0066] Figure 6 It is provided by the embodiment of the present application Figure 4 Normalized correlation coefficient value of the carrier image after cropping attack;
[0067] Figure 7 It is provided by the embodiment of the present application Figure 4 Normalized correlation coefficient value of the carrier image under different median filtering size attacks;
[0068] Figure 8The variation of the normalized correlation coefficient values obtained after JEPG compression attacks with different intensities provided by the embodiments of the present application;
[0069] Figure 9 The functional structure diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners
[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated herein can be arranged and designed in various different configurations.
[0071] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.
[0072] First, a brief introduction to the design concept of the embodiments of the present application is given.
[0073] To overcome the existing technical problems of digital watermarks, the present application provides a dual watermark method that combines circular embedding and deep learning. The dual-tree complex wavelet transform (DT-CWT) is performed on the carrier image to obtain a stable embedding domain to eliminate the influence of random signals on the watermark, and circular embedding units are constructed in the stable low-frequency domain to improve the synchronization of the watermark under rotation attacks and multiple attacks. Secondly, the improved Schur decomposition is used for the constructed circular region to further improve the stability of the watermark. At the same time, to balance the robustness and invisibility of the watermark, deep learning is used to train the embedding strength of the watermark to reduce the impact of the watermark on the visual effect of the image, and the watermarked image after the attack is trained to generate a copyright that is extremely similar to the original watermark. In case of a copyright dispute, the clarity of the watermark can be improved through the trained network model. Different encryption methods are used to encrypt different watermark rings for the same watermark, and the encrypted watermark information is embedded in the encryption domain to improve the security of the information.
[0074] The inventive points of the present application include:
[0075] 1. Circular encryption
[0076] Since the encryption methods used in existing blind watermarking technologies are relatively single, with low security and unable to achieve copyright sharing, most of them preprocess and encrypt images and watermarks separately based on a block-based approach to improve the security of the watermark. In the present invention, a ring-shaped method is adopted to generate watermark sub-rings and image sub-rings
[0077]
[0078] where H is the carrier image and W is the original copyright watermark. To further improve the unpredictability of the copyright watermark, a positioning matrix M containing multiple representation keys is randomly generated i , i ∈ [1, s], and then different encryption methods are selected by judging the elements in the positioning matrix M i to encrypt the watermark sub-rings:
[0079]
[0080] Since the copyright of some digital works sometimes does not belong to an individual or a single organization, but is jointly owned by multiple people or multiple organizations. For a work with multiple co-owned copyrights, it can only be held by one person and cannot be shared by multiple people, resulting in internal copyright disputes among members. To achieve key sharing and facilitate the management of copyright information in the later stage, the Lagrange interpolation method is used to distribute the keys.
[0081] The user set is U = {u1, u2,... u s}, and the shared key set is K = {k1, k2,... k s}, where each element in the shared key set satisfies and the elements in K correspond one-to-one with the elements in U. (x i , f(x i )) is used to solve the coefficient term a i in the key sharing equation, and the key is used to solve the chaotic mapping parameter or scrambling times of the encryption algorithm. The decryption formula is as follows:
[0082]
[0083] where a0 is the initial value of the encryption method, and f(x) is the chaotic mapping parameter or scrambling times obtained by using the corresponding key . When user u i gets the key, first substitute (x i, f(x i )) and the initial value a0 into the constant term a i of the decryption formula, and then substitute the key Substitute into the decryption formula to obtain the chaotic mapping parameters.
[0084] 2. Ring-based watermark embedding strategy
[0085] This strategy is divided into two stages: ring division and zero-watermark generation. In the first stage, to reduce the impact of geometric attacks on watermark synchronization, the ring sub-bands are divided before watermark embedding. First, the low-frequency domain of the carrier image is divided into different ring-shaped sub-bands with the center of the image as the center of the circle, as Figure 1 shown. Calculate the distance d from all pixels to the center of the circle according to the following formula s :
[0086]
[0087] And all pixels with the same distance are divided into a ring h, and this distance is the radius of the ring until the last ring with the smallest radius is calculated.
[0088] Among them, (x0, y0) is the center coordinate, (x, y) is the coordinate of the image pixel, round is the rounding function, r s is the radius of the ring, s is the number of concentric circles, and satisfies 1 ≤ s ≤ r / b. Figure 1 shows the concentric circles composed of different radii, where the numbers on the yellow sub-blocks are the distances from the corresponding pixels to the center of the circle, that is, the radii of the rings.
[0089] The second stage is used to generate the zero-watermark. After obtaining the embedding ring h of the image, first, according to each ring is cut into two equal parts, which are the left half-ring h l and the right half-ring h r , and the DCT coefficients of the ring-shaped sub-segments are extracted using the discrete cosine transform (DCT) Calculate the first 9 DCT coefficients to obtain the energy information of each half-ring Secondly, according to the energy size of each half-ring, generate the image feature λ:
[0090]
[0091] Finally, the extracted image features and the encrypted watermark are used to generate zero-watermark information for subsequent watermark embedding.
[0092] 3. Improved Schur decomposition
[0093] As a matrix decomposition method for feature extraction, Schur decomposition can well remove image redundancy and decompose features with translational invariance and robustness. It has been widely used in the fields of image recognition, information hiding, and digital forensics. For a matrix I ∈ C of size m×n m×n , there exists a unitary matrix U ∈ Cm×n , such that
[0094]
[0095] where U is a unitary matrix and R ∈ C m×n is an upper triangular matrix. Since the matrix R contains a large amount of characteristic information of the matrix, the watermark information is embedded in the largest singular value λ = eig(R) of the image to resist conventional attacks. Embedding watermark information in the image can be regarded as a noise signal. Most existing watermarking methods directly quantize and embed the watermark information into the first element λ of the R matrix of the image:
[0096] λ' = λ + μW
[0097] where λ is the original largest singular value, λ' is the largest singular value after embedding the watermark information, μ is the embedding strength, and W is the watermark information. Without any attack, W is expressed as
[0098]
[0099] When the watermarked image is attacked, it is defaulted that the attack signal acts on the pixel value of the image as an additive signal like the watermark information, affecting λ' carrying the watermark information:
[0100] λ att = λ + μW + A
[0101] = λ' + A
[0102] where λ att is the maximum value of the watermarked image after the attack. When the watermarked image is attacked, the extraction of the watermark is
[0103]
[0104] where W' is the extracted watermark, and W att attack information. It can be seen that the clarity of the watermark information is directly affected by the strength of the attack signal. When the strength of the attack signal increases, the attack signal will directly cover the watermark information. To further reduce the influence of the attack signal on the watermark information, this embodiment improves the traditional Schur decomposition:
[0105]
[0106] where R F is the modulation matrix, and F is the adjustment factor used to control the magnitude of the r F (1,1) value. When the improved Schur decomposition decomposes the attacked image, the change range of the singular value can be reduced by F.
[0107] 4. Deep learning model
[0108] Due to the influence of noise, compression, or filtering during the transmission of information in the channel, the copyright information of the watermarked image is affected, and the extracted watermarked image contains more noise points. To further improve the clarity of the watermarked image, an intermediate copyright image generation model is designed to optimize the extracted watermark.
[0109] Compared with the prior art, the beneficial effects of this application are as follows:
[0110] 1. Circular encryption is performed on the carrier image and the copyright watermark, which can improve the security of the watermark information and enable multi-copyright sharing.
[0111] 2. The circular embedding method is more robust than the block-based watermarking, which can improve the robustness of the algorithm. Even if the watermarked image undergoes geometric deformation, the characteristic information of the image sub-ring is less affected, thereby improving the algorithm's resistance to shear attacks, row and column offsets; at the same time, the multi-directionality and singularity of DT-CWT can reduce the impact of noise attacks, JPEG compression, and filtering attacks on the image.
[0112] 3. Based on the improved Schur decomposition, the resistance performance of the watermark is further improved, and the circular watermark embedding and extraction method effectively increases the capacity of the embedded watermark.
[0113] 4. Using the deep learning method to train the attacked watermarked image, a copyright image with a very high similarity to the original watermark can be generated through the network, which is beneficial to improving the clarity of the watermark.
[0114] After introducing the application scenarios and design concepts of the embodiments of this application, the technical solutions provided by the embodiments of this application will be described below.
[0115] As Figure 2 shown, the embodiments of this application provide a watermark embedding method, including:
[0116] Step 101: Process the carrier image to obtain the first low-frequency feature, and generate s first sub-rings based on the first low-frequency feature;
[0117] Step 102: Process the watermark image to obtain the second low-frequency feature, and generate s second sub-rings based on the second low-frequency feature;
[0118] Step 103: Encrypt the s second sub-rings to obtain s encrypted second sub-rings;
[0119] Step 104: Determine s zero watermarks based on the s first sub-rings and the corresponding encrypted second sub-rings;
[0120] Step 105: Embed the s zero watermarks into the carrier image to obtain a carrier image containing watermark information.
[0121] In this embodiment, circular sub-bands are constructed on the carrier image and the watermark image respectively, which can reduce the influence of geometric attacks on watermark synchronization and improve the security of the watermark.
[0122] In some embodiments, the carrier image is processed to obtain a first low-frequency feature, and s first sub-rings are generated based on the first low-frequency feature, including:
[0123] The carrier image is converted to the YCbCr color space to obtain the Y component;
[0124] The double-tree complex wavelet transform is performed on the Y component to obtain the first low-frequency feature where e represents the number of levels of decomposition of the double-tree complex wavelet transform, and t represents the frequency-domain sub-bands in different directions;
[0125] s first sub-rings are divided on the first low-frequency feature: h1, h2,... h s , where h i is the i-th first sub-ring, 1 ≤ i ≤ s.
[0126] In some embodiments, s second sub-rings are encrypted to obtain s encrypted second sub-rings; including:
[0127] s positioning matrices M1, M2,... M are randomly generated s , and the i-th positioning matrix M i represents the i-th secret key key i ;
[0128] Using the i-th secret key key i Perform an encryption operation on the i-th second sub-ring w i to obtain the encrypted i-th second sub-ring
[0129]
[0130] where is the exclusive OR operation.
[0131] In this embodiment, different secret keys are used to encrypt different sub-rings, which can improve the security of the watermark.
[0132] In some embodiments, s zero watermarks are determined based on s first sub-rings and the corresponding encrypted second sub-rings, including:
[0133] Perform an improved Schur decomposition on the i-th first sub-ring h i to obtain the i-th upper triangular matrix
[0134] Perform an operation on the i-th upper triangular matrix R iF Perform a binarization operation to obtain the i-th binary feature matrix F i :
[0135]
[0136] where mod is the modulo operation function;
[0137] Based on the encrypted i-th second subring and the i-th binary feature matrix F i , obtain the i-th zero watermark Z i :
[0138]
[0139] where is the exclusive OR operation.
[0140] This embodiment uses an improved Schur decomposition, which can refine image features and improve the information accuracy and robustness of the watermark.
[0141] In some embodiments, embedding the zero watermark into the carrier image to obtain the carrier image containing the watermark information includes:
[0142] Based on the i-th zero watermark Z i , process the element in the first row and first column of the upper triangular matrix of the i-th first subring to obtain the maximum singular value of the i-th upper triangular matrix with embedded watermark
[0143]
[0144] where Δ is the quantization step and μ is the embedding strength; rem 1,i is the first remainder:
[0145] Reconstruct the i-th upper triangular matrix with embedded watermark to obtain the i-th feature matrix containing the watermark information
[0146]
[0147] where U is a unitary matrix and U T is the transpose matrix of U;
[0148] Reconstruct the i-th feature matrix containing the watermark information to obtain the i-th third subring containing the watermark information;
[0149] Perform the inverse dual-tree complex wavelet transform on the \(i\)th third sub-ring containing the watermark information to obtain the \(i\)th fourth sub-ring;
[0150] Perform image reconstruction on all the fourth sub-rings to obtain the carrier image containing the watermark information.
[0151] As Figure 3 shown, an embodiment of the present application provides a watermark recognition method, including:
[0152] Step 201: Process the carrier image containing the watermark information to obtain the third low-frequency feature, and generate \(s\) fifth sub-rings based on the third low-frequency feature;
[0153] Step 202: Perform improved Schur decomposition on each fifth sub-ring to obtain \(s\) upper triangular matrices;
[0154] Step 203: Determine \(s\) first watermarks based on the \(s\) upper triangular matrices;
[0155] Step 204: Use \(s\) secret keys to decrypt the corresponding first watermarks respectively to obtain \(s\) second watermarks, where the second watermark is the decrypted first watermark;
[0156] Step 205: Process the \(s\) second watermarks using the pre-trained optimization network to obtain \(s\) third watermarks.
[0157] In some embodiments, determining \(s\) first watermarks based on the \(s\) upper triangular matrices includes:
[0158] Based on the \(i\)th upper triangular matrix determine the \(i\)th first watermark
[0159]
[0160] where \(\Delta\) is the quantization step and \(\mu\) is the embedding strength: rem 2,i is the second remainder: is the matrix 's first row and first column element.
[0161] In some embodiments, the optimization network includes a downsampling unit, a first convolutional layer, a first batch processing layer, a first ReLU function, a second convolutional layer, a second batch processing layer, a second ReLU function, a third convolutional layer, a third batch processing layer, a third ReLU function, and a fully connected layer connected in sequence; among them, the convolutional kernel size of the first convolutional layer is \(3\times3\), the moving step is 2, and padding = 1; the convolutional kernel size of the second convolutional layer is \(3\times3\), the moving step is 2, and padding = 1; the convolutional kernel size of the third convolutional layer is \(3\times3\), the moving step is 2, and padding = 1.
[0162] The method further includes:
[0163] Establish a training set, where the training set includes: multiple groups of watermark image samples, and each group of watermark image samples includes an original watermark image and an attacked watermark image; the attack methods include geometric attacks, non-geometric attacks, and combined attacks of both;
[0164] Process the attacked watermark image using an optimization network to obtain an optimized watermark image;
[0165] Based on the optimized watermark image and the original watermark image, determine the loss value using the least mean square error;
[0166] Update the parameters of the optimization network based on the loss value.
[0167] The following describes the specific implementation process of the present application in combination with a specific application scenario.
[0168] Figure 4 (a), (b), (c), (d), and (f) in are the original carrier images, Figure 4 (g) in is the encrypted watermark; the peak signal-to-noise ratio (PSNR) is used to evaluate the visual effect of the embedded watermark image, and the higher the PSNR, the better the invisibility; in addition, the normalized correlation coefficient (NC) is used to measure the similarity between the original watermark and the extracted watermark after being attacked, and the higher the NC value, the clearer the extracted watermark and the better the robustness. The experimental results are as shown in Figure 5 , Figure 6 , Figure 7 and Figure 8 shown; where, Figure 5 is the PSNR value of the embedded watermark in different carrier images. Figure 6 is the NC value of different carrier images after cropping attacks. Figure 7 is the NC value of the carrier image under different median filtering size attacks. Figure 8 is the change of the NC value obtained after JEPG compression attacks of different intensities.
[0169] Based on the above embodiments, the embodiments of the present application further provide an electronic device. Referring to Figure 9 shown, the electronic device 300 provided by the embodiments of the present application at least includes: a processor 301, a memory 302, and a computer program stored on the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, it implements the watermark embedding method or the watermark recognition method provided by the embodiments of the present application.
[0170] The electronic device 300 provided by the embodiments of the present application may further include a bus 303 that connects different components (including the processor 301 and the memory 302). Among them, the bus 303 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, etc.
[0171] The memory 302 may include a readable medium in the form of volatile memory, such as a random access memory (RAM) 3021 and / or a cache memory 3022, and may further include a read-only memory (ROM) 3023.
[0172] The memory 302 may also include a program tool 3025 having a set (at least one) of program modules 3024. The program modules 3024 include, but are not limited to: an operating subsystem, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0173] The electronic device 300 may also communicate with one or more external devices 304 (such as a keyboard, a remote control, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 300 (such as a mobile phone, a computer, etc.), and / or communicate with any device that enables the electronic device 300 to communicate with one or more other electronic devices 300 (such as a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 305. And, the electronic device 300 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 306. As Figure 9 shown, the network adapter 306 communicates with other modules of the electronic device 300 through the bus 303. It should be understood that although Figure 9 not shown in the figure, other hardware and / or software modules may be used in combination with the electronic device 300, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, redundant arrays of independent disks (RAID) subsystems, tape drives, and data backup storage subsystems, etc.
[0174] It should be noted that Figure 9 the shown electronic device 300 is only an example, and should not impose any limitations on the functions and usage scopes of the embodiments of the present application.
[0175] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the watermark embedding method or the watermark recognition method provided by the embodiments of the present application is implemented. Specifically, the executable program can be built-in or installed in the electronic device 300. In this way, the electronic device 300 can implement the watermark embedding method or the watermark recognition method provided by the embodiments of the present application by executing the built-in or installed executable program.
[0176] The watermark embedding method or the watermark recognition method provided by the embodiments of the present application can also be implemented as a program product. The program product includes program code. When the program product can run on the electronic device 300, the program code is used to cause the electronic device 300 to execute the watermark embedding method or the watermark recognition method provided by the embodiments of the present application.
[0177] The program product provided by the embodiments of the present application can adopt any combination of one or more readable media. Among them, the readable media can be a readable signal medium or a readable storage medium, and the readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. Specifically, more specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, an erasable programmable read-only memory (EPROM), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0178] The program product provided by the embodiments of the present application can adopt a CD-ROM and include program code, and can also run on a computing device. However, the program product provided by the embodiments of the present application is not limited to this. In the embodiments of the present application, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or component.
[0179] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0180] In addition, although the operations of the method of the present application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the embodiments, those of ordinary skill in the art should understand that any modification or equivalent replacement of the technical solutions of the present application does not depart from the spirit and scope of the technical solutions of the present application, and they should all be covered by the scope of the claims of the present application.
Claims
1. A watermark embedding method, characterized in that: include: Processing the carrier image to obtain a first low-frequency feature, and generating s first sub-rings based on the first low-frequency feature; Processing the watermark image to obtain a second low-frequency feature, and generating s second sub-rings based on the second low-frequency feature; Encrypting the s second sub-rings to obtain s encrypted second sub-rings; Determine s zero watermarks based on the s first sub-rings and the corresponding encrypted second sub-rings; Embed s zero watermarks into the carrier image to obtain the carrier image containing the watermark information.
2. The watermark embedding method according to claim 1, characterized in that: The carrier image is processed to obtain a first low-frequency feature, and s first sub-rings are generated based on the first low-frequency feature, including: Convert the carrier image to the YCbCr color space to obtain the Y component; Perform double-tree complex wavelet transform on the Y component to obtain the first low-frequency feature Where, e represents the decomposition level of the dual-tree complex wavelet transform, and t represents the frequency domain subbands in different directions; Divide the first low-frequency feature into s first sub-rings: h1, h2, ... h s , where h i is the i-th first subring, 1≤i≤s.
3. The watermark embedding method according to claim 2, characterized in that: Encrypting the s second sub-rings to obtain s encrypted second sub-rings; include: Randomly generate s positioning matrices M1, M2, ...M s , the i-th positioning matrix M i Represents the i-th secret key i ; Using the i-th key i For the i-th second subring w i Perform encryption operation to obtain the encrypted second subring of the i-th in, It is an XOR operation.
4. The watermark embedding method according to claim 3, characterized in that: Determining s zero watermarks based on the s first sub-rings and the corresponding encrypted second sub-rings includes: For the first subring h of the i-th i Perform improved Schur decomposition to obtain the i-th upper triangular matrix For the i-th upper triangular matrix Perform binarization operation to obtain the i-th binary feature matrix F i : Among them, mod is the modulus operation function; The second sub-ring i based on encryption and the i-th binary feature matrix F i , get the i-th zero watermark: in, It is an XOR operation.
5. The watermark embedding method according to claim 4, characterized in that: Embed the zero watermark into the carrier image to obtain the carrier image containing the watermark information, including: Based on the i-th zero watermark Zi, the upper triangular matrix of the i-th first subring The first row and first column element Processing is performed to obtain the upper triangular matrix of the i-th embedded watermark The maximum singular value of Among them, Δ is the quantization step size, μ is the embedding strength; rem 1,i is the first remainder: The upper triangular matrix of the i-th embedded watermark Reconstruct and obtain the i-th feature matrix containing watermark information Among them, U is a unitary matrix, U T is the transposed matrix of U; For the i-th feature matrix containing watermark information Reconstruct and obtain the i-th third subring containing watermark information; Performing an inverse double-tree complex wavelet transform on the i-th third sub-ring containing the watermark information to obtain the i-th fourth sub-ring; Image reconstruction is performed on all fourth sub-rings to obtain a carrier image containing watermark information.
6. A watermark recognition method, characterized in that: include: Processing the carrier image containing the watermark information to obtain a third low-frequency feature, and generating s fifth sub-rings based on the third low-frequency feature; Perform improved Schur decomposition on each fifth subring to obtain s upper triangular matrices; Based on the s upper triangular matrices, determine s first watermarks; Use s secret keys to decrypt the corresponding first watermarks respectively to obtain s second watermarks, where the second watermark is the decrypted first watermark; The s second watermarks are processed using a pre-trained optimization network to obtain s third watermarks.
7. The watermark recognition method according to claim 6, characterized in that: Based on the s upper triangular matrices, s first watermarks are determined, including: Based on the i-th upper triangular matrix Determine the i-th first watermark Where Δ is the quantization step size and μ is the embedding strength: rem 2,i is the second remainder: For the matrix The first row and first column element of .
8. The watermark recognition method according to claim 6, characterized in that: The optimization network includes a downsampling unit, a first convolution layer, a first batch processing layer, a first ReLU function, a second convolution layer, a second batch processing layer, a second ReLU function, a third convolution layer, a third batch processing layer, a third ReLU function and a fully connected layer connected in sequence; wherein the convolution kernel size of the first convolution layer is 3×3; the convolution kernel size of the second convolution layer is 3×3; the convolution kernel size of the third convolution layer is 3×3; The method further comprises: Establishing a training set, the training set includes: multiple groups of watermark image samples, each group of watermark image samples includes an original watermark image and an attacked watermark image; The watermark image after the attack is processed by using the optimized network to obtain the optimized watermark image; Determine a loss value based on the optimized watermark image and the original watermark image; Update the parameters of the optimization network based on the loss value.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 5 or the method according to any one of claims 6 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 or the method according to any one of claims 6 to 8 is implemented.
Citation Information
Patent Citations
Digital watermark imbedding and detecting method and device
CN101482965A
Method and device for writing and reading digital watermarks
CN109325898A
Zero watermark generation method and system and zero watermark extraction method and system
CN109727179A
Medical volume data image safety protection zero-watermark method based on gray difference value of circular ring region
CN110400248A
Blind watermark embedding method and device and blind watermark detection method and device
CN114493973A