Video watermark encoding method and decoding method

By channel decomposing the video target frame image, and embedding watermark information and position information in the first and second channels respectively, the problems of low video watermark encoding efficiency and poor image quality in the prior art are solved, and high efficiency and low Video watermark encoding and decoding consumed by computing power.

CN119484902AActive Publication Date: 2025-02-18SHANGHAI BILIBILI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311008088.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-02-18
Estimated Expiration
2043-08-10

AI Technical Summary

Technical Problem

The existing video watermarking technology has low encoding efficiency in high-resolution videos, high computing power consumption, and it is difficult to take into account the video quality after watermark encoding, resulting in poor image quality and difficult to decode after geometric transformation.

Method used

By channel decomposing the target frame image of the video, watermark information and position information are embedded in the first channel and the second channel respectively to generate a watermark video. Without changing the video resolution, this method improves the watermark encoding efficiency, reduces computing power consumption, and enhances the robustness of geometric transformation.

Benefits of technology

It realizes efficient encoding and decoding of video watermarks on the basis of ensuring video quality, reduces resource and computing power consumption, and improves the decoding robustness of geometric transformations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484902A_ABST
    Figure CN119484902A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video watermark coding method. The video watermark coding method comprises the following steps: acquiring a target frame image of a video; and intercepting a to-be-processed image from the target frame image, wherein the to-be-processed image is a local image block of the target frame image. Performing channel decomposition on the to-be-processed image to obtain a plurality of channels; wherein the plurality of channels comprise a first channel and a second channel. And embedding the watermark information into the first channel to obtain the first channel containing the watermark information. And embedding the position information into the second channel to obtain the second channel containing the position information. And generating a target image corresponding to the to-be-processed image according to the first channel containing the watermark information and the second channel containing the position information. And embedding the target image into the target frame image to obtain a video with a watermark. According to the technical scheme provided by the invention, on the basis of ensuring the image quality of the video after the watermark is added, efficient coding and low computing power consumption of the video watermark can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video watermark technology, and in particular, to a method, apparatus, computer device, and computer-readable storage medium for encoding and decoding a video watermark. Background Art

[0002] With the development of technology, it has become easier to infringe on video content, such as copying and tampering. On various video platforms, there are many infringements such as unauthorized reprinting, secondary editing, and posting videos to other platforms. These infringements damage the rights and interests of content creators and video platforms. How to protect the legitimate interests of content creators and video platforms has become a major problem to be solved. Therefore, various video watermark technologies have emerged, such as video digital watermark technology. Video watermark technology embeds watermarks into video images, and after the video is found to be infringing, the watermark information can be parsed from the video to achieve the purpose of protecting rights.

[0003] However, due to the huge amount of videos on the video platform, the encoding and decoding efficiency of video watermarks is low. In addition, since video watermarking technology is difficult to take into account the image quality of the video after watermark encoding, the image quality after watermark encoding will be poor.

[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention

[0005] The embodiments of the present application provide a video watermark encoding and decoding method, apparatus, computer device, and computer-readable storage medium to solve or alleviate one or more of the technical problems mentioned above.

[0006] One aspect of an embodiment of the present application provides a video watermark encoding method, the method comprising:

[0007] Get the target frame image of the video;

[0008] intercepting an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image;

[0009] Performing channel decomposition on the image to be processed to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel;

[0010] Embedding watermark information into the first channel to obtain a first channel containing watermark information;

[0011] embedding the position information into the second channel to obtain a second channel containing the position information;

[0012] Generate a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information;

[0013] The target image is embedded into the target frame image to obtain a watermarked video.

[0014] Optionally, the position information includes anchor point information; correspondingly, embedding the position information into the second channel to obtain the second channel containing the position information includes:

[0015] Calibrate the position information of the image to be processed by using the original anchor point group;

[0016] The original anchor point group includes a plurality of original anchor points, and the original anchor points are used to indicate the relative position of the image to be processed in the target frame image.

[0017] Optionally, determining a circular area formed with the original anchor point as a circle point;

[0018] dividing the circular area into a plurality of sectors, wherein the plurality of sectors include a target sector and remaining sectors;

[0019] retaining the value of the target sector and setting the values ​​of the other sectors to fixed values;

[0020] The value retained by the target sector and the fixed values ​​of the remaining sectors are both stored in the second channel.

[0021] Optionally, there are four original anchor points, and the method further includes:

[0022] Determining the position of each of the original anchor points; and

[0023] According to the orientation of each original anchor point, a corresponding target sector is selected for each original anchor point.

[0024] Optionally, the original anchor point is represented in the form of a Gaussian kernel.

[0025] Optionally, the categories of the original anchor points are different, and the categories of the original anchor points include Gaussian-like kernels with different value distributions and different sectors.

[0026] Another aspect of the embodiments of the present application provides a video watermark encoding method, the method comprising:

[0027] Get the target frame image of the video;

[0028] Perform channel decomposition on the target frame image to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel;

[0029] Intercepting a first image block from a first channel, where the first image block is a local image block in a layer corresponding to the first channel;

[0030] Embedding watermark information into the first image block to obtain a first channel containing watermark information;

[0031] Intercepting a second image block from the second channel, where the second image block corresponds to the first image block;

[0032] embedding the position information into the second image block to obtain a second channel containing the position information;

[0033] A target frame image with a watermark is generated according to a first channel containing watermark information and a second channel containing position information.

[0034] Another aspect of an embodiment of the present application provides a video watermark decoding method, the method comprising:

[0035] Acquire a target frame image of a video, wherein the target frame image has watermark information loaded in a first channel and position information loaded in a second channel;

[0036] Performing channel decomposition on the target frame image to obtain the first channel and the second channel;

[0037] Decoding the second channel to obtain position information, wherein the position information includes anchor point group information;

[0038] Adjusting the layer corresponding to the first channel according to the anchor point group information;

[0039] The adjusted layer is watermark decoded to obtain the watermark information of the video.

[0040] Another aspect of the embodiments of the present application provides a video watermark encoding device, the device comprising:

[0041] An acquisition module is used to acquire a target frame image of a video;

[0042] A capture module, used for capturing an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image;

[0043] A decomposition module, used for performing channel decomposition on the image to be processed to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel;

[0044] A first embedding module, used for embedding watermark information into the first channel to obtain a first channel containing watermark information;

[0045] A second embedding module, used for embedding the position information into the second channel to obtain a second channel containing the position information;

[0046] A generating module, used for generating a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information;

[0047] The third embedding module is used to embed the target image into the target frame image to obtain a watermarked video.

[0048] Another aspect of an embodiment of the present application provides a video watermark decoding device, the device comprising:

[0049] An acquisition module is used to acquire a target frame image of a video, wherein the target frame image is loaded with watermark information in a first channel and position information in a second channel;

[0050] A decomposition module, used for performing channel decomposition on the target frame image to obtain the first channel and the second channel;

[0051] A decoding module, configured to decode the second channel to obtain position information, wherein the position information includes anchor point group information;

[0052] An adjustment module, used for adjusting the layer corresponding to the first channel according to the anchor point group information;

[0053] The watermark decoding module is used to perform watermark decoding on the adjusted layer to obtain the watermark information of the video.

[0054] Another aspect of an embodiment of the present application provides a computer device, including:

[0055] at least one processor; and

[0056] a memory communicatively coupled to the at least one processor;

[0057] Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.

[0058] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.

[0059] The above technical solution adopted in the embodiment of the present application may have the following advantages:

[0060] A local image block of the target frame image (the image to be processed) is intercepted from the target frame image of the video, and the channel decomposition of the image to be processed is performed to obtain a first channel and a second channel. The watermark information is embedded in the first channel to obtain a first channel containing the watermark information. At the same time, the position information is embedded in the second channel to obtain a second channel containing the position information. According to the first channel containing the watermark information and the second channel containing the position information, a target image is generated. The target image is embedded in the target frame image, so that a watermarked video can be obtained. It can be seen that the embodiment of the present application can embed watermark information and position information in different channels for the local image in the target frame image without changing the video resolution, and there is no need to embed watermark information and position information for the entire target frame image, thereby improving the efficiency of adding watermarks to the video (video watermark encoding) and reducing the consumption of resources and computing power. That is, on the basis of ensuring the quality of the video after adding the watermark, efficient encoding of the video watermark and low computing power consumption can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0062] Figure 1 The diagram schematically shows an operating environment of a video watermark encoding method according to the first embodiment of the present application;

