CN114244848A - Candidate streaming media determining and load balancing method, device, server and medium - Google Patents
Candidate streaming media determining and load balancing method, device, server and medium Download PDFInfo
- Publication number
- CN114244848A CN114244848A CN202111539682.XA CN202111539682A CN114244848A CN 114244848 A CN114244848 A CN 114244848A CN 202111539682 A CN202111539682 A CN 202111539682A CN 114244848 A CN114244848 A CN 114244848A
- Authority
- CN
- China
- Prior art keywords
- bandwidth
- streaming media
- access
- candidate
- distribution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000012545 processing Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 3
- 230000000903 blocking effect Effects 0.000 abstract description 4
- 230000000875 corresponding effect Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/101—Server selection for load balancing based on network conditions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application provides a method, a device, a server and a medium for determining candidate streaming media and balancing load, respectively obtains the load allowance of a streaming media node and the utilization condition of access and distribution bandwidth by acquiring resource load information and associated bandwidth utilization information of the streaming media node, calculates an access bandwidth allocation plan and a distribution bandwidth list according to the utilization condition of the access and distribution bandwidth, and calculates a load allowance ranking list according to the resource load information to provide each candidate access bandwidth and associated candidate access streaming media node, and each candidate distribution bandwidth and associated candidate distribution streaming media node for selection, namely to determine the candidate range of a target streaming media node; furthermore, when a service request exists, a target access and distribution bandwidth and a corresponding target streaming media node can be selected by a load balancing method so as to meet the service request, and the situations of blocking and packet loss caused by uneven distribution are avoided.
Description
Technical Field
The present application relates to the field of load balancing technologies, and in particular, to a method, an apparatus, a server, and a medium for determining candidate streaming media and load balancing.
Background
With the increasing number of cameras accessed by video monitoring video platforms, the number of required streaming media nodes is also increasing. In addition, for reasons such as the utilization of old servers, the network for accessing the camera is also different between a public network and a private network. And as the service is developed and expanded, it may happen that the streaming media node uses multiple bandwidths, the uplink and downlink bandwidths associated with different servers are not the same, and the processing capabilities of the used streaming media nodes are also different. Due to the complexity of multiple networks and multiple bandwidths, and the equipment directional load and the shutdown requirements of the streaming media nodes existing in the service, the live broadcast experience is easily influenced due to uneven load of the streaming media nodes.
Therefore, a load balancing scheme is urgently needed in the industry to select a suitable streaming media node from a plurality of streaming media nodes to satisfy streaming media service such as live broadcasting, monitoring and the like.
Inventing messages
In view of the above-mentioned shortcomings of the prior art, the present application aims to provide a candidate streaming media determination, load balancing method, apparatus, server and medium for selecting a suitable streaming media node based on load balancing purpose.
The first aspect of the present application provides a candidate streaming media determination method, which is applied to determination of candidate streaming media nodes in load balancing of a streaming media node cluster; the candidate streaming media determination method comprises the following steps: acquiring resource load information and associated bandwidth use information of each streaming media node, wherein the bandwidth use information relates to the utilization conditions of access bandwidth and distribution bandwidth; calculating load allowance information of each streaming media node according to the resource load information, and sorting according to the size of the load allowance information to form a load allowance sorting list; calculating corresponding access bandwidth allowance information according to the bandwidth use information of each access bandwidth, and calculating an access bandwidth allocation plan according to the access bandwidth allowance information; wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order; calculating corresponding distribution bandwidth allowance information according to the bandwidth use information of each distribution bandwidth, and forming a distribution bandwidth list according to each distribution bandwidth allowance information, wherein the distribution bandwidth list comprises each candidate distribution bandwidth which is monotonously arranged according to the size of the distribution bandwidth allowance; determining each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan according to the load margin ordered list; and determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered list.
In some embodiments, the candidate streaming media determination method further includes: excluding the unavailable streaming media nodes from the candidate access streaming media nodes and the candidate distribution streaming media nodes, and excluding unavailable bandwidths from all the access bandwidths and the distribution bandwidths according to the unavailable streaming media nodes to obtain the candidate access bandwidths and the candidate distribution bandwidths; wherein the unavailable streaming media node refers to a streaming media node meeting an unavailable condition, and the unavailable bandwidth refers to that each associated streaming media node meets the unavailable condition.
In some embodiments, the unavailability condition comprises at least one of: 1) the load index of the streaming media node reaches above a preset threshold value; 2) the resource load information of the streaming media node is sent overtime and reaches the preset times; 3) the streaming media node is marked as off.
In some embodiments, the resource load information comprises: the hardware resource utilization rate of the streaming media node; the hardware resource usage includes: processing at least one of a resource usage rate, a storage resource usage rate, and a network resource usage rate; the load index is expressed as a load rate, which is a weighted sum of one or more of processing resource usage, storage resource usage, and network resource usage.
In some embodiments, the resource load information comprises: the hardware resource utilization rate of the streaming media node; the calculating the load margin of each streaming media node according to the resource load information includes: and calculating the residual quantity of the loadable devices of the streaming media node according to the utilization rate of the hardware resources.
In some embodiments, said calculating an access bandwidth allocation plan according to said access bandwidth margin information comprises: and calculating the allocable access bandwidth capacity of each candidate access bandwidth based on the condition of averagely allocating the bandwidth allowance of each access bandwidth and the limit of the bandwidth allowance difference range between each access bandwidth.
In some embodiments, the candidate streaming media determination method is performed periodically; and calculating each candidate access bandwidth and associated candidate access streaming media node for the next period and each candidate distribution bandwidth and associated candidate distribution streaming media node in each current period.
A second aspect of the present application provides a load balancing method, which performs load balancing on a streaming media 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 aspect; the load balancing method comprises the following steps: in response to a service request, searching candidate access bandwidth with allocable access bandwidth capacity meeting the service request in the access bandwidth allocation plan as target access bandwidth; selecting the candidate access streaming media node with the largest load margin as a target access streaming media node from the candidate access streaming media nodes associated with the target access bandwidth; if the distribution bandwidth allowance of the distribution bandwidth associated with the target access streaming media node can meet the service request, determining the target access streaming media node as a target distribution streaming media node; if the distribution bandwidth allowance of the distribution bandwidth associated with the target access streaming media node cannot meet the service request, selecting a candidate distribution bandwidth with the maximum distribution bandwidth allowance in the distribution bandwidth list as a target distribution bandwidth; and selecting the candidate distribution streaming media node with the maximum load margin as the target distribution streaming media node from the candidate distribution streaming media nodes associated with the target distribution bandwidth.
In some embodiments, the searching, in the access bandwidth allocation plan, for a candidate access bandwidth whose allocable access bandwidth capacity satisfies the service request as a target access bandwidth includes: judging whether the request equipment of the service request has a bound streaming media node; if so, searching candidate access bandwidths with allocable access bandwidth capacity capable of meeting the service request and including the bound streaming media nodes in each associated candidate access streaming media node in the access bandwidth allocation plan to serve as target access bandwidths; the bound streaming media nodes are used as target access streaming media nodes and target distribution streaming media nodes; if not, selecting the first candidate access bandwidth with the allocable access bandwidth capacity capable of meeting the service request in the access bandwidth allocation plan as the target access bandwidth.
A third aspect of the present application provides a candidate streaming media determining apparatus, which is applied to determining candidate streaming media nodes of a streaming media node cluster; the candidate streaming media determination device comprises: the streaming media load information collection module is used for acquiring resource load information of each streaming media node; the network bandwidth utilization information collection module is used for acquiring resource load information and associated bandwidth utilization information of each streaming media node, wherein the bandwidth utilization information relates to utilization conditions of access bandwidth and distribution bandwidth; the streaming media load information collection module is used for calculating load margin information of each streaming media node according to the resource load information and sorting the load margin information according to the size of the load margin information to form a load margin sorting list; the candidate bandwidth/streaming media determining module is used for calculating corresponding access bandwidth allowance information according to the bandwidth use information of each access bandwidth and calculating an access bandwidth allocation plan according to the access bandwidth allowance information; wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order; the candidate bandwidth/streaming media determining module is further configured 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, where the distribution bandwidth list includes each candidate distribution bandwidth which is monotonically arranged according to the size of the distribution bandwidth margin; the candidate bandwidth/streaming media determining module is configured to determine, according to the load margin ordered list, each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan; and the distribution network is further used for determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered list.
A fourth aspect of the present application provides a load balancing apparatus, which performs load balancing of a streaming media 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: the allocation module is used for responding to a service request, and searching candidate access bandwidth with allocable access bandwidth capacity meeting the service request in the access bandwidth allocation plan as target access bandwidth; the allocation module is configured to select, as a target access streaming media node, 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; the allocation module is configured to determine that the target access streaming media node is 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, as a target distribution bandwidth, a candidate distribution bandwidth in the distribution bandwidth list with the largest distribution bandwidth margin if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot satisfy the service request; the distribution module is configured to select, as the target distribution streaming media node, the candidate distribution streaming media node with the largest load margin from among the candidate distribution streaming media nodes associated with the target distribution bandwidth.
A fourth aspect of the present application provides a server comprising: a communicator, a memory, and a processor; the communicator is used for communicating with the outside; the memory is to store program instructions; the processor is configured to execute program instructions to perform the candidate streaming media determination method according to any one of the first aspect; or to perform a load balancing method as described in the second aspect.
A fifth aspect of the present application provides a computer-readable storage medium storing program instructions that are executed to perform the candidate streaming media determination method according to any one of the first aspects; or to perform a load balancing method as described in the second aspect.
As described above, in the embodiments of the present application, a method, an apparatus, a server and a medium for determining candidate streaming media and load balancing are provided, where resource load information and associated bandwidth usage information of a streaming media node are obtained to obtain a load margin and utilization conditions of access and distribution bandwidths of the streaming media node, an access bandwidth allocation plan and a distribution bandwidth list are calculated according to the utilization conditions of the access and distribution bandwidths, and a load margin ordered list is calculated according to the resource load information, so as to provide each candidate access bandwidth and associated candidate access streaming media node, and each candidate distribution bandwidth and associated candidate distribution streaming media node for selection, that is, determine a candidate range of a target streaming media node; furthermore, when a service request exists, a target access and distribution bandwidth and a corresponding target streaming media node can be selected by a load balancing method so as to meet the service request. The method and the device realize load balance of the streaming media service cluster, and solve the problem that the customer experience is influenced by blocking, packet loss and the like due to uneven bandwidth distribution in the related technology.
Drawings
Fig. 1 shows a schematic flow chart of a candidate streaming media determination method in an embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for determining candidate streaming media in an embodiment of the present application.
Fig. 3 shows a flowchart of a load balancing method according to an embodiment of the present application.
Fig. 4 shows a flow chart of a load balancing method in an embodiment of the present application.
Fig. 5 shows a block diagram of a candidate streaming media determination apparatus according to an embodiment of the present application.
Fig. 6 shows a block diagram of a load balancing apparatus according to an embodiment of the present application.
Fig. 7 shows a block diagram of a load balancing system according to an embodiment of the present application.
Fig. 8 shows a schematic structural diagram of a server in an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings so that those skilled in the art to which the present application pertains can easily carry out the present application. The present application may be embodied in many different forms and is not limited to the embodiments described herein.
Reference throughout this specification to "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," or the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Furthermore, the particular features, structures, materials, or characteristics shown may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of different embodiments or examples presented in this application can be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the expressions of the present application, "plurality" means two or more unless specifically defined otherwise.
In order to clearly explain the present application, components that are not related to the description are omitted, and the same reference numerals are given to the same or similar components throughout the specification.
Throughout the specification, when a device is referred to as being "connected" to another device, this includes not only the case of being "directly connected" but also the case of being "indirectly connected" with another element interposed therebetween. In addition, when a device "includes" a certain component, unless otherwise stated, the device does not exclude other components, but may include other components.
Although the terms first, second, etc. may be used herein to refer to various elements in some examples, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first interface and the second interface are represented. Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, modules, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, elements, modules, items, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "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 ". An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some way.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" include plural forms as long as the words do not expressly indicate a contrary meaning. The term "comprises/comprising" when used in this specification is taken to specify the presence of stated features, regions, integers, steps, operations, elements, and/or components, but does not exclude the presence or addition of other features, regions, integers, steps, operations, elements, and/or components.
Although not defined differently, including technical and scientific terms used herein, all terms have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. Terms defined in commonly used dictionaries are to be additionally interpreted as having meanings consistent with those of related art documents and currently prompted messages, and should not be excessively interpreted as having ideal or very formulaic meanings unless defined.
In the related technology, due to the high-speed growth of streaming media related services such as video monitoring services, live broadcast services and the like, more and more streaming media nodes are needed, and a streaming media node cluster is formed. Therefore, when the generated complex network state, bandwidth state, streaming media node state and the like are used for distributing the streaming media nodes and the bandwidth to meet the service request, live broadcast, video blocking in monitoring and the like caused by uneven load among the streaming media nodes are easy to occur, and user experience is greatly influenced.
In view of this, embodiments of the present application provide a method, an apparatus, a server, and a medium for determining candidate streaming media and load balancing to solve the problems in the prior art.
Specifically, the candidate access/distribution bandwidth and the associated candidate access/distribution streaming media node can be determined by the candidate streaming media determining method, so that the selection range is narrowed; when the service request of the user is obtained, through a load balancing method, a target access/distribution bandwidth can be selected from the determined candidate access/distribution bandwidths, so as to further determine a target access/distribution streaming media node meeting the service request in the associated candidate access/distribution streaming media nodes.
In a possible example, the above procedure may be performed in real time and periodically, the candidate streaming media determination method is performed in each period, and candidate access/distribution bandwidths and associated candidate access/distribution streaming media nodes for a next period are determined by candidate streaming media in a current period; in the next period, when a service request exists, determining a target access/distribution bandwidth and a target access/distribution streaming media node according to the candidate access/distribution bandwidth determined in the previous period and the associated candidate access/distribution streaming media node.
In addition, to facilitate understanding, the association relationship between the downstream media node and the bandwidth is explained first. One bandwidth may be allocated to one streaming media node, one bandwidth may be allocated to a plurality of streaming media nodes, and one streaming media node may also be allocated with a plurality of bandwidths. E.g., two 100M bandwidths, the first bandwidth allocated to streaming media node a, a access load device a1, a 2; the other is distributed to two streaming media nodes B, C for use, B is connected to a load device B1, and C is connected to a load device C1; the streaming media node associated with the first bandwidth is a, and the streaming media node associated with the second bandwidth is B, C.
The load balancing of the application also considers the uplink and downlink bandwidth, and the uplink and downlink bandwidth need to be balanced respectively but are correlated. The upstream bandwidth may be exemplarily referred to as a distribution bandwidth in the following embodiments, and the downstream bandwidth may be exemplarily referred to as an access bandwidth in the following embodiments.
Fig. 1 shows a schematic flow chart of a candidate streaming media determination method according to an embodiment of the present application.
The candidate streaming media determining method is applied to determining candidate bandwidths and candidate streaming media nodes in load balancing of a streaming media node cluster, and solves the problem of providing a target bandwidth, a selectable range of the target streaming media node corresponding to the target bandwidth and a reference basis during load balancing. The streaming node may be a physical streaming server, or may be one of the servers running on the physical server.
Referring to fig. 1, the candidate streaming media determining method includes:
step S101: acquiring resource load information of each streaming media node and associated bandwidth utilization information, wherein the bandwidth utilization information relates to utilization conditions of access bandwidth and distribution bandwidth.
In some embodiments, the resource load information comprises: and the hardware resource utilization rate of the streaming media node. In a possible implementation, the hardware resource usage includes: at least one of a processing resource usage rate, a storage resource usage rate, and a network resource usage rate. For example, the processing resource usage rate includes an occupancy rate of a processor (CPU), the storage resource usage rate includes an occupancy rate of a memory, a hard disk, and the like, and the network resource usage rate includes a usage rate of a network card bandwidth, and the like.
The bandwidth usage information may include a total capacity and a used capacity of each bandwidth, from which information such as a bandwidth usage rate, a bandwidth remaining capacity, a bandwidth capacity remaining rate, and the like may be calculated.
Step S102: and calculating the load margin information of each streaming media node according to the resource load information, and sorting according to the size of the load margin information to form a load margin sorted list.
The remaining resource margin can be calculated through the existing total resource amount and the utilization rate. In some embodiments, if the cost resource of each load device can be known or preset, the remaining number of loadable devices that can still be loaded of the streaming media node can be calculated according to the hardware resource usage rate to represent the load margin. Alternatively, the load margin may be represented by a resource remaining rate, i.e., 100% minus resource usage.
In some embodiments, the load margin ordered list may be arranged for each streaming media node according to a monotonous order from large to small or from small to large load margins, and the streaming media nodes with larger load margins are used with higher priority.
Step S103: and calculating corresponding access bandwidth allowance information according to the bandwidth use information of each access bandwidth, and calculating an access bandwidth allocation plan according to the access bandwidth allowance information.
Wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order.
In some embodiments, the allocable access bandwidth capacity in the access bandwidth allocation plan is performed based on an average allocation principle, that is, based on a bandwidth margin for allocating each access bandwidth on average. For example, 5 access bandwidths of 100M capacity, it can be said that flows use their bandwidth margins so that their bandwidth margins dynamically change to be equal. For example, after different service requests are satisfied, 5 pieces of bandwidth of 100M all ideally tend to have a remaining capacity of, for example, 80M or the like (the remaining amount depends on the required bandwidth capacity used by the service request). Since ideal average allocation at each time is impossible, for example, 5 pieces of 100M bandwidth are not used, and a service request at this time needs 5M access bandwidth, one of them provides 95M capacity after 5M, and the others are still 100M, which is uneven, it is necessary to set a limit of a bandwidth margin difference range allowusagsiff, for example, bandwidth margin between each piece of access bandwidth is allowed to be 5M, 10M; alternatively, each bandwidth having the same capacity may be represented by a capacity ratio, for example, 5%, 10%, which corresponds to a 100M bandwidth capacity, i.e., 5M, 10M.
In some embodiments, the candidate access bandwidths are sorted in descending order according to the size of the remaining capacity rate, and the allocable access bandwidth capacity of each access bandwidth is calculated in an evenly-distributed manner, which may be represented by the following formula:
wherein,indicates the # id after sortingiTotal capacity of the access bandwidth corresponding to # id of each access bandwidth in remaining rateiThe remaining rate of the individual bandwidths backward of the stripe bandwidth is monotonically decreasing,indicates the # id after sortingiCapacity remaining rate of the stripe bandwidth. I.e. as many as possible within the allowed error of the average distribution, but not exceeding the maximum distributableCapacity. From # id according to this formulai,#idi+1... an allocable access bandwidth capacity may be calculated for each candidate access bandwidth.
The access bandwidth allocation plan may be expressed as, for example: list in the form of [ [ bandwidth ID1, allocable bandwidth capacity 1], [ bandwidth ID2, allocable bandwidth capacity 2], … …, [ bandwidth IDx, allocable bandwidth capacity x ], [ bandwidth ID, where the bandwidth ID may be assigned to each candidate access bandwidth in the order of allocation. Wherein the earlier candidate access bandwidths are ranked, the better the candidate access bandwidths are matched.
Step S104: and calculating corresponding distribution bandwidth allowance information according to the bandwidth use information of each distribution bandwidth, and forming a distribution bandwidth list according to each distribution bandwidth allowance information, wherein the distribution bandwidth list comprises each candidate distribution bandwidth which is monotonously arranged according to the size of the distribution bandwidth allowance.
In some embodiments, the distribution bandwidth list may be monotonically sorted by the size of the distribution bandwidth margin, and candidate distribution bandwidths with larger distribution bandwidth margins are preferentially used for allocation.
Step S105: and determining each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan according to the load margin ordered list.
Step S106: and determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered list.
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 nodes, so by selecting the priority with the largest load margin from them as the target access/distribution streaming node, the number of load devices that can be accessed is greater, and load balancing is achieved.
Step S105 and step S106 determine ordered (monotonically ordered in the reserved list to facilitate preference of the first) candidate access/distribution streaming media nodes associated with the candidate access/distribution bandwidth, so as to determine the target access/distribution bandwidth and the target access/distribution streaming media node when there is a service request.
In some embodiments, the unavailable streaming media node may be excluded from the candidate access streaming media nodes and the candidate distribution streaming media nodes, and an unavailable bandwidth of the access bandwidths and the distribution bandwidths may be excluded according to the unavailable streaming media node to obtain the candidate access bandwidth and the candidate distribution bandwidth. Wherein the unavailable streaming media node refers to a streaming media node meeting an unavailable condition, and the unavailable bandwidth refers to that each associated streaming media node meets the unavailable condition. In a possible example, the unavailability condition includes at least one of: 1) the load index of the streaming media node reaches above a preset threshold value; 2) the resource load information of the streaming media node is sent overtime and reaches the preset times; 3) the streaming media node is marked as off.
For example, if all streaming media nodes associated with a certain access/distribution bandwidth satisfy the above three unavailability conditions, the access/distribution bandwidth is unavailable and is not included in the access bandwidth allocation plan or the distribution bandwidth list.
In some embodiments, the resource load information comprises: the hardware resource utilization rate of the streaming media node; the hardware resource usage includes: processing at least one of a resource usage rate, a storage resource usage rate, and a network resource usage rate; the load index is expressed as a load rate, which is a weighted sum of one or more of processing resource usage, storage resource usage, and network resource usage.
For example, the CPU usage, the memory usage, and the network resource usage of a streaming media node are PSS respectivelycpu、PSSmem、PSSnetThen load factor PSSloadThe calculation formula of (c) may be:
PSSload=a1*PSScpu+a2*PSSmem+a3*PSSnet
wherein, a1、a2、a3Is a weight, a1+a2+a3=1。
Thus, the PSS of the streaming nodeloadB is a preset threshold value, namely corresponding to the unavailable condition 1).
The unavailable condition 2) corresponds to a problem that the streaming media node may be down, disconnected and the like.
The unavailability condition 3) corresponds to a case where the streaming node may shut down in actual use.
With reference to the foregoing embodiments, as shown in fig. 2, a schematic flow chart of a candidate streaming media determination method in a specific application example of the present application is shown.
Referring to fig. 2, the process specifically includes:
step S201: and calculating the load rate of the streaming media nodes and the number of loaded devices according to the collected hardware resource utilization rate of the streaming media nodes.
Step S202: and marking the streaming media nodes meeting the unavailability condition as unavailable, and not participating in load distribution.
Step S203: the resource cost required by each streaming media node for loading a single load device is obtained, the load margin (namely the number of the devices which can be loaded in the surplus) is calculated by combining the number of the loaded devices, and the load margin is sorted in a descending order to obtain a load margin sorted list.
Step S204: bandwidth usage information for each access/distribution bandwidth is collected.
Step S205: and setting the bandwidth marked as unavailable by all the related streaming media nodes in the access/distribution bandwidth as unavailable.
Step S206: grouping the access/distribution bandwidths according to the network to which the access/distribution bandwidths belong, and ranking the access/distribution bandwidths of each group from large to small according to the remaining rate of the bandwidth capacity (or ranking from small to large according to the utilization rate of the bandwidth capacity);
step S207: for each candidate access bandwidth (excluding unavailable bandwidth), calculating an access bandwidth allocation plan;
step S208: and according to the incidence relation between the streaming media nodes and the bandwidth, forming the association between each streaming media node and the candidate access/distribution bandwidth after the sorting of the load allowance. I.e. candidate streaming media nodes.
For example, after the bandwidth 1 associated streaming media node A, B, C is sorted by the load margins, the load margins are sorted from large to small in descending order to be C, A, B, the bandwidth 1 is used as a candidate bandwidth to form an association between [ C, a, B ] and the bandwidth 1, and the streaming media node A, B, C is a candidate streaming media node associated with the candidate bandwidth 1.
Fig. 3 is a schematic flow chart showing a load balancing method according to an embodiment of the present application.
The load balancing method determines a target access/distribution bandwidth based on the access bandwidth distribution plan obtained by the candidate streaming media determining method and each candidate access/distribution bandwidth in the distribution bandwidth list, so as to determine a target access/distribution streaming media node from the associated candidate access/distribution streaming media node.
Referring to fig. 3, the load balancing method includes:
step S301: and responding to a service request, and searching candidate access bandwidth with allocable access bandwidth capacity meeting the service request in the access bandwidth allocation plan as target access bandwidth.
In some embodiments, the service request may include an access/distribution bandwidth capacity required to be allocated by the requesting device, and the allocated target access bandwidth and the target distribution bandwidth need to satisfy the corresponding bandwidth capacity to satisfy the service request. Optionally, the service request may also carry a device number of the requesting device, an affiliated network (a target access/distribution bandwidth and an associated target access/distribution streaming media node may be preferentially determined in the affiliated network), information of the streaming media node that may be bound by the requesting device, and the like.
In some embodiments, the searching may use a candidate access bandwidth, which is found according to an earliest principle, that is, according to the allocation priority order in the access bandwidth allocation plan, and whose first allocable access bandwidth capacity can satisfy a service request (e.g., meet a required bandwidth of the service request), as the target access bandwidth.
Step S302: and selecting the candidate access streaming media node with the maximum load margin as the target access streaming media node from the candidate access streaming media nodes associated with the target access bandwidth.
In some embodiments, sorted candidate access streaming media nodes associated with candidate access bandwidths in the access bandwidth allocation plan are already obtained in step S105, then the sorted first candidate access streaming media node, that is, the target access streaming media node with the largest load margin, may be conveniently selected in step S302.
Step S303: and judging whether the distribution bandwidth allowance of the distribution bandwidth associated with the target access streaming media node can meet the service request.
If the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node can satisfy the service request, step S304 is performed: 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 satisfy the service request, step S305 is performed: selecting a candidate distribution bandwidth with the largest distribution bandwidth margin in the distribution bandwidth list as a target distribution bandwidth;
after step S305, step S306 is executed again: and selecting the candidate distribution streaming media node with the maximum load margin as the target distribution streaming media node from the candidate distribution streaming media nodes associated with the target distribution bandwidth.
In some embodiments, sorted candidate distribution streaming media nodes associated with candidate distribution bandwidths in the distribution bandwidth list are already obtained in step S106, and then the sorted first candidate distribution streaming media node, that is, the target distribution streaming media node with the largest load margin, may be conveniently selected in step S302.
The service request may also indicate that the requesting device has a bound streaming media node, and if the bound streaming media node exists, the target allocable access bandwidth capacity which can meet the service request and contains the bound streaming media node in the associated candidate access streaming media node is searched in the access bandwidth allocation plan; otherwise, selecting the first candidate access bandwidth with allocable access bandwidth capacity capable of meeting the service request in the access bandwidth allocation plan as the target access bandwidth. And the bound streaming media node can be used as a target streaming media node, and other non-bound candidate streaming media nodes are excluded.
For example, the service request is bound to streaming media node a, the service request requires access capacity X, the allocation of access bandwidth is planned as [ [ bandwidth ID1, allocable bandwidth capacity 1], [ bandwidth ID2, allocable bandwidth capacity 2], … …, [ bandwidth IDx, allocable bandwidth capacity X ] ], the streaming media node associated with bandwidth ID1 has B, C, the streaming media node associated with bandwidth ID2 has A, D, and the streaming media node associated with bandwidth ID3 has A, E. If the searched streaming media node associated with the bandwidth ID1 does not contain A, continuing to search downwards; finding a streaming media node associated with the bandwidth ID2 to contain A, judging whether the allocable bandwidth capacity 2 meets the requirement of X, and if so, continuing to find downwards; and finding out that the streaming media node associated with the bandwidth ID3 contains A, judging whether the allocable bandwidth capacity 3 meets the requirement of X, and if the result shows that the allocable bandwidth capacity 3 is greater than X and can meet the requirement of a service request, taking the bandwidth ID3 as a target access bandwidth to exclude the non-binding streaming media node E.
Fig. 4 is a schematic flow chart showing a load balancing method in a specific application example of the present application.
Referring to fig. 4, the process includes:
step S401: a service request is received.
Such as a live request, a surveillance video play request, etc. The service request may include the device number of the requesting device, the network to which it belongs, the bandwidth capacity required for access and distribution, and the bound streaming node information (e.g., a list of bound streaming nodes).
Step S402: judging whether the request equipment has an access streaming media node; if yes, go to step S403, determine an access streaming media node that can satisfy the service request; if not, go to step S404;
step S404: judging whether the request equipment has a binding streaming media node or not; if yes, go to step S405; if not, go to step S406;
step S405: searching a target access bandwidth in an access bandwidth allocation plan of a network packet to which the request equipment belongs according to the following conditions in sequence: the allocable access bandwidth capacity of the candidate access bandwidth meets the required access bandwidth capacity, and each candidate streaming media node related to the candidate access bandwidth comprises the binding streaming media node;
step S406: searching a target access bandwidth in an access bandwidth allocation plan of a network packet to which the request equipment belongs according to the following conditions in sequence: the allocable access bandwidth capacity of the candidate access bandwidth meets the required access bandwidth capacity;
step S407: judging whether the target access bandwidth is found in the steps S405 and S406; if yes, go to step S408; if not, the step S409 is executed;
continuing to step S405, if there is only one binding streaming media node in the associated candidate streaming media nodes for the target access bandwidth found in step S405, determining that the binding streaming media node is the target access streaming media node; and if a plurality of bound streaming media nodes exist, determining the target access streaming media node with the largest load margin.
And continuing to step S406, regarding the target access bandwidth found in step S406, taking the target access streaming media node with the largest load margin among the associated candidate access streaming media nodes as the target access streaming media node.
Step S408: determining whether a target access streaming media node can be accessed; if yes, go to step S403; if not, the step S409 is executed;
step S409: the allocation fails.
Step S410: judging whether the target access streaming media node has a distribution bandwidth allowance meeting the distribution bandwidth capacity required; if yes, determining that the target access streaming media node is a target distribution streaming media node, and entering step S411; if not, the process proceeds to step S412.
Step S411: and determining both the target access streaming media node and the target distribution streaming media.
Step S412: judging whether a first candidate distribution bandwidth (with the largest distribution bandwidth allowance) in a distribution bandwidth list of a network to which the request equipment belongs meets the demand distribution bandwidth capacity; if not, the step S409 is executed; if yes, the process proceeds to step S413.
Step S413: taking the first candidate distribution bandwidth as a target distribution bandwidth;
step S414: judging whether a first candidate distribution multimedia server (with the largest load margin) in the sorted candidate distribution multimedia servers associated with the target distribution bandwidth is available; if not, the step S409 is executed; if yes, go to step S415;
step S415: taking the first candidate distribution multimedia server as a target distribution multimedia server; then, the process goes to step S411;
step S416: and after the allocation is finished, updating the allocable access bandwidth capacity of each candidate access bandwidth and the distribution bandwidth allowance of each candidate distribution bandwidth.
Fig. 5 is a schematic block diagram of a candidate streaming media determination apparatus according to an embodiment of the present application. The implementation of the candidate streaming media determining apparatus may refer to the previous embodiment of the candidate streaming media determining method, and the same technical content is not repeated herein.
The candidate streaming media determination device 500 comprises:
a streaming media load information collection module 501, configured to obtain resource load information of each streaming media node;
a network bandwidth utilization information collecting module 502, configured to obtain resource load information of each streaming media node and associated bandwidth utilization information, where the bandwidth utilization information relates to utilization conditions of access bandwidth and distribution bandwidth;
the streaming media load information collecting module 501 is configured to calculate load margin information of each streaming media node according to the resource load information, and sort the load margin information to form a load margin sorted list according to the size of the load margin information;
a candidate bandwidth/streaming media determining module 503, configured to calculate, according to the bandwidth usage information of each access bandwidth, corresponding access bandwidth margin information, and calculate an access bandwidth allocation plan according to the access bandwidth margin information; wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order;
the candidate bandwidth/streaming media determining module 503 is further configured to calculate, according to the bandwidth usage information of each distribution bandwidth, corresponding distribution bandwidth margin information, and form a distribution bandwidth list according to each distribution bandwidth margin information, where the distribution bandwidth list includes each candidate distribution bandwidth that is monotonically arranged according to the size of the distribution bandwidth margin;
the candidate bandwidth/streaming media determining module 503 is configured to determine, according to the load margin ordered list, each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan; and the distribution network is further used for determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered list.
Fig. 6 is a block diagram of a load balancing apparatus according to an embodiment of the present application.
The implementation of the load balancing apparatus 600 may refer to the previous embodiments of the load balancing method, and the same technical content is not repeated here.
The load balancing apparatus 600 includes:
the allocating module 601 is configured to, in response to a service request, search, in the access bandwidth allocation plan, for a candidate access bandwidth whose allocable access bandwidth capacity satisfies the service request as a target access bandwidth;
the allocating module 601 is configured to select, as a target access streaming media node, a candidate access streaming media node with the largest load margin from among candidate access streaming media nodes associated with the target access bandwidth;
the allocating module 601 is configured to determine that the target access streaming media node is 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 allocating module 601 is configured to select, as a target distribution bandwidth, a candidate distribution bandwidth in the distribution bandwidth list with the largest distribution bandwidth margin if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot meet the service request; the distribution module is configured to select, as the target distribution streaming media node, the candidate distribution streaming media node with the largest load margin from among the candidate distribution streaming media nodes associated with the target distribution bandwidth.
Fig. 7 is a block diagram of a load balancing system according to an embodiment of the present application.
In some embodiments, the load balancing system may have the functions of the apparatuses in fig. 5 and fig. 6, and the load balancing system may be applied to a server, such as a decision server. The decision server may be a traffic server or be connected to a traffic server to provide load balancing decisions. The service server is used for providing target access and distributing streaming media nodes according to service requests of users.
Referring to fig. 7, the load balancing system 700 includes:
a timing module 701, configured to set an acquisition period T of candidate access/distribution streaming media nodes, where after each period T is finished, the load balancing system recalculates a load state of each streaming media node and updates the candidate access/distribution streaming media nodes available for distribution, so as to guide selection of a target access/distribution streaming media node in the next period T.
A streaming media load information collecting module 702, configured to collect status and resource load information of each streaming media node to determine whether it can provide service for a user and provide a load rate and a load margin as references. In a possible example, each streaming media node collects, for example, its own hardware index and usage rate, and sends the hardware index and usage rate to the streaming media load information collection module with a period T1 (which can be used as a heartbeat), and 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.
The network bandwidth utilization collecting module 703 is configured to collect usage conditions of various bandwidths (including access bandwidth and distribution bandwidth), such as total capacity and used capacity, and to calculate, for example, bandwidth utilization, bandwidth margin, bandwidth surplus ratio, and the like.
A candidate bandwidth/streaming media selecting module 704, configured to exclude unavailable bandwidths and streaming media nodes according to the utilization rates and remaining rates of the bandwidths and the streaming media nodes, and calculate candidate access/distribution bandwidths and associated candidate access/distribution streaming media nodes that are available for distribution in the next period, and a bandwidth distribution sequence (embodied in an access bandwidth distribution plan, a distribution bandwidth list, and the like).
The allocating module 705 is configured to allocate a target access/distribution bandwidth meeting the service request requirement according to the candidate access/distribution bandwidths, and then select, as an allocation result, a streaming media node with the largest load margin (the maximum number of devices to be processed) from the candidate streaming media nodes associated with the target access/distribution bandwidth. The selection mode may also be changed according to the condition that the requesting device binds the streaming media node, and for example, reference may be specifically made to logic in the example in fig. 4.
It should be noted that all the functional modules in the embodiments of fig. 5, fig. 6, and fig. 7 may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of program instruction products. The program instruction product includes one or more program instructions. The processes or functions according to the present application occur in whole or in part when program instruction instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The program instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
In addition, the apparatuses disclosed in the embodiments of fig. 5, fig. 6, and fig. 7 can be implemented by other module division methods. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules described is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or modules may be combined or may be dynamic to another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in an electrical or other form.
In addition, each functional module and sub-module in the embodiments of fig. 5, 6, and 7 may be dynamically in one processing unit, or each module may exist alone physically, or two or more modules may be dynamically in one unit. The dynamic component can be realized in a form of hardware or a form of a software functional module. The dynamic components described above, if implemented in the form of software functional modules and sold or used as a stand-alone product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
Fig. 8 is a schematic structural diagram of a server in the embodiment of the present application.
The server 800 includes a bus 801, a processor 802, a memory 803, and a communicator 804. The processor 802 and the memory 803 may communicate with each other via a bus 801. The memory 803 may have stored therein program instructions (e.g., system or application software). The processor 802 implements the steps of the candidate streaming media determination method and/or the load balancing method in the previous embodiments (e.g., fig. 1, fig. 2, fig. 3, fig. 4) by executing the program instructions in the memory 803.
The bus 801 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. Although only one thick line is shown in fig. 8 for ease of illustration, only one bus or type of bus is not shown.
In some embodiments, the processor 802 may be implemented as a Central Processing Unit (CPU), a micro-Processing Unit (MCU), a System On a 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 the program is executed, such as a Random Access Memory (RAM).
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).
The communicator 804 is used for communicating with the outside. In particular examples, the communicator 804 can include one or more wired and/or wireless communication circuit modules. For example, the communicator 804 can include one or more of, for example, a wired network card, a USB module, a serial interface module, and the like. The wireless communication protocol followed by the wireless communication module includes: such as one or more of 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 (Time-Division Code Division Multiple Access, TD-SCDMA), Long Term Evolution (LTE), BlueTooth (BlueTooth, BT), Global Navigation Satellite System (GNSS), and the like.
In one example, a service server receives a user live broadcast request, forwards the live broadcast request, and makes a decision to access/distribute a streaming media node corresponding to the live broadcast request and returns the decision to the service server;
step four: the service server requests equipment to push streams to the specified streaming media nodes according to the information returned by the streaming media load balancing module;
step five: after receiving the device stream pushing, the device stream is forwarded to the stream distribution server, and the distribution address is returned to the user.
It should be noted that the flow or method representations represented by the flow diagrams of the above-described embodiments of the present application may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes other implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
For example, the order of the steps in the embodiments of fig. 1 to fig. 4 may be changed in a specific scenario, and is not limited to the above representation.
A computer-readable storage medium may also be provided in embodiments of the present application, which stores program instructions that, when executed, perform the process steps performed by the aforementioned method flow embodiments (e.g., as shown in one or more of fig. 1-4).
That is, the method steps in the above-described embodiments are implemented as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the method represented herein can be stored in such software processes on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA.
In summary, the embodiments of the present application provide a method, an apparatus, a server, and a medium for determining candidate streaming media and load balancing, where resource load information and associated bandwidth usage information of a streaming media node are obtained to obtain a load margin of the streaming media node and utilization conditions of access and distribution bandwidths, respectively, an access bandwidth allocation plan and a distribution bandwidth list are calculated according to the utilization conditions of the access and distribution bandwidths, and a load margin ordered list is calculated according to the resource load information to provide each candidate access bandwidth and associated candidate access streaming media node, and each candidate distribution bandwidth and associated candidate distribution streaming media node for selection, that is, to determine a candidate range of a target streaming media node; furthermore, when a service request exists, a target access and distribution bandwidth and a corresponding target streaming media node can be selected by a load balancing method so as to meet the service request. The method and the device realize load balance of the streaming media service cluster, and solve the problem that the customer experience is influenced by blocking, packet loss and the like due to uneven bandwidth distribution in the related technology.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.
Claims (13)
1. A candidate streaming media determining method is characterized in that the method is applied to determining candidate streaming media nodes in load balancing of a streaming media node cluster; the candidate streaming media determination method comprises the following steps:
acquiring resource load information and associated bandwidth use information of each streaming media node, wherein the bandwidth use information relates to the utilization conditions of access bandwidth and distribution bandwidth;
calculating load allowance information of each streaming media node according to the resource load information, and sorting according to the size of the load allowance information to form a load allowance sorting list;
calculating corresponding access bandwidth allowance information according to the bandwidth use information of each access bandwidth, and calculating an access bandwidth allocation plan according to the access bandwidth allowance information; wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order;
calculating corresponding distribution bandwidth allowance information according to the bandwidth use information of each distribution bandwidth, and forming a distribution bandwidth list according to each distribution bandwidth allowance information, wherein the distribution bandwidth list comprises each candidate distribution bandwidth which is monotonously arranged according to the size of the distribution bandwidth allowance;
determining each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan according to the load margin ordered list;
and determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered list.
2. The method for determining candidate streaming media according to claim 1, further comprising:
excluding the unavailable streaming media nodes from the candidate access streaming media nodes and the candidate distribution streaming media nodes, and excluding unavailable bandwidths from all the access bandwidths and the distribution bandwidths according to the unavailable streaming media nodes to obtain the candidate access bandwidths and the candidate distribution bandwidths;
wherein the unavailable streaming media node refers to a streaming media node meeting an unavailable condition, and the unavailable bandwidth refers to that each associated streaming media node meets the unavailable condition.
3. The method of claim 2, wherein the unavailability condition comprises at least one of:
1) the load index of the streaming media node reaches above a preset threshold value;
2) the resource load information of the streaming media node is sent overtime and reaches the preset times;
3) the streaming media node is marked as off.
4. The method of claim 3, wherein the resource load information comprises: the hardware resource utilization rate of the streaming media node; the hardware resource usage includes: processing at least one of a resource usage rate, a storage resource usage rate, and a network resource usage rate; the load index is expressed as a load rate, which is a weighted sum of one or more of processing resource usage, storage resource usage, and network resource usage.
5. The method of claim 1, wherein the resource load information comprises: the hardware resource utilization rate of the streaming media node;
the calculating the load margin of each streaming media node according to the resource load information includes:
and calculating the residual quantity of the loadable devices of the streaming media node according to the utilization rate of the hardware resources.
6. The method for determining candidate streaming media according to claim 1, wherein the calculating an access bandwidth allocation plan according to the access bandwidth margin information comprises:
and calculating the allocable access bandwidth capacity of each candidate access bandwidth based on the condition of averagely allocating the bandwidth allowance of each access bandwidth and the limit of the bandwidth allowance difference range between each access bandwidth.
7. The method for determining candidate streaming media according to claim 1, wherein the method for determining candidate streaming media is performed periodically; and calculating each candidate access bandwidth and associated candidate access streaming media node for the next period and each candidate distribution bandwidth and associated candidate distribution streaming media node in each current period.
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, the load balancing of a streaming media node cluster is performed; the load balancing method comprises the following steps:
in response to a service request, searching candidate access bandwidth with allocable access bandwidth capacity meeting the service request in the access bandwidth allocation plan as target access bandwidth;
selecting the candidate access streaming media node with the largest load margin as a target access streaming media node from the candidate access streaming media nodes associated with the target access bandwidth;
if the distribution bandwidth allowance of the distribution bandwidth associated with the target access streaming media node can meet the service request, determining the target access streaming media node as a target distribution streaming media node;
if the distribution bandwidth allowance of the distribution bandwidth associated with the target access streaming media node cannot meet the service request, selecting a candidate distribution bandwidth with the maximum distribution bandwidth allowance in the distribution bandwidth list as a target distribution bandwidth;
and selecting the candidate distribution streaming media node with the maximum load margin as the target distribution streaming media node from the candidate distribution streaming media nodes associated with the target distribution bandwidth.
9. The method according to claim 8, wherein the searching for the candidate access bandwidth with the allocable access bandwidth capacity satisfying the service request in the access bandwidth allocation plan as the target access bandwidth comprises:
judging whether the request equipment of the service request has a bound streaming media node;
if so, searching candidate access bandwidths with allocable access bandwidth capacity capable of meeting the service request and including the bound streaming media nodes in each associated candidate access streaming media node in the access bandwidth allocation plan to serve as target access bandwidths; the bound streaming media nodes are used as target access streaming media nodes and target distribution streaming media nodes;
if not, selecting the first candidate access bandwidth with the allocable access bandwidth capacity capable of meeting the service request in the access bandwidth allocation plan as the target access bandwidth.
10. A candidate streaming media determining device is characterized in that the candidate streaming media determining device is applied to determining candidate streaming media nodes of a streaming media node cluster; the candidate streaming media determination device comprises:
the streaming media load information collection module is used for acquiring resource load information of each streaming media node;
the network bandwidth utilization information collection module is used for acquiring resource load information and associated bandwidth utilization information of each streaming media node, wherein the bandwidth utilization information relates to utilization conditions of access bandwidth and distribution bandwidth;
the streaming media load information collection module is used for calculating load margin information of each streaming media node according to the resource load information and sorting the load margin information according to the size of the load margin information to form a load margin sorting list;
the candidate bandwidth/streaming media determining module is used for calculating corresponding access bandwidth allowance information according to the bandwidth use information of each access bandwidth and calculating an access bandwidth allocation plan according to the access bandwidth allowance information; wherein the access bandwidth allocation plan comprises allocable access bandwidth capacity of each candidate access bandwidth in an allocation priority order;
the candidate bandwidth/streaming media determining module is further configured 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, where the distribution bandwidth list includes each candidate distribution bandwidth which is monotonically arranged according to the size of the distribution bandwidth margin;
the candidate bandwidth/streaming media determining module is configured to determine, according to the load margin ordered list, each ordered candidate access streaming media node associated with each candidate access bandwidth in the access bandwidth allocation plan; and the distribution network is further used for determining each ordered candidate distribution streaming media node associated with each candidate distribution bandwidth in the distribution bandwidth list according to the load margin ordered 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, the load balancing of a streaming media node cluster is performed; the load balancing device comprises:
the allocation module is used for responding to a service request, and searching candidate access bandwidth with allocable access bandwidth capacity meeting the service request in the access bandwidth allocation plan as target access bandwidth;
the allocation module is configured to select, as a target access streaming media node, 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;
the allocation module is configured to determine that the target access streaming media node is 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, as a target distribution bandwidth, a candidate distribution bandwidth in the distribution bandwidth list with the largest distribution bandwidth margin if the distribution bandwidth margin of the distribution bandwidth associated with the target access streaming media node cannot satisfy the service request;
the distribution module is configured to select, as the target distribution streaming media node, the candidate distribution streaming media node with the largest load margin from among the candidate distribution streaming media nodes associated with the target distribution bandwidth.
12. A server, comprising: a communicator, a memory, and a processor; the communicator is used for communicating with the outside; the memory is to store program instructions; the processor is used for executing the program instructions to execute the candidate streaming media determination method according to any one of claims 1 to 7; or to perform a method of load balancing according to claim 8.
13. A computer-readable storage medium storing program instructions that are executed to perform the candidate streaming media determination method according to any one of claims 1 to 7; or to perform a method of load balancing according to claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111539682.XA CN114244848A (en) | 2021-12-15 | 2021-12-15 | Candidate streaming media determining and load balancing method, device, server and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111539682.XA CN114244848A (en) | 2021-12-15 | 2021-12-15 | Candidate streaming media determining and load balancing method, device, server and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114244848A true CN114244848A (en) | 2022-03-25 |
Family
ID=80756833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111539682.XA Pending CN114244848A (en) | 2021-12-15 | 2021-12-15 | Candidate streaming media determining and load balancing method, device, server and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114244848A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115150592A (en) * | 2022-09-02 | 2022-10-04 | 浙江大华技术股份有限公司 | Audio and video transmission method, server and computer readable storage medium |
CN116095414A (en) * | 2022-10-12 | 2023-05-09 | 京东科技信息技术有限公司 | Method and device for acquiring video screenshot |
CN116192775A (en) * | 2022-11-22 | 2023-05-30 | 海尔优家智能科技(北京)有限公司 | Network node access method and device, computer readable storage medium and electronic device |
CN117061525A (en) * | 2023-10-11 | 2023-11-14 | 江西云眼视界科技股份有限公司 | Camera access method, system, computer and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101355522A (en) * | 2008-09-18 | 2009-01-28 | 中兴通讯股份有限公司 | Control method and system for media server |
CN105516347A (en) * | 2015-12-31 | 2016-04-20 | 浙江大华系统工程有限公司 | Method and device for load balance allocation of streaming media server |
CN109600624A (en) * | 2018-12-18 | 2019-04-09 | 浩云科技股份有限公司 | A kind of distributed load equalizing method and device based on Streaming Media |
CN111193788A (en) * | 2019-12-24 | 2020-05-22 | 视联动力信息技术股份有限公司 | Audio and video stream load balancing method and device |
WO2021228103A1 (en) * | 2020-05-15 | 2021-11-18 | 北京金山云网络技术有限公司 | Load balancing method and apparatus for cloud host cluster, and server |
-
2021
- 2021-12-15 CN CN202111539682.XA patent/CN114244848A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101355522A (en) * | 2008-09-18 | 2009-01-28 | 中兴通讯股份有限公司 | Control method and system for media server |
CN105516347A (en) * | 2015-12-31 | 2016-04-20 | 浙江大华系统工程有限公司 | Method and device for load balance allocation of streaming media server |
CN109600624A (en) * | 2018-12-18 | 2019-04-09 | 浩云科技股份有限公司 | A kind of distributed load equalizing method and device based on Streaming Media |
CN111193788A (en) * | 2019-12-24 | 2020-05-22 | 视联动力信息技术股份有限公司 | Audio and video stream load balancing method and device |
WO2021228103A1 (en) * | 2020-05-15 | 2021-11-18 | 北京金山云网络技术有限公司 | Load balancing method and apparatus for cloud host cluster, and server |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115150592A (en) * | 2022-09-02 | 2022-10-04 | 浙江大华技术股份有限公司 | Audio and video transmission method, server and computer readable storage medium |
CN116095414A (en) * | 2022-10-12 | 2023-05-09 | 京东科技信息技术有限公司 | Method and device for acquiring video screenshot |
WO2024077916A1 (en) * | 2022-10-12 | 2024-04-18 | 京东科技信息技术有限公司 | Video screenshot acquiring method and apparatus |
CN116192775A (en) * | 2022-11-22 | 2023-05-30 | 海尔优家智能科技(北京)有限公司 | Network node access method and device, computer readable storage medium and electronic device |
CN117061525A (en) * | 2023-10-11 | 2023-11-14 | 江西云眼视界科技股份有限公司 | Camera access method, system, computer and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114244848A (en) | Candidate streaming media determining and load balancing method, device, server and medium | |
CN112512100B (en) | Slice priority-based AMF (advanced metering framework) redirection method and newly-added management network element | |
CN110445866B (en) | Task migration and cooperative load balancing method in mobile edge computing environment | |
CN112131006A (en) | Service request distribution method, device, computer equipment and storage medium | |
CN112306651B (en) | Resource allocation method and resource borrowing method | |
CN112543508A (en) | Wireless resource allocation method and network architecture for 5G network slice | |
JP2003536287A (en) | Service Grade and Fairness Method of Bandwidth Reservation System | |
EP3306987A1 (en) | Method and system for instantiating a logical network slice for use with an operator-maintained network portion | |
CN105378667A (en) | Method and apparatus for scheduling virtual machine resources | |
CN104244264B (en) | Device, method and user equipment in wireless communication system | |
AU2012250285B2 (en) | Communication management system, communication management method, and program | |
US20160269297A1 (en) | Scaling the LTE Control Plane for Future Mobile Access | |
CN113709876A (en) | Satellite service resource allocation method and electronic equipment | |
JP2017515370A (en) | Network sharing method, apparatus, system, and computer storage medium | |
CN111611076B (en) | Fair distribution method for mobile edge computing shared resources under task deployment constraint | |
CN104955154A (en) | LTE (long term evolution) uplink proportion fair resource scheduling method based on user business volume satisfaction degree | |
CN105389212B (en) | A kind of activity allocation method and device | |
CN108337634B (en) | HAPS call access control method, device, high altitude platform equipment and storage medium | |
Moety et al. | Joint optimization of user association and user satisfaction in heterogeneous cellular networks | |
CN114338654A (en) | File transmission method, storage service distribution method, device, equipment and medium | |
CN109510875B (en) | Resource allocation method and device and electronic equipment | |
CN111193607B (en) | Method, device and storage medium for transmission resource management | |
CN102387594B (en) | Resource distributing method and equipment | |
CN115278898B (en) | Resource allocation method and device, electronic equipment and storage medium | |
CN115278897B (en) | Resource allocation method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |