CN117896555A - Live video playing control method and device, computer equipment and storage medium - Google Patents

Live video playing control method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117896555A
CN117896555A CN202410084698.3A CN202410084698A CN117896555A CN 117896555 A CN117896555 A CN 117896555A CN 202410084698 A CN202410084698 A CN 202410084698A CN 117896555 A CN117896555 A CN 117896555A
Authority
CN
China
Prior art keywords
live
stream
target
live stream
cdn
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.)
Pending
Application number
CN202410084698.3A
Other languages
Chinese (zh)
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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202410084698.3A priority Critical patent/CN117896555A/en
Publication of CN117896555A publication Critical patent/CN117896555A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application sends a target live stream to a live audience terminal through a first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal, meanwhile, the second CDN platform is controlled to be respectively connected with a live server and the live audience terminal, the second CDN platform is triggered to distribute target CDN nodes to the live audience terminal, and the target CDN nodes configured by the second CDN platform for the live audience terminal send the copy live stream to the live audience terminal so as to facilitate live stream control by the live audience terminal based on the target live stream and the copy live stream and a preset live stream switching logic, thereby improving the pushing efficiency and saving the docking development cost of a transmission service terminal and a third-party CDN.

Description

Live video playing control method and device, computer equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a method and a device for controlling playing of live video, computer equipment and a storage medium.
Background
With the continuous development of computer communication technology, a great deal of popularization and application of terminals such as smart phones, computers, tablet computers and notebook computers are developed towards diversification and individuation, and the terminals are increasingly becoming indispensable terminals in life and work of people. In order to meet the pursuit of people for mental life, live broadcasting is becoming popular in work, life and entertainment of people, a host can log in a client to play and host live programs anytime and anywhere, and a user can open a live broadcasting platform to watch different video live broadcasting anytime.
In the prior art, live streams in a live broadcast room are generally pushed to each large content distribution network (Content Delivery Network, CDN) by each large live broadcast platform, then are accessed to CDN distribution nodes and pushed to live broadcast clients of live broadcast audiences, and then the transmission service is required to be in service connection with a third-party CDN, so that online can be successfully achieved through online debugging. In the prior art, when the live broadcasting room is in plug-flow, the transmission service needs to be subjected to butt joint development, the access cost is high, and the plug-flow efficiency is low.
Disclosure of Invention
The embodiment of the application provides a broadcast control method, a device, computer equipment and a storage medium for live video, wherein a target live stream is sent to a live audience terminal through a first CDN platform so as to display live video corresponding to the target live stream on a live interface provided by the live audience terminal, and meanwhile, a target CDN node configured for the live audience terminal through a second CDN platform is used for sending the copy live stream to the live audience terminal so as to facilitate the live stream control by the live audience terminal based on the target live stream, the copy live stream and preset live stream switching logic, thereby improving the push efficiency and saving the butt joint development cost of a transmission service terminal and a third-party CDN.
The embodiment of the application provides a play control method of a live video, which is applied to a live server and comprises the following steps:
responding to an event that a live audience enters a target live broadcast room, and acquiring user information of the live audience;
based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience;
A target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal;
receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
Controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
based on the live stream video request, transmitting a copy live stream of the target live stream to the second CDN platform, and transmitting the copy live stream to the live audience terminal through a target CDN node configured by the second CDN platform for the live audience terminal, so that the live audience terminal can perform live stream control based on the target live stream, the copy live stream and preset live stream switching logic.
The embodiment of the application provides a method for controlling the playing of live video, which is applied to a live audience terminal and comprises the following steps:
transmitting user information of live audience to a live server;
receiving a target live stream sent by the live broadcast server through a first CDN platform;
Displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
a live stream address of the target live stream sent to a second CDN platform;
Receiving a target CDN node configured for the live audience terminal through the second CDN platform and a transmitted copy live stream, wherein the copy live stream is a live stream determined based on the target live stream;
And performing live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
Correspondingly, the embodiment of the application also provides a device for controlling the playing of the live video, which is applied to the live server and comprises:
the acquisition unit is used for responding to the event that the live audience enters the target live broadcasting room and acquiring the user information of the live audience;
the first control unit is used for controlling the first CDN platform to be respectively connected with the live broadcast server and the live broadcast audience terminal of the live broadcast audience based on the user information;
The second control unit is used for sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal;
The first receiving unit is used for receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
the third control unit is used for controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
The first sending unit is configured to send, based on the live stream video request, a replicated live stream of the target live stream to the second CDN platform, and send, through the target CDN node configured by the second CDN platform for the live viewer, the replicated live stream to the live viewer, so that the live viewer performs live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic.
Correspondingly, the embodiment of the application also provides a device for controlling the playing of the live video, which is applied to the live audience side, and comprises:
the second sending unit is used for sending the user information of the live audience to the live broadcast server;
the second receiving unit is used for receiving the target live stream sent by the live server through the first CDN platform;
The display unit is used for displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
A third sending unit, configured to send a live stream address of the target live stream to a second CDN platform;
A third receiving unit, configured to receive, through the second CDN platform, a target CDN node configured for the live audience, and a transmitted replicated live stream, where the replicated live stream is a live stream determined based on the target live stream;
And the fourth control unit is used for carrying out live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
Correspondingly, the embodiment of the application also provides computer equipment, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes any step of a playing control method of the live video when being executed by the processor.
Correspondingly, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes any step of a playing control method of the live video when being executed by a processor.
The embodiment of the application provides a play control method, a device, computer equipment and a storage medium of live video, which are used for acquiring user information of a live audience by responding to an event that the live audience enters a target live room; then, based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience; then, a target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal; then, receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal; then, the second CDN platform is controlled to be respectively connected with the live broadcast server and the live broadcast audience terminal, and the second CDN platform is triggered to distribute target CDN nodes for the live broadcast audience terminal; and finally, based on the live stream video request, transmitting the copied live stream of the target live stream to the second CDN platform, and transmitting the copied live stream to the live audience terminal through a target CDN node configured for the live audience terminal by the second CDN platform, so that the live audience terminal can conveniently perform live stream control based on the target live stream, the copied live stream and preset live stream switching logic. According to the embodiment of the application, the target live stream is sent to the live audience terminal through the first CDN platform so as to display the live video corresponding to the target live stream on the live interface provided by the live audience terminal, meanwhile, the copy live stream is sent to the live audience terminal through the target CDN node configured for the live audience terminal through the second CDN platform so as to facilitate the live stream control of the live audience terminal based on the target live stream, the copy live stream and the preset live stream switching logic, and therefore, the butt joint development cost of the transmission service terminal and the third-party CDN can be saved while the push stream efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scene of a play control system of live video according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a method for controlling playing of live video according to an embodiment of the present application.
Fig. 3 is another flow chart of a method for controlling playing of live video according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a play control device for live video according to an embodiment of the present application.
Fig. 5 is another schematic structural diagram of a play control device for live video according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of the disclosure.
The embodiment of the application provides a play control method and device of live video, computer equipment and a storage medium. Specifically, the method for controlling playing of live video in the embodiment of the present application may be executed by a computer device, where the computer device may be a device such as a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a personal computer (PC, personal Computer), a personal digital assistant (personal DIGITAL ASSISTANT, PDA), and the like, and the terminal may further include a client, where the client may be a live broadcast application client, a browser client carrying a computer program, or an instant messaging client, and the like. The server 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 cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms.
For example, when the play control method of the live video is operated in the terminal, the terminal device stores a live application program and is used for presenting a project information page. The terminal device is used for interacting with a user through a graphical user interface, for example, the terminal device downloads and installs a project management application program and operates. The way in which the terminal device presents the graphical user interface to the user may include a variety of ways, for example, the graphical user interface may be rendered for display on a display screen of the terminal device, or presented by holographic projection. For example, the terminal device may include a touch display screen for presenting a graphical user interface including a live interface and receiving operational instructions generated by a user acting on the graphical user interface, and a processor for running the live application, generating the graphical user interface, responding to the operational instructions, and controlling the display of the graphical user interface on the touch display screen.
Referring to fig. 1, fig. 1 is a schematic view of a scene of a play control system for live video according to an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to different live servers through the network. A terminal is any device having computing hardware capable of supporting and executing software products corresponding to project management. In addition, when the system includes a plurality of terminals, a plurality of servers, and a plurality of networks, different terminals may be connected to each other through different networks, through different servers. The network may be a wireless network or a wired network, such as a Wireless Local Area Network (WLAN), a Local Area Network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, the different terminals may be connected to other terminals or to a server or the like using their own bluetooth network or hotspot network. For example, multiple users may be online through different terminals so as to be connected through an appropriate network and synchronized with each other to support live video viewing by multiple users. In addition, the system may include multiple databases coupled to different servers.
The embodiment of the application provides a play control method of live video, which can be executed by a terminal or a server. The embodiment of the application is illustrated by taking a method for controlling the playing of live video by a terminal as an example. The terminal may include a touch display screen and a processor (of course, the terminal may also use peripheral devices such as a mouse and a keyboard as input devices, which are only illustrated here by using the touch display screen as an example), where the touch display screen is used for presenting a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface. When a user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instruction, and can also control the content of the opposite-end server by responding to the received operation instruction. For example, the user-generated operating instructions for the graphical user interface include instructions for launching the application, and the processor is configured to launch the application after receiving the user-provided instructions for launching the application. Further, the processor is configured to render and draw a graphical user interface associated with project management on the touch-sensitive display screen. A touch display screen is a multi-touch-sensitive screen capable of sensing touch or slide operations performed simultaneously by a plurality of points on the screen. And the user performs touch operation on the graphical user interface by using a finger, and when the graphical user interface detects the touch operation, the user controls a live broadcast interface in the graphical user interface to display different live broadcast room pages. The processor may be configured to present a corresponding live room page in response to an operation instruction generated by a touch operation of the user.
It should be noted that, the schematic view of the scene of the play control system of the live video shown in fig. 1 is only an example, and the play control system and the scene of the live video described in the embodiment of the present application are for more clearly describing the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application, and as a person of ordinary skill in the art can know that, with the appearance of a new service scene, the technical solution provided by the embodiment of the present application is equally applicable to similar technical problems.
Based on the above problems, embodiments of the present application provide a method, an apparatus, a computer device, and a storage medium for controlling playing of live video, which can improve the push efficiency and save the cost of the transmission server for the third-party CDN. The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiment of the application provides a method for controlling the playing of live video, which can be executed by a terminal or a server, and the method for controlling the playing of live video is executed by the terminal as an example, and can acquire the user information of a live audience by responding to an event that the live audience enters a target live room; then, based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience; then, a target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal; then, receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal; then, the second CDN platform is controlled to be respectively connected with the live broadcast server and the live broadcast audience terminal, and the second CDN platform is triggered to distribute target CDN nodes for the live broadcast audience terminal; and finally, based on the live stream video request, transmitting the copied live stream of the target live stream to the second CDN platform, and transmitting the copied live stream to the live audience terminal through a target CDN node configured for the live audience terminal by the second CDN platform, so that the live audience terminal can conveniently perform live stream control based on the target live stream, the copied live stream and preset live stream switching logic.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for controlling playing of live video, which is applied to a live server, and the specific flow of the method for controlling playing of live video can be as follows steps 101 to 106:
101, acquiring user information of a live audience in response to an event that the live audience enters a target live room.
In the embodiment of the application, the user information of the live audience comprises user identification information and user IP address information. For example, the user information includes user identification information and user IP address information for indicating an area to which the user IP belongs, such as a south-china patch in guangzhou, guangdong. The computer device may obtain user information of a live audience in response to an event that the live audience enters a target live room.
102, Controlling the first CDN platform to establish connection with the live broadcast server and the live broadcast audience terminal of the live broadcast audience respectively based on the user information.
In the embodiment of the present application, the first CDN platform may be controlled to establish connection with the live server and the live audience side of the live audience, respectively, based on the user information, where a content delivery network (i.e., CDN) refers to a set of servers distributed in each region. These servers store copies of the data so that the servers can satisfy requests for data based on which servers are closest to the user.
103, Sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal.
Specifically, the live broadcast server sends a target live broadcast stream to the live broadcast audience terminal through the first CDN platform so as to display live broadcast videos corresponding to the target live broadcast stream on a live broadcast interface provided by the live broadcast audience terminal.
104, Receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal.
The live stream address is a pull stream address, and a specific form can be a stream address of xx.com/xxx.flv.
And 105, controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal.
In an embodiment, after the step of "controlling the second CDN platform to establish a connection with the live server and the live viewer side, respectively," the method may include:
And sending the user information of the live audience to the second CDN platform so as to trigger the second CDN platform to distribute target CDN nodes for the live audience terminal based on the user IP address information.
Specifically, the second CDN platform allocates, as a target CDN node, a CDN node closest to the user IP address information of the client of the live audience based on the user IP address information.
106, Based on the live stream video request, transmitting a copy live stream of the target live stream to the second CDN platform, and transmitting the copy live stream to the live audience terminal through a target CDN node configured by the second CDN platform for the live audience terminal, so that the live audience terminal performs live stream control based on the target live stream, the copy live stream and preset live stream switching logic.
In an embodiment, after the step of "sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request", the method may include:
If a live stream pulling failure result returned by the second CDN platform is received, continuously sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal.
In another embodiment, after the step of "sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request", the method may include:
if the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is received, the target live stream is continuously sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal.
For example, when the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is detected, it is determined that a scenario in which switching of the third CDN fails occurs, and the target live stream is continuously sent to the live audience through the first CDN platform, so that live video corresponding to the target live stream is displayed on a live interface provided by the live audience. Specifically, when a pulling failure, a pulling error, a coding error, a hardware error or a network timeout and the like are detected, determining a target CDN live stream forwarding failure result.
For another example, when the prompt information of the abnormality of the target CDN node returned by the second CDN platform is detected, the target live stream is continuously sent to the live audience through the first CDN platform, so that a live video corresponding to the target live stream is displayed on a live interface provided by the live audience. Specifically, when the situation that the CDN node is empty and the CDN node return stream address does not meet url specifications or the like is detected, at this time, the target CDN node cannot send the copy live stream to the live client, so that the target live stream is continuously sent to the live audience through the first CDN platform, so that live video corresponding to the target live stream is displayed on a live interface provided by the live audience.
Optionally, after the step of "sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request", the method may include:
receiving a live stream forwarding rate sent by the second CDN platform;
and managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold.
Specifically, in the step of managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold, the method may include:
if the live broadcast stream forwarding rate is lower than a first preset threshold, controlling each CDN node in the second CDN platform to pause use, controlling a server of the second CDN platform to establish connection with a live broadcast audience terminal, and triggering the server of the second CDN platform to send the copy live broadcast stream to the live broadcast audience terminal so that the live broadcast audience terminal can conduct live broadcast stream control based on the target live broadcast stream and the copy live broadcast stream and preset live broadcast stream switching logic.
And if the live stream forwarding rate is higher than a first preset threshold, controlling the second CDN platform to respectively establish connection with the live server and the live audience terminal, and triggering the second CDN platform to allocate a target CDN node for the live audience terminal.
For example, the first preset threshold may be set to 50%, if the live stream forwarding rate is lower than 50%, the aggregation of the segments CDN nodes may be started, for example, the granularity of the segments is reduced, and the segments are returned to the root CDN server, although communication with too large cross segments may cause delay increase, the sharing rate may be increased, so that the cost is reduced, specifically, the suspension of use of each CDN node in the second CDN platform may be controlled, the connection between the server of the second CDN platform and the live audience terminal may be controlled, and the server of the second CDN platform may be triggered to send the replicated live stream to the live audience terminal, so that the live audience terminal may perform flow control based on the target live stream and the replicated live stream, and a preset live stream switching logic. And if the live stream forwarding rate is higher than 50%, controlling the second CDN platform to respectively establish connection with the live server and the live audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live audience terminal.
Further, if the live stream forwarding rate is higher than the second preset threshold value by 95%, that is, the live stream forwarding rate has reached the ideal stage, the aggregate slice granularity can be increased, and the instantaneity is improved, specifically, the range of the slices responsible for each cdn can be reduced, so that each cdn is only responsible for forwarding the live stream in a small area, the forwarding rate in the area is improved, and the forwarding rate of the live stream is increased cdn to send the live stream.
In a specific embodiment, when a user is detected entering the target live room, the host stream is pulled, and the user identity and the region to which the ip belongs (e.g., guangzhou, guangdong, south China) are identified, where "host stream" refers to the video stream of the host in the target live room, "pull host stream" refers to the request to pull the video stream of the host (i.e., the video stream has not been pulled yet), and "identify the user identity, the region to which the ip belongs" is used later in distributing the tile cdn, identify the user identity, i.e., determine the user uuid, user browser, user ip address, user network [ 4g, mobile, etc.), the user's system, and the user bandwidth.
Then, a third party connection cdnA is established, the user a starts playing the third party cdnA source stream a, and when the third party connection cdnA is established as soon as the user enters the live broadcasting room, the third party connection is a request for streaming, the third party cdnA source stream a refers to the host stream, and the "user a starts playing the third party cdnA source stream a" refers to playing the video stream of the live broadcasting room host acquired from the third party cdnA platform. Third party connection a is a source flow provider and third party cdnB is a copy party.
Then, the third party cdn B starts to report the stream address and information such as user IP through the user a, starts the mobile zone server, starts to preheat, and pulls the third party source stream a. Specifically, the location information may be obtained according to the user ip, and the server location closest to the location may be obtained according to the location information, so as to distribute the user to connect to the server, thereby increasing the communication smoothness and reducing the delay. The "preheating" means that each of the fragment servers is in a service suspension state when no user accesses, and when user traffic comes in, the fragment servers start to start services, and the fragment servers have large concurrency and trigger elastic capacity expansion. Since the third party cdnB cannot be directly accessed at first, since the third party cdnB may or may not have a source stream (depending on whether other users have previously pushed the stream address to the third party cndB), if not, the third party cdnB is connected by the incoming call, failure is possible, and then the third party source stream a is re-connected, which may cause the user side to be left blank too long, so the third party cdnA is connected first, then the third party cdnB is requested to obtain whether there is a stream, and then the third party cndB is switched seamlessly. Third party cdnB begins pulling host flow a and distributes to third party cdn servers of third party cdnB. The third party cdnB has a plurality of third party cdn servers, and the granularity can be adjusted according to the regional division, for example, when the user platform is more, such as jittering, the third party cdn servers can be cut into the city, so that each city level server serves the users in the whole city, if the cardinality is small and scattered, the granularity can be adjusted to be national, and one national server serves all people, so that the sharing rate can be improved, but some communication quality can be reduced.
Then, the user side starts to request the third party cdnB for each segment cdn node condition and reports the player condition and the use condition. The region can be contracted and adjusted, such as the region of the city, province, and south China. Reporting to the third party cdnB, the third party cdnB can be informed of the current push quality, whether there is any problem of jamming or communication. Use cases such as fps of the pull stream, the speed of the downstream bandwidth. Since there is a possibility that the service of the present patch node is not valid, it is necessary to connect the nodes of the partition wall patches, and each patch cdn node is determined.
And then, when the section cdn node is ready, the user side starts to pull the third party copy stream, the third party copy stream and the third party copy stream are compared with each other in dts, and stream switching is performed at the position where dts is close to a key frame within 10 frames, so that seamless switching is achieved. Wherein the third party copy stream is the source stream and the plug party is the third party cdnB. The concept of the time domain of dts compares whether two streams, the third party copy stream and the video stream currently being played by the user client, come to an adjacent frame number. The comparison duration may be within 10 frames and a gap within 60 frames. Since approximately 4-5 frames of the video will be interspersed with one key frame, the switch may be to a key frame position within approximately 10 frames. If the client side of the living broadcast room does not have video to play at the moment, the third party copy stream is directly used.
If the third party cdn fails to switch, the spam switches back to the host flow, and the third party cdn may fail in case of a failure in pulling, a failure in encoding and decoding, a failure in hardware reporting, and a timeout in the network. If the cdn node condition of the third party cdnB returns an exception, the host flow is switched back. For example, the cdn node is empty, the cdn node return stream address does not conform to url specification, and the like, so that the cdn node cannot send the third party copy stream to the user side, and the cdn node condition is determined to return an exception. Based on the above-mentioned knowledge, if the user side normally receives the third party copy stream, switching the stream, and playing the third party copy stream at the client side of the user side; if the third party cdnB is failed to switch or the cdn node returns an abnormality, the host stream is switched back, and the host stream is played at the client side of the user.
Further, the platform service starts to count the usage rate of the third party forwarding flow, if the forwarding rate is not ideal, for example, less than 50%, starts to aggregate the cdn nodes of the patch, for example, reduce the granularity of the patch, return the source to the root cdn server, and perform too large communication across the patch, which may cause delay increase, but increase the sharing rate and reduce the cost. If the sharing rate reaches an ideal stage, such as 95%, the granularity of the aggregation segment can be improved, and the instantaneity is improved. Wherein the platform service refers to a server of the live platform,
The "third party forwarding flow" refers to the "third party copy flow" forwarded to the user side, the forwarding rate refers to the success rate of the "third party copy flow" forwarded to the user side, and the "aggregate patch cdn node" refers to reducing the granularity, amplifying the patch, and aggregating more people. The patch granularity refers to the patch range of adjusting the city, province, south China and north China, the source returning to root cdn server specifically refers to the domestic platform, the source tracing to root is the root node of the national level, namely domestic users all use the same server. Specifically, if the forwarding rate of the third party cdnB is lower than 50%, the use of cdn in each region associated with the third party cdnB is suspended, and the server of the third party cdnB is directly used to transmit the host stream. If the forwarding rate is higher than 50% and lower than 95%, the use of cdn in each area associated with the third party cdnB is started to transmit the host flow according to cdn in the corresponding area where the IP of the user a is located. If the forwarding rate is higher than 95%, the scope of the area responsible for each cdn is reduced, so that each cdn is only responsible for forwarding the host stream in a small area, the forwarding rate of the area is improved, and a new cdn is added to send the host stream.
Based on the above, when the user a enters the live broadcast room of the first anchor through the client, the host stream of the first anchor is obtained from the third party a, and the live broadcast video corresponding to the host stream of the first anchor is played on the graphical user interface provided by the client of the user a. At the same time as the above steps occur, the client of the user a also sends the stream address of the host stream and the IP information of the user a to the third party cdnB, so that the third party cdn B of the third party pulls the third party source stream a (i.e. the host stream of the first host), and after the third party B pulls the host stream of the first host, the client of the user a is allocated to the server of the third party B closest to the user a according to the IP address of the user a cdn. When cdnB of the third party obtains the hosting stream of the first anchor, the client of the user a pulls the hosting stream of the first anchor to cdnB of the third party B, and switches the hosting stream video being played by the user a at this time through the third party a to the hosting stream sent by cdnB of the third party B, and disconnects the connection with the third party a. If the switch to the video provided by cdn of the third party B fails, then the connection with the third party cdnA is continued, and the host stream of the first anchor provided by the third party cdnA is played. Because of the cost involved, some cdn have high bandwidth costs and some are low, the platform needs to migrate to use cdn at low cost, so to save cost, switch to third party cdnB to push the hosting video of the hosting stream of the first host to the user side for playback. The third party cdnA only needs to accept the push stream of the anchor and provide the host stream, the third party cdnB has low cost, only needs the copy stream of the third party, does not relate to high-performance behaviors such as encoding and decoding, and the like, and can be pushed to a plurality of user sides of a live broadcasting room for watching the anchor on a large scale.
In the embodiment of the application, the client of the server does not need to dock the third party cdn, and the core of the method is to multiplex one of the existing third party cdn flows X to push to a new third party, and the third party copy and provide services, so as to realize a cdn scheme for realizing low-cost seamless access to the third party source flow in live broadcast, reduce the docking development cost of the transmission server and the third party cdn, enable the third party client to access the third party cdn with minimum cost, and realize no perception of users.
Referring to fig. 3, fig. 3 is a schematic flow chart of a method for controlling playing of live video, which is applied to a live audience, according to an embodiment of the present application, the specific flow of the method for controlling playing of live video may be as follows steps 201 to 206:
and 201, transmitting user information of the live audience to a live broadcast server.
In one embodiment, before the step of "transmitting user information of a live audience to a live server", the method may include:
and acquiring user identification information and user IP address information of the live audience.
In the embodiment of the application, the user information of the live audience comprises user identification information and user IP address information. For example, the user information includes user identification information and user IP address information for indicating an area to which the user IP belongs, such as a south-china patch in guangzhou, guangdong. The computer device may obtain user information of the live audience in response to an event that the live audience enters the target live room, that is, obtain user identification information and user IP address information of the live audience, and send the obtained user identification information and user IP address information to the live server.
202, Receiving a target live stream sent by the live server through a first CDN platform.
In the embodiment of the application, the live broadcast client can receive the target live broadcast stream sent by the live broadcast server through the first CDN platform, wherein the target live broadcast stream is the target anchor live broadcast video stream corresponding to the target live broadcast room where the live broadcast audience enters.
And 203, displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal.
Specifically, after the live client receives the target live stream sent by the live server through the first CDN platform, a live video corresponding to the target live stream may be displayed on a live interface provided by the live viewer.
204, Sending the live stream address of the target live stream to a second CDN platform.
In the embodiment of the application, when the live video corresponding to the target live stream is detected to be displayed on the live interface provided by the live audience terminal, the live client can send the live stream address of the target live stream currently being played on the live interface provided by the live audience terminal to the second CDN platform, so that the second CDN platform configures a target CDN node for the live audience terminal based on user information, and copies the live stream sent to the live client through the target CDN node.
205, Receiving a target CDN node configured for the live audience terminal through the second CDN platform and a transmitted replicated live stream, where the replicated live stream is a live stream determined based on the target live stream.
Specifically, the live client may receive a target CDN node configured for the live viewer end through the second CDN platform, and a copy live stream sent by the target CDN node, where the copy live stream is a live stream determined based on the target live stream, that is, the copy live stream is a live stream obtained by copying the target live stream.
206, Performing live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
In the embodiment of the application, the live broadcast client can perform live broadcast stream control based on the target live broadcast stream, the copy live broadcast stream and a preset live broadcast stream switching logic. Specifically, the dts comparison can be performed on the target live stream and the duplicate live stream, and the stream switching can be performed at the position where the dts is close to a key frame within 10 frames, so as to achieve seamless switching, for example, according to the concept of the time domain of the dts, whether the two live streams come to the adjacent frames can be compared, and the comparison duration can be within 10 frames or a gap within 60 frames. Because the video corresponding to the live stream is approximately penetrated by a key frame at 4 to 5 frames, the video can be switched to the key frame position within the range of 10 frames, thereby realizing seamless switching between video streams.
In an embodiment, the step of performing the live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic, the method may include:
And performing live stream control based on the first decoding time stamp of the target live stream, the second decoding time stamp of the copied live stream and preset live stream switching logic.
In another embodiment, the step of performing the live stream control based on the decoding timestamp of the target live stream and the decoding timestamp of the replicated live stream, and the preset live stream switching logic, the method may include:
performing timestamp comparison on the first decoding timestamp and the second decoding timestamp, and determining a key frame position in a designated frame number between the first decoding timestamp and the second decoding timestamp;
And performing live stream switching operation based on the key frame position so as to switch live video corresponding to the target live stream to live video corresponding to the copy live stream on a live interface provided by the live audience terminal.
For example, the live stream control may be performed based on the first decoding timestamp (i.e. the first dts) of the target live stream and the second decoding timestamp (i.e. the second dts) of the replicated live stream, and a preset live stream switching logic, and specifically, the switching of the live stream may be performed at a position where two dts are close to a key frame within 10 frames, so as to achieve seamless switching.
In summary, the embodiment of the application provides a method for controlling playing of live video, which is used for responding to an event that a live audience enters a target live room to acquire user information of the live audience; then, based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience; then, a target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal; then, receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal; then, the second CDN platform is controlled to be respectively connected with the live broadcast server and the live broadcast audience terminal, and the second CDN platform is triggered to distribute target CDN nodes for the live broadcast audience terminal; and finally, based on the live stream video request, transmitting the copied live stream of the target live stream to the second CDN platform, and transmitting the copied live stream to the live audience terminal through a target CDN node configured for the live audience terminal by the second CDN platform, so that the live audience terminal can conveniently perform live stream control based on the target live stream, the copied live stream and preset live stream switching logic. According to the embodiment of the application, the target live stream is sent to the live audience terminal through the first CDN platform so as to display the live video corresponding to the target live stream on the live interface provided by the live audience terminal, meanwhile, the copy live stream is sent to the live audience terminal through the target CDN node configured for the live audience terminal through the second CDN platform so as to facilitate the live stream control of the live audience terminal based on the target live stream, the copy live stream and the preset live stream switching logic, and therefore, the butt joint development cost of the transmission service terminal and the third-party CDN can be saved while the push stream efficiency is improved.
In order to facilitate better implementation of the method for controlling the playing of the live video provided by the embodiment of the application, the embodiment of the application also provides a device for controlling the playing of the live video based on the method for controlling the playing of the live video. The meaning of the noun is the same as that in the above-mentioned playing control method of the live video, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a play control device for live video according to an embodiment of the present application, where the play control device for live video includes a first play control device and a second play control device, the first play control device is applied to a live server, and the first play control device includes:
An obtaining unit 301, configured to obtain user information of a live audience in response to an event that the live audience enters a target live room;
The first control unit 302 is configured to control, based on the user information, the first CDN platform to establish a connection with the live server and a live audience terminal of the live audience, respectively;
A second control unit 303, configured to send, through the first CDN platform, a target live stream to the live audience terminal, so that a live video corresponding to the target live stream is displayed on a live interface provided by the live audience terminal;
a first receiving unit 304, configured to receive a live stream video request sent by a second CDN platform, where the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
a third control unit 305, configured to control the second CDN platform to establish a connection with the live server and the live audience respectively, and trigger the second CDN platform to allocate a target CDN node for the live audience;
the first sending unit 306 is configured to send, based on the live stream video request, a replicated live stream of the target live stream to the second CDN platform, and send, by using the second CDN platform, the replicated live stream to the live audience, so that the live audience performs live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic.
In some embodiments, the first play control device includes:
and the first sending subunit is used for sending the user information of the live audience to the second CDN platform so as to trigger the second CDN platform to allocate a target CDN node for the live audience terminal based on the user IP address information.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
and the first processing subunit is used for continuously sending the target live stream to the live audience terminal through the first CDN platform if a live stream pulling failure result returned by the second CDN platform is received, so that live videos corresponding to the target live stream are displayed on a live interface provided by the live audience terminal.
In some embodiments, the first play control device includes:
And the second processing subunit is used for continuously sending the target live stream to the live audience terminal through the first CDN platform if the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is received, so that live videos corresponding to the target live stream are displayed on a live interface provided by the live audience terminal.
In some embodiments, the first play control device includes:
The first receiving subunit is used for receiving the live stream forwarding rate sent by the second CDN platform;
And the management subunit is used for managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold value.
In some embodiments, the first play control device includes:
And the first control subunit is used for controlling each CDN node in the second CDN platform to be in pause use if the live broadcast stream forwarding rate is lower than a first preset threshold, controlling a server of the second CDN platform to establish connection with a live broadcast audience terminal, and triggering the server of the second CDN platform to send the copy live broadcast stream to the live broadcast audience terminal so that the live broadcast audience terminal can conduct live broadcast stream control based on the target live broadcast stream and the copy live broadcast stream and a preset live broadcast stream switching logic.
And the first control subunit is further configured to control the second CDN platform to establish connection with the live server and the live audience terminal, respectively, and trigger the second CDN platform to allocate a target CDN node to the live audience terminal if the live stream forwarding rate is higher than a first preset threshold.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a play control device for live video according to an embodiment of the present application, where the play control device for live video includes a first play control device and a second play control device, the second play control device is applied to a live audience, and the second play control device includes:
a second sending unit 401, configured to send user information of a live audience to a live broadcast server;
a second receiving unit 402, configured to receive a target live stream sent by the live server through the first CDN platform;
a display unit 403, configured to display a live video corresponding to the target live stream on a live interface provided by the live audience terminal;
a third sending unit 404, configured to send a live stream address of the target live stream to a second CDN platform;
a third receiving unit 405, configured to receive, through the second CDN platform, a target CDN node configured for the live audience, and a transmitted replicated live stream, where the replicated live stream is a live stream determined based on the target live stream;
and a fourth control unit 406, configured to perform live stream control based on the target live stream, the replicated live stream, and a preset live stream switching logic.
In some embodiments, the second play control device includes:
And the second control subunit is used for carrying out live stream control based on the first decoding time stamp of the target live stream and the second decoding time stamp of the copied live stream and preset live stream switching logic.
In some embodiments, the second play control device includes:
A determining subunit, configured to perform a timestamp comparison on the first decoding timestamp and the second decoding timestamp, and determine a key frame position within a specified frame number between the first decoding timestamp and the second decoding timestamp;
And the third processing subunit is used for performing live stream switching operation based on the key frame position so as to switch the live video corresponding to the target live stream to the live video corresponding to the copy live stream on a live interface provided by the live audience terminal.
In some embodiments, the second play control device includes:
And the acquisition subunit is used for acquiring the user identification information and the user IP address information of the live audience.
The embodiment of the application discloses a play control device of a live video, which is used for responding to an event that a live audience enters a target live room by an acquisition unit 301 to acquire user information of the live audience; the first control unit 302 controls the first CDN platform to establish a connection with the live server and a live audience terminal of the live audience, respectively, based on the user information; the second control unit 303 sends a target live stream to the live audience terminal through the first CDN platform so as to display a live video corresponding to the target live stream on a live interface provided by the live audience terminal; the first receiving unit 304 receives a live stream video request sent by a second CDN platform, where the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live viewer; the third control unit 305 controls the second CDN platform to establish a connection with the live server and the live audience respectively, and triggers the second CDN platform to allocate a target CDN node for the live audience; the first sending unit 306 sends, based on the live stream video request, a replicated live stream of the target live stream to the second CDN platform, and sends, by using the second CDN platform, the replicated live stream to the live audience, so that the live audience performs live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic. According to the embodiment of the application, the target live stream is sent to the live audience terminal through the first CDN platform so as to display the live video corresponding to the target live stream on the live interface provided by the live audience terminal, meanwhile, the copy live stream is sent to the live audience terminal through the target CDN node configured for the live audience terminal through the second CDN platform so as to facilitate the live stream control of the live audience terminal based on the target live stream, the copy live stream and the preset live stream switching logic, and therefore, the butt joint development cost of the transmission service terminal and the third-party CDN can be saved while the push stream efficiency is improved.
Correspondingly, the embodiment of the application also provides a computer device which can be a terminal or a server, wherein the terminal can be a terminal device such as a smart phone, a tablet personal computer, a notebook computer, a touch screen, a game console, a personal computer (PC, personal Computer), a personal digital assistant (personal DIGITAL ASSISTANT, PDA) and the like. Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer readable storage media, and a computer program stored on the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 501 is a control center of the computer device 500, connects various parts of the entire computer device 500 using various interfaces and lines, and performs various functions of the computer device 500 and processes data by running or loading software programs and/or modules stored in the memory 502, and calling data stored in the memory 502, thereby performing overall monitoring of the computer device 500.
In the embodiment of the present application, the processor 501 in the computer device 500 loads the instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 executes the application programs stored in the memory 502, so as to implement various functions:
responding to an event that a live audience enters a target live broadcast room, and acquiring user information of the live audience;
based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience;
A target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal;
receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
Controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
based on the live stream video request, transmitting a copy live stream of the target live stream to the second CDN platform, and transmitting the copy live stream to the live audience terminal through a target CDN node configured by the second CDN platform for the live audience terminal, so that the live audience terminal can perform live stream control based on the target live stream, the copy live stream and preset live stream switching logic.
In one embodiment, the user information of the live audience includes user identification information and user IP address information.
In an embodiment, after controlling the second CDN platform to establish a connection with the live server and the live audience respectively, the method further includes:
And sending the user information of the live audience to the second CDN platform so as to trigger the second CDN platform to distribute target CDN nodes for the live audience terminal based on the user IP address information.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
If a live stream pulling failure result returned by the second CDN platform is received, continuously sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
if the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is received, the target live stream is continuously sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
receiving a live stream forwarding rate sent by the second CDN platform;
and managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold.
In an embodiment, the managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold includes:
if the live broadcast stream forwarding rate is lower than a first preset threshold, controlling each CDN node in the second CDN platform to pause use, controlling a server of the second CDN platform to establish connection with a live broadcast audience terminal, and triggering the server of the second CDN platform to send the copy live broadcast stream to the live broadcast audience terminal so that the live broadcast audience terminal can conduct live broadcast stream control based on the target live broadcast stream and the copy live broadcast stream and preset live broadcast stream switching logic.
And if the live stream forwarding rate is higher than a first preset threshold, controlling the second CDN platform to respectively establish connection with the live server and the live audience terminal, and triggering the second CDN platform to allocate a target CDN node for the live audience terminal.
In an embodiment, a method for controlling playing of live video is applied to a live audience, and includes:
transmitting user information of live audience to a live server;
receiving a target live stream sent by the live broadcast server through a first CDN platform;
Displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
a live stream address of the target live stream sent to a second CDN platform;
Receiving a target CDN node configured for the live audience terminal through the second CDN platform and a transmitted copy live stream, wherein the copy live stream is a live stream determined based on the target live stream;
And performing live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
In an embodiment, the performing live stream control based on the target live stream, the replicated live stream, and a preset live stream switching logic includes:
And performing live stream control based on the first decoding time stamp of the target live stream, the second decoding time stamp of the copied live stream and preset live stream switching logic.
In an embodiment, the performing the live stream control based on the decoding timestamp of the target live stream and the decoding timestamp of the replicated live stream, and a preset live stream switching logic includes:
performing timestamp comparison on the first decoding timestamp and the second decoding timestamp, and determining a key frame position in a designated frame number between the first decoding timestamp and the second decoding timestamp;
And performing live stream switching operation based on the key frame position so as to switch live video corresponding to the target live stream to live video corresponding to the copy live stream on a live interface provided by the live audience terminal.
In an embodiment, before sending the user information of the live audience to the live server, the method further comprises:
and acquiring user identification information and user IP address information of the live audience.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 6, the computer device 500 further includes: a touch display screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. The processor 501 is electrically connected to the touch display 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 6 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The touch display screen 503 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 501, and can receive commands from the processor 501 and execute them. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 501 to determine the type of touch event, and the processor 501 then provides a corresponding visual output on the display panel based on the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 503 to realize the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch sensitive display 503 may also implement an input function as part of the input unit 506.
In an embodiment of the present application, a graphical user interface is generated on touch screen 503 by processor 501 executing a gaming application. The touch display screen 503 is used for presenting a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface.
The radio frequency circuitry 504 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
The audio circuitry 505 may be used to provide an audio interface between a user and a computer device through speakers, microphones, and so on. The audio circuit 505 may transmit the received electrical signal after audio data conversion to a speaker, and convert the electrical signal into a sound signal for output by the speaker; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 505 and converted into audio data, which are processed by the audio data output processor 501 for transmission to, for example, another computer device via the radio frequency circuit 504, or which are output to the memory 502 for further processing. The audio circuit 505 may also include an ear bud jack to provide communication of the peripheral ear bud with the computer device.
The input unit 506 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 507 is used to power the various components of the computer device 500. Alternatively, the power supply 507 may be logically connected to the processor 501 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 507 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 6, the computer device 500 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the above, the computer device provided in this embodiment obtains user information of a live audience by responding to an event that the live audience enters a target live room; then, based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience; then, a target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal; then, receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal; then, the second CDN platform is controlled to be respectively connected with the live broadcast server and the live broadcast audience terminal, and the second CDN platform is triggered to distribute target CDN nodes for the live broadcast audience terminal; and finally, based on the live stream video request, transmitting the copied live stream of the target live stream to the second CDN platform, and transmitting the copied live stream to the live audience terminal through a target CDN node configured for the live audience terminal by the second CDN platform, so that the live audience terminal can conveniently perform live stream control based on the target live stream, the copied live stream and preset live stream switching logic. According to the embodiment of the application, the target live stream is sent to the live audience terminal through the first CDN platform so as to display the live video corresponding to the target live stream on the live interface provided by the live audience terminal, meanwhile, the copy live stream is sent to the live audience terminal through the target CDN node configured for the live audience terminal through the second CDN platform so as to facilitate the live stream control of the live audience terminal based on the target live stream, the copy live stream and the preset live stream switching logic, and therefore, the butt joint development cost of the transmission service terminal and the third-party CDN can be saved while the push stream efficiency is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer readable storage medium storing a plurality of computer programs capable of being loaded by a processor to execute steps in any one of the play control methods for live video provided by the embodiment of the present application. For example, the computer program may perform the steps of:
responding to an event that a live audience enters a target live broadcast room, and acquiring user information of the live audience;
based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience;
A target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal;
receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
Controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
based on the live stream video request, transmitting a copy live stream of the target live stream to the second CDN platform, and transmitting the copy live stream to the live audience terminal through a target CDN node configured by the second CDN platform for the live audience terminal, so that the live audience terminal can perform live stream control based on the target live stream, the copy live stream and preset live stream switching logic.
In one embodiment, the user information of the live audience includes user identification information and user IP address information.
In an embodiment, after controlling the second CDN platform to establish a connection with the live server and the live audience respectively, the method further includes:
And sending the user information of the live audience to the second CDN platform so as to trigger the second CDN platform to distribute target CDN nodes for the live audience terminal based on the user IP address information.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
If a live stream pulling failure result returned by the second CDN platform is received, continuously sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
if the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is received, the target live stream is continuously sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal.
In an embodiment, after sending the replicated live stream of the target live stream to the second CDN platform based on the live stream video request, the method further includes:
receiving a live stream forwarding rate sent by the second CDN platform;
and managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold.
In an embodiment, the managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold includes:
if the live broadcast stream forwarding rate is lower than a first preset threshold, controlling each CDN node in the second CDN platform to pause use, controlling a server of the second CDN platform to establish connection with a live broadcast audience terminal, and triggering the server of the second CDN platform to send the copy live broadcast stream to the live broadcast audience terminal so that the live broadcast audience terminal can conduct live broadcast stream control based on the target live broadcast stream and the copy live broadcast stream and preset live broadcast stream switching logic.
And if the live stream forwarding rate is higher than a first preset threshold, controlling the second CDN platform to respectively establish connection with the live server and the live audience terminal, and triggering the second CDN platform to allocate a target CDN node for the live audience terminal.
In an embodiment, a method for controlling playing of live video is applied to a live audience, and includes:
transmitting user information of live audience to a live server;
receiving a target live stream sent by the live broadcast server through a first CDN platform;
Displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
a live stream address of the target live stream sent to a second CDN platform;
Receiving a target CDN node configured for the live audience terminal through the second CDN platform and a transmitted copy live stream, wherein the copy live stream is a live stream determined based on the target live stream;
And performing live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
In an embodiment, the performing live stream control based on the target live stream, the replicated live stream, and a preset live stream switching logic includes:
And performing live stream control based on the first decoding time stamp of the target live stream, the second decoding time stamp of the copied live stream and preset live stream switching logic.
In an embodiment, the performing the live stream control based on the decoding timestamp of the target live stream and the decoding timestamp of the replicated live stream, and a preset live stream switching logic includes:
performing timestamp comparison on the first decoding timestamp and the second decoding timestamp, and determining a key frame position in a designated frame number between the first decoding timestamp and the second decoding timestamp;
And performing live stream switching operation based on the key frame position so as to switch live video corresponding to the target live stream to live video corresponding to the copy live stream on a live interface provided by the live audience terminal.
In an embodiment, before sending the user information of the live audience to the live server, the method further comprises:
and acquiring user identification information and user IP address information of the live audience.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because of the computer program stored in the storage medium, user information of the live audience can be obtained by responding to an event that the live audience enters a target live room; then, based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience; then, a target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal; then, receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal; then, the second CDN platform is controlled to be respectively connected with the live broadcast server and the live broadcast audience terminal, and the second CDN platform is triggered to distribute target CDN nodes for the live broadcast audience terminal; and finally, based on the live stream video request, transmitting the copied live stream of the target live stream to the second CDN platform, and transmitting the copied live stream to the live audience terminal through a target CDN node configured for the live audience terminal by the second CDN platform, so that the live audience terminal can conveniently perform live stream control based on the target live stream, the copied live stream and preset live stream switching logic. According to the embodiment of the application, the target live stream is sent to the live audience terminal through the first CDN platform so as to display the live video corresponding to the target live stream on the live interface provided by the live audience terminal, meanwhile, the copy live stream is sent to the live audience terminal through the target CDN node configured for the live audience terminal through the second CDN platform so as to facilitate the live stream control of the live audience terminal based on the target live stream, the copy live stream and the preset live stream switching logic, and therefore, the butt joint development cost of the transmission service terminal and the third-party CDN can be saved while the push stream efficiency is improved.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The foregoing describes in detail a method, an apparatus, a computer device and a storage medium for controlling playing of live video according to the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present disclosure, where the descriptions of the foregoing embodiments are only used to help understand the technical solutions of the present disclosure and core ideas thereof; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims (15)

