Load balancing recommendation method, system and electronic device

CN114546659BActive Publication Date: 2026-08-21LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210192949.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2026-08-21
Estimated Expiration
2042-02-28

AI Technical Summary

Benefits of technology

[0039]从上述技术方案可以看出,本申请公开的负载均衡推荐方法、系统及电子设备,分别获得不少于两个预测模型,不少于两个预测模型分别用于表征不少于两个负载均衡算法中每个负载均衡算法下终端配置数据与运行数据的对应关系,获得第一终端配置数据,基于不少于两个预测模型输出与第一终端配置数据对应的不少于两组预测运行数据,基于预先确定的权重值及不少于两组预测运行数据确定不少于两个预测模型中每个负载均衡算法的推荐值,基于不少于两个负载均衡算法中每个负载均衡算法的推荐值确定与第一终端配置数据匹配的第一负载均衡算法。本方案通过对不同的负载均衡算法训练预测模型,以便于在需要选择负载均衡算法时,能够基于多个预测模型的预测结果推荐更匹配的负载均衡算法,以提高终端配置的利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546659B_ABST
    Figure CN114546659B_ABST
Patent Text Reader

Abstract

The application discloses a load balancing recommendation method and system and an electronic device. At least two prediction models are obtained, and each of the at least two prediction models is used to represent the corresponding relationship between terminal configuration data and running data under each load balancing algorithm in at least two load balancing algorithms. First terminal configuration data is obtained. At least two groups of predicted running data corresponding to the first terminal configuration data are output based on the at least two prediction models. The recommendation value of each load balancing algorithm in the at least two prediction models is determined based on a predetermined weight value and the at least two groups of predicted running data. The first load balancing algorithm matched with the first terminal configuration data is determined based on the recommendation value of each load balancing algorithm in the at least two load balancing algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of load balancing, and more particularly to a load balancing recommendation method, system, and electronic device. Background Technology

[0002] Currently, there are many load balancing algorithms, such as: round-robin algorithm, random algorithm, source address hash algorithm, least connection algorithm, weighted round-robin / random / least connection algorithm, etc.

[0003] For different use cases, the choice of which load balancing algorithm to use needs to be manually set by the user or administrator. This means that the actual load balancing effect depends on the user's or administrator's theoretical knowledge or experience. Summary of the Invention

[0004] In view of this, this application provides a load balancing recommendation method, system, and electronic device, the specific solutions of which are as follows:

[0005] A load balancing recommendation method includes:

[0006] At least two prediction models are obtained respectively, and the at least two prediction models are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms;

[0007] Obtain first terminal configuration data, and output at least two sets of predicted running data corresponding to the first terminal configuration data based on the at least two prediction models;

[0008] Based on the predetermined weight values ​​and the not less than two sets of predicted operating data, determine the recommended value for each of the not less than two load balancing algorithms;

[0009] Based on the recommended value of each of the not less than two load balancing algorithms, a first load balancing algorithm that matches the configuration data of the first terminal is determined.

[0010] Furthermore, the operational data consists of the coefficients of variation of performance parameters during system operation, and the determination of weight values ​​includes:

[0011] Obtain the system's performance parameters during system operation;

[0012] Determine the first weight value corresponding to each performance parameter.

[0013] Furthermore, determining the first weight value corresponding to each performance parameter includes:

[0014] The second weight value of each performance parameter is determined based on the coefficient of variation of each performance parameter in the not less than two load balancing algorithms.

[0015] The third weight value of each performance parameter is determined based on the linear relationship between different performance parameters;

[0016] The first weight value corresponding to each performance parameter is determined based on the second weight value and the third weight value.

[0017] Furthermore, it also includes:

[0018] Obtain terminal configuration change data;

[0019] The second terminal configuration data is determined based on the terminal configuration change data and the first terminal configuration data.

[0020] Based on the second terminal configuration data and the not less than two prediction models, a second prediction model that matches the second terminal configuration data is determined.

[0021] Furthermore, the acquisition of at least two prediction models includes:

[0022] The not less than two prediction models are obtained by training the models on the running data in the historical data.

[0023] Furthermore, it also includes:

[0024] Obtain sampling data during terminal operation, wherein the sampling data includes at least: third running data under third terminal configuration data;

[0025] Based on the sampled data and the running data in the historical data, the model is trained using no less than two load balancing algorithms, and the no less than two prediction models are updated.

[0026] A load-balanced recommendation system, comprising:

[0027] The obtaining unit is used to obtain at least two prediction models, wherein the at least two prediction models are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms;

[0028] The output unit is used to obtain the first terminal configuration data and output at least two sets of prediction running data corresponding to the first terminal configuration data based on the at least two prediction models.

[0029] The first determining unit is used to determine the recommended value of each of the not less than two load balancing algorithms based on the pre-determined weight values ​​and the not less than two sets of predicted running data.

[0030] The second determining unit is used to determine a first load balancing algorithm that matches the first terminal configuration data based on the recommended value of each of the not less than two load balancing algorithms.

[0031] Furthermore, the operational data refers to the coefficient of variation of the performance parameters during system operation.

[0032] The system further includes: a third determining unit, used to determine weight values;

[0033] The third determining unit is used to obtain the system's performance parameters during system operation and determine the first weight value corresponding to each performance parameter.

[0034] An electronic device, comprising:

[0035] The processor is configured to obtain at least two prediction models, each of which represents the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms; obtain first terminal configuration data; output at least two sets of predicted running data corresponding to the first terminal configuration data based on the at least two prediction models; determine the recommended value of each of the at least two load balancing algorithms based on predetermined weight values ​​and the at least two sets of predicted running data; and determine a first load balancing algorithm matching the first terminal configuration data based on the recommended value of each of the at least two load balancing algorithms.

[0036] The memory is used to store the program used by the processor to execute the above-described processing procedure.

[0037] A readable storage medium for storing at least one set of instructions;

[0038] The instruction set is used to be invoked and to execute at least the load balancing recommended method as described in any one of claims 1-6.

[0039] As can be seen from the above technical solutions, the load balancing recommendation method, system, and electronic device disclosed in this application obtain at least two prediction models. These two models are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms, obtaining first terminal configuration data. Based on the at least two prediction models, at least two sets of predicted running data corresponding to the first terminal configuration data are output. Based on predetermined weight values ​​and the at least two sets of predicted running data, a recommendation value for each load balancing algorithm in the at least two prediction models is determined. Based on the recommendation values ​​of each load balancing algorithm in the at least two load balancing algorithms, a first load balancing algorithm matching the first terminal configuration data is determined. This solution trains prediction models for different load balancing algorithms so that when a load balancing algorithm needs to be selected, a more suitable load balancing algorithm can be recommended based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart of a load balancing recommendation method disclosed in an embodiment of this application;

[0042] Figure 2 This is a flowchart of a load balancing recommendation method disclosed in an embodiment of this application;

[0043] Figure 3 This is a flowchart of a load balancing recommendation method disclosed in an embodiment of this application;

[0044] Figure 4 This is a schematic diagram of the structure of a load balancing recommendation system disclosed in an embodiment of this application;

[0045] Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0047] This application discloses a load balancing recommendation method, the flowchart of which is as follows: Figure 1 As shown, it includes:

[0048] Step S11: Obtain at least two prediction models, which are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms.

[0049] Step S12: Obtain the first terminal configuration data, and output at least two sets of prediction running data corresponding to the first terminal configuration data based on at least two prediction models;

[0050] Step S13: Based on the predetermined weight values ​​and no less than two sets of predicted running data, determine the recommended value for each of the no less than two load balancing algorithms;

[0051] Step S14: Determine the first load balancing algorithm that matches the configuration data of the first terminal based on the recommended value of each of the not less than two load balancing algorithms.

[0052] In large-scale application scenarios, a single virtual machine or server usually cannot support large-scale concurrent requests and bandwidth throughput. This requires load balancing algorithms to strengthen, distribute, and balance application requests in order to achieve horizontal scaling of terminal performance.

[0053] There are many load balancing algorithms, such as: Round Robin, which distributes user requests to internal servers in turn; Random Calculation, which randomly selects a server from a list for access; Source Address Hash, which calculates a value using a hash function based on the address of the request source, and then modulo the size of the server list to obtain the server number to be accessed; Least Connections, which load balances the load based on the current connection status of the servers, selecting the server with the fewest current connections to handle the request; and Weighted Round Robin / Random / Least Connections algorithms, etc.

[0054] In different usage scenarios, if the choice of which load balancing algorithm to use to execute requests is made solely based on the administrator's theoretical knowledge and experience, low terminal utilization may occur due to insufficient experience or theoretical knowledge.

[0055] In this embodiment, historical data is used for training to obtain training models for different load balancing algorithms. When it is necessary to select a load balancing algorithm to process a request instruction, the selection can be made directly based on the prediction results of the training model. This improves terminal utilization when executing processing requests based on the prediction results of the training model, and reduces the problem of low terminal utilization caused by the administrator's theoretical knowledge or experience.

[0056] Specifically, multiple load balancing algorithms are pre-determined. Based on terminal configuration data and running data in historical data, a model is trained for each load balancing algorithm to obtain multiple prediction models. Each prediction model is for a specific load balancing algorithm. When terminal configuration data is input for a certain prediction model, the prediction model outputs the predicted running data under the load balancing algorithm for that prediction model, thereby determining the performance-related parameters when using the load balancing algorithm in the current scenario.

[0057] The terminal configuration data can be: the size of the virtual machine or server, and the specific configuration of each virtual machine or server, such as: CPU size, memory size, etc.; while the running data can be: performance-related parameters such as CPU utilization, memory utilization, response time, etc.

[0058] After determining multiple prediction models, in actual use, the first terminal configuration data is obtained, that is, a specific application scenario is determined. The first terminal configuration data is used as the input of multiple prediction models, and is input into each prediction model respectively, so as to obtain the output of each prediction model, that is, the prediction running data. The prediction running data is the performance-related prediction data of each load balancing algorithm under the current scenario of the first terminal configuration data.

[0059] The first terminal configuration data can be at least one parameter, such as CPU size or memory size, or multiple parameters, that is, multiple parameters from the same set are input into each prediction model at the same time; correspondingly, the output of each prediction model can also be one parameter, such as CPU utilization or memory utilization, or multiple parameters, that is, multiple parameters from the same set of prediction data are obtained.

[0060] After obtaining a set of predicted operating data for each load balancing algorithm, since each set of predicted operating data may include multiple predicted parameters, a corresponding weight is set for each predicted parameter in each set of predicted operating data. Based on the weight of each predicted parameter and the predicted data corresponding to that predicted parameter, the recommended value for that load balancing algorithm is obtained.

[0061] The recommended value for each load balancing algorithm is obtained based on each predicted value in the predicted running data under that load balancing algorithm. Therefore, the recommended value is more accurate and more consistent with each predicted value under that load balancing algorithm.

[0062] After obtaining the recommended values ​​for each of the various load balancing algorithms, the recommended values ​​of all load balancing algorithms are compared to obtain the load balancing algorithm whose recommended value best suits the current scenario and matches the configuration data of the first terminal. This first load balancing algorithm is then used to process the request instructions of the virtual machine / or server in the current scenario if the configuration data is for the first terminal. There is no need to use other load balancing algorithms, nor is it necessary for administrators to determine the algorithm based on theoretical knowledge and experience, thereby improving the utilization rate of terminal configuration.

[0063] The load balancing recommendation method disclosed in this embodiment obtains at least two prediction models. These two models characterize the correspondence between terminal configuration data and runtime data for each of the at least two load balancing algorithms, obtaining first terminal configuration data. Based on the at least two prediction models, at least two sets of predicted runtime data corresponding to the first terminal configuration data are output. Based on predetermined weight values ​​and the at least two sets of predicted runtime data, a recommendation value for each of the at least two load balancing algorithms is determined. Based on the recommendation values ​​of each of the at least two load balancing algorithms, a first load balancing algorithm matching the first terminal configuration data is determined. This scheme trains prediction models for different load balancing algorithms so that, when a load balancing algorithm needs to be selected, a more suitable load balancing algorithm can be recommended based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration.

[0064] This embodiment discloses a load balancing recommendation method, the flowchart of which is as follows: Figure 2 As shown, it includes:

[0065] Step S21: Obtain at least two prediction models. The at least two prediction models are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms. The running data is the coefficient of variation of the performance parameters during system operation.

[0066] Step S22: Obtain the first terminal configuration data, and output at least two sets of prediction running data corresponding to the first terminal configuration data based on at least two prediction models;

[0067] Step S23: Obtain the system performance parameters during system operation and determine the first weight value corresponding to each performance parameter;

[0068] Step S24: Based on the first weight value and no less than two sets of predicted running data, determine the recommended value for each of the no less than two load balancing algorithms;

[0069] Step S25: Determine the first load balancing algorithm that matches the configuration data of the first terminal based on the recommended value of each of the not less than two load balancing algorithms.

[0070] Operational data refers to the coefficient of variation of performance parameters during system operation. These performance parameters include hardware usage during the operation of virtual machines or servers, such as CPU utilization, memory utilization, and response time.

[0071] Using the coefficient of variation (CVA) of performance parameters as operational data reduces training dimensionality. Specifically, performance parameters such as server CPU utilization and memory utilization depend not only on the server's inherent performance but also on factors like application request concurrency and bandwidth volume. Typically, resource utilization is high during peak application usage and low during off-peak periods. The effectiveness of a load balancing algorithm primarily considers load balance, aiming for all terminals to achieve the most similar utilization levels possible. Performance resource scarcity is typically assessed through monitoring alerts, followed by resource expansion. Therefore, to reduce unnecessary data dimensionality, the CVA of performance parameters for each load-balanced terminal is used as operational data. Both during model training and in the data output from the prediction model, the CVA is used.

[0072] If the current application scenario involves configuring data for the first terminal, after predicting the running data of the first terminal configuration data under different load balancing algorithms based on multiple different prediction models, it is necessary to determine the recommended value for each load balancing algorithm based on the pre-determined weight values ​​and the predicted running data.

[0073] The weights are pre-determined based on the system's performance parameters during operation, establishing a first weight value for each performance parameter. Since the types of performance parameters during system operation are fixed, the types of performance parameters used for model training are also fixed. The output of each trained predictive model is of the same type as the fixed performance parameters. Therefore, the predicted data output by each predictive model is also the corresponding data for these specific performance parameters.

[0074] When determining the weight values ​​for different prediction models, the weight value for the same performance parameter is the same even for different prediction models. However, the weight values ​​for different performance parameters are different within the same prediction model. Therefore, a weight value is set for each performance parameter within the same prediction model, while the weight values ​​for performance parameters are universal across different prediction models.

[0075] For example, consider the first prediction model and the second prediction model. The output of the first prediction model is the first value of the first parameter and the second value of the second parameter. The output of the second prediction model is the third value of the first parameter and the fourth value of the second parameter. The first and third values ​​are the values ​​of the first parameter output by different prediction models. Therefore, the first and third values ​​have the same weight, the second and fourth values ​​have the same weight, but the weights of the first and second values ​​are different, and the weights of the third and fourth values ​​are also different.

[0076] Specifically, determining the first weight value corresponding to each performance parameter can be done by: determining the second weight value of each performance parameter based on the coefficient of variation of each performance parameter in at least two load balancing algorithms; determining the third weight value of each performance parameter based on the linear relationship between different performance parameters; and determining the first weight value corresponding to each performance parameter based on the second weight value and the third weight value.

[0077] Specifically, a second weight value for each performance parameter is determined based on the coefficient of variation of each performance parameter in at least two load balancing algorithms; that is, the second weight value of each parameter is determined based on the entropy weight method. A third weight value for each performance parameter is determined based on the linear relationship between different performance parameters; that is, the third weight value between parameters is obtained based on the Pearson coefficient. Since the features of the prediction model parameters have a certain degree of collinearity, such as the linear relationship between the CPU configuration and memory size of the terminal, the Pearson coefficient between features needs to be used as a reference for the first weight value.

[0078] After obtaining the second and third weight values, the first weight value is determined based on the proportional relationship of the products of the second and third weight values ​​for each performance parameter. Specifically, first, the product of the second and third weight values ​​for each performance parameter is determined, then the proportional relationship between the products of each performance parameter is determined, and the first weight value is obtained after adjusting the numerical value of the proportional relationship.

