CN113573141A - Video processing method and device, electronic equipment and storage medium - Google Patents

Video processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113573141A
CN113573141A CN202110828335.2A CN202110828335A CN113573141A CN 113573141 A CN113573141 A CN 113573141A CN 202110828335 A CN202110828335 A CN 202110828335A CN 113573141 A CN113573141 A CN 113573141A
Authority
CN
China
Prior art keywords
target video
information
counterfeiting
time
display
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
CN202110828335.2A
Other languages
Chinese (zh)
Other versions
CN113573141B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110828335.2A priority Critical patent/CN113573141B/en
Publication of CN113573141A publication Critical patent/CN113573141A/en
Application granted granted Critical
Publication of CN113573141B publication Critical patent/CN113573141B/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/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
    • H04N21/440245Processing 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 the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • 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

Abstract

The application provides a video processing method, a video processing device, an electronic device and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining anti-counterfeiting information of a target video, coding the anti-counterfeiting information to generate corresponding coded information, determining display duration corresponding to each coded symbol in the coded information based on the corresponding relation between a preset coded symbol and anti-counterfeiting mark display duration, determining display time corresponding to each display duration, and adding an anti-counterfeiting mark in a target video frame corresponding to the playing time and the display time in the target video. So, only need add anti-fake mark in the target video frame, need not to add anti-fake mark to whole target video, reduced the sheltering from of anti-fake mark to the video picture on the whole to this application has realized the anti-fake information of code in the time dimension, compares in directly adopting watermarks such as platform mark, and this scheme has promoted anti-fake information's security moreover, makes anti-fake information be difficult for being falsified.

Description

Video processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of video processing, and in particular, to a video processing method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of network technology, the continuous update of network facilities, the continuous popularization of intelligent equipment and the continuous increase of network users. In the prior art, various intelligent terminals can support video watching. The use of video is also frequently occurring in order to meet the needs of users. In order to protect the content of the video and prevent the video from being stolen, the video is usually prevented from being stolen by adding a watermark in the video.
However, in the current way of adding the watermark, images such as a station logo, an application icon and the like are usually added in the upper right corner of the video, the added images usually block the video image to influence the video viewing experience, and the watermark is easy to be perceived and is easily covered by infringers intentionally, so that the difficulty in tracking the infringement behavior after the fact is caused.
Disclosure of Invention
In order to overcome the technical problems in the related art, the present application provides a video processing method, an apparatus, an electronic device and a storage medium.
In a first aspect, an embodiment of the present application provides a video processing method, including:
acquiring anti-counterfeiting information of a target video;
encoding the anti-counterfeiting information to obtain corresponding encoded information;
determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, wherein the display duration represents the display duration of the anti-counterfeiting mark;
determining display time corresponding to each display time length, wherein the display time is the display time of the anti-counterfeiting mark in the target video;
and adding an anti-counterfeiting mark to a target video frame corresponding to the playing time and any display time in the target video.
As a possible implementation manner, the encoding the anti-counterfeit information to obtain corresponding encoded information includes:
and coding the anti-counterfeiting information based on a preset Morse code comparison table to obtain a corresponding Morse code.
As a possible implementation manner, the determining the display time corresponding to each display duration includes:
sequencing the display duration corresponding to each coding symbol in the coding information according to the arrangement sequence of the coding symbols in the coding information to obtain a display duration vector;
acquiring an initial adding time and an interval time, wherein the initial adding time is the playing time corresponding to the video frame of the first added anti-counterfeiting mark in the target video, the interval time is the interval time between two adjacent display times, and the anti-counterfeiting mark is not displayed in the interval time;
and determining the display time corresponding to each display time length based on the initial adding time, the interval time length and the display time length vector.
As a possible implementation manner, adding an anti-counterfeit mark to a target video frame corresponding to the playing time and any one of the display times in the target video includes:
determining a target video frame corresponding to the playing time and any display time in the target video;
if the target video is determined to be in the generation stage, replacing the image of any area in the target video frame with the anti-counterfeiting mark before encoding the target video frame;
and if the target video is determined to be in the playing stage, replacing the image of any area in the target video frame with the anti-counterfeiting mark before rendering the target video frame.
As a possible implementation manner, the replacing the image of any region in the target video frame with the anti-counterfeit mark includes:
and replacing the image of the preset anti-counterfeiting mark placement area in the target video frame with the anti-counterfeiting mark.
As a possible implementation, the method further includes:
before the anti-counterfeiting information is coded, the anti-counterfeiting information is encrypted so as to code the encrypted anti-counterfeiting information.
As a possible implementation, the method further includes:
before the anti-counterfeiting information is coded, verification information is added into the anti-counterfeiting information so as to code the anti-counterfeiting information added with the verification information.
As a possible implementation manner, the acquiring anti-counterfeiting information of the target video includes:
if the target video is determined to be in the generation stage, copyright information of the target video is obtained to serve as anti-counterfeiting information;
and if the target video is determined to be in the playing stage, acquiring equipment information and user information of a playing end as anti-counterfeiting information.
In a second aspect, an embodiment of the present application further provides a video processing apparatus, including:
the acquisition module acquires anti-counterfeiting information of a target video;
the encoding module is used for encoding the anti-counterfeiting information to obtain corresponding encoding information;
the display duration determining module is used for determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, and the display duration represents the display duration of the anti-counterfeiting mark;
the display time determining module is used for determining display time corresponding to each display time length, and the display time is the display time of the anti-counterfeiting mark in the target video;
and the anti-counterfeiting mark adding module is used for adding an anti-counterfeiting mark to a target video frame corresponding to the playing time and any display time in the target video.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory, the processor being configured to execute a data processing program stored in the memory to implement the video processing method of the first aspect.
In a fourth aspect, this application further provides a storage medium storing one or more programs, where the one or more programs are executable by one or more processors to implement the video processing method according to the first aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
the application provides a video processing method, which comprises the steps of obtaining anti-counterfeiting information of a target video, coding the anti-counterfeiting information to generate corresponding coded information, determining display duration corresponding to each coded symbol in the coded information based on the corresponding relation between a preset coded symbol and anti-counterfeiting mark display duration, determining display time corresponding to each display duration, and adding an anti-counterfeiting mark in a target video frame corresponding to the playing time and the display time in the target video. So, only need add anti-fake mark in the target video frame, need not to add anti-fake mark to whole target video to reduce the sheltering from of anti-fake mark to the video picture on the whole, and this application has realized the anti-fake information of code in the time dimension, compares in directly adopting watermarks such as platform mark, and this scheme has promoted anti-fake information's security moreover, makes anti-fake information be difficult for being falsified.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow diagram illustrating a video processing method according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method for determining presentation times corresponding to presentation durations in accordance with an exemplary embodiment;
FIG. 3 is a schematic illustration of a security device according to an exemplary embodiment;
FIG. 4 is a block diagram illustrating a video processing device according to an example embodiment;
FIG. 5 is a schematic diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, a flowchart of a video processing method provided in an embodiment of the present application is shown in fig. 1, where the method may include the following steps:
s11, anti-counterfeiting information of the target video is obtained.
In this embodiment of the application, the target video is a video to be processed, and the video may be a video in a generation stage, such as a video in a clipping stage and an editing stage, or a video in a playing stage, that is, a video that has been clipped, edited, and played in a terminal having a display screen.
As an embodiment, if it is determined that the target video is in the generation stage, copyright information of the target video may be acquired as the anti-counterfeiting information, where the copyright information may be an ID of a video producer, a production date, and the like. In practical applications, the copyright information may be input by a video producer or pre-stored in a preset location and then directly acquired from the preset location.
As another embodiment, if it is determined that the target video is in the playing stage, the playing end device information and the user information may be obtained as anti-counterfeit information, where the playing end device may be a mobile phone, a computer, or other device with a display screen, the playing end device information may include information such as a device model, an IMEI code (an international mobile equipment identity of the device), a UUID (a unique identifier of the device), and an IMSI (an international mobile subscriber identity of the device), and the user information may include information such as a user name. In practical applications, the information of the playing terminal device may be directly obtained from the playing terminal, and the user information may be input by a user or pre-stored in a preset position of the playing terminal device, and then directly obtained from the preset position.
And S12, encoding the anti-counterfeiting information to obtain corresponding encoded information.
The anti-counterfeiting information is usually a plain text consisting of characters, numbers, letters and the like, and is easy to be falsified, and the formats of different anti-counterfeiting information are not uniform, some anti-counterfeiting information are pure numbers, some anti-counterfeiting information are pure letters, and the numbers and the letters are combined, so that in order to improve the safety and the uniformity of the anti-counterfeiting information, the anti-counterfeiting information is coded according to a preset coding strategy, and the anti-counterfeiting information is converted into corresponding coding information.
As an embodiment, when encoding the anti-counterfeit information, the anti-counterfeit information may be encoded based on a preset moss code comparison table to obtain a corresponding moss code.
In practical application, a Morse code translator can be preset, and then the Morse code translator converts the anti-counterfeiting information into the Morse code.
Furthermore, because the Morse code translator can only convert letters, numbers and punctuation marks into Morse codes generally, but can not translate Chinese into the Morse codes directly, before the anti-counterfeiting information is converted into the Morse codes, whether the anti-counterfeiting information contains Chinese characters can be detected, if the anti-counterfeiting information contains the Chinese characters, the Chinese characters are converted into binary characters, and then the Morse codes translate the converted anti-counterfeiting information, so that the Morse codes corresponding to the anti-counterfeiting information are obtained.
S13, determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, wherein the display duration represents the display duration of the anti-counterfeiting mark.
In the embodiment of the application, the corresponding relation between the code symbols and the display duration of the anti-counterfeiting mark is preset, and the display durations corresponding to different code symbols are different. For example, the coded information is a morse code, where a morse code symbol "-" may correspond to 1 Ts, a "-" may correspond to 3Ts, and the length of Ts may be set according to the length of the target video.
Preferably, in order to ensure that the finished coded information can be displayed in the target video and reduce the occlusion of the video frame caused by the anti-counterfeiting mark, the length of Ts may be set to be smaller, for example, Ts may be 1 second.
S14, determining the display time corresponding to each display time length, wherein the display time is the display time of the anti-counterfeiting mark in the target video.
In the embodiment of the present application, the presentation time is a time when the anti-counterfeit mark is presented in the target video, the presentation time length of each code symbol corresponds to a presentation time, one presentation time is actually a time interval, and the length of the time interval is consistent with the presentation time length corresponding to the presentation time, for example, the presentation time length corresponding to the presentation time length Ts is a time interval with a length of Ts. And the anti-counterfeiting mark can be displayed in the target video within the time interval corresponding to the display time.
As an embodiment, as shown in fig. 2, determining the presentation time corresponding to each presentation duration may include the following steps:
and S21, sequencing the display duration corresponding to each code symbol in the coding information according to the arrangement sequence of the code symbols in the coding information to obtain a display duration vector.
As an embodiment, the presentation duration vector may be a 1 × n matrix, where n is the number of the coding symbols included in the coding information, and the arrangement order of the presentation durations included in the presentation duration vector is the arrangement order of the coding symbols corresponding to the presentation durations in the coding information.
An example, for an example that the encoded information is "- - - - - - - - - -" is taken as an example, a morse code symbol included therein is "-" "-" "" "", then a corresponding display duration according to "-" "is 1 Ts, a corresponding display duration according to" - "" is 3Ts, and a finally obtained display duration vector is (3Ts, 3 Ts.
And S22, acquiring the initial adding time and the interval duration.
The starting adding time is the playing time corresponding to the first video frame added with the anti-counterfeiting mark in the target video, namely the anti-counterfeiting mark is not added in the video frame before the starting adding time in the target video. The initial adding time may be set by the user according to actual requirements, or may be a fixed playing time, such as 01: 00. The interval duration is the interval duration between two adjacent display times, and the anti-counterfeiting mark is not displayed within the interval duration. The interval duration can be preset according to actual requirements.
It can be seen from the above that, in the embodiment of the application, the anti-counterfeit mark is not always displayed in the whole target video, but is displayed only after the initial adding time, and is not displayed within the interval duration, so that the occlusion of the anti-counterfeit mark on the video picture in the target video can be effectively reduced as a whole.
And S23, determining the display time corresponding to each display time length based on the initial adding time, the interval time length and the display time length vector.
As an embodiment, the display time corresponding to each display duration may be calculated by the following method:
for the display duration arranged at the first position in the display duration vector, the start time of the corresponding display duration may be the start adding time, and the end time may be the sum of the start adding time and the display duration, for example, if the start adding time is 00:00 and the display duration is 1s, the display duration corresponding to the display duration is 00:00-00: 01.
The display time corresponding to the display time except the display time arranged at the first position in the display time vector can be calculated in the following way:
the starting time of the display time corresponding to the display duration is the sum of the ending time of the display time corresponding to the display duration arranged one bit before the display duration and the interval duration, and the ending time of the display time corresponding to the display duration is the sum of the starting time of the display time and the display duration. For example, if the presentation duration is 3s, the end time of the presentation time corresponding to the presentation duration that is one bit before the presentation duration is 00:01, and the interval duration is 1s, the presentation time corresponding to the presentation duration is 00:02-00: 05.
The display time corresponding to each display time can be calculated through the method.
And S15, adding an anti-counterfeiting mark to a target video frame corresponding to the playing time and any display time in the target video.
In the embodiment of the application, after the display time corresponding to the anti-counterfeit mark is determined, a video frame (hereinafter referred to as a target video frame) whose playing time corresponds to any display time in the target video can be searched based on the display time, where the playing time corresponds to any display time, that is, the playing time belongs to any display time, for example, one display time is 00:02-00:05, and if the playing time of one video frame is 00:03, the video frame is determined to be the target video frame.
Specifically, the target video may be split into a plurality of video frames, and then the playing time of each video frame is compared with all the display times, so as to determine the target video frame corresponding to the playing time and any display time.
After the target video frame is determined, the anti-counterfeiting mark is added into the target video frame, and then the target video frame added with the anti-counterfeiting mark is added into the target video again, so that the anti-counterfeiting mark can be displayed within the display time corresponding to the anti-counterfeiting mark when the target video is played.
In the embodiment of the present application, the target video may be a video in a generation stage, and may also be a video in a playing stage.
As an embodiment, if it is determined that the target video is in the generation stage, after the target video frame is determined, the image of any area in the target video frame is replaced with the anti-counterfeiting mark before the target video frame is encoded.
As another embodiment, if it is determined that the target video is in the playing stage, after the target video frame is determined, the image of any area in the target video frame is replaced with the anti-counterfeiting mark before the target video frame is rendered.
As an example, the arbitrary area may be a pre-designated security mark placement area. Specifically, the user may designate an area as the anti-counterfeit mark placement area according to actual requirements, for example, may designate an area of 10 pixels away from each of the upper left corner and the left boundary of each video frame as the anti-counterfeit mark placement area. The anti-counterfeiting mark is added in such a way, so that the anti-counterfeiting mark can be conveniently positioned in the subsequent detection process of the anti-counterfeiting mark.
As another example, the arbitrary region may be an arbitrary region in a randomly selected target video frame. For example, a plurality of selectable regions may be preset for each video frame, for example, regions at four positions of top left, bottom left, top right, and bottom right of the video frame are used as the selectable regions, and then one of the selectable regions is randomly selected for adding the anti-counterfeiting mark for each video frame. By the method, the situation that illegal personnel cover the anti-counterfeiting marks in all the target video frames based on the placement area of the anti-counterfeiting marks in one target video frame can be effectively avoided.
Furthermore, after the area for adding the anti-counterfeiting mark is selected from the plurality of selectable areas, the distinguishing mark which is different from the anti-counterfeiting mark is added to other non-selected selectable areas, so that the area for adding the anti-counterfeiting mark can be positioned according to the distinguishing mark and the selectable areas when the anti-counterfeiting mark is detected subsequently.
Further, as an embodiment, the anti-counterfeit mark may be fixed or may be selected by the user according to the requirement, so that before the anti-counterfeit mark is added to the target video frame, a process of determining the anti-counterfeit mark may be further included.
As one example, the security feature may be determined in the following manner:
the method comprises the steps of presetting an anti-counterfeiting mark library, wherein the anti-counterfeiting mark library comprises a plurality of anti-counterfeiting marks, the anti-counterfeiting marks can be coding color blocks which are not obvious and can be identified (such as color blocks which are shown in figure 3 and are formed by squares with the color of A and triangles with the color of B and fixed inside the squares), displaying an anti-counterfeiting mark selection interface before adding the anti-counterfeiting marks to a target video frame, displaying the anti-counterfeiting marks in the anti-counterfeiting mark selection interface, enabling a user to select the required anti-counterfeiting marks from the anti-counterfeiting mark selection interface according to requirements, and enabling the anti-counterfeiting marks selected by the user to be used as the anti-counterfeiting marks to be added to the target video frame based on the selection operation of the user.
Further, if the selection operation of the user is not received within the preset time, one anti-counterfeiting mark can be randomly selected from the plurality of anti-counterfeiting marks to serve as the anti-counterfeiting mark added to the target video frame, or a preset default anti-counterfeiting mark can be used as the anti-counterfeiting mark added to the target video frame.
Further, if the anti-counterfeiting mark selection interface does not have the anti-counterfeiting mark required by the user, that is, the anti-counterfeiting mark library does not have the anti-counterfeiting mark desired by the user, the user can click an import button in the anti-counterfeiting mark selection interface to jump to the import interface, import the anti-counterfeiting mark stored in the local file or downloaded from the network into the import interface, then take the anti-counterfeiting mark imported by the user as the anti-counterfeiting mark added into the target video frame, and add the imported anti-counterfeiting mark into the anti-counterfeiting mark library.
By the mode, the self-definition of the anti-counterfeiting mark can be realized, so that the user experience is improved.
The application provides a video processing method, which comprises the steps of obtaining anti-counterfeiting information of a target video, coding the anti-counterfeiting information to generate corresponding coded information, determining display duration corresponding to each coded symbol in the coded information based on the corresponding relation between a preset coded symbol and anti-counterfeiting mark display duration, determining display time corresponding to each display duration, and adding an anti-counterfeiting mark in a target video frame corresponding to the playing time and the display time in the target video. So, only need add anti-fake mark in the target video frame, need not to add anti-fake mark to whole target video to reduce the sheltering from of anti-fake mark to the video picture on the whole, and this application has realized the anti-fake information of code in the time dimension, compares in directly adopting watermarks such as platform mark, and this scheme has promoted anti-fake information's security moreover, makes anti-fake information be difficult for being falsified.
In another video processing method provided by another embodiment of the present application, on the basis of the above embodiment, the method may further include:
before the anti-counterfeiting information is coded, the anti-counterfeiting information is encrypted so as to code the encrypted anti-counterfeiting information and generate corresponding coded information.
Based on the content, when the anti-counterfeiting information is subsequently restored according to the anti-counterfeiting mark, the coded information can be restored according to the display time of the anti-counterfeiting mark, then the coded information is converted, the encrypted anti-counterfeiting information can be obtained, and the encrypted anti-counterfeiting information can be decrypted to obtain the anti-counterfeiting information.
According to the video processing method provided by the embodiment of the application, after the anti-counterfeiting information is encrypted, the security of the anti-counterfeiting information can be further improved.
Another video processing method provided by another embodiment of the present application may further include, on the basis of any of the above embodiments:
before the anti-counterfeiting information is coded, the verification information is added into the anti-counterfeiting information so as to code the anti-counterfeiting information added with the verification information and obtain corresponding coded information.
In practical application, the verification information can be added at the head and the tail of the anti-counterfeiting information, so that the integrity of the anti-counterfeiting information can be verified according to the verification information when the anti-counterfeiting information is subsequently restored according to the anti-counterfeiting mark in the target video.
In another video processing method provided by another embodiment of the present application, on the basis of any one of the above embodiments, determining a presentation time corresponding to each presentation duration may further include:
and acquiring cycle duration, and calculating corresponding second display time of each display duration based on the first display time and the cycle duration corresponding to each display duration after determining the display time (hereinafter referred to as first display time) corresponding to each display duration based on the initial adding time, the interval duration and the display duration vector.
As an embodiment, the second display time corresponding to each display duration may be calculated in the following manner:
and calculating a time difference between the starting time of the first display time corresponding to the display time arranged at the first position in the display time length vector and the ending time of the first display time corresponding to the display time arranged at the last position, wherein aiming at any display time length, the starting time of the corresponding second display time is the sum of the starting time of the corresponding first display time and the time difference and the cycle time length, and the ending time of the corresponding second display time is the sum of the starting time of the second display time and the display time length.
For example, if the first presentation time corresponding to the presentation time length arranged at the first position is 00:00-00:01, the end time of the first presentation time corresponding to the presentation time length arranged at the last position is 00: 50, the cycle duration is 10min, then the second display time corresponding to the display duration arranged at the first position is 10: 50-10:51.
Of course, the third display time and the fourth display time corresponding to each display time can be calculated in addition to the second display time corresponding to each display time, the calculation is specifically determined according to the cycle number, if the cycle is twice, only the first display time and the second display time need to be calculated, if the cycle is three times, the first display time, the second display time and the third display time are calculated, and so on.
The manner of calculating the third display time, the fourth display time, and the like is similar to the manner of calculating the second display time, taking the calculation of the third display time as an example, that is, the starting time of the third display time of any display time duration is the sum of the corresponding starting time of the second display time, the time difference value and the cycle time duration, and the ending time of the corresponding third display time is the sum of the starting time of the third display time and the display time duration.
And all the display time corresponding to each display time length obtained by calculation is used as final display time for determining the target video frame, and the cyclic display of the anti-counterfeiting information in the target video can be realized by the mode.
For any of the above embodiments, when the target video added with the anti-counterfeiting mark is played, the encoding information can be obtained in the following manner;
the anti-counterfeiting marks in the video are detected, a display duration vector is obtained according to the display time of each anti-counterfeiting mark detected in sequence, coding symbols corresponding to each display duration in the display duration vector are obtained based on the corresponding relation between preset display durations and the coding symbols, and the coding symbols are sequenced according to the same sequence as each display duration in the display duration vector, so that coding information is obtained.
Furthermore, the anti-counterfeiting information can be obtained after the operations such as decoding, decryption and the like are carried out on the coded information.
Referring to fig. 4, a schematic diagram of a video processing apparatus according to another embodiment of the present disclosure is shown in fig. 4, where the video processing apparatus according to this embodiment may include:
an obtaining module 401, configured to obtain anti-counterfeiting information of a target video;
the encoding module 402 is configured to encode the anti-counterfeit information to obtain corresponding encoded information;
a display duration determining module 403, configured to determine, based on a corresponding relationship between preset code symbols and display durations, display durations corresponding to the code symbols in the code information, where the display durations indicate display durations of the anti-counterfeit marks;
a display time determining module 404, configured to determine display time corresponding to each display duration, where the display time is display time of the anti-counterfeit mark in the target video;
and the anti-counterfeiting mark adding module 405 is configured to add an anti-counterfeiting mark to a target video frame corresponding to any display time and playing time in the target video.
As an embodiment, the encoding module 402 is specifically configured to:
and coding the anti-counterfeiting information based on a preset Morse code comparison table to obtain a corresponding Morse code.
As an embodiment, the presentation time determining module 404 is specifically configured to:
sequencing the display duration corresponding to each coding symbol in the coding information according to the arrangement sequence of the coding symbols in the coding information to obtain a display duration vector;
acquiring initial adding time and interval time, wherein the initial adding time is the playing time corresponding to the video frame of the first added anti-counterfeiting mark in the target video, the interval time is the time interval between two adjacent display times, and the anti-counterfeiting mark is not displayed in the interval time;
and determining the display time corresponding to each display time length based on the initial adding time, the interval time length and the display time length vector.
As an embodiment, the anti-counterfeit mark adding module 405 is specifically configured to:
determining a target video frame corresponding to the playing time and any display time in the target video;
if the target video is in the generation stage, replacing the image of any area in the target video frame with an anti-counterfeiting mark before encoding the target video frame;
and if the target video is determined to be in the playing stage, replacing the image of any area in the target video frame with the anti-counterfeiting mark before rendering the target video frame.
As an embodiment, replacing the image of any region in the target video frame with an anti-counterfeiting mark includes:
and replacing the image of the anti-counterfeiting mark placing area preset in the target video frame with the anti-counterfeiting mark.
As an embodiment, the apparatus may further include (not shown in fig. 4):
and the encryption module is used for encrypting the anti-counterfeiting information before encoding the anti-counterfeiting information so as to encode the anti-counterfeiting information after encryption.
As an embodiment, the apparatus may further include (not shown in fig. 4):
and the verification module is used for adding verification information into the anti-counterfeiting information before the anti-counterfeiting information is coded so as to code the anti-counterfeiting information added with the verification information.
As an embodiment, the obtaining module 401 is specifically configured to:
if the target video is determined to be in the generation stage, copyright information of the target video is obtained to serve as anti-counterfeiting information;
and if the target video is determined to be in the playing stage, acquiring the equipment information and the user information of the playing end as anti-counterfeiting information.
Referring to fig. 5, a schematic diagram of an electronic device according to another embodiment of the present application is provided.
As shown in fig. 5, the electronic device 500 provided in the present embodiment includes: at least one processor 501, memory 502, at least one network interface 503, and other user interfaces 504. The various components in the electronic device 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. X.
The user interface 504 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 502 in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and a second application 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The second application 5022 includes various second applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present application may be included in the second application 5022.
In this embodiment of the application, by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the second application 5022, the processor 501 is configured to execute the method steps provided by the method embodiments, for example, including:
acquiring anti-counterfeiting information of a target video;
encoding the anti-counterfeiting information to obtain corresponding encoded information;
determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, wherein the display duration represents the display duration of the anti-counterfeiting mark;
determining the display time corresponding to each display time length, wherein the display time is the display time of the anti-counterfeiting mark in the target video;
and adding an anti-counterfeiting mark for a target video frame corresponding to the playing time and any display time in the target video.
The method disclosed in the embodiments of the present application may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented in one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions of the present Application, or a combination thereof.
For a software implementation, the techniques herein may be implemented by means of units performing the functions herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The embodiment of the application also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, to implement the video processing method executed on the electronic device side as described above.
The processor is used for executing the video processing method program stored in the memory so as to realize the following steps of the video processing method executed on the electronic equipment side:
acquiring anti-counterfeiting information of a target video;
encoding the anti-counterfeiting information to obtain corresponding encoded information;
determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, wherein the display duration represents the display duration of the anti-counterfeiting mark;
determining the display time corresponding to each display time length, wherein the display time is the display time of the anti-counterfeiting mark in the target video;
and adding an anti-counterfeiting mark for a target video frame corresponding to the playing time and any display time in the target video.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (11)

1. A video processing method, comprising:
acquiring anti-counterfeiting information of a target video;
encoding the anti-counterfeiting information to obtain corresponding encoded information;
determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, wherein the display duration represents the display duration of the anti-counterfeiting mark;
determining display time corresponding to each display time length, wherein the display time is the display time of the anti-counterfeiting mark in the target video;
and adding an anti-counterfeiting mark to a target video frame corresponding to the playing time and any display time in the target video.
2. The method of claim 1, wherein said encoding the anti-counterfeiting information to obtain corresponding encoded information comprises:
and coding the anti-counterfeiting information based on a preset Morse code comparison table to obtain a corresponding Morse code.
3. The method according to claim 1, wherein the determining the presentation time corresponding to each presentation duration comprises:
sequencing the display duration corresponding to each coding symbol in the coding information according to the arrangement sequence of the coding symbols in the coding information to obtain a display duration vector;
acquiring an initial adding time and an interval time, wherein the initial adding time is the playing time corresponding to the video frame of the first added anti-counterfeiting mark in the target video, the interval time is the interval time between two adjacent display times, and the anti-counterfeiting mark is not displayed in the interval time;
and determining the display time corresponding to each display time length based on the initial adding time, the interval time length and the display time length vector.
4. The method according to claim 1, wherein said adding an anti-counterfeit mark to a target video frame corresponding to any one of said presentation times at a playing time in said target video comprises:
determining a target video frame corresponding to the playing time and any display time in the target video;
if the target video is determined to be in the generation stage, replacing the image of any area in the target video frame with the anti-counterfeiting mark before encoding the target video frame;
and if the target video is determined to be in the playing stage, replacing the image of any area in the target video frame with the anti-counterfeiting mark before rendering the target video frame.
5. The method according to claim 4, wherein the replacing the image of any region in the target video frame with the anti-counterfeiting mark comprises:
and replacing the image of the preset anti-counterfeiting mark placement area in the target video frame with the anti-counterfeiting mark.
6. The method of claim 1, further comprising:
before the anti-counterfeiting information is coded, the anti-counterfeiting information is encrypted so as to code the encrypted anti-counterfeiting information.
7. The method of claim 1, further comprising:
before the anti-counterfeiting information is coded, verification information is added into the anti-counterfeiting information so as to code the anti-counterfeiting information added with the verification information.
8. The method of claim 1, wherein the obtaining of the anti-counterfeiting information of the target video comprises:
if the target video is determined to be in the generation stage, copyright information of the target video is obtained to serve as anti-counterfeiting information;
and if the target video is determined to be in the playing stage, acquiring equipment information and user information of a playing end as anti-counterfeiting information.
9. A video processing apparatus, comprising:
the acquisition module acquires anti-counterfeiting information of a target video;
the encoding module is used for encoding the anti-counterfeiting information to obtain corresponding encoding information;
the display duration determining module is used for determining the display duration corresponding to each code symbol in the code information based on the corresponding relation between the preset code symbol and the display duration, and the display duration represents the display duration of the anti-counterfeiting mark;
the display time determining module is used for determining display time corresponding to each display time length, and the display time is the display time of the anti-counterfeiting mark in the target video;
and the anti-counterfeiting mark adding module is used for adding an anti-counterfeiting mark to a target video frame corresponding to the playing time and any display time in the target video.
10. An electronic device, comprising: a processor and a memory, the processor being configured to execute a data processing program stored in the memory to implement the video processing method of any of claims 1-8.
11. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the video processing method of any one of claims 1-8.
CN202110828335.2A 2021-07-21 2021-07-21 Video processing method and device, electronic equipment and storage medium Active CN113573141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110828335.2A CN113573141B (en) 2021-07-21 2021-07-21 Video processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110828335.2A CN113573141B (en) 2021-07-21 2021-07-21 Video processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113573141A true CN113573141A (en) 2021-10-29
CN113573141B CN113573141B (en) 2022-09-30

Family

ID=78166101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110828335.2A Active CN113573141B (en) 2021-07-21 2021-07-21 Video processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113573141B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157884A (en) * 2021-12-02 2022-03-08 瑞森网安(福建)信息科技有限公司 Efficient cloud video cross-device screen projection method and system and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110188700A1 (en) * 2008-12-01 2011-08-04 Kt Corporation Apparatus for inserting watermark and method therefor
US20180033113A1 (en) * 2016-08-01 2018-02-01 International Business Machines Corporation Multiple source watermarking for surveillance
CN109671011A (en) * 2018-11-29 2019-04-23 深圳企业云科技股份有限公司 Embedding grammar, extracting method and the electronic equipment of copyright information
CN110062291A (en) * 2019-04-29 2019-07-26 王子孟 A kind of digital watermarking addition and extracting method, apparatus and system
CN110674476A (en) * 2019-08-29 2020-01-10 万翼科技有限公司 File printing method and device with embedded dark watermark
CN111526388A (en) * 2020-04-29 2020-08-11 北京奇艺世纪科技有限公司 Video playing method and device and video playing control method and device
CN111741377A (en) * 2020-05-19 2020-10-02 北京奥鹏远程教育中心有限公司 Video processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110188700A1 (en) * 2008-12-01 2011-08-04 Kt Corporation Apparatus for inserting watermark and method therefor
US20180033113A1 (en) * 2016-08-01 2018-02-01 International Business Machines Corporation Multiple source watermarking for surveillance
CN109671011A (en) * 2018-11-29 2019-04-23 深圳企业云科技股份有限公司 Embedding grammar, extracting method and the electronic equipment of copyright information
CN110062291A (en) * 2019-04-29 2019-07-26 王子孟 A kind of digital watermarking addition and extracting method, apparatus and system
CN110674476A (en) * 2019-08-29 2020-01-10 万翼科技有限公司 File printing method and device with embedded dark watermark
CN111526388A (en) * 2020-04-29 2020-08-11 北京奇艺世纪科技有限公司 Video playing method and device and video playing control method and device
CN111741377A (en) * 2020-05-19 2020-10-02 北京奥鹏远程教育中心有限公司 Video processing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
牛夏牧: "基于时间轴上模板的动态图像数字水印处理技术", 《电子学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157884A (en) * 2021-12-02 2022-03-08 瑞森网安(福建)信息科技有限公司 Efficient cloud video cross-device screen projection method and system and storage medium

Also Published As

Publication number Publication date
CN113573141B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
US9009482B2 (en) Forensic marking using a common customization function
CN110896484B (en) Video watermark adding and extracting method and device, video playing end and storage medium
CN111881422B (en) Picture processing method and device based on block chain
CN106507200B (en) Video playing content insertion method and system
CN102970307B (en) Cipher safety system and password safety method
CN108921266B (en) Static two-dimensional code encryption display method and device based on image segmentation
CN101473345A (en) System and method for adding fingerprint into digital video facing object
CN113573141B (en) Video processing method and device, electronic equipment and storage medium
US10250900B2 (en) Systems and methods for embedding metadata into video contents
CN114598937B (en) Animation video generation and playing method and device
CN111046199A (en) Method for adding bystander to image and electronic equipment
JP2010191966A (en) Method and device for accessing protected digital content
US7831060B2 (en) Method for protecting content of vector graphics formats
CN111836054B (en) Video anti-piracy method, electronic device and computer readable storage medium
CN109862295B (en) GIF generation method, device, computer equipment and storage medium
CN113810189B (en) Method and device for generating key picture
JP2003078515A (en) Contents distributing system, decoding device, encrypting device, decoding program, and encrypting program
CN113672961B (en) Information leakage tracking method and device
KR100988309B1 (en) Inserting method of document identifier and decoding method thereof
CN114070950B (en) Image processing method, related device and equipment
CN114697738B (en) HDCP KEY value encoding and decoding method, device, equipment and storage medium
JP3922369B2 (en) Embedded information recording apparatus and reproducing apparatus, recording program, and reproducing program
CN116109469B (en) Baseboard management controller, image display method, device and computer medium
WO2023103572A1 (en) Devices, methods, and computer readable media for screen-capture communication
CN117793463A (en) Video sensitive data protection method, device, equipment and medium

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