CN110896484A - 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
CN110896484A
CN110896484A CN201811064384.8A CN201811064384A CN110896484A CN 110896484 A CN110896484 A CN 110896484A CN 201811064384 A CN201811064384 A CN 201811064384A CN 110896484 A CN110896484 A CN 110896484A
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.)
Granted
Application number
CN201811064384.8A
Other languages
Chinese (zh)
Other versions
CN110896484B (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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Abstract

The embodiment of the invention discloses a video watermark adding and extracting method, a 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 during video playing; the video watermark extraction method comprises the steps of extracting a target video frame mixed with a watermark transparent picture in a video playing picture; and acquiring 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 method and an apparatus for adding a video watermark, a method and an apparatus for extracting a video watermark, a video playing terminal, and a computer storage medium.
Background
With the rapid development of the mobile internet, the video playing service develops rapidly, more and more users watch multimedia videos by using terminals, and meanwhile, the attention degree of the infringement behavior of unauthorized acquisition of video resources is gradually enhanced. In order to prevent video resources from being stolen, a content provider generally adds watermark information invisible to naked eyes in video content, then extracts a watermark through a certain technical method, and when the video is illegally infringed, trails pirated users through the extracted watermark information.
At present, video watermarks are added in the industry, video key frames are generally extracted, and transparent watermark information is added in a space domain or a frequency domain of the key frames; since there is a certain time loss in both processing the spatial domain image and converting the spatial domain image into the frequency domain, in order to ensure the smoothness of the video, a certain amount of buffering is generally performed on the content, and then the watermark is superimposed and the video image is rendered. For example, adding video watermarks through a set-top box is currently implemented by a chip and a Digital Rights Management (DRM) manufacturer, the DRM manufacturer is responsible for producing watermark information, and the chip of the set-top box is superimposed on an image when the image is rendered.
However, the main drawback of this method is that the watermark must use a dedicated chip supporting the watermark, and the chip is authenticated by the DRM manufacturer, and pays the authentication license fee to the DRM manufacturer, so that not only the cost is increased, but also the watermark function cannot be provided on the existing set-top box.
Disclosure of Invention
In order to solve the existing technical problems, embodiments of the present invention provide a video watermark adding method and apparatus, a video watermark extracting method and apparatus, a video playing end, and a computer storage medium, which are lower in cost and wider in adaptability.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
a video watermarking method, comprising: acquiring 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 during video playing.
The generating of the watermark transparent picture carrying the watermark information according to the watermark information includes: generating a watermark text from the watermark information, and generating a watermark picture 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 the 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 pictures 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 the specified position of the watermark transparent picture where the corresponding watermark picture block is located.
Wherein, the generating of the number picture carrying the number information includes: 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 dividing the watermark picture into a plurality of watermark picture blocks, and respectively embedding the 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 a set sequence according to the display direction of the fonts in the watermark picture; wherein each of the watermark picture blocks comprises a first number of pixel points; dividing each transparent picture to be embedded with the watermark into the regions with the first quantity, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into the designated positions in the regions corresponding to the transparent pictures, wherein the quantity of the transparent pictures is equal to that of the watermark picture blocks.
After generating the watermark transparent picture carrying the watermark information according to the watermark information, the method further comprises: after a video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into a video playing picture in a set time period; wherein the set time period is at least one of: a time period of fixed duration to set a regularly varying time period.
A video watermark extraction method, comprising: extracting a target video frame mixed with a watermark transparent picture in a video playing picture; and acquiring watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
The extracting of 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 the specified position of the video frame, and determining a numbered picture to be checked; and when the to-be-verified numbered picture is determined to contain the set number information, the video frame corresponding to the to-be-verified numbered picture is taken as an initial video frame, and target video frames are sequentially determined according to the initial video frame and with a set time period as an interval.
The obtaining of the watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame includes: respectively acquiring pixel point information of a watermark picture block carried in a watermark transparent picture corresponding to the target video frame according to the pixel point information in the target video frame; and splicing the watermark picture block according to the number information and the set time period, and determining watermark information according to the spliced watermark picture block.
A video watermarking apparatus comprising: the watermark generating module is used for acquiring watermark information; and the watermark embedding module is used for generating a watermark transparent picture carrying the watermark information according to the watermark information, and the watermark transparent picture is used for being mixed into a video playing picture during video playing.
A video watermark extraction apparatus, comprising: the watermark positioning module is used for extracting a target video frame mixed with a watermark transparent picture in a video playing picture; and the watermark decoding module is used for acquiring the watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
A video player terminal comprising a processor and a memory for storing a computer program operable on the processor; when the processor is configured to run the computer program, the video watermark adding method according to any embodiment of the present invention is executed, or the video watermark extracting method according to any embodiment of the present invention is executed.
A computer storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the video watermark adding method according to any embodiment of the present invention, or the computer program, when executed by the processor, implementing the video watermark extracting method according to any embodiment of the present invention.
The video watermark adding method and device, the video playing end and the computer storage medium provided by the above embodiments, wherein the video watermark adding method includes acquiring watermark information, generating a watermark transparent picture carrying the watermark information according to the watermark information, the watermark transparent picture being used to be mixed into a video playing picture during video playing, so that by carrying the watermark information in the watermark transparent picture and mixing the watermark transparent picture into the video playing picture during video playing, the layer formed by the watermark transparent picture is transparent, thereby not affecting the playing of the video layer, thereby realizing dynamic acquisition of the watermark information to form the watermark transparent picture carrying the watermark information and mixing the watermark transparent picture into the video playing picture during video playing, without requiring a dedicated chip to add the watermark by modifying the picture during rendering of the original video frame picture, therefore, the 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 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, wherein the watermark information is carried in the watermark transparent picture and is mixed into a video playing picture in the video playing process, and a layer formed by the watermark transparent picture is transparent, so that the playing of the video layer is not influenced.
Drawings
Fig. 1 is an architecture diagram of an operating system of a video watermarking method according to an embodiment of the present invention;
fig. 2 is an architecture diagram of an operating system of a video watermarking method according to another embodiment of the present invention;
fig. 3 is an architecture diagram of an operating system of a video watermarking method according to another embodiment of the present invention;
fig. 4 is an architecture diagram of an operating system of a video watermarking method according to still another embodiment of the present invention;
FIG. 5 is a flowchart illustrating a video watermarking method according to an embodiment of the present invention;
fig. 6 is an exemplary diagram of a watermark picture in an embodiment of the invention;
FIG. 7 is an exemplary diagram of numbered pictures in an embodiment of the present invention;
FIG. 8 is a diagram of an example of a watermarked transparent picture in accordance with an embodiment of the present invention;
FIG. 9 is a flow chart of a video watermarking method according to another embodiment of the present invention;
FIG. 10 is a flowchart illustrating a video watermark extraction method according to an embodiment of the invention;
FIG. 11 is a flowchart of a video watermark extraction method according to another embodiment of the present invention;
fig. 12 is a flowchart of a video watermark extraction method according to still another embodiment of the present invention;
fig. 13 is a schematic structural diagram of a video watermarking apparatus according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a video watermark extraction apparatus according to an embodiment of the present 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 by combining the drawings and the specific embodiments in the specification. 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 in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
As shown in fig. 1, in an embodiment, an architecture diagram of an application scenario adopting 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 102 connected to the set-top box. The satellite receiving end 200 performs video compression processing on a signal received from a satellite, converts the compressed message into an IP message by IP streaming, and transmits the IP message to the IPTV set-top box 101 through an IP network, and the IPTV set-top box 101 converts the transmitted IPTV signal into a standard video signal for display by the television 102. The computer program for implementing the video watermark adding method is deployed in the IPTV set-top box 101, the IPTV set-top box 101 acquires watermark information and generates a watermark transparent picture carrying the watermark information according to the watermark information, and when video playing is performed through the television 102, the watermark transparent picture is mixed into a video playing picture, so that watermark adding to the played video playing picture is implemented.
As shown in fig. 2, an architecture diagram of an application scenario adopting a video watermarking method provided by an embodiment of the present invention for another embodiment 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, a television service provider may transcribe a television program into a video and store the video on the multimedia server 300, when the OTT set-top box 103 accesses 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 through decoding the video data into an audio signal and plays the audio signal. The computer program for implementing the video watermark adding method is deployed in the OTT set-top box 103, the OTT set-top box 103 acquires the watermark information and generates a watermark transparent picture carrying the watermark information according to the watermark information, and when video playing is performed through the television 102, the watermark transparent picture is mixed into a video playing picture, so that watermark adding of the played video playing picture is implemented.
As shown in fig. 3, an architecture diagram of an application scenario adopting the video watermarking method provided by the embodiment of the present invention is provided as a further embodiment, where the architecture includes a video playing end 100 and a multimedia server 300, and the video playing end 100 includes a mobile phone terminal 104. When the mobile phone terminal 104 accesses the audio/video file in the multimedia server 300 through the network, the multimedia server 300 sends the audio/video data to the mobile phone terminal 104 through the network, and the audio/video data is played through the audio/video playing application of the mobile phone terminal 104. The computer program for realizing the video watermark adding method is deployed in the mobile phone terminal 104, the mobile phone terminal 104 acquires the watermark information and generates a watermark transparent picture carrying the watermark information according to the watermark information, and when the video is played through the mobile phone terminal 104, the watermark transparent picture is mixed into a video playing picture to realize the watermark adding of the played video playing picture.
As shown in fig. 4, an architecture diagram of an application scenario adopting the 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 PC terminal 105. When the PC terminal 105 accesses the audio/video file in the multimedia server 300 through the network, the multimedia server 300 sends the audio/video data to the PC terminal 105 through the network, and plays the audio/video data through the audio/video playing application of the PC terminal 105. The computer program for realizing the video watermark adding method is deployed in the PC terminal 105, the PC terminal 105 acquires the watermark information and generates a watermark transparent picture carrying the watermark information according to the watermark information, and when the video is played through the PC terminal 105, the watermark transparent picture is mixed into a video playing picture to realize the watermark adding of the played video playing picture.
It should be noted that the architecture of the application scenario of the video watermark adding method adopted in the embodiment of the present invention is not limited to that shown in the above embodiment, wherein the video playing end may also be another terminal that can be used to directly play the audio/video file, such as a tablet computer, a palmtop computer, etc.; or a conversion device connected with a terminal for directly playing the audio/video file, such as different types of set-top boxes. In the video watermark extraction method provided by the embodiment of the present invention, the architecture of the application scenario may be the same as that of the video watermark addition method, and details are not repeated here.
Referring to fig. 5, a flowchart of a video watermarking method according to an embodiment of the present invention is shown, where the video watermarking method can be applied to a video player shown in fig. 1 to 4, and the video watermarking method includes the following steps:
step 101, acquiring watermark information;
and 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 during video playing.
Here, the watermark information refers to relevant information that can be used to determine the identity of a device and/or a user playing a video file, for example, the watermark information includes at least one of the following: media access device MAC information, user identification, router identification, and play application identification. The watermark transparent picture is a transparent picture with a set size in which the watermark information is embedded, the value of a pixel point of the transparent picture is #000000, and the set size can be 640x 480. 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: and converting the text corresponding to the watermark information into a watermark picture, and embedding the pixel points in the watermark picture into the transparent picture, thereby obtaining the watermark transparent picture carrying the watermark information.
In the above embodiment of the present invention, by obtaining the watermark information, and generating the watermark transparent picture carrying the watermark information according to the watermark information, the watermark transparent picture is used to be mixed into the video playing picture when the video is played, so that, by carrying the watermark information in the watermark transparent picture and mixing the watermark transparent picture into the video playing picture during the video playing, the layer formed by the watermark transparent picture is transparent, thereby not affecting the playing of the video layer, thereby dynamically obtaining the watermark information to form the watermark transparent picture carrying the watermark information and mixing the watermark transparent picture into the video playing picture during the video playing, realizing adding the hidden watermark information to the video during playing, without a special chip for adding the watermark by modifying the picture when rendering the original video frame picture, the cost is lower, and any video playing terminal can be used, the applicability is wider.
In an embodiment, the generating a watermark transparent picture carrying the watermark information according to the watermark information includes:
generating a watermark text from the watermark information, and generating a watermark picture 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 the watermark transparent pictures carrying the watermark information.
Here, the step of generating the watermark text from the obtained watermark information may be to obtain information such as the device MAC, the user account, and the local point from the set top box, and generate the watermark text according to the information. The watermark picture refers to a picture with a fixed size and a background color of a preset pixel value, for example, a watermark picture with a background color of #000000 and a fixed 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 present invention. 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 setting rules to obtain the watermark transparent pictures carrying the watermark information, wherein the setting rules can mean that the modes of embedding each watermark picture block into the corresponding transparent pictures are different, such as wholly embedding the watermark picture block into a certain setting area in the corresponding transparent pictures, sequentially embedding the pixel points in the watermark picture block 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 division can be performed by taking the set number of pixel points as the division units according to the display direction of characters contained in the watermark picture. If the characters are horizontally displayed from left to right, the characters can be divided by taking the pixel points with the set number as the segmentation units according to the sequence from top to bottom and from left to right. The amount of pixel point information included in each watermark picture block can be adjusted according to actual requirements, for example, the watermark picture shown in fig. 6 is taken as an example, the size of the watermark picture is 180x20, k pixel points are taken as a division unit to be divided, and further the watermark picture block can be divided into 3600/k watermark picture blocks. 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 and correspondingly embedded into different transparent pictures, so that the watermark transparent pictures respectively carrying watermark information correspondingly are obtained.
In the above-described embodiment of the present invention, by generating the watermark picture according to the watermark information, and dividing the watermark picture into a plurality of watermark picture blocks, and the watermark picture blocks are respectively embedded into the corresponding transparent pictures, by embedding the watermark information into the transparent pictures in the form of a plurality of watermark picture blocks, the watermark transparent layer carrying the watermark information can be made to be nearly transparent as a whole, so as to avoid the influence on the video layer when the watermark transparent picture carrying the watermark information is mixed with the video playing picture, for example, by setting the amount of pixel point information contained in each watermarked picture block and/or setting the rule for each watermarked picture block to be embedded in the corresponding transparent picture, the overall transparency of the watermark transparent picture carrying the watermark information is adjusted, and the influence on the video layer when the watermark transparent picture carrying the watermark information is mixed with the video playing picture is avoided.
In an embodiment, after the embedding the pixel point information corresponding to the watermark picture block 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 the specified position of the watermark transparent picture where the corresponding watermark picture block is located.
Here, the number information refers to relevant information that can be used to determine the relative positional relationship of the watermark picture block, for example, a set text symbol may be used to represent a position in the overall watermark picture of the watermark picture block carried in the watermark transparent picture at the specified position; or a plurality of set text symbols are adopted to represent the positions of the watermark picture blocks carried in the watermark transparent pictures at different specified positions in the whole watermark picture. The numbering image carrying the numbering information is embedded into the appointed position of the watermark transparent image where the corresponding watermark image block is located, so that the numbering information can be superposed on the watermark transparent image where the corresponding watermark image block is located, and the positions of the watermark image blocks carried in the watermark transparent image in the whole watermark image can be respectively determined by identifying the numbering information.
Wherein, the generating of the number picture carrying the number information includes:
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 "+" - "" | "or the like, and different text symbols correspond to the numbers of different target watermark picture blocks, respectively. And generating a corresponding number picture from the text symbol, and embedding the number picture into the specified position of the watermark transparent picture where the corresponding watermark picture block is located, so as to realize the identification of the corresponding watermark picture block in the watermark transparent picture. Here, the rule for embedding the numbered pictures into the watermark transparent pictures may be similar to the rule for embedding the watermark picture blocks into the transparent pictures, such as wholly embedding the numbered pictures into a certain setting region in the corresponding watermark transparent pictures, sequentially embedding the pixel points in the numbered pictures into a plurality of setting regions in the corresponding watermark transparent pictures, and the like. It should be noted that, the region where the numbered picture is embedded into the watermark transparent picture and the region where the watermark picture block is embedded into the transparent picture are disposed in a staggered manner, and in order to improve the identification efficiency, the pixel points included in the numbered picture may be sequentially embedded into the setting line of the watermark transparent picture. As shown in fig. 7, a schematic diagram of numbered pictures respectively including text symbols "+" - "|" according to an embodiment of the present invention is provided, where the size of the 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 bright spots. As shown in fig. 8, a schematic diagram of a partial embedding position of a set line for sequentially embedding pixel points 805 included in a numbered picture into a corresponding watermark transparent picture provided in the embodiment of the present invention is shown, where the size of the watermark transparent picture is 640x480 and is fixed on lines 110, 120, 350, and 470 of the watermark transparent picture with an origin as a starting point, and fig. 8 shows a partial example of embedding pixel points 805 included in the numbered picture in line 120, where one numbered picture pixel point 805 is mixed every 16 pixel points.
In one embodiment, the 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 includes:
dividing the watermark picture into a plurality of watermark picture blocks according to a set sequence according to the display direction of the fonts in the watermark picture; wherein each of the watermark picture blocks comprises a first number of pixel points;
dividing each transparent picture to be embedded with the watermark into the regions with the first quantity, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into the designated positions in the regions corresponding to the transparent pictures, wherein the quantity of the transparent pictures is equal to that of the watermark picture blocks.
Here, the setting order is the same as the display direction of the font, and if the display direction of the font is from left to right, the setting order is from top to bottom and from left to right; the font display aspect is from top to bottom, then the order is from left to right and from top to bottom. Dividing a watermark picture into a plurality of watermark picture blocks, determining the number of regions in a transparent picture according to the number of the watermark picture blocks, and watermarking the transparent pictureThe pixel points contained in the picture block are respectively and correspondingly mixed to the designated positions in the corresponding areas one by one, so that the watermark picture block is regularly and uniformly distributed into the watermark transparent picture, and the watermark picture block information is hiddenly superposed into the watermark transparent picture. The embedding rule of the pixel points of the watermark picture block can be shown in the following formulas 1 to 3: rw=Rs+Rwp(formula 1) and Gw=Gs+Gwp(formula 2) and Bw=Bs+Bwp(formula 3) one-by-one mixing of RGB channel values of corresponding pixels is performed, wherein R iswGwBwThe channel value of a pixel point RGB in the watermark transparent picture of the mixed watermark picture block; rsGsBsThe channel value of the pixel point RGB in the transparent picture is fixed as 0; rwpGwpBwpThe channel value of the pixel point RGB in the watermark picture block. Referring to fig. 8 again, taking the transparent picture 800 with a size of 640x480 as an example, each watermark picture block includes 16 pixels, the transparent picture 800 is divided into 16 regions 801, and each region 801 includes 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 the transparent picture 800 shown in fig. 8 has a square grid to indicate a pixel point position, which is only schematically listed, and some row numbers in the row numbers indicated on the top side and the left side of the figure have been omitted for ease of understanding and reducing space.
In an embodiment, after the generating the watermark transparent picture carrying the watermark information according to the watermark information, the method further includes:
after a video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into a video playing picture in a set time period; wherein the set time period is at least one of: a time period of fixed duration to set a regularly varying time period.
Here, mixing the watermark transparent pictures into the video playing picture in sequence with the set time period refers to a duration of time for mixing the watermark transparent pictures into the video playing picture, where the duration of time may be a time period of fixed duration, for example, a fixed time of 1 second is used for mixing the watermark transparent pictures into the video playing picture; the duration may be a time period that is regularly changed, for example, 1 second, 2 seconds, or 3 seconds when the watermark transparent picture is mixed into the video playing picture. By the determination of the set time period, it is convenient to determine the other watermark transparent pictures backwards and forwards respectively by taking one of the watermark transparent pictures as a reference position according to the time period.
In order to further understand the implementation principle of the video watermark adding method provided in the embodiment of the present invention, a video playing end is taken as an example of a set top box, and a flow of the video watermark adding method in the embodiment of the present invention is described below, with reference to fig. 9, where the method includes:
s11, acquiring equipment and user information; here, the information such as the device MAC, the user account, the local point, etc. may be acquired from the set-top box, and a watermark text may be generated; for example, referring to fig. 6, the watermark text is: device MAC _ user account _ market code _ operator code (watermark text example: DC4A3E48D37F _ ZTE123_99_ 10);
s12, generating watermark text information according to the equipment and user information and converting the watermark text information into a watermark picture; here, the watermark text may be converted according to a certain rule, for example, into a picture with background color #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 as shown in fig. 7;
s13, dividing the watermark picture into blocks; dividing a watermark picture into a plurality of watermark picture blocks; here, the image may be divided according to a certain rule according to the display direction of the font in the image, for example, the text is horizontally displayed from left to right, and the image may be divided into 3600/k watermark image blocks by taking k pixel points as a unit in the order from top to bottom and from left to right; taking k equal to 16, that is, taking 16 pixels as a unit as an example, the watermark picture can be divided into 225 watermark picture blocks, since the ground color is black, the pixels actually influencing the subsequent superposition effect account for about 1/8 of the total pixel number of the watermark picture through measurement and calculation, and according to the above blocking sequence, only 2 pixels in each watermark picture block are bright points on average;
s14, obtaining the ith watermark picture block; here, the number of watermark picture blocks is equal to the number of transparent pictures, and each watermark picture block corresponds to a transparent picture;
s15, obtaining the ith transparent picture; the transparent picture refers to a transparent layer to be embedded with watermark information, the value of a pixel point of the transparent picture is #000000, the size of the transparent picture is fixed to be 640x480, only a pixel point of a watermark picture block is embedded in each transparent picture, 225 transparent pictures are correspondingly obtained by taking the watermark picture blocks as 225 as examples, wherein the number of the pixel of a bright point carried by each of the 225 watermark transparent pictures is 2 as the transparent picture is a pure black bottom picture of # 000000;
s16, embedding the ith watermark picture block into the designated area of the corresponding ith transparent picture to form a watermark transparent picture; here, the transparent picture may be divided into regions having the same number according to the number of the pixel points included in each watermark picture block, so that the pixel points of each watermark picture block are respectively and correspondingly embedded into each region. As shown in fig. 8, taking an example that each watermark picture block includes 16 pixel points, the transparent picture 800 is divided into 16 regions 801, each region 801 is embedded into one pixel point 803 in the watermark picture block, and the rule for embedding each pixel point 803 into a designated region may be: taking the origin of each region as a starting point, in order from left to right and from top to bottom, taking 8x8 as a sliding window, and multiplying by the block number of the current watermark picture block, for example, if a pixel of the first watermark picture block is embedded in the first transparent watermark picture, the positions of 16 pixels of the first watermark picture block in the 640x480 transparent picture are:
Figure BDA0001797938680000121
by analogy, the 16 pixel points of the 225 th watermark picture block are the positions in the 640x480 transparent picture in turn:
Figure BDA0001797938680000122
it should be noted that, a square in the transparent picture 800 shown in fig. 8 indicates that a pixel point position is only schematically listed, and for convenience of understanding and reducing space, part of the row and column numbers in the row and column numbers indicated on the top side and the left side of the figure are omitted, in an embodiment of the present invention, one region 801 of one transparent picture 800 only includes one pixel point of one watermark picture block, and a plurality of pixel points of one watermark picture block displayed in a square included in one region 801 in fig. 8 are for convenience of describing the positions of pixel points of watermark picture blocks with different numbers.
S17, acquiring text symbols with set quantity, generating corresponding numbered pictures from the text symbols, and embedding the numbered pictures into the corresponding watermark transparent pictures; here, the numbering picture is embedded into the specified position of the watermark transparent picture according to a certain rule, the way of embedding the numbering picture into the watermark transparent picture can be the same as the way of embedding the watermark picture block into the transparent picture, and the position of the pixel point of the numbering 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 picture block and the numbered picture can be mixed in a one-to-one correspondence manner of corresponding pixel points of the watermark transparent picture in a space domain; as shown in fig. 7, in order to identify which watermark picture block is carried in the current watermark transparent picture during subsequent extraction, three text characters of "|", "+", "-" may be defined to indicate the numbers of the 1 st watermark picture block, the 75 th watermark picture block, and the 150 th watermark picture block, the background colors of the numbered pictures are #000000, the size is fixed to 10x16, the font size is set to 10, the font color is set to the intermediate color of 0x888888 to convert the picture format, and the test highlights of the converted numbered pictures are 11, 2, and 11, respectively.
The embedding positions of the numbered pictures at the designated positions in the 1 st, 75 th and 150 th watermark picture blocks may be sequentially mixed and added with respective numbered picture pixel points from left to right and from top to bottom, for example, in the case of a 640x480 watermark transparent picture, lines 110, 230, 350 and 470 with the origin as the starting point mix one numbered picture pixel point every 16 pixel points, please refer to fig. 8 again, which is an example of a partial embedding position of the numbered picture pixel point 805. Here, steps S11 to S17 may be completed in advance and the watermark transparent pictures are cached, the size of each 640x480 pure black picture is 976 bytes, and the size of 225 watermark transparent pictures carrying the watermark picture blocks is within 225 k.
S18, obtaining the ith watermark transparent picture;
s19, acquiring j video frames per second;
and S20, mixing the ith watermark transparent picture into j video frames corresponding to 1 second during video playing. And sequentially mixing the watermark transparent pictures to j video frames within 1 second, thereby realizing the addition of the video watermark. In the video playing process, the watermark transparent pictures pre-cached in the step S17 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 one-to-one correspondence mode in a space domain according to a formula: rd=Rv+Rw、Gd=Gv+Gw、Bd=Bv+BwOne-by-one mixing of pixel points is carried out, wherein RdGdBdIs the RGB channel value, R of the pixel point in the video picture of the mixed watermark transparent picturevGvBvThe GRB channel value, R, of a pixel point in an original video picturewGwBwThe channel value of the pixel point RGB in the watermark transparent picture is obtained. Taking t as 1 second as an example, when a video is played, based on a central point of the played video, in an area of 640x480, pixel points of watermark transparent pictures and video pictures carrying watermark information are sequentially and circularly mixed, the mixing duration of each transparent picture lasts 1 second, wherein the watermark transparent pictures carrying numbered pictures are sequentially (n × 75+1) seconds respectively, wherein n is a natural number, such as the 1 st second, the 76 th second, the 151 th second, the 226 th second and the like.
In the video watermark adding method provided by the above embodiment of the present invention, by adding watermark pictures to the transparent pictures, a set of transparent watermark pictures carrying airspace watermark information and watermark position information at specified pixel points is formed, and in the video playing process, the watermark transparent pictures are dynamically and circularly rendered into the video picture, so as to dynamically add hidden watermark information in the video; and the security and the robustness of the watermark information are enhanced by dividing the watermark picture into the watermark picture blocks. Compared with the traditional technology of finishing the 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 performance, high visibility, and better safety and robustness.
Referring to fig. 10, a flowchart of a video watermark extracting method according to an embodiment of the present invention is shown, where the method includes:
step 201, extracting a target video frame mixed with a watermark transparent picture in a video playing picture;
step 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 playback screen refers to a playback screen through recording of a video. For the recorded video, the watermark information is added in real time in a mode of mixing the watermark transparent picture in the video playing process, the target video frame mixed with the watermark transparent picture in the video playing picture is extracted, and the pixel point of the watermark information can be calculated according to the pixel point information in the target video frame, so that the watermark information carried by the corresponding watermark transparent picture is obtained.
In the video watermark extraction method provided by the above embodiment of the present invention, the watermark transparent picture and the video playing picture are based on picture mixing to realize real-time addition of watermark information in the video playing process, so that the watermark information can be extracted according to the inverse process of watermark information addition for the screen recording video, and whether infringement exists and which user infringes can be identified according to the extracted watermark information, thereby realizing protection of the video watermark. Therefore, the watermark information is carried in the watermark transparent picture and 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 cannot be influenced, the watermark information can be restored by extracting the target video frame mixed with the watermark transparent picture and performing inverse operation through the pixel point information of the target video frame and the adding mode according to the watermark information, and whether the playing video is illegal or not can be visually identified. The whole process of the video watermark extraction method is conveniently extracted according to the inverse operation of watermark addition, can be quickly completed through software, and does not need the support of a special chip and a DRM manufacturer, so that the cost is lower, and the adaptability is wider.
In an embodiment, referring to fig. 11, the extracting a target video frame mixed with a watermark transparent picture in a video playing frame includes:
step 2011, extracting a video frame in a video playing picture, calculating a pixel point of an appointed position of the video frame, and determining a numbered picture to be checked;
step 2012, when it is determined that the serial number picture to be verified includes the set serial number information, the video frame corresponding to the serial number picture to be verified is taken as an initial video frame, and target video frames are sequentially determined according to the initial video frame and with a set time period as an interval.
Here, the set time period refers to a duration of each watermark transparent picture mixing when the watermark transparent pictures are mixed to the video playing picture in the video playing process. By setting the number information, the target video frame carrying the watermark transparent picture can be conveniently and rapidly positioned. Determining a target video frame mixed with a watermark transparent picture, namely extracting the video frame and determining the video frame carrying the numbered picture, determining watermark information carried in the video frame according to the numbered information in the numbered picture, and determining the video frame corresponding to other watermark transparent pictures carrying the watermark information as the target video frame by combining the reverse process of the set time period from the mixing of the watermark transparent pictures carrying the watermark information to the playing of the video picture, thus adding the appointed numbered information to identify the corresponding watermark information when adding the watermark information in the video playing, thereby determining the watermark transparent pictures carrying the numbered information in the extracting process of the watermark information, further determining the positions of other watermark transparent pictures based on the positions of the watermark transparent pictures carrying the numbered information, and improving the efficiency of determining the target video frame, and further, the efficiency of extracting the watermark information in the video is improved.
The obtaining of the watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame includes:
step 2021, respectively obtaining pixel point information of watermark picture blocks carried in the watermark transparent pictures corresponding to the target video frames according to the pixel point information in the target video frames;
step 2022, splicing the watermark picture block according to the number information and the set time period, and determining watermark information according to the spliced watermark picture block.
Here, the pixel point information of the watermark picture block carried in the watermark transparent picture corresponding to the target video frame is respectively obtained according to the pixel point information in the target video frame, and may be determined according to an 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 picture, the pixel point of the watermark picture block and the pixel point value of the corresponding position in the video picture are added to realize the addition, and extracting the pixel point information correspondence of the watermark picture block means that the pixel point value of the corresponding position of the target video frame in the screen recording video and the pixel point value of the corresponding position of the original video frame are subtracted to determine the pixel point information. Here, splicing the watermark picture blocks according to the number information and the set time period means that, based on the position of the watermark picture block corresponding to the number information when the number picture is added to the video playing picture as a reference position, the sequence of other watermark picture blocks is sequentially determined in reverse direction according to the rule of the duration of the mixture of the watermark picture block and the video playing picture, and then the watermark pictures can be sequentially spliced to obtain the watermark pictures.
In the embodiment of the invention, because the watermark information is added to the video playing picture in real time in the video playing process and the watermark information is formed by forming the watermark picture, dividing the watermark picture into a plurality of watermark picture blocks, adding each watermark picture block to the corresponding transparent picture to obtain a watermark transparent picture, mixing the watermark transparent pictures to the video playing picture to realize the real-time addition of the watermark information, thus extracting the watermark information based on the screen recording video, in the process of restoring the watermark information according to the determined target video frame of the watermark transparent picture carrying the watermark information, the watermark picture blocks corresponding to the target video frames and the sequence among the watermark picture blocks can be determined according to the number information and the set time period, and then the watermark pictures are spliced and restored to visually identify whether the played video is illegal.
In order to further understand the implementation principle of the video watermark extraction method provided in the embodiment of the present invention, a video playing picture is taken as a video playing picture of a screen recording video, and a flow of the video watermark extraction method according to the embodiment of the present invention is described below, where the video watermark extraction method may be applied to a terminal device capable of running a computer program, and please refer to fig. 12, the method includes:
step S21, when extracting the watermark from the screen recording video, extracting and scanning the pixel points of the set positions in the video frame according to the adding rule of the numbered pictures
Step S22, judging whether the extracted number information is the set number information according to the pixel points;
here, the addition rule of the numbered pictures refers to an addition rule when the numbered pictures carrying the set text symbols are added to the watermark transparent pictures in the process of adding the watermark information to the video playing picture during video playing. By adding the number picture to the adding position of the watermark transparent picture, the video frame corresponding to the watermark transparent picture carrying the watermark information can be more quickly identified. Wherein, the pixel point of the setting position of the scanning video picture can be according to the formula: rw=Rs+Rwp、Rd=Rv+Rw、Gw=Gs+Gwp、Gd=Gv+Gw、Bw=Bs+Bwp、Bd=Bv+BwCalculating RGB channel value R of pixel point in numbered picturewpGwpBwp(ii) a According to the calculated RwpGwpBwpThe values are spliced into pictures and then converted into text formats, and whether the extracted text characters are set text characters, such as "|", "-", "+", and whether the current video picture contains a watermark picture block at a set position, such as a 1 st watermark picture block, a 75 th watermark picture block or a 150 th watermark picture block, is judged.
If the extracted number information is the non-set number information, returning to execute the step S21; if the extracted number information is the set number information, executing step S23;
step S23, using the video frame carrying the set number information as the initial video frame, sequentially delaying the set time period to determine the subsequent target video frame carrying the watermark picture block, and determining the watermark picture block correspondingly carried by the target video frame; if the duration of each watermark transparent picture mixed to the video playing picture is 1 second during video playing, after the initial video frame carrying the set number information is determined, the sequence of the subsequent video frame as the target video frame carrying the watermark picture block and the corresponding watermark picture block is determined by delaying for 1 second in sequence, so as to extract the remaining watermark picture blocks.
And step S24, sequentially splicing the watermark picture blocks to obtain a spliced watermark picture, and further determining watermark information. Taking the example that the watermark picture block is 225 blocks, the extracted watermark picture blocks are arranged in sequence, and the watermark picture is restored to obtain the watermark information.
The video watermark extraction method provided by the embodiment of the invention extracts the target video frame mixed with the watermark transparent picture in the 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, wherein the watermark information is carried in the watermark transparent picture and is mixed into a video playing picture in the video playing process, and a layer formed by the watermark transparent picture is transparent, so that the playing of the video layer cannot be influenced. The method and the device add 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 the watermark picture block can be found out in sequence and quickly based on the number information and the rule when the watermark transparent picture and the video picture are mixed, and the extraction efficiency is improved.
In one embodiment, a video watermarking apparatus is provided, referring to fig. 13, the video watermarking apparatus includes a watermark generating module 11 and a watermark embedding module 13. A watermark generating module 11, configured to obtain watermark information; the watermark information includes at least one of: media access equipment MAC information, user identification, router identification and playing application identification; and 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 a watermark text from the watermark information, and generate a watermark picture 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 the watermark transparent pictures carrying the watermark information.
The video watermark adding device further comprises a number embedding module 15, which is used for generating a number picture carrying number information and embedding the number picture into the specified position of the watermark transparent picture where the corresponding watermark picture block is located.
The number embedding module 15 generates a number picture carrying number information, and includes: 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 of the watermark picture blocks comprises a first number of pixel points; dividing each transparent picture to be embedded with the watermark into the regions with the first quantity, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into the designated positions in the regions corresponding to the transparent pictures, wherein the quantity of the transparent pictures is equal to that of the watermark picture blocks.
The video watermark adding device further comprises a watermark mixing module 17, wherein the watermark mixing module 17 is used for sequentially mixing the watermark transparent pictures into a video playing picture in a set time period after determining that a video playing instruction is received; wherein the set time period is at least one of: a time period of fixed duration to set a regularly varying time period.
In the video watermarking apparatus provided in the foregoing embodiment, when performing watermarking, only the division of each program module is exemplified, and in practical applications, the steps may be distributed by different program modules according to needs, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the processing described above. In addition, the video watermark adding apparatus and the video watermark adding method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
In an embodiment, a video watermark extracting apparatus is further provided, referring to fig. 14, the video watermark extracting apparatus 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 picture, calculate a pixel point at an assigned position of the video frame, and determine a numbered picture to be checked; and when the to-be-verified numbered picture is determined to contain the set number information, the video frame corresponding to the to-be-verified numbered picture is taken as an initial video frame, and target video frames are sequentially determined according to the initial 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 a watermark picture block carried in a watermark transparent picture corresponding to the target video frame according to the pixel point information in the target video frame; and splicing the watermark picture block according to the number information and the set time period, and determining watermark information according to the spliced watermark picture block.
In the video watermark extraction apparatus provided in the above embodiment, when extracting a watermark, only the division of each program module is taken as an example, and in practical applications, the steps may be distributed by different program modules as needed, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the above-described processing. In addition, the video watermark extraction device and the video watermark extraction method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Referring to fig. 15, the video playing end further includes a processor 201 and a memory 203 for storing a computer program running on the processor 201, where when the processor 201 is used to run the computer program, the steps of the video watermarking method provided in any embodiment of the present invention are executed; or, the steps of the video watermark extraction method provided by any embodiment of the present invention are executed. Here, the processor 201 and the memory 203 do not refer to a corresponding number of 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 and a processor 201 for the above. The program modules corresponding to the computer program of the video watermark adding method comprise a watermark generating module, a watermark embedding module, a serial number embedding module and a watermark mixing module. The method comprises the steps that a watermark generation module acquires watermark information comprising equipment MAC, a user account, local points and the like from an IPTV set top box, generates a watermark text according to a preset format, and converts the watermark text into a watermark picture with a fixed size; the watermark embedding module divides the watermark picture into a plurality of watermark picture blocks according to a preset rule, and respectively embeds pixel points of each watermark picture block into the designated positions of the corresponding transparent pictures according to the preset rule to generate watermark transparent pictures, wherein each watermark transparent picture correspondingly comprises the pixel point information of one watermark picture block; the number embedding module is used for selecting at least one set text symbol to represent the number of the appointed watermark picture block, converting the text symbol into a numbered picture according to a preset rule, and embedding the numbered picture into a watermark transparent picture carrying the corresponding watermark picture block according to the preset rule; and the watermark mixing module is used for sequentially mixing the pixel points of the watermark transparent pictures into the video playing pictures in the process of playing the video through the television, and the duration of each watermark transparent picture is continuously set 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 player terminal comprises a mobile phone terminal or a PC terminal, and the mobile phone terminal or the PC terminal comprises the memory 201 and the processor 201. The program modules corresponding to the computer program for realizing the video watermark adding method comprise a watermark generating module, a watermark embedding module, a serial number embedding module and a watermark mixing module. The method comprises the steps that a watermark generation module acquires watermark information comprising equipment MAC, a user account, local points and the like from an IPTV set top box, generates a watermark text according to a preset format, and converts the watermark text into a watermark picture with a fixed size; the watermark embedding module divides the watermark picture into a plurality of watermark picture blocks according to a preset rule, and respectively embeds pixel points of each watermark picture block into the designated positions of the corresponding transparent pictures according to the preset rule to generate watermark transparent pictures, wherein each watermark transparent picture correspondingly comprises the pixel point information of one watermark picture block; the number embedding module is used for selecting at least one set text symbol to represent the number of the appointed watermark picture block, converting the text symbol into a numbered picture according to a preset rule, and embedding the numbered picture into a watermark transparent picture carrying the corresponding watermark picture block according to the preset rule; and the watermark mixing module is used for sequentially mixing the pixel points of the watermark transparent pictures into the video playing picture in the corresponding video playing process of the mobile phone terminal or the PC terminal, and continuously setting the duration 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 an embodiment, the video playing end is another computer device including the above memory 201 and processor 201, and the program modules corresponding to the computer program for implementing the video watermark extraction method include a watermark locating module and a watermark decoding module. The watermark positioning module extracts video frames from a screen recording video, performs inverse operation on pixel points of the set positions of the video frames, calculates pixel point difference values, determines a numbered picture to be checked according to the pixel point difference values, converts the numbered picture into a text format, judges whether the numbered picture is appointed number information or not, performs cyclic detection until the appointed number information is found, and sequentially finds other video frames carrying watermark picture block information according to fixed time length after the appointed number information is found; and the watermark decoding module is used for finding the positions of pixel points to be extracted in each video frame carrying the watermark picture block according to the number and the position calculation rule of the corresponding watermark picture block for the video frame carrying the watermark picture block with the extracted known number information, carrying out inverse operation, calculating pixel point difference values of the watermark picture blocks, and splicing the watermark picture blocks according to the known rule in sequence so as to restore the watermark picture, thereby realizing extraction of the watermark information in the screen recording video.
The embodiment of the present invention further provides a computer storage medium, for example, a memory storing a computer program, where the computer program can be executed by a processor to complete the steps of the video watermarking method provided in any embodiment of the present invention; or, the steps of the video watermark extraction method provided by any embodiment of the present invention are executed. The computer storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. The scope of the invention is to be determined by the scope of the appended claims.

Claims (13)

1. A video watermarking method, comprising:
acquiring 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 during video playing.
2. The video watermarking method according to claim 1, wherein the generating a watermark transparent picture carrying the watermark information according to the watermark information includes:
generating a watermark text from the watermark information, and generating a watermark picture 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 the watermark transparent pictures carrying the watermark information.
3. The method for adding a video watermark according to claim 2, wherein after the pixel point information corresponding to the watermark picture block is respectively embedded into the corresponding transparent pictures according to the setting rule, the method further comprises:
and generating a numbered picture carrying the numbered information, and embedding the numbered picture into the specified position of the watermark transparent picture where the corresponding watermark picture block is located.
4. The video watermarking method of claim 3, wherein the generating of the numbered pictures carrying the numbering information comprises:
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.
5. The method of claim 2, wherein 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 respectively comprises:
dividing the watermark picture into a plurality of watermark picture blocks according to a set sequence according to the display direction of the fonts in the watermark picture; wherein each of the watermark picture blocks comprises a first number of pixel points;
dividing each transparent picture to be embedded with the watermark into the regions with the first quantity, and respectively embedding pixel points correspondingly contained in the watermark picture blocks into the designated positions in the regions corresponding to the transparent pictures, wherein the quantity of the transparent pictures is equal to that of the watermark picture blocks.
6. The video watermarking method according to claim 1, wherein after the generating of the watermark transparent picture carrying the watermark information according to the watermark information, further comprising:
after a video playing instruction is determined to be received, sequentially mixing the watermark transparent pictures into a video playing picture in a set time period; wherein the set time period is at least one of: a time period of fixed duration to set a regularly varying time period.
7. A method for extracting a video watermark, comprising:
extracting a target video frame mixed with a watermark transparent picture in a video playing picture;
and acquiring watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
8. The method for extracting a video watermark according to claim 7, wherein the extracting the target video frame mixed with the watermark transparent picture in the video playing picture comprises:
extracting a video frame in a video playing picture, calculating pixel points at the specified position of the video frame, and determining a numbered picture to be checked;
and when the to-be-verified numbered picture is determined to contain the set number information, the video frame corresponding to the to-be-verified numbered picture is taken as an initial video frame, and target video frames are sequentially determined according to the initial video frame and with a set time period as an interval.
9. The method for extracting a video watermark according to claim 8, wherein the obtaining watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame includes:
respectively acquiring pixel point information of a watermark picture block carried in a watermark transparent picture corresponding to the target video frame according to the pixel point information in the target video frame;
and splicing the watermark picture block according to the number information and the set time period, and determining watermark information according to the spliced watermark picture block.
10. A video watermarking apparatus, comprising:
the watermark generating module is used for acquiring watermark information;
and the watermark embedding module is used for generating a watermark transparent picture carrying the watermark information according to the watermark information, and the watermark transparent picture is used for being mixed into a video playing picture during video playing.
11. A video watermark extraction apparatus, comprising:
the watermark positioning module is used for extracting a target video frame mixed with a watermark transparent picture in a video playing picture;
and the watermark decoding module is used for acquiring the watermark information carried by the corresponding watermark transparent picture according to the pixel point information in the target video frame.
12. A video player terminal comprising a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,
the processor is configured to execute the video watermark adding method according to any one of claims 1 to 6 or the video watermark extracting method according to any one of claims 7 to 9 when the computer program is executed.
13. A computer storage medium, in which a computer program is stored, which when executed by a processor implements the video watermark adding method of any one of claims 1 to 6, or which when executed by a processor implements the video watermark extracting method of any one of claims 7 to 9.
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 true CN110896484A (en) 2020-03-20
CN110896484B 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)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669476A (en) * 2020-06-23 2020-09-15 北京字节跳动网络技术有限公司 Watermark processing method, device, electronic equipment and medium
CN111680273A (en) * 2020-05-21 2020-09-18 北京北信源软件股份有限公司 Watermark embedding method, 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
CN112040336A (en) * 2019-06-03 2020-12-04 中兴通讯股份有限公司 Method, device and equipment for adding and extracting video watermark
CN112383836A (en) * 2020-10-19 2021-02-19 深圳市九洲电器有限公司 Video verification system and method
CN112689159A (en) * 2020-12-22 2021-04-20 深圳市九洲电器有限公司 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
CN113923484A (en) * 2021-09-03 2022-01-11 杭州阔知网络科技有限公司 Video dynamic copyright information generation method and system
WO2022033485A1 (en) * 2020-08-13 2022-02-17 北京达佳互联信息技术有限公司 Video processing method and electronic device
CN115243112A (en) * 2022-06-07 2022-10-25 苏州思萃工业互联网技术研究所有限公司 Device that surveillance video traced to source
CN115426537B (en) * 2022-09-05 2023-10-13 上海赛连信息科技有限公司 Method and system for adding invisible watermark and tracing information in video picture

Citations (5)

* 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
US20160012564A1 (en) * 2014-07-10 2016-01-14 Wei Ma Method for embedding and extracting multi-scale space based watermark
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal

Patent Citations (5)

* 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
US20160012564A1 (en) * 2014-07-10 2016-01-14 Wei Ma Method for embedding and extracting multi-scale space based watermark
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040336A (en) * 2019-06-03 2020-12-04 中兴通讯股份有限公司 Method, device and equipment for adding and extracting video watermark
WO2020244474A1 (en) * 2019-06-03 2020-12-10 中兴通讯股份有限公司 Method, device and apparatus for adding and extracting video watermark
CN112040336B (en) * 2019-06-03 2023-03-14 中兴通讯股份有限公司 Method, device and equipment for adding and extracting video watermark
CN111680273A (en) * 2020-05-21 2020-09-18 北京北信源软件股份有限公司 Watermark embedding method, device, electronic equipment and readable storage medium
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
WO2021238931A1 (en) * 2020-05-26 2021-12-02 北京字节跳动网络技术有限公司 Video watermark processing method and apparatus, information transmission method, electronic device and storage medium
CN111669476A (en) * 2020-06-23 2020-09-15 北京字节跳动网络技术有限公司 Watermark processing method, device, electronic equipment and medium
WO2022033485A1 (en) * 2020-08-13 2022-02-17 北京达佳互联信息技术有限公司 Video processing method and electronic device
CN112383836A (en) * 2020-10-19 2021-02-19 深圳市九洲电器有限公司 Video verification system and method
CN112689159A (en) * 2020-12-22 2021-04-20 深圳市九洲电器有限公司 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
CN113923484A (en) * 2021-09-03 2022-01-11 杭州阔知网络科技有限公司 Video dynamic copyright information generation method and system
CN115243112A (en) * 2022-06-07 2022-10-25 苏州思萃工业互联网技术研究所有限公司 Device that surveillance video traced to source
CN115426537B (en) * 2022-09-05 2023-10-13 上海赛连信息科技有限公司 Method and system for adding invisible watermark and tracing information in video picture

