Search

CN-121411984-B - Self-adaptive load balancing method and system based on multidimensional intelligent sensing

CN121411984BCN 121411984 BCN121411984 BCN 121411984BCN-121411984-B

Abstract

The application discloses a self-adaptive load balancing method and a self-adaptive load balancing system based on multi-dimensional intelligent perception, wherein the method comprises the steps of periodically collecting and preprocessing multi-dimensional index data of the load state of each node through a monitoring agent deployed on each node in a server cluster, and determining the dynamic weight of each dimension index by using a preset weight calculation model after standardized state characteristic data are obtained; the method comprises the steps of calculating comprehensive load indexes of all nodes according to dynamic weights of all dimension indexes, dividing all nodes into different load levels, dynamically generating a load balancing strategy according to current load distribution and load levels and by combining time sequence prediction results of historical load data, calculating load quantity to be migrated according to the load balancing strategy, selecting an optimal target migration node, and executing load migration operation. Through core designs such as multidimensional acquisition, dynamic weight calculation, time sequence prediction combination, the intelligent, accurate and efficient load balancing are realized.

Inventors

  • JU GUOLI
  • PEI GUANGFENG

Assignees

  • 山东浪潮新世纪科技有限公司

Dates

Publication Date
20260512
Application Date
20251225

Claims (7)

  1. 1. The self-adaptive load balancing method based on multidimensional intelligent sensing is characterized by comprising the following steps of: Periodically collecting multi-dimensional index data of the load state of each node through a monitoring agent deployed on each node in a server cluster, wherein the periodic collection of CPU utilization rate, memory utilization rate, network broadband utilization rate, disk I/O load, response time and throughput of each node is carried out through a system call interface; Preprocessing the collected multi-dimensional index data to obtain standardized state characteristic data; Based on the standardized state characteristic data, determining the dynamic weight of each dimension index by using a preset weight calculation model, wherein the calculation formula is as follows: Wherein, the Is the first The final dynamic weight of the individual dimension indicators, The objective weights calculated for the entropy weight method, The subjective weights calculated for the analytic hierarchy process, The coefficients are assigned to the weights and, Is the first In the first dimension The index specific gravity of each node is determined, For the total number of cluster server nodes, The total number of dimensions is the load index; Calculating the comprehensive load index of each node according to the dynamic weight of each dimension index, and dividing each node into different load levels, wherein the method comprises the following steps: and calculating the comprehensive load index of each node according to the dynamic weight of each dimension index, wherein the calculation formula is as follows: Wherein, the Is the first The final dynamic weight of the individual dimension indicators, Is the first The overall load index of the individual server nodes, Is the first The individual node is at the first Standardized feature values for the individual dimensions; clustering the comprehensive load indexes of all nodes of the cluster by adopting a K-means clustering algorithm, and dividing the nodes into low-load nodes, medium-load nodes and high-load nodes; according to the current load distribution and load level, and combining the time sequence prediction result of the historical load data, dynamically generating a load balancing strategy, wherein the load balancing strategy comprises the following steps: predicting the comprehensive load index of the nodes in a future preset time window according to the historical load data; If the node is currently a high-load node and the predicted comprehensive load index of the node is larger than a high-load threshold, triggering a load migration strategy; if the node is currently a low-load node and the predicted comprehensive load index of the node is smaller than the low-load threshold value, marking the node as a load migration candidate node; If the current node is a medium load node, maintaining the current load state and continuously monitoring the current node; and calculating the load quantity to be migrated according to the load balancing strategy, selecting an optimal target migration node, and executing load migration operation.
  2. 2. The adaptive load balancing method based on multidimensional intelligent sensing according to claim 1, wherein the periodic collection is performed on the CPU utilization, the memory utilization, the network broadband utilization, the disk I/O load, the response time and the throughput of each node through the system call interface, and the calculation formulas are respectively as follows: Wherein, the For the total time at which the CPU is busy at time t, For the total CPU running time at time t, deltat is the sampling period, For the amount of memory already used at time t, In order to be able to achieve a total amount of memory, For the current network traffic at time t, For the maximum bandwidth capacity of the network interface, For the number of disk I/O operations at time t, For maximum I/O processing capacity of the disk, For the response time of the ith request at time t, Is the total number of requests in Δt time.
  3. 3. The adaptive load balancing method based on multi-dimensional intelligent sensing according to claim 1, wherein preprocessing the collected multi-dimensional index data to obtain standardized state characteristic data comprises the following steps: Deleting null values and repeated values generated in the acquisition process, and then mapping index data of different dimensions into the same numerical interval by adopting a min-max normalization method; By using Detecting an abnormal value in principle, and correcting the abnormal value by using a linear interpolation method; And smoothing the data by using a time window moving average method to obtain standardized state characteristic data.
  4. 4. The adaptive load balancing method based on multidimensional intelligent sensing according to claim 1, wherein a calculation formula for predicting a node comprehensive load index in a future preset time window according to historical load data is as follows: Wherein, the 、 As a result of the autoregressive coefficients, Is that The nodes of the time window synthesize a load index, The load index is integrated for the nodes of the time window, 、 In order to move the coefficient of the average, Is a residual term.
  5. 5. The adaptive load balancing method based on multidimensional intelligent sensing according to claim 1, wherein the calculation formula of the load to be migrated is: Wherein, the Is a node Is used for the migration of the load quantity, Is a node The current integrated load index is used to determine the load, For a high load threshold value, Is a node Is used for the total load capacity of the vehicle.
  6. 6. The adaptive load balancing method based on multidimensional intelligent sensing according to claim 1, wherein the calculation formula for selecting the optimal target migration node is as follows: Wherein, the For candidate migrating nodes Is used for the evaluation score of (a), Is a node Is used for the load idle degree of the (a), Is a node Is used for the resource redundancy of the (c) in the (c), To migrate out of node And candidate node Is used for the distance of (a), 、 And Is a weight coefficient.
  7. 7. An adaptive load balancing system based on multidimensional intelligent sensing, comprising: the acquisition module is used for periodically acquiring the multidimensional index data of the load state of each node through a monitoring agent deployed on each node in the server cluster, and comprises the steps of periodically acquiring the CPU utilization rate, the memory utilization rate, the network broadband utilization rate, the disk I/O load, the response time and the throughput of each node through a system call interface; The preprocessing module is used for preprocessing the acquired multi-dimensional index data to obtain standardized state characteristic data; the dynamic weight determining module is used for determining the dynamic weight of each dimension index by using a preset weight calculation model based on the standardized state characteristic data, and the calculation formula is as follows: Wherein, the Is the first The final dynamic weight of the individual dimension indicators, The objective weights calculated for the entropy weight method, The subjective weights calculated for the analytic hierarchy process, The coefficients are assigned to the weights and, Is the first In the first dimension The index specific gravity of each node is determined, For the total number of cluster server nodes, The total number of dimensions is the load index; the grading module is used for calculating the comprehensive load index of each node according to the dynamic weight of each dimension index, so as to divide each node into different load grades, and comprises the following steps: and calculating the comprehensive load index of each node according to the dynamic weight of each dimension index, wherein the calculation formula is as follows: Wherein, the Is the first The final dynamic weight of the individual dimension indicators, Is the first The overall load index of the individual server nodes, Is the first The individual node is at the first Standardized feature values for the individual dimensions; clustering the comprehensive load indexes of all nodes of the cluster by adopting a K-means clustering algorithm, and dividing the nodes into low-load nodes, medium-load nodes and high-load nodes; The policy generation module is used for dynamically generating a load balancing policy according to the current load distribution and load level and combining a time sequence prediction result of historical load data, and comprises the following steps: predicting the comprehensive load index of the nodes in a future preset time window according to the historical load data; If the node is currently a high-load node and the predicted comprehensive load index of the node is larger than a high-load threshold, triggering a load migration strategy; if the node is currently a low-load node and the predicted comprehensive load index of the node is smaller than the low-load threshold value, marking the node as a load migration candidate node; If the current node is a medium load node, maintaining the current load state and continuously monitoring the current node; And the migration operation module is used for calculating the load quantity to be migrated according to the load balancing strategy, selecting the optimal target migration node and executing the load migration operation.

