CN111479123A - Method and device for acquiring media stream resources and mobile terminal - Google Patents

Method and device for acquiring media stream resources and mobile terminal Download PDF

Info

Publication number
CN111479123A
CN111479123A CN202010312920.2A CN202010312920A CN111479123A CN 111479123 A CN111479123 A CN 111479123A CN 202010312920 A CN202010312920 A CN 202010312920A CN 111479123 A CN111479123 A CN 111479123A
Authority
CN
China
Prior art keywords
media stream
resource
cdn node
service interface
room
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010312920.2A
Other languages
Chinese (zh)
Other versions
CN111479123B (en
Inventor
谢建斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuhuan Zhixun Information Technology Co ltd
Original Assignee
Yuhuan Zhixun Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuhuan Zhixun Information Technology Co ltd filed Critical Yuhuan Zhixun Information Technology Co ltd
Priority to CN202010312920.2A priority Critical patent/CN111479123B/en
Publication of CN111479123A publication Critical patent/CN111479123A/en
Application granted granted Critical
Publication of CN111479123B publication Critical patent/CN111479123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26216Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/654Transmission by server directed to the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

A method for acquiring media stream resources is suitable for being executed in an application of a mobile terminal, and comprises the following steps: determining an acquisition line of current media stream resources and a CDN node corresponding to the line; taking the CDN node as an acquisition source of the media stream resource, acquiring the media stream resource from the CDN node and playing the media stream resource; responding to the starting of a P2P resource acquisition mode by a user, and searching a P2P service interface corresponding to the CDN node; and switching the acquisition source of the media stream resource from the CDN node to the P2P service interface, and acquiring the media stream resource from the P2P service interface for playing. The invention also discloses a corresponding device for acquiring the media stream resources and a mobile terminal.

Description

Method and device for acquiring media stream resources and mobile terminal
Technical Field
The invention relates to the technical field of network live broadcast, in particular to a method and a device for acquiring media stream resources and a mobile terminal.
Background
With the development of the live broadcast industry and the increasing number of anchor broadcasts, the anchor broadcast client sends a large amount of live broadcast video streams to the server, and the live broadcast video streams are sent to the user client by the server to be watched by the user at any time. Typically, there are multiple lines in a live broadcast room, each line having its corresponding CDN node, so that a user pulls a stream from an edge node of the CDN. However, when the number of users is large, the CDN streaming manner will significantly increase the bandwidth of the CDN, increase the cost, and affect the video quality.
Therefore, a pull streaming method that can save CDN bandwidth and improve the smoothness of playing is needed.
Disclosure of Invention
To this end, the present invention provides a method, an apparatus and a mobile terminal for acquiring media stream resources, in an attempt to solve or at least alleviate at least one of the above problems.
According to an aspect of the present invention, there is provided a method for acquiring a media stream resource, which is suitable for being executed in an application of a mobile terminal, the method including: determining an acquisition line of current media stream resources and a CDN node corresponding to the line; taking the CDN node as an acquisition source of the media stream resource, acquiring the media stream resource from the CDN node and playing the media stream resource; responding to the starting of a P2P resource acquisition mode by a user, and searching a P2P service interface corresponding to the CDN node; and switching the acquisition source of the media stream resource from the CDN node to a P2P service interface, and acquiring the media stream resource from a P2P service interface for playing.
Optionally, in the method according to the present invention, the step of searching for a P2P service interface corresponding to the CDN node includes: acquiring a configuration file of an application from a server, wherein a P2P service interface corresponding to each CDN node is defined in the configuration file; and searching a P2P service interface corresponding to the CDN node from the configuration file.
Optionally, in the method according to the present invention, the method further includes a step of generating the configuration file in a server: according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file.
Optionally, in the method according to the present invention, the method is adapted to be executed in an application of the mobile terminal, the application is a live video application, and the media stream is a live video stream and is adapted to be played in a live room.
Optionally, in the method according to the present invention, the server stores a room identifier of each live broadcast room and a configuration file corresponding to the room identifier, and the step of obtaining the configuration file from the server includes: and acquiring a room identifier of the current live broadcast room, and acquiring a configuration file of the current live broadcast room in the application from a server according to the room identifier.
Optionally, in the method according to the present invention, the room identification comprises at least one of a room number, a room name, a major code number.
Optionally, in the method according to the invention, the P2P resource acquisition mode is turned on when the live room population reaches a predetermined value.
According to another aspect of the present invention, there is provided an apparatus for acquiring a media stream resource, which is adapted to reside in an application of a mobile terminal, the apparatus comprising: the CDN determination module is suitable for determining an acquisition line of the current media stream resource and a CDN node corresponding to the line; the CDN resource acquisition module is suitable for taking the CDN node as an acquisition source of the media stream resource, acquiring the media stream resource from the CDN node and playing the media stream resource; and a P2P determining module, which is used for searching a P2P service interface corresponding to the CDN node in response to the opening of the P2P resource acquisition mode by the user; and the P2P resource obtaining module is adapted to switch the obtaining source of the media stream resource from the CDN node to the P2P service interface, and obtain the media stream resource from the P2P service interface for playing.
Optionally, in an apparatus according to the present invention, the CDN determining module is adapted to: acquiring a configuration file of the application from a server, wherein a P2P service interface corresponding to each CDN node is defined in the configuration file; and searching the P2P service interface corresponding to the CDN node from the configuration file.
Optionally, in the apparatus according to the present invention, the server is adapted to generate the configuration file according to the following method: according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file.
Optionally, in the apparatus according to the present invention, the application is a live video application, and the media stream is a live video stream, which is suitable for playing in a live room.
According to yet another aspect of the present invention, there is provided a mobile terminal comprising at least one processor; a memory storing program instructions, and one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the method of acquiring a media stream resource as described above.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, which when executed by a mobile terminal, cause the mobile terminal to perform the method for acquiring a media stream resource as described above.
According to the technical scheme of the invention, when a user enters a live broadcast room, a CDN (content distribution network) stream pulling mode is firstly used for pulling the stream, when the number of people in a room meets a preset requirement, a P2P stream pulling mode is started, at the moment, the video stream is not pulled from an edge node of the CDN, but the clients are pulled mutually, namely the stream is pulled from a P2P service interface associated with the CDN node. This saves CDN bandwidth, reduces costs, and improves pull efficiency. And when the user enters the live broadcast room, the user will automatically go to the server to pull the configuration file, wherein the configuration file comprises the association relationship between each CDN line and the corresponding P2P, so that the corresponding P2P service interface is determined according to the configuration information interface.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
Fig. 1 shows a schematic block diagram of a live system 100 according to an embodiment of the invention;
fig. 2 shows a block diagram of the construction of a mobile terminal 200 according to an embodiment of the present invention;
FIG. 3 shows a flow diagram of a method 300 for obtaining media stream resources according to an embodiment of the invention;
FIGS. 4A and 4B respectively illustrate a schematic diagram of a configuration file according to one embodiment of the present invention; and
fig. 5 shows a block diagram of an apparatus 500 for acquiring a media stream resource according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a schematic block diagram of a live system 100 according to an embodiment of the invention. As shown in fig. 1, system 100 includes one or more clients 120 (e.g., clients 1-n), a server 140, and an anchor 160. A main broadcasting terminal 160 and a plurality of clients 120 form a live broadcasting room through the server 140, and a live broadcasting platform may include a plurality of live broadcasting rooms. It should be understood that the live system 100 shown in fig. 1 is merely exemplary, that there may be different numbers of clients and anchor in a particular implementation, and that the invention is not limited to the number and deployment of the clients 120, servers 140, and anchors 160.
Servers 140 may be deployed in multiple geographic locations, respectively, which may be implemented as a single computing device or as a cluster. The server 140 is communicatively connected to the client 120 and the anchor 160, and is capable of receiving media streams such as video streams and audio streams uploaded by the anchor 160, and also capable of receiving requests sent by the client 120 and returning data to the client 120. The audience and the anchor can enter the live broadcast room by logging in a mobile terminal or a browser webpage. When logging in to the mobile terminal, the client 120 may have a video application such as a live application, and the video application may include the apparatus 500 for acquiring a media stream resource according to the present invention, and the apparatus can acquire the media stream resource to play. Of course, the apparatus 500 may not reside in the video application, but may be distributed among a plurality of functional modules of the client, and when the video application needs to implement the function of the apparatus, the respective modules of the apparatus may be called in different functions.
According to an embodiment of the present invention, the client 120 and the anchor 160 in the live system 100 can be implemented by the mobile terminal 200 as described below. Fig. 2 shows a block diagram of a mobile terminal 200 according to an embodiment of the present invention. As shown in fig. 2, the mobile terminal 200 may include a memory interface 202, one or more data processors, image processors and/or central processing units 204, and a peripheral interface 206.
The memory interface 202, the one or more processors 204, and/or the peripherals interface 206 can be discrete components or can be integrated in one or more integrated circuits. In the mobile terminal 200, the various elements may be coupled by one or more communication buses or signal lines. Sensors, devices, and subsystems can be coupled to peripheral interface 206 to facilitate a variety of functions.
For example, a motion sensor 210, a light sensor 212, and a distance sensor 214 may be coupled to the peripheral interface 206 to facilitate directional, lighting, and ranging functions. Other sensors 216 may also be coupled to the peripheral interface 206, such as a positioning system (e.g., a GPS receiver), an acceleration sensor, a temperature sensor, a biometric sensor, or other sensing device, to facilitate related functions.
Camera subsystem 220 and optical sensor 222, which may be, for example, a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) optical sensor, may be used to facilitate implementation of camera functions such as recording photographs and video clips. May pass through one or moreThe wireless communication subsystem 224 may include a radio frequency receiver and transmitter and/or an optical (e.g., infrared) receiver and transmitter the particular design and implementation of the wireless communication subsystem 224 may depend on one or more communication networks supported by the mobile terminal 200. for example, the mobile terminal 200 may include a network designed to support L TE, a 3G, GSM network, a GPRS network, an EDGE network, a Wi-Fi or WiMax network, and BluetoothTM A communication subsystem 224 of the network.
The audio subsystem 226 may be coupled with a speaker 228 and a microphone 230 to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions. The I/O subsystem 240 may include a touchscreen controller 242 and/or one or more other input controllers 244. The touch screen controller 242 may be coupled to a touch screen 246. For example, the touch screen 246 and touch screen controller 242 may detect contact and movement or pauses made therewith using any of a variety of touch sensing technologies, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies.
One or more other input controllers 244 can be coupled to other input/control devices 248, such as one or more buttons, rocker switches, thumbwheels, infrared ports, USB ports, and/or pointing devices such as styluses. The one or more buttons (not shown) may include up/down buttons for controlling the volume of the speaker 228 and/or the microphone 230.
The memory interface 202 may be coupled with a memory 250. The memory 250 may include high-speed random access memory and/or non-volatile memory, such as one or more magnetic disk storage devices, one or more optical storage devices, and/or flash memory (e.g., NAND, NOR). The memory 250 may store an operating system 252, such as an operating system like Android, iOS or Windows Phone. The operating system 252 may include instructions for handling basic system services and for performing hardware dependent tasks. The memory 250 may also store an application 254 (i.e., an application program, hereinafter referred to as an application). While the mobile terminal is running, the operating system 252 is loaded from memory 250 and executed by the processor 204. The application 254, when running, is also loaded from the memory 250 and executed by the processor 204. The application 254 runs on top of an operating system, and implements various user-desired functions, such as instant messaging, web browsing, picture management, video playing, and the like, using interfaces provided by the operating system and underlying hardware. The application 254 may be provided independently of the operating system, or may be provided by the operating system itself, including various social application software, such as QQ, WeChat, microblog, and the like, and also including various application software for playing video and live games, and may also include system-owned application programs such as a photo album, a calculator, and a recording pen. In addition, a driver module may also be added to the operating system when the application 254 is installed in the mobile terminal 200.
The program for executing the method 300 for acquiring a media stream resource provided by the embodiment of the present invention is one of the applications 254. In some embodiments, the mobile terminal 200 is configured to perform the method 300 for acquiring a media stream resource according to the present invention.
Fig. 3 shows a flowchart of a method 300 for acquiring a media stream resource, which is suitable for being executed in a mobile terminal, and in particular, can be executed in an application of the mobile terminal, such as a live video application, in which case the media stream may be a live video stream suitable for being played in a live broadcast room. As shown in fig. 3, the method begins at step S320.
In step S320, an obtaining route of the current media stream resource and a CDN node corresponding to the route are determined.
Usually, there are multiple lines in the live broadcast room, such as a main line, a standby line, an ultra-clear line, and a high-definition line, and each line has a corresponding CDN node and a CDN service provider, that is, each line can provide resources for the corresponding CDN service provider. For example, line one may be a CDN of a satellite domain service provider, line two may be a CDN of a wire speed service provider, and line three may be a CDN of an Tencent service provider. The user can independently select which line is used after entering the live broadcast room, and the live broadcast room can also switch default lines for the user according to the current network environment and the user attribute. If the user is a member of a service provider (e.g., a member in flight) but the line provided by the service provider is an alternate line, the present invention automatically switches the line and CDN provided by the service provider for the user.
Subsequently, in step S340, the CDN node is used as an obtaining source of the media stream resource, and the media stream resource is obtained therefrom and played, that is, the stream playing is pulled from the CDN node.
Subsequently, in step S360, in response to the user turning on the P2P resource acquisition mode, a P2P service interface corresponding to the CDN node is searched.
According to one embodiment, the P2P resource acquisition mode may be automatically turned on when the number of live rooms reaches a predetermined value, wherein the predetermined value may be 100, but is not limited thereto. Certainly, after the user enters the live broadcast room, the media stream resource in the initial period may be obtained in the CDN resource obtaining mode, and after a predetermined time (e.g., 3min) is reached, whether to start the P2P resource obtaining mode is determined according to whether the number of people in the current live broadcast room reaches a predetermined value. That is, when the live broadcast room is just opened, no matter whether the number of people in the live broadcast room meets a preset value or not, a section of media stream resource is acquired in a CDN resource acquisition mode, and then switching is performed as required. Therefore, the fluency of the initial media resource acquisition of the user can be ensured, the bandwidth can be saved in the subsequent media resource acquisition, and the user experience is integrally improved.
According to one embodiment, when searching for a P2P service interface corresponding to a CDN node, a configuration file of an application may be obtained from a server, where the configuration file defines a P2P service interface corresponding to each CDN node, and a P2P service interface corresponding to the CDN node is searched for from the configuration file. Wherein the server may generate the configuration file according to the following method: according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file.
Fig. 4A and 4B respectively show schematic diagrams of configuration files according to an embodiment of the present invention, where the configuration files include a main line available in a current live broadcast room, one or more standby lines, a CDN corresponding to each line, and a P2P service interface corresponding to each CDN. For example, in fig. 4A, main ═ 2_3 represents that the main line of the live broadcast room is a CDN of a network sink, slaveflag ═ 14_29 represents that the standby line is a CDN of flight, and then 2_3 ═ xy and 14_29 ═ xy are obtained from P2pConf (P2P configuration list), that is, both the main line and the standby line use P2P provided by the star domain service provider. Thus, no matter which line the current line is, the last P2P switch is to the P2P of the satellite domain service provider. In addition, a state table whether each P2P service provider provides P2P service is also maintained in the configuration file, where tx _ stat (flight P2P), ws _ stat (network speed P2P), xy _ stat (star field P2P), kcg _ stat (jinshan P2P), a value of 1 represents that the P2P service of the P2P service provider can be used, and a value of 0 represents that the service is not available.
In addition, each live broadcast room has a corresponding configuration file, and the server can also store the room identifier of each live broadcast room and the corresponding configuration file, so that the room identifier of the current live broadcast room can be obtained, and the configuration file of the current live broadcast room in the application can be obtained from the server according to the room identifier. Wherein the room identifier comprises at least one of a room number, a room name and a main play number. When the user enters the live broadcast room, the client acquires the configuration file from the server in a network request mode, and the network request can comprise at least one of an entering room number, a main broadcast identification, a room type, a room classification name, a room unique mark and a room number.
The following is a network request and its included request parameters:
https://api.m.panda.tv/ajax_get_liveroom_baseuserinfo?transferParam=%7B%22roomid%22%3A1748104%2C%22hostid%22%3A%22118566516%22%2C%22roomtype%22%3A%221%22%2C%22classEname%22%3A%22wenwanjianshang%22%2C%22roomKey%22%3A%221efb450219a4dc477a1a0e4b968a1ec9%22%2C%22person_num%22%3A%2214651%22%7D&inroom=1&transferTime=1542959428&transferSign=e793a0508768d24083afdb653477bd1c&__version=4.0.37.3720&__plat=ios&__channel=appstore
{"roomid":1748104,"hostid":"118566516","roomtype":"1","classEname":"wenwanjianshang","roomKey":"1efb450219a4dc477a1a0e4b968a1ec9","person_num":"14651"}
subsequently, in step S380, the obtaining source of the media stream resource is switched from the CDN node to the determined P2P service interface, and the media stream resource is obtained from the P2P service interface for playing. That is, after the P2P resource obtaining mode is started, the media stream resource is not obtained from the original CDN, but is obtained from the P2P service interface corresponding to the CDN for playing, so as to save bandwidth. The media stream resource is obtained from the P2P service interface, which may be in a conventional manner, and the present invention is not limited thereto.
Fig. 5 shows a schematic block diagram of an apparatus 400 for acquiring a media stream resource according to an embodiment of the present invention, which is suitable for residing in a mobile terminal, and in particular may reside in an application of the mobile terminal, such as a live video application, in which case the media stream may be a live video stream, and is suitable for playing in a live broadcast room. As shown in fig. 5, the apparatus 500 includes a CDN determining module 520, a CDN resource obtaining module 540, a P2P determining module 560, and a P2P resource obtaining module 580.
The CDN determining module 520 is adapted to determine an obtaining route of the current media stream resource and a CDN node corresponding to the route.
The CDN resource obtaining module 540 is adapted to obtain the media stream resource from the CDN node as an obtaining source of the media stream resource and play the media stream resource.
The P2P determination module 560 is adapted to search for a P2P service interface corresponding to the CDN node in response to a user turning on the P2P resource acquisition mode. Specifically, the P2P determining module 560 is adapted to obtain a configuration file of the application from the server, where the configuration file defines a P2P service interface corresponding to each CDN node; and searching a P2P service interface corresponding to the CDN node from the configuration file.
According to one embodiment of the invention, the server may generate the configuration file according to the following method: according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file. In addition, the server stores the room identifier of each live broadcast room and the configuration file corresponding to the room identifier, and the CDN determining module 520 is adapted to obtain the room identifier of the current live broadcast room, and obtain the configuration file of the current live broadcast room in the application from the server according to the room identifier. Wherein the room identifier comprises at least one of a room number, a room name and a main play number. In addition, the P2P resource acquisition mode is turned on when the number of live room people reaches a predetermined value, which may be, for example, 100, although not limited thereto.
The P2P resource obtaining module 580 is adapted to switch the obtaining source of the media stream resource from the CDN node to the P2P service interface, and obtain the media stream resource from the P2P service interface for playing.
The apparatus 500 for acquiring a media stream resource according to the present invention has been disclosed in detail in the description based on fig. 1-3 and fig. 4A and 4B, and will not be described herein again.
According to the technical scheme of the invention, a corresponding P2P service interface is configured for each line in advance, when a user just enters a live broadcast room, live broadcast video is obtained from a CDN node of the current line, and then the mode is switched to a P2P mode, namely the live broadcast video is obtained from a P2P service interface corresponding to the CDN, so that the bandwidth is saved, the cost is reduced, and the watching experience of the user is improved.
B9, the apparatus as in B8, wherein the CDN determination module is adapted to: acquiring a configuration file of the application from a server, wherein a P2P service interface corresponding to each CDN node is defined in the configuration file; and searching a P2P service interface corresponding to the CDN node from the configuration file.
B10, the apparatus as in B8, wherein the server is adapted to generate the configuration file according to the following method: according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file.
B11, the device as in any one of B8-B10, wherein the application is a video live application, and the media stream is a live video stream which is suitable for playing in a live room.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the media stream resource acquisition method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A method for acquiring media stream resources, which is suitable for being executed in a mobile terminal, comprises the following steps:
determining an acquisition line of current media stream resources and a CDN node corresponding to the line;
taking the CDN node as an acquisition source of the media stream resource, acquiring the media stream resource from the CDN node and playing the media stream resource; and
responding to the starting of a P2P resource acquisition mode by a user, and searching a P2P service interface corresponding to the CDN node;
and switching the acquisition source of the media stream resource from the CDN node to the P2P service interface, and acquiring the media stream resource from the P2P service interface for playing.
2. The method of claim 1, wherein the step of searching for a P2P service interface corresponding to the CDN node comprises:
acquiring a configuration file of the application from a server, wherein a P2P service interface corresponding to each CDN node is defined in the configuration file; and
searching the P2P service interface corresponding to the CDN node from the configuration file.
3. The method of claim 2, further comprising the step of generating the configuration file in a server:
according to the network connectivity and the bandwidth structure between the CDN nodes and the P2P, the P2P service interface corresponding to each CDN node is determined, and the association relationship between each CDN node and the corresponding P2P service interface is generated in a configuration file.
4. A method according to any of claims 1-3, wherein the method is adapted to be executed in an application of the mobile terminal, the application being a live video type application, and the media stream being a live video stream adapted to be played in a live room.
5. The method as claimed in claim 4, wherein the server stores the room id of each live room and its corresponding configuration file, and the step of obtaining the configuration file from the server includes:
and acquiring a room identifier of the current live broadcast room, and acquiring a configuration file of the current live broadcast room in the application from a server according to the room identifier.
6. The method of claim 5, wherein the room identification comprises at least one of a room number, a room name, a podcast number.
7. The method of claim 4, wherein the P2P resource acquisition mode is turned on when the live room population reaches a predetermined value.
8. An apparatus for acquiring a media stream resource, which is suitable for residing in an application of a mobile terminal, the apparatus comprising:
the CDN determination module is suitable for determining an acquisition line of the current media stream resource and a CDN node corresponding to the line;
the CDN resource acquisition module is suitable for taking the CDN node as an acquisition source of the media stream resource, acquiring the media stream resource from the CDN node and playing the media stream resource; and
the P2P determining module is used for searching a P2P service interface corresponding to the CDN node in response to the starting of a P2P resource acquisition mode by a user;
a P2P resource obtaining module, adapted to switch the obtaining source of the media stream resource from the CDN node to the P2P service interface, and obtain the media stream resource from the P2P service interface for playing.
9. A mobile terminal, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of claims 1-7.
10. A readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a mobile terminal, cause the mobile terminal to perform any of the methods of claims 1-7.
CN202010312920.2A 2020-04-20 2020-04-20 Method and device for acquiring media stream resources and mobile terminal Active CN111479123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010312920.2A CN111479123B (en) 2020-04-20 2020-04-20 Method and device for acquiring media stream resources and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010312920.2A CN111479123B (en) 2020-04-20 2020-04-20 Method and device for acquiring media stream resources and mobile terminal

