WO2020244474A1 - 视频水印添加、提取的方法、装置和设备 - Google Patents

视频水印添加、提取的方法、装置和设备 Download PDF

Info

Publication number
WO2020244474A1
WO2020244474A1 PCT/CN2020/093658 CN2020093658W WO2020244474A1 WO 2020244474 A1 WO2020244474 A1 WO 2020244474A1 CN 2020093658 W CN2020093658 W CN 2020093658W WO 2020244474 A1 WO2020244474 A1 WO 2020244474A1
Authority
WO
WIPO (PCT)
Prior art keywords
watermark
transparent
pixel
video
video frame
Prior art date
Application number
PCT/CN2020/093658
Other languages
English (en)
French (fr)
Inventor
王峰
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020244474A1 publication Critical patent/WO2020244474A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8358Generation of protective data, e.g. certificates involving watermark
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream

Definitions

  • This article relates to, but is not limited to, a method, device, device, and computer-readable storage medium for adding and extracting video watermarks.
  • content providers In order to prevent theft of video resources, content providers generally add watermark information that is invisible to the naked eye, and then extract the watermark through certain technical methods to determine whether the video is infringing, and use it as a basis for infringement.
  • the current video watermarking on the set-top box is generally implemented by the chip and DRM (Digital Rights Management) manufacturers.
  • the DRM manufacturer is responsible for producing the watermark information, and the chip is superimposed on the image when the image is rendered.
  • the main drawback is that the watermark must use a dedicated chip that supports the watermark, and the chip must be certified by the DRM manufacturer and pay a license fee to the DRM manufacturer. Therefore, the cost increases and the watermark function cannot be provided on the existing set-top box.
  • the embodiments of the application provide a method, device, device and computer-readable storage medium for adding and extracting a video watermark.
  • An embodiment of the application provides a method for adding a video watermark, including: obtaining watermark information, generating a watermark transparent picture carrying the watermark information according to the watermark information; and mixing the watermark transparent picture into a video playback screen.
  • An embodiment of the present application also provides a method for extracting a video watermark, including: obtaining a target video frame mixed with a watermark transparent picture in a video playback screen, and obtaining a source video frame corresponding to the target video frame; Compare with the source video frame to obtain the watermark information carried by the watermark transparent picture.
  • An embodiment of the present application also provides an apparatus for adding a video watermark, including: a generating unit for obtaining watermark information, and generating a watermark transparent picture carrying the watermark information according to the watermark information; and a mixing unit for combining the watermark information The watermark transparent image is mixed into the video playback screen.
  • An embodiment of the present application also provides a video watermark extraction device, including: an acquisition unit, configured to acquire a target video frame mixed with a transparent watermark picture in a video playback screen, and acquire a source video frame corresponding to the target video frame; extract The unit is configured to compare the target video frame with the source video frame to obtain the watermark information carried by the watermark transparent picture.
  • An embodiment of the present application also provides a video watermark adding device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the video watermark when the program is executed Method of adding.
  • An embodiment of the present application also provides a video watermark extraction device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the video watermark when the program is executed The method of extraction.
  • An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to execute the video watermarking method.
  • An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to execute the video watermark extraction method.
  • Fig. 1 is a flowchart of a method for adding a video watermark according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a watermark information segmentation protocol according to an embodiment of the present application.
  • Fig. 3 is an example diagram of converting a watermark text block into a watermark data block in an embodiment of the present application
  • Figure 4 is a schematic diagram of adding watermark information to a transparent picture in an embodiment of the present application.
  • Figure 5 is a schematic diagram of a video watermark adding system according to an embodiment of the present application.
  • Fig. 6 is a flowchart of a method for adding a video watermark according to an embodiment of the present application
  • Fig. 7 is a flowchart of a method for extracting a video watermark according to an embodiment of the present application.
  • Figure 8 is a schematic diagram of a video watermark extraction system according to an embodiment of the present application.
  • Fig. 9 is a flowchart of a method for extracting a video watermark according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a video watermark adding device according to an embodiment of the present application.
  • Figure 11 is a schematic diagram of a video watermark extraction device according to an embodiment of the present application.
  • Figure 12 is a schematic diagram of a video watermark adding device according to an embodiment of the present application.
  • Figure 13 is a schematic diagram of a video watermark extraction device according to an embodiment of the present application.
  • the embodiments of the application provide a method and system for quickly adding hidden video watermarks, and extracting and detecting watermark information on the video playback end, so as to achieve adding to the video being played without affecting the smoothness of video playback. Hide the watermark information, and effectively extract the watermark information.
  • the method for adding a video watermark in an embodiment of the present application includes:
  • Step 101 Obtain watermark information, and generate a watermark transparent picture carrying the watermark information according to the watermark information.
  • the watermark information can be obtained from the playback device, and the watermark information can include the device identification and product authentication data.
  • the watermark information includes device ID (identification), device MAC (Media Access Control Address, media access control address), device IP (Internet Protocol Address, Internet Protocol address), user account, site and other information.
  • the generating a watermark transparent picture carrying the watermark information according to the watermark information includes:
  • the watermark binary data is generated according to the watermark information; the watermark binary data is embedded in the corresponding transparent picture to obtain the watermark transparent picture carrying the watermark information.
  • the watermark binary data is used for mixing into the video playback screen during video playback.
  • the watermark information is generated into watermark text
  • the watermark text is encrypted and encoded and divided into multiple blocks
  • the watermark text block is converted into binary data
  • the binary data is set according to certain rules They are respectively embedded into the corresponding transparent pictures to obtain the watermark transparent pictures carrying the watermark information.
  • the generating watermark binary data according to the watermark information includes:
  • n watermark text blocks carrying number information are generated according to the watermark text.
  • the generating n watermark text blocks carrying number information according to the watermark text includes: generating n watermark text blocks carrying number information according to the encrypted watermark text.
  • a watermark data block (that is, a numbered binary data block) carrying number information and check information can be generated, the numbered binary data block is converted into a bit matrix, and the matrix is further divided into multiple sub-matrices , And embed it in the specified position of the watermark transparent image according to the rules.
  • embedding the watermark binary data into the corresponding transparent picture to obtain the watermark transparent picture carrying the watermark information includes:
  • Each group of watermark binary data in the n groups is sequentially added to the first color channel of the pixel at the specified position of the transparent picture to obtain n watermark transparent pictures carrying the watermark information, and the first color channel includes a red channel , Green channel and blue channel, n is an integer greater than or equal to 1.
  • the transparent picture may be a png picture with four channels of RGBA.
  • the adding the data in the watermark binary data sequentially to the first color channel of the pixel at the specified position of the transparent picture includes:
  • R W is a transparent watermark image pixels in a first color channel value
  • R O is a pixel corresponding to a first color channel value transparent image
  • a bit value of the watermark W is binary data B.
  • the sliding window is defined as s ⁇ t, assuming that the 0th block of data is mixed with the pixel point [x,y] starting from the mth pixel of the transparent picture, and the jth block of data is mixed with the j+1th block of data in the transparent picture.
  • Step 102 Mix the watermark transparent picture into a video playback screen.
  • step 102 includes:
  • the watermark transparent pictures are sequentially mixed into the video playback picture in a loop at a preset time interval.
  • step 102 after confirming that the video play instruction is received, the watermark transparent picture is mixed into the video play screen.
  • the n watermark transparent pictures generated according to the watermark information are sequentially mixed with the n source video frames in the video playback in a circular manner, and the target is obtained after the playback and mixing.
  • Video frame According to a preset time interval, the n watermark transparent pictures generated according to the watermark information are sequentially mixed with the n source video frames in the video playback in a circular manner, and the target is obtained after the playback and mixing.
  • the source video frame and the target video frame are key frames (I-frames), and the n watermark transparent pictures and n sources in the video playback are sequentially generated according to the watermark information in a looping manner.
  • Video frames are mixed, including:
  • the n-th order transparent watermark image and the video playback of the n source key frame by one pixel in a first mixed color channel values according to R d R s + R w ⁇ R a, to give The mixed target key frame, where R d is the first color channel value of the pixel in the target key frame, R s is the first color channel value of the pixel in the source key frame, and R w is the pixel in the watermark transparent image
  • the first color channel value of R a is the alpha channel value of the pixel in the transparent watermark picture, where n is an integer greater than or equal to 1.
  • the above embodiment converts the watermark text block into binary data respectively and embeds it in a transparent picture.
  • the watermark text can also be converted into a watermark picture, and the watermark picture is divided into one or more pictures. Blocks are respectively embedded in the corresponding transparent pictures to generate a watermark transparent picture.
  • the terminal-side player can independently complete the real-time embedding of transparent watermark information without the participation of a broadcast control platform or a dedicated chip, and has the characteristics of fast speed, real-time, high visibility, security and robustness.
  • the video watermarking system deployed in the IPTV set-top box includes a watermark information encoding subsystem 21, a transparent watermark generation subsystem 22, and a video
  • the watermark mixing subsystem 23 the processing flow is as follows:
  • the watermark text generation module 211 in the watermark information encoding subsystem 21 obtains information including device ID, device MAC, device IP, user account, site, etc. from the IPTV set-top box, and generates the watermark text in a certain format, such as device ID_MAC_account _MarketCode; the watermark information encryption/encoding module 212 encrypts and encodes the watermark text information; the watermark text slicing module 213 divides the encrypted text information into n blocks as shown in Figure 2, and performs binary conversion of each block data, And the data is arranged in an X ⁇ Y matrix (less than 0).
  • the rule of the transparent watermark generation subsystem 22 for binary conversion is to convert each block of data from hexadecimal to binary, arrange it in big-endian byte order, and use X bits as a row in sequence and divide it into Y columns.
  • the bit bit of 0 is complemented to convert to an X ⁇ Y bit matrix.
  • the hexadecimal character string 0XBE23F05A is converted into an 8*4 matrix.
  • R W is a watermark image pixel values R, R R O channel corresponding pixel value (fixed to 0) as a clear image
  • W b is the bit values of the encrypted text of the watermark
  • a transparent image is four-channel png RGBA Picture
  • the selection rule of the designated area is j multiplied by the sliding window size, where j is the j-th block of data, and the sliding window is defined as s ⁇ t, assuming that the 0th block of data and the pixel starting from the mth pixel of the transparent picture [x, y]
  • the positional relationship of the pixel points of the j-th block of data and the j+1-th block of data in the transparent picture for the mixing operation is As shown in Figure 4, the data blocks are arranged in an 8 ⁇ 4 matrix, and the sliding window is defined as 4 ⁇ 3.
  • the [4,2] bit value in the 0th block is the same as the R channel of the [4,2] pixel in the transparent picture.
  • R d is the R channel value of the pixel in the video frame of the mixed transparent watermark
  • R s is the R channel value of the pixel in the I frame of the source
  • R w is the R channel value of the transparent watermark pixel
  • R a is the value of the pixel in the transparent watermark picture ⁇ channel value.
  • FIG. 6 an embodiment is used to illustrate the process of adding a transparent watermark to a video. The steps are as follows:
  • Step 1 Create an RGBA four-channel png image with alpha channel and pack it into the player.
  • Step 2 After the application is started, read the device ID information and product authentication data as watermark information, do encryption and, for example, use base64 (a method based on 64 printable characters to represent binary data) encoding processing, and convert the watermark information Is binary data;
  • Step 3 The watermark binary data is divided into blocks according to the format defined by the watermark information division protocol in Figure 2, and divided into n parts;
  • s ⁇ t is the sliding window of the hybrid watermark dynamically moving Is the mixed pixel area in the transparent picture corresponding to the j-th block, It is the mixed pixel area in the transparent picture corresponding to the j+1th block.
  • the j-th block data and the pixels in the [x,y] area starting from the [0,0] pixel of the transparent picture are mixed, and the j-th block data is mixed with the j+1-th block data in the transparent picture.
  • the point position relationship is As shown in Figure 4, the data blocks are arranged in an 8 ⁇ 4 matrix, and the sliding window is defined as 4 ⁇ 3.
  • the [4,2] bit value in the 0th block is the same as the R channel of the [4,2] pixel in the transparent picture.
  • Step 5 Perform lossless compression on the mixed png image to obtain the j-th transparent watermark picture mixed with the j-th block of watermark information;
  • Step 7 Step 6 is repeated in turn to realize the function of dynamically adding a transparent watermark during playback.
  • the video watermark extraction method in the embodiment of this application is the inverse process of the video watermark adding method. As shown in FIG. 7, the video watermark extraction method in the embodiment of this application includes:
  • Step 301 Obtain a target video frame mixed with a watermark transparent picture in a video playback screen, and obtain a source video frame corresponding to the target video frame.
  • the acquiring a target video frame mixed with a watermark transparent picture in a video playback screen includes:
  • the video frame corresponding to the data block to be checked is used as the starting video frame, and the starting video frame is started according to the preset time interval. At the beginning of the frame, determine the target video frame in turn.
  • Step 302 Compare the target video frame with the source video frame to obtain watermark information carried by the watermark transparent picture.
  • step 302 includes:
  • the pixel point information in the target video frame may be respectively obtained for the pixel point information of the watermark data block carried in the watermark transparent picture corresponding to the target video frame, the watermark data block may be spliced according to the number information, and the watermark data block may be spliced according to the splicing The latter watermark data block determines the watermark information.
  • the obtaining the watermark information carried by the watermark transparent picture according to the difference between the pixel point information in the target video frame and the source video frame includes:
  • a plurality of watermark data blocks are spliced together to obtain the watermark information.
  • the source video frame and the target video frame are key frames
  • the first color of the pixel in the watermark transparent picture is determined according to the difference of pixel information in the target video frame and the source video frame Channel values, including:
  • R w (R d -R s )/R a , determine the first color channel value of the pixel in the watermark transparent picture, where Rd is the first color channel value of the pixel in the target key frame, and R s is The first color channel value of the pixel in the source key frame, R w is the first color channel value of the pixel in the watermark transparent picture.
  • the determining the watermark data block according to the position of the watermark binary data in the watermark transparent picture and the first color channel value of the pixel in the watermark transparent picture includes:
  • the video watermark extraction system of the embodiment of the present application includes a watermark information extraction subsystem 41 and a watermark information decoding subsystem 42, and the processing flow is as follows:
  • R d R s + R w ⁇ R a inverse operation
  • R w (R d -R s ) / R a
  • j-sheets one by parsing the video corresponding R w , and then mixed in the transparent image watermark text formula
  • the watermark information decoding subsystem 42 sequentially finds n blocks of data through the blocknum (block number) defined in the segmentation protocol in FIG. 2, and splices them into complete text data, and then restores the watermark text after decryption, and judges whether the played video is legal.
  • the watermark information extraction process includes the following steps:
  • Step 1 Record a video screen during playback, randomly obtain a certain key frame, here it is assumed that it is the j-th key frame;
  • Step 3 The step 2 determines the position information, n order to find parts of the R channel value R S I from the same location as the original video frame corresponding to the picture from the transparent and to obtain a fixed ⁇ channel value R A;
  • Step 6 According to the header information defined in the watermark information segmentation protocol in Figure 2, find the j-th block of data that meets the format from n pieces of watermark text to be confirmed; if it is not found, it proves that the video does not carry watermark information, and the video is illegal , If the j-th block of data is found, proceed to step 7;
  • Step 7 Extract sequentially from the j+1 frame to the j-1 frame, a total of n-1 video key frames to be extracted from the watermark, and repeat the W b acquisition process from step 2 to step 6 to obtain the remaining n-1 in turn Block watermark text;
  • Step 8 Splice into complete text data in order through the blocknum defined in the segmentation protocol
  • Step 9 Decode the text data to obtain the watermark information to be confirmed.
  • Step 10 Verify whether the extracted watermark is trustworthy information as a basis for infringement.
  • step 7 if there is incomplete data in a block, such as information loss in the k-th block, continue to obtain the watermark information of the k-th block from the subsequent n+k block , And complete the watermark text;
  • Application example 1 Deploying a watermark video generation system in an OTT (Over The Top, Internet TV) set-top box:
  • the video watermark adding system deployed in the OTT set-top box includes a watermark information encoding subsystem 21, a transparent watermark generation subsystem 22, and a video watermark mixing subsystem 23:
  • the watermark text generation module 211 in the watermark information encoding subsystem 21 obtains information including the device ID, device MAC, device IP, user account, site, etc. from the OTT set-top box, and generates the watermark text in a certain format; the watermark information is encrypted / Encoding module 212 encrypts and encodes the watermark text information; the watermark text slicing module 213 divides the encrypted text information into n blocks as shown in Figure 2, performs binary conversion of each block data, and presses the data into X ⁇ Y matrix arrangement (less than 0).
  • R d R s + R w ⁇ R a pixel point
  • DVB Digital Video Broadcasting, digital video broadcasting
  • the video watermark adding system deployed in the DVB set-top box includes a watermark information encoding subsystem 21, a transparent watermark generation subsystem 22, and a video watermark mixing subsystem 23:
  • the watermark text generation module 211 in the watermark information encoding subsystem 21 obtains information including device ID, device MAC, device IP, user account, site, etc. from the DVB set-top box, and generates watermark text in a certain format; watermark information encryption / Encoding module 212 encrypts and encodes the watermark text information; the watermark text slicing module 213 divides the encrypted text information into n blocks as shown in Figure 2, performs binary conversion of each block data, and presses the data into X ⁇ Y matrix arrangement (less than 0).
  • R d R s + R w ⁇ R a pixel point
  • the R channel values are mixed one by one, so as to realize the real-time addition of transparent watermark information when the DVB set-top box plays the video.
  • the video watermark adding system deployed in the mobile terminal includes a watermark information encoding subsystem 21, a transparent watermark generation subsystem 22, and a video watermark mixing subsystem 23:
  • the watermark text generation module 211 in the watermark information encoding subsystem 21 obtains information including the device ID, device MAC, device IP, user account, site, etc. from the mobile phone, and generates the watermark text in a certain format; watermark information encryption/ The encoding module 212 encrypts and encodes the watermark text information; the watermark text slicing module 213 divides the encrypted text information into n blocks as shown in FIG. 2, performs binary conversion of each block data, and presses the data into X ⁇ Y Matrix arrangement (less than 0).
  • R d R s + R w ⁇ R a pixel point
  • the video watermark adding system deployed in the PC terminal includes a watermark information encoding subsystem 21, a transparent watermark generating subsystem 22, and a video watermark mixing subsystem 23:
  • the watermark text generation module 211 in the watermark information encoding subsystem 21 obtains information including the device ID, device MAC, and device IP from the PC, and generates the watermark text in a certain format; the watermark information encryption/encoding module 212 generates the watermark text The information is encrypted and encoded; the watermark text slicing module 213 divides the encrypted text information into n blocks as shown in Figure 2, performs binary conversion of each block data, and arranges the data in an X ⁇ Y matrix (less than 0 ).
  • R d R s + R w ⁇ R a pixel point
  • the embodiments of this application have the characteristics of fast speed, real-time, high visibility, security and robustness.
  • an embodiment of the present application also provides a video watermarking device, including:
  • the generating unit 51 is configured to obtain watermark information, and generate a watermark transparent picture carrying the watermark information according to the watermark information;
  • the mixing unit 52 is configured to mix the watermark transparent picture into the video playback picture.
  • an embodiment of the present application also provides a video watermark extraction device, including:
  • the obtaining unit 61 is configured to obtain a target video frame mixed with a watermark transparent picture in a video playback picture, and obtain a source video frame corresponding to the target video frame;
  • the extraction unit 62 is configured to compare the target video frame with the source video frame to obtain the watermark information carried by the watermark transparent picture.
  • an embodiment of the present application also provides a video watermarking device, including: a memory 71, a processor 72, and a computer program 73 stored on the memory 71 and running on the processor 72.
  • the processing The method for adding the video watermark is realized when the device 72 executes the program.
  • an embodiment of the present application also provides a video watermark extraction device, including: a memory 81, a processor 82, and a computer program 83 stored on the memory 81 and running on the processor 82.
  • the processing The method for extracting the video watermark is realized when the device 82 executes the program.
  • An embodiment of the present application also provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the video watermark extraction method.
  • the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (ROM), Random Access Memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc.
  • U disk Read-Only Memory
  • RAM Random Access Memory
  • RAM Random Access Memory
  • mobile hard disk magnetic disk or optical disk, etc.
  • Such software may be distributed on a computer-readable medium
  • the computer-readable medium may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium).
  • the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

