Data processing method, device and equipment

By generating and expanding a unit watermark template matrix containing watermark header information and embedding it into the luminance and chrominance channels of the video, the problem of inaccurate watermark header information positioning in the existing technology is solved, and more efficient video watermark information protection is achieved.

CN114528531BActive Publication Date: 2025-09-30ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011319290.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2025-09-30
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

In the prior art, the positioning of watermark header information during the extraction of video watermark information is not accurate enough, which makes it difficult to effectively protect copyright.

Method used

By generating a unit watermark template matrix containing the watermark header information, repeatedly tiling it to expand it into a target watermark template matrix, and embedding it into the brightness and chrominance channels of the carrier object, it is ensured that the target watermark template matrix contains multiple unit watermark template matrices, thereby improving the positioning accuracy of the watermark header information.

Benefits of technology

The positioning accuracy of the watermark header information is improved, the protection effect of the video watermark information is enhanced, and the watermark header information can be accurately positioned during extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528531B_ABST
    Figure CN114528531B_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, comprising: obtaining a carrier object and information to be embedded; selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel; generating a unit watermark template matrix based on the information to be embedded; wherein the unit watermark template matrix includes watermark header information; generating a target watermark template matrix to be embedded in the carrier object based on the unit watermark template matrix; the target watermark template matrix includes multiple unit watermark template matrices; and embedding the target watermark template matrix into the embedding channel. The above method is used to address the problem of inaccurate positioning of watermark header information during existing watermark information extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to two data processing methods, two data processing devices, two electronic devices, and two storage devices. Background Art

[0002] With the rapid development of multimedia technology and the widespread adoption of mobile internet, video technology has been applied to all areas of our lives. Transmitting and accessing video information has become increasingly convenient. However, due to the open and shared nature of the internet, copyright infringement of video information is a common problem. Consequently, copyright protection for video information has become a hot topic, and video watermarking technology has emerged in this context. The basic principle of video watermarking is to embed information that verifies the copyright identity in a video to achieve copyright protection.

[0003] Under the existing technology, when embedding a watermark into an image frame or image, a unit watermark template matrix is ​​usually generated based on the information to be embedded; the unit watermark template matrix is ​​repeatedly tiled and expanded to generate a target watermark template matrix to be embedded into the carrier object, and only one watermark header information is set for the target watermark template matrix. Since the target watermark template matrix to be embedded into the carrier object only corresponds to one watermark header information (i.e., synchronization information), there is a problem of inaccurate positioning of the watermark header information when extracting the watermark information. Summary of the Invention

[0004] The present application provides a data processing method, a data processing device, an electronic device and a storage device to solve the problem of inaccurate positioning of watermark header information when extracting watermark information in the prior art.

[0005] This application provides a data processing method, including:

[0006] Get the carrier object and the information to be embedded;

[0007] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0008] Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0009] generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0010] The target watermark template matrix is ​​embedded into the embedding channel.

[0011] Optionally, generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix includes:

[0012] Repeated tiling and expansion processing is performed on the unit watermark template matrix to generate a target watermark template matrix to be embedded in the carrier object.

[0013] Optionally, the number of elements in the target watermark template matrix is ​​the same as the number of pixels in the image frame corresponding to the embedding channel.

[0014] Optionally, generating a unit watermark template matrix according to the information to be embedded includes:

[0015] Generate encoded watermark data information according to the information to be embedded;

[0016] The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

[0017] Optionally, generating encoded watermark data information according to the information to be embedded includes:

[0018] Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence;

[0019] performing spread spectrum processing on the first bit sequence to generate a second bit sequence;

[0020] The second bit sequence is scrambled to generate encoded watermark data information.

[0021] Optionally, also include:

[0022] The scrambling parameters used when scrambling the second bit sequence are sent to the watermark extraction end.

[0023] Optionally, selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as the embedding channel includes:

[0024] Converting the carrier object into a luma channel and two chroma channels;

[0025] At least one channel is selected from the luminance channel and the two chrominance channels as an embedding channel.

[0026] Optionally, embedding the target watermark template matrix into an embedding channel includes:

[0027] Calculating a minimum perceptible error coefficient for each pixel position of the image frame according to the image frame embedded in the channel;

[0028] Obtaining an embedding value of the embedded pixel point position according to the element value corresponding to the embedded pixel point position in the target watermark template matrix, the minimum perceptible error coefficient, and the watermark embedding strength coefficient;

[0029] The embedded value is added to the pixel value of the corresponding embedded pixel point to obtain a new pixel value of the embedded pixel point.

[0030] This application also provides a data processing method, including:

[0031] Get the target carrier object;

[0032] Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0033] Obtaining a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0034] According to the unit template watermark matrix, the embedded information is extracted.

[0035] Optionally, the target carrier object is a video; there are multiple embedding channels; and extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes:

[0036] Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels;

[0037] Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices;

[0038] Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix;

[0039] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0040] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0041] The target carrier object is a video; and extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes:

[0042] Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices;

[0043] Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix;

[0044] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0045] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0046] Optionally, obtaining a target watermark template matrix according to the third watermark template matrix includes:

[0047] Obtaining a scaling factor in the horizontal direction and a scaling factor in the vertical direction of the third watermark template matrix with respect to the target watermark template matrix;

[0048] The third watermark template matrix is ​​scaled according to the scaling factor in the horizontal direction and the scaling factor in the vertical direction to obtain a target watermark template matrix.

[0049] Optionally, obtaining a horizontal scaling factor of the third watermark template matrix with respect to the target watermark template matrix includes:

[0050] Cutting the third watermark template matrix into multiple horizontal strips with a constant width and a height equal to the height of the embedded unit watermark template matrix;

[0051] Accumulate multiple horizontal strips to obtain the target horizontal strip;

[0052] Performing autocorrelation processing on the target horizontal strip to obtain multiple peaks in the horizontal direction;

[0053] Get the average distance between multiple peaks;

[0054] A scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the width of the embedded unit watermark template matrix.

[0055] Optionally, obtaining a scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix includes:

[0056] Cutting the third watermark template matrix into a plurality of vertical strips with a constant height and a width equal to the height of the embedded unit watermark template matrix;

[0057] Accumulate multiple vertical strips to obtain a target vertical strip;

[0058] Performing autocorrelation processing on the target vertical strip to obtain multiple peaks in the vertical direction;

