Live streaming scheduling method and device
By predicting and comparing based on historical bandwidth records, edge nodes with sufficient remaining bandwidth are selected for live stream scheduling, which solves the problems of edge node overload and excessive back-to-origin calls, and improves the user experience.
Patent Information
- Application Number
- CN202211676585.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In existing technologies, live stream scheduling methods can easily lead to overload of edge nodes and numerous origin callbacks, resulting in high bandwidth latency and negatively impacting the user's viewing experience.
By acquiring historical bandwidth records of the target live stream, bandwidth prediction is performed, the predicted bandwidth is determined, and compared with the remaining bandwidth of the edge nodes. Edge nodes with sufficient remaining bandwidth are selected for live stream scheduling.
This reduces the number of edge node calls to the same live stream, avoids increased origin requests, reduces edge node overload, and improves the user viewing experience.
Smart Images

Figure CN115942007B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a live streaming scheduling method. The present application also relates to a live streaming scheduling device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of computer technology, online social platforms are becoming more and more popular, and live broadcasts on online social platforms are gradually becoming a popular form of real-time interaction.
[0003] In the prior art, when viewers watch live broadcasts, the scheduling system determines the edge nodes that can cover the users based on the users' locations, and then selects edge nodes with remaining bandwidth from among these edge nodes, which then pushes the live stream to the viewers. When the bandwidth on an edge node is full, it will be excluded during screening, and then a new edge node with remaining bandwidth will be selected to push the live stream to the viewers. However, the above method requires related services to regularly collect the bandwidth of edge nodes. Due to the large latency of the bandwidth itself, edge nodes are prone to overload, and for the scheduling of hot live streams, the number of return to the source is still relatively large. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a live streaming scheduling method. The present application also relates to a live streaming scheduling device, a computing device, and a computer-readable storage medium to solve the technical defects of easy overloading and high number of return to the source existing in the prior art.
[0005] According to a first aspect of an embodiment of the present application, a live streaming scheduling method is provided, including:
[0006] In response to a scheduling request for a target live stream, obtaining a historical bandwidth record associated with the target live stream;
[0007] Based on the historical bandwidth record, a bandwidth prediction is performed on the target live stream to obtain a predicted bandwidth corresponding to the target live stream;
[0008] Compare the predicted bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the first target edge node;
[0009] The first target edge node is called to feed back the target live stream.
[0010] Optionally, before the step of responding to the scheduling request for the target live stream and obtaining the historical bandwidth record associated with the target live stream, the step further includes:
[0011] Collect the currently used bandwidth generated by each live stream pushed by each edge node;
[0012] For each edge node, the service status information of the current edge node is updated according to the currently used bandwidth generated by each live stream pushed by the current edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node.
[0013] Optionally, updating the service status information of the current edge node according to the currently used bandwidth generated by each live stream pushed by the current edge node includes:
[0014] For each live stream pushed by the current edge node, determine the target bandwidth corresponding to the current live stream according to the current used bandwidth and predicted bandwidth generated by the current live stream;
[0015] The service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream.
[0016] Optionally, updating the service status information of the current edge node according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream includes:
[0017] Subtract the total bandwidth allowed to be undertaken by the current edge node from the sum of the target bandwidths corresponding to each live stream to obtain an updated remaining bandwidth;
[0018] Based on the updated remaining bandwidth, the service status information of the current edge node is updated.
[0019] Optionally, the performing bandwidth prediction on the target live stream based on the historical bandwidth record to obtain the predicted bandwidth corresponding to the target live stream includes:
[0020] Acquire multiple historical target bandwidths corresponding to a target anchor from the historical bandwidth record, wherein the target anchor is an anchor associated with a target live stream;
[0021] The multiple historical target bandwidths are input into a pre-trained bandwidth prediction model to obtain the predicted bandwidth corresponding to the target live stream.
[0022] Optionally, it is characterized in that comparing the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node to determine the first target edge node includes:
[0023] Acquire service status information of each edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node;
[0024] The edge node whose remaining bandwidth is greater than the predicted bandwidth is determined as the first target edge node.
[0025] Optionally, before the step of responding to the scheduling request for the target live stream and obtaining the historical bandwidth record associated with the target live stream, the step further includes:
[0026] Determine whether the scheduling request is a first scheduling request, wherein the first scheduling request is the first scheduling request after pulling the stream;
[0027] If so, the step of obtaining the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream is executed.
[0028] Optionally, after determining whether the scheduling request is a first scheduling request, the method further includes:
[0029] If not, comparing the remaining bandwidth allowed to be undertaken by the first target edge node with the bandwidth threshold;
[0030] When the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, the excess bandwidth corresponding to the target live stream is calculated according to the currently used bandwidth generated by the target live stream;
[0031] Compare the excess bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the second target edge node;
[0032] The second target edge node is called to feed back the target live stream.
[0033] Optionally, when the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, before calculating the excess bandwidth of the target live stream according to the current used bandwidth generated by the target live stream, the method further includes:
[0034] Obtaining a currently used bandwidth generated by the target live stream on the first target edge node;
[0035] Determine whether the currently used bandwidth generated by the target live stream is greater than the predicted bandwidth corresponding to the target live stream;
[0036] If so, it is determined whether the remaining bandwidth allowed to be taken over by the first target edge node reaches the bandwidth threshold.
[0037] Optionally, after comparing the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node and determining the first target edge node, the method further includes:
[0038] According to the predicted bandwidth corresponding to the target live stream, the service status information of the first target edge node is updated.
[0039] According to a second aspect of an embodiment of the present application, a live streaming scheduling device is provided, including:
[0040] An acquisition module, configured to acquire a historical bandwidth record associated with a target live stream in response to a scheduling request for the target live stream;
[0041] A prediction module is configured to perform bandwidth prediction on the target live stream based on the historical bandwidth record to obtain a predicted bandwidth corresponding to the target live stream;
[0042] A determination module is configured to compare the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node, and determine a first target edge node;
[0043] The feedback module is configured to call the first target edge node to feed back the target live stream.
[0044] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the live stream scheduling method when executing the computer instructions.
[0045] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the live stream scheduling method are implemented.
[0046] The live stream scheduling method provided by the present application obtains the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream; based on the historical bandwidth record, the bandwidth of the target live stream is predicted to obtain the predicted bandwidth corresponding to the target live stream; the predicted bandwidth is compared with the remaining bandwidth allowed to be undertaken by each edge node to determine the first target edge node; the first target edge node is called to feedback the target live stream. Through the historical bandwidth record, the bandwidth that may be generated by the target live stream is predicted, that is, the predicted bandwidth. In this way, the popularity change of the live stream is considered during scheduling, and it is known how much bandwidth a stream may generate in the future. The edge nodes with sufficient remaining bandwidth are called as much as possible, which can reduce the number of edge nodes called for the same live stream and avoid the problem of increased back-to-source. Moreover, since the edge nodes with sufficient remaining bandwidth are allocated to the live stream, overload of edge nodes can be avoided to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a processing flow diagram of a live streaming scheduling method provided by the prior art;
[0048] Figure 2This is a flow chart of a live streaming scheduling method provided by an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of a processing process of a live streaming scheduling method provided by an embodiment of the present application;
[0050] Figure 4 It is a structural diagram of a live streaming scheduling device provided by an embodiment of the present application;
[0051] Figure 5 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0052] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0053] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0054] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0055] First, the terms involved in one or more embodiments of the present application are explained.
[0056] Live streaming: A continuous stream is transmitted over the network for viewers to watch
[0057] Live broadcast room: In the live broadcast service, each anchor will have a unique identifier, which can be used to enter the anchor's live broadcast viewing page. Generally speaking, a room corresponds to a live broadcast stream. The stream is for the content delivery network (CDN, Content Delivery Network), and the room is for the live broadcast platform.
[0058] Live streaming upstream: The part where the anchor pushes the stream to the streaming media server, also known as live streaming upstream or streaming.
[0059] Live streaming downlink: The part where users pull the stream from the streaming media server or CDN to watch, also known as live streaming downlink or streaming.
[0060] Edge computing: It is a distributed computing architecture that moves the computing of applications, data, and services from the central nodes of the network to the logical edge nodes of the network for processing.
[0061] Edge computing node: a server that receives live streaming pushed by users, also known as a streaming node or edge upstream node.
[0062] Edge downstream node: the server that pushes live streams to users, i.e., the stream pulling node or the edge node that pulls streams.
[0063] ARIMA (Autoregressive Integrated Moving Average model) is one of the time series forecasting and analysis methods. Its full name is Autoregressive Difference Moving Average model.
[0064] Then, the live streaming scheduling method provided by this application is briefly described.
[0065] With the continuous development of computer technology, online social platforms are becoming more and more popular, and live broadcasts on online social platforms are gradually becoming a popular form of real-time interaction.
[0066] In the prior art, when viewers watch live broadcasts, the scheduling system determines the edge nodes (stream pulling nodes) that can cover the users based on their locations, and then selects an edge node with spare bandwidth from these edge nodes, which then pushes the live stream to the viewers. When the bandwidth on an edge node is full, it will be excluded during screening, and then a new edge node will be selected from the edge nodes with spare bandwidth to push the live stream to the viewers.
[0067] Specifically, see Figure 1 , Figure 1A processing flow diagram of a live streaming scheduling method provided by the prior art is shown. For the live streaming process, the anchor pushes the live streaming to the edge computing node, and then when the user (audience) goes down to watch the live streaming, the player requests the playback address of the live streaming from the scheduling system. The scheduling system screens out edge nodes that can cover the user according to the user's location, and then screens out edge nodes with remaining bandwidth (each edge node has a configured bandwidth and a real-time bandwidth, and the remaining bandwidth is the difference between the configured bandwidth and the real-time bandwidth). Hash processing is performed in the edge nodes that meet the scheduling, and an edge node is selected and scheduled to the user, that is, the edge node pushes the live streaming to the audience. Hash processing can allow an edge node to serve the user as much as possible, and can reduce the bandwidth of the machine back to the source secondary source station. When the upper bandwidth of an edge node is full, the edge node will be excluded in the screening process, and then re-hashed in the edge node with remaining bandwidth, and then scheduled to another edge node to push the live streaming to the audience. For example, the bandwidth of node A is full, and the scheduling system will call node B to push the live streaming to the audience the next time the user requests.
[0068] However, the above method has the following problems:
[0069] The bandwidth itself has a large delay, and edge nodes are prone to overload: The bandwidth of edge nodes requires related services to collect it regularly, with a delay of at least 1 minute and at most several minutes. For the scheduling system, if the user accesses during the bandwidth update time period and an edge node is scheduled out too many times, the bandwidth of the edge node may directly exceed the configured bandwidth. For example, node A is configured with a bandwidth of 10G, and uses 9G of bandwidth in real time, leaving 1G. Before the next update of the real-time bandwidth, the scheduling system gets 1G of remaining bandwidth. The scheduling system believes that the bandwidth of node A is always sufficient, so it keeps scheduling. It is very likely that 1,000 schedulings will be generated. If the bit rate of a stream is 4M, 4G bandwidth will be generated. Then node A will be overloaded.
[0070] For live streams with high popularity (live streams that can generate large bandwidth), the number of return to the source is still large: In the above method, the bandwidth of one edge node is used up first, and then another edge node is scheduled. Such scheduling is feasible for live streams with fewer viewers. When the popularity of the live stream is relatively high and the number of viewers is relatively large, if there are two nodes A and B that meet the scheduling requirements at the beginning, and the remaining bandwidth is 1G and 100G respectively, and node A is called after hash processing, the bandwidth of node A will be full sooner or later, and node B will still be called later. At this time, both node A and node B will return to the secondary source station, and two return to the source will be generated. If there are nodes A, B, and C, and the remaining bandwidth of nodes A and B is relatively small, three return to the source will be generated, and so on. Based on the fragmentation of bandwidth, the number of return to the source is uncontrollable.
[0071] Edge node overload seriously affects quality and user viewing experience deteriorates: When an edge node is overloaded, the bandwidth on the edge node is no longer sufficient, and user streaming will be stuck, and viewing will also be stuck, which will reduce the user's viewing experience to a certain extent. Severe overload will directly cause the edge node to restart, and all users on the edge node will be disconnected and watch a black screen.
[0072] Inconsistency of stream bitrate: Many scheduling methods usually use scheduling counts to solve the problem of large bandwidth latency. For example, if the remaining bandwidth is 1G, after N schedulings, no more scheduling will be done to prevent too much scheduling in an instant. However, the bitrates of the streams are different, and the bandwidths generated by pulling the streams are also different. For a 1M stream with 1G of remaining bandwidth, it can be scheduled 1000 times, but for a 10M stream it can only be scheduled 100 times, so a simple N is not a reference.
[0073] Therefore, the present application provides a method for scheduling a live stream, which responds to a scheduling request for a target live stream, obtains a historical bandwidth record associated with the target live stream; based on the historical bandwidth record, performs bandwidth prediction on the target live stream to obtain a predicted bandwidth corresponding to the target live stream; compares the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node, and determines the first target edge node; calls the first target edge node to feedback the target live stream. Through the historical bandwidth record, the bandwidth that may be generated by the target live stream is predicted, that is, the predicted bandwidth. In this way, the popularity change of the live stream is considered during scheduling, and it is known how much bandwidth a stream may generate in the future. The edge nodes with sufficient remaining bandwidth are called as much as possible, which can reduce the number of edge nodes called for the same live stream and avoid the problem of increased back-to-source. Moreover, since the edge nodes with sufficient remaining bandwidth are allocated to the live stream, overload of edge nodes can be avoided to a certain extent.
[0074] In the present application, a live stream scheduling method is provided. The present application also relates to a live stream scheduling device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0075] Figure 2 A flowchart of a live streaming scheduling method provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0076] Step 202: In response to a scheduling request for a target live stream, a historical bandwidth record associated with the target live stream is obtained.
[0077] Specifically, the target live stream refers to the multimedia stream corresponding to the live broadcast that the user wants to watch. The scheduling request refers to the request for scheduling the edge node receiving the live stream. The historical bandwidth record refers to the bandwidth record generated by the historical viewing of some live streams associated with the target live stream.
[0078] In actual applications, when a user or viewer enters a live broadcast room through a client to watch a live broadcast, the client will send a viewing request for the target live broadcast stream corresponding to the live broadcast room to the scheduling system, that is, a scheduling request for the target live broadcast stream. Correspondingly, the scheduling system receives the scheduling request for the target live broadcast stream.
[0079] Furthermore, the scheduling system can obtain the corresponding historical bandwidth record of the target live stream based on the target live stream: the scheduling request can carry the stream identifier of the target live stream, and the scheduling system obtains the historical bandwidth record associated with the stream identifier from the first data storage area based on the stream identifier, wherein the historical bandwidth record in the first data storage area is stored in association with the stream identifier. The scheduling request can also carry the room identifier of the live broadcast room corresponding to the target live stream, and the scheduling system obtains the historical bandwidth record associated with the room identifier from the second data storage area based on the room identifier, wherein the historical bandwidth record in the second data storage area is stored in association with the room identifier. The scheduling request can also carry the anchor identifier of the anchor corresponding to the target live stream, and the scheduling system obtains the historical bandwidth record associated with the anchor identifier from the third data storage area based on the anchor identifier, wherein the historical bandwidth record in the third data storage area is stored in association with the anchor identifier. This specification does not impose any limitation on the method of recording the historical bandwidth associated with the target live stream.
[0080] It should be noted that, before the step of obtaining the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream, the step further includes:
[0081] Collect the currently used bandwidth generated by each live stream pushed by each edge node;
[0082] For each edge node, the service status information of the current edge node is updated according to the currently used bandwidth generated by each live stream pushed by the current edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node.
[0083] Specifically, edge nodes refer to edge downlink nodes, i.e. nodes that feed back live streams to users. Current used bandwidth refers to the bandwidth generated by all users watching the live stream corresponding to a certain live stream. Remaining bandwidth refers to the bandwidth that the edge node can still take over. Service status information refers to the status information of the edge node during the service process, including the remaining bandwidth.
[0084] In actual applications, after receiving a scheduling request, the currently used bandwidth generated by each live stream pushed by each edge node can be collected. The currently used bandwidth generated by each live stream pushed by each edge node can also be collected periodically, that is, the currently used bandwidth generated by each live stream pushed by each edge node is collected at every preset time interval.
[0085] For example, if the edge node M pushes three live streams to viewers, the currently used bandwidths of the three live streams are obtained respectively.
[0086] Furthermore, for each edge node, the service status information of the current edge node is updated according to the currently used bandwidth generated by each live stream pushed by the current edge node.
[0087] Optionally, when updating the service status information of the current edge node, the real-time bandwidth used by the current edge node can be calculated based on the current used bandwidth generated by each live stream pushed by the current edge node, and then the difference between the configured bandwidth and the real-time bandwidth used by the current edge node is used as the remaining bandwidth allowed to be taken over, and the service status information of the current edge node is updated based on the real-time bandwidth used and the remaining bandwidth. In this way, the configured bandwidth and the real-time bandwidth used can be determined through simple calculations, which reduces the amount of data processing, improves the efficiency of determining the configured bandwidth and the real-time bandwidth used, and improves the efficiency of updating the service status information.
[0088] Optionally, when updating the service status information of the current edge node, the target bandwidth may be determined based on the current used bandwidth, and then the service status information may be updated based on the target bandwidth. That is, the service status information of the current edge node is updated based on the current used bandwidth generated by each live stream pushed by the current edge node. The specific implementation process may be as follows:
[0089] For each live stream pushed by the current edge node, determine the target bandwidth corresponding to the current live stream according to the current used bandwidth and predicted bandwidth generated by the current live stream;
[0090] The service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream.
[0091] Specifically, the predicted bandwidth refers to the bandwidth that a live stream will generate. The total bandwidth refers to the configured bandwidth of the edge node.
[0092] In actual applications, for each live stream pushed by the current edge node, the predicted bandwidth corresponding to the current live stream is obtained: the current live stream can be predicted to obtain the predicted bandwidth, or the predicted bandwidth corresponding to the current live stream can be obtained from the service status information, or the current live stream can be identified. If the current live stream is not a hot stream, the predicted bandwidth of the current live stream is determined to be the set bandwidth, such as 0.
[0093] Furthermore, the current used bandwidth and the predicted bandwidth generated by the current live stream are compared to determine the target bandwidth corresponding to the current live stream: the larger of the current used bandwidth and the predicted bandwidth can be determined as the target bandwidth; or the average of the current used bandwidth and the predicted bandwidth can be determined as the target bandwidth. Then, the service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream.
[0094] In this way, the target bandwidth corresponding to the current live stream is determined by the current used bandwidth and the predicted bandwidth, and then the service status information is updated based on the total bandwidth allowed by the current edge node and the target bandwidth corresponding to each live stream. While simplifying the calculation and reducing the amount of data processing, updating the service status information based on the target bandwidth can improve the reliability of the service status information, thereby improving the reliability of the live stream scheduling request.
[0095] In an achievable method of the present specification, the service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream. The specific implementation process may be as follows:
[0096] Subtract the total bandwidth allowed to be undertaken by the current edge node from the sum of the target bandwidths corresponding to each live stream to obtain an updated remaining bandwidth;
[0097] Based on the updated remaining bandwidth, the service status information of the current edge node is updated.
[0098] In actual applications, the target bandwidth corresponding to each live stream pushed by the current node is first added to obtain the allocated bandwidth, and then the total bandwidth is subtracted from the allocated bandwidth to obtain the remaining bandwidth currently allowed to be undertaken by the current edge node, that is, the updated remaining bandwidth, and then the updated remaining bandwidth is used to replace the remaining bandwidth in the service status information, that is, the service status information of the current edge node is updated. In this way, the service status information can be quickly determined.
[0099] Optionally, the service status information may include total bandwidth (configured bandwidth), real-time bandwidth (actually generated bandwidth currently), allocated bandwidth (total pre-allocated bandwidth), remaining bandwidth, and a pre-allocated flow list.
[0100] Step 204: Based on the historical bandwidth record, a bandwidth prediction is performed on the target live stream to obtain a predicted bandwidth corresponding to the target live stream.
[0101] Specifically, the predicted bandwidth refers to the bandwidth that a live stream will generate.
[0102] In practical applications, multiple historical target bandwidths associated with a target live stream can be obtained from historical bandwidth records, and then predictions can be made based on the multiple historical target bandwidths to obtain the predicted bandwidth corresponding to the target live stream.
[0103] Optionally, based on the historical bandwidth record, bandwidth prediction is performed on the target live stream to obtain the predicted bandwidth corresponding to the target live stream. The specific implementation process may be as follows:
[0104] Acquire multiple historical target bandwidths corresponding to a target anchor from the historical bandwidth record, wherein the target anchor is an anchor associated with a target live stream;
[0105] The multiple historical target bandwidths are input into a pre-trained bandwidth prediction model to obtain the predicted bandwidth corresponding to the target live stream.
[0106] Specifically, the historical target bandwidth refers to the maximum bandwidth generated by each live stream corresponding to the live broadcast when the target anchor previously broadcast live. The bandwidth prediction model refers to a pre-trained model for bandwidth prediction, such as the ARIMA time series analysis prediction model.
[0107] In practical applications, the historical target bandwidth of each live broadcast by the target anchor can be obtained from the historical bandwidth records. The number of historical target bandwidths is the same as the number of live broadcasts by the target anchor in the historical records. Then, multiple historical target bandwidths are input into the bandwidth prediction model for prediction to obtain the predicted bandwidth corresponding to the target live stream. In this way, the predicted bandwidth can be predicted by the bandwidth prediction model to improve the accuracy and determination efficiency of the predicted bandwidth.
[0108] For example, the bandwidth generated by the historical viewing of the target anchor corresponding to the target live stream is counted to obtain the historical bandwidth record. The historical bandwidth record is based on a long period of 6 months and a short period of days. If the target anchor starts streaming and pushes the stream, the maximum bandwidth generated in one day is calculated, that is, the historical target bandwidth, and then N historical target bandwidths are obtained. Then the N historical target bandwidths are input into the ARIMA time series analysis and prediction model to predict the predicted bandwidth corresponding to the live stream.
[0109] Optionally, based on the historical bandwidth record, the bandwidth of the target live stream is predicted to obtain the predicted bandwidth corresponding to the target live stream. The specific implementation process may also be: from the historical bandwidth record, multiple historical target bandwidths corresponding to the target anchor are obtained, wherein the target anchor is the anchor associated with the target live stream; and the weighted sum of the multiple historical target bandwidths is determined as the predicted bandwidth corresponding to the target live stream. In this way, the efficiency of determining the predicted bandwidth can be improved.
[0110] Step 206: Compare the predicted bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the first target edge node.
[0111] Specifically, the remaining bandwidth refers to the bandwidth that the edge node can still take over.
[0112] Optionally, the remaining bandwidth allowed to be taken by each edge node can be obtained first, and then the first target edge node is determined according to the predicted bandwidth of the target live stream and the remaining bandwidth allowed to be taken by each edge node. That is, the predicted bandwidth is compared with the remaining bandwidth allowed to be taken by each edge node to determine the first target edge node. The specific implementation process can be as follows:
[0113] Acquire service status information of each edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node;
[0114] The edge node whose remaining bandwidth is greater than the predicted bandwidth is determined as the first target edge node.
[0115] Specifically, the service status information refers to the status information of the edge node during the service process, including the remaining bandwidth.
[0116] In actual applications, the service status information of each edge node can be obtained from the machine status system, and the remaining bandwidth allowed by the edge node in the service status information is compared with the predicted bandwidth corresponding to the target live stream. If the remaining bandwidth is greater than the predicted bandwidth, it means that the edge node has sufficient bandwidth to push the target live stream, and the edge node is determined to be the first target edge node.
[0117] Optionally, the remaining bandwidth allowed to be taken by each edge node can be compared with the total bandwidth, and the remaining bandwidth and the total bandwidth can be determined as the candidate edge node, and then the predicted bandwidth of the target live stream can be compared with the remaining bandwidth allowed to be taken by each candidate edge node, and the candidate edge node with the remaining bandwidth equal to the predicted bandwidth can be determined as the first target edge node. In this way, the first target edge node can be determined as a dedicated edge node of the target edge node, and only pushes the target live stream.
[0118] It should be noted that, after comparing the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node and determining the first target edge node, the method further includes:
[0119] According to the predicted bandwidth corresponding to the target live stream, the service status information of the first target edge node is updated.
[0120] In practical applications, the service status information may include the total bandwidth (configured bandwidth), real-time bandwidth (actual bandwidth currently generated), allocated bandwidth (total pre-allocated bandwidth), remaining bandwidth, and pre-allocated stream list. Based on the predicted bandwidth corresponding to the target live stream, the allocated bandwidth, remaining bandwidth, and pre-allocated stream list in the service status information of the first target edge node may be updated.
[0121] For example, the total bandwidth of edge node A is set, that is, the configured bandwidth is 10G, the configured bandwidth of edge node B is 5G, and the configured bandwidth of edge node C is 10G, and the status system is used to record the service status information of edge nodes A and B. The service status information records the following contents: configured bandwidth (maximum bandwidth that can be supported), total pre-allocated bandwidth, remaining bandwidth, and pre-allocated flow list.
[0122] When requesting a live stream or playback address, stream a is predicted to generate 7G bandwidth, stream b is predicted to generate 3G bandwidth, and stream c is predicted to generate 0.01G bandwidth. For stream a, only edge node A has enough remaining bandwidth, so stream a is allocated to machine A at the beginning. The service status information of edge node A is: configured bandwidth: 10G; real-time bandwidth: the current actual amount generated; total pre-allocated bandwidth: 7G; remaining bandwidth: configured bandwidth - max (pre-allocated bandwidth, real-time bandwidth generated by actual pre-allocated stream) - bandwidth generated by streams excluding pre-allocated streams = 10G - 7G - 0G = 3G; pre-allocated stream list: [a].
[0123] It should be noted that, because the scheduling has just started, the bandwidth generated by the stream except the pre-allocated stream is 0; because the live stream can completely exceed the predicted bandwidth, the maximum value of the pre-allocated bandwidth and the real-time bandwidth generated by the actual pre-allocated stream is taken.
[0124] When flow b is requested, the remaining bandwidth of edge node A is 3G, and the remaining bandwidth of edge node B is 5G, so flow b is allocated to edge node B. The service status information of machine B is: configured bandwidth: 5G; real-time bandwidth: the current actual amount generated; total pre-allocated bandwidth: 3G; remaining bandwidth: configured bandwidth - max (pre-allocated bandwidth, real-time bandwidth generated by the actual pre-allocated flow) - bandwidth generated by the flow except the pre-allocated flow = 2G; pre-allocated flow list: [b].
[0125] For flow c, the bandwidth predicted to be generated by this flow is extremely small, that is, flow c is a cold flow, and both edge nodes A and B meet the scheduling conditions, then you can arbitrarily select an edge node for scheduling. Assuming that it is scheduled to edge node A, the service status information of edge node A is: configured bandwidth: 10G; real-time bandwidth: the current actual amount generated; total pre-allocated bandwidth: 7G; remaining bandwidth: configured bandwidth - max (pre-allocated bandwidth, real-time bandwidth generated by the actual pre-allocated flow) - bandwidth generated by flows other than the pre-allocated flow (bandwidth generated by flow c); pre-allocated flow list: [a].
[0126] Step 208: Call the first target edge node to feed back the target live stream.
[0127] In actual applications, after determining the first target edge node, the first target edge node can be called to return the target live stream to the source, and the playback address corresponding to the target live stream on the first target edge node can be fed back to the user. The user requests the target live stream from the first target edge node based on the playback address, and then the first target edge node feeds back the target live stream to the user.
[0128] It should be noted that the above method can be used for processing regardless of whether the scheduling request is the first scheduling request. However, in order to avoid repeated bandwidth prediction for the target live stream, the above processing is performed only for the first scheduling request. That is, in response to the scheduling request for the target live stream, before obtaining the historical bandwidth record associated with the target live stream, it also includes:
[0129] Determine whether the scheduling request is a first scheduling request, wherein the first scheduling request is the first scheduling request after pulling the stream;
[0130] If so, the step of obtaining the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream is executed.
[0131] Specifically, the first scheduling request is the first request for the target live stream after the anchor starts broadcasting, that is, the first scheduling request after pulling the stream.
[0132] In practical applications, the scheduling system can record the number of scheduling requests for the target live stream and determine whether the scheduling request is the first scheduling request based on the scheduling number. If the scheduling request is the first scheduling request, the historical bandwidth record associated with the target live stream is obtained in response to the scheduling request for the target live stream. In this way, it is avoided that the historical bandwidth record needs to be obtained and the bandwidth prediction is performed every time a scheduling request for the target live stream is received, which reduces the amount of data processing and avoids resource waste.
[0133] Optionally, in the case where the scheduling request is not the first scheduling request, the remaining bandwidth allowed to be undertaken by the first target edge node can also be compared with the bandwidth threshold, and the scheduling strategy is determined according to the comparison result. That is, after determining whether the scheduling request is the first scheduling request, it also includes:
[0134] If not, comparing the remaining bandwidth allowed to be undertaken by the first target edge node with the bandwidth threshold;
[0135] When the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, the excess bandwidth corresponding to the target live stream is calculated according to the currently used bandwidth generated by the target live stream;
[0136] Compare the excess bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the second target edge node;
[0137] Calling the second target edge node to feed back the target live stream;
[0138] In a case where the remaining bandwidth allowed to be undertaken by the first target edge node is higher than the bandwidth threshold, the first target edge node is called to feed back the target live stream.
[0139] Specifically, the bandwidth threshold is a pre-set bandwidth used to measure whether the remaining bandwidth is sufficient for scheduling. The excess bandwidth refers to the bandwidth that is predicted to be generated by the target live stream in the future.
[0140] In actual applications, when the scheduling request is not the first scheduling request, the first target edge node has begun to feed back the target live stream to the user. At this time, the remaining bandwidth of the first target edge node can be compared with the bandwidth threshold to determine whether the first target edge node can continue to be scheduled. If the remaining bandwidth is higher than the bandwidth threshold, it means that the remaining bandwidth of the first target edge node is sufficient and can continue to be called to feed back the target live stream to the user; if the remaining bandwidth is lower than the bandwidth threshold or lower, it means that the remaining bandwidth of the first target edge node is insufficient. The excess bandwidth corresponding to the target live stream can be calculated based on the current used bandwidth generated by the target live stream, and compared with the remaining bandwidth allowed to be undertaken by each edge node based on the excess bandwidth. The edge node with a remaining bandwidth higher than the excess bandwidth is determined as the second target edge node, and the second target edge node feeds back the target live stream.
[0141] Since the remaining bandwidth update delay is long, the actual remaining bandwidth is lower than the obtained remaining bandwidth. Setting a bandwidth threshold can avoid node overload caused by large bandwidth delays, thereby avoiding interruptions and improving user stickiness and efficiency.
[0142] It should be noted that, based on the current used bandwidth generated by the target live stream, the excess bandwidth corresponding to the target live stream can be calculated by: multiplying the current used bandwidth with the first set value to obtain the excess bandwidth corresponding to the target live stream. For example, if the first set value is 0.5 and the current used bandwidth is 7G, the excess bandwidth is 3.5G. It can also be: subtracting the current used bandwidth from the second set value to obtain the excess bandwidth corresponding to the target live stream. For example, if the second set value is 2G and the current used bandwidth is 7G, the excess bandwidth is 5G.
[0143] In addition, the process of calling the second target edge node to feed back the target live stream is the same as the process of calling the first target edge node to feed back the target live stream. To avoid repetition, it will not be repeated here.
[0144] Optionally, when the scheduling request is not the first scheduling request, the remaining bandwidth allowed to be undertaken by the first target edge node can be directly compared with the bandwidth threshold, so that the process can be simplified, thereby reducing the amount of data processing and improving scheduling efficiency.
[0145] Optionally, when the scheduling request is not the first scheduling request, it is also possible to first determine whether the currently used bandwidth generated by the target live stream is greater than the predicted bandwidth corresponding to the target live stream, and then execute the corresponding scheduling strategy according to the judgment structure. That is, when the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, before calculating the excess bandwidth of the target live stream according to the currently used bandwidth generated by the target live stream, it also includes:
[0146] Obtaining a currently used bandwidth generated by the target live stream on the first target edge node;
[0147] Determine whether the currently used bandwidth generated by the target live stream is greater than the predicted bandwidth corresponding to the target live stream;
[0148] If so, determining whether the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold;
[0149] If not, the first target edge node is called to feed back the target live stream.
[0150] In practical applications, when the scheduling request is a non-initial scheduling request, the first target edge node has begun to feed back the target live stream for the user. At this time, the current used bandwidth generated by the target live stream on the first target edge node can be obtained first, such as from the service status information of the first target edge node. Then the current used bandwidth generated by the target live stream is compared with the predicted bandwidth corresponding to the target live stream. If the current used bandwidth is lower than or equal to the predicted bandwidth, it means that the remaining bandwidth of the first target edge node is sufficient, and it can continue to be called to feed back the target live stream for the user, that is, call the first target edge node to feed back the target live stream. If the current used bandwidth is greater than the predicted bandwidth, it is necessary to perform the step of judging whether the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, and further determine whether the remaining bandwidth of the first target edge node is sufficient. In this way, the current used bandwidth is first compared with the predicted bandwidth. When the current used bandwidth is not greater than the predicted bandwidth, the first target edge node is quickly called. When the current used bandwidth is greater than the predicted bandwidth, the remaining bandwidth of the first target edge node is continued to be judged to be sufficient. Double judgment can improve the judgment accuracy, thereby improving the reliability of live stream scheduling.
[0151] See also Figure 3 , Figure 3 A schematic diagram of a processing process of a live streaming scheduling method provided by an embodiment of the present application is shown:
[0152] ① The machine status service periodically collects the current used bandwidth of all flows on all edge nodes (node A, node B, and node C) and updates the service status information stored in the machine status service.
[0153] ② The user makes a scheduling request, obtains the playback address, and requests stream a. (Assume that this is the first user to request stream a after the broadcast starts).
[0154] ③ The scheduling system can select node A or node B based on regional coverage. The scheduling system queries the flow heat system, which predicts based on historical bandwidth records and returns the predicted bandwidth of flow a, such as 7G. The service status information of nodes A and B is queried, and it is found that the remaining bandwidth of node A is 10G and the remaining bandwidth of node B is 5G, so node A is selected for scheduling, and the service status information of node A in the machine status service is updated. The playback address on the user's machine A is returned.
[0155] ④At this time, another user requests stream a and queries the service status information of each node. It is found that node A has pre-allocated stream a. Then, provided that node A does not exceed the predicted bandwidth, all subsequent streams a are scheduled to node A. When the current used bandwidth flow of stream a exceeds the predicted bandwidth, that is, the number of people watching in real time exceeds the pre-allocated predicted bandwidth and the remaining bandwidth of node A is lower than the bandwidth threshold, the target edge node (selection point) is reselected. Assuming that the predicted bandwidth of stream a is 7G, theoretically the remaining bandwidth of node A is 3G, but since other subsequent streams will also be scheduled to node A, occupying the remaining 3G bandwidth of the stream, the remaining bandwidth of node A is insufficient. In fact, all 7G has been used up, and subsequent requests for stream a will enter ⑤.
[0156] ⑤ In the process of reselecting the node, excess bandwidth = current bandwidth * 0.5 = 7G * 0.5 = 3.5G. First, it is predicted that the bandwidth will increase by 50% in the future. Among the remaining edge nodes, the target edge node is selected according to the requirement that the remaining bandwidth is greater than the excess bandwidth. Assume that node C is selected and the service status information of C is updated. The playback address of machine C is returned to the user.
[0157] ⑥ For subsequent requests for flow a, the service status information of each edge node in the machine status system is queried, and it is found that both node A and node C have pre-allocated records of flow a, but the remaining bandwidth of node A is very low, so it will be scheduled to node C. By analogy, as the real-time bandwidth (currently used bandwidth) increases, the number of target edge nodes called will increase dynamically, and no redundant back-to-source will be generated.
[0158] The live stream scheduling method provided by the present application obtains the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream; based on the historical bandwidth record, the bandwidth of the target live stream is predicted to obtain the predicted bandwidth corresponding to the target live stream; the predicted bandwidth is compared with the remaining bandwidth allowed to be undertaken by each edge node to determine the first target edge node; the first target edge node is called to feedback the target live stream. Through the historical bandwidth record, the bandwidth that may be generated by the target live stream is predicted, that is, the predicted bandwidth. In this way, the popularity change of the live stream is considered during scheduling, and it is known how much bandwidth a stream may generate in the future. The edge nodes with sufficient remaining bandwidth are called as much as possible, which can reduce the number of edge nodes called for the same live stream and avoid the problem of increased back-to-source. Moreover, since the edge nodes with sufficient remaining bandwidth are allocated to the live stream, overload of edge nodes can be avoided to a certain extent.
[0159] For example, if the predicted bandwidth of a live stream is 10G, then among the edge nodes that meet the remaining bandwidth of 5G and 15G respectively, the edge node with the remaining bandwidth of 15G will be preferentially called to avoid the problem of too many back-to-source calls. In addition, recording the pre-allocated status of the edge node and updating the service status information can prevent scheduling to the edge node with the remaining bandwidth of 15G. However, when the number of viewers has not yet increased, other streams are allocated to the edge node and the remaining bandwidth is consumed.
[0160] Corresponding to the above method embodiment, the present application also provides a live streaming scheduling device embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of a live streaming scheduling device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:
[0161] The acquisition module 402 is configured to acquire a historical bandwidth record associated with the target live stream in response to a scheduling request for the target live stream;
[0162] The prediction module 404 is configured to perform bandwidth prediction on the target live stream based on the historical bandwidth record to obtain a predicted bandwidth corresponding to the target live stream;
[0163] The determination module 406 is configured to compare the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node, and determine the first target edge node;
[0164] The feedback module 408 is configured to call the first target edge node to feed back the target live stream.
[0165] Optionally, the device further comprises a collection module configured to:
[0166] Collect the currently used bandwidth generated by each live stream pushed by each edge node;
[0167] For each edge node, the service status information of the current edge node is updated according to the currently used bandwidth generated by each live stream pushed by the current edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node.
[0168] Optionally, the acquisition module is further configured to:
[0169] For each live stream pushed by the current edge node, determine the target bandwidth corresponding to the current live stream according to the current used bandwidth and predicted bandwidth generated by the current live stream;
[0170] The service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream.
[0171] Optionally, the acquisition module is further configured to:
[0172] Subtract the total bandwidth allowed to be undertaken by the current edge node from the sum of the target bandwidths corresponding to each live stream to obtain an updated remaining bandwidth;
[0173] Based on the updated remaining bandwidth, the service status information of the current edge node is updated.
[0174] Optionally, the prediction module 404 is further configured to:
[0175] Acquire multiple historical target bandwidths corresponding to a target anchor from the historical bandwidth record, wherein the target anchor is an anchor associated with a target live stream;
[0176] The multiple historical target bandwidths are input into a pre-trained bandwidth prediction model to obtain the predicted bandwidth corresponding to the target live stream.
[0177] Optionally, the determining module 406 is further configured to:
[0178] Acquire service status information of each edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node;
[0179] The edge node whose remaining bandwidth is greater than the predicted bandwidth is determined as the first target edge node.
[0180] Optionally, the device further includes a judgment module configured to:
[0181] Determine whether the scheduling request is a first scheduling request, wherein the first scheduling request is the first scheduling request after pulling the stream;
[0182] If so, the step of obtaining the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream is executed.
[0183] Optionally, the device further comprises a comparison module configured to:
[0184] If not, comparing the remaining bandwidth allowed to be undertaken by the first target edge node with the bandwidth threshold;
[0185] When the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, the excess bandwidth corresponding to the target live stream is calculated according to the currently used bandwidth generated by the target live stream;
[0186] Compare the excess bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the second target edge node;
[0187] The second target edge node is called to feed back the target live stream.
[0188] Optionally, the comparison module is further configured to:
[0189] Obtaining a currently used bandwidth generated by the target live stream on the first target edge node;
[0190] Determine whether the currently used bandwidth generated by the target live stream is greater than the predicted bandwidth corresponding to the target live stream;
[0191] If so, it is determined whether the remaining bandwidth allowed to be taken over by the first target edge node reaches the bandwidth threshold.
[0192] Optionally, the device further includes an updating module configured to:
[0193] According to the predicted bandwidth corresponding to the target live stream, the service status information of the first target edge node is updated.
[0194] The live streaming scheduling device provided by the application predicts the bandwidth that the target live streaming may generate through historical bandwidth records, that is, predicts the bandwidth. In this way, the popularity change of the live streaming is taken into account during scheduling, and it is known how much bandwidth a stream may generate in the future. The edge nodes with sufficient remaining bandwidth are called as much as possible, which can reduce the number of edge nodes called for the same live streaming and avoid the problem of increased back-source. Moreover, since the edge nodes with sufficient remaining bandwidth are allocated to the live streaming, edge node overload can be avoided to a certain extent.
[0195] The above is a schematic scheme of a live stream scheduling device of this embodiment. It should be noted that the technical scheme of the live stream scheduling device and the technical scheme of the live stream scheduling method described above belong to the same concept, and the details of the technical scheme of the live stream scheduling device that are not described in detail can be found in the description of the technical scheme of the live stream scheduling method described above.
[0196] Figure 5 The structure block diagram of a computing device provided according to an embodiment of the present application is shown. The parts of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0197] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0198] In one embodiment of the present application, the above-mentioned parts of the computing device 500 and Figure 5 Other parts not shown in the figure may also be connected to each other, for example, through a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other parts as needed.
[0199] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 may also be a mobile or stationary server.
[0200] Among them, when the processor 520 executes the computer instructions, the steps of the live streaming scheduling method are implemented.
[0201] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the live streaming scheduling method described above are of the same concept, and the details of the technical scheme of the computing device that are not described in detail can be found in the description of the technical scheme of the live streaming scheduling method described above.
[0202] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the live stream scheduling method as described above.
[0203] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the live streaming scheduling method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the live streaming scheduling method described above.
[0204] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0205] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0206] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0207] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0208] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A live streaming scheduling method, characterized in that: include: In response to a scheduling request for a target live stream, obtaining a historical bandwidth record associated with the target live stream; Based on the historical bandwidth record, a bandwidth prediction is performed on the target live stream to obtain a predicted bandwidth corresponding to the target live stream; Compare the predicted bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the first target edge node; Calling the first target edge node to feed back the target live stream; The step of performing bandwidth prediction on the target live stream based on the historical bandwidth record to obtain the predicted bandwidth corresponding to the target live stream includes: Acquire multiple historical target bandwidths corresponding to a target anchor from the historical bandwidth record, wherein the target anchor is an anchor associated with a target live stream; The multiple historical target bandwidths are input into a pre-trained bandwidth prediction model to obtain the predicted bandwidth corresponding to the target live stream.
2. The method according to claim 1, characterized in that: Before the method of responding to the scheduling request for the target live stream and obtaining the historical bandwidth record associated with the target live stream, the method further includes: Collect the currently used bandwidth generated by each live stream pushed by each edge node; For each edge node, the service status information of the current edge node is updated according to the currently used bandwidth generated by each live stream pushed by the current edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node.
3. The method according to claim 2, characterized in that The updating of the service status information of the current edge node according to the currently used bandwidth generated by each live stream pushed by the current edge node includes: For each live stream pushed by the current edge node, determine the target bandwidth corresponding to the current live stream according to the current used bandwidth and predicted bandwidth generated by the current live stream; The service status information of the current edge node is updated according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream.
4. The method according to claim 3, characterized in that The updating of the service status information of the current edge node according to the total bandwidth allowed to be undertaken by the current edge node and the target bandwidth corresponding to each live stream includes: Subtract the total bandwidth allowed to be undertaken by the current edge node from the sum of the target bandwidths corresponding to each live stream to obtain an updated remaining bandwidth; Based on the updated remaining bandwidth, the service status information of the current edge node is updated.
5. The method according to claim 1, characterized in that The step of comparing the predicted bandwidth with the remaining bandwidth allowed to be taken by each edge node to determine the first target edge node includes: Acquire service status information of each edge node, wherein the service status information includes the remaining bandwidth allowed to be undertaken by the edge node; The edge node whose remaining bandwidth is greater than the predicted bandwidth is determined as the first target edge node.
6. The method according to claim 1, characterized in that In response to a scheduling request for a target live stream, Before obtaining the historical bandwidth record associated with the target live stream, the method further includes: Determine whether the scheduling request is a first scheduling request, wherein the first scheduling request is the first scheduling request after pulling the stream; If so, the step of obtaining the historical bandwidth record associated with the target live stream in response to the scheduling request for the target live stream is executed.
7. The method according to claim 6, characterized in that After determining whether the scheduling request is a first scheduling request, the method further includes: If not, comparing the remaining bandwidth allowed to be undertaken by the first target edge node with the bandwidth threshold; When the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, the excess bandwidth corresponding to the target live stream is calculated according to the currently used bandwidth generated by the target live stream; Compare the excess bandwidth with the remaining bandwidth allowed to be taken by each edge node, and determine the second target edge node; The second target edge node is called to feed back the target live stream.
8. The method according to claim 7, characterized in that Before calculating the excess bandwidth of the target live stream according to the current used bandwidth generated by the target live stream when the remaining bandwidth allowed to be undertaken by the first target edge node reaches the bandwidth threshold, the method further includes: Obtaining a currently used bandwidth generated by the target live stream on the first target edge node; Determine whether the currently used bandwidth generated by the target live stream is greater than the predicted bandwidth corresponding to the target live stream; If so, it is determined whether the remaining bandwidth allowed to be taken over by the first target edge node reaches the bandwidth threshold.
9. The method according to claim 1, characterized in that: After comparing the predicted bandwidth with the remaining bandwidth allowed to be taken over by each edge node and determining the first target edge node, the method further includes: According to the predicted bandwidth corresponding to the target live stream, the service status information of the first target edge node is updated.
10. A live streaming scheduling device, characterized in that: include: An acquisition module, configured to acquire a historical bandwidth record associated with a target live stream in response to a scheduling request for the target live stream; The prediction module is configured to perform bandwidth prediction on the target live stream based on the historical bandwidth record to obtain the predicted bandwidth corresponding to the target live stream, wherein the bandwidth prediction on the target live stream based on the historical bandwidth record to obtain the predicted bandwidth corresponding to the target live stream includes: acquiring multiple historical target bandwidths corresponding to a target anchor from the historical bandwidth record, wherein the target anchor is an anchor associated with the target live stream; inputting the multiple historical target bandwidths into a pre-trained bandwidth prediction model to obtain the predicted bandwidth corresponding to the target live stream; A determination module is configured to compare the predicted bandwidth with the remaining bandwidth allowed to be undertaken by each edge node, and determine a first target edge node; The feedback module is configured to call the first target edge node to feed back the target live stream.
11. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer instructions, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
