CN113038268B - Plane advertisement implanting method and device - Google Patents

Plane advertisement implanting method and device Download PDF

Info

Publication number
CN113038268B
CN113038268B CN202110264096.2A CN202110264096A CN113038268B CN 113038268 B CN113038268 B CN 113038268B CN 202110264096 A CN202110264096 A CN 202110264096A CN 113038268 B CN113038268 B CN 113038268B
Authority
CN
China
Prior art keywords
material layer
frame
key frame
advertisement
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110264096.2A
Other languages
Chinese (zh)
Other versions
CN113038268A (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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202110264096.2A priority Critical patent/CN113038268B/en
Publication of CN113038268A publication Critical patent/CN113038268A/en
Application granted granted Critical
Publication of CN113038268B publication Critical patent/CN113038268B/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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • 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/81Monomedia components thereof
    • H04N21/812Monomedia components thereof involving advertisement data

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a method and a device for implanting a plane advertisement, in the method, a server acquires a key frame from a video clip in which the advertisement can be implanted, determines an area in which the advertisement can be implanted in the key frame, determines a transformation matrix between each common frame and the key frame in the video clip in which the advertisement can be implanted, and issues a material layer of the key frame and a transformation matrix between each common frame and the key frame to a player.

Description

Plane advertisement implanting method and device
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a method and an apparatus for implanting a planar advertisement.
Background
Currently, the advertisement delivery mode mainly includes modes of implanting advertisements in videos and the like. The method for implanting the advertisement in the video generally comprises the steps that a server issues an advertisement material layer, rendering layer time and rendering layer position of each frame in a video fragment to a front end, and the front end implants the advertisement in each frame according to the advertisement material layer, the rendering layer time and the rendering layer position of each frame.
However, this method has the problem that the number of the layers of the advertisement material is large, which may cause the increase of the network bandwidth and the long time for downloading the front end, which may affect the success rate of the advertisement.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present application provide a method and an apparatus for implanting a planar advertisement, so as to achieve the purposes of reducing the amount of information to be issued, saving network bandwidth, and facilitating to improve the delivery success rate, and the technical scheme is as follows:
a plane advertisement implanting method is applied to a server and comprises the following steps:
acquiring a key frame in a video clip in which an advertisement can be implanted, wherein the key frame is an image frame with an advertisement implantation condition;
determining an area where an advertisement can be implanted in the key frame, and generating a material layer of the key frame based on the area where the advertisement can be implanted, wherein the area, matched with the area where the advertisement can be implanted, in the material layer of the key frame comprises the advertisement to be implanted;
determining a transformation matrix between each common frame and the key frame in the video clip of the implantable advertisement, wherein the common frame is a frame different from the key frame in the video clip of the implantable advertisement;
and issuing a material layer of the key frame and a transformation matrix between each common frame and the key frame to a player so that the player combines the material layer of the key frame with the key frame, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of the key frame.
A plane advertisement implanting method is applied to a player and comprises the following steps:
receiving a material layer of a key frame sent by a server and a transformation matrix between each common frame and the key frame, wherein the key frame is an image frame which is acquired by the server in a video clip in which an advertisement can be implanted and has an advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and an area which is matched with the area in which the advertisement can be implanted in the key frame in the material layer of the key frame contains the advertisement to be implanted;
combining the material layer of the key frame with the key frame;
and calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of each common frame.
Optionally, the receiving a material layer of the key frame sent by the server includes:
receiving an advertisement implantation json protocol issued by a server, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame;
and acquiring the storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from the storage space corresponding to the storage address of the material layer of the key frame.
Optionally, the advertisement placement json protocol further includes a PTS time indicating to perform key frame rendering and a PTS time indicating to perform each general frame rendering;
the combining the material layer of the key frame with the key frame includes:
when the decoding time reaches the PTS time for indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame comprises:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
Optionally, the advertisement implantation json protocol further includes portrait mask pictures in the key frames and portrait mask pictures in each of the common frames;
the combining the material layer of the key frame with the key frame includes:
determining an overlapping part of a portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
setting a region matched with the first overlapping part in the material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
combining a first material layer to be used of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame comprises:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
setting the area matched with the second overlapping part in the material layer of each common frame to be transparent respectively to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
A plane advertisement implanting device is applied to a server and comprises:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring key frames in a video clip in which advertisements can be implanted, and the key frames are image frames with advertisement implantation conditions;
the generating module is used for determining an area where an advertisement can be implanted in the key frame and generating a material layer of the key frame based on the area where the advertisement can be implanted, wherein the area, matched with the area where the advertisement can be implanted, in the material layer of the key frame contains the advertisement to be implanted;
a determining module, configured to determine a transformation matrix between each common frame in the video segment of the advertisement and the key frame, where the common frame is a frame in the video segment of the advertisement that is different from the key frame;
and the issuing module is used for issuing the material layers of the key frames and the transformation matrixes between the common frames and the key frames to a player so that the player combines the material layers of the key frames with the key frames, calculates the material layers of the common frames based on the transformation matrixes and the material layers of the key frames, and combines the material layers of the common frames with the material layers.
A plane advertisement implanting device applied to a player comprises:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving material layers of key frames sent by a server and a transformation matrix between each common frame and the key frames, the key frames are image frames which are acquired by the server in video clips in which advertisements can be implanted and have advertisement implantation conditions, the common frames are frames which are different from the key frames in the video clips in which the advertisements can be implanted, and the material layers of the key frames contain advertisements to be implanted in areas which are matched with the areas in which the advertisements can be implanted in the key frames;
the first combination module is used for combining the material layer of the key frame with the key frame;
and the second assembling module is used for calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame and assembling the material layer of each common frame with the material layer of each common frame.
Optionally, the receiving module is specifically configured to:
receiving an advertisement implantation json protocol issued by a server, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame;
and acquiring the storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
Optionally, the advertisement placement json protocol further includes a PTS time indicating to perform key frame rendering and a PTS time indicating to perform each general frame rendering respectively;
the first combination module is specifically configured to:
when the decoding time reaches the PTS time indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the second combination module is specifically configured to:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
Optionally, the advertisement implantation json protocol further includes portrait mask pictures in the key frames and portrait mask pictures in each of the common frames;
the first combination module is specifically configured to:
determining an overlapping part of a portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
setting an area matched with the first overlapping part in a material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
combining a first material layer to be used of the key frame with the key frame;
the second combination module is specifically configured to:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
setting the area matched with the second overlapping part in the material layer of each common frame to be transparent respectively to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
Compared with the prior art, the beneficial effect of this application is:
in the application, the server acquires the key frames from the video clips in which the advertisements can be implanted, determines the areas in which the advertisements can be implanted in the key frames, determines the transformation matrix between each common frame and each key frame in the video clips in which the advertisements can be implanted, and issues the material layers of the key frames and the transformation matrix between each common frame and each key frame to the player.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a method for implanting a flat advertisement provided in embodiment 1 of the present application;
fig. 2 is a flowchart of a method for implanting a flat advertisement provided in embodiment 2 of the present application;
fig. 3 is a flowchart of a method for implanting a flat advertisement provided in embodiment 3 of the present application;
FIG. 4 is a flowchart of a method for implanting a flat advertisement provided in embodiment 4 of the present application;
FIG. 5 is a schematic diagram of a logic structure of a planar advertisement implanting device provided by the present application;
fig. 6 is a schematic logical structure diagram of another flat advertisement implanting device provided by the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, there is provided a flowchart of a flat advertisement placement method provided in embodiment 1 of the present application, where the method is applicable to a server, and the method may include, but is not limited to, the following steps:
and S11, acquiring a key frame from the video clip in which the advertisement can be implanted, wherein the key frame is an image frame with advertisement implantation conditions.
In this embodiment, the process of acquiring the key frame in the video clip with the advertisement can include, but is not limited to:
s1101, determining a video clip in which the advertisement can be implanted.
Specifically, the video to be processed may be subjected to a split-mirror processing, that is, the video to be processed is decomposed into a plurality of small videos according to different scenes, and each small video corresponds to one scene. Due to various reasons (such as the fact that the video is too short, the video scene is too complex, and no advertisement space suitable for advertisement placement exists), not every small video is suitable for advertisement placement, so that whether the small video has the suitable advertisement space or not can be detected in a target detection mode, and if the small video has the suitable advertisement space, the small video is used as a video clip capable of being placed with the advertisement.
The method for detecting whether there is a suitable advertisement space in the small video by adopting a target detection mode can include but is not limited to: specific targets such as billboards, screens or picture frames in the small video are detected. If a specific target such as a billboard, a publicity column, a screen or a picture frame exists in the small video, a proper advertisement space is determined in the small video.
And S1102, acquiring key frames in the video clips in which the advertisements can be implanted.
Acquiring key frames in a video clip in which an advertisement can be embedded can be understood as: and searching the image frames with the advertisement implantation conditions in the video clips in which the advertisements can be implanted, and if the image frames are searched, using the searched image frames as key frames.
The advertisement placement conditions may be set as desired, and are not limited in this application. For example, the ad placement conditions may be, but are not limited to: the specific target such as the billboard, the publicity column, the screen or the picture frame is not shielded, or the specific target such as the billboard, the publicity column, the screen or the picture frame is partially shielded, but the shielded part does not influence the advertisement display.
And S12, determining an area where the advertisement can be implanted in the key frame, and generating a material layer of the key frame based on the area where the advertisement can be implanted, wherein the area, matched with the area where the advertisement can be implanted, in the material layer of the key frame comprises the advertisement to be implanted.
Determining the area in which an advertisement can be placed in the key frame can be understood as: and determining a specific target area such as a billboard, a publicity column, a screen or a picture frame in the key frame, and taking the determined specific target area as an area in which the advertisement can be implanted.
Based on the area of the implantable advertisement, generating a material layer of the key frame, which can be understood as:
and projecting the advertisement to be implanted to the area of the implantable advertisement in the key frame, and carrying out sampling fusion on the advertisement to be implanted and the area of the implantable advertisement in the key frame to generate a material layer of the key frame.
And S13, determining a transformation matrix between each common frame and the key frame in the video clip of the implantable advertisement, wherein the common frame is a frame different from the key frame in the video clip of the implantable advertisement.
After the area of the implantable advertisement is determined in the key frame, the precise location of the four corner points of the area of the implantable advertisement may be determined based on a point location regression approach. Based on the accurate position of the four corner points of the advertisement-implantable area, the advertisement implantation can be accurately carried out in the advertisement-implantable area.
After determining the precise location of the four corner points of the area in which the advertisement is to be placed, the precise location of the four corner points of the area in which the advertisement is to be placed in each ordinary frame in the video segment of the implantable advertisement is determined by tracking the area in which the advertisement is to be placed in the video segment of the implantable advertisement.
Based on the precise locations of the four corner points of the region in the keyframe where the ad is implantable and the precise locations of the four corner points of the ad in each generic frame, a transformation matrix between the region in the keyframe where the ad is implantable and the region in each generic frame where the ad is implantable can be determined. In this embodiment, but not limited to: and taking a transformation matrix between the area where the advertisement can be planted in the key frame and the area where the advertisement can be planted in each ordinary frame as the transformation matrix between each ordinary frame and the key frame.
Step S14, issuing the material layer of the key frame and the transformation matrix between each common frame and the key frame to a player so that the player combines the material layer of the key frame with the key frame, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of the key frame.
Calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, which can be understood as: and for each common frame, carrying out transformation processing on the material layer of the key frame based on the transformation matrix corresponding to the common frame to obtain the material layer of the common frame.
In this embodiment, the issuing the material layer of the key frame to the player may include, but is not limited to:
and issuing an advertisement implantation json protocol to a player, wherein the advertisement implantation json protocol at least comprises the storage address of the material layer of the key frame.
Correspondingly, the player combines the material layer of the key frame with the key frame, calculates the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combines the material layer of each common frame with the material layer of the key frame, which can be understood as:
receiving an advertisement implantation json protocol issued by a server, acquiring a storage address of a material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame;
and combining the material layers of the key frames with the key frames, calculating the material layers of the common frames based on the transformation matrixes and the material layers of the key frames, and combining the material layers of the common frames with the material layers of the common frames.
Of course, the advertisement placement json protocol may also include a PTS (Presentation Time Stamp) Time indicating that key frame rendering is performed and a PTS Time indicating that each general frame rendering is performed, respectively.
Correspondingly, the combining the material layer of the key frame with the key frame may include:
when the decoding time reaches the PTS time indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame may include:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
The advertisement implantation json protocol can also comprise portrait mask pictures in the key frames and portrait mask pictures in each common frame;
correspondingly, the combining the material layer of the key frame with the key frame may include:
determining an overlapping part of a portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
the player sets an area matched with the first overlapping part in the material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
the player combines a first material layer to be used of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame may include:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
respectively setting the area matched with the second overlapping part in the material layer of each common frame to be transparent to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
Compared with the method of issuing the material layer of the key frame to the player, the method for issuing the advertisement to the player by the json protocol can further reduce the amount of issued information and save network bandwidth.
In the application, the server acquires the key frames from the video clips in which the advertisements can be implanted, determines the areas in which the advertisements can be implanted in the key frames, determines the transformation matrix between each common frame and the key frames in the video clips in which the advertisements can be implanted, and issues the material layers of the key frames and the transformation matrix between each common frame and the key frames to the player.
As another alternative embodiment of the present application, referring to fig. 2, there is provided a flowchart of an embodiment 2 of a method for implanting a flat advertisement, which can be applied to a player, as shown in fig. 2, and the method can include, but is not limited to, the following steps:
and S21, receiving a material layer of the key frame sent by the server and a transformation matrix between each common frame and the key frame.
The key frame is an image frame which is acquired by the server in a video clip in which the advertisement can be implanted and has the advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and the area which is matched with the area in which the advertisement can be implanted in the key frame in a material layer of the key frame contains the advertisement to be implanted.
And S22, combining the material layer of the key frame with the key frame.
And S23, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of each common frame.
The detailed procedures of steps S21-S23 can be referred to the related description in embodiment 1, and are not described herein again.
As another alternative embodiment of the present application, referring to fig. 3, there is provided a flowchart of an embodiment 3 of a planar advertisement implanting method provided in the present application, where this embodiment is mainly a refinement of the planar advertisement implanting method described in the above embodiment 2, as shown in fig. 3, the method may include, but is not limited to, the following steps:
and S31, receiving an advertisement implantation json protocol issued by the server and a transformation matrix between each common frame and each key frame, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of each key frame.
The key frame is an image frame which is acquired by the server in a video clip in which the advertisement can be implanted and has the advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and the area which is matched with the area in which the advertisement can be implanted in the key frame in a material layer of the key frame contains the advertisement to be implanted.
And S32, acquiring a storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
Steps S31 to S32 are a specific implementation of step S21 in example 2.
And step S33, combining the material layer of the key frame with the key frame.
And step S34, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of each common frame.
The detailed procedures of steps S33-S34 can be referred to the related description in embodiment 1, and are not described herein again.
In this embodiment, a server issues an advertisement implantation json protocol to a player, the player receives the advertisement implantation json protocol issued by the server, and acquires a storage address of a material layer of a key frame from the advertisement implantation json protocol, and acquires the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
As another alternative embodiment of the present application, referring to fig. 4, there is provided a flowchart of an embodiment 4 of a planar advertisement implanting method provided in the present application, where this embodiment is mainly a refinement of the planar advertisement implanting method described in the above embodiment 3, as shown in fig. 4, the method may include, but is not limited to, the following steps:
and S41, receiving an advertisement implantation json protocol issued by the server and a transformation matrix between each common frame and each key frame, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of each key frame, PTS time for indicating key frame rendering and PTS time for respectively indicating the common frame rendering.
The key frame is an image frame which is acquired by the server in a video clip in which an advertisement can be implanted and has an advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and an area which is matched with an area in which the advertisement can be implanted in the key frame in a material layer of the key frame comprises the advertisement to be implanted.
And S42, acquiring the storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
And S43, when the decoding time reaches the PTS time for indicating the key frame rendering, combining the material layer of the key frame with the key frame.
Step S43 is a specific implementation manner of step S33 in example 3.
And step S44, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of the common frame with the material layer of the common frame when the decoding time reaches the PTS time for indicating common frame rendering for each common frame.
Step S44 is a specific implementation manner of step S34 in example 3.
The server issues PTS time for indicating key frame rendering and PTS time for respectively indicating common frame rendering to the player, when decoding time reaches the PTS time for indicating the key frame rendering, the player combines the material layer of the key frame with the key frame, and when the decoding time reaches the PTS time for indicating the common frame rendering, the material layer of the common frame is combined with the material layer of the common frame, so that the combination can be more accurate, the condition that the key frame or the common frame is asynchronous with the material layer is greatly reduced, and the viewing experience of a user is improved.
As another alternative embodiment 5 of the present application, the present embodiment is mainly a refinement of the planar advertisement implanting method described in the above embodiment 3, and the method may include, but is not limited to, the following steps:
and S51, receiving an advertisement implantation json protocol issued by the server and a transformation matrix between each common frame and each key frame, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of each key frame, a portrait mask picture in each key frame and a portrait mask picture in each common frame.
The key frame is an image frame which is acquired by the server in a video clip in which an advertisement can be implanted and has an advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and an area which is matched with an area in which the advertisement can be implanted in the key frame in a material layer of the key frame comprises the advertisement to be implanted.
And S52, acquiring the storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
And S53, determining the overlapping part of the portrait mask picture in the key frame and the material layer of the key frame, and taking the determined overlapping part as a first overlapping part.
And step S54, setting the area matched with the first overlapping part in the material layer of the key frame to be transparent, and obtaining a first material layer to be used of the key frame.
And step S55, combining the first material layer to be used of the key frame with the key frame.
Steps S53 to S55 are a specific implementation of step S33 in example 3.
And step S56, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, determining the overlapping part of the portrait mask picture in each common frame and the material layer of the common frame, and taking the determined overlapping part as a second overlapping part.
And step S57, respectively setting the region matched with the second overlapping part in the material layer of each common frame to be transparent, and obtaining a second material layer to be used of each common frame.
And step S58, combining the second material layer to be used of each common frame with the common frame respectively.
Steps S56 to S58 are a specific implementation of step S34 in embodiment 3.
In this embodiment, the step S53 to the step S58 can prevent the material layer from shielding the portrait in the common frame or the key frame, and improve the accuracy of advertisement implantation.
As another optional embodiment 6 of the present application, the present embodiment is mainly a refinement of the planar advertisement implanting method described in the above embodiment 4, and the method may include, but is not limited to, the following steps:
and S61, receiving an advertisement implantation json protocol issued by a server and a transformation matrix between each common frame and a key frame, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame, PTS time for indicating key frame rendering, PTS time for respectively indicating common frame rendering, portrait mask pictures in the key frame and the portrait mask pictures in the common frames.
The key frame is an image frame which is acquired by the server in a video clip in which an advertisement can be implanted and has an advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and an area which is matched with an area in which the advertisement can be implanted in the key frame in a material layer of the key frame comprises the advertisement to be implanted.
And S62, acquiring a storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame.
And S63, determining an overlapping part of the portrait mask picture in the key frame and the material layer of the key frame, and taking the determined overlapping part as a first overlapping part.
And S64, setting a transparent area matched with the first overlapping part in the material layer of the key frame to obtain a first material layer to be used of the key frame.
And step S65, when the decoding time reaches the PTS time for indicating the key frame rendering, combining the first material layer to be used of the key frame with the key frame.
Steps S63 to S65 are a specific implementation of step S43 in example 4.
Step S66, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, determining the overlapping part of the portrait mask picture in each common frame and the material layer of the common frame, and taking the determined overlapping part as a second overlapping part.
And S67, respectively setting the area matched with the second overlapping part in the material layer of each common frame to be transparent, and obtaining a second material layer to be used of each common frame.
And S68, for each common frame, when the decoding time reaches the PTS time for indicating the common frame rendering, respectively combining the second material layer to be used of each common frame with the common frame.
Steps S66 to S68 are a specific implementation of step S44 in example 4.
Next, a planar advertisement implanting device provided by the present application will be described, and the planar advertisement implanting device described below and the planar advertisement implanting method described above may be referred to in correspondence.
Referring to fig. 5, the flat advertisement implanting apparatus is applied to a server, and includes: the system comprises an acquisition module 100, a generation module 200, a determination module 300 and a sending module 400.
An obtaining module 100, configured to obtain a key frame in a video clip in which an advertisement can be implanted, where the key frame is an image frame with an advertisement implantation condition;
a generating module 200, configured to determine an area in which an advertisement can be implanted in the key frame, and generate a material layer of the key frame based on the area in which the advertisement can be implanted, where an area in the material layer of the key frame, which is matched with the area in which the advertisement can be implanted, includes an advertisement to be implanted;
a determining module 300, configured to determine a transformation matrix between each ordinary frame and the key frame in the video segment in which the advertisement can be implanted, where the ordinary frame is a different frame from the key frame in the video segment in which the advertisement can be implanted;
the issuing module 400 is configured to issue, to a player, material layers of the key frame and a transformation matrix between each common frame and the key frame, so that the player combines the material layers of the key frame with the key frame, and based on each transformation matrix and the material layers of the key frame, calculate a material layer of each common frame, and combine the material layer of each common frame with the material layer of the key frame.
Referring to fig. 6, the flat advertisement implanting apparatus is applied to a player, and the apparatus includes: a receiving module 500, a first combining module 600, and a second combining module 700.
The receiving module 500 is configured to receive a material layer of a key frame sent by a server and a transformation matrix between each common frame and the key frame, where the key frame is an image frame with an advertisement implantation condition obtained by the server in a video clip in which an advertisement can be implanted, the common frame is a frame different from the key frame in the video clip in which the advertisement can be implanted, and an area in the material layer of the key frame, which is matched with an area in which the advertisement can be implanted in the key frame, contains an advertisement to be implanted;
a first combining module 600, configured to combine the material layer of the key frame with the key frame;
and a second combining module 700, configured to calculate a material layer of each ordinary frame based on each transformation matrix and the material layer of the key frame, and combine the material layer of each ordinary frame with the material layer of the ordinary frame.
In this embodiment, the receiving module 500 may be specifically configured to:
receiving an advertisement implantation json protocol issued by a server, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame;
and acquiring the storage address of the material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from the storage space corresponding to the storage address of the material layer of the key frame.
The advertisement placement json protocol may further include a PTS time indicating to perform key frame rendering and a PTS time indicating to perform each general frame rendering, respectively;
the first combination module 600 may be specifically configured to:
when the decoding time reaches the PTS time indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the second combination module 700 may be specifically configured to:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
The advertisement implantation json protocol can also comprise portrait mask pictures in the key frames and portrait mask pictures in each common frame;
the first combination module 600 may be specifically configured to:
determining an overlapping part of a portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
setting a region matched with the first overlapping part in the material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
combining a first material layer to be used of the key frame with the key frame;
the second combination module 700 may be specifically configured to:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
setting the area matched with the second overlapping part in the material layer of each common frame to be transparent respectively to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
It should be noted that each embodiment is mainly described as a difference from the other embodiments, and the same and similar parts between the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The defense method and device for cross-site scripting attack provided by the application are introduced in detail, specific examples are applied in the method to explain the principle and the implementation mode of the application, and the description of the embodiments is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A plane advertisement implanting method is applied to a server and comprises the following steps:
acquiring a key frame in a video clip in which an advertisement can be implanted, wherein the key frame is an image frame with an advertisement implantation condition;
determining an area where an advertisement can be implanted in the key frame, and generating a material layer of the key frame based on the area where the advertisement can be implanted, wherein the area, matched with the area where the advertisement can be implanted, in the material layer of the key frame comprises the advertisement to be implanted; projecting the advertisement to be implanted to the area of the implantable advertisement in the key frame, and carrying out sampling fusion on the advertisement to be implanted and the area of the implantable advertisement in the key frame to generate a material layer of the key frame;
determining a transformation matrix between each common frame and the key frame in the video clip of the implantable advertisement, wherein the common frame is a frame different from the key frame in the video clip of the implantable advertisement;
issuing a material layer of the key frame and a transformation matrix between each common frame and the key frame to a player so that the player combines the material layer of the key frame with the key frame, calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of the key frame;
wherein, the player combines the material layer of the key frame with the key frame, calculates the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combines the material layer of each common frame with the material layer of the key frame, including:
receiving an advertisement implantation json protocol issued by a server, acquiring a storage address of a material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame;
combining the material layers of the key frames with the key frames, calculating the material layers of the common frames based on the transformation matrixes and the material layers of the key frames, and combining the material layers of the common frames with the material layers of the common frames; wherein the calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame includes: and for each common frame, carrying out transformation processing on the material layer of the key frame based on the transformation matrix corresponding to the common frame to obtain the material layer of the common frame.
2. A plane advertisement implanting method is applied to a player and comprises the following steps:
receiving a material layer of a key frame sent by a server and a transformation matrix between each common frame and the key frame, wherein the key frame is an image frame which is acquired by the server in a video clip in which an advertisement can be implanted and has an advertisement implantation condition, the common frame is a frame which is different from the key frame in the video clip in which the advertisement can be implanted, and an area which is matched with the area in which the advertisement can be implanted in the key frame in the material layer of the key frame contains the advertisement to be implanted; the server projects the advertisement to be implanted to the area of the implantable advertisement in the key frame, and samples and fuses the advertisement to be implanted and the area of the implantable advertisement in the key frame to generate a material layer of the key frame;
combining the material layer of the key frame with the key frame;
calculating a material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of each common frame;
the material layer for receiving the key frame sent by the server comprises:
receiving an advertisement implantation json protocol issued by a server, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame;
acquiring a storage address of a material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame;
wherein the calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame includes: and for each common frame, carrying out transformation processing on the material layer of the key frame based on the transformation matrix corresponding to the common frame to obtain the material layer of the common frame.
3. The method of claim 2 wherein the ad placement json protocol further comprises PTS times indicating key frame rendering and PTS times indicating each ordinary frame rendering;
the combining the material layer of the key frame with the key frame includes:
when the decoding time reaches the PTS time indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame comprises:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
4. The method of claim 2, wherein said advertisement placement json protocol further comprises a portrait mask picture in said key frames and a portrait mask picture in each of said normal frames;
the combining the material layer of the key frame with the key frame includes:
determining an overlapping part of the portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
setting a region matched with the first overlapping part in the material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
combining a first material layer to be used of the key frame with the key frame;
the combining the material layer of each common frame with the material layer of each common frame comprises:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
setting the area matched with the second overlapping part in the material layer of each common frame to be transparent respectively to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
5. A plane advertisement implanting device is applied to a server, and comprises:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring key frames in a video clip in which advertisements can be implanted, and the key frames are image frames with advertisement implantation conditions;
the generating module is used for determining an area where an advertisement can be implanted in the key frame and generating a material layer of the key frame based on the area where the advertisement can be implanted, wherein the area, matched with the area where the advertisement can be implanted, in the material layer of the key frame contains the advertisement to be implanted; projecting the advertisement to be implanted to the area of the implantable advertisement in the key frame, and carrying out sampling fusion on the advertisement to be implanted and the area of the implantable advertisement in the key frame to generate a material layer of the key frame;
a determining module, configured to determine a transformation matrix between each common frame in the video segment of the advertisement and the key frame, where the common frame is a frame in the video segment of the advertisement that is different from the key frame;
the issuing module is used for issuing the material layer of the key frame and the transformation matrix between each common frame and the key frame to a player so that the player combines the material layer of the key frame with the key frame, calculates the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combines the material layer of each common frame with the material layer of each common frame;
wherein, the player combines the material layer of the key frame with the key frame, calculates the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combines the material layer of each common frame with the material layer of the key frame, including:
receiving an advertisement implantation json protocol issued by a server, acquiring a storage address of a material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame;
combining the material layers of the key frames with the key frames, calculating the material layers of the common frames based on the transformation matrixes and the material layers of the key frames, and combining the material layers of the common frames with the material layers of the common frames; wherein the calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame includes: and for each common frame, carrying out transformation processing on the material layer of the key frame based on the transformation matrix corresponding to the common frame to obtain the material layer of the common frame.
6. A plane advertisement implanting device, applied to a player, the device comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving material layers of key frames sent by a server and a transformation matrix between each common frame and the key frames, the key frames are image frames which are acquired by the server in video clips in which advertisements can be implanted and have advertisement implantation conditions, the common frames are frames which are different from the key frames in the video clips in which the advertisements can be implanted, and the material layers of the key frames contain advertisements to be implanted in areas which are matched with the areas in which the advertisements can be implanted in the key frames; the server projects the advertisement to be implanted to the area of the implantable advertisement in the key frame, and samples and fuses the advertisement to be implanted and the area of the implantable advertisement in the key frame to generate a material layer of the key frame;
the first combination module is used for combining the material layer of the key frame with the key frame;
the second assembly module is used for calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame, and combining the material layer of each common frame with the material layer of each common frame;
the receiving module is specifically configured to:
receiving an advertisement implantation json protocol issued by a server, wherein the advertisement implantation json protocol at least comprises a storage address of a material layer of the key frame;
acquiring a storage address of a material layer of the key frame from the advertisement implantation json protocol, and acquiring the material layer of the key frame from a storage space corresponding to the storage address of the material layer of the key frame;
wherein the calculating the material layer of each common frame based on each transformation matrix and the material layer of the key frame includes: and for each common frame, carrying out transformation processing on the material layer of the key frame based on the transformation matrix corresponding to the common frame to obtain the material layer of the common frame.
7. The apparatus of claim 6, wherein the advertisement placement json protocol further comprises PTS times indicating key frame rendering and PTS times indicating each normal frame rendering;
the first combination module is specifically configured to:
when the decoding time reaches the PTS time indicating the key frame rendering, combining the material layer of the key frame with the key frame;
the second combination module is specifically configured to:
and for each common frame, when the decoding time reaches the PTS time for indicating common frame rendering, combining the material layer of the common frame with the material layer.
8. The apparatus of claim 6, wherein said ad placement json protocol further comprises a portrait mask picture in said key frame and a portrait mask picture in each of said normal frames;
the first combination module is specifically configured to:
determining an overlapping part of the portrait mask picture in the key frame and a material layer of the key frame, and taking the determined overlapping part as a first overlapping part;
setting a region matched with the first overlapping part in the material layer of the key frame to be transparent to obtain a first material layer to be used of the key frame;
combining a first material layer to be used of the key frame with the key frame;
the second combination module is specifically configured to:
determining an overlapping part of the portrait mask picture in each common frame and a material layer of the common frame, and taking the determined overlapping part as a second overlapping part;
setting the area matched with the second overlapping part in the material layer of each common frame to be transparent respectively to obtain a second material layer to be used of each common frame;
and respectively combining the second material layer to be used of each common frame with the common frame.
CN202110264096.2A 2021-03-11 2021-03-11 Plane advertisement implanting method and device Active CN113038268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110264096.2A CN113038268B (en) 2021-03-11 2021-03-11 Plane advertisement implanting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110264096.2A CN113038268B (en) 2021-03-11 2021-03-11 Plane advertisement implanting method and device

Publications (2)

Publication Number Publication Date
CN113038268A CN113038268A (en) 2021-06-25
CN113038268B true CN113038268B (en) 2023-03-14

Family

ID=76470336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110264096.2A Active CN113038268B (en) 2021-03-11 2021-03-11 Plane advertisement implanting method and device

Country Status (1)

Country Link
CN (1) CN113038268B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378002B (en) 2021-08-11 2022-01-21 北京达佳互联信息技术有限公司 Information delivery method and device, electronic equipment and storage medium
CN116308530A (en) * 2023-05-16 2023-06-23 飞狐信息技术(天津)有限公司 Advertisement implantation method, advertisement implantation device, advertisement implantation equipment and readable storage medium
CN117939184A (en) * 2024-03-25 2024-04-26 成都索贝数码科技股份有限公司 Advertisement implantation method, device, equipment and medium for sports rebroadcasting field

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10482661B2 (en) * 2016-03-01 2019-11-19 International Business Machines Corporation Displaying of augmented reality objects
CN109461174B (en) * 2018-10-25 2021-01-29 北京陌上花科技有限公司 Video target area tracking method and video plane advertisement implanting method and system
CN110163188B (en) * 2019-06-10 2023-08-08 腾讯科技(深圳)有限公司 Video processing and method, device and equipment for embedding target object in video
CN110225389A (en) * 2019-06-20 2019-09-10 北京小度互娱科技有限公司 The method for being inserted into advertisement in video, device and medium

Also Published As

Publication number Publication date
CN113038268A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN113038268B (en) Plane advertisement implanting method and device
US11546667B2 (en) Synchronizing video content with extrinsic data
US9226005B2 (en) Preprocessing video to insert visual elements and applications thereof
US20160050465A1 (en) Dynamically targeted ad augmentation in video
CN109302619A (en) A kind of information processing method and device
US20170116160A1 (en) Systems and methods for adaptive content distribution
CN111553362B (en) Video processing method, electronic device and computer readable storage medium
KR20180111970A (en) Method and device for displaying target target
CN113204656A (en) Multimedia resource display method, device, equipment and storage medium
CN109005283A (en) Show method, apparatus, terminal and the storage medium of notification message
US10721519B2 (en) Automatic generation of network pages from extracted media content
CN115494987A (en) Video-based interaction method and device, computer equipment and storage medium
CN109286760B (en) Entertainment video production method and terminal thereof
CN115134663B (en) Information display method, device and system and electronic equipment
CN112235561B (en) LED display screen, display method and device and computer readable storage medium
WO2022103471A1 (en) Inserting digital contents into a multi-view video
GB2602474A (en) Audio synchronisation
CN110198455B (en) Content push monitoring method and device and storage medium
CN113345022B (en) Dynamic three-dimensional advertisement implanting method and device, electronic equipment and storage medium
CN112949252B (en) Text display method, apparatus and computer readable medium
US20120259709A1 (en) Systems and Methods for Associating Attribution Data with Digital Content
McMullan The digital moving image: Revising indexicality and transparency
CN106202295A (en) Showing advertisement method and system based on browser
CN115474072A (en) Content collaborative distribution processing method, device and equipment for multiple terminal equipment
KR20170112244A (en) System for providing real toon

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