一种视频水印添加、提取的方法、装置、设备和计算机可读存储介质,其中,所述视频水印添加的方法包括:获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;将所述水印透明图片混合至视频播放画面中。

Description

视频水印添加、提取的方法、装置和设备
相关申请的交叉引用
本申请基于申请号为201910476010.5、申请日为2019年6月3日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本文涉及但不限于一种视频水印添加、提取的方法、装置、设备和计算机可读存储介质。
背景技术
随着移动互联网的快速发展,视频播放业务发展很迅速,越来越多的用户在使用终端观看多媒体视频,与此同时,对于视频侵权的重视程度也逐步增强。
为了防止视频资源被盗用,内容提供商一般会在视频内容中添加肉眼不可见的水印信息,然后通过一定的技术方法提取水印,来判断视频是否侵权,并作为是否侵权的依据。
目前业内对视频水印的添加,普遍采用提取视频关键帧,并对关键帧的空域或频域增加透明水印信息;不管是对空域图像进行处理,还是变换为频域进行处理,都会有一定的时间损耗,为了保证视频的流畅,一般是在内容分发前完成对水印视频的制作。
与此同时,目前机顶盒上添加视频水印,一般是芯片和DRM(Digital Rights Management,数字版权管理)厂家一起实现,DRM厂家负责生产水印信息,芯片在图像渲染的时候叠加到图像中,这种方式的主要缺陷是水印必须使用支持水印的专用芯片,而且芯片要经过DRM厂家认证,向DRM厂家缴纳许可(license) 费用,所以不仅成本增加,而且不能在现有的机顶盒上提供水印功能。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请实施例提供了一种视频水印添加、提取的方法、装置、设备和计算机可读存储介质。
本申请实施例提供了一种视频水印添加的方法,包括:获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;将所述水印透明图片混合至视频播放画面中。
本申请实施例还提供一种视频水印提取的方法,包括:获取视频播放画面中混合有水印透明图片的目标视频帧,以及获取所述目标视频帧对应的源视频帧;将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
本申请实施例还提供一种视频水印添加的装置,包括:生成单元,用于获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;混合单元,用于将所述水印透明图片混合至视频播放画面中。
本申请实施例还提供一种视频水印提取的装置,包括:获取单元,用于获取视频播放画面中混合有水印透明图片的目标视频帧,以及获取所述目标视频帧对应的源视频帧;提取单元,用于将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
本申请实施例还提供一种视频水印添加的设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现所述视频水印添加的方法。
本申请实施例还提供一种视频水印提取的设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现所述视频水印提取的方法。
本申请实施例还提供一种计算机可读存储介质,存储有计算机可执行指令, 所述计算机可执行指令用于执行所述视频水印添加的方法。
本申请实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行所述视频水印提取的方法。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
图1是本申请实施例的视频水印添加的方法的流程图;
图2是本申请实施例的水印信息分割协议的示意图;
图3是本申请实施例的水印文本块转换为水印数据块示例图;
图4是本申请实施例的透明图片中加入水印信息的示意图;
图5是本申请实施例的视频水印添加系统的示意图;
图6是本申请一实施例的视频水印添加的方法的流程图;
图7是本申请实施例的视频水印提取的方法的流程图;
图8是本申请实施例的视频水印提取系统的示意图;
图9是本申请一实施例的视频水印提取的方法的流程图;
图10是本申请实施例的视频水印添加的装置的示意图;
图11是本申请实施例的视频水印提取的装置的示意图;
图12是本申请实施例的视频水印添加的设备的示意图;
图13是本申请实施例的视频水印提取的设备的示意图。
具体实施方式
下文中将结合附图对本申请的实施例进行详细说明。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本申请实施例在视频播放端提供一种快速添加隐藏视频水印,以及提取和 检测水印信息的方法和系统,以此来达到在不影响视频播放流畅性的前提下,实现对播放中的视频添加隐藏水印信息,并有效进行水印信息提取。
如图1所示,本申请实施例的视频水印添加的方法,包括:
步骤101,获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片。
其中,可以从播放设备获取水印信息,水印信息可以包括设备标识、以及产品认证数据。例如,水印信息包括设备ID(标识)、设备MAC(Media Access Control Address,媒体访问控制地址)、设备IP(Internet Protocol Address,网际协议地址)、用户账号、局点等信息。
在一实施例中,所述根据所述水印信息生成携带有所述水印信息的水印透明图片,包括:
根据所述水印信息生成水印二进制数据;所述水印二进制数据嵌入对应的透明图片中,得到携带有所述水印信息的水印透明图片。
所述水印二进制数据用于在视频播放时混合到视频播放画面中。
本申请实施例中,将所述水印信息生成水印文本,将所述水印文本加密编码并划分为多个块,将所述水印文本块转换为二进制数据,将所述二进制数据按一定的设置规则分别嵌入到对应透明图片中,得到携带有所述水印信息的水印透明图片。
其中,可以按照预设的格式将所述水印信息转换为水印文本,比如设备ID_MAC_账号_MarketCode。
在一实施例中,所述根据所述水印信息生成水印二进制数据,包括:
根据所述水印信息生成水印文本;根据所述水印文本生成携带编号信息的n个水印文本块,将每个所述水印文本块分别转换为二进制数据,得到n组水印二进制数据;其中,n为整数。
其中,参照图2,根据所述水印文本生成携带编号信息的n个水印文本块。
在一实施例中,所述根据所述水印文本生成携带编号信息的n个水印文本块之前,所述方法还包括:对所述水印文本进行加密编码;
所述根据所述水印文本生成携带编号信息的n个水印文本块,包括:根据经过加密编码的水印文本生成携带编号信息的n个水印文本块。
在一实施例中,所述得到n组水印二进制数据之后,所述方法还包括:
将每组所述水印二进制数据生成按矩阵排列的水印数据块。
如图3所示,将水印文本块转换为二进制数据,生成按矩阵排列的水印数据块。
本申请实施例中,可以生成携带有编号信息的水印数据块(也即编号二进制数据块)及校验信息,将所述编号二进制数据块转换为比特矩阵,并进一步将矩阵划分为多个子矩阵,并按规则嵌入到水印透明图片的指定位置。
在一实施例中,所述水印二进制数据嵌入对应的透明图片中,得到携带有所述水印信息的水印透明图片,包括:
将n组中的每组水印二进制数据依次加入所述透明图片指定位置像素点的第一颜色通道中,得到n张携带有所述水印信息的水印透明图片,所述第一颜色通道包括红色通道、绿色通道和蓝色通道之一,n为大于等于1的整数。
所述透明图片可以是带有为RGBA四通道的png图片。
本申请实施例中,将水印二进制数据嵌入对应的透明图片中,可以有多种方式,包括但不限于矩阵子块以对角线滑动窗口的规则,依次将每个子矩阵块的比特数据,同透明图片中的对应像素点第一通道值做混合操作。
在一实施例中,所述将所述水印二进制数据中的数据依次加入所述透明图片指定位置像素点的第一颜色通道中,包括:
设置所述透明图片的滑动窗口,按照R w=R o+W b,将所述水印二进制数据中的数据依次加入所述滑动窗口指定位置对应的像素点的第一颜色通道中,其中,R W为水印透明图片中像素点的第一颜色通道值,R O为透明图片对应像素点的第一颜色通道值,W b为水印二进制数据的比特值。
参照图4,以第一颜色通道为R(红色)通道例,以j乘以滑动窗口大小,其中j为第j块数据,j小于等于n。滑动窗口定义为s×t,假定第0块数据与透明图片第m个像素开始的像素点[x,y]做混合,第j块数据同第j+1块数据在透明图片中做混合操作的像素点位置关系为
Figure PCTCN2020093658-appb-000001
如图4所示, 水印数据块按8×4矩阵排列,滑动窗口定义为4×3,第0块中的[4,2]比特值同透明图片中[4,2]像素点的R通道按R w=R o+W b进行混合,第1块中的[4,2]比特值同透明图片中[8,5]像素点([4 0+1,2 0+1]=[4 0+1×4,2 0+1×3])的R通道按R w=R o+W b进行混合。
步骤102,将所述水印透明图片混合至视频播放画面中。
在一实施例中,步骤102包括:
依次将所述水印透明图片按照预设的时间间隔,循环混合到视频播放画面中。
其中,步骤102在确定接收到视频播放指令后,将所述水印透明图片混合至视频播放画面中。
在一实施例中,按照预设的时间间隔,采用循环的方式依次将根据所述水印信息生成n张水印透明图片与视频播放中的n个源视频帧进行混合,播放混合后得到所述目标视频帧。
在一实施例中,所述源视频帧和目标视频帧为关键帧(I帧),所述采用循环的方式依次将根据所述水印信息生成n张水印透明图片与视频播放中的n个源视频帧进行混合,包括:
采用循环的方式,依次将所述n张水印透明图片与视频播放中的n个源关键帧按照R d=R s+R w×R a进行像素点中第一颜色通道值的逐一混合,得到混合后的目标关键帧,其中,R d为目标关键帧中像素点的第一颜色通道值,R s为源关键帧中像素点的第一颜色通道值,R w为水印透明图片中像素点的第一颜色通道值,R a为透明水印图片中像素点的α通道值,其中,n为大于等于1的整数。
需要说明的是,上述实施例是将水印文本块分别转换为二进制数据,嵌入透明图片中,在其他实施例中,还可以将水印文本转换成水印图片,将水印图片分割成一个或多个图片块,分别嵌入相应的透明图片中,生成水印透明图片。
通过本申请实施例可以实现终端侧播放器独立完成透明水印信息的实时嵌入,不需要播控平台或专用芯片的参与,具有速度快,实时,可视度高,安全及鲁棒性等特点。
如图5所示,以终端设备为IPTV(交互式网络电视)机顶盒为例,在IPTV机顶盒中部署的视频水印添加系统,该系统包括水印信息编码子系统21、透明水印生成子系统22、视频水印混合子系统23,处理流程如下:
水印信息编码子系统21中的水印文本生成模块211从IPTV机顶盒中获取包含设备ID、设备MAC、设备IP、用户账号、局点等信息,并按一定的格式生成水印文本,比如设备ID_MAC_账号_MarketCode;水印信息加密/编码模块212对水印文本信息进行加密并编码;水印文本切片模块213对加密后的文本信息,按图2所示分割为n块,将每个块数据做二进制转换,并将数据按X×Y矩阵排列(不足补0)。
透明水印生成子系统22进行二进制转换的规则为,对每个块数据做十六进制到二进制的转换,按大端字节序排列,按顺序以X个bit为一行,分成Y列,不足的bit位补0,从而转换为X×Y的bit矩阵。如图3块矩阵转换示例所示,将十六进制的字符串0XBE23F05A转换为8*4的矩阵。
以第一颜色通道为R通道为例,透明水印生成子系统22将按矩阵排列的二进制数据块,依次按公式R w=R o+W b混合,加入到透明图片指定区域像素点的R通道中,从而得到n张带水印的透明图片。其中R W为水印图片某个像素点R的取值,R O为透明图片对应像素点R通道值(固定为0),W b为加密水印文本的比特值,透明图片为RGBA四通道的png图片;指定区域的选择规则为j乘以滑动窗口大小,其中j为第j块数据,滑动窗口定义为s×t,假定第0块数据与透明图片第m个像素开始的像素点[x,y]做混合,第j块数据同第j+1块数据在透明图片中做混合操作的像素点位置关系为
Figure PCTCN2020093658-appb-000002
如图4所示,数据块按8×4矩阵排列,滑动窗口定义为4×3,第0块中的[4,2]比特值同透明图片中[4,2]像素点的R通道按R w=R o+W b进行混合,第1块中的[4,2]比特值同透明图片中[8,5]像素点([4 0+1,2 0+1]=[4 0+1×4,2 0+1×3])的R通道按R w=R o+W b进行混合。
播放过程中,通过视频水印混合子系统23依次将生成的n张透明水印图片,和播放视频的n张I帧,按规则R d=R s+R w×R a进行像素点中R通道值的逐一混合,从而实现在播放视频中实时添加透明水印信息。其中R d为混合透明水印的视频帧中像素点R通道值,R s源I帧中像素点R通道值,R w为透明水印像素点R通道值,R a为透明水印图片中像素点的α通道值。
参见图6,以一个实施例说明视频中添加透明水印的过程,步骤如下:
步骤1:创建带α通道的RGBA四通道png图片,并打包到播放器中。
步骤2:应用启动后,读取设备ID信息及产品认证数据作为水印信息,做加密和例如,采用base64(一种基于64个可打印字符来表示二进制数据的方法)编码处理,并转换水印信息为二进制数据;
步骤3:对水印二进制数据,按图2水印信息分割协议定义的格式进行分块,并分为n份;
步骤4:解压png中的IDAT chunk(图像数据块),以[0,0]像素为起始点按规则
Figure PCTCN2020093658-appb-000003
选取指定像素点对应的R通道值,同第j块水印二进制数据(j=1,2,...,n),按R w=R o+W b做数据混合。
其中j为第j块数据,s×t为混合水印动态移动的滑动窗口,
Figure PCTCN2020093658-appb-000004
为第j块对应的透明图片中做混合的像素点区域,
Figure PCTCN2020093658-appb-000005
为第j+1块对应的透明图片中做混合的像素点区域。假定第j块数据与透明图片从第[0,0]像素开始的[x,y]区域的像素点做混合,第j块数据同第j+1块数据在透明图片中做混合操作的像素点位置关系为
Figure PCTCN2020093658-appb-000006
如图4所示,数据块按8×4矩阵排列,滑动窗口定义为4×3,第0块中的[4,2]比特值同透明图片中[4,2]像素点的R通道按R w=R o+W b进行混合,第1块中的[4,2]比特值同透明图片中[8,5]像素点([4 0+1,2 0+1]=[4 0+1×4,2 0+1×3])的R通道按R w=R o+W b进行混合。
步骤5:对混合后的png图片进行无损压缩,从而得到混合了第j块水印信息的第j张透明水印图片;
步骤6:视频播放器在播放视频时,依次将视频中的第j张关键帧同第j张透明水印图片,对像素点中的R通道值,按R d=R s+R w×R a进行混合。
步骤7:依次循环进行步骤6,从而实现播放过程中动态增加透明水印的功能。
本申请实施例的视频水印提取方法为视频水印添加方法的逆过程,如图7所示,本申请实施例的视频水印提取的方法,包括:
步骤301,获取视频播放画面中混合有水印透明图片的目标视频帧,以及获 取所述目标视频帧对应的源视频帧。
在一实施例中,所述获取视频播放画面中混合有水印透明图片的目标视频帧,包括:
获取视频播放画面中的视频帧,对所述视频帧的指定位置的像素点进行计算,确定待校验的数据块;
确定所述待校验的数据块中包含预设的编号信息时,将所述待校验的数据块对应的视频帧作为起始视频帧,按照预设的时间间隔,从所述起始视频帧开始,依次确定目标视频帧。
步骤302,将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
在一实施例中,步骤302包括:
根据所述目标视频帧和源视频帧中像素点信息的差值,获得所述水印透明图片携带的水印信息。
其中,可以所述目标视频帧中像素点信息,分别获取所述目标视频帧对应的水印透明图片中携带的水印数据块的像素点信息,根据所述编号信息拼接所述水印数据块,根据拼接后的所述水印数据块确定水印信息。
在一实施例中,所述根据所述目标视频帧和源视频帧中像素点信息的差值,获得所述水印透明图片携带的水印信息,包括:
根据所述目标视频帧和源视频帧中像素点信息的差值,确定水印透明图片中像素点的第一颜色通道值;
根据水印二进制数据在所述水印透明图片的位置,以及所述水印透明图片中像素点的第一颜色通道值,确定水印数据块;
根据所述水印数据块携带的编号信息,将多个水印数据块拼接,得到所述水印信息。
在一实施例中,所述源视频帧和目标视频帧为关键帧,所述根据所述目标视频帧和源视频帧中像素点信息的差值,确定水印透明图片中像素点的第一颜色通道值,包括:
按照R w=(R d-R s)/R a,确定水印透明图片中像素点的第一颜色通道值,其中,R d为目标关键帧中像素点的第一颜色通道值,R s为源关键帧中像素点的第一颜色通道值,R w为水印透明图片中像素点的第一颜色通道值。
在一实施例中,所述根据水印二进制数据在所述水印透明图片的位置,以及所述水印透明图片中像素点的第一颜色通道值,确定水印数据块,包括:
根据透明图片中滑动窗口指定位置对应的像素点的第一颜色通道值,以及所述水印透明图片中对应像素点的第一颜色通道值,按照W b=R w-R o,得到水印二进制数据的比特值,根据所述水印二进制数据的比特值确定水印数据块;其中,R W为水印透明图片中像素点的第一颜色通道值,R O为透明图片对应像素点的第一颜色通道值,W b为水印二进制数据的比特值。
如图8所示,本申请实施例的视频水印提取系统,包括水印信息提取子系统41和水印信息解码子系统42,处理流程如下:
水印信息提取子系统41对录屏的视频,提取出第j张I帧图片得到R d,找到对应的原始视频I帧并得到R s,从透明图片中可以获取到固定的α通道值R a。根据
Figure PCTCN2020093658-appb-000007
找到需要鉴别水印的区域,并通过混合规则R d=R s+R w×R a的逆运算R w=(R d-R s)/R a,逐一解析出第j张视频对应的R w,然后根据透明图片混合水印文本的公式R w=R o+W b做逆运算W b=R w-R o得到水印文本的比特值;
水印信息解码子系统42通过图2分割协议中定义的blocknum(块编号)依次找到n块数据,并拼接为完整的文本数据,然后解密后还原为水印文本,并判别播放的视频是否合法。
如图9所示,在一实施例中,水印信息提取流程包括如下步骤:
步骤1:对播放过程中的视频录屏,随机获取某张关键帧,这里先假设为是第j张关键帧;
步骤2:根据水印混合时像素点区域的选择规则
Figure PCTCN2020093658-appb-000008
(j=1,2,...,n),从第[0,0]像素开始的[x,y]区域开始,依次获取n份录屏待提取水印 的像素点R通道值R d值;
步骤3:根据步骤2确定的位置信息,依次从对应的原始视频I帧的相同位置找到n份R通道值R s,并从透明图片中获取到固定的α通道值R a
步骤4:通过混合规则R d=R s+R w×R a的逆运算R w=(R d-R s)/R a,依次解析出n份第j张视频中的待确认透明水印图片R通道值R w
步骤5:根据透明图片混合水印文本的公式R w=R o+W b做逆运算W b=R w-R o得到n份待确认的水印文本的比特值;
步骤6:根据图2水印信息分割协议中定义的头部信息,从n份待确认的水印文本中找到满足格式的第j块数据;如果未找到,则证明视频中未带水印信息,视频非法,如果找到第j块数据,则继续步骤7;
步骤7:依次提取第j+1帧到第j-1帧,共n-1张待提取水印的视频关键帧,并重复从步骤2到步骤6的W b获取流程,依次获取剩余n-1块水印文本;
步骤8:通过分割协议中定义的blocknum按次序拼接为完整的文本数据;
步骤9:对文本数据进行解码,得到待确认的水印信息。
步骤10:验证提取出的水印,是否为可信任信息,来作为侵权依据。
特别的,针对录屏过程中可能出现的信息丢失,在步骤7中,如果有块数据不完整,比如第k块有信息丢失,则继续从后续的第n+k块获取第k块水印信息,并补齐水印文本;
可以从n+j开始,重复步骤1到步骤9,来进一步提取水印文本。
本申请实施例还可以应用其他视频播放终端,例如:
应用实例一,OTT(Over The Top,互联网电视)机顶盒中部署水印视频生成系统:
如图5的视频水印添加系统所示,在OTT机顶盒中部署的视频水印添加系统包括水印信息编码子系统21、透明水印生成子系统22、视频水印混合子系统23:
首先,水印信息编码子系统21中的水印文本生成模块211从OTT机顶盒 中获取包含设备ID、设备MAC、设备IP、用户账号、局点等信息,并按一定的格式生成水印文本;水印信息加密/编码模块212对水印文本信息进行加密并编码;水印文本切片模块213对加密后的文本信息,按图2所示分割为n块,将每个块数据做二进制转换,并将数据按X×Y矩阵排列(不足补0)。
然后,透明水印生成子系统22将按矩阵排列的二进制数据块,依次按公式R w=R o+W b混合,加入到透明图片指定区域像素点的R通道中,从而得到n张带水印的透明图片。
最后,在播放过程中,通过视频水印混合子系统23依次将生成的n张透明水印图片,和视频中的n张I帧,按规则R d=R s+R w×R a进行像素点中R通道值的逐一混合,从而实现在OTT机顶盒播放视频时,实时添加透明水印信息。
应用实例二,DVB(Digital Video Broadcasting,数字视频广播)机顶盒中部署水印视频生成系统:
如图5的视频水印添加系统所示,在DVB机顶盒中部署的视频水印添加系统包括水印信息编码子系统21、透明水印生成子系统22、视频水印混合子系统23:
首先,水印信息编码子系统21中的水印文本生成模块211从DVB机顶盒中获取包含设备ID、设备MAC、设备IP、用户账号、局点等信息,并按一定的格式生成水印文本;水印信息加密/编码模块212对水印文本信息进行加密并编码;水印文本切片模块213对加密后的文本信息,按图2所示分割为n块,将每个块数据做二进制转换,并将数据按X×Y矩阵排列(不足补0)。
然后,透明水印生成子系统22将按矩阵排列的二进制数据块,依次按公式R w=R o+W b混合,加入到透明图片指定区域像素点的R通道中,从而得到n张带水印的透明图片。
最后,在播放过程中,通过视频水印混合子系统23依次将生成的n张透明水印图片,和视频中的n张I帧,按规则R d=R s+R w×R a进行像素点中R通道值的逐一混合,从而实现在DVB机顶盒播放视频时,实时添加透明水印信息。
应用实例三,手机终端中部署水印视频生成系统:
如图5的视频水印添加系统所示,在手机终端中部署的视频水印添加系统包括水印信息编码子系统21、透明水印生成子系统22、视频水印混合子系统23:
首先,水印信息编码子系统21中的水印文本生成模块211从手机中获取包含设备ID、设备MAC、设备IP、用户账号、局点等信息,并按一定的格式生成水印文本;水印信息加密/编码模块212对水印文本信息进行加密并编码;水印文本切片模块213对加密后的文本信息,按图2所示分割为n块,将每个块数据做二进制转换,并将数据按X×Y矩阵排列(不足补0)。
然后,透明水印生成子系统22将按矩阵排列的二进制数据块,依次按公式R w=R o+W b混合,加入到透明图片指定区域像素点的R通道中,从而得到n张带水印的透明图片。
最后,在播放过程中,通过视频水印混合子系统23依次将生成的n张透明水印图片,和视频中的n张I帧,按规则R d=R s+R w×R a进行像素点中R通道值的逐一混合,从而实现在手机终端上播放视频时,实时添加透明水印信息。
应用实例四,PC(Personal Computer,个人计算机)终端中部署水印视频生成系统:
如图5的视频水印添加系统所示,在PC终端中部署的视频水印添加系统包括水印信息编码子系统21、透明水印生成子系统22、视频水印混合子系统23:
首先,水印信息编码子系统21中的水印文本生成模块211从PC中获取包含设备ID、设备MAC、设备IP等信息,并按一定的格式生成水印文本;水印信息加密/编码模块212对水印文本信息进行加密并编码;水印文本切片模块213对加密后的文本信息,按图2所示分割为n块,将每个块数据做二进制转换,并将数据按X×Y矩阵排列(不足补0)。
然后,透明水印生成子系统22将按矩阵排列的二进制数据块,依次按公式R w=R o+W b混合,加入到透明图片指定区域像素点的R通道中,从而得到n张带水印的透明图片。
最后,在播放过程中,通过视频水印混合子系统23依次将生成的n张透明水印图片,和视频中的n张I帧,按规则R d=R s+R w×R a进行像素点中R通道值的 逐一混合,从而实现在PC终端上播放视频时,实时添加透明水印信息。
综上,通过在透明图片中增加加密的水印文本块,形成一组位置可变的水印透明图片,并在视频播放过程中,将水印信息动态循环渲染到视频关键帧中,来实现视频中动态添加透明水印信息;并且通过加密及循环添加,增强了水印信息的安全性及鲁棒性。根据添加水印的逆运算及加密密钥,可以方便的提取出水印信息,来验证视频是否合法。相对于传统的视频水印添加技术,本申请实施例具有速度快,实时,可视度高,安全及鲁棒性等特点。
如图10所示,本申请实施例还提供一种视频水印添加的装置,包括:
生成单元51,用于获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;
混合单元52,用于将所述水印透明图片混合至视频播放画面中。
如图11所示,本申请实施例还提供一种视频水印提取的装置,包括:
获取单元61,用于获取视频播放画面中混合有水印透明图片的目标视频帧,以及获取所述目标视频帧对应的源视频帧;
提取单元62,用于将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
如图12所示,本申请实施例还提供一种视频水印添加的设备,包括:存储器71、处理器72及存储在存储器71上并可在处理器72上运行的计算机程序73,所述处理器72执行所述程序时实现所述视频水印添加的方法。
如图13所示,本申请实施例还提供一种视频水印提取的设备,包括:存储器81、处理器82及存储在存储器81上并可在处理器82上运行的计算机程序83,所述处理器82执行所述程序时实现所述视频水印提取的方法。
本申请实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行所述视频水印添加的方法。
本申请实施例还提供一种计算机可读存储介质,存储有计算机可执行指令, 所述计算机可执行指令用于执行所述视频水印提取的方法。
在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。