[0059] Get the average distance between multiple peaks;

[0060] A scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the height of the embedded unit watermark template matrix.

[0061] Optionally, obtaining a unit watermark template matrix according to the target watermark template matrix includes:

[0062] Obtaining the starting position of the watermark header information according to the target watermark template matrix;

[0063] According to the starting position of the watermark header information, the unit watermark template matrix is ​​obtained.

[0064] Optionally, obtaining the starting position of the watermark header information according to the target watermark template matrix includes:

[0065] Obtaining a first number of unit watermark template matrices embedded in the target watermark template matrix in a horizontal direction according to the width of the target watermark template matrix and the width of the embedded unit watermark template matrix;

[0066] Using the first number as an expansion coefficient, performing positive sequence expansion processing and reverse sequence expansion processing on the embedded watermark header information respectively, to obtain expanded positive sequence watermark header information and reverse sequence watermark header information;

[0067] The expanded positive sequence watermark header information and the expanded reverse sequence watermark header information are cross-correlated with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information.

[0068] Optionally, cross-correlation processing is performed on the extended positive sequence watermark header information and the extended reverse sequence watermark header information with all target sequences in the target watermark template matrix that are greater than or equal to the width of the extended positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information, including:

[0069] Multiply each pixel in the expanded positive sequence watermark header information with the value of the pixel in the target sequence and sum them;

[0070] Multiply each pixel in the expanded reversed watermark header information with the value of the pixel in the target sequence and sum them;

[0071] Obtain the maximum value of the summation results corresponding to the pixels of the target sequence;

[0072] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​positive sequence;

[0073] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​in reverse order;

[0074] The coordinates of the pixel corresponding to the maximum value in the target watermark template matrix are the starting position of the watermark information header.

[0075] The present application also provides a data processing device, comprising:

[0076] An information acquisition unit, used to obtain a carrier object and information to be embedded;

[0077] an embedding channel determining unit, configured to select at least one channel from the luminance channel and the two chrominance channels corresponding to the carrier object as an embedding channel;

[0078] A unit watermark template matrix generating unit, configured to generate a unit watermark template matrix according to information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0079] a target watermark template matrix generating unit, configured to generate a target watermark template matrix to be embedded into a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0080] An embedding unit is configured to embed the target watermark template matrix into the embedding channel.

[0081] The present application also provides an electronic device, comprising:

[0082] processor; and

[0083] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:

[0084] Get the carrier object and the information to be embedded;

[0085] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0086] Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0087] generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0088] The target watermark template matrix is ​​embedded into the embedding channel.

[0089] The present application also provides a storage device storing a program of a data processing method, wherein the program is executed by a processor to perform the following steps:

[0090] Get the carrier object and the information to be embedded;

[0091] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0092] Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0093] generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0094] The target watermark template matrix is ​​embedded into the embedding channel.

[0095] The present application also provides a data processing device, comprising:

[0096] A target carrier object obtaining unit, configured to obtain a target carrier object;

[0097] a target watermark template matrix extraction unit, configured to extract a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0098] a unit watermark template matrix obtaining unit, configured to obtain a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes a plurality of unit watermark template matrices;

[0099] The embedded information extraction unit is used to extract the embedded information according to the unit template watermark matrix.

[0100] The present application also provides an electronic device, comprising:

[0101] processor; and

[0102] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:

[0103] Get the target carrier object;

[0104] Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0105] Obtaining a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0106] According to the unit template watermark matrix, the embedded information is extracted.

[0107] The present application also provides a storage device storing a program of a data processing method, wherein the program is executed by a processor to perform the following steps:

[0108] Get the target carrier object;

[0109] Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0110] Obtaining a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0111] According to the unit template watermark matrix, the embedded information is extracted.

[0112] Compared with the prior art, this application has the following advantages:

[0113] The present application discloses a data processing method, comprising: obtaining a carrier object and information to be embedded; selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel; generating a unit watermark template matrix based on the information to be embedded; wherein the unit watermark template matrix includes watermark header information; generating a target watermark template matrix to be embedded in the carrier object based on the unit watermark template matrix; the target watermark template matrix includes multiple unit watermark template matrices; and embedding the target watermark template matrix into the embedding channel. The data processing method provided by the present application improves the accuracy of locating the watermark header information by improving the accuracy of locating the watermark header information and solving the problem of inaccurate positioning of the watermark header information when extracting watermark information. BRIEF DESCRIPTION OF THE DRAWINGS

[0114] Figure 1A This is a schematic diagram of a scenario embodiment provided by this application.

[0115] Figure 1 This is a flowchart of a data processing method provided in the first embodiment of the present application.

[0116] Figure 2 This is a flowchart of a data processing method provided in the second embodiment of the present application.

[0117] Figure 3 This is a schematic diagram of a data processing device provided in the third embodiment of the present application.

[0118] Figure 4 This is a schematic diagram of a data processing device provided in the sixth embodiment of the present application. DETAILED DESCRIPTION

[0119] The following description sets forth numerous specific details to facilitate a thorough understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific implementations disclosed below.

[0120] In order to present the present application more clearly, the application scenario of the data processing method provided in the first embodiment of the present application is briefly introduced.

[0121] The data processing method provided in the first embodiment of the present application can be applied to scenarios where the client and the server interact, such as Figure 1A When it is necessary to embed the information to be embedded into the carrier video file, the client usually first establishes a connection with the server. After the connection is established, the client sends the carrier video file and the information to be embedded to the server. After the server receives the carrier video file and the information to be embedded, it performs the following processing on each image frame of the carrier video file: First, the carrier object (image frame) and the information to be embedded are obtained in the information obtaining unit 101; then, at least one channel is selected as the embedding channel from the brightness channel and two chrominance channels corresponding to the carrier object in the embedding channel determining unit 102; then, the unit watermark template matrix generating unit 103 is used to generate the watermark template matrix according to the information to be embedded. The embedded information generates a unit watermark template matrix; wherein the unit watermark template matrix includes watermark header information; then, in the target watermark template matrix generation unit 104, the unit watermark template matrix is ​​repeatedly tiled and expanded to generate a target watermark template matrix to be embedded in the carrier object; the number of elements in the target watermark template matrix is ​​the same as the number of pixels of the image frame corresponding to the embedding channel; then, in the embedding unit 105, the target watermark template matrix is ​​embedded into the embedding channel to obtain a target carrier video file containing the information to be embedded, and then the server provides the target carrier video file to the client, and the client receives the target carrier video file.

[0122] The first embodiment of the present application provides a data processing method, which is as follows: Figure 1 Make an introduction.

[0123] like Figure 1 As shown, in step S101, a carrier object and information to be embedded are obtained.

[0124] The carrier object refers to the carrier image into which the information to be embedded is to be embedded. The carrier image can be a dynamic image or a static image. For example, the image can be a dynamic image in GIF (Graphics Interchange Format) format, or a static image in JPEG (Joint Photographic Experts Group) format. For example, when the copyright owner of an image needs to distribute the content to multiple partners, different watermarks need to be embedded so that when piracy occurs, the source can be traced back to the partner. This image is a carrier object. Alternatively, the carrier image can be an image frame in a carrier video. The carrier video can be a physical video file, for example, a video file stored on a remote server for local download and playback; or it can be in the form of streaming media, for example, a video stream provided by an online video-on-demand platform or an online live streaming platform that can be directly streamed. Furthermore, the carrier video can be in the form of AR, VR, or stereoscopic video. Of course, with the continuous advancement of technology, the carrier video can also be video-related, in other formats and forms, and is not specifically limited here.

[0125] The embedded information refers to additional information added to the carrier object. This information can be a digital watermark or other hidden information. Adding appropriate embedded information to the carrier object can prevent data leakage and protect data security. For example, adding copyright information as a watermark to a carrier video file can prevent piracy. Alternatively, embedding a streamer's identification information in a live video can quickly locate the streamer's ID if the live video is suspected of being illegal.

[0126] like Figure 1 As shown, in step S102, at least one channel is selected from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel.

[0127] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel, comprising:

[0128] Converting the carrier object into a luma channel and two chroma channels;

[0129] At least one channel is selected from the luminance channel and the two chrominance channels as an embedding channel.

[0130] Converting the carrier object into a luminance channel and two chroma channels means converting the carrier object into three channels: Y, U, and V, where Y is the luminance channel and U and V are two chroma channels.

[0131] like Figure 1As shown, in step S103, a unit watermark template matrix is ​​generated according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information.

[0132] The step of generating a unit watermark template matrix according to the information to be embedded includes:

[0133] Generate encoded watermark data information according to the information to be embedded;

[0134] The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

[0135] The step of generating the encoded watermark data information according to the information to be embedded includes:

[0136] Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence;

[0137] performing spread spectrum processing on the first bit sequence to generate a second bit sequence;

[0138] The second bit sequence is scrambled to generate encoded watermark data information.

[0139] For example, the size of the unit watermark template matrix is ​​set to 120*120. First, the information to be embedded is encoded. For example, the information to be embedded is 32-bit watermark information, plus 24-bit check information, that is, 56-bit embedded information, as the first bit sequence. Then, an m-sequence spread spectrum code is generated, for example, an m-sequence spread spectrum code with 255 sequences of 0s and 1s is generated. Then, each bit 0 and 1 in the 56-bit first bit sequence is converted to a value of -1 and 1, and each value is multiplied by 255 m-sequence spread spectrum codes, resulting in 14280 second bit sequences consisting of 0s, -1s, and 1s. The second bit sequence is then scrambled to generate the encoded watermark data information. The second bit sequence can be scrambled using a logistic chaos scrambling algorithm, with the scrambling parameter as the key.

[0140] Next, 120 m-sequence spreading codes consisting of 0s and 1s are generated, converting 0 and 1 to -1 and 1, respectively. Each value is then multiplied by the coefficient K, resulting in 120 sequences of -K and K values, which serve as the watermark header information. This watermark header information is concatenated with the encoded watermark data as the first row of data, ultimately yielding 14,400 values. A 120x120 unit watermark template matrix is ​​then generated, and these 14,400 values ​​are sequentially inserted into this unit watermark template matrix. Therefore, the first row in the matrix is ​​the watermark header information, and the remaining rows are the watermark data information. In specific implementations, the watermark header information can also be concatenated with the watermark data as the first column of data, or other concatenation methods can be employed.

[0141] As an implementation manner, the first embodiment of the present application may further include:

[0142] The scrambling parameters used when scrambling the second bit sequence are sent to the watermark extraction end.

[0143] like Figure 1 As shown, in step S104, a target watermark template matrix to be embedded in a carrier object is generated according to the unit watermark template matrix; the target watermark template matrix includes multiple unit watermark template matrices.

[0144] Generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix includes:

[0145] Repeated tiling and expansion processing is performed on the unit watermark template matrix to generate a target watermark template matrix to be embedded in the carrier object.

[0146] Since the target watermark template matrix is ​​obtained by repeatedly tiling and expanding the unit watermark template matrix, the target watermark template matrix contains multiple repeated watermark header information, and the watermark header information is connected end to end, which improves the accuracy of locating the watermark header information.

[0147] During specific implementation, the number of elements in the generated target watermark template matrix can be made the same as the number of pixels in the image frame corresponding to the embedding channel.

[0148] For example, if the number of pixels of the image frame corresponding to the embedding channel is 720*480 and the size of the unit watermark template matrix is ​​120*120, the unit watermark template matrix is ​​repeated 6 times in the horizontal direction and 4 times in the vertical direction to obtain the target watermark template matrix.

[0149] like Figure 1 As shown, in step S105, the target watermark template matrix is ​​embedded into the embedding channel.

[0150] The embedding of the target watermark template matrix into an embedding channel comprises:

[0151] Calculating a minimum perceptible error coefficient for each pixel position of the image frame according to the image frame embedded in the channel;

[0152] Obtaining an embedding value of the embedded pixel point position according to the element value corresponding to the embedded pixel point position in the target watermark template matrix, the minimum perceptible error coefficient, and the watermark embedding strength coefficient;

[0153] The embedded value is added to the pixel value of the corresponding embedded pixel point to obtain a new pixel value of the embedded pixel point.

[0154] The just noticeable difference (JND) coefficient.

[0155] For example, embed the target watermark template matrix into the Y channel, calculate the JND coefficient T of the embedded pixel position according to the image frame corresponding to the Y channel, and then multiply the value of the corresponding coordinate in the target watermark template matrix by the coefficient T, and then multiply it by the embedding strength coefficient S to obtain the embedded value W of the pixel position. Finally, the pixel value is added to the embedded value W to get the new pixel value.

[0156] The data processing method provided in the first embodiment of the present application, since the unit watermark template matrix contains watermark header information, and the target watermark template matrix contains multiple unit watermark template matrices, the target watermark template matrix contains multiple repeated watermark header information, thereby improving the accuracy of locating the watermark header information and solving the problem of inaccurate positioning of the watermark header information when extracting watermark information.

[0157] The data processing method provided in this application is a method for embedding information to be embedded into an image or an image frame. If information is embedded in a video, each image frame in the video can be obtained. The target watermark template matrix is ​​embedded into each image frame using the above method. Since the target watermark template matrix contains all the information to be embedded, the information to be embedded can be extracted from each frame when extracting the watermark.

[0158] The first embodiment of the present application introduces the process of embedding information to be embedded into a carrier object. Corresponding to the first embodiment of the present application, the second embodiment of the present application is the process of extracting the embedded information.

[0159] The second embodiment of the present application provides a data processing method. Figure 2 Make an introduction.

[0160] like Figure 2 As shown, in step S201, a target carrier object is obtained.

[0161] The target carrier object refers to the carrier object in which the target watermark template matrix is ​​embedded. The target carrier object can be an image or a video.

[0162] like Figure 2 As shown, in step S202, a target watermark template matrix is ​​extracted from at least one embedding channel corresponding to the target carrier object.

[0163] The target carrier object is a video; the embedding channels are multiple; and extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes:

[0164] Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels;

[0165] Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices;

[0166] Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix;

[0167] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0168] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0169] The corresponding image frames refer to image frames at corresponding positions in the multiple embedded channels, for example, the first frame of the Y channel and the first frame of the U channel.

[0170] Specifically, during filtering, Wiener filtering may be selected.

[0171] The accumulating the first watermark template matrices of each channel to obtain the second watermark template matrix refers to adding the corresponding pixel values ​​in the first watermark template matrices of each channel to obtain the second watermark template matrix.

[0172] The first watermark template matrix of each channel is accumulated to obtain the second watermark template matrix, and then the second watermark template matrix is ​​filtered to obtain the third watermark template matrix. Compared with only selecting one image frame of one channel to extract the target watermark template matrix, the signal-to-noise ratio of the filtered watermark information can be improved.

[0173] The target carrier object is a video; and extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes:

[0174] Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices;

[0175] Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix;

[0176] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0177] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0178] When the target carrier object is a video, if the target watermark template matrix is ​​embedded in each image frame of the target carrier object during embedding, then during extraction, each image frame in at least one embedding channel corresponding to the target carrier object can be filtered to obtain multiple first watermark template matrices; then, these multiple first watermark template matrices are accumulated to obtain a second watermark template matrix; and finally, based on the third watermark template matrix, the target watermark template matrix is ​​obtained. Accumulating the filtering results of each image frame improves the signal-to-noise ratio of the filtered watermark information and enhances the robustness of the extracted watermark, compared to an extraction method that only selects one image frame for filtering to obtain the target watermark template matrix.

[0179] For example, during embedding, a target watermark template matrix is ​​embedded in each image frame of the Y channel and U channel of the video carrier object to obtain the corresponding target carrier object. Then, during extraction, each image frame of the Y channel and U channel of the target carrier object can be filtered to obtain multiple first watermark template matrices; then, the multiple first watermark template matrices are accumulated to obtain the second watermark template matrix; and then, based on the third watermark template matrix, the target watermark template matrix is ​​obtained.

[0180] Since the third watermark template matrix usually undergoes a scaling attack, it needs to be inversely transformed to restore the target watermark template matrix of the original size.

[0181] The step of obtaining a target watermark template matrix according to the third watermark template matrix includes:

[0182] Obtaining a scaling factor in the horizontal direction and a scaling factor in the vertical direction of the third watermark template matrix with respect to the target watermark template matrix;

[0183] The third watermark template matrix is ​​scaled according to the scaling factor in the horizontal direction and the scaling factor in the vertical direction to obtain a target watermark template matrix.

[0184] The obtaining of a scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix includes:

[0185] Cutting the third watermark template matrix into multiple horizontal strips with a constant width and a height equal to the height of the embedded unit watermark template matrix;

[0186] Accumulate multiple horizontal strips to obtain the target horizontal strip;

[0187] Performing autocorrelation processing on the target horizontal strip to obtain multiple peaks in the horizontal direction;

[0188] Get the average distance between multiple peaks;

[0189] A scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the width of the embedded unit watermark template matrix.

[0190] The performing accumulation processing on the plurality of horizontal strips to obtain the target horizontal strip refers to adding the corresponding pixel values ​​in each horizontal strip to obtain the target horizontal strip.

[0191] For example, the width of the third watermark template matrix is ​​W, and the height of the embedded unit watermark template matrix is ​​120. Then, the third watermark template matrix is ​​cropped into multiple horizontal strips of W*120, and then the pixel values ​​corresponding to the multiple horizontal strips are added to obtain the target horizontal strips.

[0192] The obtaining of a scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix includes:

[0193] Cutting the third watermark template matrix into a plurality of vertical strips with a constant height and a width equal to the height of the embedded unit watermark template matrix;

[0194] Accumulate multiple vertical strips to obtain a target vertical strip;

[0195] Performing autocorrelation processing on the target vertical strip to obtain multiple peaks in the vertical direction;

[0196] Get the average distance between multiple peaks;

[0197] A scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the height of the embedded unit watermark template matrix.

[0198] For example, assume the size of the filtered third watermark template matrix is ​​WxH, with width W and height H. Given that the size of the embedded unit watermark template matrix is ​​120x120, the third watermark template matrix is ​​first transformed to Wx120. This transformation method involves cutting the third watermark template matrix into several Wx120 strips, then accumulating all of these strips to generate the target horizontal strip. Autocorrelation is then performed on the target horizontal strip. Because the embedding process involves multiple repetitions in the horizontal and vertical directions, the target horizontal strip will also exhibit multiple peaks in the horizontal direction after autocorrelation. The average distance Wd between these peaks is calculated to represent the horizontal spacing of the watermark template. The third watermark template matrix is ​​then transformed to 120xH. This transformation method involves cutting the third watermark template matrix into several 120xH strips, then accumulating all of these strips to generate the target vertical strip. Autocorrelation is then performed, and multiple peaks will also appear in the vertical direction. The average distance Hd between these peaks is calculated to represent the vertical spacing of the watermark template. Then the third watermark template matrix is ​​transformed into W2xH2, where W2=W*120 / W2, H2=H*120 / H2, that is, the spacing of the watermark template is restored to the size of the unit watermark template 120x120.

[0199] In the prior art, when horizontal and vertical stripe autocorrelation methods are used to detect horizontal and vertical scaling factors, sufficient watermark energy needs to be accumulated over multiple frames to obtain sufficiently stable horizontal and vertical autocorrelation results. The second embodiment of the present application adopts a linear correlation method, and the watermark can be divided into strips and superimposed within a frame of image space to enhance the watermark synchronization robustness.

[0200] like Figure 2 As shown, in step S203, a unit watermark template matrix is ​​obtained according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices.

[0201] The obtaining of a unit watermark template matrix according to the target watermark template matrix includes:

[0202] Obtaining the starting position of the watermark header information according to the target watermark template matrix;

[0203] According to the starting position of the watermark header information, the unit watermark template matrix is ​​obtained.

[0204] After obtaining the starting position of the watermark header information, the unit watermark template matrix can be extracted according to the starting position of the watermark header information.

[0205] The step of obtaining the starting position of the watermark header information according to the target watermark template matrix includes:

[0206] Obtaining a first number of unit watermark template matrices embedded in the target watermark template matrix in a horizontal direction according to the width of the target watermark template matrix and the width of the embedded unit watermark template matrix;

[0207] Using the first number as an expansion coefficient, performing positive sequence expansion processing and reverse sequence expansion processing on the embedded watermark header information respectively, to obtain expanded positive sequence watermark header information and reverse sequence watermark header information;

[0208] The expanded positive sequence watermark header information and the expanded reverse sequence watermark header information are cross-correlated with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information.

[0209] The method of performing cross-correlation processing on the expanded positive sequence watermark header information and the expanded reverse sequence watermark header information with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information includes:

[0210] Multiply each pixel in the expanded positive sequence watermark header information with the value of the pixel in the target sequence and sum them;

[0211] Multiply each pixel in the expanded reversed watermark header information with the value of the pixel in the target sequence and sum them;

[0212] Obtain the maximum value of the summation results corresponding to the pixels of the target sequence;

[0213] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​positive sequence;

[0214] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​in reverse order;

[0215] The coordinates of the pixel corresponding to the maximum value in the target watermark template matrix are the starting position of the watermark information header.

[0216] Continuing with the previous example, restore the original scale of the target watermark template matrix image P based on the width (W2) and height (H2) obtained in step S202. Then, round down to W2 / 120, setting this to the first number Wn, which is the maximum number of times the unit watermark template matrix can be repeated horizontally. The 0s and 1s in the 120 m-sequence spreading codes generated when embedding the information are converted to -1 and 1, respectively, and then expanded to Wn times, setting this to Hn. Simultaneously, the m-sequence spreading codes are reversed, and the reversed 0s and 1s are converted to -1 and 1, respectively, and then expanded to Wn times, setting this to Hr. Hn and Hr are multiplied by all horizontal sequences in P that are greater than or equal to Hn, and then the sum is calculated. The results at each position are then sorted. If the maximum value after sorting is the result of the Hn operation, the image is in positive order; if the maximum value is the result of the Hr operation, the image is in reverse order, i.e., mirrored. The coordinates corresponding to the maximum value are then taken as the X and Y coordinates corresponding to the starting position of the watermark header information.

[0217] According to the starting position of the watermark header information, a unit watermark template matrix is ​​obtained, and the area of ​​each unit watermark template matrix size corresponding to the starting position can be accumulated to obtain the unit watermark template matrix.

[0218] Still using the previous example, according to the image P of the restored target watermark template matrix and the starting position X and Y, the 120x120 area corresponding to the starting position and the 120x120 area adjacent to this area are accumulated, and finally a 120x120 unit watermark template matrix is ​​obtained. If the target watermark template matrix is ​​in reverse order, the unit watermark template matrix is ​​reversed.

[0219] like Figure 2 As shown, in step S204, the embedded information is extracted according to the unit template watermark matrix.

[0220] Extracting the embedded information from the unit template watermark matrix is ​​the inverse process of obtaining the unit template watermark matrix based on the embedded information.

[0221] Continuing with the previous example, the unit template watermark matrix is ​​decomposed into 14,400 values, with the first 120 values ​​corresponding to the watermark header information and the last 14,280 values ​​corresponding to the encoded watermark data information. The encoded watermark data information is then descrambled using the Logistic Chaos Scrambling Algorithm, where the key is the scrambling parameter. This sequence is then decomposed into 56 groups of 255 values ​​each. Each group is multiplied by the m-sequence spreading code generated by embedding step 1, which consists of 255 0s and 1s, and the sum is calculated. If the result is greater than 0, the value is 1; otherwise, the value is 0. This results in a 56-bit value, namely the 32-bit embedded information and the 24-bit check value. Finally, the check value is used to verify the correctness of the extracted embedded information. If correct, the embedded information is returned; otherwise, an error is returned.

[0222] Corresponding to the data processing method provided in the first embodiment of the present application, the third embodiment of the present application provides a data processing device.

[0223] The data processing device comprises:

[0224] The information obtaining unit 301 is used to obtain the carrier object and the information to be embedded;

[0225] An embedding channel determining unit 302, configured to select at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0226] The unit watermark template matrix generating unit 303 is used to generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0227] A target watermark template matrix generating unit 304 is configured to generate a target watermark template matrix to be embedded into a carrier object based on the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0228] The embedding unit 305 is configured to embed the target watermark template matrix into the embedding channel.

[0229] Optionally, the target watermark template matrix generating unit is specifically used to:

[0230] Repeated tiling and expansion processing is performed on the unit watermark template matrix to generate a target watermark template matrix to be embedded in the carrier object.

[0231] Optionally, the number of elements in the target watermark template matrix is ​​the same as the number of pixels in the image frame corresponding to the embedding channel.

[0232] Optionally, the unit watermark template matrix generating unit is specifically configured to:

[0233] Generate encoded watermark data information according to the information to be embedded;

[0234] The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

[0235] Optionally, the unit watermark template matrix generating unit is specifically configured to:

[0236] Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence;

[0237] performing spread spectrum processing on the first bit sequence to generate a second bit sequence;

