CN110896484B - Video watermark adding and extracting method and device, video playing end and storage medium - Google Patents

Video watermark adding and extracting method and device, video playing end and storage medium Download PDF

Info

Publication number
CN110896484B
CN110896484B CN201811064384.8A CN201811064384A CN110896484B CN 110896484 B CN110896484 B CN 110896484B CN 201811064384 A CN201811064384 A CN 201811064384A CN 110896484 B CN110896484 B CN 110896484B
Authority
CN
China
Prior art keywords
watermark
picture
video
transparent
information
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811064384.8A
Other languages
Chinese (zh)
Other versions
CN110896484A (en
Inventor
王峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201811064384.8A priority Critical patent/CN110896484B/en
Publication of CN110896484A publication Critical patent/CN110896484A/en
Application granted granted Critical
Publication of CN110896484B publication Critical patent/CN110896484B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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/4402Processing 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 reformatting operations of video signals for household redistribution, storage or real-time display

Landscapes

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

Abstract

The embodiment of the invention discloses a video watermark adding and extracting method, a video watermark adding and extracting device, a video playing end and a storage medium, wherein the video watermark adding method comprises the steps of obtaining watermark information; generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played; extracting a target video frame mixed with a watermark transparent picture in a video playing picture; and obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.

Description

Video watermark adding and extracting method and device, video playing end and storage medium
Technical Field
The present invention relates to the field of multimedia technologies, and in particular, to a video watermark adding method and apparatus, a video watermark extracting method and apparatus, a video playing end, and a computer storage medium.
Background
With the rapid development of the mobile internet, video playing services are rapidly developed, more and more users watch multimedia videos by using terminals, and meanwhile, the importance of infringement behaviors of unauthorized acquisition of video resources is gradually increased. In order to prevent the video resources from being stolen, a content provider generally adds watermark information invisible to naked eyes into the video content, then extracts the watermark by a certain technical method, and when the video is illegally infringed, the pirated user is tracked by the extracted watermark information to perform the overtaking.
Currently, video watermarking is added in the industry, generally, video key frames are extracted, and transparent watermarking information is added to the space domain or the frequency domain of the key frames; whether the processing is performed on the space domain image or the conversion is performed on the frequency domain, certain time is lost, so that in order to ensure the smoothness of the video, certain buffering is generally performed on the content, and the watermark is superimposed and then the video image is rendered. For example, the current implementation of adding video watermarks through a set top box is implemented by adopting a chip and a Digital Rights Management (DRM) manufacturer, wherein the DRM manufacturer is responsible for producing watermark information, and the chip of the set top box is superimposed into an image when the image is rendered.
However, the main drawback of this approach is that the watermark must be a special chip that supports the watermark, and the chip is authenticated by the DRM manufacturer and pays the authentication license fee to the DRM manufacturer, which not only increases the cost, but also does not provide the watermark function on the existing set-top box.
Disclosure of Invention
In order to solve the existing technical problems, the embodiment of the invention provides a video watermark adding method and device, a video watermark extracting method and device, a video playing end and a computer storage medium, wherein the video watermark adding method and device are lower in cost and wider in adaptability.
In order to achieve the above object, the technical solution of the embodiment of the present invention is as follows:
a video watermarking method comprising: obtaining watermark information; and generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played.
The generating the watermark transparent picture carrying the watermark information according to the watermark information comprises the following steps: generating watermark text from the watermark information, and generating watermark pictures from the watermark text; dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule to obtain watermark transparent pictures carrying the watermark information.
After the pixel point information corresponding to the watermark picture block is respectively embedded into the corresponding transparent picture according to the setting rule, the method further comprises the following steps: and generating a numbered picture carrying the numbered information, and embedding the numbered picture into a designated position of the watermark transparent picture where the corresponding watermark picture block is positioned.
The generating the numbered pictures carrying the numbered information comprises the following steps: acquiring a set number of text symbols, and generating corresponding numbered pictures from the text symbols; the text symbols are used for respectively representing the numbers of the target watermark picture blocks.
The step of dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule, wherein the step of dividing the watermark picture into a plurality of watermark picture blocks comprises the following steps: dividing the watermark picture into a plurality of watermark picture blocks according to the display direction of fonts in the watermark picture and the setting sequence; wherein each watermark picture block comprises a first number of pixels; dividing each transparent picture to be embedded with the watermark into the first number of areas, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into designated positions in the areas corresponding to the transparent pictures, wherein the number of the transparent pictures is equal to that of the watermark picture blocks.
Wherein after generating the watermark transparent picture carrying the watermark information according to the watermark information, the method further comprises: after the video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into video playing pictures in a set time period; wherein the set time period is at least one of the following: a time period of fixed duration, a time period of regular variation being set.
A video watermark extraction method comprising: extracting a target video frame mixed with a watermark transparent picture in a video playing picture; and obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
The extracting the target video frame mixed with the watermark transparent picture in the video playing picture comprises the following steps: extracting a video frame in a video playing picture, calculating pixel points at a designated position of the video frame, and determining a numbered picture to be checked; when the number picture to be checked contains set number information, taking a video frame corresponding to the number picture to be checked as a starting video frame, and sequentially determining target video frames according to the starting video frame and with a set time period as an interval.
The obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame comprises the following steps: respectively acquiring pixel point information of watermark picture blocks carried in watermark transparent pictures corresponding to the target video frames according to the pixel point information in the target video frames; and splicing the watermark picture blocks according to the numbering information and the set time period, and determining watermark information according to the spliced watermark picture blocks.
A video watermarking apparatus comprising: the watermark generation module is used for acquiring watermark information; the watermark embedding module is used for generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played.
A video watermark extraction apparatus comprising: the watermark positioning module is used for extracting target video frames mixed with watermark transparent pictures in video playing pictures; and the watermark decoding module is used for obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
A video playback end comprising a processor and a memory for storing a computer program capable of running on the processor; the processor is configured to execute the video watermark adding method according to any embodiment of the present invention or execute the video watermark extracting method according to any embodiment of the present invention when running the computer program.
A computer storage medium having a computer program stored therein, the computer program when executed by a processor implementing a video watermark adding method according to any of the embodiments of the present invention, or the computer program when executed by a processor implementing a video watermark extracting method according to any of the embodiments of the present invention.
The video watermarking method and device, the video playing end and the computer storage medium provided by the embodiment, wherein the video watermarking method comprises the steps of obtaining watermarking information, generating a watermarking transparent picture carrying the watermarking information according to the watermarking information, wherein the watermarking transparent picture is used for being mixed into a video playing picture during video playing, and therefore, the watermarking information is carried in the watermarking transparent picture and the watermarking transparent picture is mixed into the video playing picture during video playing, a layer formed by the watermarking transparent picture is transparent, playing of the video layer is not affected, dynamic obtaining of the watermarking information can be achieved, the watermarking transparent picture carrying the watermarking information is formed and is mixed into the video playing picture during video playing, a special chip is not required to modify the picture to add the watermarking during the video playing process through rendering of an original video frame picture, and therefore cost is lower, and any video playing end can be used.
The video watermark extraction method and device, the video playing end and the computer storage medium provided by the embodiment, wherein the video watermark extraction method comprises the steps of extracting target video frames mixed with watermark transparent pictures in video playing pictures; according to the pixel point information in the target video frame, watermark information carried by the corresponding watermark transparent picture is obtained, and therefore the watermark information is carried in the watermark transparent picture and is mixed into a video playing picture in the video playing process, a picture layer formed by the watermark transparent picture is transparent, so that playing of the video picture layer is not affected, the target video frame mixed with the watermark transparent picture is extracted, and inverse operation is carried out according to the watermark information adding mode through the pixel point information of the target video frame, the watermark information can be restored, and whether the playing video is illegal or not can be intuitively identified.
Drawings
Fig. 1 is a block diagram of an operation system of a video watermarking method according to an embodiment of the present invention;
fig. 2 is a block diagram of an operation system of the video watermarking method according to another embodiment of the present invention;
fig. 3 is a block diagram of an operation system of the video watermarking method according to still another embodiment of the present invention;
Fig. 4 is a block diagram of an operation system of the video watermarking method according to still another embodiment of the present invention;
FIG. 5 is a flowchart of a method for video watermarking according to an embodiment of the present invention;
FIG. 6 is an exemplary diagram of a watermark picture in accordance with one embodiment of the present invention;
FIG. 7 is a diagram of numbered pictures according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a transparent print of an embodiment of the present invention;
fig. 9 is a flowchart of a method for adding a video watermark in another embodiment of the invention;
FIG. 10 is a flowchart of a method for extracting a video watermark according to an embodiment of the invention;
FIG. 11 is a flowchart of a method for extracting a video watermark according to another embodiment of the invention;
FIG. 12 is a flowchart of a method for extracting a video watermark according to still another embodiment of the invention;
fig. 13 is a schematic structural diagram of an apparatus for adding a video watermark according to an embodiment of the invention;
fig. 14 is a schematic structural diagram of an apparatus for extracting a video watermark according to an embodiment of the invention;
fig. 15 is a schematic structural diagram of a video playing end according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further elaborated below by referring to the drawings in the specification and the specific embodiments. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
As shown in fig. 1, in one embodiment, an architecture diagram of an application scenario of a video watermarking method provided by the embodiment of the present invention is provided, where the architecture includes a video playing end 100 and a satellite receiving end 200, and the video playing end 100 includes a set-top box, such as an IPTV set-top box 101 and a television set 102 connected to the set-top box. The satellite receiving end 200 receives the signals from the satellite, performs video compression processing, and then streams the compressed messages through IP to become IP messages, and transmits the IP messages to the IPTV set-top box 101 through the IP network, where the IPTV set-top box 101 converts the transmitted IPTV signals into standard video signals for display by the video camera 102. The computer program for realizing the video watermarking method is deployed in the IPTV set top box 101, the IPTV set top box 101 acquires watermark information, generates a watermark transparent picture carrying the watermark information according to the watermark information, and mixes the watermark transparent picture into a video playing picture when video playing is carried out through the television 102, so as to realize watermarking of the played video playing picture.
As shown in fig. 2, an architecture diagram of an application scenario provided by another embodiment of the present invention using a video watermarking method provided by the embodiment of the present invention includes a video playing end 100 and a multimedia server 300, where the video playing end 100 includes a set-top box, such as an OTT set-top box 103 and a television 102 connected to the set-top box. The OTT set-top box 103 receives the television signal from the multimedia server 300 through the network, for example, the television service provider can transcribe the television program into video to be stored on the multimedia server 300, when the OTT set-top box 103 accesses the television content, the multimedia server 300 transmits the video data to the OTT set-top box 103 through the network, and the OTT set-top box 103 transmits the video data to the television 102 for playing through decoding into the audio signal. The computer program for realizing the video watermarking method is deployed in the OTT set top box 103, the OTT set top box 103 acquires watermark information, generates a watermark transparent picture carrying the watermark information according to the watermark information, and mixes the watermark transparent picture into a video playing picture when video playing is carried out through the television 102, so that watermarking of the played video playing picture is realized.
As shown in fig. 3, an architecture diagram of an application scenario of a video watermarking method according to another embodiment of the present invention includes a video playing end 100 and a multimedia server 300, where the video playing end 100 includes a mobile phone terminal 104. When the mobile phone terminal 104 accesses the audio and video files in the multimedia server 300 through the network, the multimedia server 300 sends the audio and video data to the mobile phone terminal 104 through the network, and plays the audio and video data through the audio and video playing application of the mobile phone terminal 104. The computer program for realizing the video watermarking method is deployed in the mobile phone terminal 104, the mobile phone terminal 104 acquires watermark information, generates a watermark transparent picture carrying the watermark information according to the watermark information, and mixes the watermark transparent picture into a video playing picture when the video is played through the mobile phone terminal 104, so as to realize watermarking of the played video playing picture.
As shown in fig. 4, an architecture diagram of an application scenario provided by another embodiment of the present invention, where the architecture includes a video playing end 100 and a multimedia server 300, and the video playing end 100 includes a PC terminal 105. When the PC terminal 105 accesses the audio and video files in the multimedia server 300 through the network, the multimedia server 300 transmits the audio and video data to the PC terminal 105 through the network, and plays the audio and video data through the audio and video playing application of the PC terminal 105. The computer program for realizing the video watermarking method is deployed in the PC terminal 105, the PC terminal 105 acquires watermark information, generates a watermark transparent picture carrying the watermark information according to the watermark information, and mixes the watermark transparent picture into a video playing picture when video playing is carried out through the PC terminal 105, so that watermarking of the played video playing picture is realized.
It should be noted that, the architecture of the application scenario of the video watermarking method according to the embodiment of the present invention is not limited to the above embodiment, and the video playing end may also be other terminals that may be used to directly play audio and video files, such as a tablet computer, a palm computer, etc.; or a conversion device connected to a terminal for directly playing audio and video files, such as a different type of set-top box. In the video watermark extraction method provided in another aspect of the embodiment of the present invention, the architecture of the application scenario may be the same as the architecture of the application scenario of the video watermark adding method, which is not described herein again.
Referring to fig. 5, a flowchart of a video watermarking method according to an embodiment of the present invention may be applied to a video playing end as shown in fig. 1 to 4, where the video watermarking method includes the following steps:
step 101, obtaining watermark information;
step 103, generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played.
Watermark information here refers to information related to the identity of the device and/or user that can be used to determine the playing of the video file, e.g. the watermark information comprises at least one of the following: media access device MAC information, user identification, router identification, and play application identification. The watermark transparent picture refers to a transparent picture with a set size embedded with the watermark information, the pixel point of the transparent picture has a value of #000000, and the set size can be 640x480. Generating the watermark transparent picture carrying the watermark information according to the watermark information may refer to embedding the watermark information into the transparent picture, and specifically includes: converting the text corresponding to the watermark information into a watermark picture, and embedding pixel points in the watermark picture into the transparent picture, thereby obtaining the watermark transparent picture carrying the watermark information.
In the embodiment of the invention, the watermark information is acquired, the watermark transparent picture carrying the watermark information is generated according to the watermark information, and the watermark transparent picture is used for being mixed into a video playing picture when the video is played, so that the watermark information is carried in the watermark transparent picture and the watermark transparent picture is mixed into the video playing picture in the video playing process, the picture layer formed by the watermark transparent picture is transparent, thus the playing of the video picture layer is not influenced, the watermark information can be dynamically acquired to form the watermark transparent picture carrying the watermark information and be mixed into the video playing picture when the video is played, the hidden watermark information is added to the video in playing, the special chip is not required to modify the picture to add the watermark when the original video frame picture is rendered, the cost is lower, any video playing end can be used, and the applicability is wider.
In one embodiment, the generating the watermark transparent picture carrying the watermark information according to the watermark information includes:
generating watermark text from the watermark information, and generating watermark pictures from the watermark text;
Dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule to obtain watermark transparent pictures carrying the watermark information.
The watermark text may be generated by acquiring information such as equipment MAC, user account, office point, etc. from the set-top box and generating the watermark text according to the information. The watermark picture refers to a picture with a fixed size, wherein the background color is a preset pixel value, such as a watermark picture with a background color of #000000 and a picture size of 180x 20. Fig. 6 is a schematic diagram of a watermark picture generated according to watermark information according to an embodiment of the invention. Dividing the watermark picture into a plurality of watermark picture blocks, respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule to obtain watermark transparent pictures carrying the watermark information, wherein the setting rule can be different in the way of embedding each watermark picture block into the corresponding transparent pictures, such as embedding the watermark picture block into a certain setting area in the corresponding transparent pictures as a whole, sequentially embedding the pixel points in the watermark picture blocks into a plurality of setting areas in the corresponding transparent pictures, and the like.
The watermark picture is divided into a plurality of watermark picture blocks, and the watermark picture can be divided by taking a set number of pixel points as dividing units according to the display direction of characters contained in the watermark picture. If the text is horizontally displayed from left to right, the text can be divided by taking the pixel points with the set number as the dividing units according to the sequence from top to bottom and from left to right. The number of pixel information included in each watermark picture block can be adjusted according to actual needs, for example, the watermark picture shown in fig. 6 is taken as an example, the size of the watermark picture is 180x20, k pixels are taken as a dividing unit for dividing, and then 3600/k watermark picture blocks can be obtained. The number of the watermark picture blocks is the same as that of the transparent pictures, the watermark picture is divided into a plurality of watermark picture blocks, and the watermark picture blocks are respectively embedded into different transparent pictures correspondingly, so that the watermark transparent pictures which respectively carry watermark information are obtained correspondingly.
In the above embodiment of the present invention, by generating the watermark picture according to the watermark information, dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding the watermark picture blocks into the corresponding transparent pictures, the watermark transparent picture layer carrying the watermark information can be made to be entirely nearly transparent by embedding the watermark information into the transparent pictures in the form of a plurality of watermark picture blocks, so as to avoid the influence on the video picture layer when the watermark transparent picture carrying the watermark information is mixed with the video play picture, for example, the number of pixel point information included in each watermark picture block can be set, and/or the rule of embedding each watermark picture block into the corresponding transparent picture can be set, so as to adjust the overall transparent characteristic of the watermark transparent picture carrying the watermark information, and avoid the influence on the video picture layer when the watermark transparent picture carrying the watermark information is mixed with the video play picture.
In one embodiment, after the pixel point information corresponding to the watermark picture block is respectively embedded into the corresponding transparent picture according to the setting rule, the method further includes:
and generating a numbered picture carrying the numbered information, and embedding the numbered picture into a designated position of the watermark transparent picture where the corresponding watermark picture block is positioned.
Here, the number information refers to related information that can be used to determine a relative positional relationship of the watermark picture blocks, for example, a set text symbol may be used to represent a position in an overall watermark picture of the watermark picture blocks carried in the watermark transparent picture at the specified position; or a plurality of text symbols are adopted to represent the positions of watermark picture blocks carried in watermark transparent pictures at different designated positions in the whole watermark picture respectively. The number information carrying number pictures are embedded into the appointed position of the watermark transparent picture where the corresponding watermark picture block is located, so that the number information carrying watermark transparent picture where the corresponding watermark picture block is located can be superimposed, and the position of the watermark picture block carried in the watermark transparent picture in the whole watermark picture can be respectively determined through identifying the number information.
The generating the numbered pictures carrying the numbered information comprises the following steps:
acquiring a set number of text symbols, and generating corresponding numbered pictures from the text symbols; the text symbols are used for respectively representing the numbers of the target watermark picture blocks.
Here, the number information includes a set number of text symbols, such as "+" - "|" and the like, and different text symbols respectively correspond to numbers of different target watermark picture blocks. And generating corresponding numbered pictures from the text symbols, and embedding the numbered pictures into the appointed positions of the watermark transparent pictures where the corresponding watermark picture blocks are positioned, so as to realize the identification of the corresponding watermark picture blocks in the watermark transparent pictures. Here, the rule of embedding the numbered pictures into the watermark transparent pictures may be similar to the rule of embedding the watermark picture blocks into the transparent pictures, such as embedding the numbered pictures as a whole into a certain set area in the corresponding watermark transparent pictures, embedding the pixels in the numbered pictures into a plurality of set areas in the corresponding watermark transparent pictures in sequence, and so on. The region in which the numbered picture is embedded into the watermark transparent picture and the region in which the watermark picture block is embedded into the transparent picture are arranged in a staggered manner, so that in order to improve the recognition efficiency, the pixel points included in the numbered picture can be sequentially embedded into the setting row of the watermark transparent picture. As shown in fig. 7, a schematic diagram of numbered pictures respectively including text symbols of "+" - "|" provided by an embodiment of the present invention, where the size of a numbered picture corresponding to the text symbol "+" -is 4x7, and 11 pixels in the corresponding numbered picture are bright spots; the size of the numbered picture corresponding to the text symbol "-" is 5x7, and 2 pixels in the corresponding numbered picture are bright spots; the size of the numbered picture corresponding to the text symbol "|" is 4x7, and 11 pixels in the corresponding numbered picture are highlights. As shown in fig. 8, schematic diagrams of the positions of the pixel points 805 included in the numbered pictures in the portion where the rows are arranged are sequentially embedded in the corresponding watermark transparent pictures, the size of the watermark transparent pictures is 640x480, the watermark transparent pictures are fixed in the 110 th, 120 th, 350 th and 470 th rows of the watermark transparent pictures with the origin as the starting point, and fig. 8 shows a partial example of the pixel points 805 included in the numbered pictures embedded in the 120 th row, and the pixel points 805 of the numbered pictures are mixed every 16 pixel points.
In one embodiment, the dividing the watermark picture into a plurality of watermark picture blocks, and embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule, includes:
dividing the watermark picture into a plurality of watermark picture blocks according to the display direction of fonts in the watermark picture and the setting sequence; wherein each watermark picture block comprises a first number of pixels;
dividing each transparent picture to be embedded with the watermark into the first number of areas, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into designated positions in the areas corresponding to the transparent pictures, wherein the number of the transparent pictures is equal to that of the watermark picture blocks.
Here, the setting sequence is the same as the display direction of the fonts, if the display direction of the fonts is from left to right, the setting sequence is from top to bottom and from left to right; the font display aspect is from top to bottom, and the setting order is from left to right and from top to bottom. Dividing the watermark picture into a plurality of watermark picture blocks, determining the number of areas in the transparent picture according to the number of the watermark picture blocks, and mixing pixel points contained in the watermark picture blocks into designated positions in the corresponding areas in a one-to-one correspondence manner respectively so as to regularly and uniformly distribute the watermark picture blocks into the watermark transparent picture and realize hidden superposition of watermark picture block information into the watermark transparent picture. The rule of embedding the pixels of the watermark picture block may be as shown in the following formulas 1 to 3: r is R w =R s +R wp (formula 1), G w =G s +G wp (formula 2), B w =B s +B wp (equation 3) mixing the RGB channel values of the corresponding pixels one by one, wherein R w G w B w The RGB channel values of pixel points in the watermark transparent picture of the mixed watermark picture block; r is R s G s B s The RGB channel value of the pixel point in the transparent picture is fixed to be 0; r is R wp G wp B wp The RGB channel value of the pixel point in the watermark picture block. Please refer to fig. 8 again, in order to use the rulerFor example, each watermark picture block comprises 16 pixels, and the transparent picture 800 is divided into 16 regions 801, wherein each region 801 comprises 1 pixel of one watermark picture block, such as the 1 st pixel 803 embedded in the first region 801. It should be noted that, in the transparent picture 800 shown in fig. 8, a square indicates a pixel position, which is only schematically listed, and for ease of understanding and reducing the space, a part of the rows and columns indicated on the top and left sides of the figure have been omitted.
In one embodiment, after generating the watermark transparent picture carrying the watermark information according to the watermark information, the method further includes:
after the video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into video playing pictures in a set time period; wherein the set time period is at least one of the following: a time period of fixed duration, a time period of regular variation being set.
Here, sequentially mixing the watermark transparent pictures into the video playing picture in a set time period refers to a duration of time when the watermark transparent pictures are mixed into the video playing picture, where the duration of time may be a time period of a fixed duration, for example, 1 second is fixed when the watermark transparent pictures are mixed into the video playing picture; the duration may be a period of time that varies regularly, e.g., 1 second, 2 seconds, 3 seconds when mixing the watermark transparent picture to the video playback frame. By determining the set time period, other watermark transparent pictures are determined backwards and forwards respectively according to the time period by taking one watermark transparent picture as a reference position.
In order to further understand the implementation principle of the video watermarking method provided by the embodiment of the present invention, the following uses a video playing end as a set top box as an example, and describes a flow of the video watermarking method of the embodiment of the present invention, referring to fig. 9, where the method includes:
s11, acquiring equipment and user information; here, information such as equipment MAC, user account number, local point and the like can be obtained from the set top box, and watermark text is generated; for example, referring to fig. 6, the watermark text is: device mac_user account_market_operator code (watermark text example: DC4A3E48D37 f_zte123_99_10);
S12, generating watermark text information according to the equipment and user information and converting the watermark text information into watermark pictures; here, the watermark text may be converted according to a certain rule, for example, the watermark text is converted into a picture with a background color of #000000, the picture size is fixed to 180x20, the font size of the text is set to 12, the font color is set to an intermediate color of 0x888888, and the converted picture is shown in fig. 7;
s13, dividing the watermark picture into blocks; dividing the watermark picture into a plurality of watermark picture blocks; here, the division may be performed according to a certain rule according to a display direction of fonts in the picture, for example, the text is horizontally displayed from left to right, and the division may be performed by taking k pixel points as a unit according to a sequence from top to bottom and from left to right, so as to divide the text into 3600/k watermark picture blocks; taking k as 16, namely taking 16 pixel points as a unit as an example, the watermark picture can be divided into 225 watermark picture blocks, and as the background color is black, the pixel points which actually affect the subsequent superposition effect through measurement account for about 1/8 of the total pixel points of the watermark picture, and according to the above block division sequence, only 2 pixel points in each watermark picture block are on average bright points;
s14, acquiring an ith watermark picture block; here, the number of the watermark picture blocks is equal to the number of the transparent pictures, and each watermark picture block corresponds to the transparent picture;
S15, obtaining an ith transparent picture; here, the transparent pictures refer to transparent layers to be embedded with watermark information, the pixel values of the transparent pictures are #000000, the size is fixed to 640x480, each transparent picture is embedded with only the pixel of one watermark picture block, 225 watermark picture blocks are taken as an example, 225 transparent pictures are correspondingly obtained, wherein, as the transparent pictures are the pure black matrix pictures of #000000, the number of bright point pixels carried by 225 watermark transparent pictures is 2 on average;
s16, embedding the ith watermark picture block into a designated area in the corresponding ith transparent picture to form a watermark transparent picture; here, the transparent picture may be divided into the same number of regions according to the number of pixel points included in each watermark picture block, so that the pixel points of each watermark picture block are respectively embedded into the respective regions correspondingly. As shown in fig. 8, taking an example that each watermark picture block includes 16 pixels, the transparent picture 800 is divided into 16 regions 801, each region 801 is embedded in one pixel 803 in the watermark picture block, and a rule that each pixel 803 is embedded in a specified region may be: taking the origin of each region as a starting point, taking 8x8 as a sliding window according to the sequence from left to right from top to bottom, and multiplying the block number of the current watermark picture block, for example, the positions of 16 pixel points of the first watermark picture block in 640x480 transparent pictures are as follows:
Figure BDA0001797938680000121
By analogy, the positions in the transparent 640x480 picture of the 16 pixel points of the 225 th watermark picture block are as follows:
Figure BDA0001797938680000122
it should be noted that, in the transparent picture 800 shown in fig. 8, a square indicates a pixel position, and for convenience of understanding and reducing the space, part of rows and columns indicated on the top and left sides of the figure have been omitted, in the embodiment of the present invention, only one pixel of one watermark picture block is included in one area 801 of one transparent picture 800, and a plurality of pixels of one watermark picture block displayed in the square included in one area 801 in fig. 8 are for convenience of explaining the positions of pixels of watermark picture blocks with different numbers.
S17, acquiring a set number of text symbols, generating corresponding numbered pictures by the text symbols, and embedding the numbered pictures into the corresponding watermark transparent pictures; here, the number picture is embedded in the designated position of the watermark transparent picture according to a certain rule, and the manner of embedding the number picture in the watermark transparent picture may be the same as the manner of embedding the watermark picture block in the transparent picture, wherein the position of the pixel point of the number picture is different from the position of the pixel point of the watermark picture block. For embedding the watermark picture block into the corresponding transparent picture and embedding the numbered picture into the watermark transparent picture, the watermark transparent picture and the watermark transparent picture can be mixed in a one-to-one correspondence manner with the corresponding pixel point in the airspace; as shown in fig. 7, in order to identify which watermark picture block is carried in the current watermark transparent picture during the subsequent extraction, three text characters of "|", "+", "-" may be defined for marking numbers of the 1 st watermark picture block, the 75 th watermark picture block and the 150 th watermark picture block, the background color of the numbered pictures is #000000, the size is fixed to 10x16, the font size is set to 10, the font color is set to 0x888888 intermediate color to convert the picture format, and the test bright points of the converted numbered pictures are 11, 2 and 11 respectively.
The embedding positions of the numbered pictures are respectively at the designated positions in the 1 st watermark picture block, the 75 th watermark picture block and the 150 th watermark picture block, and the respective pixel points of the numbered pictures can be mixed and added sequentially in the order from left to right from top to bottom, for example, the 110 th, 230 th, 350 th and 470 th lines taking the transparent 640x480 watermark picture as an example and the origin as the starting point, and one pixel point of the numbered picture is mixed every 16 pixel points, please refer to fig. 8 again, and the example of the partial embedding positions of the pixel points 805 of the numbered picture is given. Here, steps S11 to S17 may be finished in advance and the watermark transparent pictures are buffered, where the size of each pure black picture of 640x480 is 976 bytes, and the size of 225 watermark transparent pictures carrying watermark picture blocks is within 225 k.
S18, obtaining an ith watermark transparent picture;
s19, acquiring j Zhang Shipin frames in each second;
s20, mixing the ith watermark transparent picture into a j Zhang Shipin frame within 1 second when the video is played. The video watermark is added by sequentially mixing the watermark transparent pictures to j Zhang Shipin frames within 1 second. In the video playing process, step S17 is pre-bufferedThe stored watermark transparent pictures are sequentially mixed into the video picture, and the mixing duration of each watermark transparent picture lasts for t seconds. The rule for mixing the watermark transparent picture into the video picture can be that the corresponding pixel points are mixed in a space domain in a one-to-one correspondence manner, and the formula is as follows: r is R d =R v +R w 、G d =G v +G w 、B d =B v +B w Mixing pixel points one by one, wherein R d G d B d RGB channel value, R of pixel point in video picture of transparent picture for mixed watermark v G v B v For the GRB channel value, R of the pixel point in the original video picture w G w B w The RGB channel value of the pixel point in the watermark transparent picture. Taking t as 1 second as an example, when playing video, sequentially and circularly mixing watermark transparent pictures carrying watermark information and video pictures in a region of 640x480 for pixel points based on a center point of the played video, wherein the mixing time duration of each transparent picture lasts for 1 second, watermark transparent pictures carrying numbered pictures are respectively (n x 75+1) seconds in sequence, wherein n is a natural number, such as 1 st second, 76 th second, 151 th second, 226 th second and the like.
According to the video watermarking method provided by the embodiment of the invention, watermark pictures are added into transparent pictures to form a group of transparent watermark pictures carrying airspace watermark information and watermark position information at designated pixel points, and the watermark transparent pictures are dynamically and circularly rendered into video pictures in the video playing process, so that hidden watermark information is dynamically added into video; and the watermark picture blocks are divided by the watermark picture, so that the safety and the robustness of watermark information are enhanced. Compared with the traditional technology of completing watermark adding through a specific chip, the video watermark adding method in the embodiment of the invention has the characteristics of high speed, real time, high visibility, better safety and robustness.
Referring to fig. 10, a flowchart of a video watermark extraction method according to an embodiment of the invention is provided, where the method includes:
step 201, extracting a target video frame mixed with a watermark transparent picture in a video playing picture;
and 203, obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
Here, the video play screen refers to a play screen by recording video. For recorded video, watermark information is added in real time in a mode of mixing watermark transparent pictures in the video playing process, and the target video frame mixed with the watermark transparent pictures in the video playing picture is extracted, so that pixel points of the watermark information can be calculated according to the pixel point information in the target video frame, and the watermark information carried by the corresponding watermark transparent pictures is obtained.
According to the video watermark extraction method provided by the embodiment of the invention, the watermark transparent picture and the video playing picture are based on picture mixing to realize real-time watermark information addition in the video playing process, so that the watermark information can be extracted according to the reverse process of watermark information addition for the recorded video, and whether and which user infringe can be identified according to the extracted watermark information, thereby realizing the protection of the video watermark. In this way, the watermark information is carried in the watermark transparent picture and the watermark transparent picture is mixed into the video playing picture in the video playing process, the picture layer formed by the watermark transparent picture is transparent, so that the playing of the video picture layer is not affected, the watermark information can be restored by extracting the target video frame mixed with the watermark transparent picture and performing inverse operation according to the pixel point information of the target video frame and the adding mode of the watermark information, and thus whether the playing video is illegal or not can be intuitively identified. The whole process of the video watermark extraction method is convenient to extract according to the inverse operation of watermark addition, can be rapidly completed through software, does not need the support of a special chip and a DRM manufacturer, and therefore has lower cost and wider adaptability.
In one embodiment, referring to fig. 11, the extracting the target video frame mixed with the watermark transparent picture in the video playing frame includes:
step 2011, extracting a video frame in a video playing picture, calculating pixel points of a designated position of the video frame, and determining a numbered picture to be checked;
step 2012, when the number picture to be checked contains the set number information, the video frame corresponding to the number picture to be checked is used as a starting video frame, and the target video frames are sequentially determined according to the starting video frame and with the set time period as an interval.
Here, the set time period refers to a duration of mixing each watermark transparent picture when mixing the watermark transparent picture to the video play picture in the video play process. By setting the number information, the target video frame carrying the watermark transparent picture can be conveniently and rapidly positioned. The method comprises the steps of determining a target video frame mixed with watermark transparent pictures by extracting video frames, determining the video frames carrying the numbered pictures, determining watermark information carried in the video frames according to the numbered information in the numbered pictures, determining video frames corresponding to other watermark transparent pictures carrying watermark information as the target video frames according to the reverse process of the time period from mixing the watermark transparent pictures carrying the watermark information to the setting of a playing video picture, adding appointed numbered information to identify the corresponding watermark information when the watermark information is added in video playing, determining the watermark transparent pictures carrying the numbered information in the extracting process of the watermark information, and further determining the positions of other watermark transparent pictures based on the positions of the watermark transparent pictures carrying the numbered information, so that the efficiency of determining the target video frames can be improved, and the efficiency of extracting the watermark information in the video is improved.
The obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame comprises the following steps:
step 2021, according to the pixel point information in the target video frame, respectively obtaining the pixel point information of a watermark picture block carried in a watermark transparent picture corresponding to the target video frame;
and step 2022, splicing the watermark picture blocks according to the number information and the set time period, and determining watermark information according to the spliced watermark picture blocks.
Here, according to the pixel point information in the target video frame, the pixel point information of the watermark picture block carried in the watermark transparent picture corresponding to the target video frame may be determined according to the inverse process of adding the watermark picture block to the watermark transparent picture and mixing the watermark transparent picture to the target video frame, that is, when the watermark picture block is added to the video frame by adding the pixel point of the watermark picture block to the pixel point value of the corresponding position in the video frame, extracting the pixel point information of the watermark picture block is correspondingly determined by subtracting the pixel point value of the corresponding position of the target video frame in the video recording video from the pixel point value of the corresponding position of the original video frame. Here, splicing watermark picture blocks according to the number information and the set time period refers to reversely and sequentially determining the sequence of other watermark picture blocks according to the rule of the duration of mixing the watermark picture blocks and the video playing picture based on the position of the watermark picture block corresponding to the number information as a reference position when the number picture is added to the video playing picture, so that watermark pictures can be sequentially spliced.
In the embodiment of the invention, since the watermark information is added to the video playing picture in real time in the video playing process, the watermark information is formed by dividing the watermark picture into a plurality of watermark picture blocks, each watermark picture block is added to the corresponding transparent picture to obtain the watermark transparent picture, and the watermark transparent picture is mixed to the video playing picture to realize the real-time addition of the watermark information, the watermark information is extracted based on the video recording, and the watermark picture blocks corresponding to each target video frame and the sequence among the watermark picture blocks can be determined according to the number information and the set time period in the process of restoring the watermark information according to the determined target video frame of the watermark transparent picture carrying the watermark information, so that the watermark picture is spliced and restored to intuitively identify whether the playing video is illegal or not.
In order to further understand the implementation principle of the video watermark extraction method provided by the embodiment of the present invention, taking a video playing picture as a video playing picture of a recorded video as an example, a flow of the video watermark extraction method in the embodiment of the present invention is described, where the video watermark extraction method may be applicable to a terminal device capable of running a computer program, referring to fig. 12, and the method includes:
Step S21, when extracting watermark from video recording, extracting and scanning pixel points at set positions in video frames according to the adding rule of numbered pictures
Step S22, judging whether the extracted number information is set number information or not according to the pixel points;
here, the adding rule of the numbered picture refers to an adding rule when adding the numbered picture carrying the set text symbol to the watermark transparent picture in the process of adding the watermark information to the video playing picture when the video is played. By adding the numbered pictures to the adding positions of the watermark transparent pictures, the video frames corresponding to the watermark transparent pictures carrying watermark information can be more rapidly identified. Wherein, the pixel point of the setting position of the scanning video picture can be according to the formula: r is R w =R s +R wp 、R d =R v +R w 、G w =G s +G wp 、G d =G v +G w 、B w =B s +B wp 、B d =B v +B w Calculating pixel point RGB channel value R in numbered pictures wp G wp B wp The method comprises the steps of carrying out a first treatment on the surface of the According to the calculated R wp G wp B wp And the values are spliced into pictures and then converted into a text format, and whether the extracted text characters are set text characters, such as "|", "-", and "+", that is, whether the current video picture contains watermark picture blocks at set positions, such as 1 st watermark picture block, 75 th watermark picture block or 150 th watermark picture block, is judged.
If the extracted number information is non-set number information, returning to the execution step S21; if the extracted number information is the set number information, executing step S23;
step S23, a video frame carrying the set numbering information is taken as an initial video frame, a target video frame carrying watermark picture blocks is determined by sequentially delaying the set time period, and the watermark picture blocks carried by the target video frame are determined; if, during video playing, the duration of each watermark transparent picture mixed to the video playing picture is 1 second, after the initial video frame carrying the set number information is determined, sequentially delaying for 1 second to determine that the subsequent video frame is the target video frame carrying the watermark picture block and the sequence of the corresponding watermark picture block, so as to extract the remaining watermark picture blocks.
And step S24, sequentially splicing the watermark picture blocks to obtain spliced watermark pictures, and further determining watermark information. Taking 225 watermark picture blocks as an example, sequentially arranging the extracted watermark picture blocks, and restoring the watermark picture to obtain watermark information.
According to the video watermark extraction method provided by the embodiment of the invention, the target video frame mixed with the watermark transparent picture in the video playing picture is extracted; according to the pixel point information in the target video frame, watermark information carried by the corresponding watermark transparent picture is obtained, and therefore the watermark information is carried in the watermark transparent picture and is mixed into a video playing picture in the video playing process, a picture layer formed by the watermark transparent picture is transparent, so that playing of the video picture layer is not affected, the target video frame mixed with the watermark transparent picture is extracted, and inverse operation is carried out according to the watermark information adding mode through the pixel point information of the target video frame, the watermark information can be quickly restored, and whether the playing video is illegal or not can be intuitively identified. The method comprises the steps of providing the step of adding the appointed number information in the process of adding the watermark information, so that when the watermark information is extracted, after the appointed number information is found, all video frames carrying watermark picture blocks can be found out quickly in sequence based on the number information and rules when watermark transparent pictures are mixed with video pictures, and the extraction efficiency is improved.
In one embodiment, a video watermarking apparatus is provided, referring to fig. 13, which includes a watermark generation module 11 and a watermark embedding module 13. A watermark generation module 11, configured to obtain watermark information; the watermark information includes at least one of: media access device (MAC) information, user identification, router identification and play application identification; the watermark embedding module 13 is configured to generate a watermark transparent picture carrying the watermark information according to the watermark information, where the watermark transparent picture is used to be mixed into a video playing picture during video playing.
The watermark embedding module 13 is specifically configured to generate watermark text from the watermark information, and generate watermark pictures from the watermark text; dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule to obtain watermark transparent pictures carrying the watermark information.
The video watermarking device further comprises a numbering embedding module 15, wherein the numbering embedding module is used for generating numbering pictures carrying numbering information, and embedding the numbering pictures into the appointed positions of the watermark transparent pictures where the corresponding watermark picture blocks are located.
The number embedding module 15 generates a number picture carrying number information, including: acquiring a set number of text symbols, and generating corresponding numbered pictures from the text symbols; the text symbols are used for respectively representing the numbers of the target watermark picture blocks.
The watermark embedding module 13 is specifically configured to divide the watermark picture into a plurality of watermark picture blocks according to a setting sequence according to a display direction of fonts in the watermark picture; wherein each watermark picture block comprises a first number of pixels; dividing each transparent picture to be embedded with the watermark into the first number of areas, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into designated positions in the areas corresponding to the transparent pictures, wherein the number of the transparent pictures is equal to that of the watermark picture blocks.
The video watermarking device further comprises a watermarking mixing module 17, wherein the watermarking mixing module 17 is used for sequentially mixing the watermarking transparent pictures into video playing pictures in a set time period after the watermarking mixing module 17 determines that video playing instructions are received; wherein the set time period is at least one of the following: a time period of fixed duration, a time period of regular variation being set.
In the video watermarking apparatus provided in the above embodiment, only the division of each program module is used for illustration, and in practical application, the step allocation may be performed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules to complete all or part of the processing described above. In addition, the video watermarking apparatus provided in the above embodiment and the video watermarking method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
In one embodiment, a video watermark extraction apparatus is also provided, referring to fig. 14, which includes a watermark locating module 21 and a watermark decoding module 23. The watermark positioning module 21 is configured to extract a target video frame mixed with a watermark transparent picture in a video playing picture; the watermark decoding module 23 is configured to obtain watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
The watermark positioning module 21 is specifically configured to extract a video frame in a video playing frame, calculate a pixel point at a specified position of the video frame, and determine a numbered picture to be checked; when the number picture to be checked contains set number information, taking a video frame corresponding to the number picture to be checked as a starting video frame, and sequentially determining target video frames according to the starting video frame and with a set time period as an interval.
The watermark decoding module 23 is specifically configured to respectively obtain pixel point information of watermark picture blocks carried in watermark transparent pictures corresponding to the target video frames according to the pixel point information in the target video frames; and splicing the watermark picture blocks according to the numbering information and the set time period, and determining watermark information according to the spliced watermark picture blocks.
In the video watermark extraction apparatus provided in the above embodiment, only the division of each program module is used for illustration, and in practical application, the step allocation may be performed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules, so as to complete all or part of the processing described above. In addition, the video watermark extraction apparatus provided in the above embodiment and the video watermark extraction method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
The embodiment of the present invention further provides a video playing end, referring to fig. 15, where the video playing end includes a processor 201 and a memory 203 for storing a computer program running on the processor 201, where the processor 201 is configured to execute the steps of the video watermarking method provided by any embodiment of the present invention when running the computer program; or, executing the steps of the video watermark extraction method provided by any embodiment of the invention. Here, the processor 201 and the memory 203 do not refer to the corresponding number as one, but may be one or more.
In one embodiment, the video playing end is an IPTV set-top box, an OTT set-top box, or a DVB set-top box. The IPTV set-top box, OTT set-top box or DVB set-top box comprises a memory 203 for the above and a processor 201. Program modules corresponding to the computer program of the video watermarking method comprise a watermark generation module, a watermark embedding module, a serial number embedding module and a watermark mixing module. The watermark generation module acquires watermark information comprising equipment MAC, user account numbers, local points and the like from the IPTV set top box, generates watermark text according to a preset format, and converts the watermark text into watermark pictures with fixed sizes; the watermark embedding module is used for dividing the watermark picture into a plurality of watermark picture blocks according to a preset rule, respectively embedding pixel points of each watermark picture block into designated positions of corresponding transparent pictures according to the preset rule, and generating watermark transparent pictures, wherein each watermark transparent picture correspondingly comprises pixel point information of one watermark picture block; the serial number embedding module is used for selecting at least one text symbol to represent the serial number of the appointed watermark picture block, converting the text symbol into serial number pictures according to a preset rule, and embedding the serial number pictures into watermark transparent pictures carrying the corresponding watermark picture blocks according to the preset rule; and the watermark mixing module sequentially mixes pixel points of the watermark transparent pictures into video playing pictures in the process of video playing through the television, and the duration of continuous setting is kept when each watermark transparent picture is mixed into the corresponding video playing picture, so that the transparent watermark information is added in real time.
In one embodiment, the video playing end includes a mobile phone terminal or a PC terminal, which includes a memory 201 and a processor 201 for the above. The program modules corresponding to the computer program for realizing the video watermarking method comprise a watermarking generating module, a watermarking embedding module, a numbering embedding module and a watermarking mixing module. The watermark generation module acquires watermark information comprising equipment MAC, user account numbers, local points and the like from the IPTV set top box, generates watermark text according to a preset format, and converts the watermark text into watermark pictures with fixed sizes; the watermark embedding module is used for dividing the watermark picture into a plurality of watermark picture blocks according to a preset rule, respectively embedding pixel points of each watermark picture block into designated positions of corresponding transparent pictures according to the preset rule, and generating watermark transparent pictures, wherein each watermark transparent picture correspondingly comprises pixel point information of one watermark picture block; the serial number embedding module is used for selecting at least one text symbol to represent the serial number of the appointed watermark picture block, converting the text symbol into serial number pictures according to a preset rule, and embedding the serial number pictures into watermark transparent pictures carrying the corresponding watermark picture blocks according to the preset rule; and the watermark mixing module sequentially mixes pixel points of the watermark transparent pictures into video playing pictures in the process of correspondingly playing the video by the mobile phone terminal or the PC terminal, and continuously sets the time length when each watermark transparent picture is mixed into the corresponding video playing picture, so that the transparent watermark information is added in real time.
In one embodiment, the video playing end is another computer device including the memory 201 and the processor 201, and the program modules corresponding to the computer program implementing the video watermark extraction method include a watermark locating module and a watermark decoding module. The watermark positioning module is used for carrying out inverse operation on pixel points of a setting position of a video frame, calculating a pixel point difference value, determining a numbered picture to be checked according to the pixel point difference value, converting the numbered picture into a text format, judging whether the numbered picture is designated number information or not, circularly detecting until the designated number information is found, and sequentially finding other video frames carrying watermark picture block information according to a fixed time length after the designated number information is found; the watermark decoding module is used for finding the positions of pixels to be extracted in each video frame carrying watermark picture blocks according to the number and position calculation rules of the corresponding watermark picture blocks for the video frame carrying watermark picture blocks, performing inverse operation, calculating pixel difference values of each watermark picture block, splicing the watermark picture blocks according to the known rules in sequence, and accordingly restoring the watermark picture, and extracting watermark information in recorded video.
The embodiment of the invention also provides a computer storage medium, for example, comprising a memory storing a computer program, the computer program being executable by a processor to perform the steps of the video watermarking method provided by any embodiment of the invention; or, executing the steps of the video watermark extraction method provided by any embodiment of the invention. The computer storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. The scope of the invention is to be determined by the appended claims.

Claims (10)

1. A method of video watermarking comprising:
obtaining watermark information;
generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played;
The generating the watermark transparent picture carrying the watermark information according to the watermark information comprises the following steps:
generating watermark text from the watermark information, and generating watermark pictures from the watermark text;
dividing the watermark picture into a plurality of watermark picture blocks, respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule, generating numbered pictures carrying the numbered information, and embedding the numbered pictures into the appointed positions of the watermark transparent pictures where the corresponding watermark picture blocks are positioned to obtain the watermark transparent pictures carrying the watermark information.
2. The video watermarking method according to claim 1, wherein the generating a numbered picture carrying numbering information comprises:
acquiring a set number of text symbols, and generating corresponding numbered pictures according to the text symbols; the text symbols are used to characterize the numbering of the target watermark picture blocks.
3. The video watermarking method according to claim 1, wherein dividing the watermark picture into a plurality of watermark picture blocks, and embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule, respectively, includes:
Dividing the watermark picture into a plurality of watermark picture blocks according to the display direction of fonts in the watermark picture and the setting sequence; wherein each watermark picture block comprises a first number of pixels;
dividing each transparent picture to be embedded with the watermark into the first number of areas, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into designated positions in the areas corresponding to the transparent pictures, wherein the number of the transparent pictures is equal to that of the watermark picture blocks.
4. The video watermarking method according to claim 1, wherein after generating a watermark transparent picture carrying the watermark information according to the watermark information, further comprising:
after the video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into video playing pictures in a set time period; wherein the set time period is at least one of the following: a time period of fixed duration, a time period of regular variation being set.
5. A method for extracting a video watermark, comprising:
extracting a target video frame mixed with a watermark transparent picture in a video playing picture;
Obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame;
the obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame comprises the following steps:
respectively acquiring pixel point information of watermark picture blocks carried in watermark transparent pictures corresponding to the target video frames according to the pixel point information in the target video frames;
and splicing the watermark picture blocks according to the number information carried in the watermark transparent picture and the set time period, and determining watermark information according to the spliced watermark picture blocks.
6. The method for extracting a watermark from a video according to claim 5, wherein extracting a target video frame in which a watermark transparent picture is mixed in a video playback picture comprises:
extracting a video frame in a video playing picture, calculating pixel points at a designated position of the video frame, and determining a numbered picture to be checked;
when the number picture to be checked contains set number information, taking a video frame corresponding to the number picture to be checked as a starting video frame, and sequentially determining target video frames according to the starting video frame and with a set time period as an interval.
7. A video watermarking apparatus, comprising:
the watermark generation module is used for acquiring watermark information;
the watermark embedding module is used for generating a watermark transparent picture carrying the watermark information according to the watermark information, wherein the watermark transparent picture is used for being mixed into a video playing picture when the video is played;
the watermark embedding module is specifically configured to generate watermark text from the watermark information and generate watermark pictures from the watermark text; dividing the watermark picture into a plurality of watermark picture blocks, respectively embedding pixel point information corresponding to the watermark picture blocks into corresponding transparent pictures according to a setting rule, generating numbered pictures carrying the numbered information, and embedding the numbered pictures into the appointed positions of the watermark transparent pictures where the corresponding watermark picture blocks are positioned to obtain the watermark transparent pictures carrying the watermark information.
8. A video watermark extraction apparatus, comprising:
the watermark positioning module is used for extracting target video frames mixed with watermark transparent pictures in video playing pictures;
the watermark decoding module is used for obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame;
The watermark decoding module is specifically configured to respectively obtain pixel point information of watermark picture blocks carried in watermark transparent pictures corresponding to the target video frames according to the pixel point information in the target video frames; and splicing the watermark picture blocks according to the number information carried in the watermark transparent picture and the set time period, and determining watermark information according to the spliced watermark picture blocks.
9. A video playback terminal comprising a processor and a memory for storing a computer program capable of running on the processor; wherein,,
the processor is configured to perform the video watermark adding method of any one of claims 1 to 4 or the video watermark extracting method of any one of claims 5 to 6 when running the computer program.
10. A computer storage medium, wherein a computer program is stored in the computer storage medium, the computer program implementing the video watermark adding method according to any one of claims 1 to 4 when being executed by a processor, or the computer program implementing the video watermark extracting method according to any one of claims 5 to 6 when being executed by a processor.
CN201811064384.8A 2018-09-12 2018-09-12 Video watermark adding and extracting method and device, video playing end and storage medium Active CN110896484B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811064384.8A CN110896484B (en) 2018-09-12 2018-09-12 Video watermark adding and extracting method and device, video playing end and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811064384.8A CN110896484B (en) 2018-09-12 2018-09-12 Video watermark adding and extracting method and device, video playing end and storage medium

Publications (2)

Publication Number Publication Date
CN110896484A CN110896484A (en) 2020-03-20
CN110896484B true CN110896484B (en) 2023-05-05

Family

ID=69785418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811064384.8A Active CN110896484B (en) 2018-09-12 2018-09-12 Video watermark adding and extracting method and device, video playing end and storage medium

Country Status (1)

Country Link
CN (1) CN110896484B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040336B (en) * 2019-06-03 2023-03-14 中兴通讯股份有限公司 Method, device and equipment for adding and extracting video watermark
CN111680273B (en) * 2020-05-21 2023-07-07 北京北信源软件股份有限公司 Watermark embedding method, watermark embedding device, electronic equipment and readable storage medium
CN111698574A (en) * 2020-05-26 2020-09-22 北京字节跳动网络技术有限公司 Video watermark processing method and device, electronic equipment and storage medium
CN111669476B (en) * 2020-06-23 2022-09-27 北京字节跳动网络技术有限公司 Watermark processing method, device, electronic equipment and medium
CN111860367A (en) * 2020-07-24 2020-10-30 上海连尚网络科技有限公司 Video repeatability identification method, electronic equipment and computer readable storage medium
CN111988672A (en) * 2020-08-13 2020-11-24 北京达佳互联信息技术有限公司 Video processing method and device, electronic equipment and storage medium
CN112383836B (en) * 2020-10-19 2022-11-11 深圳市九洲电器有限公司 Video verification system and method
CN112689159B (en) * 2020-12-22 2023-04-18 深圳市九洲电器有限公司 Video file processing method and device, terminal equipment and storage medium
CN113613015A (en) * 2021-07-30 2021-11-05 广州盈可视电子科技有限公司 Tamper-resistant video generation method and device, electronic equipment and readable medium
CN113923484B (en) * 2021-09-03 2024-07-30 杭州阔知网络科技有限公司 Video dynamic copyright information generation method and system thereof
CN115243112A (en) * 2022-06-07 2022-10-25 苏州思萃工业互联网技术研究所有限公司 Device that surveillance video traced to source

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002087251A1 (en) * 2001-04-20 2002-10-31 Markany Inc. Method of inserting/detecting digital watermark and apparatus for using thereof
CN101102460A (en) * 2007-07-24 2008-01-09 上海广电(集团)有限公司中央研究院 A method for instantly adding hide information into digital TV programs
CN103366330A (en) * 2012-03-31 2013-10-23 北大方正集团有限公司 Method and device for setting watermark
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104091302B (en) * 2014-07-10 2017-06-06 北京工业大学 A kind of robust watermarking insertion and extracting method based on multiscale space

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002087251A1 (en) * 2001-04-20 2002-10-31 Markany Inc. Method of inserting/detecting digital watermark and apparatus for using thereof
CN101102460A (en) * 2007-07-24 2008-01-09 上海广电(集团)有限公司中央研究院 A method for instantly adding hide information into digital TV programs
CN103366330A (en) * 2012-03-31 2013-10-23 北大方正集团有限公司 Method and device for setting watermark
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal

Also Published As

Publication number Publication date
CN110896484A (en) 2020-03-20

Similar Documents

Publication Publication Date Title
CN110896484B (en) Video watermark adding and extracting method and device, video playing end and storage medium
US11023618B2 (en) Systems and methods for detecting modifications in a video clip
WO2020244474A1 (en) Method, device and apparatus for adding and extracting video watermark
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
US20090288170A1 (en) System and method for object oriented fingerprinting of digital videos
US20060080538A1 (en) Apparatus, method and computer program for distributing and rendering content
CN105872704A (en) Video playing control method and device
CN108882055B (en) Video live broadcast method and system, and method and device for synthesizing video stream
US20180211354A1 (en) Watermark embedding method and apparatus, and system
CN109040773A (en) A kind of video improvement method, apparatus, equipment and medium
CN110288504A (en) It is a kind of to automatically add water impression method towards block chain digital education platform
CN111901640B (en) Method and device for protecting copyright of streaming media
US9959906B2 (en) Method and a receiver device configured to mark digital media content
CN111836054B (en) Video anti-piracy method, electronic device and computer readable storage medium
CN113569719A (en) Video infringement judgment method and device, storage medium and electronic equipment
CN113573141B (en) Video processing method and device, electronic equipment and storage medium
CN114245053A (en) Video watermark generation method and device
CA2654504C (en) System and method for analyzing and marking a film
US7356159B2 (en) Recording and reproduction apparatus, recording and reproduction method, recording and reproduction program for imperceptible information to be embedded in digital image data
CN114070950B (en) Image processing method, related device and equipment
KR101352830B1 (en) Efficient application of video marking technologies
CN117499665B (en) Image data embedding and extracting method and device based on gray value quantization
US10282618B2 (en) Multi-blend fingerprinting
WO2024040474A1 (en) Encrypted image watermark processing method and apparatus, and display device
CN115733994A (en) Data processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant