Search

CN-122001890-A - Load balancing method, device, equipment, medium and product

CN122001890ACN 122001890 ACN122001890 ACN 122001890ACN-122001890-A

Abstract

The invention provides a load balancing method, a load balancing device, load balancing equipment, load balancing media and load balancing products, and relates to the technical field of Internet of things. The method comprises the steps of collecting first task characteristic information of each node of a system to be balanced in a target preset time period in a plurality of preset time periods through a sliding window, inputting the first task characteristic information into a time sequence prediction model, determining second task characteristic information of each node in the first preset time period, wherein the first preset time period is a preset time period which is adjacent to the target preset time period and is located behind the target preset time period in the plurality of preset time periods, and determining state adjustment information of the system to be balanced according to the first task characteristic information and the second task characteristic information, so that negative influence on stability of the system caused by flow burst in the system to be balanced is avoided, each node can operate efficiently in a local system, can be in seamless butt joint with a downstream system, and is consistent and stable with the whole system.

Inventors

  • HU JINGLIN
  • CAI MING
  • YANG ZHANGWEI
  • WANG JIANQIU
  • PAN YI

Assignees

  • 中移(上海)信息通信科技有限公司
  • 中移智行网络科技有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260508
Application Date
20260203

Claims (15)

  1. 1. A method of load balancing, comprising: Collecting first task characteristic information of each node of a system to be balanced in a target preset time period in a plurality of preset time periods through a sliding window; inputting the first task characteristic information into a time sequence prediction model, and determining second task characteristic information of each node in a first preset time period, wherein the first preset time period is a preset time period which is adjacent to and is positioned after the target preset time period in the plurality of preset time periods; And determining state adjustment information of the system to be balanced according to the first task characteristic information and the second task characteristic information.
  2. 2. The method of claim 1, wherein inputting the first task characteristic information into a time series prediction model to determine second task characteristic information for the nodes within a first predetermined period of time comprises: respectively inputting the resource use information of each node of the system to be balanced into an autoregressive integrated moving average model to determine a first predicted value of the corresponding node, wherein the first task characteristic information comprises the resource use information; Respectively inputting the first predicted value of each node into a B-spline curve interpolation model to determine a second predicted value of the corresponding node, wherein the time sequence prediction model comprises the B-spline curve interpolation model; And adding the product of the first predicted value and the first weight value of each node to the product of the second predicted value and the second weight value to obtain the corresponding second task characteristic information of the node, wherein the second weight value is a difference value between 1 and the first weight value, the first weight value is obtained according to the historical first weight value of the node in a second preset time period and the resource use information, and the second preset time period is a preset time period which is adjacent to the target preset time period and is positioned before the target preset time period in the preset time periods.
  3. 3. The method of claim 1, wherein obtaining the state adjustment information of the system to be balanced according to the second task characteristic information comprises: and acquiring node quantity adjusting information of the system to be balanced according to the second task characteristic information, wherein the state adjusting information comprises the node quantity adjusting information.
  4. 4. The method of claim 3, wherein obtaining node number adjustment information for the system to be balanced based on the second task characteristic information comprises: Setting a first experience threshold, a second experience threshold and a continuous detection frequency statistical threshold according to the service property of the system to be balanced, wherein the first experience threshold is larger than the second experience threshold; Acquiring the second task characteristic information every third preset time length; Determining the node quantity adjustment information as an added node under the condition that the continuous times of the second task characteristic information exceeding the first experience threshold reach the continuous detection times statistical threshold; And determining the node quantity adjustment information as a reduced node in the case that the continuous times of which the second task characteristic information is lower than the second experience threshold reaches the continuous detection times statistical threshold.
  5. 5. The method of claim 1, wherein determining the state adjustment information for the system to be equalized based on the first task characteristic information comprises: Acquiring a first system state value of a corresponding node in the target preset time period according to error information, time delay information and resource use information of each node of the system to be balanced, wherein the first task characteristic information comprises the error information, the time delay information and the resource use information; And determining thread concurrency number adjustment information of the corresponding node according to the first system state value of each node, wherein the state adjustment information comprises the thread concurrency number adjustment information of each node.
  6. 6. The method of claim 5, wherein obtaining a first system state value of the corresponding node within the target preset time period according to the error information, the delay information, and the resource usage information of each node of the system to be equalized, comprises: Acquiring a first resource utilization rate average value of the corresponding node according to the resource utilization rate in the resource utilization information of each node; and acquiring the first system state value of the corresponding node in the target preset time period according to the error information, the time delay information, the resource use information and the first resource use rate average value of each node.
  7. 7. The method of claim 6, wherein obtaining a first average value of resource usage of each of the nodes according to the resource usage in the resource usage information of the corresponding node comprises: Respectively carrying out sampling operation of CPU utilization rate of a central processing unit for a first sampling time on each node in the target preset time period to obtain a CPU utilization rate sampling value of each corresponding node, wherein the resource utilization rate comprises the CPU utilization rate; determining the ratio of the sum of the CPU utilization rate sampling values of the first sampling times to the first sampling times as a CPU utilization rate average value, wherein the first resource utilization rate average value comprises the CPU utilization rate average value; Respectively carrying out sampling operation of the memory usage rate of a second sampling frequency on each node in the target preset time period to obtain a memory usage rate sampling value of each corresponding node, wherein the resource usage rate comprises the memory usage rate; and determining the ratio of the sum of the memory usage sampling values of the second sampling times to the second sampling times as a memory usage average value, wherein the first resource usage average value comprises the memory usage average value.
  8. 8. The method of claim 6, wherein obtaining the first system state value of each of the nodes within the target preset time period based on the error information, the delay information, the resource usage information, and the first resource usage average value of the corresponding node comprises: Acquiring an error probability value of each node according to the error information and the total number of requests of the node, wherein the resource use information comprises the total number of requests; Acquiring a commit delay probability value of each node according to the number of commit delays of each node exceeding a first preset duration and the total number of requests, wherein the delay information comprises the number of commit delays; Acquiring a processing delay probability value of each node according to the processing delay times and the processing total times of each node exceeding a second preset duration, wherein the delay information comprises the processing delay times; And obtaining the corresponding first system state value of the node according to the products of the error probability value, the submitting delay probability value, the processing delay probability value and the first resource utilization rate average value of each node and the corresponding preset probability weight value.
  9. 9. The method of claim 5, wherein determining thread concurrency adjustment information for each of the nodes based on the first system state value for the corresponding node comprises: and when the first system state value of the target node in each node is in a first preset range, the thread concurrency number adjustment information is a first preset percentage for adjusting the concurrency number of the thread pool of the target node to a default value.
  10. 10. The method of claim 1, wherein determining the state adjustment information for the system to be equalized based on the first task characteristic information, further comprises: and under the condition that the node quantity adjusting information is an increased node, determining corresponding task quantity adjusting information of the node according to the resource using information of each node, wherein the state adjusting information comprises the task quantity adjusting information of the node and the node quantity adjusting information, and the first task characteristic information comprises the resource using information.
  11. 11. The method according to claim 10, wherein in the case where the node number adjustment information is an added node, determining task number adjustment information of the corresponding node according to resource usage information of each of the nodes includes: Configuring a resource weight value corresponding to the resource use information; acquiring an evaluation load value of each node according to the resource use information and the resource weight value of each node; Acquiring a node weight value of each node according to the evaluation load value and a historical node weight value of the corresponding node, wherein the historical node weight value is a node weight value of the node in a second preset time period, and the second preset time period is a preset time period which is adjacent to and is positioned before the target preset time period in the plurality of preset time periods; and determining the task quantity adjusting information of the corresponding nodes according to the node weight value of each node.
  12. 12. A load balancing apparatus, comprising: the first processing module is used for collecting first task characteristic information of each node of the system to be balanced in a target preset time period in a plurality of preset time periods through a sliding window; The first determining module is used for inputting the first task characteristic information into a time sequence prediction model and determining second task characteristic information of each node in a first preset time period, wherein the first preset time period is a preset time period which is adjacent to and is located after the target preset time period in the preset time periods; and the second determining module is used for determining the state adjustment information of the system to be balanced according to the first task characteristic information and the second task characteristic information.
  13. 13. Load balancing device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, characterized in that the load balancing method according to any of claims 1-11 is implemented when the program or instructions are executed by the processor.
  14. 14. A readable storage medium having stored thereon a program or instructions which when executed by a processor performs the steps in the load balancing method according to any one of claims 1-11.
  15. 15. Computer program product comprising computer instructions which, when executed by a processor, implement the steps of the load balancing method according to any one of claims 1-11.