[0238] The second bit sequence is scrambled to generate encoded watermark data information.

[0239] Optionally, the device further includes:

[0240] The scrambling parameter sending unit is used to send the scrambling parameters used when scrambling the second bit sequence to the watermark extraction end.

[0241] Optionally, the embedding channel determination unit is specifically configured to:

[0242] Converting the carrier object into a luma channel and two chroma channels;

[0243] At least one channel is selected from the luminance channel and the two chrominance channels as an embedding channel.

[0244] Optionally, the embedded unit is specifically used to:

[0245] Calculating a minimum perceptible error coefficient for each pixel position of the image frame according to the image frame embedded in the channel;

[0246] Obtaining an embedding value of the embedded pixel point position according to the element value corresponding to the embedded pixel point position in the target watermark template matrix, the minimum perceptible error coefficient, and the watermark embedding strength coefficient;

[0247] The embedded value is added to the pixel value of the corresponding embedded pixel point to obtain a new pixel value of the embedded pixel point.

[0248] It should be noted that for the detailed description of the device provided in the third embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.

[0249] Corresponding to the data processing method provided in the first embodiment of the present application, the fourth embodiment of the present application provides an electronic device.

[0250] The electronic device comprises:

[0251] processor; and

[0252] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:

[0253] Get the carrier object and the information to be embedded;

[0254] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0255] Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0256] generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0257] The target watermark template matrix is ​​embedded into the embedding channel.

[0258] It should be noted that for the detailed description of the electronic device provided in the fourth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.

[0259] Corresponding to the data processing method provided in the first embodiment of the present application, the fourth embodiment of the present application provides a storage device storing a program of the data processing method, which is executed by a processor to perform the following steps:

[0260] Get the carrier object and the information to be embedded;

[0261] Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel;

[0262] Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information;

[0263] generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices;

[0264] The target watermark template matrix is ​​embedded into the embedding channel.

[0265] It should be noted that for the detailed description of the storage device provided in the fifth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.

[0266] Corresponding to the data processing method provided in the second embodiment of the present application, the sixth embodiment of the present application provides a data processing device.

[0267] The data processing device comprises:

[0268] The target carrier object obtaining unit 401 is used to obtain the target carrier object;

[0269] A target watermark template matrix extraction unit 402 is configured to extract a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0270] The unit watermark template matrix obtaining unit 403 is configured to obtain a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0271] The embedded information extraction unit 404 is configured to extract the embedded information according to the unit template watermark matrix.

[0272] Optionally, the target carrier object is a video; the number of embedded channels is multiple;

[0273] The target watermark template matrix extraction unit is specifically used to:

[0274] Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels;

[0275] Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices;

[0276] Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix;

[0277] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0278] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0279] Optionally, the target carrier object is a video; the target watermark template matrix extraction unit is specifically configured to:

[0280] Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices;

[0281] Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix;

[0282] performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix;

[0283] A target watermark template matrix is ​​obtained according to the third watermark template matrix.

[0284] Optionally, the target watermark template matrix extraction unit is specifically configured to:

[0285] Obtaining a scaling factor in the horizontal direction and a scaling factor in the vertical direction of the third watermark template matrix with respect to the target watermark template matrix;

[0286] The third watermark template matrix is ​​scaled according to the scaling factor in the horizontal direction and the scaling factor in the vertical direction to obtain a target watermark template matrix.

[0287] Optionally, the target watermark template matrix extraction unit is specifically configured to:

[0288] Cutting the third watermark template matrix into multiple horizontal strips with a constant width and a height equal to the height of the embedded unit watermark template matrix;

[0289] Accumulate multiple horizontal strips to obtain the target horizontal strip;

[0290] Performing autocorrelation processing on the target horizontal strip to obtain multiple peaks in the horizontal direction;

[0291] Get the average distance between multiple peaks;

[0292] A scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the width of the embedded unit watermark template matrix.

[0293] Optionally, the target watermark template matrix extraction unit is specifically configured to:

[0294] Cutting the third watermark template matrix into a plurality of vertical strips with a constant height and a width equal to the height of the embedded unit watermark template matrix;

[0295] Accumulate multiple vertical strips to obtain a target vertical strip;

[0296] Performing autocorrelation processing on the target vertical strip to obtain multiple peaks in the vertical direction;

[0297] Get the average distance between multiple peaks;

[0298] A scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the height of the embedded unit watermark template matrix.

[0299] Optionally, the unit watermark template matrix obtains a unit, specifically used for:

[0300] Obtaining the starting position of the watermark header information according to the target watermark template matrix;

[0301] According to the starting position of the watermark header information, the unit watermark template matrix is ​​obtained.

[0302] Optionally, the unit watermark template matrix obtains a unit, specifically used for:

[0303] Obtaining a first number of unit watermark template matrices embedded in the target watermark template matrix in a horizontal direction according to the width of the target watermark template matrix and the width of the embedded unit watermark template matrix;

[0304] Using the first number as an expansion coefficient, performing positive sequence expansion processing and reverse sequence expansion processing on the embedded watermark header information respectively, to obtain expanded positive sequence watermark header information and reverse sequence watermark header information;

[0305] The expanded positive sequence watermark header information and the expanded reverse sequence watermark header information are cross-correlated with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information.

[0306] Optionally, the unit watermark template matrix obtains a unit, specifically used for:

[0307] Multiply each pixel in the expanded positive sequence watermark header information with the value of the pixel in the target sequence and sum them;

[0308] Multiply each pixel in the expanded reversed watermark header information with the value of the pixel in the target sequence and sum them;

[0309] Obtain the maximum value of the summation results corresponding to the pixels of the target sequence;

[0310] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​positive sequence;

[0311] If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​in reverse order;

[0312] The coordinates of the pixel corresponding to the maximum value in the target watermark template matrix are the starting position of the watermark information header.

[0313] It should be noted that for the detailed description of the device provided in the sixth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.

[0314] Corresponding to the data processing method provided in the second embodiment of the present application, the seventh embodiment of the present application provides an electronic device.

[0315] The electronic device comprises:

[0316] processor; and

[0317] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:

[0318] Get the target carrier object;

[0319] Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0320] Obtaining a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0321] According to the unit template watermark matrix, the embedded information is extracted.

[0322] It should be noted that for the detailed description of the electronic device provided in the seventh embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, and no further details will be given here.

