CN111679912A - Load balancing method and device of server, storage medium and equipment - Google Patents

Load balancing method and device of server, storage medium and equipment Download PDF

Info

Publication number
CN111679912A
CN111679912A CN202010515076.3A CN202010515076A CN111679912A CN 111679912 A CN111679912 A CN 111679912A CN 202010515076 A CN202010515076 A CN 202010515076A CN 111679912 A CN111679912 A CN 111679912A
Authority
CN
China
Prior art keywords
weight
server
parameter
determining
deviation range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010515076.3A
Other languages
Chinese (zh)
Inventor
蔡超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huiluo Information Technology Co ltd
Original Assignee
Guangzhou Huiluo Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huiluo Information Technology Co ltd filed Critical Guangzhou Huiluo Information Technology Co ltd
Priority to CN202010515076.3A priority Critical patent/CN111679912A/en
Publication of CN111679912A publication Critical patent/CN111679912A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Abstract

The embodiment of the application discloses a load balancing method and device of a server, a storage medium and equipment. The method comprises the following steps: determining the weight of the servers in the cluster by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function; determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm; and determining the adjustment result of the weight according to the first parameter and the second parameter. By executing the technical scheme, the number of preset parameters can be judged for different types of clusters, the change of relevant load parameters of each server is detected in real time, and corresponding parameter values are called, so that the dynamic adjustment of the weight of each server is realized, and the balancing effect is improved. The target loss function is small, the waste of resources is avoided, the working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.

Description

Load balancing method and device of server, storage medium and equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a load balancing method, device, storage medium and equipment of a server.
Background
With the rapid development of network economy and knowledge economy, the development of information technology has become a mainstream trend in recent years. Cloud computing is a novel information technology service mode for providing IT services such as hardware and software to customers in an on-demand self-service mode through a network. The development of cloud computing provides flexible and highly available cloud services for various industries, the appearance of container technology provides a more flexible mode for the release and deployment of the cloud services, and the utilization rate of resources is further improved.
On a cloud platform, especially in a container environment, in order to improve resource utilization and reduce cost, a service cluster is generally composed of a plurality of different types of servers, and due to the characteristics of dynamic expansion and contraction of the cluster, the types of the servers composing the cluster are also changed. In the traditional cluster, hosts with the same configuration and processing capability are generally adopted to form the cluster, and in a few cases, different types of servers are adopted, but the host machine types forming the cluster are combined and fixed.
However, in a service system, the weight of each load is generally set according to the original configuration of each load, and the weight value is fixed and cannot be dynamically adjusted, and the type of a server in a service cluster changes at any time in a cloud computing and containerized dynamic scheduling environment, so that the weight configuration suitable for the original state becomes inappropriate, the load cannot be balanced among different servers, the waste of computing resources is caused, and the probability of service problems caused by the unbalanced load of the service system cannot be reduced to the minimum.
Disclosure of Invention
The embodiment of the application provides a load balancing method, a load balancing device, a storage medium and equipment of servers, which can realize dynamic adjustment of the weight of each server and increase the balancing effect by judging the quantity of parameters and detecting the working load change of each server in real time for different types of clusters and calling corresponding parameter values. The target loss function is small, the waste of resources is avoided, the working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.
In a first aspect, an embodiment of the present application provides a load balancing method for a server, where the method includes:
determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and determining the adjustment result of the weight according to the first parameter and the second parameter.
In a second aspect, an embodiment of the present application provides a load balancing apparatus for a server, where the apparatus includes:
the dynamic weight determining module is used for determining the weight of the server in a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
the parameter determining module is used for determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and the weight adjusting module is used for determining the adjusting result of the weight according to the first parameter and the second parameter.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a load balancing method for a server according to an embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides an apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement a load balancing method for a server according to an embodiment of the present application.
According to the technical scheme provided by the embodiment of the application, a dynamic weight calculation mode is adopted to obtain the weight of the server, after the weight is obtained, a first parameter and a second parameter for weight adjustment are determined through a weight learning method, and the weight is dynamically adjusted according to the first parameter and the second parameter to obtain the adjustment result of the weight. By executing the technical scheme, the dynamic adjustment of the weight of each server and the balance effect can be improved by judging the number of the preset parameters for different types of clusters, detecting the working load change of each server in real time and calling the corresponding parameter values. The target loss function is small, the waste of resources is avoided, the working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.
Drawings
Fig. 1 is a flowchart of a load balancing method for a server according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a load balancing process of a server according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a load balancing apparatus of a server according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus provided in an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a load balancing method for a server according to an embodiment of the present application, where this embodiment is applicable to a case of implementing load balancing for different types of clusters, and the method may be executed by a load balancing apparatus for a server according to an embodiment of the present application, where the apparatus may be implemented by software and/or hardware, and may be integrated in a device used for a computer intelligent terminal and the like.
As shown in fig. 1, the load balancing method of the server includes:
s110, determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function.
The weight may be the importance of a certain factor or index relative to a certain event, which is different from the general specific gravity, and is not only the percentage of a certain factor or index, but also the relative importance of the factor or index is emphasized, which tends to contribute to the degree or importance. The weight of the server may be a weight that alternately assigns the user's request to the server. For example, assuming that there are three servers A, B and C, the work tasks can be distributed according to a weight ratio of 1:1:1, and then A, B and C distribute the same work tasks; the work tasks can be distributed according to the proportion of 4:1:1, and the work tasks distributed by the A are more than those distributed by the B and the C.
The loss function may be a function that maps the value of a random event or its associated random variable to a non-negative real number to represent the "risk" or "loss" of the random event. In application, the loss function is usually associated with the optimization problem as a learning criterion, i.e. the model is solved and evaluated by minimizing the loss function. For example, the loss function is used in machine learning for parameter estimation of the model. And the method is used for evaluating the inconsistency degree of the predicted value and the actual value of the model. When a machine learning task is carried out, each algorithm used has a loss function, and the algorithm continuously adjusts the proximity degree of a predicted value and a true value to optimize the loss function so as to minimize the loss function. E.g. a 0-1 loss function, which is a simpler loss function, the loss function is 1 if the predicted value is not equal to the target value, otherwise the loss function is 0.
The weight is determined based on a preset loss function, the working capacities of different servers are different, and the servers with different working capacities are distributed with working tasks according to the corresponding capacities, so that the loss function is smaller, the smaller the loss function is, the less resources are wasted, the response speed of the servers can be improved, the problem of network congestion can be solved, and the high-quality network access effect can be achieved. For example, assume that there are three identical servers, A1, B1, and C1. The working capacity of A1, B1 and C1 is the same, if the work tasks are distributed according to the proportion of 1:1:1, the three servers waste less resources when working; there are three different servers, a2, B2, and C2. Among them, the working capacity of A2 is stronger than that of B2 and C2 by 4 times, and the working capacities of B2 and C2 are general. The work tasks can be distributed according to the proportion of 1:1:1, and the server A2 wastes more resources; the work tasks can be distributed according to the proportion of 4:1:1, and the work tasks are distributed according to the work capacities of different servers, so that the resource arrangement is relatively reasonable, the resource waste is avoided, the loss function is small, and the probability of system blockage and even paralysis is reduced.
And S120, determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm.
The weight learning algorithm may be an algorithm in machine learning, and the algorithm may be a learning algorithm that simulates or implements human learning behavior by using a computer and optimizes performance criteria of a computer program by using data or past experience according to different learning tasks. The machine learning is a multi-disciplinary cross specialty, covers probability theory knowledge, statistical knowledge, approximate theoretical knowledge and complex algorithm knowledge, uses a computer as a tool and is dedicated to a real-time simulation human learning mode, and knowledge structure division is carried out on the existing content to effectively improve the learning efficiency.
Where a parameter may be a variable whose value determines any one of a set of physical properties of a system's characteristics or behavior. The parameters in the weight learning algorithm may be variables that the model automatically learns from the data. For example, it may be a weight, a bias, etc. of deep learning.
In this technical solution, optionally, the weight learning algorithm includes a reinforcement learning algorithm.
Wherein, the reinforcement learning can be learning by the agent in a trial and error way, the reward obtained by interacting with the environment guides the behavior, the goal is to make the agent obtain the maximum reward, and the reinforcement learning is used for describing and solving the problem that the agent achieves the maximum reward or achieves the specific goal by learning the strategy in the interaction process with the environment. The reinforcement signal provided by the environment in reinforcement learning is an evaluation of the quality of the generated action, the information provided by the external environment is little, and the reinforcement learning system learns by depending on the experience of the reinforcement learning system. In this way, the reinforcement learning system gains knowledge in the context of action-assessment, improving the action scheme to suit the context.
For example, the commonly used learning algorithm may be a monte carlo method, a dynamic programming method, or the like, wherein the monte carlo method is also called a statistical simulation method, which solves the problem of calculation by using random numbers or pseudo random numbers, and is an important type of numerical calculation method, which is a method based on probability. For example, assuming that the area of an irregular pattern needs to be calculated, the degree of irregularity of the pattern is proportional to the complexity of the analytical calculation. Firstly, the graph is put into a square frame with a known area by adopting a Monte Carlo method, then, some beans are supposed to be scattered into the square frame, the beans are scattered into the square frame, and then, the number of the beans in the graph is counted, and the area is calculated according to the proportion of the beans inside and outside the graph. When the beans are smaller and the scattering is more, the result is more accurate; the dynamic programming method can be a way and a method for solving the optimization problem, the dynamic programming method can be a problem solving method aiming at the optimization problem, conditions for determining the optimal solution are different due to different properties of various problems, and the design method of the dynamic programming has various characteristics for different problems. For example, from point a to point C, there may be two paths from point a to point B and finally to point C or from point a to point B1 and finally to point C, where point B1 is farther away from point B, and the shortest path is from point a to point B and finally to point C, and then the selection of these points constitutes the optimal strategy, and satisfies the principle of optimality, that is, the dynamic programming method.
The reinforcement learning comprises a plurality of different learning algorithms, and different learning algorithms are selected to determine the first parameter and the second parameter of weight adjustment according to the actual scene, so that an optimal server weight adjustment scheme can be provided.
And S130, determining the adjustment result of the weight according to the first parameter and the second parameter.
According to the determination of the first parameter and the second parameter, the weight result can be dynamically adjusted, and the equalization effect is improved. The weight of the server can reach the optimal weight, so that the loss function is minimum, and the waste of resources is avoided.
For example, assume that there are three different servers, A2, B2, and C2. Among them, the working capacity of A2 is stronger than that of B2 and C2 by 4 times, and the working capacities of B2 and C2 are general. The weight is distributed according to the proportion of 1:1:1, the weight of the three servers is adjusted through the determination of the first parameter and the second parameter, the adjustment result is that the work tasks are distributed according to the proportion of 4:1:1, the work tasks are distributed according to the working capacity of different servers, the resource arrangement is relatively reasonable, the waste of resources is avoided, the loss function is small, and the probability of the system jamming and even paralysis phenomenon is reduced.
The embodiment of the application provides a load balancing method of a server. Determining the weight of the server by adopting a dynamic weight calculation mode, wherein the weight of the server is determined by a preset loss function, determining a first parameter and a second parameter for weight adjustment by a weight learning algorithm, adjusting the weight according to the first parameter and the second parameter, and determining the adjustment result of the weight. By executing the technical scheme, the number of preset parameters of different types of clusters can be judged, the change of the preset parameters of each server is detected in real time, and the corresponding parameter values are called, so that the dynamic adjustment of the weight of each server is realized, and the balancing effect is improved. The target loss function is small, the waste of resources is avoided, the working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.
Example two
Fig. 2 is a schematic diagram of a load balancing process of a server in the second embodiment of the present invention. The second embodiment is further optimized on the basis of the first embodiment. The concrete optimization is as follows: the first parameter comprises a learning rate; the second parameter comprises a deviation range; correspondingly, determining the adjustment result of the weight according to the first parameter and the second parameter includes: determining whether the weight of the server needs to be adjusted or not according to the deviation range; and if so, determining the weight adjustment result according to the learning rate. As shown in fig. 2, the method includes:
s210, determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function.
S220, determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm; wherein the first quantity comprises a learning rate; the second parameter includes a deviation range.
The learning rate may be a hyper-parameter that causes the gradient of the loss function to adjust the network weight in a gradient descent method. The weight of the loss function can be adjusted through the learning rate, so that the loss function is reduced to reach an optimal value. For example, the initial loss function result is 2, the loss function is adjusted by the learning rate, and the adjusted loss function result is 1, which reaches the optimal value.
Wherein the deviation may be an absolute value of a difference of the weight and the average load weight. The deviation range can be a numerical range set according to different server working capacities in actual conditions. For example, the weight of an individually measured server may have a value of 0.8, the average load weight of the server may have a value of 0.5, the deviation range may be 0.3, and the deviation range may be-0.1 to 0.1.
And S230, determining whether the weight of the server needs to be adjusted according to the deviation range.
In this technical solution, optionally, determining whether the weight of the server needs to be adjusted according to the deviation range includes:
if the absolute value of the difference value between the current weight and the average load weight of the server is smaller than or equal to the deviation range, determining that the weight of the server does not need to be adjusted;
and the number of the first and second groups,
and if the absolute value of the difference value of the current weight and the average load weight of the server is larger than the deviation range, determining that the weight of the server needs to be adjusted.
And determining whether the weight of the server needs to be adjusted or not through the deviation range, and adjusting the weight of the server when the absolute value of the difference value between the current weight of the server and the average load weight is larger than the deviation range. Through the setting of deviation scope, can be so that server weight is in a reasonable scope, improved the utilization ratio of different server working capacities.
And S240, if so, determining the weight adjustment result according to the learning rate.
The weight is adjusted according to the learning rate, the learning rate can be adjusted by adding a certain value to the weight, subtracting a certain value, multiplying a certain value or dividing a certain value, the adjusted weight is obtained, the weight of the server is closer to the average load weight, and the adjustment is continuously carried out, so that the absolute value of the difference value between the weight of the server and the average load weight is in the deviation range.
Illustratively, with a machine learning scheme, the weight of each type of server in the cluster is learned, and the value of the loss function is minimized by adjusting the weight. The following is the loss function:
Figure BDA0002529772380000091
wherein f isloss(w1,w2,w3...,wn) Represents the loss function, T represents the workload, and W represents the weight of the server.
The initial weight adjustment may be made by the following equation:
Figure BDA0002529772380000101
where β is the learning rate and the deviation range, and wi represents the weight adjusted by different servers.
Determining whether the weight of the server needs to be adjusted or not according to the deviation range by obtaining the weight of the server and the deviation range of the weight of the server, wherein when the absolute value of the difference value between the current weight of the server and the average load weight is smaller than or equal to the deviation range, the weight of the server does not need to be adjusted, and the weight of the server is the current weight; when the absolute value of the difference between the current weight of the server and the average load weight is greater than the deviation range, the weight of the server needs to be adjusted. And adjusting the weight according to the learning rate until the absolute value of the difference between the server weight and the average load weight is less than or equal to the deviation range to obtain the result of the adjusted weight, wherein the weight of the server is the adjusted weight.
The weight of each server is adjusted through the learning rate, the preset parameter change of each server can be detected in real time, the corresponding parameter value is called to obtain the weight of the server, and the weight of the server is smaller than or equal to the deviation range, so that the target loss function is smaller, the waste of resources is avoided, the dynamic adjustment of the weight of each server is realized, and the balance effect is improved. The working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.
The second embodiment of the application provides a load balancing process of a server. Determining the weight of the server by adopting a dynamic weight calculation mode, wherein the weight of the server is determined by a preset loss function, determining a first parameter and a second parameter for weight adjustment by a weight learning algorithm, adjusting the weight according to the first parameter and the second parameter, and determining the adjustment result of the weight. Wherein the first parameter comprises a learning rate; the second parameter includes a deviation range. Determining whether the weight of the server needs to be adjusted according to the deviation range; and adjusting the weight according to the learning rate to obtain the adjustment result of the server weight. By executing the technical scheme, the number of preset parameters of different types of clusters can be judged, the change of the preset parameters of each server is detected in real time, and the corresponding parameter values are called, so that the dynamic adjustment of the weight of each server is realized, and the balancing effect is improved. The target loss function is small, the waste of resources is avoided, the working capacity of the server can be reasonably utilized, and the probability of system jamming and even paralysis is reduced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a load balancing apparatus of a server, as shown in fig. 3, the apparatus includes:
a dynamic weight determining module 310, configured to determine a weight of the server in a dynamic weight calculation manner; wherein the weight is determined based on a preset loss function;
a parameter determining module 320, configured to determine a first parameter and a second parameter for weight adjustment through a weight learning algorithm;
the weight adjusting module 330 is configured to determine an adjustment result of the weight according to the first parameter and the second parameter.
In this technical solution, optionally, the weight learning algorithm includes a reinforcement learning algorithm.
In this technical solution, optionally, the first parameter includes a learning rate; the second parameter comprises a deviation range;
the weight adjusting module 330 specifically includes:
the weight adjusting condition judging unit is used for determining whether the weight of the server needs to be adjusted or not according to the deviation range;
and the weight adjusting result determining unit is used for determining the adjusting result of the weight according to the learning rate if the weight adjusting result is positive.
In this technical solution, optionally, determining whether the weight of the server needs to be adjusted according to the deviation range includes:
if the absolute value of the difference value between the current weight and the average load weight of the server is smaller than or equal to the deviation range, determining that the weight of the server does not need to be adjusted;
and the number of the first and second groups,
and if the absolute value of the difference value of the current weight and the average load weight of the server is larger than the deviation range, determining that the weight of the server needs to be adjusted.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for load balancing of servers, the method comprising:
determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and determining the adjustment result of the weight according to the first parameter and the second parameter.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide the program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present application is not limited to the load balancing operation of the server described above, and may also perform related operations in the load balancing method of the server provided in any embodiments of the present application.
EXAMPLE five
The embodiment of the application provides equipment, and a load balancing device of a server provided by the embodiment of the application can be integrated in the equipment. Fig. 4 is a schematic structural diagram of an apparatus provided in the fifth embodiment of the present application. As shown in fig. 4, the present embodiment provides an apparatus 400 comprising: one or more processors 420; the storage device 410 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement a load balancing method for a server provided in an embodiment of the present application, the method includes:
determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and determining the adjustment result of the weight according to the first parameter and the second parameter.
Of course, those skilled in the art can understand that the processor 420 also implements the technical solution of the load balancing method for the server provided in any embodiment of the present application.
The apparatus 400 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present application.
As shown in fig. 4, the apparatus 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of the processors 420 in the device may be one or more, and one processor 420 is taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430 and the output device 440 of the apparatus may be connected by a bus or other means, for example, the bus 450 in fig. 4.
The storage device 410 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and module units, such as program instructions corresponding to the load balancing method of the server in the embodiment of the present application.
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 410 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 410 may further include memory located remotely from processor 420, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numbers, character information or voice information, and to generate key signal inputs related to user settings and function control of the apparatus. The output device 440 may include a display screen, speakers, etc.
The device provided by the embodiment of the application can achieve the purposes of improving the load balancing speed and the processing effect of the server.
The load balancing device, the storage medium, and the apparatus of the server provided in the above embodiments may execute the load balancing method of the server provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a load balancing method for a server provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A load balancing method for a server is characterized by comprising the following steps:
determining the weight of the server by adopting a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and determining the adjustment result of the weight according to the first parameter and the second parameter.
2. The method of claim 1, wherein the first quantity comprises a learning rate; the second parameter comprises a deviation range;
correspondingly, determining the adjustment result of the weight according to the first parameter and the second parameter includes:
determining whether the weight of the server needs to be adjusted or not according to the deviation range;
and if so, determining the weight adjustment result according to the learning rate.
3. The method of claim 2, wherein determining whether the server weight needs to be adjusted based on the deviation metric comprises:
if the absolute value of the difference value between the current weight and the average load weight of the server is smaller than or equal to the deviation range, determining that the weight of the server does not need to be adjusted;
and the number of the first and second groups,
and if the absolute value of the difference value of the current weight and the average load weight of the server is larger than the deviation range, determining that the weight of the server needs to be adjusted.
4. The method of claim 1, wherein the weight learning algorithm comprises a reinforcement learning algorithm.
5. A load balancing apparatus for a server, comprising:
the dynamic weight determining module is used for determining the weight of the server in a dynamic weight calculation mode; wherein the weight is determined based on a preset loss function;
the parameter determining module is used for determining a first parameter and a second parameter of weight adjustment through a weight learning algorithm;
and the weight adjusting module is used for determining the adjusting result of the weight according to the first parameter and the second parameter.
6. The apparatus of claim 5, wherein the first quantity comprises a learning rate; the second parameter comprises a deviation range;
correspondingly, the weight adjusting module includes:
the weight adjusting condition judging unit is used for determining whether the weight of the server needs to be adjusted or not according to the deviation range;
and a weight adjustment result determination unit configured to determine a weight adjustment result based on the learning rate if the weight adjustment condition determination unit determines that the learning rate is positive.
7. The apparatus according to claim 6, wherein the weight adjustment condition determining unit is specifically configured to:
if the absolute value of the difference value between the current weight and the average load weight of the server is smaller than or equal to the deviation range, determining that the weight of the server does not need to be adjusted;
and the number of the first and second groups,
and if the absolute value of the difference value of the current weight and the average load weight of the server is larger than the deviation range, determining that the weight of the server needs to be adjusted.
8. The apparatus of claim 5, wherein the weight learning algorithm comprises a reinforcement learning algorithm.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of load balancing for a server according to any one of claims 1 to 4.
10. An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a method of load balancing of a server according to any of claims 1-4 when executing the computer program.
CN202010515076.3A 2020-06-08 2020-06-08 Load balancing method and device of server, storage medium and equipment Pending CN111679912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010515076.3A CN111679912A (en) 2020-06-08 2020-06-08 Load balancing method and device of server, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010515076.3A CN111679912A (en) 2020-06-08 2020-06-08 Load balancing method and device of server, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN111679912A true CN111679912A (en) 2020-09-18

