CN109819285B - Live broadcast method and device, electronic equipment and storage medium - Google Patents
Live broadcast method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109819285B CN109819285B CN201711171936.0A CN201711171936A CN109819285B CN 109819285 B CN109819285 B CN 109819285B CN 201711171936 A CN201711171936 A CN 201711171936A CN 109819285 B CN109819285 B CN 109819285B
- Authority
- CN
- China
- Prior art keywords
- live
- pull
- stream
- address
- live broadcast
- 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.)
- Active
Links
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention discloses a live broadcast method, a live broadcast device, electronic equipment and a storage medium, which belong to the technical field of Internet and can effectively improve disaster tolerance performance of network live broadcast. The method comprises the following steps: acquiring a live original pull stream address; pushing the preset number of live streaming in the original pull streaming address to a target pull streaming address to form an updated pull streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network; and when the audience terminal pulls the stream to watch the live broadcast, providing the updated pull stream address list to the audience terminal so that the audience terminal pulls the stream from the updated pull stream address to watch the live broadcast. The invention can be used in network live broadcast.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a live broadcast method and apparatus, an electronic device, and a storage medium.
Background
In recent years, the popularity of audio and video transmission by using the internet is increasing, and a plurality of video multimedia services with rich content, convenient use and strong interactivity appear. In many audio and video live broadcast applications, it is necessary to provide a usage flow as simple as possible and basic services of high concurrency, smoothness, low latency and high definition for both a main broadcast and audiences.
In implementation, live Content of live video is generally pushed and pulled between a main broadcast and a viewer through a Content Delivery Network (CDN), so as to be played and viewed. However, since the path flow only exists on a service node of a CDN vendor, once an edge node of the CDN vendor fails, all viewers cannot watch the anchor broadcast video stream, which seriously affects system availability and causes poor disaster tolerance for live network.
Disclosure of Invention
In view of this, embodiments of the present invention provide a live broadcast method, a live broadcast device, an electronic device, and a storage medium, which can effectively improve disaster recovery performance of live network broadcast.
In a first aspect, an embodiment of the present invention provides a live broadcasting method, including: acquiring a live original pull stream address; pushing the preset number of live streaming in the original pull streaming address to a target pull streaming address to form an updated pull streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network; and when the audience terminal pulls the stream to watch the live broadcast, providing the updated pull stream address list to the audience terminal so that the audience terminal pulls the stream from the updated pull stream address to watch the live broadcast.
With reference to the first aspect, in a first implementation manner of the first aspect, the pushing the preset number of live streams in the original pull stream address to the destination pull stream address includes: and pushing the live streaming of the preset number in the original pull streaming address to a target pull streaming address through an intermediate node.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the pushing, by the intermediate node, a preset number of live streams in the original pull stream address to the destination pull stream address includes: pulling the live stream from the original stream pulling address through an intermediate node; under the condition that the intermediate node successfully pulls the live stream, indicating a target stream pulling address corresponding to the live stream to the intermediate node; and pushing the pulled live stream to the target pull stream address through the intermediate node.
With reference to the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the method further includes: detecting whether the anchor end finishes the live broadcasting or not under the condition that the intermediate node fails to push the live broadcasting stream; and under the condition that the live broadcast is not finished at the anchor end, continuously carrying out forward push on the live broadcast stream through the intermediate node.
With reference to the first implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the method further includes: receiving node load information reported by the intermediate node; and scheduling the intermediate nodes which carry out the forwarding and pushing operation according to the node load information so as to balance the load of the intermediate nodes.
With reference to the first aspect or any one of the first to fourth implementation manners of the first aspect, in a fifth implementation manner of the first aspect, the providing, to the viewer, the updated pull stream address list when the viewer pulls a stream to watch a live broadcast includes: receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched; determining an updated pull stream address list corresponding to the live broadcast to be watched by the audience according to the live broadcast video identifier; and providing the updated pull stream address list to the audience.
With reference to the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the determining, according to the live video identifier, an updated pull stream address list corresponding to a live broadcast to be watched by the viewer includes: determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification; and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
With reference to the first aspect, in a seventh implementation manner of the first aspect, the live broadcast includes a main unicast or a main audience interactive live broadcast.
In a second aspect, an embodiment of the present invention further provides a live broadcasting apparatus, including: the acquisition unit is used for acquiring a live original pull stream address; the forwarding and pushing unit is used for forwarding the preset number of live streaming in the original streaming addresses to the target streaming addresses to form an updated streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network; and the providing unit is used for providing the updated pull stream address list to the audience terminal when the audience terminal pulls and watches the live broadcast so as to ensure that the audience terminal pulls and watches the live broadcast from the updated pull stream address.
With reference to the second aspect, in a first implementation manner of the second aspect, the forwarding unit is specifically configured to forward, through an intermediate node, a preset number of live streams in the original pull stream address to the destination pull stream address.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the rotation and pushing unit includes: a pull module, configured to pull the live stream from the original pull stream address through an intermediate node; an indicating module, configured to indicate, to the intermediate node, a destination stream pull address corresponding to the live stream when the intermediate node successfully pulls the live stream; and the pushing module is used for pushing the pulled live stream to the target pull stream address through the intermediate node.
With reference to the first implementation manner of the second aspect, in a third implementation manner of the second aspect, the apparatus further includes: the detecting unit is used for detecting whether the anchor end finishes the live broadcast or not under the condition that the intermediate node fails to push the live broadcast stream; and the forward push unit is further configured to continue to forward the live stream through the intermediate node under the condition that the live broadcast is not finished at the anchor end.
With reference to the first implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the apparatus further includes: a receiving unit, configured to receive node load information reported by the intermediate node; and the scheduling unit is used for scheduling the intermediate node which carries out the forwarding operation according to the node load information received by the receiving unit so as to balance the load of the intermediate node.
With reference to the second aspect or any one of the first to fourth embodiments of the second aspect, in a fifth embodiment of the second aspect, the providing unit includes: the receiving module is used for receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched; a determining module, configured to determine, according to the live video identifier, an updated pull address list corresponding to a live broadcast to be watched by the viewer; and the providing module is used for providing the updated pull stream address list to the audience.
With reference to the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the determining module is specifically configured to: determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification; and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
With reference to the second aspect, in a seventh implementation form of the second aspect, the live broadcast comprises a main unicast or a main viewer interactive live broadcast.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing any live broadcast method provided by the embodiment of the invention.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement any of the live methods provided by the embodiments of the present invention.
The live broadcasting method, the live broadcasting device, the electronic equipment and the storage medium provided by the embodiment of the invention can push the preset number of live broadcasting streams in the original streaming addresses to the target streaming addresses, and provide the live broadcasting streams to each audience terminal by the original streaming addresses and the target streaming addresses. Therefore, as the original pull stream address and the target pull stream address belong to different CDN manufacturers respectively, even if the CDN pull stream service provided by one CDN manufacturer fails, a part of audience can still continuously watch the live video through the pull stream service provided by other CDN manufacturers, the condition that all audience ends cannot watch the live video can not be caused, and the disaster tolerance performance of the live network is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a live broadcast method according to an embodiment of the present invention;
fig. 2 is a detailed flowchart of a live broadcasting method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a live broadcasting device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In a first aspect, an embodiment of the present invention provides a live broadcast method, which can forward a live video broadcast in a pull address, and provide a pull service to a viewer end by using multiple CDN service vendors, so as to effectively improve disaster recovery performance of live network broadcast.
As shown in fig. 1, a live broadcasting method provided by an embodiment of the present invention may include:
s11, acquiring a live original pull stream address;
specifically, the live broadcast in this embodiment is based on a CDN network, and a live video recorded by a main broadcast end is uploaded to a CDN stream pushing node and buffered to a stream pulling node closest to a viewer end through the CDN network, so that the viewer end pulls a live stream from the closest stream pulling node to view a corresponding live video. The original pull stream address in this step is an address for providing corresponding live video for the audience terminal on the CDN edge node closest to the audience terminal. The node corresponding to the address may provide a live video stream to a plurality of viewers at the same time, and each viewer corresponds to one live video stream.
S12, pushing the live streaming with the preset number in the original streaming addresses to the target streaming addresses to form an updated streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network;
in the step, live streaming addresses are changed or expanded, and a preset number of live streams provided for audience terminals in CDN nodes at the original streaming addresses are pushed to target streaming addresses different from CDN manufacturers at the original streaming addresses, so that an updated streaming address list is formed. The number of live streams to be forwarded and pushed can be set and adjusted as required, and the live streams can only relate to a part of live streams in the original pull stream address and can also relate to all live streams in the original pull stream address. Optionally, according to specific needs, the number of the destination pull stream addresses may be one or more, and the corresponding CDN vendors may be one or more than one, as long as the CDN vendors are different from the CND vendors to which the original pull stream addresses belong, which is not limited in this embodiment of the present invention.
And S13, when the audience pulls to watch the live broadcast, the updated pull address list is provided for the audience so that the audience pulls to watch the live broadcast from the updated pull address.
In this step, when the viewer pulls the stream, an updated pull stream address list can be provided to the viewer, and the viewer can select a pull stream address from the updated pull stream address list to watch the live video.
The live broadcasting method provided by the embodiment of the invention can push the live broadcasting streams with preset number in the original stream addresses to the target stream addresses, and the original stream addresses and the target stream addresses provide the live broadcasting streams to all audience terminals together. Therefore, as the original pull stream address and the target pull stream address belong to different CDN manufacturers respectively, even if the CDN pull stream service provided by one CDN manufacturer fails, a part of audience can still continuously watch the live video through the pull stream service provided by other CDN manufacturers, the condition that all audience ends cannot watch the live video can not be caused, and the disaster tolerance performance of the live network is greatly improved.
Optionally, the live broadcast in the embodiment of the present invention may include a situation of a main broadcast unicast, or a situation of an interactive live broadcast of a main broadcast viewer, and the embodiment of the present invention does not limit this. Particularly, for the interactive live broadcast of the anchor and the audience, the anchor and the audience need to provide corresponding support for the anchor end and the streaming end node served by the CDN to perform the live-talk interaction, so that the number of CDN manufacturers that can meet the requirements is greatly reduced, and the disaster tolerance is greatly reduced. In view of this, in some embodiments of the present invention, when selecting a suitable CDN manufacturer for the anchor side, more CDN manufacturers may provide corresponding pull service for the audience side together through live stream forwarding, so as to distribute risks, thereby greatly improving the disaster tolerance performance of the pull side.
Specifically, in step S11, the cloud service end may learn, through a live broadcast request sent by the anchor end, which CDN service provider the live video recorded by the anchor end is delivered through, and select, according to the position of the viewer end, one pull flow node closest to the viewer end from the pull flow nodes deployed by the CDN service providers as an original pull flow node, where the corresponding address is an original pull flow address, so as to learn an original pull flow address of a live stream.
After the original pull stream address is obtained, in step S12, the preset number of live streams in the original pull stream address may be pushed to other pull stream addresses, that is, destination pull stream addresses, through the intermediate node. The intermediate node may be various devices or servers for forwarding the live stream from one pull address to another, etc. The number of the intermediate nodes may be one or more, and the embodiment of the present invention does not limit this.
Specifically, in an embodiment of the present invention, pushing, by an intermediate node, a preset number of live streams in the original pull stream address to a destination pull stream address may include: pulling the live stream from the original stream pulling address through an intermediate node; under the condition that the intermediate node successfully pulls the live stream, indicating a target stream pulling address corresponding to the live stream to the intermediate node; and pushing the pulled live stream to the target pull stream address through the intermediate node.
That is to say, the cloud server may transmit the obtained original streaming address to the intermediate node, and the intermediate node may pull the video stream from the original streaming address to the intermediate node after receiving the original streaming address. And the intermediate node can report the pull state to the cloud server at any time, if the intermediate node successfully pulls the video stream, the cloud server can send a target pull address to the intermediate node, and after receiving the target pull address, the intermediate node can push the pulled video stream to the target pull address. Of course, in other embodiments of the present invention, the cloud server may also notify the intermediate node of the original pull stream address and the destination pull stream address, and the intermediate node directly performs pull and push of the live stream. The embodiments of the present invention are not limited thereto.
Optionally, in various live video broadcasts, each intermediate node may pull and push multiple live streams simultaneously. These pulls and pushes may succeed or may fail. In an embodiment of the present invention, in a case that the intermediate node fails to push the live stream, it may be detected whether the anchor end finishes live streaming; and under the condition that the live broadcasting is not finished by the anchor terminal, the live broadcasting stream can be continuously pushed through the intermediate node. Optionally, in the forwarding process, one intermediate node performing the forwarding may be always kept unchanged, or one intermediate node may be switched to another intermediate node, which is not limited in the embodiment of the present invention.
For example, in an embodiment of the present invention, the anchor uploads the live video, the original pull stream address is add1, and the live video is copied and pushed to the destination pull stream address add2 by performing live broadcast forwarding through the intermediate node M1. And the intermediate node M tries to transfer and push failure after a period of time and reports the transfer and push failure to the cloud server. The cloud server discovers that the anchor does not actively terminate the live broadcast, and instructs the intermediate node M to try to pull the stream from add1 and push to add2 again. If the forwarding of the intermediate node M still fails, the cloud server may instruct the intermediate node to repeat the forwarding after a preset time interval, for example, a fibonacci number of seconds. Or, the cloud server may instruct the intermediate node N to replace the intermediate node M to perform the forwarding operation.
When the fact that the anchor end finishes live broadcasting is detected, the cloud server end can inform the intermediate node to stop corresponding pull flow and push work.
Further, because the original streaming addresses, the destination streaming addresses, and the intermediate nodes are numerous and are interlaced into a network, in order to make the distribution of the streaming more reasonable and make the load of each intermediate node balanced, according to an embodiment of the present invention, the live broadcasting method provided in the embodiment of the present invention may further include: receiving node load information reported by the intermediate node; and scheduling the intermediate nodes which carry out the forwarding and pushing operation according to the node load information so as to balance the load of the intermediate nodes.
For example, the intermediate node P1 is responsible for pushing both a live stream with the original pull stream address add3 to the destination pull stream address add4 and a live stream with the original pull stream address add5 to the destination pull stream address add 6. The intermediate node P1 may report the forwarding states of the two live streams and the load information of the intermediate node P1, such as the CPU utilization, to the cloud server at regular time. If the CPU utilization of the intermediate node P1 is 80% and the CPU utilization of another intermediate node P2 is 30%, the cloud server may transfer a part of the forwarding tasks of the intermediate node P1 to the intermediate node P2 to complete, so as to reduce the workload of the intermediate node P1, and make full use of the intermediate node P2, so that the whole forwarding system is more balanced.
The above mainly describes how to push the live stream at the original pull address to the destination pull address through the intermediate node. However, for the viewer, after such a transition, the address of the live stream obtained by the viewer changes, and in order to view the live video program smoothly, the viewer needs to obtain the pull stream address after the transition. For this reason, in step S13, when the viewer end pulls to watch the live broadcast, the updated pull address list needs to be provided to the viewer end.
Specifically, in one embodiment of the present invention, when the viewer end pulls the live broadcast, the step of providing the updated pull address list to the viewer end may comprise the steps of:
receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched;
determining an updated pull stream address list corresponding to the live broadcast to be watched by the audience according to the live broadcast video identifier;
and providing the updated pull stream address list to the audience.
For example, in an embodiment of the present invention, the viewer T1 wants to watch a video live a, the address of the original stream of the video live a is addA1, and after the live video a at addA1 is pushed, a part of the live stream of the video live a is pushed to addA 2. The viewer end T1 sends a pull stream request to the cloud server end, and the pull stream request carries a live video identifier A of a live broadcast to be watched. The cloud server may determine that after the pull stream forwarding is performed according to the live video identifier a, the updated pull stream address list includes the original pull stream address addA1 and the destination pull stream address addA2, and then send the updated pull stream address list to the viewer T1, so that the viewer T1 obtains the corresponding live video according to the updated pull stream address addA1 or addA2 in the list.
Optionally, in the embodiment of the present invention, one or more pull addresses included in the updated pull address list may be included, which is not limited in the embodiment of the present invention. When the updated pull stream address list includes a plurality of pull stream addresses, determining, according to the live video identifier, an updated pull stream address list corresponding to a live broadcast to be watched by the viewer, may further include:
determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification;
and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
Thus, a priority order can be provided for a plurality of pull stream addresses, and the pull stream address arranged in the front can be preferentially used by the audience. Optionally, the preset rule for sorting the pull stream addresses may be formulated according to the user level of the audience user, the service characteristics of the CDN service manufacturer, and the like. For example, in an embodiment of the present invention, a periodic charging of a CDN service provider may be used as a preset rule, and when a usage duration or a usage traffic distance of a certain pull address is smaller than a preset threshold, the priority of a pull address corresponding to the CDN service provider may be reduced, so that a viewer selects another pull address preferentially, thereby balancing pull distribution resources of multiple CDN providers, dynamically adjusting a gradient gear according to a charging mode of the CDN provider, effectively reducing a cost in unit time, and improving a performance-to-price ratio.
The live broadcast method provided by the embodiment of the invention is explained in detail by the specific embodiment.
As shown in fig. 2, the live broadcasting method provided by this embodiment may include the following steps:
s201, a main broadcasting end sends a live broadcasting request to a first front-end server;
s202, the first front-end server determines that the main broadcasting end meets the wheat connecting condition according to the live broadcasting request and informs a dispatching server;
s203, the scheduling server provides a CDN manufacturer for the anchor end scheduling and returns the CDN manufacturer to the first front-end server;
s204, the first front-end server returns the CDN manufacturer to the anchor end;
s205, the anchor informs the first front-end server to start streaming;
s206, the first front-end server transmits the video ID (vid), the anchor IP address (IPclientip) and the stream pulling address (such as pull-url and/or hls-url) to the dispatch server;
s207, the dispatching server returns to the first front-end server 200 to indicate that the data receiving is successful, or returns 400 to indicate that the data receiving is failed;
s208, the dispatching server receives the live address of the microphone and stores the address in a local system, and meanwhile, the dispatching server calls a transfer-push central control server interface;
s209, forwarding and pushing the asynchronous script of the central control server to call a source station (namely an intermediate node) for forwarding and pushing;
specifically, the forwarding and pushing center control server may notify the source station of the original pull stream address, the source station callback (callback) returns to the forwarding and pushing center control server to notify the pull stream state, and if the pull stream is successful, the forwarding and pushing center control server notifies the source station of the destination pull stream address (or called forwarding address).
S210, the source station reports a forwarding state to a forwarding central control server;
s211, if the forwarding is successful, the forwarding central control server calls a scheduling server to modify the pull stream address of the live broadcast;
specifically, the modified pull flow address list includes an original pull flow address and a destination pull flow address, and the original pull flow address and the destination pull flow address belong to different CDN service vendors. Optionally, the pull list may be ordered according to a preset rule, for example, according to a probability allocated to each CDN vendor, where for example, a CDN vendor with a probability of 95% ranks the first bit, and a CDN vendor with a probability of 5% ranks the second bit.
S212, if the forward push fails, the source station is informed to continue the forward push as long as the anchor end does not finish the live broadcast until the forward push succeeds;
s213, the source station reports the push-forward keep-alive information and the source station node load information of each path to the push-forward central control server;
s214, the forwarding and pushing central control server schedules the source station according to the node load information of the source station, for example, the address of the source station for next forwarding and pushing is judged;
s215, the second front-end server receives a pull stream request sent by a viewer, wherein the pull stream request carries a live broadcast video identifier to be watched;
s216, the second front-end server informs the scheduling server of the stream pulling request;
s217, the dispatching server sends the updated pull flow address list to the second front-end server;
s218, the viewer side pull-down page acquires the updated pull stream address list, pulls the live stream from the pull stream address in the pull stream address list and watches the live stream;
s219, the anchor terminal calls a first front-end server interface to finish live broadcasting;
specifically, in this step, the first front-end server stores the address of the live broadcast after the microphone connection is completed, asynchronously calls the interface of the scheduling server, transmits the live broadcast after the microphone connection is completed to the scheduling server, and the scheduling server returns to the front-end server 200 or 400 to indicate that the data reception is successful or failed; the dispatching server receives the live broadcast, stores the live broadcast in the local system, starts a script to call a transfer push central control server interface, and the transfer push central control system informs the source station to stop retrying pull stream and transfer push.
It should be noted that the first front-end server, the scheduling server, the forwarding and pushing central control server, and the second front-end server all belong to a cloud server, and in this embodiment, the cloud server is divided into the servers for analyzing the forwarding and pushing process to be described. The first front-end server and the second front-end server can be the same server or different servers, the first front-end server is close to the main broadcasting end, and the second front-end server is close to the audience end.
According to the live broadcasting method provided by the embodiment, on the basis of ensuring the loading time of the first screen and the delay index, a set of live broadcasting RTMP stream pushing system is constructed, the live broadcasting streams with the preset number in the original stream pulling addresses can be pushed to the target stream pulling addresses, and the original stream pulling addresses and the target stream pulling addresses provide the live broadcasting stream pulling for all audience terminals together. Therefore, as the original pull stream address and the target pull stream address belong to different CDN manufacturers respectively, even if a CDN pull stream service provided by one CDN manufacturer fails, a part of audiences can continue to watch the live video through pull stream services provided by other CDN manufacturers, and the condition that all audiences cannot watch the live video can not be caused, so that the disaster tolerance performance of the live network is greatly improved, and the high availability of the system is ensured.
In a second aspect, an embodiment of the present invention further provides a live broadcast device, which can forward a live video broadcast in a pull address, and provide a pull service to a viewer end by using multiple CDN service vendors, so as to effectively improve disaster tolerance of live network broadcast.
As shown in fig. 3, the live broadcasting device provided in this embodiment may include:
an obtaining unit 31, configured to obtain a live original pull stream address;
a forwarding and pushing unit 32, configured to forward a preset number of live streaming in the original streaming address to a destination streaming address, so as to form an updated streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network;
a providing unit 33, configured to provide the updated pull address list to the viewer side when the viewer side pulls to watch the live broadcast, so that the viewer side pulls to watch the live broadcast from the updated pull address.
The live broadcasting device provided by the embodiment of the invention can push the live broadcasting streams with preset number in the original stream addresses to the target stream addresses, and the original stream addresses and the target stream addresses provide the live broadcasting streams to all audience terminals together. Therefore, as the original pull stream address and the target pull stream address belong to different CDN manufacturers respectively, even if the CDN pull stream service provided by one CDN manufacturer fails, a part of audience can still continuously watch the live video through the pull stream service provided by other CDN manufacturers, the condition that all audience ends cannot watch the live video can not be caused, and the disaster tolerance performance of the live network is greatly improved.
Optionally, the forwarding and pushing unit 32 may be specifically configured to forward, through an intermediate node, live streams of a preset number in the original pull stream address to the destination pull stream address.
Alternatively, the rotating and pushing unit 32 may include:
a pull module, configured to pull the live stream from the original pull stream address through an intermediate node;
an indicating module, configured to indicate, to the intermediate node, a destination stream pull address corresponding to the live stream when the intermediate node successfully pulls the live stream;
and the pushing module is used for pushing the pulled live stream to the target pull stream address through the intermediate node.
Further, the live broadcasting device provided by the embodiment of the present invention may further include:
the detecting unit is used for detecting whether the anchor end finishes the live broadcast or not under the condition that the intermediate node fails to push the live broadcast stream;
the forward-push unit 32 is further configured to continue to forward the live stream through the intermediate node when the anchor end does not end the live stream.
Further, the live broadcasting device provided by the embodiment of the present invention may further include:
a receiving unit, configured to receive node load information reported by the intermediate node;
and the scheduling unit is used for scheduling the intermediate node which carries out the forwarding operation according to the node load information received by the receiving unit so as to balance the load of the intermediate node.
Alternatively, the providing unit 33 may include:
the receiving module is used for receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched;
a determining module, configured to determine, according to the live video identifier, an updated pull address list corresponding to a live broadcast to be watched by the viewer;
and the providing module is used for providing the updated pull stream address list to the audience.
Optionally, the determining module may be specifically configured to:
determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification;
and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
Optionally, the live broadcast may include a main unicast or a main audience interactive live broadcast.
In a third aspect, an embodiment of the present invention provides an electronic device, which can forward a live video broadcast in a pull address, and provide a pull service of a viewer side by using multiple CDN service vendors, so as to effectively improve disaster recovery performance of live network broadcast.
As shown in fig. 4, an electronic device provided by an embodiment of the present invention may include: the device comprises a shell 41, a processor 42, a memory 43, a circuit board 44 and a power circuit 45, wherein the circuit board 44 is arranged inside a space enclosed by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; a power supply circuit 45 for supplying power to each circuit or device of the electronic apparatus; the memory 43 is used for storing executable program code; the processor 42 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 43, and is configured to execute the recommendation model building method for a content distribution network provided in any of the foregoing embodiments.
For specific execution processes of the above steps by the processor 42 and further steps executed by the processor 42 by running the executable program code, reference may be made to the description of the foregoing embodiments, which are not described herein again.
The above electronic devices exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement any one of the live broadcast methods provided in the foregoing embodiments, so that corresponding technical effects can also be achieved, which have been described in detail above and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (16)
1. A live broadcast method, comprising:
acquiring a live original pull stream address;
pushing the preset number of live streaming in the original pull streaming address to a target pull streaming address to form an updated pull streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network; the pushing the preset number of live streaming in the original pull streaming address to the target pull streaming address comprises: pushing the live streaming of the preset number in the original pull streaming address to a target pull streaming address through an intermediate node;
and when the audience terminal pulls the stream to watch the live broadcast, providing the updated pull stream address list to the audience terminal so that the audience terminal pulls the stream from the updated pull stream address to watch the live broadcast.
2. The method of claim 1, wherein pushing, by an intermediate node, a preset number of live streams in the original pull stream address to a destination pull stream address comprises:
pulling the live stream from the original stream pulling address through an intermediate node;
under the condition that the intermediate node successfully pulls the live stream, indicating a target stream pulling address corresponding to the live stream to the intermediate node;
and pushing the pulled live stream to the target pull stream address through the intermediate node.
3. The method of claim 1, further comprising:
detecting whether the anchor end finishes the live broadcasting or not under the condition that the intermediate node fails to push the live broadcasting stream;
and under the condition that the live broadcast is not finished at the anchor end, continuously carrying out forward push on the live broadcast stream through the intermediate node.
4. The method of claim 1, further comprising:
receiving node load information reported by the intermediate node;
and scheduling the intermediate nodes which carry out the forwarding and pushing operation according to the node load information so as to balance the load of the intermediate nodes.
5. The method as claimed in any one of claims 1 to 4, wherein said providing the updated pull address list to the viewer end when the viewer end pulls to watch live broadcasting comprises:
receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched;
determining an updated pull stream address list corresponding to the live broadcast to be watched by the audience according to the live broadcast video identifier;
and providing the updated pull stream address list to the audience.
6. The method of claim 5, wherein the determining, according to the live video identifier, an updated pull address list corresponding to a live broadcast to be watched by the viewer includes:
determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification;
and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
7. The method of claim 1, wherein the live broadcast comprises a anchor unicast or an anchor viewer interactive live broadcast.
8. A live broadcast apparatus, comprising:
the acquisition unit is used for acquiring a live original pull stream address;
the forwarding and pushing unit is used for forwarding the preset number of live streaming in the original streaming addresses to the target streaming addresses to form an updated streaming address list; the target pull flow address and the original pull flow address belong to different CDN manufacturers of a content delivery network; the forwarding and pushing unit is specifically configured to forward, through an intermediate node, live streaming of a preset number in the original streaming addresses to the destination streaming addresses;
and the providing unit is used for providing the updated pull stream address list to the audience terminal when the audience terminal pulls and watches the live broadcast so as to ensure that the audience terminal pulls and watches the live broadcast from the updated pull stream address.
9. The apparatus of claim 8, wherein the rotation and pushing unit comprises:
a pull module, configured to pull the live stream from the original pull stream address through an intermediate node;
an indicating module, configured to indicate, to the intermediate node, a destination stream pull address corresponding to the live stream when the intermediate node successfully pulls the live stream;
and the pushing module is used for pushing the pulled live stream to the target pull stream address through the intermediate node.
10. The apparatus of claim 8, further comprising:
the detecting unit is used for detecting whether the anchor end finishes the live broadcast or not under the condition that the intermediate node fails to push the live broadcast stream;
and the forward push unit is further configured to continue to forward the live stream through the intermediate node under the condition that the live broadcast is not finished at the anchor end.
11. The apparatus of claim 8, further comprising:
a receiving unit, configured to receive node load information reported by the intermediate node;
and the scheduling unit is used for scheduling the intermediate node which carries out the forwarding operation according to the node load information received by the receiving unit so as to balance the load of the intermediate node.
12. The apparatus according to any one of claims 8 to 11, wherein the providing unit comprises:
the receiving module is used for receiving a pull stream request of a viewer end, wherein the pull stream request carries a live broadcast video identifier of a live broadcast to be watched;
a determining module, configured to determine, according to the live video identifier, an updated pull address list corresponding to a live broadcast to be watched by the viewer;
and the providing module is used for providing the updated pull stream address list to the audience.
13. The apparatus of claim 12, wherein the determining module is specifically configured to:
determining a plurality of updated pull stream addresses corresponding to the live broadcasts to be watched by the audience according to the live video identification;
and sequencing the plurality of updated pull stream addresses according to a preset rule to form an updated pull stream address list.
14. The apparatus of claim 8, wherein the live broadcast comprises a anchor unicast or an anchor viewer interactive live broadcast.
15. An electronic device, characterized in that the electronic device comprises: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the live method of any of the preceding claims 1-7.
16. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs executable by one or more processors to implement the live method of any of the preceding claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711171936.0A CN109819285B (en) | 2017-11-21 | 2017-11-21 | Live broadcast method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711171936.0A CN109819285B (en) | 2017-11-21 | 2017-11-21 | Live broadcast method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109819285A CN109819285A (en) | 2019-05-28 |
CN109819285B true CN109819285B (en) | 2021-09-21 |
Family
ID=66599902
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711171936.0A Active CN109819285B (en) | 2017-11-21 | 2017-11-21 | Live broadcast method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109819285B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110267053A (en) * | 2019-06-27 | 2019-09-20 | 广州酷狗计算机科技有限公司 | Live broadcasting method, apparatus and system |
CN110769275B (en) * | 2019-10-09 | 2022-04-08 | 北京达佳互联信息技术有限公司 | Method, device and system for processing live data stream |
CN111030832A (en) * | 2019-11-20 | 2020-04-17 | 杭州米络星科技(集团)有限公司 | WebRTC open interconnection system and method |
CN111246239B (en) * | 2020-02-12 | 2022-07-22 | 广州虎牙科技有限公司 | Method, system, apparatus, device and storage medium for testing live programs |
CN112182070B (en) * | 2020-10-13 | 2022-06-14 | 安徽极玩云科技有限公司 | Elasticissearch query management system based on cloud computing |
CN112351296B (en) * | 2020-10-29 | 2022-11-04 | 北京达佳互联信息技术有限公司 | Pull stream push method and device of video stream, server and storage medium |
CN112752111B (en) * | 2020-12-24 | 2023-05-16 | 广州博冠信息科技有限公司 | Live stream processing method and device, computer readable storage medium and electronic equipment |
CN112788353B (en) * | 2020-12-28 | 2022-06-14 | 未来电视有限公司 | Live broadcast time shifting processing method and device, electronic equipment and readable storage medium |
CN113055693B (en) * | 2021-04-20 | 2023-01-24 | 上海哔哩哔哩科技有限公司 | Data processing method and device |
CN113382278B (en) * | 2021-06-11 | 2022-09-09 | 天翼云科技有限公司 | Video pushing method and device, electronic equipment and readable storage medium |
CN113923467B (en) * | 2021-10-09 | 2024-05-28 | 广州繁星互娱信息科技有限公司 | Cross-manufacturer live-broadcast wheat connecting method and device, electronic equipment and medium |
CN114125482B (en) * | 2021-11-23 | 2024-06-28 | 腾讯音乐娱乐科技(深圳)有限公司 | Live broadcast continuous wheat processing method, electronic equipment and storage medium |
CN114173151B (en) * | 2022-02-10 | 2022-05-27 | 北京金山云网络技术有限公司 | Live broadcast stream pushing system, method and device and electronic equipment |
CN115278282B (en) * | 2022-07-20 | 2024-03-15 | 上海哔哩哔哩科技有限公司 | Live broadcast audit file generation method and system, scheduling node and computing equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005456A (en) * | 2006-12-30 | 2007-07-25 | 华为技术有限公司 | Medium stream repeat method and medium server |
CN106210753A (en) * | 2016-05-24 | 2016-12-07 | 北京畅游天下网络技术有限公司 | A kind of net cast method and device |
CN106231365A (en) * | 2016-08-18 | 2016-12-14 | 北京斗牛科技有限公司 | A kind of dispatching method and system |
CN106850581A (en) * | 2017-01-04 | 2017-06-13 | 网宿科技股份有限公司 | The distribution backup method of interactive live broadcast stream media data, system and server |
CN106921873A (en) * | 2017-02-28 | 2017-07-04 | 北京小米移动软件有限公司 | Live-broadcast control method and device |
CN107105309A (en) * | 2017-04-25 | 2017-08-29 | 北京潘达互娱科技有限公司 | Live dispatching method and device |
CN107277160A (en) * | 2017-07-12 | 2017-10-20 | 北京潘达互娱科技有限公司 | A kind of content delivery network node switching method and device |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101594292A (en) * | 2008-05-30 | 2009-12-02 | 中兴通讯股份有限公司 | Content delivery method, service redirection method and system, node device |
CN102347967B (en) * | 2010-07-30 | 2014-01-01 | 华为技术有限公司 | Method and device for cooperation between push equipment |
CN102780710A (en) * | 2012-08-24 | 2012-11-14 | 乐视网信息技术(北京)股份有限公司 | Node scheduling method based on content distribution network |
US9226217B2 (en) * | 2014-04-17 | 2015-12-29 | Twilio, Inc. | System and method for enabling multi-modal communication |
CN104168341B (en) * | 2014-08-15 | 2018-01-19 | 北京百度网讯科技有限公司 | The localization method and CDN dispatching methods and device of IP address |
US9769536B2 (en) * | 2014-12-26 | 2017-09-19 | System73, Inc. | Method and system for adaptive virtual broadcasting of digital content |
CN105656876A (en) * | 2015-11-26 | 2016-06-08 | 乐视云计算有限公司 | Live video play method, device and system |
CN105721484B (en) * | 2016-03-04 | 2019-01-15 | 网宿科技股份有限公司 | The turning of a kind of Streaming Media pushes away method, system and the server with the system |
US10264077B2 (en) * | 2016-04-04 | 2019-04-16 | Netsapiens | System and methods for employing non-related communication architecture for signaling in another communication architecture |
CN105872614A (en) * | 2016-04-12 | 2016-08-17 | 乐视控股(北京)有限公司 | Live stream switching method and device |
CN107172015A (en) * | 2017-04-25 | 2017-09-15 | 北京潘达互娱科技有限公司 | Live video method for pushing and device |
-
2017
- 2017-11-21 CN CN201711171936.0A patent/CN109819285B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005456A (en) * | 2006-12-30 | 2007-07-25 | 华为技术有限公司 | Medium stream repeat method and medium server |
CN106210753A (en) * | 2016-05-24 | 2016-12-07 | 北京畅游天下网络技术有限公司 | A kind of net cast method and device |
CN106231365A (en) * | 2016-08-18 | 2016-12-14 | 北京斗牛科技有限公司 | A kind of dispatching method and system |
CN106850581A (en) * | 2017-01-04 | 2017-06-13 | 网宿科技股份有限公司 | The distribution backup method of interactive live broadcast stream media data, system and server |
CN106921873A (en) * | 2017-02-28 | 2017-07-04 | 北京小米移动软件有限公司 | Live-broadcast control method and device |
CN107105309A (en) * | 2017-04-25 | 2017-08-29 | 北京潘达互娱科技有限公司 | Live dispatching method and device |
CN107277160A (en) * | 2017-07-12 | 2017-10-20 | 北京潘达互娱科技有限公司 | A kind of content delivery network node switching method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109819285A (en) | 2019-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109819285B (en) | Live broadcast method and device, electronic equipment and storage medium | |
US9912421B2 (en) | Broadcast seeding for peer-to-peer networks | |
KR101413321B1 (en) | Mobile consumer electronic applications on internet video platform | |
CN109802926B (en) | Recommendation model establishing method, live broadcast method and device for content distribution network | |
CN110166791B (en) | Connection establishing method, device, equipment and storage medium | |
CN106488270B (en) | Live broadcast room switching method and device | |
CN109271130B (en) | Audio playing method, medium, device and computing equipment | |
CN110336885A (en) | Fringe node distribution method, device, dispatch server and storage medium | |
KR101991188B1 (en) | Promotion information processing method, device, and apparatus, and non-volatile computer storage medium | |
CN113811013B (en) | Cluster capacity dynamic adjustment method, device, storage medium and communication system | |
KR20160039888A (en) | System for cloud streaming service, method of cloud streaming service using optumal gpu and apparatus for the same | |
CN106331783B (en) | A kind of resource allocation methods, device and intelligent television system | |
CN108668143A (en) | A kind of drainage method, device, server and storage medium | |
CN102571964A (en) | Multi-screen interaction method and multi-screen interaction system | |
CN112235593B (en) | Live broadcast processing method and device, electronic equipment and computer readable storage medium | |
US20220221924A1 (en) | Prioritized Usage of Devices | |
CN111163076A (en) | Live broadcast message pushing method and related equipment for network live broadcast | |
CN114257572B (en) | Data processing method, device, computer readable medium and electronic equipment | |
CN108833983A (en) | Played data acquisition methods, device, equipment and storage medium | |
CN110996114B (en) | Live broadcast scheduling method and device, electronic equipment and storage medium | |
CN115695928B (en) | Screen projection method and device, electronic equipment and storage medium | |
CN116185665A (en) | Message processing method, device, equipment and medium | |
CN106331774A (en) | Equipment connection method and device and intelligent television system | |
CN111479137B (en) | Method and device for providing line address, server and storage medium | |
CN114615512A (en) | Game event live broadcasting system and game event live broadcasting method |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20190619 Address after: Room A-3010, 2nd floor, No. 3 Courtyard, 30 Shixing Street, Shijingshan District, Beijing Applicant after: Beijing happy I unlimited Technology Co., Ltd. Address before: Cayman Islands, Greater Cayman Island, Camana Bay, Western Asia, Seitus Chamber of Commerce, 2547 Mailbox Applicant before: Happy honey Company Limited |
|
GR01 | Patent grant | ||
GR01 | Patent grant |