Description

Load balancing method, device, equipment, medium and product Technical Field The invention relates to the technical field of the Internet of things, in particular to a load balancing method, a load balancing device, load balancing equipment, load balancing media and load balancing products. Background As traffic evolves and the volume of users grows, the traffic pressure faced by the system increases. If the system cannot effectively process the increased traffic, the system may run slowly, respond with delay or even downtime, and seriously affect the user experience and service continuity. In order to prevent the problems caused by the sudden increase of the flow, the current limiting technology is an important means for guaranteeing the stability and the usability of the system, each request is received and then sent to a downstream system, and the current use mode is four, namely, calling a third party interface to call in real time and not performing any caching process. And calling a third-party interface in real time, performing caching, and subsequently calling by using a thread pool. And dynamically expanding the server node according to the real-time concurrency of the service, but not considering the overall load balance of the system and the trend of future service call volume. And dynamically expanding the server nodes according to the real-time concurrency of the service and dynamically adjusting load balancing, but not considering concurrency pressure and performance bottleneck of a downstream third-party system. Disclosure of Invention The invention aims to provide a load balancing method, a load balancing device, load balancing equipment, load balancing media and load balancing products, which are used for solving the problem that the stability of a system is negatively affected by the increase of flow in the prior art. To achieve the above object, an embodiment of the present invention provides a load balancing method, including: Collecting first task characteristic information of each node of a system to be balanced in a target preset time period in a plurality of preset time periods through a sliding window; inputting the first task characteristic information into a time sequence prediction model, and determining second task characteristic information of each node in a first preset time period, wherein the first preset time period is a preset time period which is adjacent to and is positioned after the target preset time period in the plurality of preset time periods; And determining state adjustment information of the system to be balanced according to the first task characteristic information and the second task characteristic information. Optionally, the method inputs the first task characteristic information into a time sequence prediction model, determines second task characteristic information of each node in a first preset time period, including: respectively inputting the resource use information of each node of the system to be balanced into an autoregressive integrated moving average model to determine a first predicted value of the corresponding node, wherein the first task characteristic information comprises the resource use information; Respectively inputting the first predicted value of each node into a B-spline curve interpolation model to determine a second predicted value of the corresponding node, wherein the time sequence prediction model comprises the B-spline curve interpolation model; And adding the product of the first predicted value and the first weight value of each node to the product of the second predicted value and the second weight value to obtain the corresponding second task characteristic information of the node, wherein the second weight value is a difference value between 1 and the first weight value, the first weight value is obtained according to the historical first weight value of the node in a second preset time period and the resource use information, and the second preset time period is a preset time period which is adjacent to the target preset time period and is positioned before the target preset time period in the preset time periods. Optionally, the method, wherein obtaining the state adjustment information of the system to be balanced according to the second task characteristic information includes: and acquiring node quantity adjusting information of the system to be balanced according to the second task characteristic information, wherein the state adjusting information comprises the node quantity adjusting information. Optionally, the method, wherein obtaining the node number adjustment information of the system to be balanced according to the second task characteristic information includes: Setting a first experience threshold, a second experience threshold and a continuous detection frequency statistical threshold according to the service property of the system to be balanced, wherein the first experience threshold is larger than the