[0063] Figure 2 The flowchart schematically shows a method for encoding a video watermark according to the first embodiment of the present application;

[0064] Figure 3 Schematically shows Figure 2 Flow chart of sub-steps of step S208;

[0065] Figure 4 Schematically shows Figure 2 Flow chart of sub-steps of step S208;

[0066] Figure 5 Schematically shows Figure 2 Flow chart of sub-steps of step S208;

[0067] Figure 6 Schematically shows Figure 2 Flow chart of sub-steps of step S208;

[0068] Figure 7 Schematically shows Figure 2 Flow chart of sub-steps of step S208;

[0069] Figure 8 A schematic diagram schematically shows channel decomposition of an image to be processed and adding watermark information to the first channel according to the first embodiment of the present application;

[0070] Fig. 9 A schematic diagram schematically shows a target sector corresponding to an anchor point according to Embodiment 1 of the present application;

[0071] Fig.10 A schematic diagram of the value of the target sector according to the first embodiment of the present application is shown;

[0072] Fig.11 A schematic diagram schematically shows how position information is embedded into a second channel according to an embodiment of the present application;

[0073] Fig.12 A schematic diagram of a Gaussian-like kernel morphology is schematically shown;

[0074] Fig.13 A schematic diagram of merging multiple channels and embedding them into a target frame image according to the first embodiment of the present application is schematically shown;

[0075] Fig.14 The flowchart schematically shows a method for decoding a video watermark according to the third embodiment of the present application;

[0076] Fig.15 Schematically shows Fig.14 Flow chart of sub-steps of step S1404;

[0077] Fig.16 Schematically shows Fig.14 Flow chart of sub-steps of step S1406;

[0078] Fig.17 A schematic diagram schematically shows a target frame image after a geometric transformation operation according to a third embodiment of the present application;

[0079] Fig.18 A schematic diagram schematically shows a process of decoding an image watermark after being attacked by a geometric transformation according to the third embodiment of the present application;

[0080] Fig.19 A flowchart of position information decoder training is schematically shown;

[0081] Fig. 20 The application flow chart of the encoding method of video watermark is schematically shown;

[0082] Fig.21 The application flow chart of the decoding method of the video watermark is schematically shown;

[0083] Fig. 22A block diagram schematically shows a video watermark encoding device according to a fourth embodiment of the present application;

[0084] Fig.23 A block diagram schematically shows a video watermark decoding device according to a fifth embodiment of the present application; and

[0085] Fig.24 The hardware architecture diagram of the computer device according to the sixth embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0086] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0087] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0088] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.

[0089] First, the following terms are explained:

[0090] Video Digital Watermark: A logo embedded in a video. Video digital watermark can be used for various purposes, including preventing piracy, tracking data leakage, and providing copyright information.

[0091] Channel: The different color components or grayscale components that make up an image. The color information of an image can be composed of multiple channels, each channel corresponding to different color or grayscale information. The channel types of color images include RGB, YUV, HVS, etc.

[0092] Computing power: The computing power of a device, generally referring to the computing power of the CPU and GPU.

[0093] Watermark encoding: The process of embedding specific information into a digital carrier.

[0094] Watermark decoding: the process of extracting specific information from a digital carrier.

[0095] Watermark encoding and decoding: refers to the two processes of watermark encoding and watermark decoding.

[0096] Anchor Point: A specific point or position in an image that has special meaning or purpose and can be used to calibrate location information.

[0097] Gaussian kernel: a two-dimensional rectangular matrix, the values ​​in the matrix satisfy the two-dimensional Gaussian distribution with the center point as the origin.

[0098] Quasi-Gaussian kernel: A two-dimensional rectangular matrix with a distribution similar to that of a Gaussian kernel.

[0099] Secondly, in order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the relevant technologies are described below:

[0100] There are a large number of video contents on various platforms (such as Bilibili). These videos are the output of the labor of content creators and are a kind of virtual assets. But at the same time, there are also many infringements on the platform, such as unauthorized reprinting, secondary editing, and posting videos to other platforms. These infringements damage the rights and interests of content creators and platforms. Due to the difficulty of protecting rights, these infringements have greatly reduced the creative enthusiasm of content creators. Therefore, various video watermarking technologies have emerged, such as video digital watermarking technology.

[0101] Video digital watermarking achieves the purpose of protecting rights by embedding watermarks into video images (video digital watermark encoding), and after being found to be infringing, the watermark information can be parsed from the infringing content (video digital watermark decoding).

[0102] However, due to the huge amount of videos posted on video platforms every day, the encoding and decoding efficiency of video watermarks is low and cannot meet the needs of users and platforms. In addition, since it is difficult for video watermarking technology to take into account the image quality after watermark encoding, the image quality after watermark encoding will be poor, and the decoding robustness of the watermark after being attacked by various image quality attacks is low. The video digital watermarking technology known to the inventor has the following shortcomings, specifically:

[0103] (1) The speed and computing power consumption of digital watermark encoding are related to the image resolution input into the encoding algorithm. The larger the image resolution, the slower the encoding speed and the greater the computing power consumption. For high-resolution videos, if digital watermarks are to be embedded, the high video resolution will make the video digital watermark encoding efficiency low, affecting the speed of video publishing. In addition, embedding digital watermarks in high-resolution videos requires a lot of computing power and consumes a lot of hardware costs.

[0104] (2) The inventors have learned a video digital watermarking technology that can improve encoding speed and reduce computing power consumption. Specifically: a high-resolution video can be scaled to a smaller size and then watermarked. During or after encoding, it can be enlarged to the original resolution. The above method is a strategy that sacrifices image quality in exchange for encoding speed and computing power consumption. Although it can improve encoding speed and reduce computing power consumption, it cannot guarantee the image quality after watermark encoding, resulting in poor image quality after watermark encoding.

[0105] (3) The video containing watermark information may change during the infringement process, such as scaling, cropping, rotating, and other geometric transformation operations. When the position of the picture corresponding to the watermark information changes, it is more difficult to decode the watermark and the decoding efficiency is low.

[0106] To this end, the embodiment of the present application provides a technical solution for encoding and decoding video watermarks. In this technical solution: (1) Watermark information and position information are embedded in different channels in the local image of the video screen at the same time, which can not only improve the watermark encoding speed and reduce the hardware computing power consumption, but also do not need to change the video resolution, thereby ensuring the overall image quality of the video after adding the watermark. In addition, embedding the watermark position information at the same time can also improve the robustness of watermark decoding against geometric transformation attacks. (2) Without changing the video resolution, efficient encoding and decoding of digital watermarks are achieved. (3) The video after watermark encoding can still accurately identify the embedded watermark position and decode the watermark information under the attack of geometric transformations such as scaling, cropping, and rotation. (4) The position information of the image to be processed is calibrated by four or more anchor points of different categories. Each image to be processed is embedded with such a set of anchor points. After the geometric transformation occurs, the image to be processed can be restored to its original orientation and size through the detected anchor point group. See below for details.

[0107] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0108] like Figure 1 As shown, the operating environment diagram includes: Figure 1 As shown, the environment diagram includes a service platform 2, a network 4, and a client 6, wherein:

[0109] The service platform 2 may be composed of a single or multiple computing devices. The multiple computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as simulations of computer systems, operating systems, servers, etc. The computing device may load a virtual machine based on a virtual image and / or other data defining specific software (e.g., operating system, dedicated application, server) for simulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.

[0110] The service platform 2 may be configured to communicate with the client 6 or the like via a network 4. The network 4 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 4 may include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, and the like, or wireless links, such as cellular links, satellite links, Wi-Fi links, and the like.

[0111] The service platform 2 can provide services such as image / video watermark embedding, image / video watermark decoding, and location information decoding training, such as adding watermarks to videos uploaded by the client, or decoding watermarks for the client's last video.

[0112] Client 6 can be a Windows, Android TM ) or iOS operating systems, such as smart phones, tablet devices, laptop computers, virtual reality devices, gaming devices, set-top boxes, vehicle terminals, and smart TVs. Based on the above operating systems, various applications can be run, such as uploading video images to be watermarked to the service platform 2. Of course, the client 6 can also provide a local watermarking function.

[0113] The client 6 can provide / configure a user access page, which can be used to upload a video image to be watermarked, a video image to be decoded, and the like.

[0114] It should be noted that the above devices are exemplary, and the number and type of devices are adjustable in different scenarios or according to different needs.

[0115] The following uses the service platform 2 as the execution subject to introduce the technical solution of the present application through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.

[0116] Embodiment 1

[0117] Figure 2The flowchart of the video watermark encoding method according to the first embodiment of the present application is schematically shown.

[0118] like Figure 2 As shown, the video watermark encoding method may include steps S200 to S212, wherein:

[0119] Step S200, obtaining a target frame image of a video.

[0120] Step S202: extracting an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image.

[0121] Step S204, performing channel decomposition on the image to be processed to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel.

[0122] Step S206: embed the watermark information into the first channel to obtain a first channel containing the watermark information.

[0123] Step S208: embed the position information into the second channel to obtain a second channel containing the position information.

[0124] Step S210: generating a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information.

[0125] Step S212: embed the target image into the target frame image to obtain a watermarked video.

[0126] The video watermark encoding method provided in this embodiment performs channel decomposition on the local image block to obtain the first channel and the second channel. The watermark information is embedded in the first channel to obtain the first channel containing the watermark information. At the same time, the position information is embedded in the second channel to obtain the second channel containing the position information. According to the first channel containing the watermark information and the second channel containing the position information, a target image is generated. The target image is embedded in the target frame image, so that a watermarked video can be obtained. It can be seen that the embodiment of the present application can embed watermark information and position information in different channels for the local image in the target frame image without changing the video resolution, and there is no need to embed watermark information and position information for the entire target frame image, thereby improving the efficiency of adding watermarks to the video (video watermark encoding) and reducing the consumption of resources and computing power. That is, on the basis of ensuring the video quality after adding the watermark, efficient encoding of the video watermark and low computing power consumption can be achieved.

[0127] The following combination Figure 2 , each step in steps S200 to S212 and other optional steps are described in detail.

[0128] Step S200, get the target frame image of the video.

[0129] The target frame image is used to add the watermark. The encoding of video watermark refers to the process of embedding the watermark information into the video image, thereby ensuring the invisibility and extractability of the watermark in the video while minimizing the impact on the video quality.

[0130] The video may be a video created or uploaded by a user on various video sharing platforms. When a user uploads a video to a video sharing platform, the video sharing platform will add a watermark to the uploaded video. The watermark may be a video digital watermark. A video digital watermark may be invisible. An invisible watermark is embedded in the video image in a form that is imperceptible to the naked eye, ensuring the video quality so that the user's video viewing experience will not be affected by the watermark when watching the video. The video may be a video in various formats, such as MPEG-4, AVI.

[0131] The target frame image can be any one or more frames in the video. When a watermark needs to be added to the video, the watermark can be added to multiple frames of the video.

[0132] Step S202 , intercepting an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image.

[0133] The image to be processed is the area in the target frame image to which a watermark needs to be added. When intercepting the image to be processed in the target frame image, one or more local image blocks of a fixed size at any position of the target frame image can be intercepted. If multiple local image blocks are intercepted, the positions of the multiple local image blocks do not overlap. Furthermore, the number and size of the local image blocks can be determined according to requirements such as the hardware environment and the encoding and decoding speed. When the hardware capability is stronger, the number of local image blocks can be greater and the size of the local image blocks can be larger. By intercepting multiple non-overlapping local image blocks in the target frame image and adding watermarks to the multiple local image blocks, the watermarked video can retain the effective watermark information to a greater extent after being attacked by geometric transformations, thereby improving the robustness of watermark decoding.

[0134] In this embodiment, a local image block is captured from the target frame image, so that when adding a watermark to the video, only the local image block of the target frame image needs to be watermarked, and there is no need to add a watermark to the entire target frame image, thereby improving the efficiency of watermarking.

[0135] Step S204 , performing channel decomposition on the image to be processed to obtain a plurality of channels, wherein the plurality of channels include a first channel and a second channel.

[0136] The channel refers to a single color component in the image to be processed. For a color image, an image can be composed of multiple channels. Specifically: if the image to be processed is a color image, the image has multiple color channels. The channel types of the image to be processed may include RGB channels (Red, Green, Blue Channels), YUV (Luminance, Chrominance-Blue Projection, Chrominance-Red Projection) channels, HVS channels, CMYK channels (Cya n, Magenta, Yellow, Key Channels), etc.

[0137] In an exemplary application, if the channel type of the image to be processed is YUV, the image to be processed has three channels, that is, it can be decomposed into a Y channel, a U channel, and a V channel. The Y channel represents brightness, and the U channel and the V channel represent chromaticity. In this embodiment, the Y channel can be set as the first channel, and the U channel can be set as the second channel. It should be noted that the first channel includes but is not limited to the Y channel, and the second channel includes but is not limited to the U channel.

[0138] In this embodiment, the image to be processed is channel-decomposed to obtain multiple channels, so that watermark information and position information can be embedded in different channels of the image to be processed respectively, thereby achieving decoupling of watermark information and position information.

[0139] Step S206 , embedding the watermark information into the first channel to obtain a first channel containing the watermark information.

[0140] The watermark information refers to a specific identifier embedded in a digital medium (such as a video) to indicate the source, copyright ownership or other related information of the digital medium. The watermark information can be text, images, logos, digital sequences or other forms of identifiers.

[0141] In an exemplary application, such as Figure 8 As shown in the figure, when the channel type of the image to be processed is YUV, and the channel is decomposed into a Y channel (first channel), a U channel (second channel), and a V channel (third channel), the watermark information can be embedded into the Y channel to obtain a Y channel containing the watermark information. Specifically, the layer corresponding to the Y channel can be sent to the watermark encoder, and the watermark encoder outputs the Y channel containing the watermark information.

[0142] Step S208 , embedding the position information into the second channel to obtain a second channel containing the position information.

[0143] The position information is the relative position information of the image to be processed in the target frame image. In this embodiment, the watermark is embedded in the image to be processed. Therefore, the position information can be used to indicate the position information of the watermark.

[0144] In an exemplary application, when the channel type of the image to be processed is YUV and the channel is decomposed into a Y channel, a U channel, and a V channel, the position information can be embedded into the U channel to obtain a U channel containing the position information.

[0145] The position information may be calibrated by anchor point information. An optional embodiment is provided below.

[0146] In an optional embodiment, if Figure 3 As shown, the location information includes anchor point information, and step S208 may include:

[0147] S300: Calibrate the position information of the image to be processed by using an original anchor point group.

[0148] The original anchor point group includes a plurality of original anchor points, and the original anchor points are used to indicate the relative position of the image to be processed in the target frame image.

[0149] The original anchor point refers to a specific point in the image to be processed and can be used to calibrate the position information of the image to be processed.

[0150] Each image to be processed may record position information through one or more groups of original anchor points, and a group of original anchor points may include four or more original anchor points of different categories.

[0151] In the above optional embodiment, the position information of the image to be processed in the target frame image is calibrated by the original anchor point group, and the following effects can be achieved: the original anchor point group can provide accurate position calibration, so that the position of the image to be processed in the target frame image can be determined more quickly and effectively, so that when the image is subsequently decoded, the position of the watermark in the target frame image can be quickly identified, thereby improving the decoding efficiency.

[0152] In an optional embodiment, if Figure 4 As shown, the step S208 may also include:

[0153] S400, determining a circular area formed with the original anchor point as a circle point.

[0154] S402: Divide the circular area into a plurality of sectors, wherein the plurality of sectors include a target sector and other sectors.

[0155] S404: retain the value of the target sector and set the values ​​of other sectors to fixed values.

[0156] The value retained by the target sector and the fixed values ​​of the remaining sectors are both stored in the second channel.

[0157] The target sector is a part of the circular area. Specifically, the target sector may be one-third of a circle, one-quarter of a circle, or one-fifth of a circle in the circular area, which is not limited here.

[0158] It should be noted that each original anchor point group may include multiple original anchor points, each original anchor point corresponds to a target sector, and the target sector shape of each original anchor point may be different or the same. In an exemplary application, a group of original anchor point groups can be used to calibrate the position information of the image to be processed in the target frame image, and the original anchor point group may include original anchor points of four different categories. Among them: (1) If the shape of the target sector is the same, the shape of the four anchor points can all be a quarter circle of a circular area. (2) If the shape of the target sector is different, the shape of the four anchor points can be a third circle, a quarter circle, a fifth circle, and a sixth circle of a circular area, respectively. The shape of each target sector can be selected according to actual conditions and is not limited here. In the case of different target sector shapes, the category of each original anchor point in the original anchor point group can be quickly identified according to the shape of each target sector, such as the arc corresponding to the fan surface of the sector.

[0159] In exemplary applications, such as Fig.10 As shown, on the basis of retaining the value of the target sector, the values ​​of other sectors can be set to fixed values, such as 1.

[0160] In the above optional embodiment, a target sector is associated with each original anchor point, and the value of the target sector is retained, and the values ​​of other sectors are set to fixed values, so that the target sector can be divided from the circular area. That is, the effect of dividing the target sector from other sectors is achieved, so that the positions of each original anchor point can be quickly identified from the target frame image according to the numerical characteristics of the target sector, thereby quickly determining the position of the watermark in the video.

[0161] In an optional embodiment, if Figure 5 As shown, the step S208 may also include:

[0162] S500: Determine the position of each of the original anchor points.

[0163] S502: Select a corresponding target sector for each of the original anchor points according to the position of each of the original anchor points.

[0164] In an exemplary application, before selecting a corresponding target sector for each original anchor point, the position of each original anchor point must be determined. Fig. 9, 10 As shown, the image to be processed includes an anchor point group, which includes four anchor points. When viewed in a clockwise direction, the positions of the four anchor points in the image to be processed are as follows: (1) anchor point ① is located at the upper right corner of the image to be processed. (2) anchor point ② is located at the lower right corner of the image to be processed. (3) anchor point ③ is located at the lower left corner of the image to be processed. (4) anchor point ④ is located at the upper left corner of the image to be processed.

[0165] The target sector can be determined according to the orientation of the original anchor point. In an exemplary application, a sector that is diagonally opposite to the orientation of the original anchor point can be selected, and the size of the sector can be 1 / 4 of a circle. The circular area corresponding to each anchor point is divided into four quadrants, where the horizontal direction is the x-axis and the vertical direction is the y-axis. The target sectors of the four anchor points are specifically as follows: (1) The target sector of anchor point ① is the sector located in the third quadrant. (2) The target sector of anchor point ② is the sector located in the second quadrant. (3) The target sector of anchor point ③ is the sector located in the first quadrant. (4) The target sector of anchor point ④ is the sector located in the fourth quadrant.

[0166] In the above optional embodiment, the corresponding target sector is selected according to the orientation of each original anchor point. When the orientation of each original anchor point is different, the orientation of each target sector relative to the (associated) original anchor point is also inconsistent. The advantage of this is that the category of each anchor point in the original anchor point group can be quickly determined by the orientation of each target sector relative to the original anchor point, thereby quickly and accurately identifying the position and placement orientation of the watermark.

[0167] In an exemplary application, such as Fig.11 As shown in FIG. 1 , the specific embedding process of the position information can be as follows: set the original anchor point group information corresponding to the watermark to be embedded, such as quantity, position, shape, value, etc., and multiply the layer corresponding to the second channel by the set original anchor point group information pixel by pixel to obtain the second channel containing the position information. The original anchor point can be represented by various forms, such as Gaussian kernel and circular mean kernel.

[0168] The original anchor point can be represented by a circular mean kernel. When represented by a circular mean kernel, a circular area with the original anchor point as the circle point is formed. In the circular area, the values ​​are all the same fixed values, such as 0.4 or 0.5. When determining the target sector, part of the sector in the circular area can be intercepted as an anchor point of a category.

[0169] The original anchor point can be represented by a Gaussian kernel. In an optional embodiment, Figure 6 As shown, the original anchor point is represented in the form of a Gaussian kernel.

[0170] In an optional embodiment, if Figure 7As shown, the categories of the original anchor points are different, and the categories of the original anchor points include Gaussian-like kernels with different value distributions and different sectors.

[0171] In an exemplary application, such as Fig. 9 , 10 As shown in , each original anchor point group includes four original anchor points, that is, each original anchor point group includes four Gaussian-like kernels with different numerical distributions. The original anchor point group calibrates the position information of the target image through four Gaussian-like kernels with different numerical distributions. The value of the original anchor point is calculated by the following formula:

[0172]

[0173]

[0174] Wherein, formula (1) is the formula of Gaussian kernel, and formula (2) is the formula of quasi-Gaussian kernel. In the above formulas, u, v: represent coordinates in different directions. G represents a two-dimensional Gaussian kernel, and the shape of the two-dimensional Gaussian kernel is controlled by σ. i represents the i-th anchor point in a set of anchor points, p i Controls the numerical distribution of the anchor point, with a value between 0 and 1. max(G) represents the maximum value in G. The position of the original anchor point is the image pixel coordinate where the minimum value of the anchor point is located.

[0175] In the above optional embodiments: (1) the original anchor point is represented in the form of a Gaussian kernel. The value in the Gaussian kernel is a Gaussian value, and the Gaussian value is presented in a gradient form, so that when the position of the image to be processed is calibrated by the original anchor point, that is, when the Gaussian kernel is embedded in the image to be processed, the image quality of the image to be processed is less affected, and the invisibility of the watermark in the image to be processed is better guaranteed. In addition, since the value in the Gaussian kernel is presented in a gradient form, this numerical feature can be easily recognized by the position information decoder, anchor point detector, etc., so in the subsequent watermark decoding process, the original anchor point represented in the form of a Gaussian kernel can be quickly identified, so that the watermark corresponding to the original anchor point group can be quickly identified. (2) The categories of the original anchor points include Gaussian-like kernels with different numerical distributions and different sectors. When the original anchor point group is embedded in the image to be processed, the numerical distribution of the Gaussian-like kernel and the sector shape orientation and other information can be changed to embed different anchor points into the image to be processed. It can be seen that by judging the value of the Gaussian kernel and the shape of the sector corresponding to the Gaussian kernel, the category of the original anchor point can be quickly determined.

[0176] Step S210 , generating a target image corresponding to the image to be processed according to a first channel containing watermark information and a second channel containing position information.

[0177] The generated target image is a target image with a watermark.

[0178] When generating a target image corresponding to the image to be processed, all decomposed channels need to be merged. For example, Fig.13 As shown in the figure, when the channel type of the image to be processed is YUV and the channel is decomposed into Y channel, U channel and V channel, the watermark information can be embedded into the Y channel to obtain the Y channel containing the watermark information. The position information can be embedded into the U channel to obtain the U channel containing the position information. The Y channel containing the watermark information, the U channel containing the position information and the original V channel are merged to generate a target image with a watermark.

[0179] Step S212 , embedding the target image into the target frame image to obtain a watermarked video.

[0180] In order to add a watermark to the target frame image, this embodiment embeds the watermark by intercepting a partial image in the target frame image. The advantage of doing this is that when embedding the watermark into the target frame image, there is no need to add watermark information and position information to the entire target frame image. It is only necessary to embed the watermark in a part of the target frame image, thereby increasing the watermark encoding speed and reducing the hardware computing power consumption. After obtaining the target image with a watermark, since the target image is intercepted from the target frame image. Therefore, it is necessary to put the intercepted target image back into the target frame image to obtain the target frame image with a watermark, and then obtain the video to be watermarked.

[0181] When users upload videos to the platform, the platform will add a watermark to the uploaded video to obtain a watermarked video. This watermark can ensure the legal use of the video, protect the legitimate rights and interests of the creator and the platform, and provide reliable data traceability and evidence. It should be noted that users can also add watermarks on their own terminals.

[0182] Embodiment 2

[0183] It should be noted that the difference between this embodiment and the first embodiment is that the order of channel decomposition and local image interception is different. For the specific implementation details and technical effects of this embodiment, reference may be made to the first embodiment, which will not be repeated here.

[0184] A video watermark encoding method, the method comprising:

[0185] Get the target frame image of the video.

[0186] Channel decomposition is performed on the target frame image to obtain a plurality of channels, wherein the plurality of channels include a first channel and a second channel.

[0187] A first image block is captured from the first channel, where the first image block is a local image block in the layer corresponding to the first channel.

[0188] The watermark information is embedded into the first image block to obtain a first channel containing the watermark information.

[0189] A second image block is captured from the second channel, where the second image block corresponds to the first image block in position.

[0190] The position information is embedded into the second image block to obtain a second channel containing the position information.

[0191] A target frame image with a watermark is generated according to a first channel containing watermark information and a second channel containing position information.

[0192] In some embodiments, the target frame image can be first decomposed into channels to obtain multiple channels, and then the image to be processed can be intercepted from the multiple channels after the multiple channels are obtained. Specifically: the target frame image is decomposed into channels to obtain multiple channels (including a first channel and a second channel). One or more first image blocks of a fixed size are selected on the first channel, and watermark information is embedded into the first image block to obtain a first channel containing watermark information. Then, a second image block corresponding to the position of the image to be processed is intercepted from the second channel, and the position information is embedded into the second image block to obtain a second channel containing position information. According to the first channel containing watermark information and the second channel containing position information, an image to be watermarked corresponding to the target frame image is generated.

[0193] The above embodiment introduces the encoding method of the video watermark of the present application. The following describes the decoding method of the video watermark of the present application.

[0194] Embodiment 3

[0195] Fig.14 The flowchart of the video watermark decoding method according to the third embodiment of the present application is schematically shown.

[0196] like Fig.14 , 18 As shown, the video watermark encoding method may include steps S1400 to S1408, wherein:

[0197] S1400, obtaining a target frame image of a video, wherein the target frame image has watermark information loaded in a first channel and position information loaded in a second channel.

[0198] S1402: Perform channel decomposition on the target frame image to obtain the first channel and the second channel.

[0199] S1404: Decode the second channel to obtain position information, where the position information includes anchor point group information.

[0200] S1406: Adjust the layer corresponding to the first channel according to the anchor point group information.

[0201] S1408, performing watermark decoding on the adjusted layer to obtain watermark information of the video.

[0202] The decoding method of the video watermark provided in this embodiment, when decoding a video containing a watermark (the first channel is loaded with watermark information, and the second channel is loaded with position information), firstly performs channel decomposition on the target frame image to obtain the first channel and the second channel. The position information of the anchor point group in the target frame image is parsed from the second channel, and then the watermark of the first channel is adjusted according to the position information, and then the adjusted watermark is decoded to obtain correct and effective watermark information. It can be seen that on the basis that the first channel of the video frame image is loaded with watermark information and the second channel is loaded with position information, the orientation and size of the watermark can be adjusted according to the position information parsed from the second channel. Therefore, even if the video undergoes a geometric transformation operation, the technical solution of the present application can still quickly and effectively extract accurate watermark information from the video, thereby improving the robustness of watermark decoding.