1. The play control method of the live video is characterized by being applied to a live server and comprising the following steps of:
responding to an event that a live audience enters a target live broadcast room, and acquiring user information of the live audience;
based on the user information, controlling a first CDN platform to respectively establish connection with the live broadcast server and a live broadcast audience terminal of the live broadcast audience;
A target live stream is sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal;
receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
Controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal, and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
based on the live stream video request, transmitting a copy live stream of the target live stream to the second CDN platform, and transmitting the copy live stream to the live audience terminal through a target CDN node configured by the second CDN platform for the live audience terminal, so that the live audience terminal can perform live stream control based on the target live stream, the copy live stream and preset live stream switching logic.
2. The play control method of live video as claimed in claim 1, wherein the user information of the live audience includes user identification information and user IP address information.
3. The method for controlling playing of live video according to claim 2, further comprising, after controlling the second CDN platform to establish a connection with the live server and the live viewer side, respectively:
And sending the user information of the live audience to the second CDN platform so as to trigger the second CDN platform to distribute target CDN nodes for the live audience terminal based on the user IP address information.
4. The method for controlling playing of live video according to claim 1, further comprising, after transmitting the replicated live stream of the target live stream to the second CDN platform based on the live stream video request:
If a live stream pulling failure result returned by the second CDN platform is received, continuously sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal.
5. The method for controlling playing of live video according to claim 1, further comprising, after transmitting the replicated live stream of the target live stream to the second CDN platform based on the live stream video request:
if the prompt information of the target CDN live stream forwarding failure result returned by the second CDN platform is received, the target live stream is continuously sent to the live audience terminal through the first CDN platform so that live videos corresponding to the target live stream can be displayed on a live interface provided by the live audience terminal.
6. The method for controlling playing of live video according to claim 1, further comprising, after transmitting the replicated live stream of the target live stream to the second CDN platform based on the live stream video request:
receiving a live stream forwarding rate sent by the second CDN platform;
and managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold.
7. The method for controlling playing of live video according to claim 6, wherein managing each CDN node in the second CDN platform based on the live stream forwarding rate and a preset threshold includes:
If the live broadcast stream forwarding rate is lower than a first preset threshold, controlling each CDN node in the second CDN platform to pause use, controlling a server of the second CDN platform to establish connection with a live broadcast audience terminal, and triggering the server of the second CDN platform to send the copy live broadcast stream to the live broadcast audience terminal so that the live broadcast audience terminal can perform live broadcast stream control based on the target live broadcast stream and the copy live broadcast stream and preset live broadcast stream switching logic;
And if the live stream forwarding rate is higher than a first preset threshold, controlling the second CDN platform to respectively establish connection with the live server and the live audience terminal, and triggering the second CDN platform to allocate a target CDN node for the live audience terminal.
8. The play control method of the live video is characterized by being applied to a live audience side and comprising the following steps of:
transmitting user information of live audience to a live server;
receiving a target live stream sent by the live broadcast server through a first CDN platform;
Displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
a live stream address of the target live stream sent to a second CDN platform;
Receiving a target CDN node configured for the live audience terminal through the second CDN platform and a transmitted copy live stream, wherein the copy live stream is a live stream determined based on the target live stream;
And performing live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
9. The method for controlling playing of live video according to claim 8, wherein the performing live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic includes:
And performing live stream control based on the first decoding time stamp of the target live stream, the second decoding time stamp of the copied live stream and preset live stream switching logic.
10. The method for controlling playing of live video according to claim 9, wherein the performing live stream control based on the decoding timestamp of the target live stream and the decoding timestamp of the replicated live stream, and a preset live stream switching logic includes:
performing timestamp comparison on the first decoding timestamp and the second decoding timestamp, and determining a key frame position in a designated frame number between the first decoding timestamp and the second decoding timestamp;
And performing live stream switching operation based on the key frame position so as to switch live video corresponding to the target live stream to live video corresponding to the copy live stream on a live interface provided by the live audience terminal.
11. The play control method of live video as claimed in claim 8, further comprising, before transmitting the user information of the live audience to the live server:
and acquiring user identification information and user IP address information of the live audience.
12. A play control device of live video, which is applied to a live server, and comprises:
the acquisition unit is used for responding to the event that the live audience enters the target live broadcasting room and acquiring the user information of the live audience;
the first control unit is used for controlling the first CDN platform to be respectively connected with the live broadcast server and the live broadcast audience terminal of the live broadcast audience based on the user information;
The second control unit is used for sending a target live stream to the live audience terminal through the first CDN platform so as to display live videos corresponding to the target live stream on a live interface provided by the live audience terminal;
The first receiving unit is used for receiving a live stream video request sent by a second CDN platform, wherein the live stream video request is determined by the second CDN platform based on a live stream address of the target live stream sent by the live audience terminal;
the third control unit is used for controlling the second CDN platform to respectively establish connection with the live broadcast server and the live broadcast audience terminal and triggering the second CDN platform to distribute target CDN nodes for the live broadcast audience terminal;
The first sending unit is configured to send, based on the live stream video request, a replicated live stream of the target live stream to the second CDN platform, and send, through the target CDN node configured by the second CDN platform for the live viewer, the replicated live stream to the live viewer, so that the live viewer performs live stream control based on the target live stream and the replicated live stream, and a preset live stream switching logic.
13. The utility model provides a broadcast controlling means of live video which characterized in that is applied to live audience end, includes:
the second sending unit is used for sending the user information of the live audience to the live broadcast server;
the second receiving unit is used for receiving the target live stream sent by the live server through the first CDN platform;
The display unit is used for displaying the live video corresponding to the target live stream on a live interface provided by the live audience terminal;
A third sending unit, configured to send a live stream address of the target live stream to a second CDN platform;
A third receiving unit, configured to receive, through the second CDN platform, a target CDN node configured for the live audience, and a transmitted replicated live stream, where the replicated live stream is a live stream determined based on the target live stream;
And the fourth control unit is used for carrying out live stream control based on the target live stream, the copied live stream and a preset live stream switching logic.
14. A computer device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor implements a method of controlling the play of live video as claimed in any one of claims 1 to 11.
15. A computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a play control method of live video as claimed in any one of claims 1 to 11.
CN202410084698.3A 2024-01-19 2024-01-19 Live video playing control method and device, computer equipment and storage medium Pending CN117896555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410084698.3A CN117896555A (en) 2024-01-19 2024-01-19 Live video playing control method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410084698.3A CN117896555A (en) 2024-01-19 2024-01-19 Live video playing control method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117896555A true CN117896555A (en) 2024-04-16

