System server load distribution method and management system

By predicting the subsequent CPU usage rate of the server and adjusting the load distribution ratio, the problem of failure to consider the increase in server load in the prior art is solved, reasonable load allocation is achieved, and the processing capability of business requests is ensured.

CN119211243AInactive Publication Date: 2024-12-27ZHEJIANG FULIN TECH CO LTD

Patent Information

Application Number
CN202411715009.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art fails to consider the possible load increase of the server in the subsequent time when distributing the server load, resulting in the server's ability to handle business requests due to the increase in its own processing needs.

Method used

By collecting the CPU usage rate of the server, adjusting the trend judgment model to predict the CPU usage rate at subsequent time points, querying the load prediction table to determine the load distribution ratio, and sending load distribution task appointments to the target server to ensure reasonable load distribution.

Benefits of technology

It effectively avoids the server's own load increase affecting the service request processing capability, and realizes reasonable load allocation based on the subsequent time load increase.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211243A_ABST
    Figure CN119211243A_ABST
Patent Text Reader

Abstract

According to the system server load distribution method and the management system disclosed by the invention, the preset trend judgment model is adjusted according to the acquired CPU utilization rate of each historical time point, the CPU prediction utilization rate of the subsequent time point is predicted by using the adjusted trend judgment model, the load prediction table of each task server is inquired, and the load distribution of each task server is realized. Wherein the load prediction table records CPU prediction usage rates of the server in a subsequent set time period, a load distribution proportion is determined according to different CPU prediction usage rates of each task server in corresponding time, and the task server updates the load prediction table after receiving a load distribution task appointment. And after the corresponding time point is reached, the corresponding number of access requests are distributed to each task server according to the load distribution proportion. Therefore, the system can carry out reasonable load distribution according to the possible load increase condition of the server in the subsequent time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network systems, and more particularly to a system server load distribution method and management system. Background Technology

[0002] With the rapid growth of network traffic, to improve the processing capacity of business requests, multiple underlying servers can be interconnected to form a server cluster to handle a large number of business requests. Existing technical solutions use application management platforms to monitor servers, assess their current performance to determine their load capacity, and then distribute business requests to other servers according to their respective load balancing configurations. However, current application management platforms often only differentiate task distribution based on the current or near-current load status of each server, without considering potential increases in server load in the future. This can lead to a situation where, after receiving load distribution, a server's increased processing needs may affect its ability to handle business requests. Summary of the Invention

[0003] This invention addresses the shortcomings of existing technologies by providing a system server load distribution method, comprising the following steps: S1, collect the current CPU utilization of the server at preset time intervals; S2, based on the collected CPU utilization at each historical time point, adjust the preset trend judgment model, and use the adjusted trend judgment model to predict the CPU utilization at subsequent time points. If the predicted CPU utilization is greater than the first threshold, query other task servers that can accept load distribution. S3. Query the load prediction table of each task server. The load prediction table records the CPU prediction utilization rate of the server in a subsequent set time period. Determine the load distribution ratio based on the different CPU prediction utilization rates of each task server in the corresponding time period, and send a load distribution task reservation to the corresponding task server. The task server updates its load prediction table after receiving the load distribution task reservation. S4, upon reaching the corresponding time point, distributes the corresponding number of access requests to each task server according to the load distribution ratio.

[0004] Preferably, step S2 specifically includes: analyzing the CPU utilization rate at each time point collected, using the historical values ​​of CPU utilization rate in each continuous time series to calculate a linear regression model of the CPU utilization rate matching the server using the least squares method; and using the linear regression model to predict the CPU utilization rate at subsequent time points based on the historical values ​​of the corresponding CPU utilization rate.

