Method and device for acquiring live video stream

Through the load balancing service, the pressure value of each live broadcast service is obtained in real time, the live broadcast service with the smallest pressure value is selected as the target service, the target address is generated and sent to the terminal, which solves the problem of the upper limit of the HLS live broadcast concurrency and achieves high concurrency rate and stability .

CN119402680APending Publication Date: 2025-02-07ZHEJIANG HUACHUANG VISION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411605138.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

There is a problem of the upper limit of concurrency in HLS live broadcast. The ability of a single meeting and a single source station is not enough to cope with the live broadcast requirements above the 10,000-way level. There is an upper limit on the CDN hit rate, which cannot guarantee the consistency of M3U8 and TS files generated by different source stations.

Method used

The load balancing service obtains the pressure values ​​of each live broadcast service at preset time intervals, selects the live broadcast service with the lowest current pressure value as the target live broadcast service, generates a target address and sends it to the target terminal, so that it can obtain the live video stream through the target address.

Benefits of technology

It realizes dynamic selection of the optimal live broadcast service, ensures the stability and fluency of video streams, improves the concurrency rate of HLS live broadcasts, and avoids the problem of limited live broadcast capabilities caused by the upper limit of a single acceleration domain name.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402680A_ABST
    Figure CN119402680A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a live broadcast video stream obtaining method and device, and the method comprises the steps that a load balancing service obtains a pressure value of each live broadcast service according to a preset time interval, a plurality of pressure values are obtained, a live broadcast system comprises a live broadcast source service and a plurality of live broadcast services, and the plurality of live broadcast services are in communication connection with the live broadcast source service; the load balancing service responds to a first request currently sent by the target terminal, and sends a target address to the target terminal, so that the target terminal obtains the live video stream through the target address; wherein the target address carries a target acceleration domain name, the target acceleration domain name corresponds to a target live broadcast service in the plurality of live broadcast services, each live broadcast service corresponds to one acceleration domain name, and the target live broadcast service is the current live broadcast service with the minimum pressure value in the plurality of live broadcast services. Through the HLS live broadcast method and device, the problem that the concurrency number upper limit exists in HLS live broadcast in the related technology is solved, and the effect of improving the HLS live broadcast concurrency rate is further achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the computer field, and in particular, to a method and device for acquiring a live video stream. Background Art

[0002] HLS (HTTP Live Streaming, a protocol for streaming media transmission) is an adaptive bitrate transmission protocol based on HTTP, which can achieve smooth video playback on different bandwidths and devices. HLS divides the entire video file into small segments and uses M3U8 playlist files to instruct the player to download and play these segments in sequence, so as to achieve fast recovery and adaptive bitrate adjustment when network transmission is interrupted, providing users with a more stable and smooth viewing experience. Therefore, HLS protocol live broadcast is one of the most mature and popular browser plug-in-free live broadcast protocols.

[0003] In order to improve the concurrent capacity of HLS live broadcast, it is generally done by building a live broadcast source station to connect to a general CDN for domain name acceleration. However, with the increase in the number of concurrent live broadcasts, the capacity of a single conference and a single source station is no longer sufficient to meet the needs of live broadcasts above the 10,000-channel level. There is an upper limit to the CDN hit rate. When the HLS live broadcast concurrency is too high, a single conference and a single source station will become a system bottleneck. At the same time, due to the characteristics of HLS live broadcast, the consistency of M3U8 and TS files generated by different source stations cannot be guaranteed, making it impossible for multiple source stations in a single conference to connect to the same CDN.

[0004] There is currently no effective solution to the above problems. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for acquiring a live video stream, so as to at least solve the problem of an upper limit on the number of concurrent broadcasts in HLS live broadcast in the related art.

[0006] According to an embodiment of the present invention, a method for obtaining a live video stream is provided, comprising: a load balancing service obtains stress values ​​of each live service at preset time intervals to obtain multiple stress values, wherein the live broadcast system comprises a live broadcast source service and multiple live broadcast services, and the multiple live broadcast services are respectively communicated with the live broadcast source service; the load balancing service sends a target address to the target terminal in response to a first request currently sent by a target terminal, so that the target terminal obtains the live video stream through the target address; wherein the target address carries a target acceleration domain name, the target acceleration domain name corresponds to a target live broadcast service among the multiple live broadcast services, each of the live broadcast services corresponds to an acceleration domain name, and the target live broadcast service is the live broadcast service with the smallest current stress value among the multiple live broadcast services.

[0007] In an exemplary embodiment, the load balancing service obtains the stress value of each live broadcast service at a preset time interval to obtain multiple stress values, including: the load balancing service obtains the acceleration domain name of each live broadcast service to obtain multiple acceleration domain names, wherein each live broadcast service is pre-configured with a corresponding acceleration domain name; the load balancing service traverses the pressure value query interface of the corresponding live broadcast service through each acceleration domain name at the preset time interval to obtain the multiple stress values.

[0008] In an exemplary embodiment, before sending the target address to the target terminal, the method also includes: the load balancing service obtains the current pressure value of each of the live broadcast services to obtain multiple pressure values; the load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service; the load balancing service determines the target address based on the target acceleration domain name corresponding to the target live broadcast service.

[0009] In an exemplary embodiment, the load balancing service determines the target address based on the target acceleration domain name corresponding to the target live broadcast service, including: the load balancing service parses the live broadcast address path from the first request, wherein the live broadcast address path is the address of the live video stream; the load balancing service concatenates the target acceleration domain name with the live broadcast address path to obtain the target address.

[0010] In an exemplary embodiment, after the load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service, the method further includes: the load balancing service increases the pressure value of the target live broadcast service by a preset pressure value.

[0011] In an exemplary embodiment, the target terminal obtains the live video stream through the target address, including: the target live broadcast service responds to a second request sent by the target terminal, pulls the live video stream from the live broadcast source service, and sends the live video stream to the target terminal, wherein the second request is sent to the target live broadcast service through the target acceleration domain name.

[0012] In an exemplary embodiment, the method also includes: the multi-point control unit generates an identity identifier of the online meeting based on the attribute information of the online meeting; the multi-point control unit re-encodes the video screen of the online meeting to generate the live video stream, and sends the live video stream to the live source service; the multi-point control unit uses the domain name of the load balancing service and the identity identifier to generate a live address path of the live video stream.

[0013] According to another embodiment of the present invention, there is provided a device for acquiring a live video stream, comprising: an acquisition module, for acquiring a pressure value of each live broadcast service at a preset time interval to obtain a plurality of pressure values, wherein the live broadcast system comprises a live broadcast source service and a plurality of live broadcast services, and the plurality of live broadcast services are respectively communicated with the live broadcast source service; a response module, for sending a target address to the target terminal in response to a first request currently sent by the target terminal, so that the target terminal acquires the live video stream through the target address; wherein the target address carries a target acceleration domain name, the target acceleration domain name corresponds to a target live broadcast service among the plurality of live broadcast services, each of the live broadcast services corresponds to an acceleration domain name, and the target live broadcast service is the live broadcast service with the smallest current pressure value among the plurality of live broadcast services.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0015] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0017] Through the present invention, the load balancing service obtains the pressure value of each live broadcast service in real time at a preset time interval. When receiving the first request for obtaining the live video stream sent by the target terminal, the live broadcast service with the smallest current pressure value is selected as the target live broadcast service according to the current pressure value of each live broadcast service, thereby obtaining the target address according to the target live broadcast service, and sending the target address to the target terminal, so that the target terminal can use the target address to pull the live video stream.

[0018] Since the live broadcast system includes a live broadcast source service and multiple live broadcast services, the multiple live broadcast services are respectively connected to the live broadcast source service in communication, and each live broadcast service corresponds to an acceleration domain name, so that a single conference and a single live broadcast source station can be connected to multiple acceleration domain names, ensuring that when the live broadcast concurrency is too high, the live broadcast capacity will not be limited due to the upper limit of a single acceleration domain name; and multiple acceleration domain names correspond to multiple completely identical live broadcast source stations, avoiding the problem that multiple source stations of a single conference cannot be connected to the same acceleration domain name due to the inability to ensure the consistency of M3U8 and TS files generated by different source stations. Therefore, the problem of the upper limit of the number of concurrent HLS live broadcasts in the related technology can be solved, and the effect of improving the concurrency rate of HLS live broadcasts can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a hardware structure block diagram of a mobile terminal according to a method for acquiring a live video stream according to an embodiment of the present invention;

[0020] Figure 2 is a flowchart of a method for acquiring a live video stream according to an embodiment of the present invention;