Claims (22)

  1. 一种视频水印添加的方法,包括:
    获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;
    将所述水印透明图片混合至视频播放画面中。
  2. 如权利要求1所述的方法,其中,所述根据所述水印信息生成携带有所述水印信息的水印透明图片,包括:
    根据所述水印信息生成水印二进制数据;
    所述水印二进制数据嵌入对应的透明图片中,得到携带有所述水印信息的水印透明图片。
  3. 如权利要求2所述的方法,其中,所述根据所述水印信息生成水印二进制数据,包括:
    根据所述水印信息生成水印文本;
    根据所述水印文本生成携带编号信息的n个水印文本块,将每个所述水印文本块分别转换为二进制数据,得到n组水印二进制数据;其中,n为整数。
  4. 如权利要求3所述的方法,其中,
    所述根据所述水印文本生成携带编号信息的n个水印文本块之前,所述方法还包括:对所述水印文本进行加密编码;
    所述根据所述水印文本生成携带编号信息的n个水印文本块,包括:根据经过加密编码的水印文本生成携带编号信息的n个水印文本块。
  5. 如权利要求3所述的方法,其中,所述得到n组水印二进制数据之后,所述方法还包括:
    将每组所述水印二进制数据生成按矩阵排列的水印数据块。
  6. 如权利要求2所述的方法,其中,所述水印二进制数据嵌入对应的透明图片中,得到携带有所述水印信息的水印透明图片,包括:
    将n组中的每组水印二进制数据依次加入所述透明图片指定位置像素点的 第一颜色通道中,得到n张携带有所述水印信息的水印透明图片,所述第一颜色通道包括红色通道、绿色通道和蓝色通道之一,n为整数。
  7. 如权利要求6所述的方法,其中,所述将所述水印二进制数据中的数据依次加入所述透明图片指定位置像素点的第一颜色通道中,包括:
    设置所述透明图片的滑动窗口,按照R w=R o+W b,将所述水印二进制数据中的数据依次加入所述滑动窗口指定位置对应的像素点的第一颜色通道中,其中,R W为水印透明图片中像素点的第一颜色通道值,R O为透明图片对应像素点的第一颜色通道值,W b为水印二进制数据的比特值。
  8. 如权利要求1所述的方法,其中,所述将所述水印透明图片混合至视频播放画面中,包括:
    依次将所述水印透明图片按照预设的时间间隔,循环混合到视频播放画面中。
  9. 如权利要求8所述的方法,其中,所述依次将所述水印透明图片按照预设的时间间隔,循环混合到视频播放画面中,包括;
    按照预设的时间间隔,采用循环的方式依次将根据所述水印信息生成n张水印透明图片与视频播放中的n个源视频帧进行混合,播放混合后得到所述目标视频帧。
  10. 如权利要求9所述的方法,其中,所述源视频帧和目标视频帧为关键帧,所述采用循环的方式依次将根据所述水印信息生成n张水印透明图片与视频播放中的n个源视频帧进行混合,包括:
    采用循环的方式,依次将所述n张水印透明图片与视频播放中的n个源关键帧按照R d=R s+R w×R a进行像素点中第一颜色通道值的逐一混合,得到混合后的目标关键帧,其中,R d为目标关键帧中像素点的第一颜色通道值,R s为源关键帧中像素点的第一颜色通道值,R w为水印透明图片中像素点的第一颜色通道值,R a为透明水印图片中像素点的α通道值,其中,n为整数。
  11. 一种视频水印提取的方法,包括:
    获取视频播放画面中混合有水印透明图片的目标视频帧,以及获取所述目标视频帧对应的源视频帧;
    将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
  12. 如权利要求11所述的方法,其中,所述获取视频播放画面中混合有水印透明图片的目标视频帧,包括:
    获取视频播放画面中的视频帧,对所述视频帧的指定位置的像素点进行计算,确定待校验的数据块;
    确定所述待校验的数据块中包含预设的编号信息时,将所述待校验的数据块对应的视频帧作为起始视频帧,按照预设的时间间隔,从所述起始视频帧开始,依次确定目标视频帧。
  13. 如权利要求11所述的方法,其中,所述将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息,包括:
    根据所述目标视频帧和源视频帧中像素点信息的差值,获得所述水印透明图片携带的水印信息。
  14. 如权利要求13所述的方法,其中,所述根据所述目标视频帧和源视频帧中像素点信息的差值,获得所述水印透明图片携带的水印信息,包括:
    根据所述目标视频帧和源视频帧中像素点信息的差值,确定水印透明图片中像素点的第一颜色通道值;
    根据水印二进制数据在所述水印透明图片的位置,以及所述水印透明图片中像素点的第一颜色通道值,确定水印数据块;
    根据所述水印数据块携带的编号信息,将多个水印数据块拼接,得到所述水印信息。
  15. 如权利要求14所述的方法,其中,所述源视频帧和目标视频帧为关键帧,所述根据所述目标视频帧和源视频帧中像素点信息的差值,确定水印透明图片中像素点的第一颜色通道值,包括:
    按照R w=(R d-R s)/R a,确定水印透明图片中像素点的第一颜色通道值,其中,R d为目标关键帧中像素点的第一颜色通道值,R s为源关键帧中像素点的第一颜色通道值,R w为水印透明图片中像素点的第一颜色通道值。
  16. 如权利要求14所述的方法,其中,所述根据水印二进制数据在所述水 印透明图片的位置,以及所述水印透明图片中像素点的第一颜色通道值,确定水印数据块,包括:
    根据透明图片中滑动窗口指定位置对应的像素点的第一颜色通道值,以及所述水印透明图片中对应像素点的第一颜色通道值,按照W b=R w-R o,得到水印二进制数据的比特值,根据所述水印二进制数据的比特值确定水印数据块;其中,R W为水印透明图片中像素点的第一颜色通道值,R O为透明图片对应像素点的第一颜色通道值,W b为水印二进制数据的比特值。
  17. 一种视频水印添加的装置,包括:
    生成单元,用于获取水印信息,根据所述水印信息生成携带有所述水印信息的水印透明图片;
    混合单元,用于将所述水印透明图片混合至视频播放画面中。
  18. 一种视频水印提取的装置,包括:
    获取单元,用于获取视频播放画面中混合有水印透明图片的目标视频帧,以及获取所述目标视频帧对应的源视频帧;
    提取单元,用于将所述目标视频帧与所述源视频帧进行比对,获得所述水印透明图片携带的水印信息。
  19. 一种视频水印添加的设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1~10中任意一项所述视频水印添加的方法。
  20. 一种视频水印提取的设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求11~16中任意一项所述视频水印提取的方法。
  21. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~10中任意一项所述视频水印添加的方法。
  22. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求11~16中任意一项所述视频水印提取的方法。
