CN114040218A - Live video switching method, device, equipment and storage medium - Google Patents

Live video switching method, device, equipment and storage medium Download PDF

Info

Publication number
CN114040218A
CN114040218A CN202111311608.2A CN202111311608A CN114040218A CN 114040218 A CN114040218 A CN 114040218A CN 202111311608 A CN202111311608 A CN 202111311608A CN 114040218 A CN114040218 A CN 114040218A
Authority
CN
China
Prior art keywords
live broadcast
live
source
video distribution
broadcast source
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
CN202111311608.2A
Other languages
Chinese (zh)
Other versions
CN114040218B (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.)
Beijing Quantum Song Technology Co ltd
Original Assignee
Beijing Quantum Song 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 Beijing Quantum Song Technology Co ltd filed Critical Beijing Quantum Song Technology Co ltd
Priority to CN202111311608.2A priority Critical patent/CN114040218B/en
Publication of CN114040218A publication Critical patent/CN114040218A/en
Application granted granted Critical
Publication of CN114040218B publication Critical patent/CN114040218B/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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2385Channel allocation; Bandwidth allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a video live broadcast switching method, a video live broadcast switching device, video live broadcast switching equipment and a storage medium, wherein the video live broadcast switching method, the video live broadcast switching device, the video live broadcast switching equipment and the storage medium are applied to a first live broadcast source and a second live broadcast source of parallel live broadcast, when the first live broadcast source is in a live broadcast state, the second live broadcast source pulls live broadcast stream data of the first live broadcast source, and the method comprises the following steps: the method comprises the steps of acquiring video distribution data of a user side in live broadcast of a first live broadcast source in real time, and calculating the video distribution quality of the first live broadcast source; when the video distribution quality is lower than a preset condition, the courseware state in the second live broadcast source is adjusted to the courseware current state in the first live broadcast source, so that the anchor is switched from the first live broadcast source to the second live broadcast source for live broadcast; and after the anchor completes live broadcast switching, updating the live broadcast stream data pull address of the user side so that the user side can watch live broadcast contents through a second live broadcast source. The method and the system can be quickly switched to the standby live broadcast source when problems occur in the live broadcast process, and the watching experience of a user is improved.

Description