[0021] Figure 3 is a structural diagram of a video conferencing and live broadcasting system according to an embodiment of the present invention;

[0022] Figure 4 is a structural block diagram of a device for acquiring a live video stream according to an embodiment of the present invention; DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0025] The load balancing service, target terminal, live broadcast service, and multi-point control unit in the method embodiment provided in the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking running on a computing device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for acquiring a live video stream according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0026] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for obtaining live video streams in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0028] In this embodiment, a method running on the above network architecture is provided. Figure 2 is a flow chart of a method for acquiring a live video stream according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0029] Step S202, the load balancing service obtains the pressure value of each live broadcast service at a preset time interval to obtain multiple pressure values, wherein the live broadcast system includes a live broadcast source service and multiple live broadcast services, and the multiple live broadcast services are respectively connected to the live broadcast source service in communication;

[0030] The load balancing service can be a balancer used to balance the load on each live broadcast service. The live broadcast service and live broadcast source service can be services deployed on a single live broadcast service source station, wherein multiple live broadcast services are respectively connected to the live broadcast source service in communication, and the multiple live broadcast services are exactly the same, so that the video stream TS file slicing is only completed on the live broadcast service, i.e., the source station, and no slicing is done on the live broadcast source service. Only one TS file slicing is performed on the entire live broadcast data stream, thereby greatly reducing the delay of the HLS live broadcast picture. The pressure value can be an indicator for measuring the load of each live broadcast service, such as the number of servers connected to the live broadcast service to pull the live video stream. Or the data traffic generated by the live broadcast service, the pressure value can be returned to the load balancing service in real time through the HLS protocol, wherein the more servers connected to the live broadcast service to pull the live video stream, the greater the pressure value of the live broadcast service, or the greater the data traffic generated by the live broadcast service, the greater the pressure value of the live broadcast service; the above-mentioned preset time interval can be set according to actual conditions, such as 30 seconds, 1 minute, 2 minutes, etc.; the load balancing service obtains the pressure value of each live broadcast service at the preset time interval, which is conducive to real-time monitoring and adjustment of the load situation of each live broadcast service, avoiding system crash or insufficient performance, and ensuring system stability and performance.

[0031] Step S204, the load balancing service sends a target address to the target terminal in response to the first request currently sent by the target terminal, so that the target terminal obtains the live video stream through the target address; wherein the target address carries a target acceleration domain name, and the target acceleration domain name corresponds to a target live service among the multiple live services, and each of the live services corresponds to an acceleration domain name, and the target live service is the live service with the smallest current pressure value among the multiple live services.

[0032] The above-mentioned target terminal can be a device used by users to obtain live video streams, such as mobile phones, tablets, computers, etc.; the above-mentioned target live broadcast service can be a live broadcast service with the smallest pressure value in the current time interval among multiple live broadcast services; the above-mentioned target acceleration domain name can be an acceleration domain name corresponding to the target live broadcast service, wherein each live broadcast service corresponds to an acceleration domain name, and the acceleration domain name can be a CDN (Content Delivery Network) acceleration domain name. Since the CDN acceleration domain name can cache the static resources of the website (such as pictures, videos, CSS, JavaScript, etc.) on CDN nodes distributed around the world, when a user requests to access the website, the nearest CDN node will be automatically selected to provide resources based on the user's geographical location and network conditions. Therefore, by using a CDN acceleration domain name, the concurrency capacity of a single live broadcast service can be improved, the server load can be reduced, and the availability and stability of the website can be improved; at the same time, the access speed can be improved and the delay can be reduced, thereby improving the user experience.

[0033] The above-mentioned first request may refer to a request for a user to obtain a live video stream through a target terminal. The first request may be a request sent by the target terminal to a load balancing service, wherein the above-mentioned first request includes obtaining the live address path for the live video stream, that is, obtaining the original address of the live video stream; the above-mentioned target address may be an address generated by the load balancing server according to the acceleration domain name corresponding to the target live service, that is, obtaining the final address of the live video stream, wherein the target address carries the target acceleration domain name; the above-mentioned live video stream may be a video stream re-encoded and generated by a multi-point control system.

[0034] As an optional implementation, before sending the target address to the target terminal, the method also includes: the load balancing service obtains the current pressure value of each of the live broadcast services to obtain multiple pressure values; the load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service; the load balancing service determines the target address based on the target acceleration domain name corresponding to the target live broadcast service.

[0035] The user sends the first request to obtain the live video stream through the target terminal. The load balancing service responds to the first request currently sent by the target terminal, and based on the current pressure values ​​of multiple live services, determines the live service with the smallest current pressure value among the multiple live services as the target live service; redirects the original address (i.e., live address path) of the live video stream obtained in the first request according to the target acceleration domain name corresponding to the target live service, obtains the target address and sends it to the target terminal, so that the target terminal can use the target address to obtain the live video stream. In this way, the live service that sends the live video stream can be selected according to the current pressure values ​​of multiple live services, ensuring the load balancing of multiple live services, realizing the dynamic selection of the optimal live service, ensuring the stability and smoothness of the video stream, and improving the quality of the live video and user experience.

[0036] Optionally, the target terminal obtains the live video stream through the target address, including: the target live broadcast service responds to the second request sent by the target terminal, pulls the live video stream from the live broadcast source service, and sends the live video stream to the target terminal, wherein the second request is sent to the target live broadcast service through the target acceleration domain name.

[0037] The above second request may be a request for the target terminal to obtain the live video stream, and the second request may be a request sent by the target terminal to the target live service after obtaining the redirected target address; after the target terminal receives the target address sent by the load balancing service, it sends a second request to the target live service to obtain the live video stream, wherein the second request includes the target address; after the target live service receives the second request sent by the target terminal, it pulls the live video stream from the live source service and returns the pulled live video stream to the target terminal. Optionally, the execution subject of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that at least integrates an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0038] Through the above steps, the load balancing service obtains the pressure value of each live service in real time according to the preset time interval. When receiving the first request for obtaining the live video stream sent by the target terminal, according to the current pressure value of each live service, the live service with the smallest current pressure value is selected as the target live service, and the original address of the live video stream is redirected according to the target acceleration domain name corresponding to the target live service, the target address is obtained and sent to the target terminal, so that the target terminal can use the target address to pull the live video stream from the live source service through the target live service, and communicate with the live source service through multiple live services, and each live service corresponds to an acceleration domain name, so that a single conference and a single live source station can be connected to multiple acceleration domain names, ensuring that when the live broadcast concurrency is too high, the live broadcast capacity will not be limited due to the upper limit problem of a single acceleration domain name; and multiple acceleration domain names correspond to exactly the same multiple live source stations, avoiding the problem that multiple source stations of a single conference cannot be connected to the same acceleration domain name due to the inability to ensure the consistency of M3U8 and TS files generated by different source stations. The problem of the upper limit of the number of concurrent HLS live broadcasts in the related technology is solved, and the HLS live broadcast concurrency rate is improved.

[0039] As an optional implementation, the load balancing service obtains the stress value of each live broadcast service at a preset time interval to obtain multiple stress values, including: the load balancing service obtains the acceleration domain name of each live broadcast service to obtain multiple acceleration domain names, wherein each live broadcast service is pre-configured with a corresponding acceleration domain name; the load balancing service traverses the pressure value query interface of the corresponding live broadcast service through each acceleration domain name at the preset time interval to obtain the multiple stress values.

[0040] The preset time interval can be set according to actual conditions, such as 30 seconds, 1 minute, 2 minutes, etc.; the pressure value can be an indicator for measuring the load of each live broadcast service, such as the number of servers connected to the live broadcast service to pull the live video stream, or the data traffic generated by the live broadcast service, etc. The pressure value can be returned to the load balancing service in real time through the HLS protocol, wherein the more servers connected to the live broadcast service to pull the live video stream, the greater the pressure value of the live broadcast service, or the greater the data traffic generated by the live broadcast service, the greater the pressure value of the live broadcast service; the acceleration domain name can be a CDN acceleration domain name, wherein each live broadcast service corresponds to a CDN acceleration domain name, such as hls1.livecast.com plus The source station corresponding to the hls2.livecast.com acceleration domain name is live service 1, and the source station corresponding to the hls2.livecast.com acceleration domain name is live service 2, etc. By configuring the acceleration domain name for each live service, it can be implemented based on CDN acceleration domain names of multiple manufacturers, thereby improving the reliability of the live system; when the load balancing service obtains the current pressure value of each live service within a preset time interval, it obtains the CDN acceleration domain name corresponding to each live service, obtains multiple CDN acceleration domain names, and traverses the pressure value query interface of each live service through multiple CDN acceleration domain names, thereby obtaining the current pressure value of each live service, where the interface access URL can be, for example, http: / / hls1.livecast.com / hlsload. It should be noted that the starting position of the traversal can be randomly selected.

[0041] Optionally, when each live broadcast service returns the pressure value through the HLS protocol, it is necessary to add the HTTP header Cache-Control: no-cache field so that no content should be cached in the request and response. That is, each time the live broadcast service returns the pressure value, it will send the latest pressure value to the load balancing service instead of using the cached pressure value, thereby ensuring the real-time and accuracy of the pressure value, avoiding the misjudgment of the load balancing service, and improving the stability and reliability of the entire live broadcast system.

[0042] As an optional implementation, the load balancing service determines the target address based on the target acceleration domain name corresponding to the target live broadcast service, including: the load balancing service parses the live broadcast address path from the first request, wherein the live broadcast address path is the address of the live video stream; the load balancing service concatenates the target acceleration domain name with the live broadcast address path to obtain the target address.

[0043] The target acceleration domain name may be an acceleration domain name corresponding to a target live broadcast service, wherein the target live broadcast service may be a live broadcast service with the smallest pressure value in the current time interval among multiple live broadcast services; the target address may be an address generated by a load balancing server according to the acceleration domain name corresponding to the target live broadcast service, that is, the final address for obtaining the live video stream, wherein the target address carries the target acceleration domain name; the load balancer parses the original address for obtaining the live video stream (that is, the live broadcast address path) from the first request, concatenates the live broadcast address path with the target acceleration domain name, obtains the target address, and realizes redirection of the live broadcast address path, so that the target terminal can pull the live video stream through the target address.

[0044] As an optional implementation, after the load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service, the method further includes: the load balancing service increases the pressure value of the target live broadcast service by a preset pressure value.

[0045] The above-mentioned preset pressure value can be a measurement for calculating the pressure level of the live broadcast service. The preset pressure value can be set according to actual conditions, such as 1, 2, 3, etc.; after the load balancing service selects the target live broadcast service, it immediately modifies the pressure value of the target live broadcast service and increases the pressure value of the target live broadcast service by the preset pressure value, so that the load balancing service can dynamically adjust the pressure value of the live broadcast service according to the real-time traffic situation to maintain the balance and performance of the system, ensure the accuracy of the live broadcast pressure value, so that the traffic can be effectively distributed to each live broadcast service, avoid the overload of a single live broadcast service, ensure the load balance of each live broadcast service, improve the stability and reliability of the live broadcast service, ensure that users can watch the live broadcast content smoothly, and provide better performance and user experience for the live broadcast service.

[0046] As an optional implementation, the method also includes: the multi-point control unit generates an identity identifier of the online meeting based on the attribute information of the online meeting; the multi-point control unit re-encodes the video screen of the online meeting to generate the live video stream, and sends the live video stream to the live source service; the multi-point control unit uses the domain name of the load balancing service and the identity identifier to generate a live address path of the live video stream.

[0047] The multi-point control unit may be a system for generating a live video stream, such as a conference system for a video conference. The attribute information may be basic information of an online conference, such as the conference number, names of participants, meeting time, and other information of the online conference. The unique identity of the online conference may be generated through the attribute information of the online conference. The re-encoding may be a coding method for obtaining a live video stream based on the original video, so as to better adapt to the needs of network transmission or playback devices. For example, in the process of participating in an online conference, due to the presence of multiple participants, multiple video images and multiple audios may appear in the conference video. In the live video stream provided to the user, only one video image and one audio are allowed to appear. Therefore, by processing the online conference, the video image and audio that need to appear at that time are selected, and the online conference is re-encoded to obtain a live video stream. The multi-point control unit generates a unique identity for representing the online conference according to the attribute information of the online conference. At the same time, the online conference is re-encoded to obtain a live video stream and push it to the live source service, so that the live source service can provide a pull stream service to multiple live services or target terminals, and generate a live address path for obtaining the live video stream according to the domain name and identity of the load balancing service.

[0048] As an optional implementation, Figure 3 is a structural diagram of a video conferencing and live broadcasting system according to an embodiment of the present invention. Figure 3 As shown, the system mainly includes:

[0049] Multipoint control unit: used to generate a unique identity for the live video stream based on the online conference's meeting number and other attribute information; generate the live video stream by re-encoding, and push the live video stream to the live source service using streaming protocols such as HTTPDH, RTMP, and RTSP; at the same time, use the domain name of the load balancing service to generate the live address path (M3U8 address) of the live video stream of the HLS live broadcast, and report it to the conference system; the live address path format can be:

[0050] http: / / slb.livecast.com / live / stream / 238837484831 / index.m3u8;

[0051] Live broadcast system: mainly includes live broadcast source service and multiple live broadcast services, among which,

[0052] Live source service: used to receive HTTPDH push streams from multi-point control units and provide HTTPDH pull stream services to live services;

[0053] Live streaming service: used to receive HLS streaming requests from the target terminal, extract the unique identity of the live video stream from the target address, generate a streaming address to initiate an HTTPDH streaming request to the live source service, and generate an M3U8 and TS file based on the live video stream received by the HTTPDH streaming request, and return it to the target terminal; at the same time, provide a real-time HLS service concurrent pressure value query interface ( / hlsload). It should be noted that when this interface returns the pressure value, the HTTP header Cache-Control:no-cache needs to be added to avoid the CDN acceleration domain name cache pressure value.

[0054] Load balancing service: access the HLS service concurrency pressure value of each live broadcast service through the CDN acceleration domain name at the preset time interval. The interface access URL can be such as: http: / / hls1.livecast.com / hlsload;

[0055] At the same time, the first request (HTTP request for M3U8 file) sent by the target terminal is received,

[0056] Traverse all preset acceleration domain names, randomly select the traversal start position, and select the acceleration domain name with the minimum concurrent pressure value of the current corresponding live broadcast service; modify the target live broadcast service pressure value corresponding to the selected acceleration domain name (target acceleration domain name), and add a pressure value (you can define the preset pressure value added to the source station each time you allocate it, such as the preset pressure value is 1, 2, 3, etc.); parse the path in the first request (that is, the live broadcast address path), add the selected target acceleration domain name to piece together the final target address (CDN's m3u8 live broadcast address path), such as:

[0057] http: / / hls2.livecast.com / live / stream / 238837484831 / index.m3u8; returns the target address to the target terminal (HTTP 302 redirection);

[0058] Target terminal: access the live broadcast system, use the M3U8 address (i.e., video address) corresponding to the domain name of the load balancing service to initiate a first request to the load balancing service; and receive the HTTP 302 redirection returned by the load balancing service, obtain the CDN live broadcast address path (i.e., the target address), and use the final CDN live broadcast address path to pull the HLS live broadcast stream to the live broadcast source service through the target live broadcast service. Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, optical disk), and includes a number of instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0059] In this embodiment, a device for acquiring a live video stream is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0060] Figure 4 is a structural block diagram of a device for acquiring a live video stream according to an embodiment of the present invention. Figure 4 As shown, the device includes: an acquisition module 402, which is used to acquire the pressure value of each live broadcast service at a preset time interval to obtain multiple pressure values, wherein the live broadcast system includes a live broadcast source service and multiple live broadcast services, and the multiple live broadcast services are respectively communicated with the live broadcast source service; a response module 404, which is used to respond to the first request currently sent by the target terminal, and send a target address to the target terminal, so that the target terminal obtains the live video stream through the target address; wherein the target address carries a target acceleration domain name, and the target acceleration domain name corresponds to a target live broadcast service among the multiple live broadcast services, and each of the live broadcast services corresponds to an acceleration domain name, and the target live broadcast service is the live broadcast service with the smallest current pressure value among the multiple live broadcast services.

[0061] In an exemplary embodiment, the device is also used to obtain the acceleration domain name of each of the live broadcast services to obtain multiple acceleration domain names, wherein each of the live broadcast services is pre-configured with a corresponding acceleration domain name; according to the preset time interval, the pressure value query interface of the corresponding live broadcast service is traversed through each acceleration domain name to obtain the multiple pressure values.

[0062] In an exemplary embodiment, the device is also used to obtain the current pressure value of each of the live broadcast services to obtain multiple pressure values; determine the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service; and determine the target address according to the target acceleration domain name corresponding to the target live broadcast service.

[0063] In an exemplary embodiment, the device is also used to parse a live broadcast address path from the first request, wherein the live broadcast address path is the address of the live video stream; and concatenate the target acceleration domain name with the live broadcast address path to obtain the target address.

[0064] In an exemplary embodiment, the apparatus is further configured to increase the pressure value of the target live broadcast service by a preset pressure value.

[0065] In an exemplary embodiment, the target live broadcast service is also used to pull the live video stream from the live broadcast source service and send the live video stream to the target terminal in response to a second request sent by the target terminal, wherein the second request is sent to the target live broadcast service via the target acceleration domain name.

[0066] In an exemplary embodiment, the multi-point control unit is also used to generate an identity identifier of the online meeting based on the attribute information of the online meeting; re-encode the video screen of the online meeting to generate the live video stream, and send the live video stream to the live source service; use the domain name of the load balancing service and the identity identifier to generate a live address path of the live video stream.

[0067] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0068] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0069] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0070] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0071] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0072] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0073] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0074] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for acquiring a live video stream, characterized in that: include: The load balancing service obtains the pressure value of each live broadcast service at a preset time interval to obtain multiple pressure values, wherein the live broadcast system includes a live broadcast source service and multiple live broadcast services, and the multiple live broadcast services are respectively connected to the live broadcast source service in communication; The load balancing service sends a target address to the target terminal in response to the first request currently sent by the target terminal, so that the target terminal obtains the live video stream through the target address; Among them, the target address carries a target acceleration domain name, and the target acceleration domain name corresponds to a target live broadcast service among the multiple live broadcast services. Each of the live broadcast services corresponds to an acceleration domain name, and the target live broadcast service is the live broadcast service with the smallest current pressure value among the multiple live broadcast services.

2. The method according to claim 1, characterized in that The load balancing service obtains the pressure value of each live service at a preset time interval and obtains multiple pressure values, including: The load balancing service obtains the acceleration domain name of each of the live broadcast services to obtain a plurality of acceleration domain names, wherein each of the live broadcast services is pre-configured with a corresponding acceleration domain name; The load balancing service traverses the corresponding pressure value query interface of the live broadcast service through each acceleration domain name at the preset time interval to obtain the multiple pressure values.

3. The method according to claim 1 or 2, characterized in that: Before sending the target address to the target terminal, the method further includes: The load balancing service obtains the current pressure value of each of the live broadcast services to obtain a plurality of pressure values; The load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service; The load balancing service determines the target address according to the target acceleration domain name corresponding to the target live broadcast service.

4. The method according to claim 3, characterized in that The load balancing service determines the target address according to the target acceleration domain name corresponding to the target live broadcast service, including: The load balancing service parses the first request to obtain a live broadcast address path, wherein the live broadcast address path is the address of the live video stream; The load balancing service concatenates the target acceleration domain name with the live broadcast address path to obtain the target address.

5. The method according to claim 3, characterized in that: After the load balancing service determines the live broadcast service corresponding to the smallest pressure value among the multiple pressure values ​​as the target live broadcast service, the method further includes: The load balancing service increases the pressure value of the target live broadcast service by a preset pressure value.

6. The method according to claim 1, characterized in that The target terminal obtains the live video stream through the target address, including: The target live broadcast service responds to the second request sent by the target terminal, pulls the live video stream from the live broadcast source service, and sends the live video stream to the target terminal, wherein the second request is sent to the target live broadcast service through the target acceleration domain name.

7. The method according to claim 6, characterized in that The method further comprises: The multipoint control unit generates an identity identifier of the online conference according to the attribute information of the online conference; The multipoint control unit re-encodes the video screen of the online conference to generate the live video stream, and sends the live video stream to the live source service; The multipoint control unit uses the domain name of the load balancing service and the identity identifier to generate a live address path of the live video stream.

8. A device for acquiring a live video stream, characterized in that: include: An acquisition module, used to acquire the pressure value of each live broadcast service at a preset time interval to obtain multiple pressure values, wherein the live broadcast system includes a live broadcast source service and multiple live broadcast services, and the multiple live broadcast services are respectively connected to the live broadcast source service in communication; A response module, configured to send a target address to the target terminal in response to a first request currently sent by the target terminal, so that the target terminal obtains a live video stream through the target address; Among them, the target address carries a target acceleration domain name, and the target acceleration domain name corresponds to a target live broadcast service among the multiple live broadcast services. Each of the live broadcast services corresponds to an acceleration domain name, and the target live broadcast service is the live broadcast service with the smallest current pressure value among the multiple live broadcast services.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Video stream transmission method and device, storage medium and electronic equipment

    CN121012939A