[0079] For example: the product of the second weight value and the third weight value of the first performance parameter is the first product, the product of the second weight value and the third weight value of the second performance parameter is the second product, and the product of the second weight value and the third weight value of the third performance parameter is the third product. Then, the proportional relationship (first product: second product: third product) is determined. When the sum of the weights of each performance parameter in this proportional relationship is 1, the values ​​in this proportional relationship are determined as the first weight value of each performance parameter.

[0080] Specifically, after obtaining the predicted running data, decision classification is performed. The decision classification process aims to minimize the coefficient of variation in each dimension, i.e., to achieve the most balanced load results. Therefore, the TOPSIS method (superior-inferior solution distance method) is used to make decisions on the coefficient of variation in multiple dimensions. A matrix is ​​constructed for the m predicted coefficient of variation features of n load balancing algorithms. Feature weights are added when determining the optimal / inferior load balancing algorithm, and finally, the weight values ​​of each load balancing algorithm are obtained.

[0081] The load balancing recommendation method disclosed in this embodiment obtains at least two prediction models. These two models characterize the correspondence between terminal configuration data and runtime data for each of the at least two load balancing algorithms, obtaining first terminal configuration data. Based on the at least two prediction models, at least two sets of predicted runtime data corresponding to the first terminal configuration data are output. Based on predetermined weight values ​​and the at least two sets of predicted runtime data, a recommendation value for each of the at least two load balancing algorithms is determined. Based on the recommendation values ​​of each of the at least two load balancing algorithms, a first load balancing algorithm matching the first terminal configuration data is determined. This scheme trains prediction models for different load balancing algorithms so that, when a load balancing algorithm needs to be selected, a more suitable load balancing algorithm can be recommended based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration.

[0082] This embodiment discloses a load balancing recommendation method, the flowchart of which is as follows: Figure 3 As shown, it includes:

[0083] Step 31: Obtain no less than two prediction models, which are used to characterize the correspondence between terminal configuration data and running data under each of the no less than two load balancing algorithms.

[0084] Step S32: Obtain the first terminal configuration data, and output at least two sets of prediction running data corresponding to the first terminal configuration data based on at least two prediction models;

[0085] Step S33: Based on the predetermined weight values ​​and no less than two sets of predicted running data, determine the recommended value for each of the no less than two load balancing algorithms;

[0086] Step S34: Determine the first load balancing algorithm that matches the configuration data of the first terminal based on the recommended value of each of the not less than two load balancing algorithms;

[0087] Step S35: Obtain terminal configuration change data;

[0088] Step S36: Determine the second terminal configuration data based on the terminal configuration change data and the first terminal configuration data;

[0089] Step S37: Determine a second prediction model that matches the second terminal configuration data based on the second terminal configuration data and no less than two prediction models.

[0090] In practical application scenarios, if the current configuration is the configuration data of the first terminal, then a first load balancing algorithm that matches the configuration data of the first terminal is determined based on the configuration data of the first terminal and no less than two prediction models.

[0091] In actual use, terminal configuration data may change, such as an increase in the number of CPUs or an increase in memory size. When terminal configuration data changes, it is necessary to determine the changed configuration data, i.e., the second terminal configuration data. If the terminal configuration change occurs based on the first terminal configuration data, then the second terminal configuration data is obtained by superimposing the changed terminal configuration data onto the first terminal configuration data.

[0092] After obtaining the second terminal configuration data, the second terminal configuration data is input into each prediction model to determine the running data when the second terminal configuration data uses each load balancing algorithm, that is, to predict no less than two sets of predicted running data corresponding to the second terminal configuration data.

[0093] After determining no fewer than two sets of predicted runs, a recommended value for each of the no fewer than two load balancing algorithms is determined based on the pre-determined weight values ​​and the data from the no fewer than two sets of predicted runs. Then, a second load balancing algorithm that matches the second terminal configuration data is determined based on the recommended values.

[0094] When the terminal configuration data changes, the changed terminal configuration data is determined, and predictions are re-performed based on each prediction model based on the changed terminal configuration data. This allows for the determination of a load balancing algorithm that matches the current terminal configuration data, avoiding the use of the load balancing algorithm before the terminal configuration data changes to process request commands, thus improving the utilization rate of terminal configuration.

[0095] Furthermore, at least two prediction models are obtained, which can be: at least two prediction models are obtained by training the models on the running data in the historical data.

[0096] This embodiment uses supervised learning metalinear regression to build a regression prediction model, using historical data as training samples. The number of training samples is at least greater than the prediction multiple of the custom reference features. Custom reference features are configuration data, such as CPU size, memory size, and response time. If the custom reference features are CPU size, memory size, and response time, then the number of training samples must be at least 30.

[0097] The coefficient of variation of performance parameters is used as supervisory data to supervise the trained model, so as to determine whether to continue training the model.

[0098] Furthermore, the load balancing recommendation method disclosed in this embodiment also includes:

[0099] Obtain sampling data during terminal operation. The sampling data includes at least: third running data under third terminal configuration data, and model training based on the sampling data and running data in historical data through at least two load balancing algorithms, and updating at least two prediction models.

[0100] After training the prediction model for each load balancing algorithm, predictions can be made based on the trained model in actual use. In practice, since the terminal uses one of these load balancing algorithms, performance parameters during operation are obtained.

[0101] Determine the coefficient of variation of performance parameters during operation and use this coefficient as the sampled data. Identify the load balancing algorithm used during operation and the corresponding prediction model. Use the terminal configuration data during operation as training data to continue training the prediction model, and use the sampled data as supervision data to monitor the training. If the prediction model changes after training, the changed prediction model is identified as the prediction model corresponding to the load balancing algorithm, i.e., the prediction model corresponding to the load balancing algorithm is updated.

[0102] This involves updating the training samples and supplementing the training based on the updated samples, so as to update the prediction model in a timely manner and improve the prediction accuracy of the prediction model.

[0103] The load balancing recommendation method disclosed in this embodiment obtains at least two prediction models. These two models characterize the correspondence between terminal configuration data and runtime data for each of the at least two load balancing algorithms, obtaining first terminal configuration data. Based on the at least two prediction models, at least two sets of predicted runtime data corresponding to the first terminal configuration data are output. Based on predetermined weight values ​​and the at least two sets of predicted runtime data, a recommendation value for each of the at least two load balancing algorithms is determined. Based on the recommendation values ​​of each of the at least two load balancing algorithms, a first load balancing algorithm matching the first terminal configuration data is determined. This scheme trains prediction models for different load balancing algorithms so that, when a load balancing algorithm needs to be selected, a more suitable load balancing algorithm can be recommended based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration.

[0104] This embodiment discloses a load balancing recommendation system, the structural diagram of which is shown below. Figure 4 As shown, it includes:

[0105] The system includes a receiving unit 41, an output unit 42, a first determining unit 43, and a second determining unit 44.

[0106] The obtaining unit 41 is used to obtain no less than two prediction models, and the no less than two prediction models are used to characterize the correspondence between terminal configuration data and running data under each load balancing algorithm in no less than two load balancing algorithms.

[0107] Output unit 42 is used to obtain the first terminal configuration data and output at least two sets of predicted running data corresponding to the first terminal configuration data based on at least two prediction models.

[0108] The first determining unit 43 is used to determine the recommended value of each of the no less than two load balancing algorithms based on the predetermined weight values ​​and no less than two sets of predicted running data.

[0109] The second determining unit 44 is used to determine a first load balancing algorithm that matches the first terminal configuration data based on the recommended value of each of the not less than two load balancing algorithms.

[0110] Furthermore, the operational data consists of the coefficients of variation of the system's performance parameters during operation.

[0111] The system also includes: a third determining unit, used to determine the weight values;

[0112] The third determining unit is used to obtain the system's performance parameters during system operation and determine the first weight value corresponding to each performance parameter.

[0113] Furthermore, the third determining unit determines a first weight value corresponding to each performance parameter, including:

[0114] The third determining unit determines the second weight value of each performance parameter based on the coefficient of variation of each performance parameter in at least two load balancing algorithms; determines the third weight value of each performance parameter based on the linear relationship between different performance parameters; and determines the first weight value corresponding to each performance parameter based on the second weight value and the third weight value.

[0115] Furthermore, the load balancing recommendation system disclosed in this embodiment may also include:

[0116] The fourth determining unit is used to obtain terminal configuration change data; determine second terminal configuration data based on the terminal configuration change data and the first terminal configuration data; and determine a second prediction model that matches the second terminal configuration data based on the second terminal configuration data and at least two prediction models.

[0117] Furthermore, the obtaining unit is used to obtain no fewer than two prediction models, including:

[0118] No fewer than two prediction models are obtained by training the models on the historical data.

[0119] Furthermore, the load balancing recommendation system disclosed in this embodiment may also include:

[0120] The update unit is used to obtain sampled data during terminal operation. The sampled data includes at least: third running data under third terminal configuration data; and at least two prediction models are updated by training the model using at least two load balancing algorithms based on the running data in the sampled data and historical data.

[0121] The load balancing recommendation system disclosed in this embodiment is implemented based on the load balancing recommendation method disclosed in the above embodiments, and will not be described again here.

[0122] The load balancing recommendation system disclosed in this embodiment obtains at least two prediction models. These two models characterize the correspondence between terminal configuration data and runtime data for each of the at least two load balancing algorithms. A first terminal configuration data is obtained. Based on the at least two prediction models, at least two sets of predicted runtime data corresponding to the first terminal configuration data are output. Based on predetermined weight values ​​and the at least two sets of predicted runtime data, a recommendation value for each of the at least two load balancing algorithms is determined. Based on the recommendation values ​​of each of the at least two load balancing algorithms, a first load balancing algorithm matching the first terminal configuration data is determined. This scheme trains prediction models for different load balancing algorithms so that, when a load balancing algorithm needs to be selected, a more suitable load balancing algorithm can be recommended based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration.

[0123] This embodiment discloses an electronic device, the structural schematic diagram of which is shown below. Figure 5 As shown, it includes:

[0124] Processor 51 and memory 52.

[0125] The processor 51 is used to obtain at least two prediction models, each of which represents the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms; obtain first terminal configuration data; output at least two sets of predicted running data corresponding to the first terminal configuration data based on the at least two prediction models; determine the recommended value of each of the at least two load balancing algorithms based on the predetermined weight values ​​and the at least two sets of predicted running data; and determine the first load balancing algorithm that matches the first terminal configuration data based on the recommended value of each of the at least two load balancing algorithms.

[0126] The memory 52 is used to store the program for the processor to execute the above processing procedure.

[0127] The electronic device disclosed in this embodiment is implemented based on the load balancing recommendation method disclosed in the above embodiments, and will not be described again here.

[0128] The electronic device disclosed in this embodiment obtains at least two prediction models, each used to characterize the correspondence between terminal configuration data and operational data under each of the at least two load balancing algorithms. It obtains first terminal configuration data, outputs at least two sets of predicted operational data corresponding to the first terminal configuration data based on the at least two prediction models, determines a recommended value for each of the at least two load balancing algorithms based on predetermined weight values ​​and the at least two sets of predicted operational data, and determines a first load balancing algorithm matching the first terminal configuration data based on the recommended values ​​of each of the at least two load balancing algorithms. This solution trains prediction models for different load balancing algorithms so that when a load balancing algorithm needs to be selected, it can recommend a more suitable load balancing algorithm based on the prediction results of multiple prediction models, thereby improving the utilization rate of terminal configuration.

[0129] This application embodiment also provides a readable storage medium storing a computer program, which is loaded and executed by a processor to implement the steps of the above-described load balancing recommendation method. The specific implementation process can be referred to the description of the corresponding part of the above embodiment, and will not be repeated in this embodiment.

[0130] This application also proposes a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the load balancing recommendation method or load balancing recommendation system described above. Specific implementation processes can be referred to the descriptions of the corresponding embodiments above, and will not be repeated here.

[0131] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0132] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0133] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0134] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A load balancing recommendation method, comprising: At least two prediction models are obtained, and the at least two prediction models are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms. The running data is the coefficient of variation of performance parameters during system operation. The terminal configuration data includes at least: CPU size and memory size. The performance parameters include at least: CPU utilization, memory utilization and response time. Each of the at least two prediction models is for one load balancing algorithm. Obtain first terminal configuration data, and output at least two sets of predicted running data corresponding to the first terminal configuration data based on the at least two prediction models; Based on a predetermined first weight value and at least two sets of predicted operating data, a recommended value for each of the at least two load balancing algorithms is determined. The process of determining the first weight value includes: obtaining the system's performance parameters during system operation and determining the first weight value corresponding to each performance parameter. Based on the recommended value of each of the not less than two load balancing algorithms, a first load balancing algorithm that matches the configuration data of the first terminal is determined.

2. The method according to claim 1, wherein, The determination of the first weight value corresponding to each performance parameter includes: The second weight value of each performance parameter is determined based on the coefficient of variation of each performance parameter in the not less than two load balancing algorithms. The third weight value of each performance parameter is determined based on the linear relationship between different performance parameters; The first weight value corresponding to each performance parameter is determined based on the second weight value and the third weight value.

3. The method according to claim 1, wherein, Also includes: Obtain terminal configuration change data; The second terminal configuration data is determined based on the terminal configuration change data and the first terminal configuration data. Based on the second terminal configuration data and the not less than two prediction models, a second prediction model that matches the second terminal configuration data is determined.

4. The method according to claim 1, wherein, The acquisition of at least two prediction models includes: The not less than two prediction models are obtained by training the models on the running data in the historical data.

5. The method according to claim 4, wherein, Also includes: Obtain sampling data during terminal operation, wherein the sampling data includes at least: third running data under third terminal configuration data; Based on the sampled data and the running data in the historical data, the model is trained using no less than two load balancing algorithms, and the no less than two prediction models are updated.

6. A load-balanced recommendation system, comprising: The acquisition unit is used to acquire at least two prediction models, which are used to characterize the correspondence between terminal configuration data and running data under each of the at least two load balancing algorithms. The running data is the coefficient of variation of performance parameters during system operation. The terminal configuration data includes at least: CPU size and memory size. The performance parameters include at least: CPU utilization, memory utilization, and response time. Each of the at least two prediction models is for one load balancing algorithm. The output unit is used to obtain the first terminal configuration data and output at least two sets of prediction running data corresponding to the first terminal configuration data based on the at least two prediction models. The first determining unit is used to determine the recommended value of each of the not less than two load balancing algorithms based on a pre-determined first weight value and the not less than two sets of predicted running data. The second determining unit is used to determine a first load balancing algorithm that matches the first terminal configuration data based on the recommended value of each of the not less than two load balancing algorithms. The system further includes: a third determining unit, used to determine a first weight value; the third determining unit is used to obtain the system's performance parameters during system operation and determine the first weight value corresponding to each performance parameter.

7. An electronic device, comprising: A processor is configured to obtain at least two prediction models, each representing the correspondence between terminal configuration data and runtime data for each of at least two load balancing algorithms. The runtime data represents the coefficient of variation of performance parameters during system operation. The terminal configuration data includes at least CPU size and memory size, and the performance parameters include at least CPU utilization, memory utilization, and response time. Each prediction model targets a specific load balancing algorithm. The processor obtains first terminal configuration data and outputs at least two sets of predicted runtime data corresponding to the first terminal configuration data based on the at least two prediction models. It then determines a recommended value for each of the at least two load balancing algorithms based on a predetermined first weight value and the at least two sets of predicted runtime data. The process of determining the first weight value includes: obtaining the system's performance parameters during system operation and determining a first weight value corresponding to each performance parameter; and determining a first load balancing algorithm matching the first terminal configuration data based on the recommended value of each of the at least two load balancing algorithms. The memory is used to store the program used by the processor to execute the above-described processing procedure.

8. A readable storage medium for storing at least one set of instructions; The instruction set is used to be invoked and to execute at least the load balancing recommended method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Self-adaptive load balancing method based on host practical loads and load balancing device and system

    CN107196869A

  • Load balancing system in cloud environment

    CN112732451A