Summary of the invention
The invention provides a kind of insertion advertising method and device, in order to solve the problem of the video content associated advertisement that present prior art can't insert automatically and play.
The invention provides following technical scheme:
A kind of method of inserting method may further comprise the steps:
Server obtains the label corresponding with video content when the operation video content, and searches and this label associated advertisement;
Described server is selected one or more advertisements and is inserted into the assigned address of described video content from the advertisement that finds.
The label of video content and the label of advertisement are carried out fuzzy matching, from the advertisement that the match is successful, select one or more advertisements.
Obtain the label of described video content from video file, this video file comprises this video content and the label corresponding with this video content; Perhaps
With the label of the classification under the described video content as this video content; Perhaps
Obtain the label of this video content according to the title of described video content.
According to the theme of a frame that from described video content, extracts or this video content of multi-frame video data analysis, and obtain described label according to this theme.
Extract the frame adjacent or the video data of continuous multiple frames, analyze the theme of described video content and obtain described label according to this theme according to this video data with described position.
The corresponding a plurality of labels of described video content, described server is respectively according to each label lookup associated advertisement.
Described a plurality of label is provided with priority, and described server is searched associated advertisement from high to low according to the priority of label.
Described associated advertisement is provided with priority, and described server is selected one or more advertisements by this priority from the advertisement that finds, and is inserted into described video content by this priority.
Described server obtains described label when the described video content that receiving terminal apparatus sends, and inserts advertisement when this video content being carried out the coded format conversion.
In being decoded into the video content of initial data, insert the advertisement of initial data; Further Unified coding is carried out in the video content and the advertisement of initial data, and generate the video content that comprises advertisement; Perhaps
Insert advertisement in the video content behind coding, generate the video content that comprises advertisement with same-code form.
Issue the Media Stream of the advertisement of having selected when issuing described video content at described assigned address, and finish the back from the continuous Media Stream that passes this video content of this assigned address at sending advertisement down.
Determine described position according to default time parameter or frame parameter; Perhaps
With the original position of video content or end position place as described position.
Write down this position of inserting advertisement and the length of advertisement, when inserting advertisement next time,, and insert advertisement again at assigned address according to the advertisement of this this insertion of record deletion.
When inserting advertisement next time, insertion portion or all different advertisements with this.
A kind of device that inserts advertisement comprises:
Memory cell is used for store video content and advertisement;
Insert the unit, be used to obtain the label corresponding, and search and this label associated advertisement, and from the advertisement that finds, select one or more advertisements and be inserted into the assigned address of described video content with video content.
The beneficial effect of the embodiment of the invention is as follows:
Server makes the advertisement of insertion relevant with the theme of video content according to the label lookup associated advertisement of video content and be inserted into video content in the present embodiment, increases user's experience, and helps the propaganda of businessman to commodity.Present embodiment also provides server receiving or issuing the method for inserting advertisement in the video content process, makes the mode of inserting advertisement more flexible.
Embodiment
In order to solve the problem of the video content associated advertisement that present prior art can't insert automatically and play, server realizes inserting related advertisement by the label of the label of video content and advertisement is compared in the present embodiment.
Video file comprises header file and video content in the present embodiment, header file comprise this video content title, ownership classification and have the information such as label of priority.
Referring to Fig. 1, system configuration comprisesterminal 101,server 102 and the Internet 103 in the present embodiment.Wherein, the information interaction between the Internet 103realization terminals 101 and theserver 102;Terminal 101 toserver 102 send a request message, uploaded videos file or download and displaying video content etc.;Server 102 obtains label from the video file that receives, and according to this label lookup associated advertisement, and according to default time parameter or frame parameter the advertisement that finds is inserted into assigned address in the video content.
Referring to Fig. 2,server 102 comprises receivingelement 201,inserts unit 202,memory cell 203, transmittingelement 204 andsearches unit 205 in the present embodiment.Wherein, the video file uploaded by the Internet 103 receivingterminals 101 of receivingelement 201;Memory cell 203 store video files and advertisement, the memory cell of stores advertisements can be at home server;Search unit 205 and from the video file that receives, obtain label, and inmemory cell 203, search associated advertisement according to this label; Insertunit 202 and from the advertisement that finds, select one or more advertisements, and according to default time parameter or frame parameter the advertisement of selecting is inserted into assigned address in the video content, and the video content that has advertisement that will generatestores memory cell 203 into; Transmittingelement 204 sends the video content that has related advertisement toterminal 101, perhaps according to the indication of insertingunit 202, at the Media Stream of assigned address break of video content, issue the Media Stream of related advertisement, begin the continuous Media Stream that passes video content from this assigned address then.
Referring to Fig. 3, the main flow process of inserting advertisement in the present embodiment is as follows:
Step 301:server 102 is operated video contents, and obtains the label corresponding to video content.This operation comprises that receiver, video content, converting video content (as coding, decoding etc.) send video flowing.
Step 302:server 102 promptly, carries out fuzzy matching with the label of video content and the label of advertisement according to the label lookup associated advertisement of video content, finds the pairing advertisement of advertisement tag that the match is successful.
Step 303:server 102 is selected one or more advertisements from the advertisement that finds, and is inserted into appointed positions in the video content.
Server 102 is searched associated advertisement according to the priority of predefined label in the present embodiment, and the advertisement that finds is provided with priority, and selects one or more advertisements to be inserted into video content according to the priority of advertisement.
Server 102 has multiple mode to obtain label in the present embodiment, is thatserver 102 directly obtains defined label from header file as a kind of mode; As another kind of mode is that header file is not when comprising label,server 102 obtains label or will belong to classification as label from title, and be that it defines priority, again orserver 102 from video content, read a frame or a few frame video data, from this video data, analyze the theme of video content and define label, and be label definition priority.The example that obtains label is as follows:
For example, video content is the fragment that giant panda eats bamboo, and name is called love wild animal giant panda, belongs to educational, and label is " animal ", " panda " and " environmental protection " by priority orders from high tolow.Server 102 is searched the advertisement with " animal " label earlier, and lookup result is animal 1 and animal 2, and wherein 1 and 2 is the keyword of respective advertisement, and sign is corresponding to the priority of the different advertisements of same label.Then according to panda " and " environmental protection " continue to search.Server 102 adopts the mode of fuzzy matching to search advertisement according to the label of video content in the present embodiment, for example label " panda " can further be searched in the label advertisement that has " bear " or " cat " according to " bear " and " cat " when searching failure according to " panda ".
If when not comprising label in the header file, can be with the noun in the title " love wild animal giant panda " as label, promptly label is " animal " and " giant panda ".Perhaps the classification that this video content is belonged to is " education " as label.
For example,server 102 finds that from chromatic component great majority are green, and then thinking has plant in this picture, determines that the label of this video content and corresponding priorities are " green ", " plant " and " environmental protection ".Perhaps, set up a model library, from video data, extract one or several color lump, and the model in itself and the model library mated, the match is successful in certain error range, then can determine the content that picture comprises, and theme and the corresponding label that can further determine video content.
Referring to Fig. 4, it is as follows thatserver 102 inserts the method idiographic flow of advertisement in the present embodiment when the receiver, video content:
Step 401:terminal 101 is toserver 102 request uploaded videos files.
Step 402: the request ofserver 102response terminals 101 is also set up Streaming Media transmission with it and is connected, and acquisition time parameter or frame parameter, further determines the position of insertion advertisement.As time parameter is 30, then inserts an advertisement every 30 seconds, and perhaps time parameter is a plurality of: 30,60,90, promptly in the time of the 30th second, the 60th second, the 90th second, insert advertisement; As frame parameter is 700, then inserts an advertisement every 700 frames, and perhaps frame parameter is a plurality of.The quantity of inserting advertisement can control by the parameter that sets in advance.
Step 403:terminal 101 is set up Streaming Media withserver 102 and is connected back uploaded videos file.
Step 404:server 102 beginning receiver, video files, what receive earlier is header file in thevideo file.Server 102 obtains the label of video content from header file, search associated advertisement according to this label and priority thereof, promptly, the label of video content and the label of advertisement are carried out fuzzy matching, the advertisement that from the advertisement that the match is successful, needs by predefined priority orders selection, wherein, identify the priority of the advertisement that finds with keyword.
Server 102 order one query according to priority perhaps can be determined the quantity of the advertisement of each sequential search according to priority and selection according to the default parameter in this locality, and reduce the priority of the advertisement of having inserted to all advertisements.
Step 405:server 102 carries out the coded format conversion to the current frame of video that receives when the receiver, video frame, and judges whether to arrive the position of inserting advertisement, if then carry outstep 406, otherwise continuestep 407.
Step 406:server 102 reads the advertisement content of having selected, and (or preceding) inserts the advertisement of having selected behind current video frame, continuesstep 407 then.Each quantity of inserting advertisement can be controlled by the parameter that sets in advance.
Step 407:server 102 judges whether to also have the frame of video that needs to receive and carry out the coded format conversion, if, then continue the receiver, video frame, and it is carried out coded format conversion as current frame of video, carry outstep 405, otherwise stop to receive and the coded format conversion, generate the video content that has advertisement, and preserve the video content that has advertisement.
The coded format conversion comprises decode procedure and the cataloged procedure tovideo content.Server 102 can insert advertisement in decode procedure or cataloged procedure, concrete mode is:
Whenserver 102 is decoded at the receiver, video frame and to current video frame, judge whether to arrive the position of inserting advertisement, and the advertisement that (or preceding) inserts initial data behind current video frame, then Unified coding is carried out in the video content and the advertisement ofinitial data.Server 102 is inserted into video content after can advertisement being decoded into initial data earlier again.
102 pairs of receiver, video frames of server and when current video frame encoded judge whether to arrive the position of inserting advertisement, and (or preceding) insert the advertisement with same-code form behind current video frame.If the coded format of the video content behind the coded format of advertisement and the coding is different,server 102 can carry out being inserted into video content again after coded format is changed to advertisement earlier.
This position of inserting advertisement ofserver 102 records reaches the length of the insertion advertisement corresponding with each position in the present embodiment, again insert advertisement after the advertisement of this insertion of record deletion according to this when inserting advertisement next time, again part or all of advertisement and this insertion different in the advertisement of Cha Ruing.
Forstep 404 to step 406, when video file does not comprise defined label, an adjacent frame or the decoded video initial data of continuous afew frame server 102 extracts assigned address when needs insertion advertisement before, perhaps extract the video content of a frame or continuous several frames and be decoded into initial data, by theme this video content of analysis and judgement of colourity in the initial data and luminance component.
Different users may use various video editing instruments and use various video code models, at present because Flash video (Flash Video, flv) form has advantages such as easily reading easy transmission and is widely used, so operator wishes that generally the video content of preserving in the server is the flv form.Therefore,server 102 need be converted to the flv form with the coded format of the video content that receives.Server 102 can not carry out the coded format conversion to it in the present embodiment when the receiver, video content, and the assigned address in the video content that receives inserts and the video content associated advertisement.
The foregoing description has been introduced in receiver, video content process the method for inserting advertisement, has also comprised receiving the method for inserting advertisement after the complete video content, and these two kinds of methods all are to make video content and advertisement form a new video content.Introduce a kind of method of in displaying video content process, inserting related advertisement below.
Referring to Fig. 5, it is as follows thatserver 102 inserts the method idiographic flow of advertisement in the present embodiment in issuing the video content process:
Step 501: terminal 101 is toserver 102 request displaying video contents.
Step 502:server 102 receives request and issues correct response command, and set up Streaming Media with terminal and be connected, and acquisition time parameter or frame parameter, further definite position of inserting advertisement.
Step 503:server 102 issues the Media Stream of video content to terminal 101.Server 102 issues frame of video, and judges whether to arrive the position of inserting advertisement, if then carry out step 504, otherwise continue step 505.
Step 504:server 102 suspends the Media Stream that issues video content in this position, and the Media Stream of following sending advertisement continues step 505 after sending advertisement finishes down.The coded format of video content and advertisement can be inequality.
The advertisement that issues is to be found according to label in the video file and priority thereof byserver 102, promptly,server 102 carries out fuzzy matching with the label of video content and the label of advertisement, the advertisement that selective sequential according to priority needs from the advertisement that the match is successful, wherein, identify the priority of the advertisement that finds with keyword.
When video file did not comprise label,server 102 obtained label according to the title or the ownership classification of video content, and was its definition priority.Perhaps,server 102 extracts and inserts a preceding adjacent frame or the decoded video data of continuous a few frame of location advertising, by theme, and further determine the label and the priority thereof of this video content to this video content of analysis and judgement of the colourity of video data and luminance component.
Step 505:server 102 judges whether the frame of video that need issue in addition, if, then continue step 503, otherwise stop to issue the Media Stream of video content, disconnect and being connected with the Streaming Media ofterminal 101.
Step 506: the video content that terminal 101 receives andPlay Server 102 issues and the Media Stream of advertisement, what the user watched is the video content that has advertisement.
Owing to be that Media Stream by the break of video content inserts the advertisement related with video content, so video content and advertisement remain separately independently file.
Server makes the advertisement of insertion relevant with the theme of video content according to the label lookup associated advertisement of video content and be inserted into video content in the present embodiment, increases user's experience, and helps the propaganda of businessman to commodity.Present embodiment also provides server receiving or issuing the method for inserting advertisement in the video content process, makes the mode of inserting advertisement more flexible.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.