Family

ID=72435584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010515076.3A Pending CN111679912A (en) 2020-06-08 2020-06-08 Load balancing method and device of server, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN111679912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342535A (en) * 2021-06-30 2021-09-03 中国工商银行股份有限公司 Task data distribution method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014146161A (en) * 2013-01-29 2014-08-14 Toshiba Corp Model estimation device and method thereof
CN104346629A (en) * 2014-10-24 2015-02-11 华为技术有限公司 Model parameter training method, device and system
CN110134513A (en) * 2019-04-17 2019-08-16 平安科技(深圳)有限公司 Load-balancing method, device, computer equipment and storage medium
CN110689043A (en) * 2019-08-22 2020-01-14 长沙千视通智能科技有限公司 Vehicle fine granularity identification method and device based on multiple attention mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014146161A (en) * 2013-01-29 2014-08-14 Toshiba Corp Model estimation device and method thereof
CN104346629A (en) * 2014-10-24 2015-02-11 华为技术有限公司 Model parameter training method, device and system
CN110134513A (en) * 2019-04-17 2019-08-16 平安科技(深圳)有限公司 Load-balancing method, device, computer equipment and storage medium
CN110689043A (en) * 2019-08-22 2020-01-14 长沙千视通智能科技有限公司 Vehicle fine granularity identification method and device based on multiple attention mechanism

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
网络作者: "AI之机器学习中的基本损失函数", pages 1 - 5, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/144914762> *
网络作者: "多类逻辑回归 (Multinomial Logistic Regression)", pages 1 - 47, Retrieved from the Internet <URL:https://www.jianshu.com/p/fa32bc72ef2c> *
网络作者: "损失函数Loss Function", pages 1 - 4, Retrieved from the Internet <URL:https://blog.csdn.net/Frank_LJiang/article/details/104266255> *
网络作者: "深度学习之神经网络的学习", pages 1 - 2, Retrieved from the Internet <URL:https://www.bilibili.com/read/cv5253312/> *
邓建国 等: "监督学习中的损失函数及应用研究", 《大数据》, vol. 6, no. 1, 15 January 2020 (2020-01-15), pages 60 - 80 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342535A (en) * 2021-06-30 2021-09-03 中国工商银行股份有限公司 Task data distribution method and device

Similar Documents

Publication Publication Date Title
CN108009016B (en) Resource load balancing control method and cluster scheduler
Baek et al. Managing fog networks using reinforcement learning based load balancing algorithm
CN109947567B (en) Multi-agent reinforcement learning scheduling method and system and electronic equipment
US9959337B2 (en) Independent data processing environments within a big data cluster system
CN102185779B (en) Method and device for realizing data center resource load balance in proportion to comprehensive allocation capability
EP3226134B1 (en) A method and system for scaling resources, and a computer program product
US8185893B2 (en) Starting up at least one virtual machine in a physical machine by a load balancer
US7676578B1 (en) Resource entitlement control system controlling resource entitlement based on automatic determination of a target utilization and controller gain
CN107124472A (en) Load-balancing method and device, computer-readable recording medium
CN108628674A (en) Method for scheduling task, cloud platform based on cloud platform and computer storage media
US9477532B1 (en) Graph-data partitioning for workload-balanced distributed computation with cost estimation functions
CN102232282A (en) Method and apparatus for realizing load balance of resources in data center
CN106385468A (en) Method for balancing predictable dynamic load of Web clusters
CN109918170A (en) A kind of cloud data center virtual machine dynamic BTS configuration method and system
CN113806018A (en) Kubernetes cluster resource hybrid scheduling method based on neural network and distributed cache
CN111131486A (en) Load adjustment method and device of execution node, server and storage medium
CN111245924A (en) Load balancing method and device and computer storage medium
CN108089918B (en) Graph computation load balancing method for heterogeneous server structure
CN111679912A (en) Load balancing method and device of server, storage medium and equipment
Vahora et al. Cloudsim-a survey on vm management techniques
CN114327824A (en) Method and device for determining service host and electronic equipment
EP4057142A1 (en) Job scheduling method and job scheduling apparatus
Peng et al. Research on cloud computing resources provisioning based on reinforcement learning
CN108228346A (en) service system and its control method
Prado et al. On providing quality of service in grid computing through multi-objective swarm-based knowledge acquisition in fuzzy schedulers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination