Candidate streaming media determination, load balancing method, device, server and medium
By determining candidate streaming media nodes based on load and bandwidth margins, the method addresses uneven loads across streaming nodes, improving streaming service quality by reducing freezes and packet loss.
Patent Information
- Application Number
- CN202111539682.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-12-15
AI Technical Summary
The complexity of multiple networks and bandwidths, along with uneven loads on streaming nodes, affects the live broadcast experience due to differences in upstream and downstream bandwidths and processing capabilities, leading to issues like video freezes and packet loss.
A method and device for determining candidate streaming media nodes by calculating load margins and bandwidth allocations to balance load across streaming nodes, excluding unavailable nodes, and selecting optimal nodes based on load and bandwidth margins.
This approach achieves balanced load distribution, reducing video freezes and packet loss, thereby enhancing user experience in streaming services.
Smart Images

Figure CN114244848B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of load balancing, and in particular to candidate streaming media determination, load balancing methods, devices, servers and media. Background Art
[0002] As more and more cameras are connected to the video surveillance platform, more and more streaming nodes are needed. In addition, due to the use of old servers and other reasons, there is a difference between the public network and the private network for accessing the camera. As the business develops and expands, it may happen that the streaming nodes use multiple bandwidths. The upstream and downstream bandwidths associated with different servers are not the same, and the processing capabilities of the streaming nodes used are also different. The complexity of multiple networks and multiple bandwidths, as well as the device-oriented load and streaming node shutdown requirements in the business, can easily lead to uneven loads on the streaming nodes, thus affecting the live broadcast experience.
[0003] Therefore, the industry is in urgent need of a load balancing solution to select appropriate streaming nodes from a large number of streaming nodes to meet streaming services such as live broadcasting and monitoring.
[0004] Invention News
[0005] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a candidate streaming media determination, load balancing method, device, server and medium for selecting a suitable streaming media node based on load balancing purposes.
[0006] The first aspect of the present application provides a candidate streaming media determination method, which is applied to the determination of candidate streaming media nodes in the load balancing of a streaming media node cluster; the candidate streaming media determination method comprises: obtaining resource load information and associated bandwidth usage information of each streaming media node, wherein the bandwidth usage information is about the utilization of access bandwidth and distribution bandwidth; calculating the load margin information of each streaming media node according to the resource load information, and sorting the load margin information by size to form a load margin sorting list; calculating the corresponding access bandwidth margin information according to the bandwidth usage information of each access bandwidth, and calculating the access bandwidth allocation plan according to the access bandwidth margin information; wherein, the The access bandwidth allocation plan includes the allocable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority; the corresponding distribution bandwidth margin information is calculated according to the bandwidth usage information of each distribution bandwidth, and a distribution bandwidth list is formed according to each distribution bandwidth margin information, and the distribution bandwidth list includes each candidate distribution bandwidth monotonically arranged according to the size of the distribution bandwidth margin; the sorted candidate access streaming media nodes associated with each candidate access bandwidth in the access bandwidth allocation plan are determined according to the load margin sorted list; the sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list are determined according to the load margin sorted list.
[0007] In some embodiments, the candidate streaming media determination method also includes: excluding unavailable streaming media nodes from the candidate access streaming media nodes and the candidate distribution streaming media nodes, and excluding unavailable bandwidths in each access bandwidth and distribution bandwidth based on the unavailable streaming media nodes to obtain the candidate access bandwidth and the candidate distribution bandwidth; wherein the unavailable streaming media node refers to a streaming media node that meets the unavailable condition, and the unavailable bandwidth refers to each associated streaming media node that meets the unavailable condition.
[0008] In some embodiments, the unavailability condition includes at least one of the following: 1) the load index of the streaming media node reaches above a preset threshold; 2) the resource load information sending timeout of the streaming media node reaches a preset number of times; 3) the streaming media node is marked as shut down.
[0009] In some embodiments, the resource load information includes: the hardware resource utilization rate of the streaming node; the hardware resource utilization rate includes: at least one of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate; the load indicator is expressed as a load rate, and the load rate is the weighted sum of one or more of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate.
[0010] In some embodiments, the resource load information includes: the hardware resource utilization rate of the streaming node; the calculation of the load margin of each streaming node based on the resource load information includes: calculating the remaining number of loadable devices of the streaming node based on the hardware resource utilization rate.
[0011] In some embodiments, the calculating of the access bandwidth allocation plan according to the access bandwidth margin information includes: calculating the allocatable access bandwidth capacity of each candidate access bandwidth based on the condition of evenly allocating the bandwidth margin of each access bandwidth and the restriction of the bandwidth margin difference range between each access bandwidth.
[0012] In some embodiments, the candidate streaming media determination method is executed periodically; in each current cycle, each candidate access bandwidth and associated candidate access streaming media node, as well as each candidate distribution bandwidth and associated candidate distribution streaming media node, are calculated for the next cycle.
[0013] A second aspect of the present application provides a load balancing method, which performs load balancing of a streaming node cluster based on an access bandwidth allocation plan and a distribution bandwidth list obtained in the candidate streaming media determination method according to any one of the first aspects; the load balancing method comprises: in response to a service request, searching the access bandwidth allocation plan for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as a target access bandwidth; selecting a candidate access streaming media node with the largest load margin from among the candidate access streaming media nodes associated with the target access bandwidth as the target access streaming media node; if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can satisfy the service request, determining the target access streaming media node as the target distribution streaming media node; if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot satisfy the service request, selecting a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth; selecting a candidate distribution streaming media node with the largest load margin from among the candidate distribution streaming media nodes associated with the target distribution bandwidth as the target distribution streaming media node.
[0014] In some embodiments, searching the access bandwidth allocation plan for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as the target access bandwidth includes: determining whether the requesting device of the service request has a bound streaming node; if so, searching the access bandwidth allocation plan for a candidate access streaming node whose allocatable access bandwidth capacity can satisfy the service request and whose associated candidate access streaming nodes include the candidate access bandwidth of the bound streaming node as the target access bandwidth; and using the bound streaming node as the target access streaming node and the target distribution streaming node; if not, selecting the first candidate access bandwidth whose allocatable access bandwidth capacity can satisfy the service request as the target access bandwidth in the access bandwidth allocation plan.
[0015] The third aspect of the present application provides a candidate streaming media determination device, which is applied to determine the candidate streaming media nodes of a streaming media node cluster; the candidate streaming media determination device includes: a streaming media load information collection module, which is used to obtain the resource load information of each streaming media node; a network bandwidth usage information collection module, which is used to obtain the resource load information of each streaming media node and the associated bandwidth usage information, wherein the bandwidth usage information is about the utilization of the access bandwidth and the distribution bandwidth; the streaming media load information collection module, which is used to calculate the load margin information of each streaming media node according to the resource load information, and sort the load margin information by size to form a load margin sorting list; a candidate bandwidth / streaming media determination module, which is used to calculate the corresponding access bandwidth margin information according to the bandwidth usage information of each access bandwidth, and sort the access bandwidth margin information according to the access bandwidth margin The access bandwidth allocation plan is calculated based on the load margin sorting list; wherein the access bandwidth allocation plan includes the allocatable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority; the candidate bandwidth / streaming media determination module is further used to calculate the corresponding distribution bandwidth margin information based on the bandwidth usage information of each distribution bandwidth, and form a distribution bandwidth list based on each distribution bandwidth margin information, wherein the distribution bandwidth list includes each candidate distribution bandwidth monotonically arranged according to the size of the distribution bandwidth margin; the candidate bandwidth / streaming media determination module is used to determine the sorted candidate access streaming media nodes associated with each candidate access bandwidth in the access bandwidth allocation plan based on the load margin sorting list; and is also used to determine the sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list based on the load margin sorting list.
[0016] According to a fourth aspect of the present application, there is provided a load balancing device, which performs load balancing of a streaming node cluster based on an access bandwidth allocation plan and a distribution bandwidth list obtained in the candidate streaming media determination method according to any one of the first aspects; the load balancing device comprises: an allocation module, which is used to search for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request in the access bandwidth allocation plan as a target access bandwidth in response to a service request; the allocation module is used to select a candidate access streaming media node with the largest load margin as the target access streaming media node from among the candidate access streaming media nodes associated with the target access bandwidth; the allocation module is used to determine the target access streaming media node as the target distribution streaming media node if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can satisfy the service request; the allocation module is used to select a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot satisfy the service request; the allocation module is used to select a candidate distribution streaming media node with the largest load margin as the target distribution streaming media node from among the candidate distribution streaming media nodes associated with the target distribution bandwidth.
[0017] The fourth aspect of the present application provides a server, comprising: a communicator, a memory and a processor; the communicator is used to communicate with the outside; the memory is used to store program instructions; the processor is used to run the program instructions to execute the candidate streaming media determination method as described in any one of the first aspects; or execute the load balancing method as described in the second aspect.
[0018] A fifth aspect of the present application provides a computer-readable storage medium storing program instructions, wherein the program instructions are executed to execute the candidate streaming media determination method as described in any one of the first aspect; or to execute the load balancing method as described in the second aspect.
[0019] As described above, the embodiments of the present application provide a method, device, server and medium for determining and load balancing candidate streaming media. By acquiring the resource load information and associated bandwidth usage information of the streaming media node, the load margin of the streaming media node and the utilization of the access and distribution bandwidth are obtained respectively. The access bandwidth allocation plan and the distribution bandwidth list are calculated according to the utilization of the access and distribution bandwidth. The load margin sorting list is calculated according to the resource load information to provide each candidate access bandwidth and the associated candidate access streaming media node, as well as each candidate distribution bandwidth and the associated candidate distribution streaming media node for selection, that is, to determine the candidate range of the target streaming media node; further, when there is a service request, the target access and distribution bandwidth and the corresponding target streaming media node can be selected from them through the load balancing method to meet the service request. The present application realizes load balancing of the streaming media service cluster, and solves the problem in the related technology that the uneven bandwidth allocation causes freezes, packet loss and other problems that affect the customer experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram showing a flow chart of a method for determining candidate streaming media in an embodiment of the present application.
[0021] Figure 2 A flowchart showing a method for determining candidate streaming media in a specific application example of the present application is shown.
[0022] Figure 3 A flow chart showing a load balancing method in an embodiment of the present application.
[0023] Figure 4 A flow chart showing a load balancing method in a specific application example of the present application.
[0024] Figure 5 A module schematic diagram showing a device for determining candidate streaming media in an embodiment of the present application.
[0025] Figure 6 A module schematic diagram of a load balancing device in an embodiment of the present application is shown.
[0026] Figure 7 A module schematic diagram of a load balancing system in an embodiment of the present application is shown.
[0027] Figure 8 A schematic diagram showing the structure of a server in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The following is an explanation of the implementation of the present application by specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the information disclosed in the present application. The present application can also be implemented or applied through other different specific implementations, and the details in the present application can also be modified or changed in various ways according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0029] The following is a detailed description of the embodiments of the present application with reference to the accompanying drawings so that those skilled in the art can easily implement the present application. The present application can be embodied in a variety of different forms and is not limited to the embodiments described herein.
[0030] In the representations of the present application, the representations with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics represented in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the represented specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples represented in the present application and the features of the different embodiments or examples, unless they contradict each other.
[0031] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the representation of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0032] In order to clearly describe the present application, components irrelevant to the description are omitted, and the same reference symbols are given to the same or similar components throughout the specification.
[0033] Throughout the specification, when a device is said to be "connected" to another device, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a device is said to "include" a certain component, unless otherwise stated, it does not exclude other components, but means that other components may be included.
[0034] Although the terms first, second, etc. are used to represent various elements in this article in some examples, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first interface and the second interface, etc. are represented. Moreover, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate that there are the described features, steps, operations, elements, modules, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, modules, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Only when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way, will there be an exception to this definition.
[0035] The technical terms used herein are only used to refer to specific embodiments and are not intended to limit the present application. The singular form used herein also includes the plural form unless the sentence clearly indicates the contrary meaning. The meaning of "including" used in the specification is to specify specific characteristics, regions, integers, steps, operations, elements and / or components, and does not exclude the existence or addition of other characteristics, regions, integers, steps, operations, elements and / or components.
[0036] Although not defined differently, all terms, including technical and scientific terms used herein, have the same meaning as those generally understood by those skilled in the art to which this application belongs. Terms defined in commonly used dictionaries are additionally interpreted as having meanings consistent with relevant technical literature and the message of the present disclosure, and as long as they are not defined, they should not be overly interpreted as ideal or very formal meanings.
[0037] In the related technologies, due to the rapid growth of streaming media related services such as video surveillance services and live broadcast services, more and more streaming media nodes are required, forming a streaming media node cluster. As a result, the complex network status, bandwidth status, streaming media node status, etc., when allocating streaming media nodes and bandwidth to meet service requests, easily lead to uneven loads between streaming media nodes, resulting in video freezes in live broadcasts and monitoring, etc., which greatly affects the user experience.
[0038] In view of this, the embodiments of the present application provide a method, device, server and medium for determining candidate streaming media and load balancing to solve the problems of the prior art.
[0039] Specifically, the candidate access / distribution bandwidth and the associated candidate access / distribution streaming nodes can be determined through the candidate streaming media determination method to narrow the selection range; when the user's service request is obtained, the target access / distribution bandwidth can be selected from the determined candidate access / distribution bandwidth through the load balancing method to further determine the target access / distribution streaming node that meets the service request among the associated candidate access / distribution streaming nodes.
[0040] In a possible example, the above process can be performed in real time and periodically, and the candidate streaming media determination method is executed in each cycle. In the current cycle, the candidate access / distribution bandwidth and the associated candidate access / distribution streaming media nodes for the next cycle are determined through the candidate streaming media; in the next cycle, when there is a service request, the target access / distribution bandwidth and the target access / distribution streaming media nodes are determined based on the candidate access / distribution bandwidth and the associated candidate access / distribution streaming media nodes determined in the previous cycle.
[0041] In addition, to facilitate understanding, the relationship between streaming media nodes and bandwidth is explained first. A bandwidth can be allocated to a streaming media node, a bandwidth can be allocated to multiple streaming media nodes, and a streaming media node may also be allocated multiple bandwidths. For example, two 100M bandwidths, the first bandwidth is allocated to streaming media node A, A is connected to load devices A1 and A2; the other is allocated to two streaming media nodes B and C, B is connected to load device B1, and C is connected to load device C1; among them, the streaming media node associated with the first bandwidth is A, and the streaming media nodes associated with the second bandwidth are B and C.
[0042] The load balancing of the present application also considers that bandwidth is divided into upstream and downstream, and the upstream and downstream bandwidths need to be balanced separately but are interrelated. The upstream bandwidth can be exemplarily referred to as the distribution bandwidth in the following embodiments, and the downstream bandwidth can be exemplarily referred to as the access bandwidth in the following embodiments.
[0043] like Figure 1 As shown, a schematic diagram showing the flow of a method for determining candidate streaming media in an embodiment of the present application is shown.
[0044] The candidate streaming media determination method is applied to the determination of candidate bandwidth and candidate streaming media nodes in the load balancing of a streaming media node cluster, and the problem it solves is to provide an optional range and reference basis for selecting a target bandwidth and its corresponding target streaming media node during load balancing. The streaming media node can be a physical streaming media server, or a server running on a physical server, etc.
[0045] refer to Figure 1 As shown, the candidate streaming media determination method includes:
[0046] Step S101: obtaining resource load information of each streaming node and associated bandwidth usage information, wherein the bandwidth usage information is about the utilization of access bandwidth and distribution bandwidth.
[0047] In some embodiments, the resource load information includes: the hardware resource utilization of the streaming node. In a possible implementation, the hardware resource utilization includes: at least one of the processing resource utilization, the storage resource utilization and the network resource utilization. For example, the processing resource utilization includes the occupancy rate of the processor (CPU), the storage resource utilization includes the occupancy rate of the memory, the hard disk, etc., and the network resource utilization includes the occupancy rate of the network card bandwidth, etc.
[0048] The bandwidth usage information may include the total capacity and used capacity of each bandwidth, based on which information such as bandwidth usage rate, bandwidth remaining capacity, bandwidth capacity remaining rate, etc. may be calculated.
[0049] Step S102: Calculate the load margin information of each of the streaming media nodes according to the resource load information, and sort the load margin information by size to form a load margin sorting list.
[0050] The remaining resource margin can be calculated by the existing total resource amount and utilization rate. In some embodiments, if the cost resource of each load device can be known or preset, the remaining number of load-bearing devices that can still be loaded by the streaming node can be calculated according to the hardware resource utilization rate to represent the load margin. Alternatively, the load margin can also be represented by the resource surplus rate, that is, 100% minus the resource utilization rate.
[0051] In some embodiments, the load margin sorting list may arrange each streaming node in a monotonous order from large to small or from small to large according to the load margin, and the streaming node with a larger load margin will be used more preferentially.
[0052] Step S103: Calculate corresponding access bandwidth margin information according to the bandwidth usage information of each access bandwidth, and calculate an access bandwidth allocation plan according to the access bandwidth margin information.
[0053] The access bandwidth allocation plan includes the allocatable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority.
[0054] In some embodiments, each allocatable access bandwidth capacity in the access bandwidth allocation plan is executed based on the principle of average allocation, that is, based on the condition of evenly allocating the bandwidth margin of each access bandwidth. For example, five access bandwidths with a capacity of 100M can use their bandwidth margins according to the flow so that their bandwidth margins change dynamically to be equal. For example, after satisfying different service requests, the five 100M bandwidths all ideally tend to have a remaining capacity of, for example, 80M (the remaining amount depends on the bandwidth capacity required by the service request). Since it is impossible to achieve ideal even distribution at every moment, for example, if 5 100M bandwidths are not in use and a service request comes in that requires 5M access bandwidth, then one of the bandwidths will provide 5M and there will be 95M capacity left, while the others will still be 100M, which is not even. Therefore, it is necessary to set a bandwidth margin difference range AllowUsagDiff, for example, allowing the bandwidth margin between each access bandwidth to be 5M, 10M; or, for each bandwidth of the same capacity, it can also be expressed by a capacity ratio, for example 5%, 10%, then the corresponding 100M bandwidth capacity is equivalent to 5M, 10M.
[0055] In some embodiments, the candidate access bandwidths are arranged in descending order according to the capacity surplus rate, and then the allocatable access bandwidth capacity of each access bandwidth is calculated evenly, which can be expressed as follows:
[0056]
[0057] in, Indicates the #id after sorting i The total capacity of the bandwidth is corresponding to the total capacity of each access bandwidth according to the residual rate. i The remaining rate of each bandwidth after the strip width is monotonically decreasing. Indicates the #id after sorting i The capacity surplus rate of the stripe bandwidth. That is, allocate as much as possible within the allowable error range of average allocation, but cannot exceed the maximum allocable capacity. According to this formula, i ,#id i+1 ....The allocatable access bandwidth capacity may be calculated for each candidate access bandwidth.
[0058] The access bandwidth allocation plan may be expressed as a list in the form of, for example, [[bandwidth ID1, allocatable bandwidth capacity 1], [bandwidth ID2, allocatable bandwidth capacity 2], ..., [bandwidth IDx, allocatable bandwidth capacity x]], where the bandwidth IDs may be assigned to each candidate access bandwidth in the allocation order. The candidate access bandwidth that is ranked higher in the front will be matched more preferentially.
[0059] Step S104: Calculate corresponding distribution bandwidth margin information according to bandwidth usage information of each distribution bandwidth, and form a distribution bandwidth list according to each distribution bandwidth margin information, wherein the distribution bandwidth list includes candidate distribution bandwidths arranged monotonically according to the distribution bandwidth margin size.
[0060] In some embodiments, the distribution bandwidth list may be monotonically sorted according to the distribution bandwidth margin, and the candidate distribution bandwidth with a larger distribution bandwidth margin is given a higher priority for allocation.
[0061] Step S105: determining sorted candidate access streaming media nodes associated with candidate access bandwidths in the access bandwidth allocation plan according to the load margin sorting list.
[0062] Step S106: determining, according to the load margin sorting list, sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list.
[0063] Specifically, when a candidate access / distribution bandwidth is selected as the target access / distribution bandwidth, it may be associated with multiple candidate access / distribution streaming media nodes. Therefore, by selecting the one with the largest load margin as the target access / distribution streaming media node, more load devices can be accessed, thereby achieving load balancing.
[0064] Steps S105 and S106 determine the sorted (monotonic order in the list is retained to facilitate the first one to be selected preferentially) candidate access / distribution streaming media nodes associated with the candidate access / distribution bandwidth, so as to determine the target access / distribution bandwidth and target access / distribution streaming media node when a service request is received.
[0065] In some embodiments, unavailable streaming nodes can be excluded from the candidate access streaming nodes and candidate distribution streaming nodes, and unavailable bandwidths in various access bandwidths and distribution bandwidths can be excluded according to the unavailable streaming nodes to obtain the candidate access bandwidths and candidate distribution bandwidths. The unavailable streaming nodes refer to streaming nodes that meet the unavailable condition, and the unavailable bandwidth refers to each associated streaming node that meets the unavailable condition. In a possible example, the unavailable condition includes at least one of the following: 1) the load index of the streaming node reaches a preset threshold; 2) the resource load information sending timeout of the streaming node reaches a preset number of times; 3) the streaming node is marked as shut down.
[0066] For example, if all streaming nodes associated with a certain access / distribution bandwidth meet any of the three unavailable conditions, the access / distribution bandwidth is unavailable and will not be included in the access bandwidth allocation plan or distribution bandwidth list.
[0067] In some embodiments, the resource load information includes: the hardware resource utilization rate of the streaming node; the hardware resource utilization rate includes: at least one of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate; the load indicator is expressed as a load rate, and the load rate is the weighted sum of one or more of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate.
[0068] For example, the CPU usage, memory usage, and network resource usage of a streaming node are PSS cpu 、PSS mem 、PSS net , then the load factor PSS load The calculation formula can be:
[0069] PSS load =a1*PSS cpu +a2*PSS mem +a3*PSS net
[0070] Among them, a1, a2, and a3 are weights, and a1+a2+a3=1.
[0071] Therefore, the PSS of the streaming node load ≥b, b is the preset threshold, which corresponds to the above unavailable condition 1).
[0072] Unavailable condition 2) corresponds to the possibility that the streaming media node may have problems such as downtime or disconnection.
[0073] Unavailability condition 3) corresponds to the situation where the streaming node may be shut down during actual use.
[0074] In combination with the above embodiments, Figure 2 As shown, a flow chart of a method for determining candidate streaming media in a specific application example of the present application is shown.
[0075] refer to Figure 2 , the process specifically includes:
[0076] Step S201: Calculate the load rate of the streaming media node and the number of loaded devices according to the collected hardware resource utilization of the streaming media node.
[0077] Step S202: The streaming media nodes that meet the unavailable condition are marked as unavailable and do not participate in load distribution.
[0078] Step S203: Obtain the resource cost required for each streaming node to load a single load device, calculate the load margin (ie, the number of remaining loadable devices) in combination with the number of loaded devices, and arrange them in descending order to obtain a load margin sorting list.
[0079] Step S204: Collect bandwidth usage information of each access / distribution bandwidth.
[0080] Step S205: setting the bandwidth in the access / distribution bandwidth that is marked as unavailable by the streaming media nodes associated therewith as unavailable.
[0081] Step S206: the access / distribution bandwidths are grouped according to the networks to which they belong, and the access / distribution bandwidths of each group are sorted from large to small according to the bandwidth capacity remaining rate (or from small to large according to the bandwidth capacity utilization rate);
[0082] Step S207: For each candidate access bandwidth (excluding unavailable bandwidth), calculate an access bandwidth allocation plan;
[0083] Step S208: According to the association relationship between the streaming media nodes and the bandwidth, each streaming media node sorted by load margin is associated with a candidate access / distribution bandwidth, that is, a candidate streaming media node.
[0084] For example, bandwidth 1 is associated with streaming nodes A, B, and C. After load margin sorting, the load margin is arranged in descending order from large to small as C, A, and B. Bandwidth 1 is used as a candidate bandwidth, forming an association between [C, A, B] and bandwidth 1. Streaming nodes A, B, and C are candidate streaming nodes associated with candidate bandwidth 1.
[0085] like Figure 3 As shown, a flow chart of a load balancing method in an embodiment of the present application is shown.
[0086] The load balancing method determines the target access / distribution bandwidth based on the access bandwidth allocation plan obtained by the candidate streaming media determination method and each candidate access / distribution bandwidth in the distribution bandwidth list, so as to determine the target access / distribution streaming media node from the associated candidate access / distribution streaming media nodes.
[0087] See also Figure 3 , the load balancing method comprises:
[0088] Step S301: In response to a service request, a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request is searched in the access bandwidth allocation plan as a target access bandwidth.
[0089] In some embodiments, the service request will carry the access / distribution bandwidth capacity that the requesting device needs to allocate, and the allocated target access bandwidth and target distribution bandwidth need to meet the corresponding bandwidth capacity to meet the service request. Optionally, the service request may also carry the device number of the requesting device, the network to which it belongs (it may prioritize the target access / distribution bandwidth and the associated target access / distribution streaming media node to which it belongs), information about the streaming media nodes that the requesting device may bind, etc.
[0090] In some embodiments, the search may be based on the first-come-first-served principle, that is, the first candidate access bandwidth whose allocatable access bandwidth capacity can meet the service request (such as the required bandwidth that meets the service request) found in the access bandwidth allocation plan in the allocation priority order is used as the target access bandwidth.
[0091] Step S302: Selecting a candidate access streaming media node with the largest load margin from among the candidate access streaming media nodes associated with the target access bandwidth as a target access streaming media node.
[0092] In some embodiments, in step S105, the sorted candidate access streaming nodes associated with the candidate access bandwidths in the access bandwidth allocation plan have been obtained, so in step S302, the first sorted candidate access streaming node can be conveniently selected as the target access streaming node with the largest load margin.
[0093] Step S303: Determine whether the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can meet the service request.
[0094] If the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can satisfy the service request, then proceed to step S304: determine the target access streaming media node as a target distribution streaming media node;
[0095] If the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot meet the service request, the process proceeds to step S305: selecting a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth;
[0096] After step S305, step S306 is executed: among the candidate streaming media distribution nodes associated with the target distribution bandwidth, the candidate streaming media distribution node with the largest load margin is selected as the target streaming media distribution node.
[0097] In some embodiments, if the sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list have been obtained in step S106, then in step S302, the first candidate distribution streaming media node in the sorted list can be conveniently selected as the target distribution streaming media node with the largest load margin.
[0098] The service request may also indicate that the requesting device has a bound streaming media node. In the case where there is a bound streaming media node, the target allocable access bandwidth capacity that can satisfy the service request and whose associated candidate access streaming media nodes include the bound streaming media node is searched for in the access bandwidth allocation plan; otherwise, the first allocable access bandwidth capacity in the access bandwidth allocation plan that can satisfy the service request is selected as the target access bandwidth. Moreover, the bound streaming media node can be used as the target streaming media node, and other unbound candidate streaming media nodes can be excluded.
[0099] For example, the service request binds the streaming media node A, the service request requires an access capacity of X, and the access bandwidth allocation plan is [[bandwidth ID1, allocable bandwidth capacity 1], [bandwidth ID2, allocable bandwidth capacity 2], ……, [bandwidth IDx, allocable bandwidth capacity x]]. The streaming media nodes associated with bandwidth ID1 are B and C, the streaming media nodes associated with bandwidth ID2 are A and D, and the streaming media nodes associated with bandwidth ID3 are A and E. After searching, the streaming media nodes associated with bandwidth ID1 do not include A, so continue to search downward; it is found that the streaming media nodes associated with bandwidth ID2 include A, and it is judged whether the allocable bandwidth capacity 2 meets the X requirement. As a result, the allocable bandwidth capacity 2 < X, so continue to search downward; it is found that the streaming media nodes associated with bandwidth ID3 include A, and it is judged whether the allocable bandwidth capacity 3 meets the X requirement. As a result, the allocable bandwidth capacity 3 > X, which can meet the service request requirement, so bandwidth ID3 is used as the target access bandwidth, and the unbound streaming media node E is excluded.
[0100] As Figure 4 shown, it shows a schematic flowchart of the load balancing method in a specific application example of the present application.
[0101] Refer to Figure 4 , the process includes:
[0102] Step S401: Receive a service request.
[0103] For example, a live broadcast request, a monitoring video playback request, etc. The service request may include the device number of the requesting device, the network it belongs to, the required access and distribution bandwidth capacity, and the bound streaming media node information (such as a bound streaming media node list).
[0104] Step S402: determine whether the requesting device has access to a streaming media node; if so, proceed to step S403 to determine an access streaming media node that can satisfy the service request; if not, proceed to step S404;
[0105] Step S404: Determine whether the requesting device has a bound streaming media node; if so, proceed to step S405; if not, proceed to step S406;
[0106] Step S405: searching for the target access bandwidth in the access bandwidth allocation plan of the network group to which the requesting device belongs according to the following conditions in sequence: the allocatable access bandwidth capacity of the candidate access bandwidth meets the required access bandwidth capacity and each candidate streaming media node associated with the candidate access bandwidth includes the bound streaming media node;
[0107] Step S406: searching for a target access bandwidth in the access bandwidth allocation plan of the network group to which the requesting device belongs according to the following conditions in sequence: the allocatable access bandwidth capacity of the candidate access bandwidth meets the required access bandwidth capacity;
[0108] Step S407: Determine whether the target access bandwidth is found in steps S405 and S406; if so, proceed to step S408; if not, proceed to step S409;
[0109] Continuing with step S405, for the target access bandwidth found in step S405, if there is only one bound streaming node among the associated candidate streaming nodes, then this bound streaming node is determined as the target access streaming node; if there are multiple bound streaming nodes, then the one with the largest load margin is determined as the target access streaming node.
[0110] The process proceeds to step S406. For the target access bandwidth found in step S406, the node with the largest load margin among the associated candidate access streaming media nodes is selected as the target access streaming media node.
[0111] Step S408: Determine whether the target access streaming media node is accessible; if so, proceed to step S403; if not, proceed to step S409;
[0112] Step S409: Allocation failed.
[0113] Step S410: determine whether the target access streaming media node has a distribution bandwidth margin that meets the required distribution bandwidth capacity; if so, determine that the target access streaming media node is a target distribution streaming media node, and proceed to step S411; if not, proceed to step S412.
[0114] Step S411: The target access streaming media node and the target distribution streaming media are determined.
[0115] Step S412: Determine whether the first candidate distribution bandwidth (with the largest distribution bandwidth margin) in the distribution bandwidth list of the network to which the requesting device belongs meets the required distribution bandwidth capacity; if not, proceed to step S409; if yes, proceed to step S413.
[0116] Step S413: taking the first candidate distribution bandwidth as the target distribution bandwidth;
[0117] Step S414: determining whether the first candidate distribution multimedia server (with the largest load margin) among the sorted candidate distribution multimedia servers associated with the target distribution bandwidth is available; if not, proceeding to step S409; if yes, proceeding to step S415;
[0118] Step S415: taking the first candidate distribution multimedia server as the target distribution multimedia server; then proceeding to step S411;
[0119] Step S416: after the allocation is completed, the allocatable access bandwidth capacity of each candidate access bandwidth and the distribution bandwidth margin of each candidate distribution bandwidth are updated.
[0120] like Figure 5 , which shows a schematic diagram of a module of a candidate streaming media determination device in an embodiment of the present application. The implementation of the candidate streaming media determination device can refer to the previous embodiment of the candidate streaming media determination method, and the same technical content will not be repeated here.
[0121] The candidate streaming media determining device 500 comprises:
[0122] The streaming media load information collection module 501 is used to obtain the resource load information of each streaming media node;
[0123] The network bandwidth usage information collection module 502 is used to obtain resource load information of each streaming node and associated bandwidth usage information, wherein the bandwidth usage information is about the utilization of access bandwidth and distribution bandwidth;
[0124] The streaming media load information collection module 501 is used to calculate the load margin information of each streaming media node according to the resource load information, and sort the load margin information by size to form a load margin sorting list;
[0125] The candidate bandwidth / streaming media determination module 503 is used to calculate the corresponding access bandwidth margin information according to the bandwidth usage information of each access bandwidth, and calculate the access bandwidth allocation plan according to the access bandwidth margin information; wherein the access bandwidth allocation plan includes the allocable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority;
[0126] The candidate bandwidth / streaming media determination module 503 is further used to calculate corresponding distribution bandwidth margin information according to the bandwidth usage information of each distribution bandwidth, and form a distribution bandwidth list according to each distribution bandwidth margin information, wherein the distribution bandwidth list includes each candidate distribution bandwidth monotonically arranged according to the size of the distribution bandwidth margin;
[0127] The candidate bandwidth / streaming media determination module 503 is used to determine the sorted candidate access streaming media nodes associated with each candidate access bandwidth in the access bandwidth allocation plan according to the load margin sorting list; and is also used to determine the sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin sorting list.
[0128] like Figure 6 As shown, a module schematic diagram of a load balancing device in an embodiment of the present application is shown.
[0129] The implementation of the load balancing device 600 may refer to the previous embodiments of the load balancing method, and the same technical contents will not be repeated here.
[0130] The load balancing device 600 includes:
[0131] An allocation module 601 is used to, in response to a service request, search in the access bandwidth allocation plan for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as a target access bandwidth;
[0132] The allocation module 601 is used to select a candidate access streaming media node with the largest load margin as a target access streaming media node from among the candidate access streaming media nodes associated with the target access bandwidth;
[0133] The allocation module 601 is used to determine the target access streaming media node as a target distribution streaming media node if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can meet the service request;
[0134] The allocation module 601 is used to select the candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot meet the service request; the allocation module is used to select the candidate distribution streaming media node with the largest load margin as the target distribution streaming media node among the candidate distribution streaming media nodes associated with the target distribution bandwidth.
[0135] like Figure 7 As shown, a module schematic diagram of a load balancing system in an embodiment of the present application is shown.
[0136] In some embodiments, the load balancing system may have Figure 5 , Figure 6 The load balancing system can be applied to a server, such as a decision server. The decision server can be a service server or connected to a service server to provide load balancing decisions. The service server is used to provide target access and distribute streaming media nodes according to user service requests.
[0137] See also Figure 7 , the load balancing system 700 includes:
[0138] The timing module 701 is used to set the acquisition period T of the candidate access / distribution streaming media nodes. At the end of each period T, the load balancing system recalculates the load status of each streaming media node and updates the candidate access / distribution streaming media nodes that can be used for allocation, so as to guide the selection of the target access / distribution streaming media nodes in the next period T.
[0139] The streaming media load information collection module 702 is used to collect the status and resource load information of each streaming media node to determine whether it can provide services to users and provide load rate and load margin as reference. In a possible example, each streaming media node collects, for example, its own hardware indicators and usage rate, and sends them to the streaming media load information collection module at a period T1 (which can be used as a heartbeat). The streaming media load information collection module updates the load rate and load margin of each streaming media node according to the fixed feedback period T and resets the timer.
[0140] The network bandwidth usage collection module 703 is used to collect the usage of each bandwidth (including access bandwidth and distribution bandwidth), such as total capacity and used capacity, for calculating bandwidth usage, bandwidth margin, bandwidth surplus rate, etc.
[0141] The candidate bandwidth / streaming media selection module 704 is used to exclude unavailable bandwidth and streaming media nodes according to the usage rate and remaining rate of each bandwidth and streaming media node, and calculate the candidate access / distribution bandwidth and associated candidate access / distribution streaming media nodes that can be allocated in the next cycle, as well as the bandwidth allocation order (reflected in the access bandwidth allocation plan, distribution bandwidth list, etc.).
[0142] The allocation module 705 is used to allocate the target access / distribution bandwidth that meets the service request requirements according to the candidate access / distribution bandwidth, and then select the streaming media node with the largest load margin (the number of devices that can be processed) from the candidate streaming media nodes associated with the target access / distribution bandwidth as the allocation result. Among them, the corresponding selection method can also be changed according to the situation of the requesting device binding the streaming media node. For details, please refer to, for example Figure 4 Logic in the example.
[0143] It should be noted that in Figure 5 , Figure 6 , Figure 7 Each functional module in the embodiment can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a program instruction product. The program instruction product includes one or more program instructions. When loading and executing program instructions on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The program instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0144] and, Figure 5 , Figure 6 , Figure 7 The device disclosed in the embodiment can be implemented by other module division methods. The device embodiments shown above are only schematic. For example, the module division is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or modules can be combined or dynamically transferred to another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical or other forms.
[0145] in addition, Figure 5 , Figure 6 , Figure 7 Each functional module and submodule in the embodiment can be dynamically in a processing component, or each module can exist physically separately, or two or more modules can be dynamically in one component. The above-mentioned dynamic components can be implemented in the form of hardware or in the form of software functional modules. If the above-mentioned dynamic components are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0146] like Figure 8 As shown, a schematic diagram of the structure of the server in an embodiment of the present application is shown.
[0147] The server 800 includes a bus 801, a processor 802, a memory 803, and a communicator 804. The processor 802 and the memory 803 can communicate with each other through the bus 801. The memory 803 may store program instructions (such as system or application software). The processor 802 implements the previous embodiment (such as Figure 1 , Figure 2 , Figure 3 , Figure 4 ) in the candidate streaming media determination method and / or load balancing method.
[0148] The bus 801 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, although Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0149] In some embodiments, the processor 802 may be implemented as a central processing unit (CPU), a microprocessing unit (MCU), a system on chip (System On Chip), or a field programmable logic array (FPGA). The memory 803 may include a volatile memory (Volatile Memory) for temporary storage of data when running a program, such as a random access memory (Random Access Memory, RAM).
[0150] The memory 803 may also include a non-volatile memory (non-volatile memory) for data storage, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state disk (SSD).
[0151] The communicator 804 is used to communicate with the outside. In a specific example, the communicator 804 may include one or more wired and / or wireless communication circuit modules. For example, the communicator 804 may include one or more of a wired network card, a USB module, a serial interface module, etc. The wireless communication protocol followed by the wireless communication module includes: for example, near field communication (NFC) technology, infrared (IR) technology, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth (BT), global navigation satellite system (GNSS), etc. One or more.
[0152] In one example, the service server receives a live broadcast request from a user, forwards the live broadcast request, and uses the service server to determine a target access / distribution streaming media node corresponding to the live broadcast request and returns the target access / distribution streaming media node to the service server;
[0153] Step 4: The service server requests the device to push the stream to the designated streaming node according to the information returned by the streaming media load balancing module;
[0154] Step 5: After receiving the device push stream, forward the device stream to the stream distribution server and return the distribution address to the user.
[0155] It should be noted that the process or method represented by the flowchart of the above embodiment of the present application can be understood as a module, fragment or part of a code that represents one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0156] For example, Figure 1 to Figure 4The order of the steps in the embodiments may be changed in specific scenarios and is not limited to the above.
[0157] In an embodiment of the present application, a computer-readable storage medium may be provided, which stores program instructions, and the program instructions are executed to execute the aforementioned method flow embodiment (for example, Figure 1 to Figure 4 The process steps performed by one or more of the following.
[0158] That is, the method steps in the above embodiments are implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or are implemented as computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded via a network and to be stored in a local recording medium, so that the method represented herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA).
[0159] In summary, the embodiments of the present application provide a method, device, server and medium for determining and load balancing candidate streaming media. By acquiring the resource load information and associated bandwidth usage information of the streaming media node, the load margin of the streaming media node and the utilization of the access and distribution bandwidth are obtained respectively. The access bandwidth allocation plan and the distribution bandwidth list are calculated according to the utilization of the access and distribution bandwidth. The load margin sorting list is calculated according to the resource load information to provide each candidate access bandwidth and the associated candidate access streaming media node, as well as each candidate distribution bandwidth and the associated candidate distribution streaming media node for selection, that is, to determine the candidate range of the target streaming media node; further, when there is a service request, the target access and distribution bandwidth and the corresponding target streaming media node can be selected from them through the load balancing method to meet the service request. The present application realizes load balancing of the streaming media service cluster, and solves the problem of uneven bandwidth allocation causing freezes, packet loss and other problems that affect customer experience in the related technology.
[0160] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for determining candidate streaming media, characterized in that: Determination of candidate streaming nodes in load balancing applied to streaming node clusters; The candidate streaming media determination method comprises: Obtain resource load information and associated bandwidth usage information of each streaming node, wherein the bandwidth usage information is about the utilization of access bandwidth and distribution bandwidth; Calculating the load margin information of each of the streaming media nodes according to the resource load information, and sorting the load margin information by size to form a load margin sorting list; Calculate the corresponding access bandwidth margin information according to the bandwidth usage information of each access bandwidth, and calculate the access bandwidth allocation plan according to the access bandwidth margin information and the bandwidth margin difference range between each access bandwidth; wherein the access bandwidth allocation plan includes the allocatable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority; Calculating corresponding distribution bandwidth margin information according to bandwidth usage information of each distribution bandwidth, and forming a distribution bandwidth list according to each distribution bandwidth margin information, wherein the distribution bandwidth list includes each candidate distribution bandwidth monotonically arranged according to the size of the distribution bandwidth margin; Determining, according to the load margin sorting list, sorted candidate access streaming media nodes associated with each candidate access bandwidth in the access bandwidth allocation plan; The sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list are determined according to the load margin sorted list.
2. The method for determining candidate streaming media according to claim 1, characterized in that: Also includes: Excluding unavailable streaming nodes from the candidate access streaming nodes and candidate distribution streaming nodes, and excluding unavailable bandwidths from each access bandwidth and distribution bandwidth according to the unavailable streaming nodes, so as to obtain the candidate access bandwidth and candidate distribution bandwidth; The unavailable streaming media nodes refer to streaming media nodes that meet the unavailable condition, and the unavailable bandwidth refers to each of the associated streaming media nodes that meet the unavailable condition.
3. The method for determining candidate streaming media according to claim 2, characterized in that: The unavailable condition includes at least one of the following: 1) The load index of the streaming media node reaches above the preset threshold; 2) The resource load information sending timeout of the streaming node reaches a preset number of times; 3) The streaming node is marked as shut down.
4. The method for determining candidate streaming media according to claim 3, characterized in that: The resource load information includes: the hardware resource utilization rate of the streaming node; the hardware resource utilization rate includes: at least one of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate; the load indicator is expressed as a load rate, and the load rate is a weighted sum of one or more of the processing resource utilization rate, the storage resource utilization rate and the network resource utilization rate.
5. The method for determining candidate streaming media according to claim 1, characterized in that: The resource load information includes: the hardware resource utilization rate of the streaming media node; The calculating the load margin of each streaming node according to the resource load information includes: The remaining number of load-bearing devices of the streaming media node is calculated according to the hardware resource utilization rate.
6. The method for determining candidate streaming media according to claim 1, characterized in that: The calculating the access bandwidth allocation plan according to the access bandwidth margin information includes: Based on the condition of evenly allocating the bandwidth margins of the access bandwidths and the restriction on the bandwidth margin difference range between the access bandwidths, the allocable access bandwidth capacity of each candidate access bandwidth is calculated.
7. The method for determining candidate streaming media according to claim 1, characterized in that: The candidate streaming media determination method is executed periodically; in each current cycle, each candidate access bandwidth and associated candidate access streaming media node, as well as each candidate distribution bandwidth and associated candidate distribution streaming media node for the next cycle are calculated.
8. A load balancing method, characterized in that: Based on the access bandwidth allocation plan and the distribution bandwidth list obtained in the candidate streaming media determination method according to any one of claims 1 to 6, load balancing of the streaming media node cluster is performed; The load balancing method comprises: In response to the service request, searching the access bandwidth allocation plan for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as the target access bandwidth, including: searching the access bandwidth allocation plan in the order of allocation priority for the first candidate access bandwidth whose allocatable access bandwidth capacity satisfies the required bandwidth of the service request as the target access bandwidth; Selecting, from among the candidate access streaming media nodes associated with the target access bandwidth, a candidate access streaming media node with the largest load margin as a target access streaming media node; If the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can satisfy the service request, determining the target access streaming media node as a target distribution streaming media node; If the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot meet the service request, selecting a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth; Among the candidate streaming media distribution nodes associated with the target distribution bandwidth, a candidate streaming media distribution node with the largest load margin is selected as the target streaming media distribution node.
9. The load balancing method according to claim 8, characterized in that: The searching, in the access bandwidth allocation plan, for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as the target access bandwidth comprises: Determine whether the requesting device of the service request has a bound streaming media node; If so, searching the access bandwidth allocation plan for the allocatable access bandwidth capacity that can satisfy the service request and the associated candidate access streaming nodes including the candidate access bandwidth of the bound streaming node as the target access bandwidth; and taking the bound streaming node as the target access streaming node and the target distribution streaming node; If not, then the first candidate access bandwidth whose allocatable access bandwidth capacity can satisfy the service request is selected in the access bandwidth allocation plan as the target access bandwidth.
10. A candidate streaming media determination device, characterized in that: Determination of candidate streaming nodes applied to a streaming node cluster; The candidate streaming media determining device comprises: The streaming media load information collection module is used to obtain the resource load information of each streaming media node; A network bandwidth usage information collection module is used to obtain resource load information of each streaming node and associated bandwidth usage information, wherein the bandwidth usage information is about the utilization of access bandwidth and distribution bandwidth; The streaming media load information collection module is used to calculate the load margin information of each streaming media node according to the resource load information and the broadband margin difference range between each access broadband, and sort the load margin information by size to form a load margin sorting list; A candidate bandwidth / streaming media determination module, configured to calculate corresponding access bandwidth margin information according to bandwidth usage information of each access bandwidth, and calculate an access bandwidth allocation plan according to the access bandwidth margin information; wherein the access bandwidth allocation plan includes the allocatable access bandwidth capacity of each candidate access bandwidth sorted by allocation priority; The candidate bandwidth / streaming media determination module is further used to calculate corresponding distribution bandwidth margin information according to the bandwidth usage information of each distribution bandwidth, and form a distribution bandwidth list according to each distribution bandwidth margin information, wherein the distribution bandwidth list includes each candidate distribution bandwidth monotonically arranged according to the size of the distribution bandwidth margin; The candidate bandwidth / streaming media determination module is used to determine the sorted candidate access streaming media nodes associated with each candidate access bandwidth in the access bandwidth allocation plan according to the load margin sorting list; and is also used to determine the sorted candidate distribution streaming media nodes associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin sorting list.
11. A load balancing device, characterized in that: Based on the access bandwidth allocation plan and the distribution bandwidth list obtained in the candidate streaming media determination method according to any one of claims 1 to 6, load balancing of the streaming media node cluster is performed; The load balancing device comprises: an allocation module, configured to, in response to a service request, search in the access bandwidth allocation plan for a candidate access bandwidth whose allocatable access bandwidth capacity satisfies the service request as a target access bandwidth, including: searching in the access bandwidth allocation plan in the order of allocation priority for the first candidate access bandwidth whose allocatable access bandwidth capacity satisfies the required bandwidth of the service request as the target access bandwidth; The allocation module is used to select a candidate access streaming media node with the largest load margin as the target access streaming media node from among the candidate access streaming media nodes associated with the target access bandwidth; The allocation module is used to determine the target access streaming media node as a target distribution streaming media node if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can meet the service request; The allocation module is configured to select a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as the target distribution bandwidth if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot meet the service request; The allocation module is used to select a candidate streaming media distribution node with the largest load margin as a target streaming media distribution node from among the candidate streaming media distribution nodes associated with the target distribution bandwidth.
12. A server, characterized in that: include: Communicator, memory and processor; The communicator is used for communicating with the outside; The memory is used to store program instructions; The processor is used to run the program instructions to execute the candidate streaming media determination method according to any one of claims 1 to 7; Or execute the load balancing method as described in claim 8.
13. A computer-readable storage medium, characterized in that: Program instructions are stored, and the program instructions are executed to perform the candidate streaming media determination method according to any one of claims 1 to 7; or Execute the load balancing method as described in claim 8.