[0005] Preferably, step S3 specifically includes: S31, query the load prediction table of each task server. The load prediction table records the CPU prediction utilization rate of the server in a subsequent set time period. The CPU prediction utilization rate consists of the task prediction utilization rate of the server and the predicted utilization rate of the received load distribution tasks. S32, obtain the duration of the load to be distributed and the predicted CPU utilization of each task server at each time point in the duration, and take the maximum value of the predicted CPU utilization at each time point in the duration as the predicted CPU utilization of the server in this time period. S33. Determine the load distribution ratio based on the predicted CPU utilization of each task server in this time period, and generate a load distribution task reservation to be sent to the corresponding task server; after receiving the load distribution task reservation, each task server generates the corresponding predicted utilization of the load distribution task and adds it to the load prediction table.

[0006] Preferably, step S2 specifically includes: determining whether the time point when the predicted CPU utilization rate is greater than the first threshold is within a set working period; if it is not within the set working period, load distribution is not performed and rate limiting is set for access requests made at the corresponding time points in the future; if it is within the set working period, other task servers that can accept load distribution are queried.

[0007] Preferably, step S2 specifically includes: if the access request is not within a set working period, no load distribution is performed; rate limiting is set for access requests made between subsequent corresponding time points, and a monitoring task is added. The monitoring task is configured to obtain access request permissions that trigger rate limiting operations; if the access request permissions are higher than the set value, the rate limiting operation is turned off; and when the CPU utilization of the current server being accessed exceeds a second threshold, the current CPU utilization and load prediction tables of the remaining task servers are queried, and task servers whose current CPU utilization and predicted CPU utilization in the subsequent set time period are both lower than a first threshold are selected as target servers; the load distribution ratio is determined based on the average of the current CPU utilization and the predicted CPU utilization in the subsequent set time period for each target server, and traffic is allocated to different target servers according to the load distribution ratio.

[0008] This invention also discloses a management system, comprising: a data acquisition module, used to acquire the CPU utilization of the current server at preset time intervals; a prediction module, used to adjust a preset trend judgment model based on the acquired CPU utilization at each historical time point, and use the adjusted trend judgment model to predict the CPU utilization at subsequent time points, wherein if the predicted CPU utilization is greater than a first threshold, other task servers capable of receiving load distribution are queried; a load allocation module, used to query the load prediction table of each task server, wherein the load prediction table records the predicted CPU utilization of the server in a subsequent set time period, determines the load distribution ratio based on the different predicted CPU utilization of each task server at the corresponding time, and sends a load distribution task reservation to the corresponding task server; the task server updates its load prediction table after receiving the load distribution task reservation; and a sending module, used to distribute a corresponding number of access requests to each task server according to the load distribution ratio after reaching the corresponding time point.

[0009] Preferably, the prediction module is further configured to analyze the CPU utilization rate at each time point collected, and use the historical values ​​of CPU utilization rate in each continuous time series to calculate a linear regression model of the CPU utilization rate matching the server using the least squares method; and use the linear regression model to predict the CPU utilization rate at subsequent time points based on the historical values ​​of the corresponding CPU utilization rate.

[0010] Preferably, the load distribution module specifically includes: a query module, used to query the load prediction table of each task server, the load prediction table recording the CPU prediction utilization of the server in a subsequent set time period, wherein the CPU prediction utilization is composed of the server's task prediction utilization and the predicted utilization of the received load distribution task; a utilization calculation module, used to obtain the duration of the load to be distributed and the CPU prediction utilization of each task server at each time point within the duration, and take the maximum value of the CPU prediction utilization at each time point within the duration as the CPU prediction utilization of the server in this time period; a ratio determination module, used to determine the load distribution ratio based on the CPU prediction utilization of each task server in this time period, and generate a load distribution task reservation to send to the corresponding task server; after receiving the load distribution task reservation, each task server generates the corresponding load distribution task prediction utilization and adds it to the load prediction table.

[0011] Preferably, the prediction module is further used to determine whether the time point when the predicted CPU utilization rate is greater than the first threshold is within a set working period. If it is not within the set working period, load distribution is not performed and rate limiting is set for access requests made at the corresponding time point in the future. If it is within the set working period, other task servers that can accept load distribution are queried.

[0012] Preferably, the prediction module is specifically configured to: not perform load distribution if the access is not within a set working period; and set rate limiting and add monitoring tasks for access requests made between subsequent corresponding time points. The monitoring task is configured to: obtain access request permissions that trigger rate limiting operations; if the access request permissions are higher than the set value, disable rate limiting operations; and when the CPU utilization of the current server being accessed exceeds a second threshold, query the current CPU utilization and load prediction table of the other task servers, and select task servers whose current CPU utilization and predicted CPU utilization in the subsequent set time period are both lower than a first threshold as target servers; determine the load distribution ratio based on the average of the current CPU utilization and the predicted CPU utilization in the subsequent set time period for each target server, and allocate traffic to different target servers according to the load distribution ratio.

[0013] This invention discloses a system server load distribution method and management system. It collects the CPU utilization of current servers at preset time intervals, adjusts a preset trend judgment model based on the collected CPU utilization at each historical time point, and uses the adjusted trend judgment model to predict the CPU utilization at subsequent time points. If the predicted CPU utilization exceeds a first threshold, it queries other task servers capable of receiving load distribution. It then queries the load prediction table of each task server, which records the predicted CPU utilization of each server within a subsequent set time period. Based on the different predicted CPU utilization of each task server at the corresponding time, it determines the load distribution ratio and sends a load distribution task reservation to the corresponding task server. Upon receiving the load distribution task reservation, the task server updates its load prediction table and, upon reaching the corresponding time point, distributes the corresponding number of access requests to each task server according to the load distribution ratio. This allows the system to reasonably allocate load based on potential increases in server load in subsequent times, preventing related servers from being affected by increased processing demands due to their own additional processing needs after receiving load distribution, thus ensuring their ability to handle business requests is not negatively impacted.

[0014] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention.

[0016] Figure 1 This is a schematic diagram illustrating the steps of a system server load distribution method disclosed in an embodiment of the present invention.

[0017] Figure 2 This is a schematic diagram illustrating the specific steps of step S3 disclosed in an embodiment of the present invention.

[0018] Figure 3 This is a schematic diagram illustrating the specific steps of step S2 disclosed in an embodiment of the present invention.

[0019] Figure 4 This is a schematic diagram of the structure of a management system disclosed in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0021] In this invention, unless otherwise expressly specified and limited, the technical or scientific terms used herein shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms "an" or "a," and similar terms, do not indicate a quantity limitation, but rather indicate the presence of at least one.

[0022] This embodiment discloses a system server load distribution method, such as... Figure 1 As shown, the steps may include the following.

[0023] Step S1: Collect the current CPU utilization of the server at preset time intervals. The CPU utilization can be obtained by reading relevant information from the operating system. In this embodiment, the CPU utilization, total system physical memory size, and current free physical memory size at each time point can be obtained from the device's operating system at set time intervals. The current memory occupancy rate is calculated based on the total system physical memory and the current free physical memory. A network interface monitoring tool is invoked to capture real-time network data packets, and the current network traffic value is calculated based on the obtained network data packets.

[0024] In this embodiment, the collected CPU utilization data can also be cleaned. The cleaned runtime status information at each time point is transformed, and the CPU utilization data is binned and aggregated to obtain structured raw collected data. The runtime status information at each time point is compared with a preset reasonable range of CPU utilization values, and those exceeding the reasonable range are removed as information errors.

[0025] Based on preset filling rules and CPU utilization information from adjacent time points, missing values ​​for one or more types of CPU utilization information at certain time points are supplemented. The collected CPU utilization data is deduplicated using unique identification information or timestamps. Missing data can be filled using the mean. Other missing value supplementation methods can also be set, such as filling with the mean of a set number of time points before and after, or filling with the maximum or minimum value, etc. The processed runtime status information containing CPU utilization at each time point is transformed into a row-column data structure containing multiple data fields. Each type of runtime status information is assigned to a corresponding data field. Preset aggregation rules for each type of runtime status information are queried, and the corresponding preset aggregation rules are used to bucket and aggregate each type of runtime status information according to the time series, obtaining structured raw collected data.

[0026] Step S2: Based on the collected CPU utilization rates at each historical time point, adjust the preset trend judgment model, and use the adjusted trend judgment model to predict the CPU utilization rate at subsequent time points. If the predicted CPU utilization rate is greater than the first threshold, query other task servers that can accept load distribution.

[0027] In this embodiment, step S2 may specifically include: analyzing the CPU utilization rate at each time point collected, using the historical CPU utilization rate values ​​in each continuous time series to calculate a linear regression model of the CPU utilization rate matching the server using the least squares method; and using the linear regression model to predict the predicted CPU utilization rate at subsequent time points based on the historical CPU utilization rate values.

[0028] In this embodiment, a linear regression model is used to predict a continuous target variable. The trend is determined by finding a linear relationship between the input and output variables. In a linear regression model, the goal is to find the best-fitting straight line to fit the given input data, thereby accurately predicting the trend.

[0029] In this embodiment, the target variable y is set to have a linear relationship with the input feature x, that is... We need to find the values ​​of β0 and β1 so that the model predicts... The goal is to minimize the error between the predicted and actual values ​​of y. The loss function used is least squares, which minimizes the sum of the squared errors between the predicted and actual values. ; Where n is the number of data points, y is the true value of the i-th data point, and the predicted value of the i-th data point is: .

[0030] By minimizing the above loss function, the parameters of the linear regression can be directly solved using the following formula: ; Where β0 is the slope and β1 is the intercept.

[0031] The following is a specific example: CPU utilization is collected every minute. The corresponding CPU utilization values ​​collected from 1 to 7 minutes are [20, 22, 21, 23, 24, 26, 27]. Based on this data, a linear model is built to predict the trend of CPU utilization in the next few minutes.

[0032] First, calculate the mean of the independent variable x (time) and the dependent variable y (CPU utilization): ; Calculate the slope β1 using the formula: ; Calculate the intercept β0: ; Constructing a linear regression equation: This linear regression equation represents the linear relationship between time x and CPU utilization y. This model can be used to predict CPU utilization trends over future time periods.

[0033] For example, predicting the CPU usage in the 8th minute as mentioned above: That is, the predicted CPU utilization at the 8th minute is approximately 38.85%. Finally, using the linear regression model described above, the predicted CPU utilization at subsequent time points can be obtained based on the CPU utilization obtained at each data collection time point.

[0034] In this embodiment, step S2 may further include: determining whether the time point when the predicted CPU utilization rate is greater than the first threshold falls within a set working period; if it does not fall within the set working period, load distribution is not performed and rate limiting is applied to access requests made at the corresponding time points thereafter; if it falls within the set working period, other task servers capable of accepting load distribution are queried. During non-working periods, the system can reduce access efficiency by implementing rate limiting and other measures to avoid impacting the usage of other servers.

[0035] Step S3: Query the load prediction table of each task server. The load prediction table records the CPU prediction utilization rate of the server in a subsequent set time period. Determine the load distribution ratio based on the different CPU prediction utilization rates of each task server at the corresponding time, and send a load distribution task reservation to the corresponding task server. After receiving the load distribution task reservation, the task server updates its load prediction table.

[0036] In this embodiment, as Figure 2 As shown, step S3 may specifically include the following:

[0037] Step S31: Query the load prediction table of each task server. The load prediction table records the CPU prediction utilization of the server in a subsequent set time period. The CPU prediction utilization consists of the task prediction utilization of the server and the predicted utilization of the received load distribution tasks.

[0038] Step S32: Obtain the duration of the load to be distributed and the predicted CPU utilization of each task server at each time point within the duration. Take the maximum value of the predicted CPU utilization at each time point within the duration as the predicted CPU utilization of the server in this time period.

[0039] Step S33: Determine the load distribution ratio based on the predicted CPU utilization of each task server during the current time period, and generate a load distribution task reservation to be sent to the corresponding task server; after receiving the load distribution task reservation, each task server generates the corresponding predicted load distribution task utilization and adds it to the load prediction table. That is, requests are distributed according to the load distribution ratio, and servers with higher ratios receive more requests.

[0040] Step S4: After reaching the corresponding time point, distribute the corresponding number of access requests to each task server according to the load distribution ratio.

[0041] In this embodiment, as Figure 3 As shown, step S2 may further include the following exception handling steps.

[0042] Step S101: If the access request is not within the set working time period, no load distribution will be performed, and rate limiting will be set and monitoring tasks will be added for the access requests made between the corresponding time points in the future. The monitoring task is configured to obtain the access request permission that triggers the rate limiting operation.

[0043] Step S102: If the access request permission is higher than the set value, the rate limiting operation is disabled. When the CPU utilization of the currently accessing server exceeds the second threshold, the current CPU utilization and load prediction tables of the remaining task servers are queried. Task servers whose current CPU utilization and predicted CPU utilization in the subsequent set time period are both lower than the first threshold are selected as target servers for this load distribution. The second threshold is higher than the first threshold. That is, if a task server's load prediction table shows that its predicted CPU utilization is higher than or equal to the first threshold at at least one time point within the subsequent set time period, it will not be selected as a target server for this load distribution.

[0044] Step S103: Determine the load distribution ratio based on the average of the current CPU utilization rate and the predicted CPU utilization rate of each target server within a subsequent set time period, and distribute traffic to different target servers according to the load distribution ratio.

[0045] In this embodiment, before implementing load distribution measures at the time points where CPU utilization is too high, abnormal data can be filtered and processed to more effectively implement subsequent load distribution measures. Specifically, this can include the following:

[0046] Based on the collected abnormal CPU utilization information, other types of operational status information values ​​at the same collection time point, and changes in CPU utilization information at adjacent collection time points, abnormal behavior attributes are predicted. According to the overload range of the abnormal behavior attributes and abnormal operational status information, corresponding response strategies are selected from the response strategy library and executed. Other types of operational status information include CPU utilization, memory usage, and network traffic values. Response strategies include sending warning notifications, executing corresponding preset automated scripts, setting traffic limits, and restarting the server, thereby avoiding initiating a load distribution process immediately upon detecting abnormal CPU utilization, which would consume server resources.

[0047] Specifically, this step may include the following:

[0048] If the CPU utilization exceeds the utilization threshold at a certain data collection time point, and the memory usage also exceeds the utilization threshold at that time point or at adjacent subsequent data collection time points, then query the network traffic value changes at that data collection time point and subsequent data collection time points. If the corresponding network traffic value gradually decreases, it is determined to be a memory overflow, and the memory defragmentation component is called to find objects or resources with low usage frequency and release them. If the CPU utilization and memory usage still exceed the corresponding thresholds in multiple subsequent data collection time points and the network traffic value continues to gradually decrease, then a load distribution request is sent to other task servers and the current server is restarted.

[0049] If the CPU utilization exceeds a threshold at a given data collection time point, and memory usage gradually increases at that time point or in subsequent data collection time points, the network traffic changes at that time point and subsequent data collection time points are queried. If the corresponding network traffic changes are within a reasonable range, the attribute information of the top-ranking task processes in terms of current CPU utilization is obtained. Based on the attribute information, the priority permissions of the corresponding task processes are queried, and task processes with priority permissions lower than a set value are terminated. If the corresponding network traffic increases beyond a first threshold, external network access requests at the corresponding data collection time point are obtained. The addresses and required data types of the top-ranking access requests in terms of upload network traffic are obtained. If the addresses are not in the trusted list, rate limiting is applied to them.