Also Published As

Publication number Publication date
CN110896484B (en) 2023-05-05

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
US8363882B2 (en) User discernible watermarking
US7757089B2 (en) Apparatus, method and computer program for distributing and rendering content
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
EP2036035B1 (en) System and method for object oreinted fingerprinting of digital videos
US20030103645A1 (en) Integrating digital watermarks in multimedia content
CN108882055B (en) Video live broadcast method and system, and method and device for synthesizing video stream
US20080019577A1 (en) Video fingerprinting apparatus in frequency domain and method using the same
JP2003528538A (en) Transmarking watermark embedding function as rendering command and watermark embedding processing based on multimedia signal features
US10834158B1 (en) Encoding identifiers into customized manifest data
Su et al. A practical design of digital watermarking for video streaming services
US9111340B2 (en) Frequency-modulated watermarking
US7738677B2 (en) Efficient application of video marking technologies
CN112257035A (en) Digital work copyright protection method and device based on playing platform
JPH1175055A (en) Method for embedding information and method for extracting information and device for embedding information and device for extracting information and storage medium
Lin et al. Video and image watermark synchronization
US7356159B2 (en) Recording and reproduction apparatus, recording and reproduction method, recording and reproduction program for imperceptible information to be embedded in digital image data
KR101352830B1 (en) Efficient application of video marking technologies
WO2024040474A1 (en) Encrypted image watermark processing method and apparatus, and display device
CN117499665B (en) Image data embedding and extracting method and device based on gray value quantization
CN116527965A (en) Method and device for generating marked video and method and device for detecting video marks
US10282618B2 (en) Multi-blend fingerprinting
CN114971993A (en) Spread spectrum technology digital watermarking method and system based on cloud processing

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