Live broadcast stream scheduling method, apparatus and device, and computer readable storage medium

By scheduling live streams using a hash algorithm across server nodes, the problem of increased back-to-origin costs caused by server traffic overload is solved, achieving load balancing and cost reduction.

CN121397276APending Publication Date: 2026-01-23BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511594142.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

In existing online live streaming, when server traffic load exceeds the limit, it leads to increased back-to-origin costs.

Method used

When the traffic load on the first server node exceeds a limit, the target live stream is determined using a first hash algorithm, and then scheduled to the second server node based on a second hash algorithm to alleviate the load pressure.

Benefits of technology

It effectively reduced the cost of returning to the source in live streaming services, achieved balanced scheduling of server load, and avoided resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121397276A_ABST
    Figure CN121397276A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of live broadcast services, in particular to a live broadcast stream scheduling method, device and equipment and a computer readable storage medium. According to the invention, when the flow load of the first server node exceeds the limit value, the live broadcast stream needing to be transferred out in the first server node is determined based on the first Hash algorithm, and the target transfer-out node of the live broadcast stream is determined again based on the second Hash algorithm; according to the embodiment of the invention, the live broadcast stream needing to be transferred out in the first server node is scheduled to the target transfer-out node to relieve the load pressure of the first server node, and the scheduled live broadcast stream can realize networking on the target transfer-out node, so that the problem that the source returning cost is increased due to non-networking traffic can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of live streaming service, and particularly relates to a live stream scheduling method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] The existing network live streaming push is usually based on a content delivery network (CDN), and according to the viewing demand of a user, a live stream is pulled by a server and distributed to the terminal of the user. For a single server, if the server does not cache a certain live stream, the live stream needs to be pulled again from an upper server or a host push server when a user's viewing request for the live stream is received, which is called source retrieval.

[0003] When a server distributes a certain live stream, the more users watching the live stream, the more traffic load the server needs to bear. When the traffic load borne by the server exceeds the upper limit of the load that the server can bear, if the traffic cannot be effectively scheduled, the over-limit traffic cannot be distributed in the server participating in networking, but is passively distributed to other servers, and the other servers need to pull the live stream again, increasing the source retrieval cost.

[0004] Therefore, an effective traffic scheduling method is needed to reduce the source retrieval cost in live streaming service. SUMMARY

[0005] To solve the above technical problems, the present disclosure provides a live stream scheduling method, device, equipment and computer readable storage medium to reduce the source retrieval cost in live streaming service.

[0006] In a first aspect, the embodiments of the present disclosure provide a live stream scheduling method, comprising: When the traffic load value of a first server node in a plurality of preset server nodes is greater than a preset load threshold, determining at least one target live stream in a plurality of to-be-scheduled live streams corresponding to the first server node based on a first hash algorithm, the first server node being configured to process an acquisition request of a to-be-scheduled live stream in the plurality of to-be-scheduled live streams except the target live stream; Hash computing the identifier of each target live stream in the at least one target live stream based on a second hash algorithm to determine a second server node corresponding to each target live stream, the second server node being a server node in the plurality of preset server nodes except the first server node; Scheduling the at least one target live stream from the first server node to the second server node, the second server node being configured to process a live stream acquisition request of the target live stream.

[0007] In a second aspect, the embodiments of the present disclosure provide a live stream scheduling apparatus, comprising: a first determining module configured to determine at least one target live stream in a plurality of to-be-scheduled live streams corresponding to a first server node based on a first hash algorithm when a traffic load value of the first server node in the plurality of preset server nodes is greater than a preset load threshold, the first server node being configured to process an acquisition request of a to-be-scheduled live stream in the plurality of to-be-scheduled live streams except the target live stream; a second determining module configured to perform hash calculation on an identifier of each target live stream in the at least one target live stream based on a second hash algorithm, and determine a second server node corresponding to each target live stream, the second server node being a server node in the plurality of preset server nodes except the first server node; a scheduling module configured to schedule the at least one target live stream from the first server node to the second server node, the second server node being configured to process a live stream acquisition request of the target live stream.

[0008] In a third aspect, the embodiments of the present disclosure provide a server, comprising: a memory; a processor; and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.

[0009] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method of the first aspect.

[0010] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product comprising a computer program or instructions, the computer program or instructions being executed by a processor to implement the live stream scheduling method as described above.

[0011] The live stream scheduling method, apparatus, device and computer readable storage medium provided by the embodiments of the present disclosure can determine a live stream to be transferred out of a first server node based on a first hash algorithm when a traffic load of the first server node exceeds a limit value, and re-determine a target transfer-out node of the live stream based on a second hash algorithm, so as to schedule the live stream to be transferred out of the first server node to the target transfer-out node to relieve the load pressure of the first server node, and the scheduled live stream can also realize networking on the target transfer-out node, thereby solving the problem of increased back-to-source cost caused by non-networking traffic. BRIEF DESCRIPTION OF DRAWINGS

[0012] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the drawings required to be used in the embodiments or the prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.

[0014] Figure 1 A live stream scheduling method flowchart provided by an embodiment of the present disclosure; Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure; Figure 3 A live stream scheduling method flowchart provided by another embodiment of the present disclosure; Figure 4 A structure schematic diagram of a live stream scheduling apparatus provided by an embodiment of the present disclosure; Figure 5 A structure schematic diagram of a server provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the drawings required to be used in the embodiments or the prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.

[0016] In the following description, many specific details are set forth in order to provide a thorough understanding of the present disclosure. However, the present disclosure can be practiced without the specific details. Obviously, the embodiments in the specification are only some embodiments of the present disclosure, not all embodiments.

[0017] An embodiment of the present disclosure provides a live stream scheduling method, which will be introduced below in combination with specific embodiments.

[0018] Figure 1 A live stream scheduling method flowchart provided by an embodiment of the present disclosure. The method can be applied to Figure 2 The application scenario shown in the figure includes multiple preset server nodes (for example, n1, n2, n3) and a scheduling control component 21 for scheduling live streams. The scheduling control component can be a component in any preset server node, or a component in a central server node other than the multiple preset server nodes.

[0019] The following will be described in combination with Figure 2The application scenario shown, to Figure 1 The live streaming scheduling method shown is introduced, and the specific steps thereof include the following: S101, when a traffic load value of a first server node in a plurality of preset server nodes is greater than a preset load threshold, determining at least one target live stream in a plurality of to-be-scheduled live streams corresponding to the first server node based on a first hash algorithm.

[0020] The first server node is configured to process an acquisition request of a to-be-scheduled live stream in the plurality of to-be-scheduled live streams except the target live stream.

[0021] The plurality of preset server nodes refer to server nodes pre-planned in a content delivery network (CDN) distributed cluster and included in a live networking resource pool, for example Figure 2 The server nodes n1, n2 and n3 shown.

[0022] Optionally, the preset load threshold is a load threshold set for the first server node alone or a load threshold set for the plurality of preset server nodes collectively.

[0023] Optionally, the preset load threshold can be set after the first server node has carried the plurality of to-be-scheduled live streams.

[0024] The traffic load value of the first server node is a load index value of a total bandwidth of live streams currently carried by the first server node, a number of live stream acquisition requests, etc. When the traffic load value of the first server node exceeds the preset load threshold, it represents that the load pressure of the current first server node is large, which exceeds an ideal load level, and part of the live streams need to be scheduled to other server nodes to reduce the load pressure of the first server node.

[0025] The plurality of to-be-scheduled live streams refer to live streams currently carried by the first server node. Before the live streams are scheduled, the first server node processes acquisition requests of the plurality of to-be-scheduled live streams, resulting in that the traffic load value exceeds the preset load threshold.

[0026] The target live stream is a live stream filtered out by the first hash algorithm and needed to be migrated from the first server node. After the scheduling control component schedules at least one target live stream to other nodes, the first server node only processes the remaining at least one to-be-scheduled live stream, and the traffic load value of the first server node is less than the preset load threshold.

[0027] S102, performing hash calculation on an identifier of each target live stream in the at least one target live stream based on a second hash algorithm to determine a second server node corresponding to each target live stream respectively.

[0028] The second server node is a server node other than the first server node among the plurality of preset server nodes.

[0029] Optionally, when the preset load threshold is a load threshold set for the plurality of preset server nodes collectively, the traffic load value of the second server node is less than the preset load threshold.

[0030] Optionally, when the preset load threshold is a load threshold set for the first server node individually, the traffic load value of the second server node is less than the load threshold corresponding to the second server node.

[0031] The second hash algorithm can be a consistent hash algorithm, used to allocate the at least one target live stream to the second server node.

[0032] Optionally, the second hash algorithm is different from the first hash algorithm, so as to ensure that the target live stream is not allocated back to the first server node.

[0033] Each live stream corresponds to a unique identifier, which can be a unique string, for example. For each target live stream, the identifier of the target live stream is mapped to a specific value by the second hash algorithm, which is matched with the node identifier of the server node to determine the second server node corresponding to the target live stream.

[0034] S103, scheduling the at least one target live stream from the first server node to the second server node.

[0035] The second server node is configured to process the live stream acquisition request of the target live stream.

[0036] The scheduling control component adjusts the targeting rule of the at least one target live stream, and modifies the targeting rule that originally directs the acquisition request of the at least one target live stream to the first server node to the targeting rule that directs the acquisition request of the at least one target live stream to the second server node.

[0037] Therefore, when any subsequent server node receives an acquisition request for the at least one target live stream, the acquisition request will be sent to the second server node, and the second server node will process the acquisition request.

[0038] The embodiments of the present disclosure can solve the problem of increased back source cost caused by non-networking traffic by scheduling the live streams that need to be transferred out of the first server node to the target transfer-out node to relieve the load pressure of the first server node when the traffic load of the first server node exceeds a defined value, and the scheduled live streams can also realize networking on the target transfer-out node.

[0039] It can be understood that when at least one target live stream is scheduled from the first server node to the second server node, the traffic load value of the second server node may exceed the preset load threshold value, at which time the second server node with the traffic load value exceeding the preset load threshold value is regarded as the first server node, and S101-S103 are executed. In this way, until the traffic load values of the plurality of preset server nodes are less than or equal to the preset load threshold value; or until the difference between the traffic load value of each preset server node and the average value of the traffic load values of the plurality of preset server nodes is less than the preset difference value, and the plurality of preset server nodes reach load balance.

[0040] The specific implementation of determining at least one target live stream is introduced below.

[0041] Specifically, the identifier of each of the plurality of live streams to be scheduled is hashed based on the first hash algorithm to obtain a first hash value corresponding to each live stream to be scheduled; and a first target range in the first value range is determined according to the live stream scheduling ratio of the first server node.

[0042] The first hash algorithm is used to map the identifier of the live stream to be scheduled to the first value range. That is, the identifier of the plurality of live streams to be scheduled will be converted into a plurality of first hash values distributed in the first value range after the first hash algorithm.

[0043] The live stream scheduling ratio is used to determine the number of live streams allowed to be scheduled from the first server node, so that the ratio of the first target range to the first value range meets the live stream scheduling ratio.

[0044] Specifically, the live stream scheduling ratio is determined by the traffic load value of the first server node and the preset load value.

[0045] First, the difference between the traffic load value of the first server node and the preset load threshold value is calculated to obtain a traffic difference value. Next, the ratio of the traffic difference value to the preset load threshold value is calculated to obtain the live stream scheduling ratio.

[0046] It can be understood that, since the traffic load value of the first server node is greater than the preset load threshold, the traffic difference value obtained by subtracting the preset load threshold from the traffic load value of the first server node is a positive number, and the live stream scheduling ratio further calculated is also a positive number.

[0047] Therefore, the live stream scheduling ratio reflects the degree to which the current traffic load value of the first server node exceeds the preset load threshold, that is, if the traffic load value of the first server node needs to be reduced to below the preset load threshold, the traffic load of the target live stream that needs to be scheduled to other server nodes.

[0048] For example, the preset load threshold is 5G, the current traffic load value of the first server node is 6G, the traffic difference value is 1G, and the live stream scheduling ratio is the ratio of 1G to 5G, that is, 20%.

[0049] According to the live stream scheduling ratio, the proportion of the target live stream quantity to the quantity of live streams to be scheduled is calculated. Since the first hash algorithm hashes the first hash value corresponding to the live stream to be scheduled to the first value range, the first target range is the product of the first value range and the live stream scheduling ratio, and the probability that the first hash value belongs to the first target range is consistent with the live stream scheduling ratio. Therefore, the proportion of the live stream to be scheduled (i.e., the target live stream) whose first hash value belongs to the first target range to the live stream to be scheduled is also consistent with the limitation of the live stream scheduling ratio.

[0050] For example, the live streams currently carried by the first server node are S1, S2, S3, S4, and S5, the first value range is 0-1, and the live stream scheduling ratio is 20%. Assuming that the first target range is 0-0.2, the first hash values corresponding to S1-S5 are calculated as 0.12, 0.31, 0.57, 0.74, and 0.96, respectively. S1 corresponding to the first hash value of 0.12 is determined as the target live stream.

[0051] The embodiments of the present disclosure ensure that the proportion of the target live stream to the live stream to be scheduled is consistent with the degree to which the current traffic load value of the first server node exceeds the preset load threshold by calculating the live stream scheduling ratio corresponding to the first server node, implement on-demand scheduling, avoid excessive target live streams that cause resource waste of the first server node, and improve the accuracy of live stream scheduling.

[0052] On the basis of any of the foregoing embodiments, for determining the second server node corresponding to each target live stream, one possible implementation manner is that: obtaining the node identifier of each server node in the plurality of preset server nodes except the first server node; performing hash calculation on the identifier of each target live stream in the at least one target live stream based on a second hash algorithm to obtain the second hash value corresponding to each target live stream; for each target live stream, determining the server node corresponding to the node identifier with the minimum difference value from the second hash value as the second server node corresponding to the target live stream.

[0053] Each server node in the plurality of preset server nodes is configured with a unique node identifier. After obtaining the second hash value through the second hash algorithm for a target live stream, there is a node identifier of a server node closest to the second server node, and the node is determined as the second server node, and the target live stream is scheduled to the second server node.

[0054] It can be understood that the second server node is a server node in the plurality of preset server nodes except the first server node, and when calculating the difference value between the second hash value and each node identifier, the node identifier of the first server node does not need to be considered.

[0055] In the foregoing method, the hash calculation on the identifier of each target live stream based on the second hash algorithm comprises: arranging characters included in the identifier of the target live stream in reverse order to obtain a reverse identifier of the target live stream; and performing hash calculation on the reverse identifier based on the second hash algorithm.

[0056] Optionally, the first hash algorithm and the second hash algorithm are different, and the identifier of the target live stream can be directly subjected to hash calculation to obtain the second hash value, so that the first hash value and the second hash value of the same target live stream are different.

[0057] If the first hash algorithm and the second hash algorithm are the same, the characters included in the identifier of the target live stream need to be arranged in reverse order to obtain a reverse identifier, and the reverse identifier is subjected to hash calculation based on the second hash algorithm to obtain the second hash value different from the first hash value.

[0058] Alternatively, if the first hash algorithm and the second hash algorithm are different, the characters included in the identifier of the target live stream can also be arranged in reverse order to obtain a reverse identifier, and the reverse identifier is subjected to hash calculation based on the second hash algorithm to obtain the second hash value different from the first hash value.

[0059] The embodiments of this disclosure provide corresponding calculation methods based on whether the first hash algorithm and the second hash algorithm are the same or different, so that the live stream scheduling method provided by this disclosure can be adapted to different computing scenarios and improve the flexibility of the live stream scheduling method.

[0060] In some embodiments, a preset load ratio can be set for a cluster containing multiple preset server nodes, thereby enabling overall control of the load status in the cluster.

[0061] Correspondingly, the preset load threshold is the product of the preset maximum load value of the server node and the preset load ratio. If the traffic load value of each server node is controlled below the preset load threshold, the overall load traffic of the cluster containing multiple preset server nodes can be controlled below the preset load ratio of the preset overall load maximum value of the cluster.

[0062] The overall load traffic of the cluster is the sum of the traffic load values ​​of multiple preset server nodes, and the preset maximum overall load of the cluster is the sum of the preset maximum load values ​​of multiple preset server nodes.

[0063] For example, the preset load threshold of the first server node is the product of the preset maximum load value and the preset load ratio of the first server node.

[0064] If it is necessary to control the traffic load in the cluster below the preset load ratio, then when the overall load traffic of the cluster exceeds the product of the preset overall load maximum and the preset load ratio, the multiple live streams in the cluster need to be scheduled as a whole, and at least one live stream needs to be scheduled to a server node in another cluster.

[0065] Figure 3 A flowchart of a live stream scheduling method provided in another embodiment of this disclosure is shown below. Figure 3 As shown, the method includes the following steps: S301. Based on the third hash algorithm, perform hash calculation on the identifiers of multiple live streams to obtain the third hash value corresponding to each live stream.

[0066] Among them, multiple live streams are live streams carried by multiple preset server nodes. The third hash algorithm is used to map the identifier of the live stream to the second value range.

[0067] For example, such as Figure 2 The server node n1 corresponds to live streams S1, S2, and S3; server node n2 corresponds to live streams S4, S5, and S6; and server node n3 corresponds to live streams S7, S8, S9, and S10. The identifiers of live streams S1 through S10 are hashed using the third hash algorithm to obtain the corresponding third hash values ​​for each stream.

[0068] Taking the second value range of 0-1 as an example, the third hash values corresponding to S1-S10 are 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0.

[0069] S302, determining a plurality of to-be-scheduled live streams from the plurality of live streams according to the third hash values.

[0070] The ratio of the number of the plurality of to-be-scheduled live streams to the number of the plurality of live streams is a preset load ratio.

[0071] The to-be-scheduled live streams are live streams that remain in the current cluster for networking after being screened by the third hash algorithm, for example, the plurality of to-be-scheduled live streams corresponding to the first server node.

[0072] Specifically, a second target range in the second value range is determined according to the preset load ratio, the ratio of the second target range to the second value range is the preset load ratio, and at least one live stream in the second target range with the third hash value is determined as a to-be-scheduled live stream.

[0073] Since the third hash algorithm hashes the third hash value corresponding to the live stream to the second value range, the second target range is controlled to be the product of the second value range and the preset load ratio, and the probability of the third hash value belonging to the second target range meets the preset load ratio. Therefore, the proportion of the live stream with the third hash value belonging to the second target range in the total number of live streams also meets the limitation of the preset load ratio.

[0074] Optionally, for live streams other than the plurality of to-be-scheduled live streams, the node initiating the acquisition request of the live stream processes the acquisition request by itself.

[0075] For example, the preset load ratio is set to 50%, the second value range is 0-0.5, and based on the third hash values corresponding to S1-S10 calculated in S301, it is determined that the to-be-scheduled live streams include S1-S5.

[0076] Live streams S6-S10 are processed by the node initiating the acquisition request of the live stream. Taking live stream S6 as an example, before being screened based on the third hash value, live stream S6 is networked at server node n2, and the acquisition request of S6 is sent to server node n2 for processing after being received by server node n4 (or other server nodes). After being screened by the third hash value, the acquisition request of live stream S6 is no longer sent to server node n2 for processing after being received by server node n4, but is processed by the server node itself (server node n4) receiving the acquisition request of live stream S6.

[0077] Therefore, the plurality of preset server nodes only need to process the acquisition request of the to-be-scheduled live stream, and the sum of the load traffic values is less than the sum of the load traffic values before screening.

[0078] S303, when the traffic load value of the first server node in the plurality of preset server nodes is greater than a preset load threshold, determining at least one target live stream in the plurality of to-be-scheduled live streams corresponding to the first server node based on a first hash algorithm.

[0079] Specifically, the identification of the plurality of to-be-scheduled live streams is respectively hashed based on the first hash algorithm to obtain a first hash value corresponding to each to-be-scheduled live stream; and a first target range in the first value range is determined according to the live stream scheduling ratio of the first server node.

[0080] After determining that the to-be-scheduled live streams include S1-S5, since the server node n1 still corresponds to the live streams S1-S3, the load pressure has not decreased; and the server node n3 does not correspond to any to-be-scheduled live stream, and the load pressure between nodes is not balanced.

[0081] Taking the server node n1 as the first server node as an example, the traffic load value of the server node n1 is greater than the preset load threshold, and the live stream scheduling ratio is 30%, the first value range is 0-1, and the first target range is 0-0.3. The identification of S1-S3 is respectively hashed based on the first hash algorithm, and the first hash value corresponding to S1-S3 is 0.1, 0.5 and 0.8 in turn, that is, the live stream S1 is determined as the target live stream.

[0082] S304, hashing the identification of each target live stream in the at least one target live stream based on a second hash algorithm to determine a second server node corresponding to each target live stream.

[0083] S305, scheduling the at least one target live stream from the first server node to the second server node.

[0084] Taking the live stream S1 as the target live stream as an example, the acquisition request of S1 is no longer processed by the server node n1, at this time the server node n1 is used to process the live streams S2 and S3, and the load pressure is reduced relative to that before the target live stream is scheduled.

[0085] Further, the identification of the live stream S1 is hashed based on the second hash algorithm to determine the second server node of the live stream S1.

[0086] Suppose the second server node of the live stream S1 is the server node n3, the live stream S1 is scheduled to the server node n3, and any node receiving the acquisition request of the live stream S1 sends it to the server node n3 for processing.

[0087] The embodiments of the present disclosure ensure that the overall load condition of the plurality of preset server nodes is controllable, provide load space for live stream scheduling between subsequent nodes, and guarantee the stability of live stream scheduling, by controlling the overall load condition of the plurality of preset server nodes before live stream scheduling between the plurality of preset server nodes.

[0088] Figure 4 A structural diagram of a live stream scheduling device provided by the embodiments of the present disclosure is shown. The live stream scheduling device can be the scheduling control component as described in the above embodiments, or the live stream scheduling device can be a server node containing the scheduling control component. The live stream scheduling device provided by the embodiments of the present disclosure can perform the processing flow provided by the live stream scheduling method embodiments, as shown in Figure 4 The live stream scheduling device 40 includes a first determination module 41, a second determination module 42, and a scheduling module 43. The first determination module 41 is configured to determine at least one target live stream in the plurality of live streams to be scheduled corresponding to the first server node based on a first hash algorithm when the traffic load value of the first server node in the plurality of preset server nodes is greater than a preset load threshold, and the first server node is configured to process the acquisition request of the live stream to be scheduled other than the target live stream in the plurality of live streams to be scheduled. The second determination module 42 is configured to perform hash calculation on the identifier of each target live stream in the at least one target live stream based on a second hash algorithm, and determine the second server node corresponding to each target live stream, wherein the second server node is a server node other than the first server node in the plurality of preset server nodes. The scheduling module 43 is configured to schedule the at least one target live stream from the first server node to the second server node, and the second server node is configured to process the live stream acquisition request of the target live stream.

[0089] Optionally, the first determination module 41 includes a first calculation unit, a first determination unit, and a second determination unit. The first calculation unit is configured to perform hash calculation on the identifier of each live stream to be scheduled based on a first hash algorithm to obtain a first hash value corresponding to each live stream to be scheduled, and the first hash algorithm is configured to map the identifier of the live stream to be scheduled to a first value range. The first determination unit is configured to determine a first target range in the first value range according to a live stream scheduling proportion of the first server node, and the live stream scheduling proportion is configured to determine the number of live streams allowed to be scheduled from the first server node, and the proportion of the first target range to the first value range is the live stream scheduling proportion. The second determination unit is configured to determine that at least one live stream to be scheduled in the first hash value belonging to the first target range is at least one target live stream.

[0090] Optionally, the first determining module 41 further comprises a second calculating unit, configured to: before determining the target value range in the first value range according to the live stream scheduling proportion of the first server node, calculate a difference between the traffic load value of the first server node and the preset load threshold, to obtain a traffic difference value; and calculate a ratio between the traffic difference value and the preset load threshold, to obtain the live stream scheduling proportion.

[0091] Optionally, the preset load threshold is a product of the preset maximum load value of the first server node and a preset load proportion; and the live stream scheduling apparatus 40 further comprises a third determining module, the third determining module comprising a third calculating unit and a third determining unit; the third calculating unit is configured to perform hash calculation on the identifiers of the multiple live streams based on a third hash algorithm, to obtain a third hash value corresponding to each live stream; and the third determining unit is configured to determine multiple live streams to be scheduled in the multiple live streams according to the third hash values, a ratio between the number of the multiple live streams to be scheduled and the number of the multiple live streams being the preset load proportion.

[0092] Optionally, the third hash algorithm is configured to map the identifier of the live stream to the second value range; the third determining unit is configured to determine a second target range in the second value range according to the preset load proportion, a ratio between the second target range and the second value range being the preset load proportion; and determine at least one live stream whose third hash value belongs to the second target range as the live stream to be scheduled.

[0093] Optionally, the second determining module 42 comprises a reverse sequence arrangement unit and a fourth calculating unit; the reverse sequence arrangement unit is configured to arrange the characters included in the identifier of the target live stream in reverse sequence, to obtain a reverse identifier of the target live stream; and the fourth calculating unit is configured to perform hash calculation on the reverse identifier based on the second hash algorithm.

[0094] Optionally, the second determining module 42 is configured to: obtain the node identifier of each server node in the multiple preset server nodes except the first server node; perform hash calculation on the identifier of each target live stream in the at least one target live stream based on the second hash algorithm, to obtain a second hash value corresponding to each target live stream; and for each target live stream, determine the server node corresponding to the node identifier with the minimum difference value from the second hash value as the second server node corresponding to the target live stream.

[0095] Figure 4 The live stream scheduling apparatus of the illustrated embodiment can be used to execute the technical solutions of the above-mentioned method embodiments, and has similar principles and technical effects, which will not be described here in detail.

[0096] Figure 5 The server provided by the embodiments of the present disclosure is shown in a structural schematic diagram. The server can be a server node comprising the scheduling control component as described in the above embodiments. The server provided by the embodiments of the present disclosure can execute the processing flow provided by the live stream scheduling method embodiments, as shown inFigure 5 As shown, the server 50 comprises a memory 51, a processor 52, a computer program and a communication interface 53; wherein the computer program is stored in the memory 51 and is configured to be executed by the processor 52 to implement the live streaming scheduling method as described above.

[0097] In addition, the embodiments of the present disclosure further provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the live streaming scheduling method described in the above embodiments.

[0098] In addition, the embodiments of the present disclosure further provide a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement the live streaming scheduling method as described above.

[0099] It should be noted that, in this document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the identified element.

[0100] The above description is merely that of specific embodiments of the present disclosure, to enable a person skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Accordingly, the present disclosure is not to be limited to the embodiments described herein but is to be accorded the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A live stream scheduling method, characterized in that, The method includes: When the traffic load value of the first server node among multiple preset server nodes is greater than the preset load threshold, at least one target live stream is determined among multiple live streams to be scheduled corresponding to the first server node based on the first hash algorithm. The first server node is used to process the acquisition requests of the live streams to be scheduled other than the target live stream among the multiple live streams to be scheduled. The identifier of each target live stream in the at least one target live stream is hashed based on the second hash algorithm to determine the second server node corresponding to each target live stream. The second server node is a server node other than the first server node among the plurality of preset server nodes. The first server node schedules the at least one target live stream to the second server node, and the second server node is used to process the live stream acquisition request of the target live stream.

2. The method according to claim 1, characterized in that, The step of determining at least one target live stream among multiple live streams to be scheduled corresponding to the first server node based on the first hash algorithm includes: The identifiers of the multiple live streams to be scheduled are hashed based on the first hash algorithm to obtain the first hash value corresponding to each live stream to be scheduled. The first hash algorithm is used to map the identifier of the live stream to be scheduled to a first value range. The first target range in the first value range is determined based on the live stream scheduling ratio of the first server node. The live stream scheduling ratio is used to determine the number of live streams allowed to be scheduled from the first server node. The ratio of the first target range to the first value range is the live stream scheduling ratio. The first hash value is determined to be at least one of the live streams to be scheduled that belongs to the first target range, and this is determined to be the at least one target live stream.

3. The method according to claim 2, characterized in that, Before determining the target value range within the first value range based on the live stream scheduling ratio of the first server node, the method further includes: The traffic difference is obtained by subtracting the preset load threshold from the traffic load value of the first server node. The ratio of the traffic difference to the preset load threshold is calculated to obtain the live stream scheduling ratio.

4. The method according to any one of claims 1-3, characterized in that, The preset load threshold is the product of the preset maximum load value of the first server node and the preset load ratio; Before determining at least one target live stream among the multiple live streams to be scheduled corresponding to the first server node based on the first hash algorithm, the method further includes: The identifiers of multiple live streams are hashed using the third hash algorithm to obtain the third hash value corresponding to each live stream. The multiple live streams to be scheduled are determined based on the third hash value, and the ratio of the number of multiple live streams to be scheduled to the number of multiple live streams is the preset load ratio.

5. The method according to claim 4, characterized in that, The third hash algorithm is used to map the identifier of the live stream to a second value range. The step of determining the live stream to be scheduled among the multiple live streams based on the third hash value includes: The second target range in the second value range is determined according to the preset load ratio, and the ratio of the second target range to the second value range is the preset load ratio; At least one of the live streams whose third hash value belongs to the second target range is identified as the live stream to be scheduled.

6. The method according to any one of claims 1-3, characterized in that, The step of hashing the identifier of each target live stream in the at least one target live stream based on the second hash algorithm includes: The reverse identifier of the target live stream is obtained by reversing the order of the characters included in the identifier of the target live stream. The reverse identifier is hashed based on the second hash algorithm.

7. The method according to any one of claims 1-3, characterized in that, The step of hashing the identifier of each target live stream in the at least one target live stream based on the second hash algorithm to determine the second server node corresponding to each target live stream includes: Obtain the node identifier of each server node other than the first server node among the plurality of preset server nodes; The identifier of each target live stream in the at least one target live stream is hashed based on the second hash algorithm to obtain the second hash value corresponding to each target live stream; For each target live stream, the server node corresponding to the node identifier with the smallest difference from the second hash value is determined as the second server node corresponding to the target live stream.

8. A live stream scheduling device, characterized in that, include: The first determining module is used to determine at least one target live stream among multiple live streams to be scheduled corresponding to the first server node based on a first hash algorithm when the traffic load value of the first server node among multiple preset server nodes is greater than a preset load threshold. The first server node is used to process the acquisition requests of the live streams to be scheduled other than the target live stream among the multiple live streams to be scheduled. The second determining module is used to perform hash calculation on the identifier of each target live stream in the at least one target live stream based on the second hash algorithm, and determine the second server node corresponding to each target live stream. The second server node is a server node other than the first server node among the plurality of preset server nodes. The scheduling module is used to schedule the at least one target live stream from the first server node to the second server node, and the second server node is used to process the live stream acquisition request of the target live stream.

9. A server, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Flow scheduling method and device, server and storage medium

    CN111432247A

  • Live broadcast stream processing method and live broadcast source station cluster

    CN115914668A

  • Data storage method and device based on block chain, computer equipment, storage medium and computer program product

    CN118607013A

  • Live stream load control method and device, electronic equipment and storage medium

    CN119629376A