Live video switching method, device, equipment and storage medium
Technical Field
The present disclosure relates to multimedia technologies, and in particular, to a method, an apparatus, a device, and a storage medium for live video switching.
Background
In recent years, with the development of internet and streaming media technologies, the user scale of online live broadcast and network video is getting larger, which is a technology that provides a plurality of interactive services including digital television to users by integrating internet, multimedia, communication and other technologies by using a broadband network.
In order to alleviate the Network congestion, a Content Delivery Network (CDN) technology is adopted in many large live webcast platforms. In the existing live broadcast network system, a CDN service provider is bound to a main broadcast room, that is, the live broadcast room can only directly broadcast video streams through a CDN server provided by the CDN service provider. Therefore, the live broadcast effect of the live broadcast room depends on the quality of the bound CDN, and once the CDN of the CDN service provider has a problem, the CDN can only wait for the CDN to recover by itself, so that the live broadcast risk is large, and the user experience is affected.
Because the live broadcasting scenes have high requirements on network delay, especially some scenes such as live broadcasting teaching, network training and the like, the requirements on the live broadcasting delay are more strict, and therefore, how to improve the solution efficiency of network unsmooth occurrence in the live broadcasting process becomes a technical problem which needs to be solved urgently at present.
Disclosure of Invention
In view of the foregoing problems in the prior art, an object of the present disclosure is to provide a method, an apparatus, a device, and a storage medium for switching live video, which can improve the solution efficiency when a network is not smooth in a live broadcast process, and improve the viewing experience of a user.
In order to solve the technical problems, the specific technical scheme is as follows:
on one hand, a video live broadcast switching method is provided herein, and is applied to a first live broadcast source and a second live broadcast source of a parallel live broadcast, where the first live broadcast source and the second live broadcast source both have a corresponding stream pushing server and a stream pulling server, and when the first live broadcast source is in a live broadcast state, the second live broadcast source pulls live broadcast stream data of the first live broadcast source and pushes the live broadcast stream data of the first live broadcast source to the stream pushing server corresponding to the second live broadcast source, where the method includes:
acquiring video distribution data of a user side in real time when a first direct broadcast source is live;
calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side;
when the video distribution quality is lower than a preset condition, acquiring the current courseware state in a first live broadcast source, and adjusting the courseware state in a second live broadcast source to the current courseware state, so that the anchor is switched from the first live broadcast source to the second live broadcast source for live broadcast;
and after the anchor completes live broadcast switching, updating the live broadcast stream data pull address of the user side according to the address of the pull stream server corresponding to the second live broadcast source so that the user side can watch live broadcast contents through the second live broadcast source.
Further, the calculating the video distribution quality of the first live source according to the video distribution data of the user side includes:
acquiring the downloading slicing speed of each user side for playing the live video in real time;
according to the downloading slicing speed, calculating to obtain the user side number ratio of the downloading slicing speed lower than a speed threshold value;
and calculating the video distribution quality of the first live broadcast source in a first preset time period according to the proportion of the number of the user terminals with the downloading fragmentation speed lower than the speed threshold value.
Further, the calculating the video distribution quality of the first live source according to the video distribution data of the user side further includes:
acquiring the decoding frame loss quantity of each user terminal playing the live video in a second preset time period;
calculating and obtaining the decoding frame loss rate of each user side in a second preset time period according to the decoding frame loss quantity;
and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the decoding frame loss rate and the total number of the user terminals in the second preset time period.
Further, the calculating, according to the decoding frame loss rate and the total number of the clients in the second preset time period, the video distribution quality of the first live broadcast source in the second preset time period includes:
determining the distribution quantity of the user terminals in different areas in a second preset time period according to the address positions corresponding to the IP addresses of the user terminals;
calculating to obtain the proportion of the user terminals of which the decoding frame loss rates exceed the frame loss threshold value in different areas according to the distribution quantity of the user terminals in different areas and the decoding frame loss rates of the user terminals;
and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the proportion of the user terminals with the decoding frame loss rate exceeding the frame loss threshold value in different areas and preset weight coefficients of different areas.
Further, the calculating the video distribution quality of the first live source according to the video distribution data of the user side further includes:
acquiring interactive information between the user side and the anchor within a third preset time period;
matching the interactive information with a preset keyword library to obtain a matching result, wherein the preset keyword library is a keyword set which is fed back by a user side and is not smooth in live broadcasting;
and calculating to obtain the video distribution quality of the first live broadcast source in a third preset time period according to the matching result and the total amount of the interactive information in the third preset time period.
Further, when the video distribution quality is lower than a preset condition, acquiring a current courseware state in a first live broadcast source, and adjusting the courseware state in a second live broadcast source to the current courseware state, so that an anchor broadcast is switched from the first live broadcast source to the second live broadcast source for live broadcast, including:
when the video distribution quality is lower than a preset condition, sending a live broadcast stream data acquisition permission to the second live broadcast source so that the second live broadcast source can acquire an active live broadcast permission and disconnect a pull channel of the second live broadcast source and the first live broadcast source;
after the second live source obtains the active live broadcasting authority, obtaining historical live broadcasting stream data of the first live source pulled by the second live source;
determining the current state of courseware in the first live broadcast source according to historical live broadcast stream data of the first live broadcast source pulled by the second live broadcast source, wherein the current state of courseware is the latest state of teaching of the anchor in the first live broadcast source;
and adjusting the courseware state in the second live source to the courseware current state according to the courseware current state in the first live source.
Further, after the second live broadcast source obtains the active live broadcast permission, before obtaining the historical live broadcast stream data of the first live broadcast source pulled by the second live broadcast source, the method further includes:
acquiring courseware content to be given in the first direct broadcasting source;
and copying the courseware content to be lectured to the second live broadcast source so as to facilitate the anchor broadcast of the courseware content to be lectured.
Further, the method further comprises:
and when the video distribution quality is lower than a preset condition, sending a live broadcast switching signal to the anchor broadcast so that the anchor broadcast adjusts the live broadcast visual angle, and the live broadcast visual angle after the anchor broadcast is adjusted is consistent with the second live broadcast source operation visual angle.
Further, after the anchor completes the live broadcast switching, updating the live broadcast stream data pull address of the user end according to the address of the pull stream server corresponding to the second live broadcast source, so that the user end watches live broadcast content through the second live broadcast source, including:
after the anchor completes live broadcast switching, acquiring address information of a pull stream server corresponding to the second live broadcast source and address information of each user side in the first live broadcast source;
configuring and generating a content distribution protocol of the second live source according to address information of a pull stream server corresponding to the second live source and address information of each user side in the first live source;
and transmitting the content distribution protocol of the second live broadcast source to the user side so that the user side watches the live broadcast content through the second live broadcast source.
In another aspect, this document also provides a live video switching apparatus, the apparatus comprising:
the video distribution data acquisition module is used for acquiring video distribution data of a user side in real time when a first direct broadcast source is in live broadcast;
the video distribution quality calculation module is used for calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side;
the live broadcast switching module is used for acquiring the current courseware state in a first live broadcast source when the video distribution quality is lower than a preset condition, and adjusting the courseware state in a second live broadcast source to the current courseware state so that the anchor broadcast is switched from the first live broadcast source to the second live broadcast source for live broadcast;
and the address updating module is used for updating the live streaming data pull address of the user side according to the address of the pull server corresponding to the second live source after the anchor completes live broadcast switching so that the user side can watch live broadcast contents through the second live source.
In another aspect, a computer device is also provided herein, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the computer program.
Finally, a computer-readable storage medium is also provided herein, which stores a computer program that, when executed by a processor, implements the method as described above.
By adopting the technical scheme, the live video switching method, the live video switching device, the live video switching equipment and the storage medium are characterized in that a first live source and a second live source which are live in parallel are arranged, the first live source and the second live source are respectively provided with a push streaming server and a pull streaming server which correspond to each other, when the first live source is in a live state, the second live source pulls live streaming data of the first live source and pushes the live streaming data of the first live source to the push streaming server corresponding to the second live source, in the live process of the first live source, video distribution data of a user end in live broadcast of the first live source are obtained in real time, then based on the video distribution data, the video distribution quality of the first live source is calculated, and when the video distribution quality is lower than a preset condition, the courseware state of the second live source is adjusted to be the courseware current state of the first live source, therefore, the anchor is switched from the first live source to the second live source for live broadcast, and then the watching path of the user side is switched to the pull address of the second live source.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an implementation environment of a live video switching method provided in an embodiment herein;
fig. 2 is a schematic diagram illustrating steps of a live video switching method provided by an embodiment herein;
FIG. 3 illustrates one embodiment of video distribution quality calculation in embodiments herein;
FIG. 4 illustrates another embodiment of video distribution quality calculation in embodiments herein;
FIG. 5 illustrates another embodiment of video distribution quality calculation in embodiments herein;
FIG. 6 is a diagram illustrating a courseware status adjustment step in a second live feed in an embodiment herein;
fig. 7 shows a content distribution protocol configuration process diagram of a second live source in an embodiment herein;
FIG. 8 shows a schematic diagram of a system for operating the methods provided by embodiments herein;
fig. 9 is a schematic structural diagram illustrating a live video switching apparatus provided in an embodiment of the present disclosure;
fig. 10 shows a schematic structural diagram of a computer device provided in an embodiment herein.
Description of the symbols of the drawings:
10. a main broadcasting end;
20. a first direct broadcast source;
30. a second live source;
40. a user side;
50. a monitoring end;
21. a first direct broadcasting end;
22. a first plug flow server;
23. a first pull stream server;
31. a second live broadcast terminal;
32. a second plug flow server;
33. a second pull stream server;
100. a video distribution data acquisition module;
200. a video distribution quality calculation module;
300. a live broadcast switching module;
400. an address update module;
1002. a computer device;
1004. a processor;
1006. a memory;
1008. a drive mechanism;
1010. an input/output module;
1012. an input device;
1014. an output device;
1016. a presentation device;
1018. a graphical user interface;
1020. a network interface;
1022. a communication link;
1024. a communication bus.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
It should be noted that the terms "first," "second," and the like in the description and claims herein and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments herein described are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
In the prior art, since the Network live broadcast platform adopts a Content Delivery Network (CDN) technology, the live broadcast effect of the live broadcast room depends on the quality of the bound CDN to a great extent, and once a problem occurs in the CDN of the CDN service provider, the live broadcast can only wait for the CDN to recover by itself, which causes a great risk of live broadcast, and affects user experience.
In order to solve the above problem, an embodiment of the present specification provides a live video switching method, which can improve a problem solving effect in a live broadcasting process and improve viewing experience of a user. As shown in fig. 1, which is a schematic diagram of an implementation environment of the method, the method may include a main broadcast end 10, a first live source 20, a second live source 30, a user end 40 and a monitoring end 50, wherein the first live source 20 and the second live source 30 are in a parallel live relationship, and the first live source 20 and the second live source 30 both have a corresponding push streaming server and a corresponding pull streaming server, i.e. the first direct broadcast source 20 comprises a first direct broadcast end 21, a first push streaming server 22 and a first pull streaming server 23, the second live source 30 comprises a second live end 31, a second push streaming server 32 and a second pull streaming server 33, when the first live source 20 is in a live state, the second live source 30 pulls the live streaming data of the first live source 20, and pushing the live streaming data of the first live source 20 to a streaming server corresponding to the second live source 30. Therefore, when the first live source 20 performs live broadcasting, the second live source 30 may pull the live streaming data of the first live source 20 to perform live broadcasting, and the live broadcasting room corresponding to the second live source 30 may be in an unattended state or a state in which a user is restricted from watching.
The first live broadcast terminal 21 and the second live broadcast terminal 31 may be live broadcast stream data acquisition devices, such as a microphone slot, a camera, and an anchor teaching interface, where the anchor teaching interface includes an operation area and a chat area where the anchor communicates with a user, where the operation area is used to display courseware content, and the operation area may receive operation of the anchor and display corresponding content, such as receiving blackboard-writing content of the anchor in a course of teaching, and display the content in the operation area, so as to improve teaching efficiency of the anchor.
The monitoring end 50 acquires video distribution data of a user end in real time when the first direct broadcasting source 20 is in direct broadcasting; calculating the video distribution quality of the first live broadcast source 20 according to the video distribution data of the user side; when the video distribution quality is lower than the preset condition, the current courseware state in the first live broadcast source 20 is obtained, the courseware state in the second live broadcast source 30 is adjusted to the current courseware state, so that the anchor is switched from the first live broadcast source 20 to the second live broadcast source 30 for live broadcast, and after the anchor completes live broadcast switching, a stream pulling channel of a user side is adjusted, so that when the live broadcast of the first live broadcast source 20 goes wrong, the anchor can be switched to the second live broadcast source 30 for live broadcast in time, the continuity of live broadcast is guaranteed, the live broadcast fault processing efficiency is improved, and the watching experience of a user is improved.
The server provided above may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
In addition, it should be noted that fig. 1 shows only one application environment provided by the present disclosure, and in practical applications, other application environments may also be included, which are not described in detail in the embodiments of this specification.
Specifically, embodiments of the present disclosure provide a video live broadcast switching method, which can improve a problem solving effect in a live broadcast process and improve viewing experience of a user. Fig. 2 is a schematic step diagram of a live video switching method provided in an embodiment herein, and the present specification provides the method operation steps as described in the embodiment or the flowchart, but more or less operation steps may be included based on conventional or non-creative labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual system or apparatus product executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures. Specifically, as shown in fig. 2, the method may include:
s101: acquiring video distribution data of a user side in real time when a first direct broadcast source is live;
s102: calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side;
s103: when the video distribution quality is lower than a preset condition, acquiring the current courseware state in a first live broadcast source, and adjusting the courseware state in a second live broadcast source to the current courseware state, so that the anchor is switched from the first live broadcast source to the second live broadcast source for live broadcast;
s104: and after the anchor completes live broadcast switching, updating the live broadcast stream data pull address of the user side according to the address of the pull stream server corresponding to the second live broadcast source so that the user side can watch live broadcast contents through the second live broadcast source.
It can be understood that, in this embodiment of the present specification, the first live source and the second live source are live sources of parallel live broadcasting, and when the first live source is live broadcasting, live data of the second live source is obtained by pulling live data of the first live source, that is, when the first live source is live broadcasting, the second live source does not actively acquire live broadcast data, but only obtains live broadcast stream data of the first live source, and pushes the stream to a stream pushing server corresponding to the second live source in a rebroadcasting manner, and in this state, no user pulls live broadcast stream data in a pull server corresponding to the second live source, and only when video distribution quality of the first live source is low (i.e., lower than a preset condition), the second live source is just redirected, and by actively acquiring live video data and lecture data, the user watches live broadcast content by acquiring live broadcast stream data of the second live broadcast source, and live broadcast faults can be avoided through the redundant relation of the live broadcast source, so that the stability and reliability of live broadcast are improved.
It should be noted that the first live source and the second live source are two sets of independent live channels, that is, the two live sources configure two different push stream channels and pull stream channels, and the two live sources configure different CDN servers, so that when a live fault (for example, poor video distribution quality) occurs in the first live source, data distribution in the second live source is not affected, and thus when the anchor live source is switched to the second live source, it is ensured that the second live source has a stable video distribution channel, and smoothness and reliability of live broadcast are ensured.
The live streaming data is data related to live broadcasting in the live broadcasting process, so that the operation content of a main broadcast in an operation area in the live broadcasting process can be realized, the video and audio data of the main broadcast can also be realized, live broadcasting ends (such as a first live broadcasting end and a second live broadcasting end) need to speak live streaming data and push the live streaming data to an inference server, for example, the encapsulated live streaming data can be pushed to a push streaming server through a preset transmission protocol, the preset transmission Protocol may be Real Time Streaming Protocol (RTSP), Real Time Message Protocol (RTMP), or hypertext Transfer Protocol (HTTP) based Streaming media network transmission Protocol (HLS), and the Streaming server pulls Live Streaming data in the push server according to a corresponding Protocol, thereby realizing that the Live Streaming data is transmitted in a background channel.
In an embodiment of the present specification, the first live broadcast source and the second live broadcast source may be two different sets of live broadcast platforms, so that a dual-platform backup is implemented.
The video distribution quality can be the quality of the capacity of a CDN server (namely a network node) for distributing data when a live source is in live broadcasting, namely live broadcast stream data is distributed according to the load state of the network node and the position of a user, so that the users at different positions can distribute the flow data through different network nodes, the flow data distribution failure or the distribution efficiency is low due to the problem of the network node, the watching of a user side is influenced, the higher the video distribution quality is, the higher the distribution efficiency of the network node is, and the smoother the live broadcasting is watched by the user. Therefore, whether the CDN server is reliable or not can be evaluated through the video delivery data received by the user side, for example, the video delivery quality is calculated through the video delivery data, in this embodiment of the present specification, different types of capability indexes can be obtained through different indexes, for example, the capability index can be expressed by the efficiency of receiving video data by the user side, or obtained through information feedback of the user side.
In this embodiment of the present specification, as shown in fig. 3, the calculating, according to the video distribution data at the user end, the video distribution quality of the first live source includes:
s201: acquiring the downloading slicing speed of each user side for playing the live video in real time;
s202: according to the downloading slicing speed, calculating to obtain the user side number ratio of the downloading slicing speed lower than a speed threshold value;
s203: and calculating the video distribution quality of the first live broadcast source in a first preset time period according to the proportion of the number of the user terminals with the downloading fragmentation speed lower than the speed threshold value.
The downloading slicing speed is the downloading speed when each user side receives distributed live streaming data, different user sides have different downloading slicing speeds due to the video distribution speed, the user side number ratio of the downloading slicing speed lower than the speed threshold value can be determined by setting the speed threshold value, the higher the user side number ratio is, the more users with lower downloading speed are indicated, and the video distribution quality is lower; if the user side number is lower, it means that there are fewer users with lower download speed, and the video distribution quality is higher. The speed threshold and the first preset time period may be set according to actual conditions, for example, in a live broadcast scene, the speed threshold of downloading the segment when the student end (i.e., the user end) plays the live broadcast stream may be 100kb, the first preset time period is 10s, 20s, 30s, and the like, and when a downloading segment speed is obtained every second, 10 downloading segment speeds corresponding to each user end can be obtained within 10 s.
The first preset time period is a period for calculating video distribution quality, namely a time interval for realizing live broadcast source switching, and each user side can obtain a plurality of downloading slicing speeds in the first preset time period, so that a large number of downloading slicing speeds can be obtained, and calculation errors caused by small data quantity can be avoided.
In this embodiment of the present specification, the video distribution quality may be classified into a first quality and a second quality by using a user side number ratio at which the download fragmentation speed is lower than a speed threshold, where the video distribution quality is defined as the first quality when the user side number ratio reaches a preset ratio, and the video distribution quality is defined as the second quality when the user side number ratio does not reach the preset ratio, so that the video distribution quality of the first quality is lower than the video distribution quality of the second quality.
In some other embodiments, a ratio of a downloading fragmentation speed of each user side within a first preset time period being lower than a speed threshold may also be calculated, and then video distribution quality of the first live source within the first preset time period is calculated according to the ratio, where the video distribution quality may also be obtained by the following formula (1):
Figure BDA0003342137970000111
where P is the video distribution quality, xiThe ratio of the downloading fragmentation speed in the ith user terminal to the speed threshold value is shown, n is the total number of the user terminals, and A is a fixed constant.
It should be noted that the above formula is one example in the embodiments of the present specification, and other calculation formulas may be provided in some other examples, which are not limited in the embodiments of the present specification.
In some other embodiments, as shown in fig. 4, the calculating the video distribution quality of the first live source according to the video distribution data of the user side further includes:
s301: acquiring the decoding frame loss quantity of each user terminal playing the live video in a second preset time period;
s302: calculating and obtaining the decoding frame loss rate of each user side in a second preset time period according to the decoding frame loss quantity;
s303: and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the decoding frame loss rate and the total number of the user terminals in the second preset time period.
It can be understood that, in this step, the video distribution quality of the first live broadcast source is calculated by the decoding frame loss rate, specifically, the decoding frame loss number of the user terminal playing the live broadcast video in the second time period is obtained, then the ratio of the decoding frame loss number to the number of frames of the user terminal needing to be decoded in the second time period is taken as the decoding frame loss rate, the higher the decoding frame loss rate is, the less the video resources obtained by the user are, and the worse the corresponding video distribution quality is; the less the decoding frame loss rate is, the more complete the video resource obtained by the user is, and the higher the corresponding video distribution quality is.
Optionally, a first preset value may be set, a user side proportion that the decoding frame loss rate is lower than the first preset value is obtained statistically, and the video distribution quality is determined according to the user side proportion. For example, the video distribution quality may be graded according to the user side ratio, such as the first-level quality and the second-level quality, where the video distribution quality is defined as the first-level quality when the user side ratio reaches a preset ratio, and the video distribution quality is defined as the second-level quality when the user side ratio does not reach the preset ratio, so that the video distribution quality of the first-level quality is lower than the video distribution quality of the second-level quality.
It should be noted that, a ratio of the decoding frame loss rate of each user terminal in the second preset time period to be lower than the second preset value may also be calculated, and then the video distribution quality of the first live source in the second preset time period is calculated according to the ratio, a specific calculation formula may refer to formula (1), and details are not described in this embodiment of the present specification.
In this embodiment of the present disclosure, the rules set by the CDN server may be different in different regions, for example, in a developed area or a developed city, because the demand for live broadcast is high, live broadcast content such as entertainment, education, sports, and leisure is related, and the configuration requirement for the CDN server is high, when calculating video distribution quality, the proportion of calculation in the area may be increased, thereby increasing the sensitivity and reliability of video distribution quality calculation. Optionally, the calculating, according to the decoding frame loss rate and the total number of the user terminals in the second preset time period, the video distribution quality of the first live broadcast source in the second preset time period includes:
determining the distribution quantity of the user terminals in different areas in a second preset time period according to the address positions corresponding to the IP addresses of the user terminals;
calculating to obtain the proportion of the user terminals of which the decoding frame loss rates exceed the frame loss threshold value in different areas according to the distribution quantity of the user terminals in different areas and the decoding frame loss rates of the user terminals;
and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the proportion of the user terminals with the decoding frame loss rate exceeding the frame loss threshold value in different areas and preset weight coefficients of different areas.
It can be understood that, in the embodiments of the present specification, different calculation weights are set for different regions, and then the video distribution quality of the first live broadcast source is obtained by calculating according to the proportion of the user side whose decoding frame loss rate exceeds the frame loss threshold value in the different regions, so that the pertinence and reliability of the video distribution quality calculation can be improved.
It should be noted that the ue ratio may be a ratio of the number of ues whose decoding frame loss rate exceeds a frame loss threshold value to the number of all ues in different areas.
For example, the whole country is divided into five regions, namely northeast, northwest, southwest and southwest, each region is provided with different weight coefficients, which are respectively 0.1, 0.3, 0.1 and 0.4, then the proportion of the user end with the decoding frame loss rate exceeding the frame loss threshold value in each region can be determined through statistics, and the video distribution quality can be calculated according to the proportion of the user end and the weight coefficients of the corresponding regions.
Alternatively, the video distribution quality can be obtained by the following formula (2):
Figure BDA0003342137970000121
where P is video distribution quality, yiThe proportion k of the user terminals with the decoding frame loss rate exceeding the frame loss threshold value in the ith area in the second preset time periodiIs the weighting factor of the ith area, m is the total number of areas,
Figure BDA0003342137970000122
in some other embodiments, the regions may be divided in advance, then the user side ratio that the decoding frame loss rate exceeds the frame loss threshold value in different regions is counted, the weight coefficient is distributed according to the size of the user side ratio in different regions, for example, the weight coefficient distributed in the region with the larger user side ratio is larger, then the video distribution quality is calculated according to the distributed weight coefficient and the user side ratio, and the process of distributing the weight coefficient is not limited in this embodiment of the present specification. According to the method, the weight coefficient of the corresponding area is distributed according to the proportion of the user side, so that the area with the larger proportion of the user side can be distributed with larger weight, the proportion of the area in the video distribution quality calculation is improved, more user sides are considered in the video distribution quality calculation, and the reliability of the video distribution quality calculation is improved.
In some other embodiments, the weight coefficient may also be set according to the number of the user terminals in different areas, for example, the greater the number of the user terminals, the greater the weight coefficient is, so that the more right area of the user occupies more calculation weight, which ensures the viewing effect of more users, and the specific weight coefficient calculation process is not limited in the embodiments of the present specification.
In some other embodiments, the determining the video distribution quality may further be performed by real-time feedback of the user when watching the live broadcast, and optionally, as shown in fig. 5, the calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side further includes:
s401: acquiring interactive information between the user side and the anchor within a third preset time period;
s402: matching the interactive information with a preset keyword library to obtain a matching result, wherein the preset keyword library is a keyword set which is fed back by a user side and is not smooth in live broadcasting;
s403: and calculating to obtain the video distribution quality of the first live broadcast source in a third preset time period according to the matching result and the total amount of the interactive information in the third preset time period.
It can be understood that, in the embodiments of the present specification, the video distribution quality can be determined according to information fed back by a user and then according to a proportion of the feedback information, where a preset keyword library user side feeds back a keyword set that is not live smoothly, for example, keywords that are blocked, inaudible, invisible, and video is still, and the like, the amount of information that reflects poor video quality in information fed back by the user can be determined by setting the preset keyword library, that is, the amount of information that reflects poor video quality can be determined by a matching result, and then a ratio of the amount of information to a total amount of the interactive information is calculated, so that the video distribution quality of the first live broadcast source in a third preset time period can be obtained. By obtaining the feedback data of the user, the video distribution quality can be directly and quickly determined from the perspective of the user, so that the calculation of the live source video distribution data is realized on the basis of considering the user experience.
Illustratively, the third preset time period is 1 minute, the total amount of information sent to the anchor by the user is 3000 within the 1 minute time period, and matching the 3000 pieces of information with the preset keyword library can obtain 30 pieces of information with poor feedback video quality, so that the video distribution quality of the first live source in 1 minute can be obtained by calculation, and is 30/3000-1%.
In this embodiment of the present specification, as shown in fig. 6, when the video distribution quality is lower than a preset condition, acquiring a current state of courseware in a first live source, and adjusting a state of courseware in a second live source to the current state of courseware, so that an anchor is switched from the first live source to the second live source for live broadcast, including:
s501: when the video distribution quality is lower than a preset condition, sending a live broadcast stream data acquisition permission to the second live broadcast source so that the second live broadcast source can acquire an active live broadcast permission and disconnect a pull channel of the second live broadcast source and the first live broadcast source;
s502: after the second live source obtains the active live broadcasting authority, obtaining historical live broadcasting stream data of the first live source pulled by the second live source;
s503: determining the current state of courseware in the first live broadcast source according to historical live broadcast stream data of the first live broadcast source pulled by the second live broadcast source, wherein the current state of courseware is the latest state of teaching of the anchor in the first live broadcast source;
s504: and adjusting the courseware state in the second live source to the courseware current state according to the courseware current state in the first live source.
It can be understood that before the live source is switched, the second live source is live streaming data of the first live source, so that when the live source is required to be switched, the second live source can acquire live streaming data acquisition permission instead of live streaming data extraction, and can include acquisition of main broadcast video and audio and operation of a live end operation area (a courseware area and a drawing board), and certainly can include recovery of a chat area function interacted with a user. In order to ensure the continuity of the live broadcast process, the latest live broadcast state of the first live broadcast source before switching needs to be updated to the second live broadcast source, so as to realize the non-inductive switching of the user side. The method comprises the steps of obtaining historical live broadcast streaming data of a first live broadcast source pulled by a second live broadcast source, wherein the historical live broadcast streaming data comprises the current state of courseware in the first live broadcast source, the current state of courseware is the latest state of a main broadcast giving lessons in the first live broadcast source and can comprise the current page of courseware and the content of a drawing board, and then adjusting the state of courseware in the second live broadcast source to the current state of courseware. Therefore, the progress of the anchor teaching can be obtained by obtaining the current page information of the courseware in the operation area of the first live source before switching, the same courseware is copied in the operation area of the second live source, and the page of the courseware is adjusted to the part of the anchor teaching, so that the automatic synchronization of the courseware page information is realized, the efficiency of switching the live sources is improved, the smoothness and the stability of live broadcasting are greatly improved, and higher user learning experience is guaranteed.
The preset conditions are set according to actual conditions, for example, corresponding standards are set according to indexes selected and calculated by video distribution quality, so that the video distribution quality calculated by three indexes of download distribution speed, number of decoded frames lost and interactive information corresponds to different preset conditions.
In this embodiment of the present specification, after the second live broadcast source obtains the active live broadcast permission, before obtaining the historical live broadcast stream data of the first live broadcast source pulled by the second live broadcast source, the method further includes:
acquiring courseware content to be given in the first direct broadcasting source;
and copying the courseware content to be lectured to the second live broadcast source so as to facilitate the anchor broadcast of the courseware content to be lectured.
When the courseware content is not copied to the second live source in advance, the courseware content in the first live source can be copied to the second live source, so that the consistency of the anchor teaching content is ensured, in order to improve the switching efficiency, the courseware content to be taught in the first live source can be copied to the second live source, on the basis of ensuring the continuity and consistency of the teaching content, the size of copied data is reduced, and the switching efficiency is improved.
As two sets of live broadcast sources for parallel live broadcast, two sets of live broadcast equipment are equivalently provided, so that the attention of the anchor and the operation area of courseware are both on the first live broadcast source when the first live broadcast source is in live broadcast, and when the live broadcast sources need to be switched, the attention of the anchor needs to be switched to the live broadcast equipment of the second live broadcast source besides the switching of the live broadcast stream data acquisition equipment, so that the situation that the anchor picture is not matched with the lecture content can be avoided, and the quality of network lecture is improved. Optionally, the method further comprises:
and when the video distribution quality is lower than a preset condition, sending a live broadcast switching signal to the anchor broadcast so that the anchor broadcast adjusts the live broadcast visual angle, and the live broadcast visual angle after the anchor broadcast is adjusted is consistent with the second live broadcast source operation visual angle.
Therefore, the anchor can enable the anchor to be higher in matching degree with the second live source by adjusting the visual angle, the anchor can be live through the second live source in a higher mode, the fact that the anchor and a live interface (namely an operation area) have smaller changes before and after switching is guaranteed, and therefore students at the user side can achieve non-sensory switching and continuity of a live teaching process is guaranteed.
Certainly, in live broadcast source switching process, still relate to the switching of anchor video acquisition (for example camera) and audio acquisition equipment (for example microphone), in order to guarantee continuity and the uniformity around the switching, first live broadcast source with video acquisition equipment and audio acquisition equipment can dispose the same parameter in the second live broadcast source, and the angle and the position of installation (with the live broadcast equipment that corresponds) also can be unanimous, like this main visual angle switch back, and the video acquisition equipment and the audio acquisition equipment of second live broadcast source can gather the data of the same scope and tone quality with the corresponding acquisition equipment of first live broadcast source to video and audio continuity and stability have been guaranteed.
In some other embodiments, the first live broadcast source and the second live broadcast source may adopt the same set of video capture device and audio capture device, so that the consistency of the video quality and the audio quality before and after switching may be ensured, but on the basis of the adjustment of the anchor viewing angle, the angles of the corresponding video capture device and audio capture device also need to be adjusted correspondingly, so that the anchor is in a suitable video range, and the captured audio is in a better quality range, and the video capture device and the audio capture device in the first live broadcast source and the second live broadcast source may also have other configuration modes, which are not limited in the embodiments of this specification.
In this embodiment of this specification, as shown in fig. 7, after the anchor completes live broadcast switching, updating a live broadcast stream data pull address of the user end according to an address of a pull stream server corresponding to the second live broadcast source, so that the user end watches live broadcast content through the second live broadcast source, including:
s601: after the anchor completes live broadcast switching, acquiring address information of a pull stream server corresponding to the second live broadcast source and address information of each user side in the first live broadcast source;
s602: configuring and generating a content distribution protocol of the second live source according to address information of a pull stream server corresponding to the second live source and address information of each user side in the first live source;
s603: and transmitting the content distribution protocol of the second live broadcast source to the user side so that the user side watches the live broadcast content through the second live broadcast source.
It can be understood that, by configuring a corresponding content distribution protocol for the second live source, the content distribution protocol can be obtained through the address information of the stream pulling server corresponding to the second live source and the address information of each user side in the first live source, so that the user side corresponding to the first live source can directly pull the live stream data of the second live source, and only page refreshing is needed at the user side, thereby implementing the non-inductive switching of stream pulling channels at the user side, and ensuring the viewing experience of the user.
The change of the user side pull channel can be quickly realized through the configuration of the second live source content distribution protocol, the definition of other configuration environments can be included during actual configuration, optionally, the preset script can be automatically executed, and when the live source needs to be switched, the corresponding script is directly triggered, so that the automatic updating of the content distribution protocol and other configuration environments is realized, and the efficiency of switching the live source is improved.
In this embodiment of the present specification, live is used as a process of giving lessons in real time, some users (or students) have difficulty in understanding at one time, and therefore playback of live video is also needed to improve understanding of the content of the lessons, and therefore, the method optionally further includes:
after anchor live broadcasting is finished, acquiring live broadcasting stream data of the first live broadcasting source and the second live broadcasting source;
according to the time for switching the second live source, determining effective live streaming data of the first live source before the time and effective live streaming data of the second live source after the time;
and merging the effective live streaming data of the first live source and the second live source so as to enable a user to obtain a complete live file.
It can be understood that, in order to enable a student to play back and learn a live course after live broadcasting, merging the live files before and after switching is further required to obtain a complete live file, and when the live files are specifically merged, the integrity of effective data in the first live source and effective data in the second live source can be obtained, the integrity can be judged by live broadcasting time or the size of the files, the determination that live broadcasting time is long or the size of the files is large is determined to be high, then the files with high data integrity are taken as the main files, and the files with low data integrity are taken as the auxiliary files to merge and repair the live files, so that the complete live files are obtained, and the repairing process can include merging of video pictures and merging of audio.
As shown in fig. 8, for the operation system of the live video switching method provided in this embodiment of the present disclosure, the system includes two sets of independent live sources, each set of live source has an independent live streaming data transmission channel, so as to avoid an influence of a first live source on a second live source after switching of the live sources, and ensure that the two live sources have independent fluency, when the first live source is live, the second live source pulls live streaming data of the first live source and pushes the live streaming data to a streaming server corresponding to the second live source, when video distribution quality of the first live source is reduced, source switching can be performed quickly, the second live source can quickly forward live broadcast takeover service, disconnect the pull channel from the first live source, and can update live broadcast status (courseware content and drawing board content) of the second live source in time, therefore, the method and the device realize the non-inductive switching of the live streaming channel at the user side, improve the efficiency of switching the live source and ensure the watching experience of the user.
Based on the same inventive concept, an embodiment of this specification further provides a live video switching apparatus, as shown in fig. 9, the apparatus includes:
the video distribution data acquisition module 100 is configured to acquire video distribution data of a user side in real time when a first direct broadcast source is live;
a video distribution quality calculation module 200, configured to calculate video distribution quality of the first live source according to video distribution data of a user side;
the live broadcast switching module 300 is configured to, when the video distribution quality is lower than a preset condition, obtain a current courseware state in a first live broadcast source, and adjust a courseware state in a second live broadcast source to the current courseware state, so that an anchor broadcast is switched from the first live broadcast source to the second live broadcast source for live broadcast;
and an address updating module 400, configured to update a live streaming data pull address of the user according to the address of the pull server corresponding to the second live source after the anchor completes live broadcast switching, so that the user watches live content through the second live source.
The beneficial effects obtained by the above device are consistent with those obtained by the above method, and the embodiments of the present description are not repeated.
As shown in fig. 10, for a computer device provided in this embodiment, an apparatus herein may be a computer device in this embodiment, and performs the method herein, the computer device 1002 may include one or more processors 1004, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, the memory 1006 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 1002. In one case, when the processor 1004 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 1002 can perform any of the operations of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008, such as a hard disk drive mechanism, an optical disk drive mechanism, or the like, for interacting with any memory.
Computer device 1002 may also include an input/output module 1010(I/O) for receiving various inputs (via input device 1012) and for providing various outputs (via output device 1014)). One particular output mechanism may include a presentation device 1016 and an associated Graphical User Interface (GUI) 1018. In other embodiments, input/output module 1010(I/O), input device 1012, and output device 1014 may also be excluded, as only one computer device in a network. Computer device 1002 can also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the above-described components together.
Communication link 1022 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communications link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
Corresponding to the methods in fig. 2-7, the embodiments herein also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above-described method.
Embodiments herein also provide computer readable instructions, wherein when executed by a processor, a program thereof causes the processor to perform the method as shown in fig. 2-7.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (12)