[0323] Corresponding to the data processing method provided in the second embodiment of the present application, the eighth embodiment of the present application provides a storage device storing a program of the data processing method, which is executed by a processor to perform the following steps:

[0324] Get the target carrier object;

[0325] Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object;

[0326] Obtaining a unit watermark template matrix according to the target watermark template matrix; the unit template watermark matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices;

[0327] According to the unit template watermark matrix, the embedded information is extracted.

[0328] It should be noted that for the detailed description of the storage device provided in the eighth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.

[0329] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0330] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0331] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0332] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0333] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A data processing method, characterized in that: include: Get the carrier object and the information to be embedded; Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel; Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information; generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices; Embedding the target watermark template matrix into the embedding channel; The step of generating a unit watermark template matrix according to the information to be embedded includes: Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence; performing spread spectrum processing on the first bit sequence to generate a second bit sequence; performing scrambling processing on the second bit sequence to generate encoded watermark data information; The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

2. The method according to claim 1, characterized in that Generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix includes: Repeated tiling and expansion processing is performed on the unit watermark template matrix to generate a target watermark template matrix to be embedded in the carrier object.

3. The method according to claim 2, characterized in that The number of elements in the target watermark template matrix is ​​the same as the number of pixels in the image frame corresponding to the embedding channel.

4. The method according to claim 1, wherein Also includes: The scrambling parameters used when scrambling the second bit sequence are sent to the watermark extraction end.

5. The method according to claim 1, characterized in that Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel, comprising: Converting the carrier object into a luma channel and two chroma channels; At least one channel is selected from the luminance channel and the two chrominance channels as an embedding channel.

6. The method according to claim 2, characterized in that The embedding of the target watermark template matrix into the embedding channel comprises: Calculating a minimum perceptible error coefficient for each pixel position of the image frame according to the image frame embedded in the channel; Obtaining an embedding value of the embedded pixel point position according to the element value corresponding to the embedded pixel point position in the target watermark template matrix, the minimum perceptible error coefficient, and the watermark embedding strength coefficient; The embedded value is added to the pixel value of the corresponding embedded pixel point to obtain a new pixel value of the embedded pixel point.

7. A data processing method, characterized in that: include: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object, wherein the embedding channel is multiple; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes: Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels; Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices; Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

8. The method according to claim 7, characterized in that The step of obtaining a target watermark template matrix according to the third watermark template matrix includes: Obtaining a scaling factor in the horizontal direction and a scaling factor in the vertical direction of the third watermark template matrix with respect to the target watermark template matrix; The third watermark template matrix is ​​scaled according to the scaling factor in the horizontal direction and the scaling factor in the vertical direction to obtain a target watermark template matrix.

9. The method according to claim 8, characterized in that The obtaining of a scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix includes: Cutting the third watermark template matrix into multiple horizontal strips with a constant width and a height equal to the height of the embedded unit watermark template matrix; Accumulate multiple horizontal strips to obtain the target horizontal strip; Performing autocorrelation processing on the target horizontal strip to obtain multiple peaks in the horizontal direction; Get the average distance between multiple peaks; A scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the width of the embedded unit watermark template matrix.

10. The method according to claim 8, characterized in that The obtaining of a scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix includes: Cutting the third watermark template matrix into a plurality of vertical strips with a constant height and a width equal to the height of the embedded unit watermark template matrix; Accumulate multiple vertical strips to obtain a target vertical strip; Performing autocorrelation processing on the target vertical strip to obtain multiple peaks in the vertical direction; Get the average distance between multiple peaks; A scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the height of the embedded unit watermark template matrix.

11. The method according to claim 7, characterized in that Obtaining a unit watermark template matrix according to the target watermark template matrix includes: Obtaining the starting position of the watermark header information according to the target watermark template matrix; According to the starting position of the watermark header information, the unit watermark template matrix is ​​obtained.

12. The method according to claim 11, characterized in that The step of obtaining the starting position of the watermark header information according to the target watermark template matrix includes: Obtaining a first number of unit watermark template matrices embedded in the target watermark template matrix in a horizontal direction according to the width of the target watermark template matrix and the width of the embedded unit watermark template matrix; Using the first number as an expansion coefficient, performing positive sequence expansion processing and reverse sequence expansion processing on the embedded watermark header information respectively to obtain expanded positive sequence watermark header information and reverse sequence watermark header information; The expanded positive sequence watermark header information and the expanded reverse sequence watermark header information are cross-correlated with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information.

13. The method according to claim 12, characterized in that The method of performing cross-correlation processing on the expanded positive sequence watermark header information and the expanded reverse sequence watermark header information with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information includes: Multiply each pixel in the expanded positive sequence watermark header information with the value of the pixel in the target sequence and sum them; Multiply each pixel in the expanded reversed watermark header information with the value of the pixel in the target sequence and sum them; Obtain the maximum value of the summation results corresponding to the pixels of the target sequence; If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​positive sequence; If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​in reverse order; The coordinate of the pixel corresponding to the maximum value in the target watermark template matrix is ​​the starting position of the watermark information header.

14. A data processing method, characterized in that: include: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object comprises: Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices; Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

15. The method according to claim 14, characterized in that The step of obtaining a target watermark template matrix according to the third watermark template matrix includes: Obtaining a scaling factor in the horizontal direction and a scaling factor in the vertical direction of the third watermark template matrix with respect to the target watermark template matrix; The third watermark template matrix is ​​scaled according to the scaling factor in the horizontal direction and the scaling factor in the vertical direction to obtain a target watermark template matrix.

16. The method according to claim 15, characterized in that The obtaining of a scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix includes: Cutting the third watermark template matrix into multiple horizontal strips with a constant width and a height equal to the height of the embedded unit watermark template matrix; Accumulate multiple horizontal strips to obtain the target horizontal strip; Performing autocorrelation processing on the target horizontal strip to obtain multiple peaks in the horizontal direction; Get the average distance between multiple peaks; A scaling factor of the third watermark template matrix in the horizontal direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the width of the embedded unit watermark template matrix.

17. The method according to claim 15, characterized in that The obtaining of a scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix includes: Cutting the third watermark template matrix into a plurality of vertical strips with a constant height and a width equal to the height of the embedded unit watermark template matrix; Accumulate multiple vertical strips to obtain a target vertical strip; Performing autocorrelation processing on the target vertical strip to obtain multiple peaks in the vertical direction; Get the average distance between multiple peaks; A scaling factor of the third watermark template matrix in a vertical direction with respect to the target watermark template matrix is ​​obtained according to the average distance between the multiple peaks and the height of the embedded unit watermark template matrix.

