Summary of the invention
Embodiments of the invention provide a kind of player method and electronic equipment, when electronic equipment receives program switching command in the process of broadcasting live broadcast stream media, by obtaining the first sign of program to be broadcast, can make electronic equipment when lack of competence is play program to be broadcast, get the sign of the standby that program to be broadcast is corresponding, and then according to the sign of standby, obtain and play the program data of standby, if while having solved electronic equipment lack of competence broadcasting program to be broadcast, electronic equipment can only carry out the problem of blank screen demonstration, promoted the broadcast performance of electronic equipment.
For achieving the above object, embodiments of the invention adopt following technical scheme:
The embodiment of the present invention provides a kind of player method, comprising:
When electronic equipment receives program switching command in the process of playing live broadcast stream media, according to the sign of the program to be broadcast comprising in described program switching command, obtain first sign corresponding with the sign of described program to be broadcast; Wherein, described the first sign is used to indicate described electronic equipment for the broadcasting authority of described program to be broadcast;
If the described electronic equipment lack of competence of described the first sign indication is play described program to be broadcast, described electronic equipment obtains the sign of the standby that described program to be broadcast is corresponding;
Described electronic equipment is sent to dispatch server by the sign of described standby, so that described dispatch server, according to the sign of described standby, is determined the content distributing network CDN address corresponding with the sign of described standby;
Described electronic equipment receives the described CDN address from described dispatch server;
Described electronic equipment, according to described CDN address, obtains the address of the data list in the CDN server corresponding with described CDN address;
Described electronic equipment, according to the address of described data list, is downloaded the program data of described standby;
Described electronic equipment is play the program data of described standby.
Described electronic equipment, according to the sign of the program to be broadcast comprising in described program switching command, obtains the method for first sign corresponding with the sign of described program to be broadcast, comprising:
Described electronic equipment, according to the sign of described program to be broadcast, obtains described the first sign from default programme information list;
Wherein, the generation method of described default programme information list, comprising:
Described electronic equipment receives live broadcast stream media request;
Described electronic equipment is according to described live broadcast stream media request, obtain the first information, and by described first information combination producing programme address, the described first information at least comprises the programme title of the live broadcast stream media that described live broadcast stream media request is corresponding, the server of the address of the server of programs stored forms data, file type and described programs stored forms data can be identified the current date of form;
Described electronic equipment is according to described programme address, obtains playbill data corresponding to programme address described in the server of described programs stored forms data;
Described electronic equipment, according to described playbill data, generates described default programme information list.
Described electronic equipment, according to described live broadcast stream media request, obtains the first information, and the single address step of described first information combination producing program is comprised:
Obtain programme title and the file type of the live broadcast stream media corresponding with described live broadcast stream media request, and obtain the address of server of programs stored forms data and the current date of the discernible form of server of described programs stored forms data;
According to the single address form of default program, the current date of the discernible form of server of the address of the server of described programme title, described programs stored forms data, described file type and described programs stored forms data is generated to described programme address.
The programme title step that described electronic equipment obtains the live broadcast stream media corresponding with described live broadcast stream media request comprises:
Described electronic equipment obtains preset initiation parameter, and described preset initiation parameter comprises the programme title of the live broadcast stream media corresponding with described live broadcast stream media request and/or the ID of described live broadcast stream media; And when described preset initiation parameter only comprises the ID of described live broadcast stream media, the ID of described live broadcast stream media is converted to corresponding programme title.
The embodiment of the present invention provides a kind of electronic equipment, comprising:
Acquiring unit, while receiving program switching command for receiving element described in the process at broadcasting live broadcast stream media, according to the sign of the program to be broadcast comprising in described program switching command, obtains first sign corresponding with the sign of described program to be broadcast; Wherein, described the first sign is used to indicate described electronic equipment for the broadcasting authority of described program to be broadcast, if and play described program to be broadcast for the described electronic equipment lack of competence of described the first sign indication, obtain the sign of the standby that described program to be broadcast is corresponding, and the described CDN address for receiving according to described receiving element also, obtain the address of the data list in the CDN server corresponding with described CDN address;
Transmitting element, for the sign of described standby is sent to dispatch server, so that described dispatch server, according to the sign of described standby, is determined the content distributing network CDN address corresponding with the sign of described standby;
Receiving element, for program receiving switching command, and for receiving the described CDN address from described dispatch server;
Processing unit, for the address of the described data list that gets according to described acquiring unit, downloads the program data of described standby;
Display unit, for playing the program data of the described standby of described processing unit download.
Described acquiring unit specifically for the sign of the described program to be broadcast in the described program switching command receiving according to described receiving element, obtains described the first sign from default programme information list; The also described live broadcast stream media request for receiving according to described receiving element, obtain the first information, the described first information at least comprises the programme title of the live broadcast stream media that described live broadcast stream media request is corresponding, the server of the address of the server of programs stored forms data, file type and described programs stored forms data can be identified the current date of form, and the described programme address for generating according to described processing unit also, obtain playbill data corresponding to programme address described in the server of described programs stored forms data;
Described receiving element, also for receiving live broadcast stream media request;
Described processing unit, the described first information combination producing programme address for described acquiring unit is got also, and the described playbill data for getting according to described acquiring unit also, generate described default programme information list.
Described acquiring unit, concrete also for obtaining programme title and the file type of live broadcast stream media corresponding to the described live broadcast stream media request that receives with described receiving element, and obtain the address of server of programs stored forms data and the current date of the discernible form of server of described programs stored forms data;
Described processing unit, specifically for the single address form of the program according to default, the current date of the discernible form of server of the address of the server of described programme title, described programs stored forms data, described file type and described programs stored forms data is generated to described programme address.
Described acquiring unit, also for obtaining preset initiation parameter, described preset initiation parameter comprises the programme title of the live broadcast stream media corresponding with described live broadcast stream media request and/or the ID of described live broadcast stream media;
Described processing unit, while also only comprising the ID of described live broadcast stream media for the described preset initiation parameter getting at described acquiring unit, is converted to corresponding programme title by the ID of described live broadcast stream media.
Embodiments of the invention provide a kind of player method and electronic equipment, when electronic equipment receives program switching command in the process of playing live broadcast stream media, according to the sign of the program to be broadcast comprising in program switching command, obtain indication electronic equipment for the first sign of the broadcasting authority of described program to be broadcast, if the first sign indication electronic equipment lack of competence is play program to be broadcast, electronic equipment obtains the sign of the standby that program to be broadcast is corresponding, and the sign of standby is sent to dispatch server, so that dispatch server is determined the CDN address corresponding with the sign of standby according to the sign of standby, thereby, electronic equipment is according to CDN address acquisition and play the program data of standby, solved when electronic equipment lack of competence is play program to be broadcast, electronic equipment can only carry out the problem of blank screen demonstration, promoted the broadcast performance of electronic equipment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In addition, term " system " and " network " are often used interchangeably in this article herein.Term "and/or", is only a kind of incidence relation of describing affiliated partner herein, and expression can exist three kinds of relations, and for example, A and/or B, can represent: individualism A exists A and B, these three kinds of situations of individualism B simultaneously.In addition, character "/", generally represents that forward-backward correlation is to liking a kind of relation of "or" herein.
Various technology described herein is only suitable for electronic equipment and is playing live broadcast stream media, and receives in the process of switching current playing program instruction.
JavaScript is a kind of based on object and event-driven and have the client script language of relative safety, also be a kind of script that is widely used in client Web exploitation simultaneously, be commonly used to the Language to HTML(Hypertext Markup, HTML) webpage adds dynamic function, such as response user's various operations.
Electronic equipment, can be that wireless terminal can be also catv terminal, wireless terminal can be to point to the equipment that user provides voice and/or data connectivity, has the portable equipment of wireless connecting function or is connected to other treatment facilities of radio modem.Wireless terminal can be through wireless access network (for example, RAN, Radio Access Network) communicate with one or more core net, wireless terminal can be mobile terminal, as mobile phone (or being called " honeycomb " phone) with have the computer of mobile terminal.
Embodiment mono-
The invention provides a kind of player method, as shown in Figure 1, comprising:
S101, electronic equipment receive program switching command in the process of playing live broadcast stream media.
At present, the programme televised live list of electronic equipment is to write on browser page, by the page, by JavaScript, operated and control, what the programme televised live list that electronic equipment generates showed is the programme information of all programs, and during the program that electronic equipment lack of competence is play in electronic equipment program to be broadcast list, electronic equipment can only carry out blank screen demonstration, and output performance is poor.
The embodiment of the present invention provides a kind of player method, when electronic equipment receives program switching command in the process of broadcasting live broadcast stream media, by obtaining first sign corresponding with the sign of program to be broadcast, make electronic equipment when lack of competence is play program to be broadcast, get the sign of standby, and then according to the sign of standby, obtain and play the program data of standby.
Live is on-the-spot along with generation, the development process of event are synchronously made and release news, and has the information network published method of the process of two-way circulating.Its form also can be divided into on-the-spot broadcasting, studio talk-show live, word picture is live, video and audio is live or provide the live of information source by third party.For example, Online Video is live is exactly the live broadcast service of utilizing Internet resources to carry out, by on-the-spot video capture, synchronously uploads on network, and user can see the live video of the very first time the same time on network.
Streaming Media refers to after a series of media data compression, through network segmentation, transmit data, audio-visual a kind of technology and the process for viewing and admiring of real-time Transmission on network, this technology makes packet be able to send as flowing water, if do not use this technology, just must download before use whole media file.
Further, Streaming Media is a kind of technology that audio frequency, video and other multimedia elements are play in mode real-time, that wait for without download on internet and wireless network.Stream transmission mode is that the multimedia file such as Audio and Video is divided into compressed package one by one through special compress mode, by server to subscriber computer continuously, transmit in real time.In adopting the system of stream transmission mode, user needn't wait until after whole file is all downloaded as non-stream is play just can see central content, but only need to through the startup time delay in several seconds or tens seconds, can on subscriber computer, utilize corresponding player to play streaming video files such as the video of compression or audio frequency, remaining part will be proceeded to download, until finish.
It should be noted that, the multimedia that live broadcast stream media is any one form, the live broadcast stream media in the embodiment of the present invention can be live video, can be also live audio frequency, the embodiment of the present invention is not construed as limiting.
Electronic equipment is in playing the process of live broadcast stream media, receive program switching command and could play program to be broadcast, wherein, program switching command comprises the sign of program to be broadcast, this sign can be the name of program to be broadcast, can be also the memory address of the program data of program to be broadcast.
Optionally, program switching command can be that the program that electronic equipment detects current broadcasting finishes rear generation.
Exemplary, if electronic equipment is intelligent television, intelligent television in playing live broadcast stream media process, current broadcasting " little father ", when intelligent television receives program switching command, intelligent television could switch to broadcasting program to be broadcast by " the little father " of current broadcasting.
S102, electronic equipment, according to the sign of the program to be broadcast comprising in program switching command, obtain first sign corresponding with the sign of program to be broadcast from default programme information list.
Wherein, the first sign is used to indicate electronic equipment for the broadcasting authority of program to be broadcast.
Concrete, when electronic equipment receives program switching command, electronic equipment is according to the sign of the program to be broadcast in program switching command, from default programme information list, obtain and be used to indicate electronic equipment for the first sign of the broadcasting authority of program to be broadcast, so that the program data that electronic equipment himself is play program to be broadcast according to the first sign judgement is still play the program data of the standby corresponding with program to be broadcast.
Default programme information list is that electronic equipment is after receiving live broadcast stream media request, electronic equipment is according to programme title and the file type of the live broadcast stream media acquisition request live broadcast stream media corresponding with live broadcast stream media request, and obtain the address of server of programs stored forms data and the current date of the discernible form of server of programs stored forms data, then according to the content that gets, generate programme address, and from programme address, read and generate after playbill data.
Wherein, live broadcast stream media request can be the clicking operation generation that electronic equipment detects user, for triggering electronic equipment, generates programme.Further, live broadcast stream media request is live broadcast stream media playing request, when electronic equipment receives this live broadcast stream media playing request, opens the browser page corresponding with live broadcast stream media playing request, in order to playing live broadcast stream media.
The programme name of the live broadcast stream media corresponding with live broadcast stream media request that electronic equipment gets is called electronic equipment, and according to getting from browser page plug-in unit, preset initiation parameter gets, wherein, preset initiation parameter comprises the programme title of the live broadcast stream media corresponding with live broadcast stream media request and/or the ID of described live broadcast stream media.
Further, if when preset initiation parameter only comprises the ID of live broadcast stream media, electronic equipment is converted to corresponding programme title by the ID of live broadcast stream media, in order to generating programme address.
Be understandable that the memory address that comprises the previewing programs figure that live broadcast stream media is corresponding in default programme information list, programm name, program initial time and whether shielded electronic equipment (first identifying).
Exemplary, the current broadcasting of electronic equipment be the top line " Chinese good sound " in programme televised live list, in programme televised live list, second program is " China on the tip of the tongue ", and electronic equipment switches and plays " China the tip of the tongue " from current playing program " Chinese good sound ".When electronic equipment receives program switching command, electronic equipment is according to the sign of the program to be broadcast in this program switching command " China on the tip of the tongue ", from default programme information list, obtain and be used to indicate electronic equipment for the first sign of playing the broadcasting authority of " China on the tip of the tongue ", so that electronic equipment knows according to this first sign whether himself can play " China on the tip of the tongue " in programme televised live list smoothly.
If S103 the first sign indication electronic equipment lack of competence is play program to be broadcast, electronic equipment obtains the sign of the standby that program to be broadcast is corresponding from default programme information list.
Concrete, when the first sign indication electronic equipment lack of competence that electronic equipment gets, play program to be broadcast, electronic equipment abandons playing program to be broadcast, and transfers broadcasting standby to.
Further, electronic equipment obtains the sign of the standby that program to be broadcast is corresponding from default programme information list, so that electronic equipment obtains data according to the sign of standby, wherein, the sign of standby can be the IP of standby.
It should be noted that, live broadcast stream media can be live audio frequency, can be also live video; Standby can be free online multimedium, can be also live broadcast stream media, and the embodiment of the present invention is not construed as limiting.
S104, electronic equipment are sent to dispatch server by the sign of standby.
At electronic equipment, know self do not have authority to play program to be broadcast, and get after the sign of standby of program to be broadcast, electronic equipment is sent to dispatch server by the sign of standby, so that fall server, according to the sign of the standby of electronic equipment transmission, determine the content distributing network CDN address corresponding with the sign of standby, thereby make electronic equipment get the program data of standby.、
Wherein, CDN is a kind of new network content service system, it is based on IP(Internet Protocol, the agreement interconnecting between network) network and building, the basic ideas of its structure are to avoid as far as possible likely affecting on the Internet bottleneck and the link of data transmission bauds and stability, make the transmission of data faster, more stable.By place node server everywhere at network, be formed in one deck intelligent virtual network on existing Internet basic, CDN system can be in real time according to the connection of network traffics, each node, load state, user's request is readjusted on the nearest service node of user to integrated informations such as user's distance and response times, its objective is and make user can obtain required data nearby, thereby solved the situation of Internet network congestion, improved the response speed of user's access websites.
S105, dispatch server, according to the sign of standby, are determined the content distributing network CDN address corresponding with the sign of standby.
Wherein, the content distributing network CDN address corresponding with the sign of standby is used to indicate the program data that electronic equipment reads standby.
Concrete, dispatch server is after the sign of standby that receives electronic equipment transmission, according to the sign of standby, to electronic equipment, distribute the CDN address corresponding with the sign of standby, wherein, the data list that comprises standby in the CDN server corresponding with CDN address, in this list, preserve the data of standby, electronic equipment, according to this CDN address, can get standby efficiently.
S106, electronic equipment receive the CDN address from dispatch server.
S107, electronic equipment, according to CDN address, obtain the address of the data list in the CDN server corresponding with CDN address.
Concrete, due to the data list that comprises standby in CDN server, in this list, preserve the data of standby, therefore, electronic equipment, after receiving CDN address, can get the address of the data list in CDN server according to CDN address, and then, electronic equipment, according to the address of this data list, obtains standby.
S108, electronic equipment, according to the address of data list, are downloaded the program data of standby.
S109, electronic equipment are play the program data of standby.
Electronic equipment gets after the program data of standby, by its broadcasting.
Further, when electronic equipment lack of competence is play program to be broadcast, electronic equipment is play standby.Electronic equipment is when playing standby, and the display interface display reminding information of electronic equipment, points out this electronic equipment lack of competence of user to play program to be broadcast, and program to be broadcast is converted to broadcasting standby.At electronic equipment, play in the process of standby, when current time arrives electronic equipment in programme televised live list and has the initial time of the program that authority plays, electronic equipment display interface also there will be information, point out user by the next program of playing in programme televised live list, and transfer play content to program that electronic equipment has authority to play.
Exemplary, the current broadcasting of electronic equipment be the top line " Chinese good sound " in programme televised live list, in programme televised live list, second program is " China on the tip of the tongue ", the 3rd program is " midday news ", when electronic equipment receives the instruction of switching current playing program, electronic equipment switches current playing program instruction according to this, from programme information list, obtain and be used to indicate the first sign whether electronic equipment has authority broadcasting " China on the tip of the tongue ", if the first sign indication electronic equipment cannot be play " China on the tip of the tongue ", electronic equipment obtains the backup file " Wall Street " of " China on the tip of the tongue ", electronic equipment is when switching to " Wall Street " by " Chinese good sound ", there is information in display interface: " does not have authority to play the China on the tip of the tongue, be about to play Wall Street for you ", in " Wall Street " playing process, if the broadcasting initial time of " midday news " arrives, and electronic equipment has authority to play " midday news ", electronic equipment display interface also there will be information: " being about to play midday news for you ", and " Wall Street " transferred to broadcasting " midday news ".
The embodiment of the present invention provides a kind of player method, when electronic equipment receives program switching command in the process of playing live broadcast stream media, according to the sign of the program to be broadcast comprising in program switching command, obtain indication electronic equipment for the first sign of the broadcasting authority of described program to be broadcast, if the first sign indication electronic equipment lack of competence is play program to be broadcast, electronic equipment obtains the sign of the standby that program to be broadcast is corresponding, and the sign of standby is sent to dispatch server, so that dispatch server is determined the CDN address corresponding with the sign of standby according to the sign of standby, thereby, electronic equipment is according to CDN address acquisition and play the program data of standby, solved when electronic equipment lack of competence is play program to be broadcast, electronic equipment can only carry out the problem of blank screen demonstration, promoted the broadcast performance of electronic equipment.
Embodiment bis-
The embodiment of the present invention provides a kind of electronic equipment, as shown in Figure 2, comprising:
Acquiring unit 10, while receiving program switching command for receiving element 12 described in the process at broadcasting live broadcast stream media, according to the sign of the program to be broadcast comprising in described program switching command, obtain first sign corresponding with the sign of described program to be broadcast; Wherein, described the first sign is used to indicate described electronic equipment for the broadcasting authority of described program to be broadcast, if and play described program to be broadcast for the described electronic equipment lack of competence of described the first sign indication, obtain the sign of the standby that described program to be broadcast is corresponding, and the described CDN address for receiving according to described receiving element 12 also, obtain the address of the data list in the CDN server corresponding with described CDN address;
Transmitting element 11, for the sign of described standby is sent to dispatch server, so that described dispatch server, according to the sign of described standby, is determined the content distributing network CDN address corresponding with the sign of described standby;
Receiving element 12, for program receiving switching command, and for receiving the described CDN address from described dispatch server;
Processing unit 13, for the address of the described data list that gets according to described acquiring unit 10, downloads the program data of described standby;
Display unit 14, for playing the program data of the described standby of described processing unit 13 downloads.
Further, described acquiring unit 10, sign specifically for the described program to be broadcast in the described program switching command receiving according to described receiving element 12, from default programme information list, obtain described the first sign, the also described live broadcast stream media request for receiving according to described receiving element 12, obtain the first information, the described first information at least comprises the programme title of the live broadcast stream media that described live broadcast stream media request is corresponding, the address of the server of programs stored forms data, the server of file type and described programs stored forms data can be identified the current date of form, and the described programme address for generating according to described processing unit 13 also, obtain playbill data corresponding to programme address described in the server of described programs stored forms data,
Described receiving element 12, also for receiving live broadcast stream media request;
Described processing unit 13, the described first information combination producing programme address for described acquiring unit 10 is got also, and the described playbill data for getting according to described acquiring unit 10 also, generate described default programme information list.
Further, described acquiring unit 10, concrete also for obtaining programme title and the file type of live broadcast stream media corresponding to the described live broadcast stream media request that receives with described receiving element 12, and obtain the address of server of programs stored forms data and the current date of the discernible form of server of described programs stored forms data;
Described processing unit 13, specifically for the single address form of the program according to default, the current date of the discernible form of server of the address of the server of described programme title, described programs stored forms data, described file type and described programs stored forms data is generated to described programme address.
Further, described acquiring unit 10, also for obtaining preset initiation parameter, described preset initiation parameter comprises the programme title of the live broadcast stream media corresponding with described live broadcast stream media request and/or the ID of described live broadcast stream media;
Described processing unit 13, while also only comprising the ID of described live broadcast stream media for the described preset initiation parameter getting at described acquiring unit 10, is converted to corresponding programme title by the ID of described live broadcast stream media.
The embodiment of the present invention provides a kind of electronic equipment, when acquiring unit receives program switching command in the process of playing live broadcast stream media, according to the sign of the program to be broadcast comprising in program switching command, obtain indication electronic equipment for the first sign of the broadcasting authority of described program to be broadcast, if the first sign indication electronic equipment lack of competence is play program to be broadcast, obtain the sign of the standby that program to be broadcast is corresponding, and the sign of standby is sent to dispatch server by transmitting element, so that dispatch server is determined the CDN address corresponding with the sign of standby according to the sign of standby, thereby, acquiring unit is according to CDN address acquisition and play the program data of standby, solved when electronic equipment lack of competence is play program to be broadcast, electronic equipment can only carry out the problem of blank screen demonstration, promoted the broadcast performance of electronic equipment.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the internal structure that is about to device is divided into different functional modules, to complete all or part of function described above.The system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described module or unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If the form of SFU software functional unit of usining described integrated unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.