Background technology
Current Streaming Media field, Streaming Media jettison system is to interact realization with remote web server by player.
Pass through (main) the embedded player of web browser, or under computer operating system, other clients are (as strange in itudou/ love
Skill) embedded player, or the player that mobile communication equipment terminals (as ipad, iphone, htc) are embedded, initiate http request,
This request carries stream media information (comprising Streaming Media ID, Streaming Media duration, Streaming Media type), cookie, user profile (comprise
ID, User IP, user's same day access duration), remote web server is passed to by network, using this solicited message construction
Parameter Processor, server, by different requests, returns different Streaming Medias.The request of every kind of Streaming Media type, server
End have uniquely corresponding responsor (for example front patch responsor, in plug in responsor, suspend responsor, footmark responsor, the page ring
Answer device), process corresponding request.Therefore responsor typically has five to eight (see accompanying drawings 1).But, these responsor set, be
Corresponding with unique player kernel, and the fast development with network, and mobile client rapidly popularizes in recent years, occurs in that
Various streaming media playing environment, lead to Streaming Media to throw in also varied, the single player kernel of environment, and corresponding sound
Answer device set, cannot meet the streaming media playing of various clients, Streaming Media throws in demand.
According to existing technical implementation way, different player kernel, need different responsor set.Occur one
Kind of new player kernel, needs again to develop a set of Streaming Media and throws in responsor, cost consumption huge it is likely that because player
The switching of version or offline, leads to output value to substantially reduce.The therefore input of this implementation, output ratio, is low-down.
Differentiation trend with various clients, player is in rising trend, and the developer of responsor will be very passive, and exploitation is appointed
Business is more and more heavier.Therefore a kind of flexible server response policy, with relatively low development cost, you can adaptation, compatibility are various
Player, Streaming Media throw in the different demands of environment, are very important.
Stream media system adapter, exactly for solving this problem, a kind of scheme designed, it is with same set of responsor
Based on, by the exploitation of adapter, realize multiple players, Streaming Media throws in the different demands of environment, the exploitation of adapter
The relatively a set of new responsor set of cost, is low-down.And motility is very strong, often occur in a kind of new player
Core, or Streaming Media input environment, modification adapter can achieve compatibility.See (accompanying drawing 2).
Content of the invention
The invention provides a kind of Streaming Media jettison system, this system include for initiate Streaming Media request player,
For storing the parameter Processor of solicited message, front patch responsor that streaming media request is responded, in plug in responsor, time-out
Responsor, footmark responsor, page response device configure corresponding adapter, institute it is characterised in that this system is new player
State adapter to include:
Adapter responsor, for obtaining Streaming Media material streaming media material information according to the required parameter after conversion
Carry out assembled integration, the XML conversion of player interface agreement;
Adapter transducer, for obtaining player requests information and being carried out using parameter Processor RequestParams
Storage, and for being converted to original system required parameter and being stored in the information of storage in parameter Processor RequestParams
In above-mentioned parameter processor;
Parameter Processor RequestParams, the information carrying for Memory player request.
Further, the conversion of adapter transducer includes:According to the mapping relations between parameter, implication identical value is corresponded to
Get up, the value of new parameter is stored by changing parameter Processor RequestParams.
Further, adapter responsor includes obtaining Material module and agreement assembling module, obtains Material module and is used for
Request data after conversion is passed to input engine, according to different story types, passes to the disparate modules throwing in engine to carry out
The transferring of material;Return to adapter responsor for material list, this material list comprises whole needed for new player
Type material, described agreement assembling module is used for assembled integration Streaming Media material information.
Further, adapter responsor, after return Streaming Media material information is to player, will discharge resource.
Present invention also offers a kind of Streaming Media put-on method it is characterised in that:
Streaming Media request initiated by step (1) player;
Step (2) adapter transducer is obtained player requests information and is entered using parameter Processor RequestParams
Row storage, and for being converted to original system required parameter and storing the information of storage in parameter Processor RequestParams
In parameter Processor;
Step (3) adapter responsor obtains Streaming Media material streaming media material letter according to the required parameter after conversion
Breath carries out assembled integration;
Carry out XML conversion so that by Streaming Media material information transmission between step (4) adapter and player interface agreement
To player.
Further, described in step (2), the conversion of adapter transducer includes:According to the mapping relations between parameter, will contain
Adopted identical value is mapped, and the value of new parameter is stored by changing parameter Processor RequestParams.
Further, the acquisition of adapter responsor described in step (3) further includes that acquisition Material module therein is used
In the request data after conversion is passed to input engine, according to different story types, pass to the disparate modules throwing in engine to enter
The transferring of row material;Described assembled integrate include returning to adapter responsor for material list, this material list comprises newly
The all types material needed for player, agreement assembling module therein is used for assembled integrating Streaming Media material information.
Further, the method includes:Adapter responsor, will release money after return Streaming Media material information is to player
Source.
Specific embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
The present invention is a kind of Streaming Media jettison system and method, increases the compatibility of stream media system, fall by this invention
Again coupling between low player and input engine, makes the communication between player and input engine more flexible.
The general flow of system, as shown in figure 3, Streaming Media request initiated by player, carries stream media information, cookie, use
Family information, such as:Streaming Media ID itemID, ID userID.After adapter responsor Servlet receives request,
Pass to adapter transducer Parser.Adapter transducer Parser analysis request parameter, with all solicited message constructing variables
Processor RequestParams (store valuable information in the player requests such as Streaming Media ID, ID, and this parameter
The non-real physical device of processor RequestParams, this processor is an object in internal memory, and object has the data of oneself
Structure, has the attribute of oneself, and attribute number does not limit.Solicited message is stored in the attribute of RequestParams respectively.).Adapter
Transducer Parser takes parameter Processor RequestParams having constructed, and original system required parameter is such as:Streaming Media ID
Sid, ID uid, adapter Parser realizes the conversion of parameter, and itemID switchs to sid, and userID switchs to uid (conversion
It is to construct existing parameter Processor, so throw in engine and be not required to change interface, you can identification.), construct existing parameter
Processor, returns to adapter Servlet.
Adapter responsor Servlet obtains Streaming Media material to throwing in engine.After taking material, adapter responsor
Servlet will arrange material information.Because the agreement returning to player is different from existing agreement, adapter responsor
Servlet, according to agreement, player desired data is carried out assembly by character string, material information is assembled into the lattice of new agreement
Formula, returns to player.The assembly of one-to-one agreement simply realized by every kind of adapter.
Adapter structure is as shown in figure 5, include adapter responsor Servlet, adapter transducer Parser, parameter
Processor RequestParams.Two modules are also included, as shown in fig. 6, including inside adapter responsor (Servlet)
Obtain Material module and agreement assembling module.Each component representation in adapter is as follows:1) parameter Processor
RequestParams:
Function:The full detail that Memory player request carries, containing user profile, page info, stream media information etc..Belong to
Property:Corresponding with parameter in player requests agreement.Parameter Processor RequestParams only has store function, and structured value is from no
To the process having.Original state is empty, does not store any information, constructs the process storing.
2) adapter transducer Parser:
Function:The information of conversion parameter processor RequestParams storage, turns to throwing in current reference parameter list
Change, the information gap opposite sex that the different player requests of shielding are brought, is kernel object.
Attribute:request:Solicited message;response:Adapter return information.
Method:Get* (), to player requests information, is screened.* it is the use of the concept of regular expression, get* ()
It is the general designation of multiple methods, such as getUnionId obtains alliance's id method it is achieved that the Base64 of alliance id deciphers;
GetIP obtains User IP method it is achieved that obtaining source IP function from multiple routing forwarding.By these method adapters
Transducer Parser can obtain player requests information.
Perform () realizes solicited message translation function.Perform () takes from parameter Processor RequestParams
The data of storage, according to the implication of value, change data form, is stored in existing parameter Processor.If do not changed, throw in engine
Then None- identified, need to make the input engine of a differentiation again, and development cost is huge.
With reference to Fig. 3, different player requests, so-called difference is that agreement is different, specifically has two kinds of situations:One is parameter name
Difference, two is parameter list different (such as new parameter, or some parameters of disappearance), between adapter transducer Parser is according to parameter
Mapping relations, implication identical value is mapped, and the value of new parameter is passed through to change parameter Processor RequestParams, enters
Row storage.The informative differentiation that the different player requests of shielding are brought just is realized in.For example:Existing player parameter
ABC, new player parameter ABD, for new parameter D, parameter C can be mapped to, be stored in the space of C.If new player parameter is
ABCD, then need to change existing parameter Processor RequestParams, increases parameter D.
3) adapter responsor Servlet:
Function:Achieve the major function of adapter, and play the part of overall scheduling, the role of control.
Achieve calling of parameter Processor RequestParams, the acquisition of Streaming Media material, stream using process ()
The assembled integration of media materials information, the XML conversion of player interface agreement.As Fig. 2, existing Streaming Media jettison system, it is
Different responsors return different materials, and then returning to adapter in the present invention for material list (is material information list, often
Individual material packet contains a material address)!This material list comprises all types material needed for new player, such as plays
Device first only throws in front patch, time-out, footmark, and the agreement assembling module in adapter responsor Servlet will once return 3 kinds of stream matchmakers
Voxel material carries out assembled integration.
Obtain Material module to be used for obtaining Streaming Media material, data acquisition system includes:1)prerollIdeas:Front patch Streaming Media
Material set.2)postrollIdeas:Paste Streaming Media material set afterwards.3)cornerIdeas:Footmark Streaming Media material set.
4)pauseIdeas:Suspend Streaming Media material set.5)minibannerIdeas:Minibanner miniflow media column material collection
Close.
It is stored in adapter responsor Servlet, after return Streaming Media material information is to player, resource will be discharged.
In set each field of basic data as shown in figure 4, wherein, adIdea:Streaming Media material object.Storage stream matchmaker
Voxel material full detail.cp:Throw in N+ statistical information.showTimes:User has watched number of times.iesParam:Third party detects
Parameter.pl:Before representing in front patch, patch position, meaningless in other types, is defaulted as 0, can only arrange later, mouth is broadcast during construction
When be fixed as 1, mouth is broadcast as a kind of Streaming Media form, one kind of paster Streaming Media.But last broadcasting.adPos:Streaming Media position
(i.e. Streaming Media during streaming media playing, the ordinal position that represents), for data team statistics.
First, obtain Material module in adapter responsor and the protocol data after changing is passed to input engine, according to not
Same story types, pass to the disparate modules throwing in engine to carry out transferring of material.Throw in and in engine, have multiple module correspondences many
Plant Streaming Media type, every kind of Streaming Media type has a material list acquisition module.Streaming Media type includes front patch, time-out, angle
Mark etc..For example, patch Streaming Media before certain player is only asked, then adapter is constructing existing parameter Processor
After RequestParams, it is passed along throwing in the front patch material list acquisition module of engine, that is, returns corresponding material list.
By the Streaming Media material information Store returning in each Ideas.
, obtain front patch, rear patch, footmark, time-out, minibanner material set taking player in Rhizoma Solani tuber osi station as a example, due to
Insert during player is not supported in Rhizoma Solani tuber osi station, the acquisition Material module therefore in adapter, in skipping over, insert material.Play in Rhizoma Solani tuber osi station
The minbanner of device, needs to peel away with front patch, therefore adapter carries out special place to front patch material prerollIdeas
Reason.Traversal prerollIdeas, obtains the material A of binding minibanner.Material A is converted into minibanner type, plus
Enter to minibanner material set.
The flow process carrying out the XML conversion of docking port agreement is described as follows taking Rhizoma Solani tuber osi player as a example:
The material data form that adapter responsor is taken, player is unable to Direct Recognition, such as front patch material, needs
It is ads node (one of XML text node type) according to protocol conversion, material ID need to switch to nodal community id for 97256,
Streaming Media duration need to switch to nodal community dt in 30 seconds, is ultimately converted to the XML text that player is capable of identify that.
The technique effect that technology according to the present invention scheme obtains is as follows:
Technical solution of the present invention with great motility, extremely low development cost, maintenance cost, meet increasing broadcasting
Put device kernel, Streaming Media throws in environmental demand.Often increase a kind of player kernel, or increase a kind of Streaming Media and throw in environment, only
Stream media system adapter need to be changed, increase by 1~2 class file, you can realize corresponding Streaming Media and throw in function.Reduce out
Send out cost.
The foregoing is only presently preferred embodiments of the present invention, be not limited to the invention, all in the invention
Any modification, equivalent and improvement made within spirit and principle etc., is both contained within protection scope of the present invention.