1. A video live broadcast switching method is characterized in that the method is applied to a first live broadcast source and a second live broadcast source of parallel live broadcast, the first live broadcast source and the second live broadcast source are provided with a corresponding stream pushing server and a stream pulling server, when the first live broadcast source is in a live broadcast state, the second live broadcast source pulls live broadcast stream data of the first live broadcast source and pushes the live broadcast stream data of the first live broadcast source to the stream pushing server corresponding to the second live broadcast source, and the method comprises the following steps:
acquiring video distribution data of a user side in real time when a first direct broadcast source is live;
calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side;
when the video distribution quality is lower than a preset condition, acquiring the current courseware state in a first live broadcast source, and adjusting the courseware state in a second live broadcast source to the current courseware state, so that the anchor is switched from the first live broadcast source to the second live broadcast source for live broadcast;
and after the anchor completes live broadcast switching, updating the live broadcast stream data pull address of the user side according to the address of the pull stream server corresponding to the second live broadcast source so that the user side can watch live broadcast contents through the second live broadcast source.
2. The method of claim 1, wherein the calculating the video distribution quality of the first live source according to the video distribution data at the user end comprises:
acquiring the downloading slicing speed of each user side for playing the live video in real time;
according to the downloading slicing speed, calculating to obtain the user side number ratio of the downloading slicing speed lower than a speed threshold value;
and calculating the video distribution quality of the first live broadcast source in a first preset time period according to the proportion of the number of the user terminals with the downloading fragmentation speed lower than the speed threshold value.
3. The method of claim 1, wherein the calculating the video distribution quality of the first live source according to the video distribution data at the user end further comprises:
acquiring the decoding frame loss quantity of each user terminal playing the live video in a second preset time period;
calculating and obtaining the decoding frame loss rate of each user side in a second preset time period according to the decoding frame loss quantity;
and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the decoding frame loss rate and the total number of the user terminals in the second preset time period.
4. The method of claim 3, wherein the obtaining the video distribution quality of the first live source in the second preset time period by calculating according to the decoding frame loss rate and the total number of the user terminals in the second preset time period comprises:
determining the distribution quantity of the user terminals in different areas in a second preset time period according to the address positions corresponding to the IP addresses of the user terminals;
calculating to obtain the proportion of the user terminals of which the decoding frame loss rates exceed the frame loss threshold value in different areas according to the distribution quantity of the user terminals in different areas and the decoding frame loss rates of the user terminals;
and calculating to obtain the video distribution quality of the first live broadcast source in a second preset time period according to the proportion of the user terminals with the decoding frame loss rate exceeding the frame loss threshold value in different areas and preset weight coefficients of different areas.
5. The method of claim 1, wherein the calculating the video distribution quality of the first live source according to the video distribution data at the user end further comprises:
acquiring interactive information between the user side and the anchor within a third preset time period;
matching the interactive information with a preset keyword library to obtain a matching result, wherein the preset keyword library is a keyword set which is fed back by a user side and is not smooth in live broadcasting;
and calculating to obtain the video distribution quality of the first live broadcast source in a third preset time period according to the matching result and the total amount of the interactive information in the third preset time period.
6. The method of claim 1, wherein when the video distribution quality is lower than a preset condition, acquiring a current courseware state in a first live source, and adjusting the courseware state in a second live source to the current courseware state, so that an anchor is switched from the first live source to the second live source for live broadcasting, the method comprises:
when the video distribution quality is lower than a preset condition, sending a live broadcast stream data acquisition permission to the second live broadcast source so that the second live broadcast source can acquire an active live broadcast permission and disconnect a pull channel of the second live broadcast source and the first live broadcast source;
after the second live source obtains the active live broadcasting authority, obtaining historical live broadcasting stream data of the first live source pulled by the second live source;
determining the current state of courseware in the first live broadcast source according to historical live broadcast stream data of the first live broadcast source pulled by the second live broadcast source, wherein the current state of courseware is the latest state of teaching of the anchor in the first live broadcast source;
and adjusting the courseware state in the second live source to the courseware current state according to the courseware current state in the first live source.
7. The method as claimed in claim 6, wherein after the second live source obtains the active live broadcast authority, before obtaining the historical live broadcast stream data of the first live source pulled by the second live source, further comprising:
acquiring courseware content to be given in the first direct broadcasting source;
and copying the courseware content to be lectured to the second live broadcast source so as to facilitate the anchor broadcast of the courseware content to be lectured.
8. The method of claim 1, further comprising:
and when the video distribution quality is lower than a preset condition, sending a live broadcast switching signal to the anchor broadcast so that the anchor broadcast adjusts the live broadcast visual angle, and the live broadcast visual angle after the anchor broadcast is adjusted is consistent with the second live broadcast source operation visual angle.
9. The method according to claim 1, wherein after the anchor completes live broadcast switching, updating a live broadcast stream data pull address of the user side according to an address of a pull stream server corresponding to the second live broadcast source, so that the user side watches live broadcast content through the second live broadcast source, including:
after the anchor completes live broadcast switching, acquiring address information of a pull stream server corresponding to the second live broadcast source and address information of each user side in the first live broadcast source;
configuring and generating a content distribution protocol of the second live source according to address information of a pull stream server corresponding to the second live source and address information of each user side in the first live source;
and transmitting the content distribution protocol of the second live broadcast source to the user side so that the user side watches the live broadcast content through the second live broadcast source.
10. A live video switching apparatus, the apparatus comprising:
the video distribution data acquisition module is used for acquiring video distribution data of a user side in real time when a first direct broadcast source is in live broadcast;
the video distribution quality calculation module is used for calculating the video distribution quality of the first live broadcast source according to the video distribution data of the user side;
the live broadcast switching module is used for acquiring the current courseware state in a first live broadcast source when the video distribution quality is lower than a preset condition, and adjusting the courseware state in a second live broadcast source to the current courseware state so that the anchor broadcast is switched from the first live broadcast source to the second live broadcast source for live broadcast;
and the address updating module is used for updating the live streaming data pull address of the user side according to the address of the pull server corresponding to the second live source after the anchor completes live broadcast switching so that the user side can watch live broadcast contents through the second live source.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9.
CN202111311608.2A 2021-11-08 2021-11-08 Live video switching method, device, equipment and storage medium Active CN114040218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111311608.2A CN114040218B (en) 2021-11-08 2021-11-08 Live video switching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111311608.2A CN114040218B (en) 2021-11-08 2021-11-08 Live video switching method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114040218A true CN114040218A (en) 2022-02-11
CN114040218B CN114040218B (en) 2023-07-21

Family

ID=80143286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111311608.2A Active CN114040218B (en) 2021-11-08 2021-11-08 Live video switching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114040218B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116308560A (en) * 2023-03-29 2023-06-23 浙江思阳广告有限公司 Intelligent media distribution method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6240105B1 (en) * 1998-03-30 2001-05-29 International Business Machines Corporation Video server streaming synchronization
CN105472443A (en) * 2016-01-13 2016-04-06 杭州当贝网络科技有限公司 Direct broadcast source control method and system
US20160157209A1 (en) * 2014-12-01 2016-06-02 At&T Intellectual Property I, Lp Method and apparatus for delivering media content and backup media content using multiple networks
CN105872614A (en) * 2016-04-12 2016-08-17 乐视控股(北京)有限公司 Live stream switching method and device
CN105872568A (en) * 2015-11-19 2016-08-17 乐视云计算有限公司 Method and device for transmitting video data based on cloud live broadcast platform
CN106791884A (en) * 2016-08-19 2017-05-31 炫熵(上海)互联网科技有限公司 The holding system and method for P2P live video data uniformity
CN107105309A (en) * 2017-04-25 2017-08-29 北京潘达互娱科技有限公司 Live dispatching method and device
CN107454431A (en) * 2017-06-29 2017-12-08 武汉斗鱼网络科技有限公司 Collocation method, storage medium, electronic equipment and the system of bean vermicelli identity
CN112351296A (en) * 2020-10-29 2021-02-09 北京达佳互联信息技术有限公司 Pull stream push method and device of video stream, server and storage medium
CN112492326A (en) * 2020-10-19 2021-03-12 深圳点猫科技有限公司 Online education double-live-broadcast-room switching method and device and storage medium
CN112584192A (en) * 2020-12-14 2021-03-30 广州虎牙科技有限公司 Network quality monitoring method and device and server

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6240105B1 (en) * 1998-03-30 2001-05-29 International Business Machines Corporation Video server streaming synchronization
US20160157209A1 (en) * 2014-12-01 2016-06-02 At&T Intellectual Property I, Lp Method and apparatus for delivering media content and backup media content using multiple networks
CN105872568A (en) * 2015-11-19 2016-08-17 乐视云计算有限公司 Method and device for transmitting video data based on cloud live broadcast platform
CN105472443A (en) * 2016-01-13 2016-04-06 杭州当贝网络科技有限公司 Direct broadcast source control method and system
CN105872614A (en) * 2016-04-12 2016-08-17 乐视控股(北京)有限公司 Live stream switching method and device
CN106791884A (en) * 2016-08-19 2017-05-31 炫熵(上海)互联网科技有限公司 The holding system and method for P2P live video data uniformity
CN107105309A (en) * 2017-04-25 2017-08-29 北京潘达互娱科技有限公司 Live dispatching method and device
CN107454431A (en) * 2017-06-29 2017-12-08 武汉斗鱼网络科技有限公司 Collocation method, storage medium, electronic equipment and the system of bean vermicelli identity
CN112492326A (en) * 2020-10-19 2021-03-12 深圳点猫科技有限公司 Online education double-live-broadcast-room switching method and device and storage medium
CN112351296A (en) * 2020-10-29 2021-02-09 北京达佳互联信息技术有限公司 Pull stream push method and device of video stream, server and storage medium
CN112584192A (en) * 2020-12-14 2021-03-30 广州虎牙科技有限公司 Network quality monitoring method and device and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C. KATSINIS: "Performance of fault-tolerant distributed shared memory on broadcast- and switch-based architectures", 19TH IEEE INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM *
常海涛: "IPTV直播容灾技术方案研究", 信息与电脑(理论版), no. 11 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116308560A (en) * 2023-03-29 2023-06-23 浙江思阳广告有限公司 Intelligent media distribution method and system
CN116308560B (en) * 2023-03-29 2023-11-21 浙江思阳广告有限公司 Intelligent media distribution method and system

Also Published As

Publication number Publication date
CN114040218B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
US10291675B2 (en) Methods and apparatus for proactive multi-path routing
US10368136B1 (en) Resource management for video playback and chat
WO2015166573A1 (en) Live broadcast system
US20080160911A1 (en) P2P-based broadcast system and method using the same
US10187669B2 (en) Apparatus and method for managing media content for mobile devices
CN112752109B (en) Video playing control method and system
JP2005160063A (en) Personalization module for interactive digital television system
US20080046915A1 (en) System and method of providing community content
WO2021103366A1 (en) Bullet screen processing method and system based on wechat mini-program
CN114040218B (en) Live video switching method, device, equipment and storage medium
CN111245846B (en) Signaling transmission system and method for live broadcast
CN115086746A (en) Video polling method for live system, live system and electronic equipment
Fallica et al. On the quality of experience of sopcast
CN114257572B (en) Data processing method, device, computer readable medium and electronic equipment
Pandey et al. The evolution of over the top (OTT): Standardization, key players and challenges
CN105656742A (en) Multi-looped network stream media multicast system and method based on MOST
Marfil et al. IDMS solution for hybrid broadcast broadband delivery within the context of HbbTV standard
CN114025204B (en) Live video switching method, device, equipment and storage medium
US10637904B2 (en) Multimedia streaming service presentation method, related apparatus, and related system
CN113259730B (en) Code rate adjustment method and device for live broadcast
CN107071566B (en) Method and device for displaying watching number of people in live broadcast room
US20080049701A1 (en) System and method for calculating a bandwidth requirement between two elements in a communications network
CN112637617B (en) Method, system, equipment and medium for live broadcast source station video stream transmission
CN114979692B (en) Audio and video streaming mode switching method, device and system and storage medium
US11457279B1 (en) Live previewing of streaming video in the cloud

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