Description

Self-adaptive load balancing method and system based on multidimensional intelligent sensing Technical Field The invention relates to the technical field of load balancing, in particular to a self-adaptive load balancing method and system based on multidimensional intelligent sensing. Background With the rapid iteration of cloud computing, big data and artificial intelligence technology, the access volume of various service systems is explosive growth, the server cluster is used as a core infrastructure for service bearing, and the load distribution balance of the server cluster directly determines the response efficiency, service stability and resource utilization rate of the system. The load balancing technology is a key supporting technology for solving single-node overload and improving the overall performance of the cluster by reasonably distributing user requests or tasks to the cluster nodes. However, the existing load balancing method still has a plurality of limitations in practical application, and is difficult to adapt to complex and changeable business scene requirements, namely, firstly, the index acquisition dimension is single, and the load evaluation is one-sided. The traditional method is mainly dependent on single or few static indexes such as CPU utilization rate, memory occupation and the like as load judgment basis, and neglects the influence of key dimensions such as disk I/O, network bandwidth, service response time delay, request success rate and the like on the load state. For example, in I/O intensive services, even if the CPU utilization is low, the disk read-write bottleneck still causes the server to be in a high-load state, and single index evaluation is easy to cause load misjudgment, so that the balance policy is invalid. Secondly, index weight is fixed, and scene adaptability is poor. In the prior art, the weights of all load indexes are manually preset static values, and cannot be dynamically adjusted according to service types and load fluctuation rules. Furthermore, load prediction is absent, and policy hysteresis is obvious. Most methods only generate a balancing strategy based on the current load state, and do not combine the time sequence characteristics of the historical load data to predict the future load trend. When the sudden flow or load peak value is faced, the node overload risk cannot be avoided in advance by delayed strategy adjustment, the problems of overtime service response, lost request and the like are easy to occur, and the user experience is seriously affected. In addition, the load migration lacks accuracy, and the resource waste is serious. In the load migration link, a 'one-cut' migration mode is often adopted, high-load nodes are not effectively relieved, low-load node resources are wasted, insufficient migration or excessive migration is caused, and meanwhile network transmission cost and service interruption risks are increased. Disclosure of Invention In order to solve the technical problems, the application provides the following technical scheme: in a first aspect, an embodiment of the present application provides a method for adaptive load balancing based on multidimensional intelligent sensing, including: Periodically collecting multi-dimensional index data of the load state of each node through a monitoring agent deployed on each node in the server cluster; Preprocessing the collected multi-dimensional index data to obtain standardized state characteristic data; Based on the standardized state characteristic data, determining the dynamic weight of each dimension index by using a preset weight calculation model; Calculating the comprehensive load index of each node according to the dynamic weight of each dimension index, and dividing each node into different load levels; according to the current load distribution and load level, dynamically generating a load balancing strategy by combining a time sequence prediction result of historical load data; and calculating the load quantity to be migrated according to the load balancing strategy, selecting an optimal target migration node, and executing load migration operation. In one possible implementation manner, the periodically collecting, by a monitoring agent deployed on each node in the server cluster, the multidimensional index data of the load status of each node includes: the CPU utilization rate, the memory utilization rate, the network broadband utilization rate, the disk I/O load, the response time and the throughput of each node are periodically acquired through a system call interface, and the calculation formulas are respectively as follows: Wherein, the For the total time at which the CPU is busy at time t,For the total CPU running time at time t, deltat is the sampling period,For the amount of memory already used at time t,In order to be able to achieve a total amount of memory,For the current network traffic at time t,For the maximum bandwidth capacity of the network interface,F