Video stream acquisition method and device, equipment and storage medium

By evaluating and sending performance health information in the pre-push server, the slow speed problem caused by the playback side pulling video streams from the pre-push server with poor performance is solved, and more efficient video stream acquisition and data transmission is achieved.

CN119562093APending Publication Date: 2025-03-04BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411567447.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When the playback side pulls the video stream from the pre-push server with poor performance, the video stream is pulled slowly and even the playback is stuttering.

Method used

By receiving the authentication request from the playback end in the pre-push server, the performance indicator data and current performance health of the pre-push server are determined, and sent to the playback end, so that the playback end can select the optimal pre-push server to obtain the video stream based on the performance health of multiple pre-push servers.

Benefits of technology

It realizes reasonable allocation of resources to ensure that the player obtains video streams from the pre-push server with the best performance and health, improves the video stream pulling speed and data transmission efficiency, and avoids the problem of slow video stream pulling speed caused by blindly selecting pre-push servers with unknown performance status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562093A_ABST
    Figure CN119562093A_ABST
Patent Text Reader

Abstract

The invention relates to a video stream acquisition method and device, equipment and a storage medium. The method comprises the following steps: in the process that a pre-pushing server caches a video stream sent by a content distribution server, receiving an authentication request sent by a playing end for the video stream; after determining that the authentication is passed based on the authentication request, determining performance index data corresponding to the pre-pushing server according to communication cache data of the pre-pushing server; determining the current performance health degree corresponding to the pre-pushing server according to the performance index data corresponding to the pre-pushing server and the historical performance health degree corresponding to the pre-pushing server; and sending the current performance health degrees corresponding to the pre-pushing servers to the playing end, and selecting one of the pre-pushing servers to acquire the video stream by the playing end according to the current performance health degrees corresponding to the plurality of pre-pushing servers. By providing the current performance health degree, the problem that the video stream pulling speed is low due to the fact that the playing end blindly pulls the video stream from the pre-push server with the unknown performance state can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and storage medium for acquiring a video stream. Background Art

[0002] As a super-large-scale distributed system, the content delivery network (CDN) system has become an Internet infrastructure, and it plays an important role in application scenarios such as live broadcasting. The content delivery network system is mainly used to distribute video streams to the playback end so that the playback end can play. At present, in order to improve the user's viewing experience, a pre-push server cluster can be added to the content delivery network system. When distributing the video stream, the video stream is first distributed to the pre-push server in the pre-push server cluster, and then the playback end pulls the video stream from the pre-push server and plays it. Compared with the playback end, the pre-push server in the pre-push server cluster can use its superior performance and network environment to download and cache the video stream at a faster speed. In this way, the pre-push server plays the role of intermediate pre-caching, which can effectively shorten the time for the playback end to obtain the video stream. Moreover, when facing large-scale user access, the pre-push server cluster can also play a load balancing effect to avoid service interruption problems caused by excessive user request pressure, thereby achieving the purpose of using the pre-push server cluster to provide users with low-latency stable services.

[0003] However, as the pre-push server cluster continues to run, the performance of each pre-push server in the pre-push server cluster will differ, and the playback end cannot know the performance status of each pre-push server. If the playback end pulls the video stream from a pre-push server with poor performance, the video stream will be pulled more slowly, and even playback will be stuck. Summary of the invention

[0004] The present application provides a method, apparatus, device and storage medium for obtaining a video stream, so as to solve the problem that if a playback end pulls the video stream from a pre-pushing server with poor performance, the video stream pulling speed will be slow.

[0005] In view of the above technical problems, the technical solution of this application is solved by the following embodiments:

[0006] An embodiment of the present application provides a method for obtaining a video stream, and the steps performed by each pre-push server include: receiving an authentication request issued by a playback end for the video stream during the process of the pre-push server caching the video stream sent by a content distribution server; after determining that the authentication is passed based on the authentication request, determining performance indicator data corresponding to the pre-push server according to communication cache data of the pre-push server; determining a current performance health corresponding to the pre-push server according to the performance indicator data corresponding to the pre-push server and a historical performance health corresponding to the pre-push server; and sending the current performance health corresponding to the pre-push server to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance healths corresponding to a plurality of the pre-push servers.

[0007] The method of determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server includes: determining the frame interval and the receiving interval between two adjacent frames of video images during the process of the pre-push server receiving the video stream from the content distribution server; wherein the pre-push server caches the received video image into a preset cache space; determining the total cache time corresponding to the cached video stream in the cache space; and determining the downlink performance indicator value corresponding to the pre-push server according to the frame interval, the receiving interval and the total cache time.

[0008] Among them, determining the performance indicator data corresponding to the pre-push server based on the communication cache data of the pre-push server includes: determining the current session connection number and the historical session connection number between the pre-push server and the content distribution server; determining the uplink performance indicator value corresponding to the pre-push server based on the current session connection number and the historical session connection number.

[0009] Wherein, determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server includes: obtaining the number of available network connections and the maximum number of network connections between the pre-push server and the playback end; determining the number of remaining network connections between the pre-push server and the playback end according to the current number of network connections between the pre-push server and the playback end and the number of available network connections; and determining the load performance indicator value corresponding to the pre-push server according to the remaining number of network connections and the maximum number of network connections.

[0010] Wherein, before determining the number of available network connections and the maximum number of network connections between the pre-push server and the playback end, it also includes: in each preset statistical time period of continuous time, querying the number of network connections corresponding to each preset statistical time in the statistical time period; determining the maximum number of network connections in the statistical time period and the average number of network connections in the statistical time period according to the number of network connections corresponding to each statistical time in the statistical time period; determining the maximum number of network connections as the maximum number of network connections used in the next statistical time period, and determining the average number of network connections as the number of available network connections used in the next statistical time period.

[0011] Wherein, the performance indicator data includes: at least one performance indicator value; determining the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server includes: obtaining a weight value corresponding to each of the performance indicator values ​​and obtaining an alpha smoothing coefficient corresponding to the prediction server; determining a weighted average of each of the performance indicator values ​​using the weight value corresponding to each of the performance indicator values; and performing alpha smoothing filtering on the weighted average and the historical performance health using the alpha smoothing coefficient corresponding to the prediction server to obtain the current performance health of the prediction server.

[0012] An embodiment of the present application also provides a method for obtaining a video stream, and the steps executed by the playback end include: sending authentication requests corresponding to the video stream to multiple preset pre-push servers respectively; for each of the pre-push servers, after determining that the pre-push server determines that the authentication is passed based on the authentication request, obtaining the current performance health returned by the pre-push server; and obtaining the video stream from one of the pre-push servers according to the sizes of the current performance healths corresponding to the multiple pre-push servers.

[0013] The method of obtaining the video stream from one of the pre-push servers according to the sizes of current performance health states respectively corresponding to the plurality of pre-push servers comprises: in the process of obtaining the video stream from the current pre-push server, keeping alive the network connections respectively established with the other pre-push servers; if an abnormality in the acquisition of the video stream is detected, selecting the next pre-push server according to the sizes of current performance health states respectively corresponding to the other pre-push servers and continuing to obtain the video stream from the next pre-push server.

[0014] The embodiment of the present application also provides a device for obtaining a video stream, which is arranged on a pre-pushing server and includes: a first receiving module, which is used to receive an authentication request issued by a playback terminal for the video stream in the process of caching the video stream sent by the content distribution server; a first determining module, which is used to determine the performance indicator data corresponding to the pre-pushing server according to the communication cache data of the pre-pushing server after determining that the authentication is passed based on the authentication request; and a second determining module, which is used to send the current performance health corresponding to the pre-pushing server to the playback terminal requesting to play the video stream, so that the playback terminal can determine the performance indicator data corresponding to the pre-pushing server according to the current performance health corresponding to the pre-pushing server. Execute a video stream acquisition task; a first sending module is used to report the current performance health corresponding to the pre-push server to the scheduling service center; the video stream acquisition device is set at the playback end, including: a second sending module is used to send authentication requests corresponding to the video stream to multiple preset pre-push servers respectively; a second receiving module is used for, for each of the pre-push servers, after determining that the pre-push server determines that the authentication is passed based on the authentication request, to obtain the current performance health returned by the pre-push server; a video acquisition module is used to obtain the video stream from one of the pre-push servers according to the size of the current performance health corresponding to the multiple pre-push servers.

[0015] An embodiment of the present application also provides a video stream acquisition device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: execute a connection program of a pre-push server stored in the memory to implement any of the above-mentioned methods for acquiring the video stream executed on the pre-push server, or implement any of the above-mentioned methods for acquiring the video stream executed on the playback end.

[0016] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed to implement any of the above-mentioned methods for obtaining the video stream executed on the pre-push server, or to implement any of the above-mentioned methods for obtaining the video stream executed on the playback end.

[0017] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application can receive an authentication request issued by the playback end for the video stream during the process in which the pre-push server caches the video stream sent by the content distribution server; after determining that the authentication is passed based on the authentication request, determine the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server; determine the current performance health corresponding to the pre-push server according to the performance indicator data corresponding to the pre-push server and the historical performance health corresponding to the pre-push server; send the current performance health corresponding to the pre-push server to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance healths corresponding to multiple pre-push servers. By evaluating the performance health of the pre-push server, the embodiment of the present application can reasonably allocate resources during the content distribution process, so that the player can obtain the video stream from the pre-push server with the best performance health, so that the pre-push server can operate more stably when facing burst traffic and high load, improve the data transmission efficiency and data service quality of the pre-push server, and improve the video stream pulling speed of the playback end, so as to avoid the problem of slow video stream pulling speed caused by the playback end blindly pulling the video stream from the pre-push server with unknown performance status. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0021] Figure 1 is a schematic diagram of the architecture of a content distribution network system according to an embodiment of the present application;

[0022] Figure 2 It is a flowchart of a method for obtaining a video stream applied to a pre-pushing server according to an embodiment of the present application;

[0023] Figure 3A flowchart of the steps for determining the current performance health according to an embodiment of the present application;

[0024] Figure 4 A flowchart of a method for acquiring a video stream applied in a scheduling service center according to an embodiment of the present application;

[0025] Figure 5 A flowchart of a method for obtaining a video stream applied to a playback end according to an embodiment of the present application;

[0026] Figure 6 It is a structural diagram of a video stream acquisition device set in a pre-push server according to an embodiment of the present application;

[0027] Figure 7 It is a structural diagram of a video stream acquisition device arranged at a playback end according to an embodiment of the present application;

[0028] Figure 8 The present invention is a structural diagram of a device for acquiring a video stream according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0030] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0031] The present application embodiment provides a content distribution network system. Figure 1 FIG. 1 is a schematic diagram of the architecture of a content distribution network system according to an embodiment of the present application.

[0032] The content distribution network system includes at least: a content distribution server, a scheduling service center, a pre-push control center, a pre-push server cluster and a client. There are multiple clients. For ease of understanding, the present application embodiment only describes one of the clients. Figure 1 Only one client is shown schematically.

[0033] The pre-push server cluster includes a plurality of pre-push servers, and the plurality of pre-push servers are respectively connected to the pre-push control center.

[0034] The pre-push control center pulls up (starts) all or part of the pre-push servers in the pre-push server cluster according to the currently playable video stream and the current number of online users, and uses each pre-push server pulled up as a cache node (also known as: Rcache node).

[0035] After the cache node is pulled up, the pre-push control center can send the address corresponding to the content distribution server to the cache node, and the cache node connects to the content distribution server and receives traffic from the content distribution server. After that, the cache node connects to the scheduling service center and registers with the scheduling service center. The scheduling service center saves the network address of the cache node and the corresponding video information of the cache node.

[0036] In the pre-pushing server cluster, there are multiple cache nodes that cache the video stream corresponding to the video information at the same time, that is, the content distribution server distributes the video stream corresponding to the same video information to multiple cache nodes at the same time. Video stream refers to continuous frames of video.

[0037] In one embodiment, the user clicks on the video information that he wants to watch on the playback terminal. The video information includes but is not limited to: video name, video picture. The playback terminal sends a playback request to the scheduling service center, and carries the video information in the playback request.

[0038] After receiving the playback request, the scheduling service center sends the network addresses corresponding to the multiple cache nodes corresponding to the video information to the playback end. The playback end receives the network addresses corresponding to the multiple cache nodes returned by the scheduling service center, establishes a network connection with the cache node according to the network address corresponding to each pre-pushing server, and performs an authentication operation on the video stream cached by the cache node. The authentication operation at least includes: determining whether the cache node that has established a network connection has cached the video stream corresponding to the video information; if yes, determining that the authentication is passed; if not, determining that the authentication is not passed.

[0039] After passing the authentication, the cache node determines its current performance health according to its own data cache performance and data transmission performance, and sends its current performance health to the playback end. The playback end selects the cache node with the highest current performance health as the main cache node among the cache nodes that have passed the authentication, and uses the remaining cache nodes as backup cache nodes, and pulls the video stream corresponding to the video information from the selected main cache node and plays it. Furthermore, the playback end maintains the network connection between the backup cache node and the main cache node; if the video stream acquisition is abnormal, such as: the playback end fails to obtain the video stream from the main cache node, or the network connection with the main cache node is disconnected, the backup cache node with the highest performance health is selected as the new main cache node to continue to pull the video stream. In this process, since the playback end maintains the network connection between the backup cache node and the main cache node, the backup cache node can update the current performance health every preset evaluation time period and send it to the playback end. The playback end can implement the main-backup switching according to the updated current performance health of the backup cache node and continue to pull the video stream.

[0040] In another embodiment, each cache node in the pre-push server cluster determines its current performance health according to its own data cache performance and data transmission performance, and sends the determined current performance health to the scheduling service center. The process of determining the current performance health will be described in detail later, so it will not be repeated here.

[0041] The user clicks on the video information he wants to watch on the playback terminal. The video information includes but is not limited to: video name, video picture. The playback terminal sends a playback request to the scheduling service center, and carries the video information in the playback request.

[0042] After receiving the playback request, the scheduling service center determines N cache nodes with higher current performance health among the cache nodes corresponding to the video information, and sends the network addresses and current performance health corresponding to the N cache nodes to the playback end. In this process, the scheduling service center can exclude cache nodes with lower performance health.

[0043] The playback end selects M (M≤N) cache nodes with larger current performance health to establish network connections based on the network addresses and current performance health corresponding to the N cache nodes, and performs authentication operations on the video streams cached by each cache node that has established network connections. The playback end selects one of the cache nodes that have passed the authentication, and pulls the video stream corresponding to the video information from the selected cache node and plays it. Furthermore, if multiple cache nodes have passed the authentication, then among the multiple cache nodes that have passed the authentication, the cache node with the largest performance health is determined as the primary cache node, and the remaining cache nodes are determined as backup cache nodes, and the video stream is pulled from the primary cache node.

[0044] Furthermore, if the video stream acquisition is abnormal, such as: the playback end fails to obtain the video stream from the primary cache node, or the network connection with the primary cache node is disconnected, then according to the current performance health of each backup cache node, the backup cache node with the highest current performance health is selected as the new primary cache node to continue pulling the video stream.

[0045] In the embodiment of the present application, the performance health of the cache node is applied to the process of obtaining the video stream, so that the playback end can obtain the video stream from the cache node with the best performance health, which in turn shortens the acquisition time of the video stream, improves the acquisition efficiency of the video stream, and reduces the delay of the content distribution process. In order to make the video stream acquisition process of the embodiment of the present application easier to understand, the video stream acquisition process of the embodiment of the present application is described in detail below based on the above-mentioned content distribution network system.

[0046] The embodiment of the present application provides a method for obtaining a video stream applied to a pre-pushing server. The pre-pushing server is the cache node mentioned above. Figure 2 , which is a flow chart of a method for obtaining a video stream applied to a pre-push server according to an embodiment of the present application.

[0047] Step S210: In the process of the pre-pushing server caching the video stream sent by the content distribution server, an authentication request for the video stream sent by the playback terminal is received.

[0048] After the playback end obtains the network address corresponding to the pre-push server from the scheduling service center, a network connection is established with the pre-push server based on the network address, and an authentication request is sent to the pre-push server based on the network connection.

[0049] In an embodiment of the present application, the authentication request can be used to request authentication for a video stream cached in a pre-pushing server. The authentication request carries video information corresponding to the video stream. The pre-pushing server queries whether the video information corresponding to the currently cached video stream is the video information carried in the authentication request; if so, it determines that the authentication is passed, and sends an authentication pass message to the playback end; otherwise, it determines that the authentication is not passed, and sends an authentication failure message to the playback end.

[0050] Furthermore, when registering, the pre-push server may send the frame information corresponding to the latest frame received from the content distribution server to the scheduling service center, so that the playback end may also obtain the frame information from the scheduling service center. The frame information may be a frame number and a timestamp. The video information and the frame information are carried in the authentication request. After receiving the authentication request, the pre-push server may first query whether the video information corresponding to the currently cached video stream is the video information carried in the authentication request; if so, then query whether there is a frame corresponding to the frame information in the cached video stream; if so, then determine that the authentication is passed; if not, then determine the time difference between the timestamp of the latest frame received from the content distribution server and the timestamp in the frame information, if the time difference is less than a preset time difference threshold, then determine that the authentication is passed, otherwise, determine that the authentication is not passed. The time difference threshold may be an empirical value or a value obtained through experiments. Generally speaking, the timestamp threshold is a smaller value. Of course, since multiple pre-push servers will cache the video streams corresponding to the same video information, there will be multiple frame information corresponding to the video information in the scheduling service center, and the scheduling service center can only send the latest frame information to the playback end.

[0051] Step S220, after determining that the authentication is passed based on the authentication request, determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server.

[0052] The communication cache data refers to data used to reflect the communication status and cache status of the pre-push server.

[0053] Performance indicator data refers to: indicator values ​​used to measure the performance status of the pre-push server.

[0054] In the embodiment of the present application, after it is determined that the authentication is passed based on the authentication request, the performance indicator data corresponding to the pre-push server is determined according to the communication cache data of the pre-push server.

[0055] Step S230: determining the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server.

[0056] Performance health refers to: an evaluation value used to reflect the performance of the pre-push server. The higher the performance health, the better the performance of the pre-push server, and the more stable and efficient the video stream distribution process. The lower the performance health, the worse the performance of the pre-push server, the less efficient the video stream distribution process, and the more prone to failure.

[0057] The historical performance health may be the performance health corresponding to the previously determined prediction server.

[0058] The current performance health may be the performance health corresponding to the currently determined pre-push server.

[0059] In the embodiment of the present application, the process of determining the performance health is a recursive process, and the current performance health needs to be determined with reference to the previous performance health.

[0060] Step S240: sending the current performance health status corresponding to the pre-push server to the playback end, so that the playback end selects one of the pre-push servers to obtain the video stream according to the current performance health status corresponding to the plurality of pre-push servers.

[0061] If the pre-push server provides the current performance health of the pre-push server to the playback terminal, the current performance health of the pre-push server can be directly sent to the playback terminal. Further, the current performance health of the pre-push server can be determined once every preset evaluation time period and sent to the playback terminal, so that the playback terminal can understand the latest current performance health of the pre-push server.

[0062] If the scheduling service center provides the current health of the pre-push server to the playback end, the current performance health of the pre-push server will be reported to the scheduling service center, so that the current performance health of the pre-push server can be sent to the playback end requesting to play the video stream through the scheduling server center, so that the playback end can perform the video stream acquisition task according to the current performance health of the pre-push server.

[0063] The video stream acquisition task is the process of how the player acquires the video stream. This process will be described later, so it will not be repeated here.

[0064] In the process of the pre-push server caching the video stream sent by the content distribution server, the embodiment of the present application receives an authentication request issued by the playback end for the video stream; after determining that the authentication is passed based on the authentication request, the performance indicator data corresponding to the pre-push server is determined according to the communication cache data of the pre-push server; the current performance health corresponding to the pre-push server is determined according to the performance indicator data corresponding to the pre-push server and the historical performance health corresponding to the pre-push server; the current performance health corresponding to the pre-push server is sent to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance health corresponding to the multiple pre-push servers. By evaluating the performance health of the pre-push server, the embodiment of the present application can reasonably allocate resources during the content distribution process, so that the player can obtain the video stream from the pre-push server with the best performance health, so that the pre-push server can operate more stably in the face of burst traffic and high load, improve the data transmission efficiency and data service quality of the pre-push server, and improve the video stream pulling speed of the playback end, so as to avoid the problem of slow video stream pulling speed caused by the playback end blindly pulling the video stream from the pre-push server with unknown performance status.

[0065] Furthermore, if the player is unaware of the performance health of each pre-push server, then the player can only blindly obtain the video stream from a pre-push server. If the current service pressure of the pre-push server is high, then this will cause the service pressure of the pre-push server to continue to surge, and even service interruption problems will occur. It is also easy for the player to obtain the video stream with a delay, or even a failure to obtain the video stream. However, by evaluating the performance health of the pre-push server, the embodiment of the present application can enable the player to selectively obtain the video stream from a pre-push server with better performance health, which will not cause service pressure on the pre-push server, and can also avoid the delay problem caused by the low performance health of the pre-push server, so that the embodiment of the present application can effectively support application scenarios such as real-time live broadcasting that have high requirements for the timeliness of content distribution.

[0066] In order to make the embodiment of the present application easier to understand, the method for obtaining the video stream of the embodiment of the present application will be further described below.

[0067] In the embodiment of the present application, the performance indicator data corresponding to the pre-push server includes performance indicator values ​​that can be used to evaluate the data processing performance and data transmission performance of the pre-push server.

[0068] Further, the performance indicator data corresponding to the pre-push server includes at least one performance indicator value, wherein the performance indicator data corresponding to the pre-push server includes at least one of the following: a downlink performance indicator value, an uplink performance indicator value, and a load performance indicator value.

[0069] The downlink performance index value is used to measure the downlink performance of the pre-push server.

[0070] The uplink performance index value is used to measure the uplink performance of the pre-push server.

[0071] The load performance index value is used to measure the load performance of the pre-push server.

[0072] The downlink performance indicator value, uplink performance indicator value and load performance indicator value corresponding to the pre-push server are described in detail below.

[0073] In an embodiment of the present application, the downlink performance indicator value can reflect the real-time performance of the cache Buffer of the pre-push server, and further can reflect the real-time performance and efficiency of the playback end pulling the video stream from the pre-push server. In this way, when determining the downlink performance indicator value corresponding to the pre-push server, the communication cache data that needs to be determined include: frame interval, receiving interval and total cache duration. Specifically, the frame interval and receiving interval between two adjacent frames of video images can be determined in the process of the pre-push server receiving the video stream from the content distribution server; wherein the pre-push server caches the received video image into a preset cache space; determines the total cache duration corresponding to the cached video stream in the cache space; and determines the downlink performance indicator value corresponding to the pre-push server based on the frame interval, the receiving interval and the total cache duration.

[0074] Frame interval refers to the time stamp interval between two adjacent frames in a video stream.

[0075] The receiving interval refers to the time interval between the previous frame and the next frame received by the pre-pushing server during the process of receiving the video stream (eg, the world clock interval).

[0076] The total cache duration refers to the total cache duration of the cached group of pictures (GOP) of the cached video stream in the cache space used to cache the video stream in the pre-pushing server. Further, the number of frames of the cached video stream can be determined, and the number of frames multiplied by the frame interval can be used as the total cache duration; or the timestamp difference between the first frame and the last frame of the cached video stream can be determined, and the timestamp difference can be used as the total cache duration.

[0077] Furthermore, the downlink performance indicator value can be determined by using the following formula:

[0078] Downlink performance index value = (frame interval - receiving interval) / total buffering time.

[0079] Among them, since the frame interval is fixed, and the receiving interval is related to the network environment, the difference between the frame interval and the receiving interval can reflect the cache advance time of the pre-push server. Through the proportion of the cache advance time in the total cache time, a value between 0 and 1 describing the real-time performance of the cache buffer is obtained, which further reflects the performance of the pre-push server in terms of pre-caching capability. Among them, the larger the downlink performance index value, the better the real-time performance of the cache buffer of the pre-push server, the better the pre-caching capability, and the faster the processing speed; the smaller the downlink performance index value, the worse the real-time performance of the cache buffer of the pre-push server, the worse the pre-caching capability, and the slower the processing speed.

[0080] In an embodiment of the present application, the uplink performance index value can reflect the network engine stability (session retention rate) of the pre-push server during long-term operation, and thus can reflect the ability of the pre-push server to maintain active sessions. In this way, when determining the uplink performance index value, the communication cache data that needs to be determined includes: the current number of session connections and the number of historical session connections between the pre-push server and the content distribution server. Specifically, the current number of session connections and the number of historical session connections between the pre-push server and the content distribution server can be determined; based on the current number of session connections and the number of historical session connections, the uplink performance index value corresponding to the pre-push server is determined.

[0081] The multiple session connections between the pre-pushing server and the content distribution server correspond to the same video information or different video information. In other words, the pre-pushing server can receive the video stream corresponding to the same video information or the video stream corresponding to different video information sent by the content distribution server.

[0082] The current number of session connections refers to the number of session connections currently processed by the pre-push server.

[0083] The number of historical session connections refers to the total number of session connections in the historical time period ending at the current time. The length of the historical time period may be an empirical value or a value obtained through experiments. For example, the length of the historical time period is 5 minutes.

[0084] Furthermore, the current number of session connections and the number of historical session connections may be determined by using a network monitoring tool, or the current number of session connections and the number of historical session connections may be determined by querying logs.

[0085] Furthermore, the following formula may be used to determine the uplink performance index value:

[0086] Uplink performance index value = current session connection number / historical session connection number.

[0087] Among them, the embodiment of the present application not only focuses on the current number of session connections, but also focuses on the ratio of the current number of session connections to the number of session connections in the past period of time. This ratio can more comprehensively reflect the connection stability and session activity of the pre-push server during long-term operation. The uplink performance index value is a value between 0 and 1. The larger the uplink performance index value, the higher the session activity of the pre-push server and the more stable the network engine; the smaller the uplink performance index value, the lower the session activity of the pre-push server and the more unstable the network engine.

[0088] In an embodiment of the present application, the load performance index value can reflect the network load capacity of the pre-push server, and further reflect the data transmission capacity of the pre-push server. When determining the load performance index value, the communication cache data that needs to be determined includes: the number of available network connections between the pre-push server and the playback end, the maximum number of network connections, the current number of network connections, and the remaining number of network connections. Specifically, the number of available network connections and the maximum number of network connections between the pre-push server and the playback end can be obtained; the number of remaining network connections between the pre-push server and the playback end can be determined based on the current number of network connections between the pre-push server and the playback end and the number of available network connections; the load performance index value corresponding to the pre-push server can be determined based on the remaining number of network connections and the maximum number of network connections.

[0089] It should be noted that, with respect to the number of available network connections, the maximum number of network connections, the current number of network connections and the remaining number of network connections between the pre-push server and the playback end, the playback end described therein only indicates that one end of the network connection is the pre-push server and the other end is the playback end, and is not used to represent a specific playback end.

[0090] The number of available network connections refers to the average number of network connections of the prediction server during the statistical time period. The end time of the statistical time period may be the current time. The number of available network connections may also be updated every statistical time period using the average number of network connections in the most recent statistical time period.

[0091] The maximum number of network connections refers to the maximum number of network connections of the pre-pushing server during the statistical time period. The end time of the statistical time period may be the current time. The maximum number of network connections may also be updated every statistical time period using the maximum number of network connections in the most recent statistical time period. The length of the statistical time period is an empirical value or a value obtained through experiments. For example, the length of the statistical time period is one week. Of course, the maximum number of network connections may also be the maximum number of network connections since the start of recording the number of network connections of the pre-pushing server.

[0092] Furthermore, within each preset statistical time period of continuous time, the number of network connections corresponding to each preset statistical time within the statistical time period can be queried; based on the number of network connections corresponding to each statistical time within the statistical time period, the maximum number of network connections within the statistical time period and the average number of network connections within the statistical time period can be determined; the maximum number of network connections is determined as the maximum number of network connections used in the next statistical time period, and the average number of network connections is determined as the number of available network connections used in the next statistical time period. For example: the number of network connections between the pre-push server and the player is recorded at the hour and half hour of each day, and at 24:00 on Sunday of each week, all the number of network connections recorded in that week is queried to determine the maximum number of network connections and the average number of network connections.

[0093] The current number of network connections refers to the current number of network connections of the pre-push server.

[0094] The remaining number of network connections refers to the difference between the current number of available network connections of the pre-push server and the current number of network connections.

[0095] Further, the network connection data may represent the number of playback terminals connected to the pre-pushing server. Each network connection in the number of network connections represents a connection between the pre-pushing server and a playback terminal. Wherein, the types of network connections include, but are not limited to, a Transmission Control Protocol (TCP) connection and an Open Systems Interconnection (UDP) connection. The UDP is, for example, a Quick UDP Internet Connection (UDP).

[0096] Furthermore, the load performance index value can be determined using the following formula:

[0097] Load performance index value = number of remaining network connections / maximum number of network connections.

[0098] The load performance index value is a value between 0 and 1. The larger the load performance index value, the better the load capacity of the pre-pushing server and the stronger the ability to transmit data to the playback end; the smaller the load performance index value, the worse the load capacity of the pre-pushing server and the worse the ability to transmit data to the playback end.

[0099] In an embodiment of the present application, after the performance indicator data corresponding to the prediction server is determined, the current performance health corresponding to the prediction server is determined based on the performance indicator data corresponding to the prediction server and the historical performance health corresponding to the prediction server.

[0100] The current performance health corresponding to the pre-push server can reflect the quality of the current data transmission performance and data processing performance of the pre-push server.

[0101] like Figure 3 As shown, it is a flowchart of the steps of determining the current performance health according to an embodiment of the present application.

[0102] Step S310, obtaining a weight value corresponding to each of the performance indicator values ​​and obtaining an alpha smoothing coefficient corresponding to the prediction server.

[0103] The weight value corresponding to the performance indicator value is used to indicate the importance of the performance indicator value in determining the performance health. The larger the weight value, the more important the performance indicator value; the smaller the weight value, the less important the performance indicator value. The weight value corresponding to each performance indicator value can be an empirical value or a value obtained through experiments.

[0104] The α smoothing coefficient is used to control the smoothing degree of the smoothing filter. In other words, the size of the α smoothing coefficient determines whether the historical performance health is more likely to be referred to or the current performance index is more likely to be referred to when calculating the current performance health. Furthermore, the larger the α smoothing coefficient, the more historical performance health is referred to; the smaller the α smoothing coefficient, the more current performance index is referred to. The α smoothing coefficient can be an empirical value or a value obtained through experiments.

[0105] In an embodiment of the present application, the weight value corresponding to each performance indicator value and the alpha smoothing coefficient corresponding to the pre-push server can be obtained from a preset cloud server. The cloud server can send the weight value corresponding to each performance indicator value and the alpha smoothing coefficient corresponding to the pre-push server to the pre-push server in an encrypted manner. After receiving the weight value corresponding to each performance indicator value and the alpha smoothing coefficient corresponding to the pre-push server, the pre-push server performs a decryption process.

[0106] Step S320: using the weight value corresponding to each of the performance indicator values, determine a weighted average value of each of the performance indicator values.

[0107] In the embodiment of the present application, the weighted average value can be determined by the following formula:

[0108] Weighted average value = (k1*performance index value 1+k2*performance index value 2+…+kn*performance index value n) / (k1+k2+…+kn).

[0109] Among them, k1 to kn are weight values. Among them, k1 corresponds to performance index value 1, k1 corresponds to performance index value 1, and so on, kn*performance index value n. n is greater than or equal to 1.

[0110] Step S330 , using the alpha smoothing coefficient corresponding to the prediction server, perform alpha smoothing filtering on the weighted average and the historical performance health to obtain the current performance health corresponding to the prediction server.

[0111] After obtaining the current performance health corresponding to the prediction server, the current performance health is recorded so as to be used as the historical performance health when the current performance health is calculated next time.

[0112] In an embodiment of the present application, the following formula may be used to determine the current performance health.

[0113] Current performance health = α*historical performance health + (1-α)*weighted average.

[0114] The embodiment of the present application introduces α filtering smoothing technology when performing weighted averaging of various performance indicators. The size of the α smoothing coefficient can effectively reduce the volatility of the data and improve the stability and reliability of the performance health calculation. By dynamically adjusting the weight values ​​corresponding to each performance indicator, the pre-push server can better adapt to different workloads and network environments, thereby ensuring the accuracy and practicality of the health status assessment.

[0115] In the embodiment of the present application, if the performance health of the pre-push server is less than the health threshold, the pre-push server can also be adjusted to improve the performance of the pre-push server itself. For example, the cache size and the slice size of the video stream can be adjusted to ensure the real-time and high efficiency of the cache. The network connection management algorithm can be optimized, network redundant nodes can be added to cope with failures, and load balancing strategies can be implemented to ensure that the node can continue to maintain active sessions and reduce the session interruption rate.

[0116] For the scenario where the scheduling service center provides the current performance health of the pre-pushing server to the playback terminal, the embodiment of the present application also provides a method for obtaining a video stream applied in the scheduling service center. The pre-pushing server is the above-mentioned cache node. Figure 4 , which is a flowchart of a method for acquiring a video stream applied in a scheduling service center according to an embodiment of the present application.

[0117] Step S410, receiving current performance health reported by multiple preset pre-push servers respectively; wherein the multiple pre-push servers are used to cache video streams corresponding to the same video information.

[0118] Since the embodiment of the present application mainly describes how the client obtains the video stream that the user wants to play, the multiple pre-push servers are set to cache the video streams corresponding to the same video information. However, in fact, each pre-push server connected to the scheduling service center is used to cache at least one video stream corresponding to the video information. In view of this situation, the scheduling service center can classify each pre-push server according to the video information, and execute this embodiment according to the current performance health reported by multiple pre-push servers corresponding to the same video information.

[0119] Step S420, after receiving the playback request corresponding to the video stream sent by the playback end, the current performance healths corresponding to N of the multiple pre-push servers are returned to the playback end according to the sizes of the current performance healths corresponding to the multiple pre-push servers, so that the playback end performs the video stream acquisition task according to the current performance healths corresponding to the N pre-push servers.

[0120] The video information corresponding to the video stream is carried in the playback request; and the current performance health of each pre-push server corresponding to the video information is queried.

[0121] In the embodiment of the present application, N is less than or equal to the number of the queried pre-push servers. Further, after querying the current performance health of each pre-push server corresponding to the video information, the pre-push servers whose current performance health is less than the preset health threshold are filtered out; the current performance health of the remaining pre-push servers is used as the current performance health of the N servers to be sent, or, from the current performance health of the remaining pre-push servers, the current performance health of the pre-push servers corresponding to a preset number are selected as the current performance health of the N servers to be sent. The preset number is an empirical value or a value obtained through experiments.

[0122] The health threshold is used to measure whether the pre-push server has the ability to provide video streams to the playback end. A pre-push server whose current performance health is less than the health threshold does not have the ability to provide video streams to the playback end. The health threshold is an empirical value or a value obtained through experiments. If the pre-push server whose current performance health is less than the health threshold provides a video stream to the playback end, there will be a playback delay or even a freeze problem. Therefore, the embodiment of the present application filters out the pre-push server whose current performance health is less than the health threshold.

[0123] After querying the current performance health corresponding to each pre-push server, the current performance health corresponding to multiple pre-push servers can be sorted in order from large to small, and the current performance health corresponding to the first N pre-push servers can be determined, and the current performance health corresponding to the first N pre-push servers can be returned to the playback end.

[0124] Furthermore, if the playback end does not have the network addresses respectively corresponding to the N pre-push servers, the network addresses respectively corresponding to the N pre-push servers may be returned to the playback end together.

[0125] The embodiment of the present application also provides a method for obtaining a video stream applied to a playback terminal. The pre-pushing server is the cache node mentioned above. Figure 5 , which is a flowchart of a method for obtaining a video stream applied at a playback end according to an embodiment of the present application.

[0126] Step S510: sending authentication requests corresponding to the video streams to multiple pre-pushing servers respectively.

[0127] The multiple pre-push servers are pre-push servers that have established network connections with the playback end respectively. Further, a playback request corresponding to the video stream is sent to a preset scheduling service center. The playback request carries video information corresponding to the video stream. The scheduling service center returns the network addresses corresponding to the multiple pre-push servers to the playback end according to the playback request. The playback end establishes a network connection with each pre-push server according to the network addresses corresponding to the multiple pre-push servers respectively, and sends an authentication request to each pre-push server.

[0128] Furthermore, in order to further reduce the playback delay of the player, the scheduling service center can also return the current frame information to the player. The player carries the video information and the current frame information in the authentication request to ensure that the pre-push server that has passed the authentication not only caches the video stream corresponding to the video information, but also ensures that the video stream includes the frame corresponding to the current frame information.

[0129] Step S520: for each of the pre-push servers, after determining that the pre-push server determines that the authentication is successful based on the authentication request, obtain the current performance health returned by the pre-push server.

[0130] In the case where the pre-push server provides the playback end with the current performance health corresponding to the pre-push server, after the pre-push server determines that the authentication is successful based on the authentication request, the playback end can receive an authentication success message sent by the pre-push server; after the pre-push server sends the authentication success message, the playback end can receive and obtain the current performance health returned by the pre-push server.

[0131] In the case where the scheduling service center provides the current performance health corresponding to the pre-push server to the playback terminal, the current performance health corresponding to the multiple pre-push servers returned by the scheduling service center can be received and stored. For each pre-push server, after the pre-push server determines that the authentication is passed based on the authentication request, the playback terminal can receive the authentication pass message sent by the pre-push server. At this time, the current performance health corresponding to the pre-push server is obtained from the stored current performance health.

[0132] Furthermore, the current performance health of the N pre-push servers respectively corresponding to the playback request returned by the scheduling service center is received. While receiving the current performance health of the N pre-push servers respectively corresponding to the playback request, the network addresses of the N pre-push servers respectively corresponding to the playback request can also be received.

[0133] Step S530: acquiring the video stream from one of the pre-push servers according to the current performance health levels respectively corresponding to the plurality of pre-push servers.

[0134] In the embodiment of the present application, obtaining a video stream may also be referred to as pulling a video stream.

[0135] In the case where the pre-push server provides the current performance health corresponding to the pre-push server to the playback end, the current performance healths corresponding to the multiple pre-push servers are sorted in descending order according to the sizes of the current performance healths corresponding to the multiple pre-push servers, the pre-push server with the largest current performance health is determined as the main cache node, the other pre-push servers are determined as backup cache nodes, and the video stream is obtained from the main cache node with the largest current performance health.

[0136] In the case where the scheduling service center provides the playback end with the current performance health status corresponding to the pre-push server, network connections are established with M of the pre-push servers respectively according to the sizes of the current performance health status corresponding to the N pre-push servers; wherein M≤N; based on establishing network connections with the M pre-push servers respectively, the video stream is obtained from one of the pre-push servers.

[0137] Furthermore, the current performance health corresponding to the N pre-push servers can be sorted in descending order of current performance health, and the first M pre-push servers are obtained to establish a network connection. If N≤M, then M=N; if N>M, then M=preset value. The size of the preset value is an empirical value or a value obtained through experiments. For example, the preset value can be set to 3.

[0138] Further, after establishing a network connection with the first M pre-push servers, authentication is performed for each pre-push server to determine whether the pre-push server caches the video stream required for playback (i.e., the video stream corresponding to the video information). If the pre-push server caches the video stream required for playback, it is determined that the authentication is passed, otherwise, it is determined that the authentication is not passed. According to the order of current performance health from large to small, the current performance health corresponding to each pre-push server that has passed the authentication is sorted, and the pre-push server with the largest current performance health is used as the main cache node, and the remaining pre-push servers are used as backup cache nodes; the video stream is obtained from the main cache node.

[0139] In an embodiment of the present application, in order to avoid the problem of abnormal video stream acquisition when acquiring the video stream from the main cache node, such as: the main cache node fails, the network connection between the playback end and the main cache node is disconnected, the packet loss rate is greater than the preset packet loss rate threshold, etc., the playback end can implement the main and standby switching of the pre-push server based on the performance health corresponding to each pre-push server, so as to avoid video playback interruption. Specifically, the acquisition of the video stream from one of the pre-push servers according to the size of the current performance health corresponding to the plurality of pre-push servers includes: in the process of acquiring the video stream from the current pre-push server (main cache node), keeping alive the network connections established with the other pre-push servers (each standby cache node); if the video stream acquisition abnormality is detected, the next pre-push server is selected according to the size of the current performance health corresponding to the other pre-push servers and the video stream is continued to be acquired from the next pre-push server.

[0140] The embodiment of the present application also provides a video stream acquisition device set in a pre-pushing server. Figure 6 , which is a structural diagram of a video stream acquisition device set in a pre-push server according to an embodiment of the present application.

[0141] The video stream acquisition device provided on the pre-pushing server includes:

[0142] The first receiving module 610 is used to receive an authentication request for the video stream sent by the content distribution server from the playback terminal during the process in which the pre-pushing server caches the video stream sent by the content distribution server.

[0143] The first determination module 620 is configured to determine the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server after determining that the authentication is passed based on the authentication request.

[0144] The second determination module 630 is used to determine the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server.

[0145] The first sending module 640 is used to send the current performance health status corresponding to the pre-push server to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance health status corresponding to the plurality of pre-push servers.

[0146] The functions of the device described in the embodiment of the present application have been described in the above method embodiment. Therefore, for any details not provided in the description of this embodiment, please refer to the relevant descriptions in the above embodiment and will not be repeated here.

[0147] The embodiment of the present application also provides a device for obtaining a video stream disposed at a playback end. Figure 7 , which is a structural diagram of a video stream acquisition device arranged at a playback end according to an embodiment of the present application.

[0148] The video stream acquisition device arranged at the playback end includes:

[0149] The second sending module 710 is used to send authentication requests corresponding to the video streams to multiple preset pre-push servers respectively.

[0150] The second receiving module 720 is configured to obtain, for each of the pre-push servers, a current performance health returned by the pre-push server after determining that the pre-push server determines that the authentication is successful based on the authentication request.

[0151] The video acquisition module 730 is used to acquire the video stream from one of the pre-push servers according to the current performance health levels respectively corresponding to the multiple pre-push servers.

[0152] The functions of the device described in the embodiment of the present application have been described in the above method embodiment. Therefore, for any details not provided in the description of this embodiment, please refer to the relevant descriptions in the above embodiment and will not be repeated here.

[0153] The present application also provides a video stream acquisition device, such as Figure 8 , which is a structural diagram of a video stream acquisition device according to an embodiment of the present application.

[0154] The video stream acquisition device includes: a processor 810, a communication interface 820, a memory 830 and a communication bus 840. The processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840.

[0155] The memory 830 is used to store computer programs.

[0156] In one embodiment of the present application, the processor 810 is used to implement any one of the aforementioned methods for obtaining a video stream executed on a pre-push server when executing a program stored in the memory 830, including: receiving an authentication request issued by a playback terminal for the video stream during a process in which the pre-push server caches the video stream sent by a content distribution server; after determining that the authentication is passed based on the authentication request, determining performance indicator data corresponding to the pre-push server according to communication cache data of the pre-push server; determining a current performance health corresponding to the pre-push server according to the performance indicator data corresponding to the pre-push server and a historical performance health corresponding to the pre-push server; and sending the current performance health corresponding to the pre-push server to the playback terminal, so that the playback terminal selects to obtain the video stream from one of the pre-push servers according to the current performance healths corresponding to a plurality of the pre-push servers.

[0157] The method of determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server includes: determining the frame interval and the receiving interval between two adjacent frames of video images during the process of the pre-push server receiving the video stream from the content distribution server; wherein the pre-push server caches the received video image into a preset cache space; determining the total cache time corresponding to the cached video stream in the cache space; and determining the downlink performance indicator value corresponding to the pre-push server according to the frame interval, the receiving interval and the total cache time.

[0158] Among them, determining the performance indicator data corresponding to the pre-push server based on the communication cache data of the pre-push server includes: determining the current session connection number and the historical session connection number between the pre-push server and the content distribution server; determining the uplink performance indicator value corresponding to the pre-push server based on the current session connection number and the historical session connection number.

[0159] Wherein, determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server includes: obtaining the number of available network connections and the maximum number of network connections between the pre-push server and the playback end; determining the number of remaining network connections between the pre-push server and the playback end according to the current number of network connections between the pre-push server and the playback end and the number of available network connections; and determining the load performance indicator value corresponding to the pre-push server according to the remaining number of network connections and the maximum number of network connections.

[0160] Wherein, before determining the number of available network connections and the maximum number of network connections between the pre-push server and the playback end, it also includes: in each preset statistical time period of continuous time, querying the number of network connections corresponding to each preset statistical time in the statistical time period; determining the maximum number of network connections in the statistical time period and the average number of network connections in the statistical time period according to the number of network connections corresponding to each statistical time in the statistical time period; determining the maximum number of network connections as the maximum number of network connections used in the next statistical time period, and determining the average number of network connections as the number of available network connections used in the next statistical time period.

[0161] Wherein, the performance indicator data includes: at least one performance indicator value; determining the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server includes: obtaining a weight value corresponding to each of the performance indicator values ​​and obtaining an alpha smoothing coefficient corresponding to the prediction server; determining a weighted average of each of the performance indicator values ​​using the weight value corresponding to each of the performance indicator values; and performing alpha smoothing filtering on the weighted average and the historical performance health using the alpha smoothing coefficient corresponding to the prediction server to obtain the current performance health of the prediction server.

[0162] In another embodiment of the present application, the processor 810, when executing the program stored in the memory 830, implements any one of the aforementioned methods for obtaining a video stream executed on the playback end, including: sending authentication requests corresponding to the video stream to multiple preset pre-push servers respectively; for each of the pre-push servers, after determining that the pre-push server determines that the authentication is passed based on the authentication request, obtaining the current performance health returned by the pre-push server; and obtaining the video stream from one of the pre-push servers according to the sizes of the current performance healths corresponding to the multiple pre-push servers respectively.