PCT/CN2020/093658 2019-06-03 2020-06-01 视频水印添加、提取的方法、装置和设备 WO2020244474A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910476010.5 2019-06-03
CN201910476010.5A CN112040336B (zh) 2019-06-03 2019-06-03 视频水印添加、提取的方法、装置和设备

Publications (1)

Publication Number Publication Date
WO2020244474A1 true WO2020244474A1 (zh) 2020-12-10

Family

ID=73576722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093658 WO2020244474A1 (zh) 2019-06-03 2020-06-01 视频水印添加、提取的方法、装置和设备

Country Status (2)

Country Link
CN (1) CN112040336B (zh)
WO (1) WO2020244474A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822544A (zh) * 2020-12-31 2021-05-18 广州酷狗计算机科技有限公司 视频素材文件生成方法、视频合成方法、设备及介质
CN113379583A (zh) * 2021-05-31 2021-09-10 北京达佳互联信息技术有限公司 图像签名方法、装置、计算设备及存储介质
CN113766273A (zh) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 一种处理视频数据的方法和装置
CN114339449A (zh) * 2022-01-10 2022-04-12 广东统信教育科技有限公司 在显示系统中嵌入水印的版权保护方法
CN115396742A (zh) * 2022-07-11 2022-11-25 浙江大华系统工程有限公司 视频水印叠加方法、装置、计算机设备和存储介质
WO2024087864A1 (zh) * 2022-10-24 2024-05-02 抖音视界有限公司 图像水印处理方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114418825B (zh) * 2022-03-10 2022-07-22 太平金融科技服务(上海)有限公司深圳分公司 图像处理方法、装置、计算机设备和存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060261A1 (en) * 2007-08-31 2009-03-05 Xerox Corporation System and method for the generation of correlation-based digital watermarks
CN101742193A (zh) * 2009-12-22 2010-06-16 北京中星微电子有限公司 一种在数字电影中添加水印的方法
CN103366330A (zh) * 2012-03-31 2013-10-23 北大方正集团有限公司 水印的设置方法和装置
CN103458320A (zh) * 2013-08-29 2013-12-18 上海美琦浦悦通讯科技有限公司 基于水印技术的版权控制系统及视频添加数字水印的方法
CN109413508A (zh) * 2018-10-26 2019-03-01 广州虎牙信息科技有限公司 图像混合的方法、装置、设备、推流方法及直播系统
CN109685710A (zh) * 2018-12-29 2019-04-26 北京奇虎科技有限公司 一种图像版权隐数字水印嵌入的方法及装置
CN109791579A (zh) * 2017-03-14 2019-05-21 谷歌有限责任公司 半透明嵌入式水印
CN110896484A (zh) * 2018-09-12 2020-03-20 中兴通讯股份有限公司 视频水印添加和提取方法、装置、视频播放端及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101529082B1 (ko) * 2008-12-01 2015-06-17 주식회사 케이티 분할된 추적 정보를 이용한 워터마킹 장치 및 방법
CN202455458U (zh) * 2011-12-28 2012-09-26 成都东银信息技术股份有限公司 用于数字电视版权验证的数字水印叠加装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060261A1 (en) * 2007-08-31 2009-03-05 Xerox Corporation System and method for the generation of correlation-based digital watermarks
CN101742193A (zh) * 2009-12-22 2010-06-16 北京中星微电子有限公司 一种在数字电影中添加水印的方法
CN103366330A (zh) * 2012-03-31 2013-10-23 北大方正集团有限公司 水印的设置方法和装置
CN103458320A (zh) * 2013-08-29 2013-12-18 上海美琦浦悦通讯科技有限公司 基于水印技术的版权控制系统及视频添加数字水印的方法
CN109791579A (zh) * 2017-03-14 2019-05-21 谷歌有限责任公司 半透明嵌入式水印
CN110896484A (zh) * 2018-09-12 2020-03-20 中兴通讯股份有限公司 视频水印添加和提取方法、装置、视频播放端及存储介质
CN109413508A (zh) * 2018-10-26 2019-03-01 广州虎牙信息科技有限公司 图像混合的方法、装置、设备、推流方法及直播系统
CN109685710A (zh) * 2018-12-29 2019-04-26 北京奇虎科技有限公司 一种图像版权隐数字水印嵌入的方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822544A (zh) * 2020-12-31 2021-05-18 广州酷狗计算机科技有限公司 视频素材文件生成方法、视频合成方法、设备及介质
CN112822544B (zh) * 2020-12-31 2023-10-20 广州酷狗计算机科技有限公司 视频素材文件生成方法、视频合成方法、设备及介质
CN113766273A (zh) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 一种处理视频数据的方法和装置
CN113379583A (zh) * 2021-05-31 2021-09-10 北京达佳互联信息技术有限公司 图像签名方法、装置、计算设备及存储介质
CN114339449A (zh) * 2022-01-10 2022-04-12 广东统信教育科技有限公司 在显示系统中嵌入水印的版权保护方法
CN114339449B (zh) * 2022-01-10 2023-09-01 广东统信教育科技有限公司 在显示系统中嵌入水印的版权保护方法
CN115396742A (zh) * 2022-07-11 2022-11-25 浙江大华系统工程有限公司 视频水印叠加方法、装置、计算机设备和存储介质
WO2024087864A1 (zh) * 2022-10-24 2024-05-02 抖音视界有限公司 图像水印处理方法及装置