[0050] If the CPU utilization, memory usage, and network traffic values ​​at the same collection time point all exceed the corresponding thresholds, it is determined whether the current collection time is within a set working period. If it is within a set working period, the attribute information of multiple task processes occupying the top position of the current CPU utilization is queried, and the priority permissions of the corresponding task processes are queried according to the attribute information. Task processes with priority permissions lower than the set value are terminated. If it is not within a set working period, rate limiting is set for subsequent access requests.

[0051] The system server load distribution method disclosed in the above embodiments collects the current CPU utilization of the server at preset time intervals, adjusts a preset trend judgment model based on the collected CPU utilization at each historical time point, and uses the adjusted trend judgment model to predict the CPU utilization at subsequent time points. If the predicted CPU utilization is greater than a first threshold, other task servers capable of receiving load distribution are queried. The load prediction table of each task server is queried, and the load prediction table records the predicted CPU utilization of the server in a subsequent set time period. The load distribution ratio is determined based on the different predicted CPU utilization of each task server at the corresponding time, and a load distribution task reservation is sent to the corresponding task server. After receiving the load distribution task reservation, the task server updates its load prediction table and, upon reaching the corresponding time point, distributes the corresponding number of access requests to each task server according to the load distribution ratio. This allows the system to reasonably allocate load based on the potential increase in server load in subsequent times, preventing related servers from being affected by increased processing demands due to their own additional processing needs after receiving load distribution, thus ensuring their ability to handle business requests is not affected.

[0052] In another embodiment, such as Figure 4As shown, a management system is also disclosed, including a data acquisition module 1, a prediction module 2, a load distribution module 3, and a sending module 4. The data acquisition module 1 is used to collect the CPU utilization of the current server at preset time intervals. The prediction module 2 is used to adjust a preset trend judgment model based on the collected CPU utilization at each historical time point, and use the adjusted trend judgment model to predict the CPU utilization at subsequent time points. If the predicted CPU utilization is greater than a first threshold, other task servers capable of receiving load distribution are queried. The load distribution module 3 is used to query the load prediction table of each task server, which records the predicted CPU utilization of the server in a subsequent set time period. The load distribution ratio is determined based on the different predicted CPU utilization of each task server at the corresponding time, and a load distribution task reservation is sent to the corresponding task server. The task server updates its load prediction table after receiving the load distribution task reservation. The sending module 4 is used to distribute a corresponding number of access requests to each task server according to the load distribution ratio after reaching the corresponding time point.

[0053] In this embodiment, the prediction module 2 is also configured to analyze the CPU utilization rate at each time point collected, and use the historical values ​​of CPU utilization rate in each continuous time series to calculate a linear regression model of the CPU utilization rate matching the server using the least squares method; and use the linear regression model to predict the CPU utilization rate at subsequent time points based on the historical values ​​of the corresponding CPU utilization rate.

[0054] In this embodiment, the load distribution module 3 specifically includes: a query module, used to query the load prediction table of each task server, the load prediction table recording the CPU prediction utilization rate of the server in a subsequent set time period, wherein the CPU prediction utilization rate consists of the server's task prediction utilization rate and the received load distribution task prediction utilization rate; a utilization rate calculation module, used to obtain the duration of the load to be distributed and the CPU prediction utilization rate of each task server at each time point within the duration, and take the maximum value of the CPU prediction utilization rate at each time point within the duration as the CPU prediction utilization rate of the server in this time period; and a ratio determination module, used to determine the load distribution ratio based on the CPU prediction utilization rate of each task server in this time period, and generate a load distribution task reservation to be sent to the corresponding task server; after receiving the load distribution task reservation, each task server generates the corresponding load distribution task prediction utilization rate and adds it to the load prediction table.

[0055] In this embodiment, the prediction module 2 is also used to determine whether the time point when the predicted CPU utilization rate is greater than the first threshold is within the set working period. If it is not within the set working period, load distribution will not be performed and rate limiting will be set for access requests made at the corresponding time points in the future. If it is within the set working period, other task servers that can accept load distribution will be queried.