Publications (2)

Publication Number Publication Date
CN111479123A true CN111479123A (en) 2020-07-31
CN111479123B CN111479123B (en) 2022-05-06

Family

ID=71754314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010312920.2A Active CN111479123B (en) 2020-04-20 2020-04-20 Method and device for acquiring media stream resources and mobile terminal

Country Status (1)

Country Link
CN (1) CN111479123B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557423A (en) * 2009-05-07 2009-10-14 北京邮电大学 System and method for realizing streaming media content service
CN101681331A (en) * 2006-09-06 2010-03-24 阿卡麦科技公司 Hybrid content delivery network network (CDN) and equity (P2P) network
US20110213879A1 (en) * 2010-03-01 2011-09-01 Ashley Edwardo King Multi-level Decision Support in a Content Delivery Network
CN102404378A (en) * 2010-09-07 2012-04-04 成都索贝数码科技股份有限公司 Streaming media distribution and transmission network system
US20160057185A1 (en) * 2013-03-21 2016-02-25 Telefonaktiebolaget L M Ericsson (Publ) Streaming Service Provision Support in a P2P-CDN Streaming System
CN105898388A (en) * 2016-04-05 2016-08-24 合网络技术(北京)有限公司 Node downloading scheduling method and node downloading scheduling device
US20160381127A1 (en) * 2012-09-10 2016-12-29 William James Gibson Systems and methods for dynamic networked peer-to-peer content distribution
CN108271032A (en) * 2016-12-30 2018-07-10 武汉斗鱼网络科技有限公司 A kind of live video switching method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101681331A (en) * 2006-09-06 2010-03-24 阿卡麦科技公司 Hybrid content delivery network network (CDN) and equity (P2P) network
CN101557423A (en) * 2009-05-07 2009-10-14 北京邮电大学 System and method for realizing streaming media content service
US20110213879A1 (en) * 2010-03-01 2011-09-01 Ashley Edwardo King Multi-level Decision Support in a Content Delivery Network
CN102404378A (en) * 2010-09-07 2012-04-04 成都索贝数码科技股份有限公司 Streaming media distribution and transmission network system
US20160381127A1 (en) * 2012-09-10 2016-12-29 William James Gibson Systems and methods for dynamic networked peer-to-peer content distribution
US20160057185A1 (en) * 2013-03-21 2016-02-25 Telefonaktiebolaget L M Ericsson (Publ) Streaming Service Provision Support in a P2P-CDN Streaming System
CN105898388A (en) * 2016-04-05 2016-08-24 合网络技术(北京)有限公司 Node downloading scheduling method and node downloading scheduling device
CN108271032A (en) * 2016-12-30 2018-07-10 武汉斗鱼网络科技有限公司 A kind of live video switching method and device