Family

ID=90648700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410084698.3A Pending CN117896555A (en) 2024-01-19 2024-01-19 Live video playing control method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117896555A (en)

Similar Documents

Publication Publication Date Title
JP6976410B2 (en) Communication methods, devices and systems on live relay channels
US20150019694A1 (en) Method for Screen Sharing, Related Device, and Communications System
CN111225230B (en) Management method and related device for network live broadcast data
CN111866433B (en) Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
CN105072190A (en) Method and system for realizing real-time desktop cloud
CN110633151A (en) Method, device and storage medium for balancing distributed message issuing cluster partitions
CN110996134A (en) Video playing method, device and storage medium
CN109561320B (en) Server switching method, device, equipment and medium
CN108900855B (en) Live content recording method and device, computer readable storage medium and server
CN112245904B (en) Method, system, storage medium and computer device for supporting cross-service game
CN112311874B (en) Media data processing method and device, storage medium and electronic equipment
KR102615710B1 (en) Transmission method, transmission processing method, and related devices for multicast service
CN112399190A (en) Audio and video data acquisition method and device
JP2021505081A (en) Video transmission methods, video transmission equipment, and video transmission systems, as well as computer-readable storage media
CN113114688A (en) Multimedia conference management method and device, storage medium and electronic equipment
KR20150006500A (en) Operating Method For Nearby Function and Electronic Device supporting the same
WO2018161788A1 (en) Multimedia data sharing method and device
CN110166834B (en) Data playing method, device and storage medium
CN117896555A (en) Live video playing control method and device, computer equipment and storage medium
WO2015156476A1 (en) Device for transmitting and receiving seamless stream on basis of chunk, and method therefor
CN114143569B (en) Webpage recording and live broadcasting method and system
CN112188245B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN113996058B (en) Information processing method, apparatus, electronic device, and computer-readable storage medium
CN116827924B (en) Data scheduling method, device, equipment and storage medium
CN114745571B (en) Live state information synchronization method and device, electronic equipment and readable storage medium

Legal Events

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