Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be configured to arrange and design with a variety of different herein.Cause
This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below
Range, but it is merely representative of the selected embodiment of the present invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Go out all other embodiments obtained under the premise of creative work, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need to that it is further defined and explained in subsequent attached drawing.Meanwhile the present invention's
In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that instruction or hint relative importance.
The method of embedded advertisement is applied to terminal device in live streaming provided in an embodiment of the present invention, which can be with
It is, but is not limited to, the intelligent electronic devices such as mobile phone, tablet computer are equipped with the application program for live streaming on the terminal device,
App as being equipped with bucket fish on terminal device, should the name of " bucket fish " for a app for live streaming.User can be by this
The live streaming app installed on terminal device is broadcast live or watches live streaming, and is being seen by the method user of advertisement embedded in live streaming
Also advertisement can be viewed when seeing live in live streaming.Since live streaming platform is embedded in the advertisement of third company, then third party is public
Department need to pay corresponding advertising expenditure, and then the operating income of company where improving live streaming platform, while actively publicize the
The product of tripartite company, achievees the effect that two-win.
Fig. 1 is please referred to, is a kind of structure diagram of terminal device 100 provided in an embodiment of the present invention, the terminal device
100 include the devices 110 of embedded advertisement in live streaming, memory 120, storage control 130, processor 140, Peripheral Interface 150,
Input-output unit 160, audio unit 170, display unit 180 and communication unit 190.
The memory 120, storage control 130, processor 140, Peripheral Interface 150, input-output unit 160, sound
Frequency unit 170, display unit 180,190 each element of communication unit are directly or indirectly electrically connected between each other, to realize number
According to transmission or interaction.For example, these elements can be realized electrically between each other by one or more communication bus or signal wire
Connection.The device 110 of embedded advertisement can be deposited including at least one in the form of software or firmware (firmware) in the live streaming
It is stored in the memory 120 or is solidificated in the operating system (operating system, OS) of the terminal device 100
Software function module.The processor 140 is used to perform the executable module stored in memory 120, such as in the live streaming
The software function module or computer program that the device 110 of embedded advertisement includes.
Wherein, memory 120 may be, but not limited to, random access memory (Random Access Memory,
RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only
Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),
Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
Wherein, for memory 120 for storing program, the processor 140 performs described program after execute instruction is received, aforementioned
The method performed by terminal device 100 that the stream process that any embodiment of the embodiment of the present invention discloses defines can be applied to handle
It is realized in device 140 or by processor 140.
Processor 140 may be a kind of IC chip, have the processing capacity of signal.Above-mentioned processor 140 can
To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit
(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC),
Field programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard
Part component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor
Can be microprocessor or the processor 140 can also be any conventional processor 140 etc..
Various input/output devices are coupled to processor 140 and memory 120 by the Peripheral Interface 150.At some
In embodiment, Peripheral Interface 150, processor 140 and storage control 130 can be realized in one single chip.Other one
In a little examples, they can be realized by independent chip respectively.
Input-output unit 160 is used to that user input data to be supplied to realize user and the interaction of the terminal device 100.
The input-output unit 160 may be, but not limited to, mouse and keyboard etc..
Audio unit 170 provides a user audio interface, may include that one or more microphones, one or more raises
Sound device and voicefrequency circuit.
Display unit 180 provides an interactive interface (such as user interface) between terminal device 100 and user
Or it is referred to for display image data to user.In the present embodiment, the display unit 180 can be liquid crystal display or touch
Control display.Can be that the capacitance type touch control screen or resistance-type of single-point and multi-point touch operation is supported to touch if touch control display
Control screen etc..Single-point and multi-point touch operation is supported to refer to that touch control display can sense on the touch control display one or more
The touch control operation generated simultaneously at a position, and processor 140 is transferred to be calculated and handled the touch control operation that this is sensed.
The communication unit 190, which is used to pass through, establishes connection between the network and the high in the clouds, so as to fulfill the end
Communication connection between end equipment 100 and high in the clouds, and for passing through the network transceiving data.
Fig. 2 is please referred to, is the flow diagram of the method for embedded advertisement in a kind of live streaming provided in an embodiment of the present invention, it should
Method includes:
Step S110 obtains live streaming stream information.
After detecting that user enters direct broadcasting room, the interface of live TV stream is pulled by direct broadcasting room to get live TV stream letter
Breath, it should be noted that the live TV stream information includes the information such as address, the video definition of video flowing, for a user,
After terminal device 100 obtains live streaming stream information, user can clearly watch live page.
Step S120, if creating advertisement view there are the unique mark of ad content in the live streaming stream information.
Each ad content has unique mark, and terminal device 100 need to go to obtain ad content according to the unique mark,
In embodiments of the present invention, the unique mark of the ad content is characterized with tag.It is broadcast live when terminal device Real time request obtains
During stream information, there may be the unique marks of ad content in the live streaming stream information of the acquisition, it is also possible to which there is no ad contents
Unique mark, will further be created if there are the unique marks of ad content, the terminal device 100 in the live streaming stream information
Advertisement view.It should be noted that the advertisement view is used to show ad content, while the advertisement view is by view controller control
System, the i.e. view controller are used to explain clicking operation of the user to advertisement view, and new ad content is sent and presented
In the advertisement view, i.e. the view controller is the bridge that advertisement view is interacted with internal data, which is terminal
Plug-in code in equipment 100.
The advertisement view is added in setting view by step S130.
Due to live streaming during have many main broadcasters and user interaction link, such as give a present, answer, question and answer, prize drawing, because
This, live streaming interface is relative to video playing interface level is more complicated, interface is more complicated.Thus, it is desirable to by specific
The method of carrying advertisement the loading of advertisement is realized in live page.It is included in the view controller referred in the step s 120
Multiple views, also i other words, view controller controls multiple views simultaneously, including advertisement view, further include onView
View and aboveView views, the onView and aboveView are only the self-defined name to view, which is
One total view such as mobile phone screen interface, is used to accommodate other all views being located on the onView views, should
AboveView views are setting view, such as the designated position in mobile phone screen interface, be used for by other view fixed placements in
The designated position, it can be seen that, which is contained in onView views.
After the terminal device 100 creates advertisement view, pass through insertSubview:AboveSubview methods should
Advertisement view is added to setting view, so that advertisement view is shown in designated position.Wherein, insertSubview pairs
The parameter answered is adView, and for characterizing advertisement view, the corresponding parameters of aboveSubview regard adView for aboveView
Figure, that is, set view.
Step S140, the unique mark of ad content and the path of ad content in the live streaming stream information obtain
Take ad content and by the exhibiting advertising content of acquisition in the advertisement view.
When the unique mark that ad content is included in stream information is broadcast live, also comprising ad content in the live streaming stream information
Path, the terminal device 100 calling ad-request class AdsRequest, ad-request class AdsRequest include two as a result,
A function, alloc functions and initwithAdTag functions, which, which includes reqeust, asks object, should
InitwithAdTag functions include the unique mark tag of ad content and the path url of ad content, and then by advertisement
The unique mark of appearance and the path of ad content obtain ad content, while by the exhibiting advertising content of acquisition in advertisement view.
For a user, user can see the advertising display column of a floating, the advertising display of the floating on terminal device 100
Column is the effect that the ad content obtained is presented in advertisement view.
Fig. 3 is please referred to, is the flow diagram of the method for embedded advertisement in another live streaming provided in an embodiment of the present invention,
This method includes:
Step S210 obtains live streaming stream information.
After detecting that user enters direct broadcasting room, the interface of live TV stream is pulled by direct broadcasting room to get live TV stream letter
Breath, it should be noted that the live TV stream information includes the information such as address, the video definition of video flowing, for a user,
After terminal device 100 obtains live streaming stream information, user can clearly watch live page.
Step S220, if creating advertisement view there are the unique mark of ad content in the live streaming stream information.
Each ad content has unique mark, and terminal device 100 need to go to obtain ad content according to the unique mark,
In embodiments of the present invention, the unique mark of the ad content is characterized with tag.It is broadcast live when terminal device Real time request obtains
During stream information, there may be the unique marks of ad content in the live streaming stream information of the acquisition, it is also possible to which there is no ad contents
Unique mark, will further be created if there are the unique marks of ad content, the terminal device 100 in the live streaming stream information
Advertisement view.It should be noted that the advertisement view is used to show ad content, while the advertisement view is by view controller control
System, the i.e. view controller are used to explain clicking operation of the user to advertisement view, and new ad content is sent and presented
In the advertisement view, i.e. the view controller is the bridge that advertisement view is interacted with internal data, which is terminal
Plug-in code in equipment 100.
Step S230, deleting history advertisement view and the ad content being presented in the advertisement view.
It is in the advertisement view created before by the deletion of clear methods and the advertisement being presented in the advertisement view
Hold, to avoid repeating to add advertisement.
Step S240 judges that setting view whether there is.
The view controller controls multiple views simultaneously, including advertisement view, further include onView views and
AboveView views, the onView and aboveView are only the self-defined name to view, and the onView views are total for one
View, such as mobile phone screen interface, be used to accommodate other all views being located on the onView views, the aboveView
View is setting view, such as the designated position in mobile phone screen interface, is used for other view fixed placements in the specific bit
It puts, it can be seen that, which is contained in onView views.Judgement setting view whether there is, and be to judge
AboveView views whether there is.
If the setting view exists, the advertisement view is added in setting view by step S250.
After the terminal device 100 creates advertisement view, pass through insertSubview:AboveSubview methods should
Advertisement view is added to setting view, so that advertisement view is shown in designated position.Wherein, insertSubview pairs
The parameter answered is adView, and for characterizing advertisement view, the corresponding parameters of aboveSubview regard adView for aboveView
Figure, that is, set view.
If the setting view is not present, the advertisement view is added in initial views by step S260, described initial
View accommodates the setting view.
I other words when setting view is not present, i.e., the position of advertisement view placement is not previously set, then will
The advertisement view is added in initial views, which is onView views.
Step S270 adjusts size and the position of the advertisement view.
There are many modes of the size and location of the adjusting advertisement view, such as the first:Advertisement view there are many default
Size and location, during practical adjustments, the size and location which can randomly select one of which advertisement view is adjusted
The size and location of the advertisement view of establishment, such as default size and location there are two types of advertisement view, respectively advertisement view are
10 sizes, the lower right corner, advertisement view are 20 sizes, positioned at base, then can choose a kind of advertisement for setting establishment therein automatically
The size and location of view.Second:The terminal device 100 can also set size and the position of the advertisement view of establishment in real time
It puts, such as the size of the advertisement view of the establishment is set to be 25 sizes and is in left position.
The visual attribute of the advertisement view is set as hiding attribute by step S280.
Since the advertisement view is first added in setting view or initial views, this need to be showed at this time by also having not been obtained
Ad content in advertisement view i other words first establishing advertisement view, obtains ad content afterwards, and the complete advertisement view of the establishment is with obtaining
It gets between ad content that there are smaller time delays, therefore, the visual attribute of the advertisement view need to be set as hiding attribute, made
The advertisement view obtained at this time is invisible for a user, is shown in directly with the state floating of " blank " to avoid the advertisement view
It broadcasts the page and has blocked live content.
Step S290 judges that the advertisement view whether there is.
Before ad content is obtained for advertisement view, also need to judge that the advertisement view whether there is.
Step S310, if the advertisement view exists, unique mark of the ad content in the live streaming stream information
Know and the path of ad content obtains ad content and by the exhibiting advertising content of acquisition in the advertisement view.
When the unique mark that ad content is included in stream information is broadcast live, also comprising ad content in the live streaming stream information
Path, the terminal device 100 calling ad-request class AdsRequest, ad-request class AdsRequest include two as a result,
A function, alloc functions and initwithAdTag functions, which, which includes reqeust, asks object, should
InitwithAdTag functions include the unique mark tag of ad content and the path url of ad content, and then by advertisement
The unique mark of appearance and the path of ad content obtain ad content, while by the exhibiting advertising content of acquisition in advertisement view.
For a user, user can see the advertising display column of a floating, the advertising display of the floating on terminal device 100
Column is the effect that the ad content obtained is presented in advertisement view.
Step S320 if the advertisement view is not present, does not obtain ad content.
If the advertisement view is not present, ad content need not be further obtained.
It can be seen that stream information is broadcast live by analysis in this programme, when being broadcast live in stream information, there are unique marks of ad content
Know, then create advertisement view, and the unique mark of the ad content in live streaming stream information and path obtain ad content and show
It is shown in advertisement view, and then realizes and advertisement is inserted into live streaming, improve the operating income of the affiliated company of live streaming platform.
Fig. 4 is please referred to, is that the function module of the device 110 of embedded advertisement in a kind of live streaming provided in an embodiment of the present invention is shown
It is intended to, which includes acquisition module 111, creation module 112, removing module 113, add module 114, adjustment module 115, sets
Put module 116 and display module 117.
Stream information is broadcast live for obtaining in acquisition module 111.
In embodiments of the present invention, step S110 and step S210 can be performed by acquisition module 111.
Creation module 112 if for the unique mark there are ad content in the live streaming stream information, creates advertisement and regards
Figure.
In embodiments of the present invention, step S120 and step S220 can be performed by creation module 112.
Removing module 113, in deleting history advertisement view and the advertisement being presented in the history advertisement view
Hold.
In embodiments of the present invention, step S230 can be performed by removing module 113.
Add module 114, for the advertisement view to be added in setting view.
In embodiments of the present invention, step S130 and step S240~S260 can be performed by add module 114.
Adjustment module 115, for adjusting the size of the advertisement view and position.
In embodiments of the present invention, step S270 can be performed by adjustment module 115.
Setup module 116, for being set as the visual attribute of the advertisement view to hide attribute.
In embodiments of the present invention, step S280 can be performed by setup module 116.
Display module 117, for the unique mark and ad content of the ad content in the live streaming stream information
Path obtain ad content and by the exhibiting advertising content of acquisition in the advertisement view.
In embodiments of the present invention, step S140 and step S290~S320 can be performed by display module 117.
Due to being had been described in the method for advertisement embedded in live streaming, details are not described herein.
In conclusion the method, apparatus and terminal device of advertisement are embedded in a kind of live streaming provided in an embodiment of the present invention, it should
The method and device of embedded advertisement is applied to terminal device in live streaming, and the method for embedded advertisement includes obtaining live TV stream in the live streaming
Information, if creating advertisement view, and the advertisement of establishment is regarded there are the unique mark of ad content in the live streaming stream information
Figure is added in setting view, and then the unique mark of ad content in live streaming stream information and the path of ad content
Obtain ad content and by the exhibiting advertising content of acquisition in advertisement view.In the present solution, by analyzing the live TV stream obtained
It whether there is the unique mark of ad content in information, if in the presence of creating advertisement view and obtaining exhibiting advertising content in wide
It accuses in view, obtains ad content in real time while real-time acquisition live streaming stream information, showed in live streaming extensively with realizing
It accuses, improves the operating income of live streaming company.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flow chart or block diagram can represent the one of a module, program segment or code
Part, a part for the module, program segment or code include one or more and are used to implement holding for defined logic function
Row instruction.It should also be noted that at some as in the realization method replaced, the function that is marked in box can also be to be different from
The sequence marked in attached drawing occurs.For example, two continuous boxes can essentially perform substantially in parallel, they are sometimes
It can perform in the opposite order, this is depended on the functions involved.It is it is also noted that every in block diagram and/or flow chart
The combination of a box and the box in block diagram and/or flow chart can use function or the dedicated base of action as defined in performing
It realizes or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is independent product sale or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words
The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be
People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention.
And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.It needs
Illustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation with
Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities
The relationship or sequence on border.Moreover, term " comprising ", "comprising" or its any other variant are intended to the packet of nonexcludability
Contain so that process, method, article or equipment including a series of elements not only include those elements, but also including
It other elements that are not explicitly listed or further includes as elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, also there are other identical elements in article or equipment.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, that is made any repaiies
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exists
Similar terms are represented in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and is explained.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.