Also Published As

Publication number Publication date
CN111479123B (en) 2022-05-06

Similar Documents

Publication Publication Date Title
US10797931B2 (en) Systems and methods for using seektables to stream media items
US11537357B2 (en) Media context switching between devices using wireless communications channels
EP3343844B1 (en) System and method for use of a media content bot in a social messaging environment
CN107329750B (en) Identification method and skip method of advertisement page in application program and mobile terminal
US11128906B2 (en) Providing streaming video from mobile computing nodes
KR101942211B1 (en) Cooperative provision of personalized user functions using shared and personal devices
US20170195387A1 (en) Method and Electronic Device for Increasing Start Play Speed
US9823817B1 (en) Methods, systems, and media for associating scenes depicted in media content with a map of where the media content was produced
US20160294903A1 (en) Method and device for pushing resources to mobile communication terminal by smart television
US20160029050A1 (en) Hybrid Stream Delivery
WO2017101309A1 (en) Reservation message push method and device
WO2017192173A1 (en) Methods, systems, and media for presenting a notification of playback availability
US11792238B2 (en) Method, system, and non-transitory computer-readable record medium for sharing content during VoIP-based call
WO2020010817A1 (en) Video processing method and device, and terminal and storage medium
KR101531284B1 (en) An apparatus for presenting cloud streaming services, a method thereof and a system thereof
KR101659420B1 (en) Personalized video content consumption using shared video device and personal device
CN111479123B (en) Method and device for acquiring media stream resources and mobile terminal
KR20180125097A (en) Apparatus and method providing hybrid smart tv based on cloud
CN108604238A (en) method, system and medium for media guidance
KR101703963B1 (en) Method and system for providing multimedia service using cash server
US10193949B2 (en) Communication apparatus, communication method, and storage medium
KR102228375B1 (en) Method and system for reproducing multiple streaming contents
JP2013236282A (en) Information communication program, information communication device, and distribution server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant