Load distribution method, load release method and device

By using the weighted values ​​of key and dynamic parameters of the server in the load balancing method to select a suitable forwarding server, the problem of poor forwarding quality in the existing technology is solved, and more efficient media data forwarding is achieved.

CN117278565BActive Publication Date: 2026-11-27JUHAOKAN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211440752.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2026-11-27
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Existing service load balancing methods are one-sided, resulting in poor forwarding quality of the assigned forwarding servers.

Method used

Available servers are selected from multiple servers by using N key parameters and M dynamic parameters based on the server, and the target server is determined for media data forwarding based on the weighted values ​​of these parameters.

Benefits of technology

This improved the quality of media data forwarding on the server, ensuring a more reasonable load distribution on the forwarding server and enhancing forwarding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278565B_ABST
    Figure CN117278565B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a load distribution method, a load release method and apparatuses. The method comprises: receiving a load distribution request from a target client; determining a plurality of available servers from a plurality of servers based on N key parameters and M dynamic parameters of each server, each key parameter being used to represent a usage rate of an inherent configuration of the server, each dynamic parameter being used to represent a usage amount of a type of service of the server, each available server having each key parameter less than or equal to a threshold value of the corresponding key parameter, and each dynamic parameter less than or equal to a threshold value of the corresponding dynamic parameter; determining a target server from the plurality of available servers based on a weighted value of the N key parameters of each available server, and / or a weighted value of the M dynamic parameters of each available server; and sending a load distribution response to the target client, the load distribution response being used to instruct the target client to forward media data through the target server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of media forwarding services. More specifically, it relates to a load distribution method, a load release method, and an apparatus. Background Technology

[0002] With the continuous development of media forwarding services and distributed services, data can be distributed from "publisher clients" to "subscriber clients" via servers. Whether a "publisher client" publishes media data or a "subscriber client" subscribes to media data, a forwarding server for media data publishing and subscription needs to be allocated from at least one candidate server according to the service load balancing method.

[0003] Currently, common service load balancing methods involve using a single server load parameter or a weighted average of multiple server load parameters as the server's load, then assigning servers with lower load parameters as forwarding servers. However, these methods have limitations, and the forwarding quality of the assigned forwarding servers may be poor. Summary of the Invention

[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this application provide a load distribution method, a load release method, and an apparatus that can improve the forwarding quality of media data on a server.

[0005] In a first aspect, embodiments of this application provide a load distribution method, including:

[0006] Receive a load balancing request from the target client, which requests the allocation of a server for media data forwarding to the target client;

[0007] Based on N key parameters and M dynamic parameters of each server, multiple available servers are determined from multiple servers. Each key parameter is used to characterize the utilization rate of a server’s inherent configuration, and each dynamic parameter is used to characterize the usage of a type of service of the server. Each key parameter of each available server is less than or equal to the threshold of the corresponding key parameter, and each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. N and M are both positive integers.

[0008] Based on the weighted values ​​of the N key parameters of each available server, and / or the weighted values ​​of the M dynamic parameters of each available server, the target server is determined from the plurality of available servers;

[0009] A load balancing response is sent to the target client, instructing the target client to forward media data through the target server.

[0010] Secondly, embodiments of this application provide a load release method, including:

[0011] The system detects each of the N key parameters of the target server. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, where N is a positive integer.

[0012] Based on the changes in these key parameters within the detected target duration, it is determined that the target server is overloaded.

[0013] Send a request message to the media distribution server. The request message is used to ask the load distribution server if there is an available server. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer.

[0014] Receive a target message from the media distribution server, which indicates that an available server exists. This target message is generated by the load distribution server based on the request message.

[0015] Based on this target message, determine the target number of loads that need to be released;

[0016] Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0017] Thirdly, embodiments of this application provide a load release method, including:

[0018] The target message is received from the media distribution server. This target message is generated when the load distribution server detects that the target server is overloaded and that there is an available server. The target server overload is determined based on the change data of various key parameters corresponding to the target server within the target duration. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each key parameter is used to characterize the utilization rate of a server's inherent configuration, and each dynamic parameter is used to characterize the usage of a type of service on the server. N and M are both positive integers.

[0019] Based on this target message, determine the target amount of load that needs to be released;

[0020] Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0021] Fourthly, embodiments of this application provide a load distribution device, including:

[0022] The receiving module is used to receive a load allocation request from the target client, which requests the allocation of a server for media data forwarding to the target client;

[0023] The determination module is used to determine multiple available servers from multiple servers based on N key parameters and M dynamic parameters of each server. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, and each dynamic parameter is used to characterize the usage of a type of business of the server. Each key parameter of each available server is less than or equal to the threshold of the corresponding key parameter, and each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. N and M are both positive integers.

[0024] The determining module is also used to determine the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server;

[0025] The sending module is used to send a load balancing response to the target client, which instructs the target client to forward media data through the target server.

[0026] Fifthly, embodiments of this application provide a load release device, comprising:

[0027] The detection module is used to detect each of the N key parameters of the target server. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, where N is a positive integer.

[0028] The determination module is used to determine the overload of the target server based on the changes in the key parameters within the detected target duration.

[0029] The sending module is used to send a request message to the media distribution server. The request message is used to inquire whether the load distribution server has an available server. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer.

[0030] A receiving module is configured to receive a target message from the media distribution server, the target message indicating the existence of an available server, the target message being generated by the load distribution server based on the request message;

[0031] The determining module is also used to determine the target number of loads that need to be released based on the target message;

[0032] The release module is used to release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0033] Sixthly, embodiments of this application provide a load release device, comprising:

[0034] The receiving module is used to receive a target message from the media distribution server. This target message is generated when the load distribution server detects that the target server is overloaded and that there is an available server. The target server overload is determined based on the change data of various key parameters corresponding to the target server within the target duration. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each dynamic parameter is used to characterize a type of service usage of the server, where M is a positive integer.

[0035] The determination module is used to determine the target number of loads that need to be released based on the target message;

[0036] The release module is used to release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0037] In a seventh aspect, embodiments of this application provide a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the load distribution method as shown in the first aspect or the load release method as shown in the second or third aspect.

[0038] Eighthly, embodiments of this application provide a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the load distribution method as shown in the first aspect or the load release method as shown in the second or third aspect.

[0039] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, after receiving a load allocation request from the target client, based on N key parameters and M dynamic parameters of each server, multiple available servers are determined from multiple servers where each key parameter (each key parameter is used to characterize the utilization rate of an inherent configuration of the server) is less than or equal to the threshold of the corresponding key parameter, and each dynamic parameter (each dynamic parameter is used to characterize the usage of a type of service of the server) is less than or equal to the threshold of the corresponding dynamic parameter. Then, based on the weighted value of the N key parameters of each available server and / or the weighted value of the M dynamic parameters of each available server, the target server for media data forwarding is determined from the multiple available servers. In this scheme, available servers are first selected from multiple servers based on N key parameters and M dynamic parameters of each server. Then, the target server is determined from the multiple available servers based on the weighted values ​​of the N key parameters and / or the weighted values ​​of the M dynamic parameters of each available server. Through these two selections, forwarding servers with better forwarding quality can be selected, thereby improving the forwarding quality of the server's media data.

[0040] In this embodiment, if the target server is overloaded and available servers exist, the target number of loads that need to be released from the target server can be determined by analyzing the changes in key parameters of the target server within a target time period. Then, this target number of loads is released, allowing the load allocation server to reallocate the released target number of loads to servers used for media data forwarding. In this way, even when the target server used for media data forwarding is overloaded (overloaded forwarding quality is poor) and available servers exist, releasing part of the target server's load and reallocating the released load to servers used for media data forwarding ensures the quality of media data forwarding. Attached Figure Description

[0041] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0042] Figure 1 A schematic diagram of a scenario architecture is shown, illustrating the load distribution and load release methods according to some embodiments;

[0043] Figure 2 One of the flowcharts of a load distribution method according to some embodiments is shown;

[0044] Figure 3 A second flowchart illustrating a load distribution method according to some embodiments is shown;

[0045] Figure 4 The third schematic diagram of the load distribution method according to some embodiments is shown;

[0046] Figure 5 A fourth schematic flowchart of a load distribution method according to some embodiments is shown;

[0047] Figure 6 Fifth of a series of schematic flowcharts illustrating a load distribution method according to some embodiments;

[0048] Figure 7 A flowchart of a load distribution method according to some embodiments is shown in diagram six.

[0049] Figure 8 One of the flowcharts of a load release method according to some embodiments is shown;

[0050] Figure 9 A second schematic flowchart of a load release method according to some embodiments is shown;

[0051] Figure 10 A third schematic flowchart of a load release method according to some embodiments is shown;

[0052] Figure 11 A fourth schematic flowchart of a load release method according to some embodiments is shown;

[0053] Figure 12 A framework diagram of a load distribution device according to some embodiments is shown;

[0054] Figure 13 A frame diagram of a load release device according to some embodiments is shown;

[0055] Figure 14 A frame diagram of a load release device according to some embodiments is shown;

[0056] Figure 15 A schematic diagram of computer device hardware according to some embodiments is shown. Detailed Implementation

[0057] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0058] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0059] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0060] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0061] Figure 1 This is a schematic diagram illustrating the scenario architecture of the load allocation method and load release method provided in the embodiments of this application. Figure 1 As shown in the embodiment of this application, the scenario architecture includes: at least one load distribution server 110, multiple forwarding servers 120, and multiple electronic devices 130. The multiple electronic devices 130 include "publisher clients" and "subscriber clients." The forwarding servers 120 are used to establish communication connections with the "publisher clients" and "subscriber clients" respectively, and to forward media data exchanged between the "publisher clients" and "subscriber clients." The load distribution server 110 is used to allocate forwarding servers 120 for media data forwarding to the "publisher clients" and "subscriber clients."

[0062] The load balancing method provided in this application can be specifically applied to media data forwarding scenarios, especially to media data forwarding scenarios in the real-time audio and video field, to improve the service quality of media forwarding and reduce the latency of media data forwarding.

[0063] Figure 2 The flowchart illustrates the steps of a load distribution method according to an embodiment of the present invention. The execution entity of the load distribution method can be a load distribution server, or a functional module or entity within the load distribution server capable of implementing the load distribution method. The load distribution method may include the following steps S201 to S204.

[0064] S201, Receive load balancing request from target client.

[0065] The load balancing request is used to request a server to be assigned to the target client for media data forwarding.

[0066] The target client can be either a "publisher client" or a "subscriber client". When the target client needs to forward media data, it sends a load balancing request to the load balancing server.

[0067] S202. Based on N key parameters and M dynamic parameters of each server, determine multiple available servers from multiple servers.

[0068] Each key parameter is used to characterize the utilization rate of a server’s inherent configuration, and each dynamic parameter is used to characterize the usage of a type of service on the server. All key parameters of each available server are less than or equal to the threshold of the corresponding key parameter, and all dynamic parameters are less than or equal to the threshold of the corresponding dynamic parameter. N and M are both positive integers.

[0069] The N key parameters may include at least one of the following: CPU utilization, memory utilization, disk utilization, and network utilization. The N key parameters may also include other parameters characterizing the utilization of a specific server configuration; these can be determined based on actual circumstances and are not limited here.

[0070] Among them, CPU utilization is the difference between 1 and CPU utilization, memory utilization is the difference between 1 and memory utilization, hard disk utilization is the difference between 1 and hard disk utilization, and network utilization is the difference between 1 and network utilization.

[0071] The M dynamic parameters may include at least one of the following: number of connections, number of users, and number of sessions. The M dynamic parameters may also include other dynamic parameters that characterize the usage of a particular type of service on the server; these can be determined based on actual circumstances and are not limited here.

[0072] In this context, a session is a logical communication interaction between two parties, from the start to the end of the communication. A connection is the physical communication link between the client and the server. A session can be between two users or between two or more users.

[0073] The threshold values ​​for each key parameter can be determined based on the actual situation and are not limited here. The threshold values ​​for each dynamic parameter can also be determined based on the actual situation and are not limited here.

[0074] For example, each key parameter is a value greater than or equal to 0 and less than or equal to 1. Therefore, the threshold of each key parameter can be 1 or a value greater than 0 and less than 1. The specific value can be determined according to the actual situation and is not limited here.

[0075] It is understood that for each available server, all key parameters are less than or equal to their corresponding thresholds, and all dynamic parameters are also less than or equal to their corresponding thresholds. In other words, for each key parameter and each dynamic parameter, if all key parameters of a server do not exceed their corresponding thresholds, and all dynamic parameters of that server do not exceed their corresponding thresholds, then that server is not overloaded and can provide good forwarding quality. Conversely, if at least one key parameter of a server exceeds its corresponding threshold, or at least one dynamic parameter of that server exceeds its corresponding threshold, then that server is overloaded and is not an available server.

[0076] S203. Based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server, determine the target server from the plurality of available servers.

[0077] In some embodiments of this application, a target server can be determined from a plurality of available servers based on the weighted values ​​of the N key parameters of each available server; alternatively, a target server can be determined from a plurality of available servers based on the weighted values ​​of the N key parameters of each available server; alternatively, a target server can be determined from a plurality of available servers based on the weighted values ​​of the N key parameters of each available server and the weighted values ​​of the M dynamic parameters of each available server; or a target server can be determined by combining other parameters, which can be determined according to the actual situation and is not limited here.

[0078] For example, the available server with the smallest weighted value of the N key parameters can be identified as the target server; one of the available servers whose weighted value of the N key parameters is less than or equal to the weighted threshold of the key parameters can be identified as the target server; the available server with the smallest weighted value of the M dynamic parameters can be identified as the target server; one of the available servers whose weighted value of the M dynamic key parameters is less than or equal to the weighted threshold of the dynamic parameters can be identified as the target server; or one of the available servers whose weighted value of the N key parameters is less than or equal to the weighted threshold of the key parameters can be identified as the target server. The specific choice can be determined based on the actual situation and is not limited here.

[0079] The key parameter weighting threshold can be the weighted value of the N key parameters for the available server at the p-th position (p is a positive integer) after sorting all available servers in ascending order of their weighted values ​​of N key parameters. The key parameter weighting threshold can also be preset, and can be determined based on actual conditions; no specific limitation is made here. When p is 1, the key parameter weighting threshold is the minimum value of the weighted values ​​of the N key parameters among the available servers.

[0080] The dynamic parameter weighting threshold can be the weighted value of the M dynamic parameters corresponding to the available server at the q-th position (q is a positive integer) after sorting all available servers in ascending order of their weighted values ​​of M dynamic parameters. The dynamic parameter weighting threshold can also be preset, and can be determined according to actual conditions; no limitation is made here. When q is 1, the key parameter weighting threshold is the minimum value of the weighted values ​​of the M dynamic parameters among multiple available servers.

[0081] In some embodiments of this application, when only one available server is included among multiple servers, that one available server is the target server.

[0082] For example, the real-time value of each parameter (critical parameter or dynamic parameter) is defined as V. i Among them, the key parameters are i = 1 to i = N, that is, N key parameters are V1 to V. N The dynamic parameters are i = (N+1) to i = (N+M), that is, M dynamic parameters V N+1 To V N+M Define the weight of each parameter as K. i Define the upper limit value of each parameter as V. imax From i = 1 to i = (N + M), V i All less than or equal to V imax The server is an available server. The weighted average of the N key parameters is... This reflects service availability; the smaller the value, the higher the availability. The weighted average of the M dynamic parameters is... This reflects the amount of data used; a higher value indicates greater usage. The weight K for each parameter is... i It is configurable; the larger the weight of K, the better. i Its parameter value V i The greater the impact on the weighted value, the better. The weights can be configured or modified based on expectations, production experience, etc., and are not limited here.

[0083] S204. Send a load balancing response to the target client.

[0084] The load balancing response is used to instruct the target client to forward media data through the target server.

[0085] After receiving the load balancing response, the target client establishes a media data communication connection with the target server based on the load balancing response, and then forwards the media data through the target server.

[0086] In this embodiment, after receiving a load allocation request from the target client, multiple available servers are determined from a pool of servers based on N key parameters and M dynamic parameters of each server. These servers are selected where each key parameter (characterizing the utilization rate of a server's inherent configuration) is less than or equal to a threshold value for its corresponding key parameter, and each dynamic parameter (characterizing the usage of a type of service on the server) is less than or equal to a threshold value for its corresponding dynamic parameter. Then, based on the weighted values ​​of the N key parameters and / or the weighted values ​​of the M dynamic parameters for each available server, a target server for media data forwarding is determined from these available servers. In this scheme, available servers are first selected from multiple servers based on the N key parameters and M dynamic parameters of each server. Then, based on the weighted values ​​of the N key parameters and / or the weighted values ​​of the M dynamic parameters for each available server, a target server is determined from these available servers. This two-stage selection process allows for the selection of forwarding servers with better forwarding quality, thereby improving the forwarding quality of the server's media data.

[0087] In some embodiments of this application, combined with Figure 2 ,like Figure 3 As shown, the above S203 can be specifically implemented through the following S203a and S203b.

[0088] S203a. Determine at least one candidate server from the plurality of available servers whose weighted value of the N key parameters is less than or equal to the weighted threshold.

[0089] The weighted threshold is the weighted threshold of the key parameters mentioned above, and the specific value can be determined according to the actual situation. No limit is set here.

[0090] It can be understood that servers among the multiple available servers whose weighted values ​​of the N key parameters are less than or equal to the weighted threshold are identified as at least one candidate server.

[0091] S203b: Determine the target server with the smallest weighted value of the M dynamic parameters from the at least one candidate server.

[0092] It can be understood that the server with the smallest weighted value among the at least one candidate server that satisfies the M dynamic parameters is determined as the target server.

[0093] In some embodiments of this application, if there is only one candidate server among the multiple available servers, then the candidate server is also the server with the smallest weighted value of the M dynamic parameters among the candidate servers, and the candidate server is the target server.

[0094] In some embodiments of this application, if the plurality of available servers include a plurality of candidate servers, and there are multiple candidate servers that satisfy the minimum weighted value of the M dynamic parameters (hereinafter, the server that satisfies the minimum weighted value of the M dynamic parameters is referred to as the candidate server, and there are multiple candidate servers among the plurality of candidate servers), then any one of the multiple candidate servers can be determined as the target server. Alternatively, the server with the minimum target key parameter among the multiple candidate servers can be determined as the target server. Or, the server with the minimum target dynamic parameter among the multiple candidate servers can be determined as the target server. Other methods can also be used to determine the target server from the multiple candidate servers. The specific method can be determined according to the actual situation and is not limited here.

[0095] Among them, the target key parameters can be any one of N key parameters, and the target dynamic parameters can be any one of M parameters. The specifics can be determined according to the actual situation, and no restrictions are imposed here.

[0096] In this embodiment, the target server is determined by combining the weighted values ​​of N key parameters and the weighted values ​​of M dynamic parameters, which can help identify a target server with better forwarding quality from multiple perspectives.

[0097] In some embodiments of this application, the target client is a subscriber client; combined with Figure 2 ,like Figure 4 As shown, prior to step 203 above, the load distribution method provided in this application may further include the following step S205.

[0098] S205. Determine whether the multiple available servers include servers that have been allocated within a preset time period.

[0099] If it is determined that the plurality of available servers include servers that have been allocated within a preset time period, then step 203 is performed. Specifically, if the plurality of available servers do not include servers that have been allocated within the preset time period, then the target server is determined from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server.

[0100] In some embodiments of this application, combined with Figure 4 ,like Figure 5As shown, after step 205 above, if the available servers include servers that have been allocated within the preset time period, the load allocation method provided in this application may further include the following S206.

[0101] S206. Determine the target server from the servers allocated within the preset time period.

[0102] The preset duration can be determined according to the actual situation, and is not limited here.

[0103] The servers allocated within the preset time period can be servers allocated within the preset time period based on any forwarding service, or servers allocated within the preset time period based on the forwarding service of the media data that the subscriber client currently needs to subscribe to. The specific allocation can be determined according to the actual situation and is not limited here.

[0104] In this embodiment, the servers allocated within a preset time period are typically those with lower load and better forwarding quality among the available servers. Therefore, when the multiple available servers include servers allocated within the preset time period, the target server is preferentially determined from these servers. This reduces load waste, improves forwarding quality, and enhances server allocation efficiency. When the multiple available servers do not include servers allocated within the preset time period, the target server is determined from the multiple available servers based on the weighted values ​​of the N key parameters and / or the weighted values ​​of the M dynamic parameters of each available server. This allows for the rapid identification of target servers with lower load and better forwarding quality from multiple available servers.

[0105] In some embodiments of this application, combined with Figure 5 ,like Figure 6 As shown, the above S206 can be specifically implemented by the following S206a to S206c.

[0106] S206a. Determine whether the source server is included among the servers allocated within the preset time period.

[0107] If the source server is among the servers allocated within the preset time period, execute S206b below; if the source server is not among the servers allocated within the preset time period, execute S206c below.

[0108] S206b, Identify the source server as the target server.

[0109] The source server is the server assigned to the publisher client corresponding to the subscriber client for forwarding media data.

[0110] S206c, The server that meets the target conditions among the servers allocated within the preset time period is determined as the target server.

[0111] The target condition is determined based on at least one of the following:

[0112] The server whose time is closest to the current time will be assigned;

[0113] Servers assigned to other clients that subscribe to the same media data as this subscriber client;

[0114] The server with the smallest weighted value of these N key parameters;

[0115] The server with the smallest weighted value among the M dynamic parameters.

[0116] It is understandable that the server whose allocation time is closest to the current time is usually the server with the lowest load and the best forwarding quality among the available servers; the server allocated to other clients subscribing to the same media data as this subscriber client, that is, the server previously allocated based on the same media data forwarding service. Compared to the server allocated based on other forwarding services, this can reduce the internal cascading caused by the need to forward media data between multiple servers (when adding a new server, internal cascading between servers is required to forward media data from the previously allocated server to the new server, and then the new server can forward the media data to the client), thereby reducing the latency caused by media data forwarding; the server with the smallest weighted value of the N key parameters is the server with the lowest load and the best forwarding quality corresponding to the key parameters among the servers; the server with the smallest weighted value of the M dynamic parameters is the server with the lowest load and the best forwarding quality corresponding to the dynamic parameters among the servers.

[0117] It is understandable that the target condition can be any one of the following: the server whose allocation time is closest to the current time, the server allocated to other clients that subscribe to the same media data as this subscriber client, the server with the smallest weighted value of the N key parameters, and the server with the smallest weighted value of the M dynamic parameters.

[0118] It is understood that the target condition can also be determined by at least two of the following: the server with the allocation time closest to the current time, the server assigned to other clients subscribing to the same media data as the subscriber client, the server with the smallest weighted value of the N key parameters, and the server with the smallest weighted value of the M dynamic parameters. For example, the target condition could be the server with the allocation time closest to the current time among the servers assigned to other clients subscribing to the same media data as the subscriber client, the server with the smallest weighted value of the N key parameters among the servers assigned to other clients subscribing to the same media data as the subscriber client, the server with the smallest weighted value of the M dynamic parameters among the servers assigned to other clients subscribing to the same media data as the subscriber client, the server assigned to other clients subscribing to the same media data as the subscriber client among the servers with the closest allocation time, the server assigned to other clients subscribing to the same media data as the subscriber client among the servers with the smallest weighted value of the N key parameters, and the server assigned to other clients subscribing to the same media data as the subscriber client among the servers with the smallest weighted value of the M dynamic parameters. Other conditions are also possible and are not limited here.

[0119] It is understandable that the target condition can also be determined by at least three of the following: the server assigned to the client with the closest allocation time to the current time; the server assigned to other clients subscribing to the same media data as the subscriber client; the server with the smallest weighted value of the N key parameters; and the server with the smallest weighted value of the M dynamic parameters. For example, the target condition could be the server with the smallest weighted value of the N key parameters among the servers assigned to other clients subscribing to the same media data as the subscriber client, or the server with the smallest weighted value of the M dynamic parameters among the servers assigned to other clients subscribing to the same media data as the subscriber client, or other servers, which are not limited here.

[0120] It is understandable that the target condition can also be determined by four of the following: the server assigned to the client with the closest allocation time to the current time; the server assigned to other clients subscribing to the same media data as this subscriber client; the server with the smallest weighted value of the N key parameters; and the server with the smallest weighted value of the M dynamic parameters. For example, the target condition could be the server assigned to the client with the closest allocation time to the current time among the servers assigned to other clients subscribing to the same media data as this subscriber client; the server with the smallest weighted value of the N key parameters among the servers with the smallest weighted value of the M dynamic parameters; or other conditions, which are not limited here.

[0121] The target conditions may also include other conditions, which can be determined according to the actual situation and are not limited here.

[0122] In this embodiment, if the servers allocated within the preset time period include a source server, the source server is designated as the target server. This reduces internal cascading caused by media data needing to be forwarded across multiple servers, thereby lowering latency. It also avoids wasted load and improves forwarding quality. If the servers allocated within the preset time period do not include a source server, the server that meets the target criteria among those allocated within the preset time period is designated as the target server. This allows for quick selection of servers with lower load and better forwarding quality, improving load allocation efficiency.

[0123] When audio or video media is switched on and off, or when media data is switched between different bitrates and resolutions, the amount of streaming media data generated will change significantly. This may cause the key parameters of the available servers used for media data forwarding to change from less than or equal to the corresponding key parameter threshold to greater than or equal to the corresponding key parameter threshold, thus causing server overload. It may also cause the key parameters of the unavailable servers used for media data forwarding to change from greater than or equal to the corresponding key parameter threshold to less than or equal to the corresponding key parameter threshold, thus making the server unusable and resulting in a waste of server resources.

[0124] In some embodiments of this application, combined with Figure 5 ,like Figure 7 As shown, after S204 above, the load distribution method provided in this application may further include S207 below.

[0125] S207. Send a target message to the target server, which instructs the target server to release the load so that the load distribution server can reallocate the released load to a server for media data forwarding.

[0126] In some embodiments of this application, the target message is generated when the load distribution server detects that the target server is overloaded and there is an available server. The target server overload is determined based on the change data of the various key parameters corresponding to the target server within the target time period.

[0127] It is understandable that when the load distribution server determines that the target server is overloaded based on the changes in the key parameters corresponding to the target server within the target duration, and there are currently available servers, it sends a target message to the target server to instruct the target server to release the load. After the target server releases the load according to the target message, the load distribution server can reallocate the load released by the target server to an available server for media data forwarding.

[0128] In some embodiments of this application, the target message is generated by the load distribution server based on a request message received from the target server. The request message is used to inquire whether the load distribution server has an available server. The request message is generated by the target server when it detects that the target server is overloaded. The target server overload is determined based on the change data of the various key parameters corresponding to the target server within the target time period.

[0129] It is understandable that when the target server determines that it is overloaded based on the changes in the key parameters corresponding to the target server within the target duration, it sends a request message to the load distribution server to inquire whether there is an available server. After the load distribution server determines that there is an available server based on the request message, it sends a target message to the target server to indicate that there is an available server. After the target server releases the load based on the target message, the load distribution server can reallocate the load released by the target server to an available server for media data forwarding.

[0130] In this embodiment of the application, a target message is sent from a load distribution server to a target server so that the target server in an overloaded state releases part of the load, thereby relieving the target server from an overloaded state and improving the forwarding quality of the target server. At the same time, the load distribution server reallocates a server for media data forwarding to the released load to ensure the media data transmission needs of the released load.

[0131] In this embodiment of the disclosure, when the real-time load of the server increases, if the parameter causing the increase in real-time load is a critical parameter and the critical parameter is greater than or equal to the threshold of the corresponding critical parameter, a redistribution is triggered. The server load is reduced through redistribution, ensuring forwarding quality and avoiding service overload that could cause anomalies.

[0132] Figure 8 The flowchart illustrates the steps of a load release method according to an embodiment of the present invention. The executing entity of this load release method can be a target server for media data forwarding, or a functional module or entity within the target server capable of implementing the load release method. The load release method may include the following steps S301 to S306.

[0133] S301. Detect each of the N key parameters of the target server.

[0134] Each key parameter is used to characterize the utilization rate of a server’s inherent configuration, where N is a positive integer.

[0135] The target server monitors the values ​​of various key parameters in real time.

[0136] S302. Determine that the target server is overloaded based on the changes in the key parameters within the detected target duration.

[0137] It is understood that if at least one of the key parameters is greater than or equal to its corresponding threshold, the target server is determined to be overloaded. Specifically, this could be determined if the number of times at least one of the key parameters is detected to be greater than or equal to its corresponding threshold within the target duration is greater than or equal to a specified threshold; it could also be determined if the average value of at least one of the key parameters is greater than or equal to its corresponding threshold within the target duration; it could also be determined if the duration for which at least one of the key parameters is greater than or equal to its corresponding threshold within the target duration is greater than or equal to a duration threshold (where the duration threshold is less than or equal to the target duration); or it could be determined based on other circumstances, which are not limited here.

[0138] S303, Send a request message to the media distribution server.

[0139] The request message is used to inquire whether the load distribution server has an available server. The available server is defined as one where each of the N key parameters is less than or equal to the threshold of the corresponding key parameter, and the available server is defined as one where each of the M dynamic parameters is less than or equal to the threshold of the corresponding dynamic parameter. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer.

[0140] The description of available servers can be found in the load balancing method section above, and will not be repeated here.

[0141] S304. Receive the target message from the media distribution server.

[0142] The target message is used to indicate the existence of an available server, and it is generated by the load distribution server based on the request message.

[0143] S305. Based on the target message, determine the target number of loads that need to be released.

[0144] The number of targets can be preset or determined based on the changes in key parameters within the target duration. The specific number can be determined according to the time situation and is not limited here.

[0145] The load to be released consists of subscriber clients, and the target number is the number of subscriber clients that need to be released.

[0146] For example, assuming a mapping relationship is established between the average target utilization (V) of the server over a certain period of time and the average real-time network traffic (Bandwidth), such as Q = Bandwidth / V, the target amount of load that needs to be released is estimated using the formula: Target amount = (V i -V 期望 )×Q÷Bandwidth 实时 For example, V represents CPU utilization, V = 0.125%, Bandwidth = 1.5 Mbps, Q = 1.5 / 0.125. The current CPU utilization is 75%, and the goal is to reduce it to 60%. The current Bandwidth is 1.7 Mbps. Therefore, according to the estimation formula (target number = (75-60)*1.5 / 0.125 / 1.7 = 105), the target number is calculated to be 105.

[0147] It should be noted that if one of the key parameters exceeds the threshold of the corresponding key parameter, the target quantity can be calculated according to the above formula. If multiple key parameters exceed the threshold of the corresponding key parameter, the load release quantity corresponding to the key parameter that exceeds the threshold of the corresponding key parameter is calculated according to the above formula. Then, the target quantity is calculated based on the weighted sum of the load release quantities, or the maximum value among the load release quantities is determined as the target quantity. The specific method can be determined according to the actual situation, and no limitation is made here.

[0148] S306. Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0149] Specifically, releasing the server load involves disconnecting the media data forwarding connection from the corresponding client.

[0150] In this embodiment of the application, the server may use a random strategy to release a target number of loads.

[0151] For example, such as Figure 9 As shown, in combination with the above S201 to S207, and the above S301 to S306, it can be specifically implemented by the following S401 to S416.

[0152] S401. The target client sends a load balancing request to the load balancing server.

[0153] S402, The load balancing server receives a load balancing request from the target client.

[0154] S403, the load balancing server determines multiple available servers from multiple servers based on N key parameters and M dynamic parameters of each server.

[0155] S404. The load balancing server determines the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server.

[0156] S405. The load balancing server sends a load balancing response to the target client, instructing the target server to distribute the load.

[0157] S406. The target client receives the load distribution response from the load distribution server.

[0158] S407. The target client establishes a media data forwarding connection with the target server based on the load balancing response.

[0159] In this process, the target client and the target server connect via a media data forwarding connection to achieve the forwarding of media data.

[0160] S408. The target server detects various key parameters of the target server.

[0161] S409. The target server determines that it is overloaded based on the changes in the key parameters detected within the target duration.

[0162] S410. The target server sends a request message to the media distribution server to inquire whether the load distribution server has any available servers.

[0163] S411, The load balancing server receives a request message from the target server.

[0164] S412. The load balancing server determines whether there is an available server based on the request message.

[0165] S413. The load balancing server sends a target message to the target server to indicate that there is an available server.

[0166] S414. The target server receives the target message from the media distribution server.

[0167] S415. Based on the target message, the target server determines the target number of loads that need to be released.

[0168] S416, The target server releases the target amount of load.

[0169] It is understandable that the released client can be identified as the target client, and then the above S401 can be returned.

[0170] In this embodiment, if the target server is overloaded and available servers exist, the target number of loads that need to be released from the target server can be determined by analyzing the changes in key parameters of the target server within a target time period. Then, this target number of loads is released, allowing the load allocation server to reallocate the released target number of loads to servers used for media data forwarding. In this way, even when the target server used for media data forwarding is overloaded (overloaded forwarding quality is poor) and available servers exist, releasing part of the target server's load and reallocating the released load to servers used for media data forwarding ensures the quality of media data forwarding.

[0171] Figure 10 The flowchart illustrates the steps of a load release method according to an embodiment of the present invention. The executing entity of this load release method can be a target server for media data forwarding, or a functional module or entity within the target server capable of implementing the load release method. The load release method may include the following steps S501 to S503.

[0172] S501, Receive the target message from the media distribution server.

[0173] The target message is generated when the load distribution server detects that the target server is overloaded and that there is an available server. The target server overload is determined based on the changes in various key parameters corresponding to the target server within the target time period. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of its corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of its corresponding dynamic parameter. Each key parameter represents the utilization rate of a server's inherent configuration, and each dynamic parameter represents the usage of a type of service on the server. N and M are both positive integers.

[0174] S502. Based on the target message, determine the target number of loads that need to be released.

[0175] S503. Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0176] For a detailed description of S502 and S503, please refer to the relevant descriptions of S305 and S306 above, which will not be repeated here.

[0177] For example, such as Figure 11 As shown, in combination with the above S201 to S207, and the above S501 to S503, it can be specifically implemented by the following S601 to S616.

[0178] S601. The target client sends a load distribution request to the load distribution server.

[0179] S602, The load balancing server receives a load balancing request from the target client.

[0180] S603, the load balancing server determines multiple available servers from multiple servers based on N key parameters and M dynamic parameters of each server.

[0181] S604. The load distribution server determines the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server.

[0182] S605. The load balancing server sends a load balancing response to the target client, instructing the target server to distribute the load.

[0183] S606, The target client receives the load distribution response from the load distribution server.

[0184] S607. The target client establishes a media data forwarding connection with the target server based on the load balancing response.

[0185] The target client and the target server connect via a media data forwarding connection to achieve media data forwarding.

[0186] S608. The target server detects various key parameters of the target server.

[0187] S609. The target server reports the detected key parameters to the load distribution server in real time.

[0188] S610, the load distribution server receives various key parameters reported in real time by the target server.

[0189] S611, The load distribution server determines the overload of the target server based on the changes in the key parameters within the target duration.

[0190] S612, The load balancing server has determined that there are available servers.

[0191] S613. The load distribution server sends a target message to the target server, instructing the target server to release the load.

[0192] S614. The target server receives the target message from the media distribution server.

[0193] S615. Based on the target message, the target server determines the target number of loads that need to be released.

[0194] S616, The target server releases the target amount of load.

[0195] It is understandable that the released client can be identified as the target client, and then the above S601 can be returned.

[0196] In this embodiment, if the target server is overloaded and available servers exist, the target number of loads that need to be released from the target server can be determined by analyzing the changes in key parameters of the target server within a target time period. Then, this target number of loads is released, allowing the load allocation server to reallocate the released target number of loads to servers used for media data forwarding. In this way, even when the target server used for media data forwarding is overloaded (overloaded forwarding quality is poor) and available servers exist, releasing part of the target server's load and reallocating the released load to servers used for media data forwarding ensures the quality of media data forwarding.

[0197] It should be noted that in the embodiments of this application, when the target server is overloaded but there is no available server, the target server still determines the amount of load that needs to be released and then releases that target amount of load, or the target server does not take measures to release the load and remains in an overloaded state. The specific method can be determined according to the actual situation and is not limited here.

[0198] Figure 12 This is a structural block diagram of the load distribution device shown in the embodiments of this disclosure, such as... Figure 12 As shown, the device includes: a receiving module 701, a determining module 702, and a transmitting module 703, wherein:

[0199] The receiving module 701 is used to receive a load allocation request from the target client, the load allocation request being used to request the target client to allocate a server for media data forwarding;

[0200] The determination module 702 is used to determine multiple available servers from multiple servers based on N key parameters and M dynamic parameters of each server. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, and each dynamic parameter is used to characterize the usage of a type of service of the server. Each key parameter of each available server is less than or equal to the threshold of the corresponding key parameter, and each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. N and M are both positive integers.

[0201] The determining module 702 is further configured to determine a target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server;

[0202] The sending module 703 is used to send a load allocation response to the target client, which instructs the target client to forward media data through the target server.

[0203] In some embodiments of this application, the determining module 702 is specifically used for:

[0204] From the multiple available servers, determine at least one candidate server whose weighted value of the N key parameters is less than or equal to the weighted threshold;

[0205] From the at least one candidate server, determine the target server with the smallest weighted value of the M dynamic parameters.

[0206] In some embodiments of this application, the target client is a subscriber client; the determining module 702 is further configured to:

[0207] Before determining the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server, it is determined whether the plurality of available servers include servers that have been allocated within a preset time period.

[0208] The determining module 702 is specifically used for:

[0209] If the servers allocated within the preset time period are not included in the plurality of available servers, the target server is determined from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server.

[0210] The determining module 702 is also used for:

[0211] If the multiple available servers include servers that have been allocated within the preset time period, the target server is determined from the servers that have been allocated within the preset time period.

[0212] In some embodiments of this application, the determining module 702 is specifically used for:

[0213] If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is the server allocated for media data forwarding to the publisher client corresponding to the subscriber client.

[0214] If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period shall be identified as the target server.

[0215] The target condition is determined based on at least one of the following:

[0216] The server whose time is closest to the current time will be assigned;

[0217] Servers assigned to other clients that subscribe to the same media data as this subscriber client;

[0218] The server with the smallest weighted value of these N key parameters;

[0219] The server with the smallest weighted value among the M dynamic parameters.

[0220] In some embodiments of this application, the sending module 703 is further configured to:

[0221] After determining the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server, a target message is sent to the target server, which instructs the target server to release the load so that the load distribution server can reallocate the released load to a server for media data forwarding.

[0222] The target message is generated when the load distribution server detects that the target server is overloaded and that there is an available server.

[0223] Alternatively, the target message is generated by the load distribution server based on a request message received from the target server, which inquires whether there is an available server. This request message is generated by the target server when it detects that the target server is overloaded.

[0224] The target server overload is determined based on the changes in the key parameters corresponding to the target server within the target duration.

[0225] In this embodiment, each module of the load distribution device can implement the load distribution method provided in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0226] Figure 13 This is a structural block diagram of the load release device shown in the embodiments of this disclosure, as follows: Figure 13 As shown, the device includes: a detection module 801, a determination module 802, a transmission module 803, a receiving module 804, and a release module 805, wherein:

[0227] The detection module 801 is used to detect each of the N key parameters of the target server. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, where N is a positive integer.

[0228] The determination module 802 is used to determine the overload of the target server based on the changes in the key parameters within the detected target duration.

[0229] The sending module 803 is used to send a request message to the media distribution server. The request message is used to inquire whether the load distribution server has an available server. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer.

[0230] The receiving module 804 is configured to receive a target message from the media distribution server, the target message being used to indicate the existence of an available server, and the target message being generated by the load distribution server based on the request message;

[0231] The determining module 802 is also used to determine the target number of loads that need to be released based on the target message;

[0232] Release module 805 is used to release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0233] In this embodiment, each module of the load release device can implement the load release method provided in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0234] Figure 14 This is a structural block diagram of the load release device shown in the embodiments of this disclosure, as follows: Figure 14 As shown, the device includes: a receiving module 901, a determining module 902, and a releasing module 903, wherein:

[0235] The receiving module 901 is used to receive a target message from the media distribution server. The target message is generated when the load distribution server detects that the target server is overloaded and there is an available server. The target server overload is determined based on the change data of various key parameters corresponding to the target server within the target duration. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. Each key parameter is used to characterize the utilization rate of an inherent configuration of the server, and each dynamic parameter is used to characterize the usage of a type of service of the server. N and M are both positive integers.

[0236] The determination module 902 is used to determine the target number of loads that need to be released based on the target message;

[0237] Release module 903 is used to release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding.

[0238] In this embodiment, each module of the load release device can implement the load release method provided in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0239] like Figure 15 As shown in the illustration, this application also provides a computer device 1000, which can be the load distribution server or target server described above. The computer device 1000 includes a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When executed by the processor 1001, the computer program performs the various processes of the load distribution method or load release method described above, achieving the same technical effects. To avoid repetition, further details are omitted here.

[0240] The present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described load distribution method or load release method and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0241] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0242] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the above-described load distribution method or load release method.

[0243] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0244] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

Claims

1. A load distribution method, characterized in that, Applications include load balancing servers, including: Receive a load balancing request from the target client. The load balancing request is used to request the allocation of a server for media data forwarding to the target client. The media data is real-time audio and video data, and the target client is a subscriber client. Based on N key parameters and M dynamic parameters of each server, multiple available servers are determined from a pool of servers. The N key parameters include at least one of CPU utilization, memory utilization, disk utilization, and network utilization. The M dynamic parameters include at least one of connection count, user count, and session count. Each key parameter is used to characterize the utilization rate of a server's inherent configuration, and each dynamic parameter is used to characterize the usage of a type of service on the server. For each available server, each key parameter is less than or equal to the threshold of its corresponding key parameter, and each dynamic parameter is less than or equal to the threshold of its corresponding dynamic parameter. N and M are both positive integers. Determine whether the plurality of available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the plurality of available servers includes servers that have been allocated within the preset time period, the target server is determined from the servers that have been allocated within the preset time period; If the servers allocated within the preset time period are not included in the plurality of available servers, the target server is determined from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. Send a load balancing response to the target client, the load balancing response being used to instruct the target client to forward media data through the target server; Determining the target server from the servers allocated within the preset time period includes: If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

2. The method according to claim 1, characterized in that, The determination of the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server includes: Determine at least one candidate server from the plurality of available servers whose weighted values ​​of the N key parameters are less than or equal to the weighted threshold; The target server with the smallest weighted value of the M dynamic parameters is determined from the at least one candidate server.

3. The method according to claim 1 or 2, characterized in that, After determining the target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server, the method further includes: Send a target message to the target server, the target message being used to instruct the target server to release the load so that the load distribution server can reallocate the released load to a server for media data forwarding; The target message is generated when the load distribution server detects that the target server is overloaded and that there is an available server. Alternatively, the target message is generated by the load distribution server based on a request message received from the target server, the request message being used to inquire whether there is an available server, and the request message being generated by the target server when it detects that the target server is overloaded; The target server overload is determined based on the changes in the key parameters corresponding to the target server within the target duration.

4. A load release method, characterized in that, The target servers used for media data forwarding include: The system detects each of the N key parameters of the target server, where the N key parameters include at least one of CPU utilization, memory utilization, hard disk utilization, and network utilization. Each key parameter is used to characterize the utilization of an inherent configuration of the server, and N is a positive integer. The target server is determined to be overloaded based on the changes in the key parameters within the detected target duration. A request message is sent to the media distribution server. The request message is used to inquire whether the load distribution server has an available server. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. The M dynamic parameters include at least one of the following: number of connections, number of users, and number of sessions. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer. The target message is received from the media distribution server, the target message being used to indicate the existence of an available server, and the target message being generated by the load distribution server based on the request message; Based on the target message, determine the target number of loads that need to be released; Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding, wherein the media data is real-time audio and video data, and the client corresponding to the load is a subscriber client; The load distribution server reallocates the released target number of loads to servers used for media data forwarding, including: Determine whether the available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the available servers include servers that have been allocated within the preset time period, the server used for media data forwarding shall be determined from the servers that have been allocated within the preset time period; If the available servers do not include the servers allocated within the preset time period, the server for media data forwarding is determined from the available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. Determining the target server from the servers allocated within the preset time period includes: If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

5. A load release method, characterized in that, The target servers used for media data forwarding include: The target message is received from the media distribution server. This target message is generated when the load distribution server detects that the target server is overloaded and that an available server exists. The target server overload is determined based on changes in various key parameters corresponding to the target server within a target duration. An available server is defined as one where each of the N key parameters is less than or equal to its corresponding threshold, and another server is defined as one where each of the M dynamic parameters is less than or equal to its corresponding threshold. The N key parameters include at least one of CPU utilization, memory utilization, disk utilization, and network utilization. The M dynamic parameters include at least one of connection count, user count, and session count. Each key parameter represents the utilization rate of a server's inherent configuration, and each dynamic parameter represents the usage of a type of service on the server. N and M are both positive integers. Based on the target message, determine the target number of loads that need to be released; Release the target amount of load so that the load distribution server can reallocate the released target amount of load to a server for media data forwarding, wherein the media data is real-time audio and video data, and the client corresponding to the load is a subscriber client; The load distribution server reallocates the released target number of loads to servers used for media data forwarding, including: Determine whether the available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the available servers include servers that have been allocated within the preset time period, the server used for media data forwarding shall be determined from the servers that have been allocated within the preset time period; If the available servers do not include the servers allocated within the preset time period, the server for media data forwarding is determined from the available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. Determining the target server from the servers allocated within the preset time period includes: If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

6. A load distribution device, characterized in that, include: The receiving module is used to receive a load allocation request from the target client. The load allocation request is used to request the target client to allocate a server for media data forwarding. The media data is real-time audio and video data, and the target client is a subscriber client. The determination module is used to determine multiple available servers from multiple servers based on N key parameters and M dynamic parameters of each server. The N key parameters include at least one of CPU utilization, memory utilization, disk utilization, and network utilization. The M dynamic parameters include at least one of connection count, user count, and session count. Each key parameter is used to characterize the utilization of an inherent configuration of the server, and each dynamic parameter is used to characterize the usage of a type of service of the server. For each available server, each key parameter is less than or equal to the threshold of the corresponding key parameter, and each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. N and M are both positive integers. Determine whether the plurality of available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the plurality of available servers includes servers that have been allocated within the preset time period, the target server is determined from the servers that have been allocated within the preset time period; The determining module is further configured to, when the plurality of available servers do not include servers allocated within the preset time period, determine a target server from the plurality of available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. A sending module is used to send a load allocation response to the target client, the load allocation response being used to instruct the target client to forward media data through the target server; The determining module is specifically used to determine the source server as the target server when the servers allocated within the preset time period include the source server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

7. A load release device, characterized in that, include: The detection module is used to detect each of the N key parameters of the target server. The N key parameters include at least one of CPU utilization, memory utilization, hard disk utilization, and network utilization. Each key parameter is used to characterize the utilization of an inherent configuration of the server, and N is a positive integer. The determination module is used to determine the target server overload based on the changes in the key parameters within the detected target duration. The sending module is used to send a request message to the media distribution server. The request message is used to inquire whether the load distribution server has an available server. The available server is defined as N key parameters, where each key parameter is less than or equal to the threshold of the corresponding key parameter. The available server is also defined as M dynamic parameters, where each dynamic parameter is less than or equal to the threshold of the corresponding dynamic parameter. The M dynamic parameters include at least one of the following: number of connections, number of users, and number of sessions. Each dynamic parameter is used to characterize a type of service usage of the server, and M is a positive integer. A receiving module is configured to receive a target message from the media distribution server, the target message indicating the existence of an available server, and the target message being generated by the load distribution server based on the request message; The determining module is further configured to determine the target number of loads that need to be released based on the target message; A release module is used to release the target number of loads so that the load distribution server can reallocate the released target number of loads to a server for media data forwarding. The media data is real-time audio and video data, and the client corresponding to the load is a subscriber client. The load distribution server reallocates the released target number of loads to servers used for media data forwarding, including: Determine whether the available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the available servers include servers that have been allocated within the preset time period, the server used for media data forwarding shall be determined from the servers that have been allocated within the preset time period; If the available servers do not include the servers allocated within the preset time period, the server for media data forwarding is determined from the available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. Determining the target server from the servers allocated within the preset time period includes: If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

8. A load release device, characterized in that, include: A receiving module is used to receive a target message from a media distribution server. The target message is generated when the load distribution server detects that the target server is overloaded and that an available server exists. The target server overload is determined based on the changes in various key parameters corresponding to the target server within a target duration. An available server is defined as a server where each of the N key parameters is less than or equal to its corresponding threshold, and an available server is defined as a server where each of the M dynamic parameters is less than or equal to its corresponding threshold. The N key parameters include at least one of CPU utilization, memory utilization, disk utilization, and network utilization. The M dynamic parameters include at least one of connection count, user count, and session count. Each key parameter represents the utilization rate of a server's inherent configuration, and each dynamic parameter represents the usage of a type of service on the server. N and M are both positive integers. The determination module is used to determine the target number of loads that need to be released based on the target message; A release module is used to release the target number of loads so that the load distribution server can reallocate the released target number of loads to a server for media data forwarding. The media data is real-time audio and video data, and the client corresponding to the load is a subscriber client. The load distribution server reallocates the released target number of loads to servers used for media data forwarding, including: Determine whether the available servers include servers that have been allocated within a preset time period. The servers that have been allocated within the preset time period are servers that have been allocated based on any forwarding service within the preset time period, or servers that have been allocated based on the forwarding service of the media data that the subscriber client currently needs to subscribe to within the preset time period. If the available servers include servers that have been allocated within the preset time period, the server used for media data forwarding shall be determined from the servers that have been allocated within the preset time period; If the available servers do not include the servers allocated within the preset time period, the server for media data forwarding is determined from the available servers based on the weighted values ​​of the N key parameters of each available server and / or the weighted values ​​of the M dynamic parameters of each available server. Determining the target server from the servers allocated within the preset time period includes: If the servers allocated within the preset time period include a source server, the source server is determined as the target server. The source server is a server allocated to the publisher client corresponding to the subscriber client for media data forwarding. If the source server is not included among the servers allocated within the preset time period, the server that meets the target condition among the servers allocated within the preset time period is determined as the target server. The target condition is determined based on at least one of the following: The server whose time is closest to the current time will be assigned; Servers assigned to other clients that subscribe to the same media data as the subscriber client; The server with the smallest weighted value of the N key parameters; The server with the smallest weighted value among the M dynamic parameters.

Citation Information

Patent Citations

  • Method and system for realizing server load balance

    CN108111567A

  • Load balancing method, device and system

    CN110233860A

  • Load balancing method and system based on user access volume, and readable storage medium

    CN113630329A

  • System, program, method, and server for performing communication

    US20200348992A1

  • Node distribution method and management server for performing same

    WO2019066101A1