[0163] The method of obtaining the video stream from one of the pre-push servers according to the sizes of current performance health states respectively corresponding to the plurality of pre-push servers comprises: in the process of obtaining the video stream from the current pre-push server, keeping alive the network connections respectively established with the other pre-push servers; if an abnormality in the acquisition of the video stream is detected, selecting the next pre-push server according to the sizes of current performance health states respectively corresponding to the other pre-push servers and continuing to obtain the video stream from the next pre-push server.

[0164] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for obtaining a video stream executed on the pre-push server or the steps of the method for obtaining a video stream executed on the playback end as provided in any of the aforementioned method embodiments are implemented. Since the steps of the method for obtaining a video stream executed on the pre-push server or the steps of the method for obtaining a video stream executed on the playback end have been described in detail above, for the details not fully described in the description of this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further description will be given here.

[0165] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0167] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0168] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A method for obtaining a video stream, characterized in that: Each pre-push server performs the following steps: In the process of the pre-pushing server caching the video stream sent by the content distribution server, receiving an authentication request issued by the playback terminal for the video stream; After determining that the authentication is passed based on the authentication request, determining the performance indicator data corresponding to the pre-push server according to the communication cache data of the pre-push server; Determine the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server; The current performance health status corresponding to the pre-push server is sent to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance health status corresponding to the plurality of pre-push servers respectively.

2. The method according to claim 1, characterized in that The determining, according to the communication cache data of the pre-push server, the performance indicator data corresponding to the pre-push server comprises: In the process of the pre-pushing server receiving the video stream from the content distribution server, determining the frame interval and the receiving interval between two adjacent frames of video images; wherein the pre-pushing server caches the received video images into a preset cache space; Determine the total cache duration corresponding to the video streams cached in the cache space; A downlink performance indicator value corresponding to the pre-push server is determined according to the frame interval, the receiving interval and the total cache duration.

3. The method according to claim 1, characterized in that The determining, according to the communication cache data of the pre-push server, the performance indicator data corresponding to the pre-push server comprises: Determine the current number of session connections and the number of historical session connections between the pre-pushing server and the content distribution server; An uplink performance indicator value corresponding to the pre-push server is determined according to the current session connection quantity and the historical session connection quantity.

4. The method according to claim 1, characterized in that: The determining, according to the communication cache data of the pre-push server, the performance indicator data corresponding to the pre-push server comprises: Obtaining the number of available network connections and the maximum number of network connections between the pre-pushing server and the playback end; Determining the number of remaining network connections between the pre-push server and the playback end according to the current number of network connections between the pre-push server and the playback end and the number of available network connections; A load performance indicator value corresponding to the pre-push server is determined according to the remaining number of network connections and the maximum number of network connections.

5. The method according to claim 4, characterized in that Before determining the number of available network connections and the maximum number of network connections between the pre-pushing server and the playback terminal, the method further includes: In each preset statistical time period of continuous time, query the number of network connections corresponding to each preset statistical time in the statistical time period; According to the number of network connections corresponding to each of the statistical times within the statistical time period, determine the maximum number of network connections within the statistical time period and determine the average number of network connections within the statistical time period; The maximum number of network connections is determined as the maximum number of network connections used in the next statistical time period, and the average number of network connections is determined as the available number of network connections used in the next statistical time period.

6. The method according to claim 1, characterized in that The performance indicator data includes: at least one performance indicator value; The determining, according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server, the current performance health of the prediction server includes: Obtaining a weight value corresponding to each of the performance indicator values ​​and obtaining an alpha smoothing coefficient corresponding to the pre-push server; Determine a weighted average of each of the performance indicator values ​​using the weight value corresponding to each of the performance indicator values; The alpha smoothing coefficient corresponding to the prediction server is used to perform alpha smoothing filtering on the weighted average value and the historical performance health to obtain the current performance health corresponding to the prediction server.

7. A method for obtaining a video stream, characterized in that: The steps performed by the player include: Sending authentication requests corresponding to the video streams to multiple pre-pushing servers respectively; For each of the pre-push servers, after determining that the pre-push server determines that the authentication is passed based on the authentication request, obtaining the current performance health returned by the pre-push server; The video stream is obtained from one of the pre-push servers according to the current performance health levels respectively corresponding to the plurality of pre-push servers.

8. The method according to claim 7, characterized in that The acquiring the video stream from one of the pre-push servers according to the current performance health levels respectively corresponding to the plurality of pre-push servers comprises: In the process of acquiring the video stream from the current pre-pushing server, keeping alive the network connections respectively established with the other pre-pushing servers; If it is detected that the video stream acquisition is abnormal, the next pre-push server is selected according to the current performance health levels corresponding to the other pre-push servers, and the video stream is continuously acquired from the next pre-push server.

9. A device for acquiring a video stream, characterized in that: The video stream acquisition device is arranged on the pre-pushing server, and includes: A first receiving module, configured to receive an authentication request issued by a playback terminal for a video stream during a process in which the pre-pushing server caches the video stream sent by the content distribution server; A first determination module, configured to determine performance indicator data corresponding to the pre-push server according to communication cache data of the pre-push server after determining that the authentication is passed based on the authentication request; A second determination module is used to determine the current performance health of the prediction server according to the performance indicator data corresponding to the prediction server and the historical performance health of the prediction server; A first sending module, configured to send the current performance health corresponding to the pre-push server to the playback end, so that the playback end selects to obtain the video stream from one of the pre-push servers according to the current performance health corresponding to the plurality of pre-push servers respectively; The video stream acquisition device is arranged at the playback end, and includes: A second sending module is used to send authentication requests corresponding to the video streams to multiple preset pre-pushing servers respectively; A second receiving module is configured to obtain, for each of the pre-push servers, a current performance health returned by the pre-push server after determining that the pre-push server determines that the authentication is passed based on the authentication request; The video acquisition module is used to acquire the video stream from one of the pre-push servers according to the current performance health levels respectively corresponding to the multiple pre-push servers.

10. A video stream acquisition device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to: execute a connection program of a pre-push server stored in the memory to implement the video stream acquisition method executed on the pre-push server according to any one of claims 1 to 6, or, alternatively, implement the video stream acquisition method executed on the playback end according to any one of claims 7 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement the method for obtaining the video stream executed on the pre-push server according to any one of claims 1 to 6, or to implement the method for obtaining the video stream executed on the playback end according to any one of claims 7 to 8.

Citation Information

Cited By

  • Audio playing method and system, electronic equipment and storage medium

    CN121151402A