[0056] In this embodiment, the prediction module 2 is specifically configured to not perform load distribution if the access request is not within a set working period, and to set rate limiting and add monitoring tasks for access requests made between subsequent corresponding time points. The monitoring task is configured to obtain access request permissions that trigger rate limiting operations; if the access request permissions are higher than the set value, the rate limiting operation is turned off; and when the CPU utilization of the current server being accessed exceeds a second threshold, the current CPU utilization and load prediction table of the other task servers are queried, and task servers whose current CPU utilization and predicted CPU utilization in the subsequent set time period are both lower than the first threshold are selected as target servers; the load distribution ratio is determined based on the average of the current CPU utilization and the predicted CPU utilization in the subsequent set time period for each target server, and traffic is allocated to different target servers according to the load distribution ratio.

[0057] The specific functions of the above-described management system correspond one-to-one with the system server load distribution method disclosed in the preceding embodiments, therefore, they will not be described in detail here. For details, please refer to the embodiments of the previously disclosed system server load distribution method. It should be noted that the embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

[0059] In summary, the above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the present invention.

Claims

1. A system server load distribution method, characterized in that: The steps include: S1, collects the CPU usage of the current server at preset time intervals; S2, according to the CPU usage rate of each historical time point collected, adjusting the preset trend judgment model, using the adjusted trend judgment model to predict the CPU predicted usage rate at subsequent time points, and querying other task servers that can accept load distribution if the CPU predicted usage rate is greater than the first threshold; S3, querying the load prediction table of each task server, the load prediction table records the CPU predicted usage rate of each server in a subsequent set time period, determining the load distribution ratio according to the different CPU predicted usage rates of each task server at the corresponding time, and sending a load distribution task reservation to the corresponding task server; The task server updates its load prediction table after receiving the load distribution task reservation; S4: After reaching the corresponding time point, a corresponding number of access requests are distributed to each task server according to the load distribution ratio.

2. The system server load distribution method according to claim 1, characterized in that: The step S2 specifically includes: Analyze the CPU usage at each collected time point, and use the historical values ​​of CPU usage in each continuous time series to calculate a linear regression model that matches the CPU usage of the server through the least squares method; use the linear regression model to predict the CPU predicted usage at subsequent time points based on the historical values ​​of the corresponding CPU usage.

3. The system server load distribution method according to claim 2, characterized in that: The step S3 specifically includes: S31, querying the load prediction table of each task server, wherein the load prediction table records the CPU prediction usage rate of the server in a subsequent set time period, wherein the CPU prediction usage rate is composed of the task prediction usage rate of the server and the received load distribution task prediction usage rate; S32, obtaining the duration of the load to be distributed and the predicted CPU usage of each task server at each time point in the duration, and taking the maximum value of the predicted CPU usage at each time point in the duration as the predicted CPU usage of the server in this time period; S33, determine the load distribution ratio according to the predicted CPU usage of each task server in this time period, and generate a load distribution task reservation and send it to the corresponding task server; after receiving the load distribution task reservation, each task server generates a corresponding load distribution task predicted usage rate and adds it to the load prediction table.

4. The system server load distribution method according to claim 3, characterized in that: The step S2 specifically includes: Determine whether the time point when the CPU predicted usage rate is greater than the first threshold is within the set working period. If it is not within the set working period, no load distribution is performed and a flow limit is set for access requests made at subsequent corresponding time points; if it is within the set working period, query other task servers that can accept load distribution.

5. The system server load distribution method according to claim 4, characterized in that: The step S2 specifically includes: If it is not within the set working period, no load distribution is performed, and a flow limit setting and a monitoring task are added for the access requests made between the subsequent corresponding time points, and the monitoring task is configured to obtain the access request permission that triggers the flow limit operation; If the access request permission is higher than the set value, the current limiting operation is closed, and when the CPU usage of the current server being accessed exceeds the second threshold, the current CPU usage and load prediction table of the remaining task servers are queried, and the task servers whose current CPU usage and the CPU prediction usage in the subsequent set time period are both lower than the first threshold are taken as target servers; The load distribution ratio is determined according to the current CPU usage of each target server and the average value of the predicted CPU usage in a subsequent set time period, and the traffic is distributed to different target servers according to the load distribution ratio.