18. The method according to claim 14, characterized in that Obtaining a unit watermark template matrix according to the target watermark template matrix includes: Obtaining the starting position of the watermark header information according to the target watermark template matrix; According to the starting position of the watermark header information, the unit watermark template matrix is ​​obtained.

19. The method according to claim 18, characterized in that The step of obtaining the starting position of the watermark header information according to the target watermark template matrix includes: Obtaining a first number of unit watermark template matrices embedded in the target watermark template matrix in a horizontal direction according to the width of the target watermark template matrix and the width of the embedded unit watermark template matrix; Using the first number as an expansion coefficient, performing positive sequence expansion processing and reverse sequence expansion processing on the embedded watermark header information respectively to obtain expanded positive sequence watermark header information and reverse sequence watermark header information; The expanded positive sequence watermark header information and the expanded reverse sequence watermark header information are cross-correlated with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information.

20. The method according to claim 19, characterized in that The method of performing cross-correlation processing on the expanded positive sequence watermark header information and the expanded reverse sequence watermark header information with all target sequences in the target watermark template matrix that are greater than or equal to the width of the expanded positive sequence watermark header information in the horizontal direction to obtain whether the target watermark template matrix is ​​in positive sequence and the starting position of the watermark header information includes: Multiply each pixel in the expanded positive sequence watermark header information with the value of the pixel in the target sequence and sum them; Multiply each pixel in the expanded reversed watermark header information with the value of the pixel in the target sequence and sum them; Obtain the maximum value of the summation results corresponding to the pixels of the target sequence; If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​positive sequence; If the maximum value is the result of the operation between the pixels in the target sequence and the expanded positive sequence watermark header information, then the target watermark template matrix is ​​in reverse order; The coordinate of the pixel corresponding to the maximum value in the target watermark template matrix is ​​the starting position of the watermark information header.

21. A data processing device, characterized in that: include: An information acquisition unit, used to obtain a carrier object and information to be embedded; an embedding channel determining unit, configured to select at least one channel from the luminance channel and the two chrominance channels corresponding to the carrier object as an embedding channel; A unit watermark template matrix generating unit, configured to generate a unit watermark template matrix according to information to be embedded; wherein the unit watermark template matrix includes watermark header information; a target watermark template matrix generating unit, configured to generate a target watermark template matrix to be embedded into a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices; an embedding unit, configured to embed the target watermark template matrix into the embedding channel; The step of generating a unit watermark template matrix according to the information to be embedded includes: Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence; performing spread spectrum processing on the first bit sequence to generate a second bit sequence; performing scrambling processing on the second bit sequence to generate encoded watermark data information; The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

22. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed: Get the carrier object and the information to be embedded; Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel; Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information; generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices; Embedding the target watermark template matrix into the embedding channel; The step of generating a unit watermark template matrix according to the information to be embedded includes: Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence; performing spread spectrum processing on the first bit sequence to generate a second bit sequence; performing scrambling processing on the second bit sequence to generate encoded watermark data information; The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

23. A storage device, characterized in that: A program storing a data processing method is executed by a processor to perform the following steps: Get the carrier object and the information to be embedded; Selecting at least one channel from the luminance channel and two chrominance channels corresponding to the carrier object as an embedding channel; Generate a unit watermark template matrix according to the information to be embedded; wherein the unit watermark template matrix includes watermark header information; generating a target watermark template matrix to be embedded in a carrier object according to the unit watermark template matrix; the target watermark template matrix includes a plurality of unit watermark template matrices; Embedding the target watermark template matrix into the embedding channel; The step of generating a unit watermark template matrix according to the information to be embedded includes: Adding the check information to the bit sequence of the information to be embedded to generate a first bit sequence; performing spread spectrum processing on the first bit sequence to generate a second bit sequence; performing scrambling processing on the second bit sequence to generate encoded watermark data information; The encoded watermark data information and watermark header information are spliced ​​to generate a unit watermark template matrix.

24. A data processing device, characterized in that: include: A target carrier object obtaining unit, configured to obtain a target carrier object, wherein the target carrier object is a video; a target watermark template matrix extraction unit, configured to extract a target watermark template matrix from at least one embedding channel corresponding to the target carrier object, wherein the embedding channels are multiple; A unit watermark template matrix obtaining unit, configured to obtain a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; An embedded information extraction unit, configured to extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes: Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels; Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices; Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

25. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object, wherein the embedding channel is multiple; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes: Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels; Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices; Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

26. A storage device, characterized in that: A program storing a data processing method is executed by a processor to perform the following steps: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object, wherein the embedding channel is multiple; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object includes: Selecting a corresponding image frame from at least two embedding channels among the plurality of embedding channels; Performing filtering on the image frames selected by at least two embedding channels to obtain a plurality of first watermark template matrices; Accumulate the first watermark template matrix of each channel to obtain the second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

27. A data processing device, characterized in that: include: A target carrier object obtaining unit, configured to obtain a target carrier object, wherein the target carrier object is a video; a target watermark template matrix extraction unit, configured to extract a target watermark template matrix from at least one embedding channel corresponding to the target carrier object; A unit watermark template matrix obtaining unit, configured to obtain a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; An embedded information extraction unit, configured to extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object comprises: Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices; Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

28. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object comprises: Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices; Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.

29. A storage device, characterized in that: A program storing a data processing method is executed by a processor to perform the following steps: Obtaining a target carrier object, wherein the target carrier object is a video; Extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object; Obtaining a unit watermark template matrix according to the target watermark template matrix; The unit watermark template matrix includes watermark header information, and the target watermark template matrix includes multiple unit watermark template matrices; Extract the embedded information according to the unit watermark template matrix; The step of extracting a target watermark template matrix from at least one embedding channel corresponding to the target carrier object comprises: Performing filtering processing on each image frame in at least one embedding channel corresponding to the target carrier object to obtain a plurality of first watermark template matrices; Accumulate the multiple first watermark template matrices to obtain a second watermark template matrix; performing filtering processing on the second watermark template matrix to obtain a third watermark template matrix; A target watermark template matrix is ​​obtained according to the third watermark template matrix.