[0203] The following combination Fig.14 , each step in steps S1400 to S1408 and other optional steps are explained in detail.

[0204] S1400 , obtain a target frame image of the video, where the target frame image is loaded with watermark information in the first channel and with position information in the second channel.

[0205] The video is a video to be decoded, and the video to be decoded contains a watermark. Specifically, the target frame image in the video is loaded with watermark information in the first channel and the position information is loaded in the second channel. Exemplarily, if both videos A and B contain watermark information, and video A is found to be suspected of infringing video B, in order to identify whether video A infringes video B, video A can be watermark decoded and the watermark information can be parsed from video A. The video watermark parsed from video A is compared with the video watermark parsed from video B. If the two are consistent, it is determined that video A infringes video B. If the two are inconsistent, it is determined that video A does not infringe video B.

[0206] The channel type of the target frame image may include RGB channels (Red, Green, Blue Channels), YUV channels, HVS channels, CMYK channels (Cyan, Magenta, Yellow, Key Channels), etc. In an exemplary application, if the channel type of the target frame image is YUV, the Y channel is the first channel, and the U channel is the second channel. In the target frame image, the watermark information is loaded in the Y channel, and the position information is loaded in the U channel.

[0207] In this embodiment, different channels of the target frame image are respectively embedded with watermark information and position information to achieve decoupling of the watermark information and the position information, so that the watermark information in the first channel can be subsequently adjusted according to the position information parsed from the second channel.

[0208] S1402 , performing channel decomposition on the target frame image to obtain the first channel and the second channel.

[0209] For example, if the channel type of the target frame image is YUV, and the watermark information is loaded in the Y channel of the target frame image and the position information is loaded in the U channel, then the channel of the target frame image is decomposed to obtain three channels, namely, the Y channel, the U channel, and the V channel. The Y channel is the first channel and the U channel is the second channel.

[0210] S1404 , decoding the second channel to obtain position information, where the position information includes anchor point group information.

[0211] The position information is the position information of the watermark in the target image frame. By decoding the second channel, one or more groups of anchor point group information can be obtained, and the position information of the watermark is specified by the one or more groups of anchor point group information.

[0212] Each group of anchor points may include four or more anchor points. Each anchor point has a different category. When the anchor point is a Gaussian anchor point, the category of the anchor point includes Gaussian-like kernels of different value distributions and different sectors.

[0213] In this embodiment, the position information of the watermark in the first channel is calibrated by the anchor point group information. After the video geometric transformation occurs, the image corresponding to the watermark can be quickly adjusted according to the anchor point group information detected from the second channel to restore to the original position and size.

[0214] In some embodiments, when the second channel is decoded, if no anchor point group information is obtained, the target frame image is a watermark-free image.

[0215] In an optional embodiment, if Fig.15As shown, the anchor point group includes multiple anchor points, and each anchor point corresponds to a sector.

[0216] Correspondingly, the step S1404 may include:

[0217] S1500, obtaining sectors in a target frame image.

[0218] S1502: Acquire an anchor point in the target frame image according to the acquired sector, where the anchor point is used to indicate a relative position of the watermark in the target frame image.

[0219] Each anchor point corresponds to a circular area. When embedding a watermark in a target frame image, a sector is selected for each anchor point. The sector is a part of the circular area, such as a quarter of a circular area, or a fifth of a circular area. Therefore, when decoding the second channel in the target frame image, the anchor point information of the watermark can be obtained according to the sector in the target frame image, and one sector corresponds to one anchor point. Exemplarily, if the anchor point is represented in the form of a Gaussian kernel, and the category of the anchor point is presented in a Gaussian-like kernel with different numerical distributions and different sectors, the image pixel coordinates where the minimum value in the sector is located are the positions of the anchor points.

[0220] When decoding the second channel, anchor points are obtained based on sectors. When multiple anchor points are detected, the category of the anchor points is determined to determine the position of the anchor points in the video frame image before geometric transformation. When identifying the category of the anchor points, the following information can be used to determine: (1) The angle of the sector, for example, the arc corresponding to the sector surface. For example, the arc of a third-circular area is 120°, and the arc of a quarter-circular area is 90°. (2) The value of each point in the sector can be determined based on the value (minimum value) of the anchor point in the sector. (3) The direction of the sector, as mentioned above Fig. 9 As shown, when the target sector takes a quarter circle, the arc corresponding to the sector of anchor point ① is toward the lower left corner relative to anchor point ①, and the arc corresponding to the sector of anchor point ② is toward the upper left corner relative to anchor point ②.

[0221] In the above optional embodiment, the anchor point is represented in the form of a sector, and the position and category of the anchor point can be quickly determined through the characteristics of the sector (such as angle / radian, value, direction, etc.), thereby quickly indicating the relative position of the watermark in the target frame image.

[0222] S1406 , adjusting the layer corresponding to the first channel according to the anchor point group information.

[0223] like Fig.17As shown, the video containing watermark information may change during the infringement process. For example, the video containing watermark information may undergo the following geometric transformation operations during the infringement process: such as scaling, cropping, and rotation. After the above operations, the position of the target frame image containing the watermark information will change. At this time, the difficulty of watermark decoding is greatly increased. Therefore, in order to correctly and quickly decode the watermark information, the layer corresponding to the first channel can be adjusted according to the position information (anchor group information) to restore the target frame image to its original position and size.

[0224] In an optional embodiment, if Fig.16 As shown, step S1406 may include:

[0225] S1600, determining a geometric transformation matrix according to the original anchor point group and the anchor point group;

[0226] S1602: Perform a geometric transformation on the layer corresponding to the first channel according to the geometric transformation matrix to adjust the layer.

[0227] The original anchor point group is the anchor point group of the video that has not undergone geometric transformation operations. In an exemplary application, if both video A and video B are embedded with watermarks, and video A is found to be suspected of infringing video B, then the original anchor point group is theoretically consistent with the anchor point group of video B. At this time, the anchor point group of video A can be obtained through the second channel of video A. Based on the anchor point group of video A and the anchor point group of video B, the corresponding geometric transformation matrix can be determined. According to the geometric transformation matrix, the layer of the first channel in video A is geometrically transformed to adjust the layer.

[0228] In the above optional embodiment, the corresponding geometric transformation matrix is ​​determined according to the position of the original anchor point group and the position of the anchor point group decoded from the second channel. The geometric transformation matrix is ​​applied to the layer corresponding to the first channel, and the layer is geometrically transformed, so that the position and size of the layer corresponding to the second channel can be quickly and accurately restored, that is, the position and size of the watermark in the second channel can be quickly and accurately restored for infringement identification.

[0229] S1408 , performing watermark decoding on the adjusted layer to obtain the watermark information of the video.

[0230] The adjusted layer is input into the watermark decoder for decoding, thereby obtaining the watermark information of the video. Based on the watermark information, it can be determined whether the video is infringing. If the video watermark is the same as the infringed video watermark, the video can be considered infringing. If the video watermark is different from the infringed video watermark, it is not infringing.

[0231] The above embodiment introduces the decoding method of the video watermark of the present application. The following describes the training process of the position information decoder in this embodiment.