6. A management system, characterized in that: include: The collection module is used to collect the CPU usage of the current server at preset time intervals; A prediction module is used to adjust a preset trend judgment model according to the CPU usage rate at each historical time point collected, and use the adjusted trend judgment model to predict the CPU predicted usage rate at a subsequent time point, and query other task servers that can accept load distribution if the CPU predicted usage rate is greater than a first threshold; A load distribution module is used to query the load prediction table of each task server, which records the CPU predicted usage rate of each server in a subsequent set time period, determine the load distribution ratio according to the different CPU predicted usage rates of each task server at the corresponding time, and send a load distribution task reservation to the corresponding task server; The task server updates its load prediction table after receiving the load distribution task reservation; The sending module is used to distribute a corresponding number of access requests to each task server according to the load distribution ratio after reaching the corresponding time point.

7. The management system according to claim 6, characterized in that: The prediction module is also configured to analyze the collected CPU usage at each time point, and use the historical values ​​of the CPU usage in each continuous time series to calculate a linear regression model that matches the CPU usage of the server through the least squares method; and use the linear regression model to predict the CPU predicted usage at subsequent time points based on the historical values ​​of the corresponding CPU usage.

8. The management system according to claim 7, characterized in that: The load distribution module specifically includes: A query module is used to query the load prediction table of each task server, wherein the load prediction table records the CPU prediction usage rate of each server in a subsequent set time period, wherein the CPU prediction usage rate is composed of the task prediction usage rate of the server and the received load distribution task prediction usage rate; A usage calculation module is used to obtain the duration of the load to be distributed and the CPU predicted usage of each task server at each time point in the duration, and take the maximum value of the CPU predicted usage at each time point in the duration as the CPU predicted usage of the server in this time period; The ratio determination module is used to determine the load distribution ratio according to the predicted CPU usage of each task server in this time period, and generate a load distribution task reservation and send it to the corresponding task server; after receiving the load distribution task reservation, each task server generates the corresponding load distribution task predicted usage rate and adds it to the load prediction table.

9. The management system according to claim 8, characterized in that: The prediction module is also used to determine whether the time point when the CPU predicted usage rate is greater than the first threshold is within the set working period. If it is not within the set working period, load distribution will not be performed and current limiting will be set for access requests made at subsequent corresponding time points; if it is within the set working period, other task servers that can accept load distribution will be queried.

10. The management system according to claim 9, characterized in that: The prediction module is specifically configured to not perform load distribution if it is not within the set working period, and to set flow limiting and add monitoring tasks for access requests made between subsequent corresponding time points, and the monitoring tasks are configured to obtain access request permissions that trigger flow limiting operations; if the access request permissions are higher than the set value, the flow limiting operation is closed, and when the CPU usage of the current server being accessed exceeds the second threshold, the current CPU usage and load prediction tables of the remaining task servers are queried, and the task servers whose current CPU usage and the CPU predicted usage in the subsequent set time period are both lower than the first threshold are taken as target servers; the load distribution ratio is determined based on the average value of the current CPU usage and the CPU predicted usage in the subsequent set time period of each target server, and the traffic is distributed to different target servers based on the load distribution ratio.

Citation Information

Patent Citations

  • Scheduling method for virtual machine online shifting

    CN106201700A

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

    CN107196869A

  • Server performance prediction method and device, computer system and medium

    CN111897706A

  • Cross-region-oriented flow calculation delay optimization method and device

    CN114816715A

  • Data online distribution method and device, equipment, medium and product

    CN116192860A

Cited By

  • Remote task issuing management method and system

    CN120711014A