Also Published As

Publication number Publication date
CN112040336B (zh) 2023-03-14
CN112040336A (zh) 2020-12-04

Similar Documents

Publication Publication Date Title
WO2020244474A1 (zh) 视频水印添加、提取的方法、装置和设备
US11023618B2 (en) Systems and methods for detecting modifications in a video clip
CN110896484B (zh) 视频水印添加和提取方法、装置、视频播放端及存储介质
US7224819B2 (en) Integrating digital watermarks in multimedia content
US8363882B2 (en) User discernible watermarking
EP2036035B1 (en) System and method for object oreinted fingerprinting of digital videos
US20070003102A1 (en) Electronic watermark-containing moving picture transmission system, electronic watermark-containing moving picture transmission method, information processing device, communication control device, electronic watermark-containing moving picture processing program, and storage medium containing electronic watermark-containing
US20140029786A1 (en) Forensic marking using a common customization function
US9813780B2 (en) Device and method to mark digital audio or audio and/or video content
US20170316189A1 (en) Object-based watermarking
US8144870B2 (en) Encoding and detecting apparatus
JP5646187B2 (ja) アクセス方法、生成方法、ユーザ装置及び生成装置
US20100098250A1 (en) Movie based forensic data for digital cinema
US9319752B2 (en) Robust watermark
US20050203872A1 (en) Method and apparatus making, operating and using media parsers to mark, read, and unmark instances of media formats supporting one, two and multi-dimensional instances and data streams
CN113810780B (zh) 视频传输方法、装置、及存储介质
JP2005318068A (ja) コンテンツ認証データの電子透かし埋め込み方式および認証方式
CN117499665B (zh) 一种基于灰度值量化的图像数据嵌入和提取方法、装置
CN115622706A (zh) 一种基于flv视频封装格式的数字水印添加及提取方法
CN116527965A (zh) 标记视频的生成方法和装置、视频标记的检测方法和装置
Cika New watermarking scheme for colour image

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20817625

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20817625

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20817625

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13/05/2022)