[0232] In an optional embodiment, if Fig.19 As shown, the anchor point is detected by a position information decoder. The position information decoder is trained by the following operations:

[0233] S1900, obtaining a sample video with a watermark.

[0234] S1902: Input the layer corresponding to the second channel in the sample video into a position information decoder to obtain a predicted position of an anchor point in the sample video.

[0235] S1904, obtaining a loss value according to the predicted position of the anchor point in the sample video and the actual position of the anchor point in the sample video.

[0236] S1906: Adjust the network parameters of the position information decoder according to the loss value.

[0237] For example, if the image frame channel type in the sample video is YUV, and the U channel is the second channel, the layer corresponding to the U channel is input into the position information decoder, and the position information decoder will output one or more groups of anchor point position information, and the position information of each group of anchor points includes the pixel coordinates of each anchor point in the group of anchor points.

[0238] In the above optional embodiment, by training the position information decoder, the trained position information decoder can more accurately predict the position information of the anchor point group, so as to quickly and accurately decode the watermark information.

[0239] In order to make this application easier to understand, the following Fig. 20 as well as Fig.21 An exemplary application is provided.

[0240] (1) Video watermark encoding method:

[0241] S11, obtaining a target frame image of a video.

[0242] S12, intercepting an image to be processed from the target frame image, where the image to be processed is a local image block of the target frame image.

[0243] S13, performing channel decomposition on the image to be processed.

[0244] S14, embedding the watermark information into the first channel.

[0245] Specifically:

[0246] S141, calibrating the position information of the image to be processed through the original anchor point group.

[0247] S142, determining a circular area formed with the original anchor point as a circle point, and dividing the circular area into a plurality of sectors.

[0248] S143: Select a corresponding target sector for each original anchor point according to the position of each original anchor point.

[0249] S144, retaining the value of the target sector and setting the values ​​of other sectors to fixed values.

[0250] The original anchor point is represented in the form of a Gaussian kernel, and the categories of the original anchor point include Gaussian-like kernels with different value distributions and different sectors.

[0251] S15, embedding the position information into the second channel.

[0252] S16, generating a target image according to the first channel and the second channel.

[0253] S17, embedding the target image into the target frame image to obtain a watermarked video.

[0254] (2) Video watermark decoding method:

[0255] S21, obtaining a target frame image of a video, where the target frame image is loaded with watermark information and position information in different channels.

[0256] S22, performing channel decomposition on the target frame image to obtain a first channel and a second channel.

[0257] S23, decoding the second channel to obtain position information (anchor point group information).

[0258] Specifically:

[0259] S231, obtaining sectors in the target frame image.

[0260] S232, obtaining an anchor point in the target frame image according to the obtained sector.

[0261] S24: Adjust the layer corresponding to the first channel according to the anchor point group information.

[0262] Specifically:

[0263] S241, determining a geometric transformation matrix according to the original anchor point group and the anchor point group.

[0264] S242: Perform geometric transformation on the layer corresponding to the first channel according to the geometric transformation matrix.

[0265] S25, performing watermark decoding on the adjusted layer to obtain watermark information of the video.

[0266] Embodiment 4

[0267] Fig. 22 The block diagram of the video watermark encoding device according to the fourth embodiment of the present application is schematically shown. The video watermark encoding device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Fig. 22 As shown, the video watermark encoding device may include: an acquisition module 2210, a capture module 2220, a decomposition module 2230, a first embedding module 2240, a second embedding module 2250, a generation module 2260, and a third embedding module 2270, wherein:

[0268] An acquisition module 2210 is used to acquire a target frame image of a video;

[0269] The interception module 2220 is used to intercept the image to be processed from the target frame image, where the image to be processed is a local image block of the target frame image;

[0270] A decomposition module 2230 is used to perform channel decomposition on the image to be processed to obtain multiple channels; wherein the multiple channels include a first channel and a second channel;

[0271] A first embedding module 2240, configured to embed the watermark information into the first channel to obtain a first channel containing the watermark information;

[0272] A second embedding module 2250 embeds the position information into the second channel to obtain a second channel containing the position information;

[0273] A generating module 2260, configured to generate a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information;

[0274] The third embedding module 2270 embeds the target image into the target frame image to obtain a watermarked video.

[0275] In an optional embodiment, the location information includes anchor point information;

[0276] Correspondingly, the second embedding module 2250 is further used for:

[0277] Calibrate the position information of the image to be processed by using the original anchor point group;

[0278] The original anchor point group includes a plurality of original anchor points, and the original anchor points are used to indicate the relative position of the image to be processed in the target frame image.

[0279] In an optional embodiment, the second embedding module 2250 is further configured to:

[0280] Determine the circular area formed with the original anchor point as the circle point;

[0281] dividing the circular area into a plurality of sectors, wherein the plurality of sectors include a target sector and remaining sectors;

[0282] retaining the value of the target sector and setting the values ​​of the other sectors to fixed values;

[0283] The value retained by the target sector and the fixed values ​​of the remaining sectors are both stored in the second channel.

[0284] In an optional embodiment, there are four original anchor points, and the second embedding module 2250 is further configured to:

[0285] Determining the position of each of the original anchor points; and

[0286] According to the orientation of each original anchor point, a corresponding target sector is selected for each original anchor point.

[0287] In an optional embodiment, the original anchor point is represented in the form of a Gaussian kernel.

[0288] In an optional embodiment, the categories of the original anchor points are different, and the categories of the original anchor points include Gaussian-like kernels with different value distributions and different sectors.

[0289] In an optional embodiment, the video watermark encoding device may further include:

[0290] An acquisition module is used to acquire a target frame image of a video;

[0291] A decomposition module, used for performing channel decomposition on the target frame image to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel;

[0292] A first interception module, used to intercept a first image block from a first channel, where the first image block is a local image block in a layer corresponding to the first channel;

[0293] A first embedding module, used for embedding watermark information into the first image block to obtain a first channel containing watermark information;

[0294] A second interception module, used for intercepting a second image block from a second channel, where the second image block corresponds to the first image block;

[0295] A second embedding module, used for embedding the position information into the second image block to obtain a second channel containing the position information;

[0296] The generating module is used to generate a target frame image with a watermark according to a first channel containing watermark information and a second channel containing position information.

[0297] Embodiment 5

[0298] Fig.23 The block diagram of the video watermark decoding device according to the fifth embodiment of the present application is schematically shown. The video watermark decoding device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Fig.23 As shown, the video watermark decoding device may include: an acquisition module 2310, a decomposition module 2320, a decoding module 2330, an adjustment module 2340, and a watermark decoding module 2350, wherein:

[0299] An acquisition module 2310 is used to acquire a target frame image of a video, wherein the target frame image is loaded with watermark information in a first channel and with position information in a second channel;

[0300] A decomposition module 2320, configured to perform channel decomposition on the target frame image to obtain the first channel and the second channel;

[0301] A decoding module 2330, configured to decode the second channel to obtain position information, wherein the position information includes anchor point group information;

[0302] An adjustment module 2340, configured to adjust the layer corresponding to the first channel according to the anchor point group information;

[0303] The watermark decoding module 2350 is used to perform watermark decoding on the adjusted layer to obtain the watermark information of the video.

[0304] In an optional embodiment, the anchor point group includes a plurality of anchor points, each anchor point corresponding to a sector;

[0305] The video watermark decoding device further includes a second acquisition module (not labeled) for:

[0306] Get the sector in the target frame image;

[0307] According to the acquired sectors, an anchor point in the target frame image is acquired, and the anchor point is used to indicate the relative position of the watermark in the target frame image.

[0308] In an optional embodiment, the adjustment module is further used to:

[0309] Determine a geometric transformation matrix according to the original anchor point group and the anchor point group;

[0310] According to the geometric transformation matrix, a geometric transformation is performed on the layer corresponding to the first channel to adjust the layer.

[0311] In an optional embodiment, the anchor point is detected by a position information decoder;

[0312] The apparatus further comprises a training module (not identified), wherein the training module is configured to:

[0313] Get a sample video with watermark;

[0314] Inputting the layer corresponding to the second channel in the sample video into a position information decoder to obtain a predicted position of an anchor point in the sample video;

[0315] Obtain a loss value according to the predicted position of the anchor point in the sample video and the actual position of the anchor point in the sample video;

[0316] According to the loss value, a network parameter of the position information decoder is adjusted.

[0317] Embodiment 6

[0318] Fig.24 The hardware architecture diagram of a computer device 10000 suitable for implementing the encoding and decoding method of a video watermark according to the sixth embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle-mounted terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig.24 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:

[0319] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the encoding and decoding method of the video watermark, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.

[0320] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.

[0321] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0322] It should be pointed out that Fig.24 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0323] In this embodiment, the encoding and decoding methods of the video watermark stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.

[0324] Embodiment 7

[0325] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the video watermark encoding and decoding method in the embodiment are implemented.

[0326] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (S mart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store the operating system and various application software installed on the computer device, such as the program code of the encoding and decoding method of the video watermark in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.

[0327] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A video watermark encoding method, characterized in that: The method comprises: Get the target frame image of the video; intercepting an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image; Performing channel decomposition on the image to be processed to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel; Embedding watermark information into the first channel to obtain a first channel containing watermark information; embedding the position information into the second channel to obtain a second channel containing the position information; Generate a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information; The target image is embedded into the target frame image to obtain a watermarked video.

2. The method according to claim 1, characterized in that The position information includes anchor point information; correspondingly, embedding the position information into the second channel to obtain the second channel containing the position information includes: Calibrate the position information of the image to be processed by using the original anchor point group; The original anchor point group includes a plurality of original anchor points, and the original anchor points are used to indicate the relative position of the image to be processed in the target frame image.

3. The method according to claim 2, characterized in that The method further comprises: Determine the circular area formed with the original anchor point as the circle point; dividing the circular area into a plurality of sectors, wherein the plurality of sectors include a target sector and remaining sectors; retaining the value of the target sector and setting the values ​​of the other sectors to fixed values; The value retained by the target sector and the fixed values ​​of the remaining sectors are both stored in the second channel.

4. The method according to claim 3, characterized in that There are four original anchor points, and the method further includes: Determining the position of each of the original anchor points; and According to the orientation of each original anchor point, a corresponding target sector is selected for each original anchor point.

5. The method according to any one of claims 2 to 4, characterized in that: The original anchor point is represented in the form of a Gaussian kernel.

6. The method according to any one of claims 2 to 4, characterized in that: The categories of the original anchor points are different, and the categories of the original anchor points include Gaussian-like kernels with different value distributions and different sectors.

7. A video watermark encoding method, characterized in that: The method comprises: Get the target frame image of the video; Perform channel decomposition on the target frame image to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel; Intercepting a first image block from a first channel, where the first image block is a local image block in a layer corresponding to the first channel; Embedding watermark information into the first image block to obtain a first channel containing watermark information; Intercepting a second image block from the second channel, where the second image block corresponds to the first image block; embedding the position information into the second image block to obtain a second channel containing the position information; A target frame image with a watermark is generated according to a first channel containing watermark information and a second channel containing position information.

8. A video watermark decoding method, characterized in that: The method comprises: Obtain a target frame image of the video, wherein the target frame image has watermark information loaded in the first channel and position information loaded in the second channel; Performing channel decomposition on the target frame image to obtain the first channel and the second channel; Decoding the second channel to obtain position information, wherein the position information includes anchor point group information; Adjusting the layer corresponding to the first channel according to the anchor point group information; The adjusted layer is watermark decoded to obtain the watermark information of the video.

9. The method according to claim 8, characterized in that The anchor point group includes multiple anchor points, each anchor point corresponds to a sector; Correspondingly, decoding the second channel to obtain position information includes: Get the sector in the target frame image; According to the acquired sectors, an anchor point in the target frame image is acquired, and the anchor point is used to indicate the relative position of the watermark in the target frame image.

10. The method according to claim 8, characterized in that Adjusting the layer corresponding to the first channel according to the anchor point group information includes: Determine a geometric transformation matrix according to the original anchor point group and the anchor point group; According to the geometric transformation matrix, a geometric transformation is performed on the layer corresponding to the first channel to adjust the layer.

11. The method according to claim 8, characterized in that The anchor point is detected by the position information decoder; The position information decoder is trained by the following operations: Get a sample video with watermark; Inputting the layer corresponding to the second channel in the sample video into a position information decoder to obtain a predicted position of an anchor point in the sample video; Obtain a loss value according to the predicted position of the anchor point in the sample video and the actual position of the anchor point in the sample video; According to the loss value, a network parameter of the position information decoder is adjusted.

12. A video watermark encoding device, characterized in that: The device comprises: An acquisition module is used to acquire a target frame image of a video; A capture module, used for capturing an image to be processed from the target frame image, wherein the image to be processed is a local image block of the target frame image; A decomposition module, used for performing channel decomposition on the image to be processed to obtain a plurality of channels; wherein the plurality of channels include a first channel and a second channel; A first embedding module, used for embedding watermark information into the first channel to obtain a first channel containing watermark information; A second embedding module, used for embedding the position information into the second channel to obtain a second channel containing the position information; A generating module, used for generating a target image corresponding to the image to be processed according to the first channel containing watermark information and the second channel containing position information; The third embedding module is used to embed the target image into the target frame image to obtain a watermarked video.

13. A video watermark decoding device, characterized in that: The device comprises: An acquisition module is used to acquire a target frame image of a video, wherein the target frame image is loaded with watermark information in a first channel and position information in a second channel; A decomposition module, used for performing channel decomposition on the target frame image to obtain the first channel and the second channel; A decoding module, configured to decode the second channel to obtain position information, wherein the position information includes anchor point group information; An adjustment module, used for adjusting the layer corresponding to the first channel according to the anchor point group information; The watermark decoding module is used to perform watermark decoding on the adjusted layer to obtain the watermark information of the video.

14. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Android photo position and time digital watermark embedding and extraction method

    CN106373079A

  • Method for realizing random bit non-blind watermark based on chaos

    CN108242041A

  • Reversible watermarking method

    CN111325650A

  • Data processing apparatus and method

    US20060153422A1

  • Digital watermark embedding apparatus, digital watermark embedding method, and digital watermark detection apparatus

    US20130170695A1