Method and device for formulating elastic expansion strategy, equipment, medium and product

By using machine learning models to predict server load and combining performance indicator thresholds, elastic scaling strategies are formulated, which solves the problem of low efficiency in the formulation of elastic scaling strategies in the existing technology, and improves server load adjustment efficiency and service quality.

CN119645636APending Publication Date: 2025-03-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411717393.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing elastic scaling strategy formulation methods are inefficient, resulting in low server load adjustment efficiency, inability to adapt to business load changes in time, affecting service quality and efficiency.

Method used

By obtaining the load-time change curve of the target server, the machine learning model is trained to generate a load prediction model, the performance metric curve set is calculated to determine the upper and lower load limit thresholds, and finally a flexible scaling strategy is developed based on the predicted load curve and threshold.

Benefits of technology

It improves the efficiency of formulating elastic scaling strategies, enhances the efficiency of adjusting server loads, ensures that services can adapt to load changes in a timely manner, and improves service quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645636A_ABST
    Figure CN119645636A_ABST
Patent Text Reader

Abstract

The invention discloses an elastic expansion strategy making method and device, equipment, a medium and a product. The method comprises the following steps: acquiring at least one load-time change curve of a target server in a sampling time period, and training a preset machine learning model by using each load-time change curve to obtain a load prediction model; obtaining a performance index curve set of a target server, and calculating according to the performance index curve set to obtain a load upper limit threshold value and a load lower limit threshold value of the target server; and obtaining a predicted load curve of a target time period through the load prediction model, and obtaining an elastic scaling strategy matched with the target server according to the predicted load curve, a load upper limit threshold value and a load lower limit threshold value. Through the technical scheme of the invention, the formulation of the elastic scaling strategy for the server load can be realized, the formulation efficiency of the elastic scaling strategy is improved, and the adjustment efficiency of the server load is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing, and in particular to a method, device, equipment, medium and product for formulating an elastic scaling strategy. Background Art

[0002] With the rapid development of Internet technology, microservice architecture has been widely used in business processing, the scale of many businesses has been continuously expanded, and the load has been rising steadily. In view of the fluctuations in business volume, the microservice architecture has an increasingly urgent need to dynamically adjust server resources to meet different load requirements and improve service quality.

[0003] At present, the common strategies for cluster elastic scaling are mainly implemented through manual adjustment and preset thresholds. In specific operations, it is necessary to obtain the actual value of the load in real time to decide whether to adjust the number of service instances. For example, when the business volume increases, if the actual value of the load can be obtained in real time, the application support staff can manually increase the number of service instances; when the business volume decreases, it is also necessary to obtain the actual value of the load in real time and then manually reduce the number of service instances. At the same time, the automatic adjustment method based on the preset threshold also relies on the real-time acquisition of the actual value of the load to trigger.

[0004] However, the existing technology has significant defects. If the actual load value cannot be obtained in real time, the load adjustment cannot be completed. This often faces many difficulties in practical applications. For example, factors such as network delays and data collection failures may lead to the inability to obtain accurate actual load values ​​in a timely manner, which makes it difficult to effectively implement elastic scaling strategies and unable to adapt to changes in business loads in a timely manner, seriously affecting the quality and efficiency of services. In summary, the existing elastic scaling strategy formulation method has the problem of low elastic strategy formulation efficiency, resulting in low server load adjustment efficiency. Summary of the invention

[0005] The present invention provides a method, device, equipment, medium and product for formulating an elastic scaling strategy, which can solve the problem that the existing elastic strategy formulation for server load is inefficient, resulting in low efficiency in adjusting server load.

[0006] In a first aspect, an embodiment of the present invention provides a method for formulating an elastic scaling policy, the method comprising:

[0007] Obtain at least one load-time variation curve of the target server within a sampling period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein each load-time variation curve corresponds to the same sampling time axis but different sampling dates;

[0008] Obtaining a performance indicator curve set of the target server, and calculating an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set;

[0009] A predicted load curve for a target time period is obtained through the load prediction model, and an elastic scaling strategy matching the target server is obtained according to the predicted load curve, an upper load threshold and a lower load threshold.

[0010] In a second aspect, an embodiment of the present invention provides a device for formulating an elastic scaling strategy, the device comprising:

[0011] A load prediction model training module is used to obtain at least one load-time variation curve of the target server within a sampling period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein each load-time variation curve corresponds to the same sampling time axis but different sampling dates;

[0012] A load threshold calculation module is used to obtain a performance indicator curve set of a target server, and calculate an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set;

[0013] The strategy generation module is used to obtain the predicted load curve of the target time period through the load prediction model, and obtain the elastic scaling strategy matching the target server according to the predicted load curve, the upper load threshold and the lower load threshold.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for formulating an elastic scaling policy described in any embodiment of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for formulating an elastic scaling strategy described in any embodiment of the present invention when executed.

[0019] In a fifth aspect, an embodiment of the present invention provides a computer program product, the computer program product comprising a computer program, the computer program when executed by a processor implements a method for formulating an elastic scaling strategy as described in any embodiment of the present invention

[0020] The technical solution of the embodiment of the present invention obtains at least one load-time variation curve of the target server within a sampling time period, and uses each load-time variation curve to train a pre-set machine learning model to obtain a load prediction model, then obtains a performance indicator curve set of the target server, and calculates the load upper threshold and load lower threshold of the target server based on the performance indicator curve set, and finally obtains the predicted load curve of the target time period through the load prediction model, and obtains an elastic scaling strategy matching the target server based on the predicted load curve, the load upper threshold and the load lower threshold, thereby solving the problem of low efficiency in formulating existing elastic strategies for server loads, realizing the formulation of elastic scaling strategies for server loads, improving the efficiency of formulating elastic scaling strategies, and thereby improving the adjustment efficiency of server loads.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flow chart of a method for formulating an elastic scaling strategy provided according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flow chart of a method for formulating an elastic scaling strategy provided according to Embodiment 2 of the present invention;

[0025] Figure 3 is a structural schematic diagram of a device for formulating an elastic scaling strategy provided according to Embodiment 3 of the present invention;

[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing a method for formulating an elastic scaling strategy according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variation of the terms "including" and "having" is intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1 A flowchart of a method for formulating an elastic scaling policy provided in Example 1 of the present invention. This embodiment is applicable to the situation where an elastic scaling policy is formulated for a server load. The method can be executed by a device for formulating an elastic scaling policy. The device for formulating an elastic scaling policy can be implemented in the form of hardware and / or software. The device for formulating an elastic scaling policy can be configured in a terminal or server with an elastic scaling policy formulation function.

[0031] like Figure 1 As shown, the method includes:

[0032] S110. Obtain at least one load-time variation curve of the target server within a sampling time period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model.

[0033] Among them, the sampling time axis corresponding to each load-time variation curve is the same, but the sampling date is different.

[0034] Furthermore, the machine learning model can be used to automatically learn patterns, rules and features from large amounts of data, and can perform prediction, classification, clustering or other tasks on new data based on the learned knowledge. In this embodiment, the machine learning model can be specifically a linear regression model, a decision tree model, a support vector machine model or a neural network model; further, the load refers to the amount of work or resource usage undertaken by the server, such as CPU utilization, memory utilization, network bandwidth occupancy, etc., and the time change curve is a graphical display of the changes in load over time.

[0035] Specifically, each load-time variation curve is used to train a pre-set machine learning model to obtain a load prediction model, including: extracting the time axis of each load-time variation curve respectively; forming a training sample set according to each load-time variation curve and a time axis matching each load-time variation curve, wherein the load-time variation curve is used as labeled data in the training sample; and using the training sample set to train the machine learning model to obtain a load prediction model.

[0036] In a specific implementation of this embodiment, for example, if one day is used as the sampling time period, the load-time variation curves for each day of the week may be obtained. The sampling time axes corresponding to these curves are the same, that is, they are all from 0:00 to 24:00 on the same day, but the sampling dates are different, such as Monday to Sunday. Then, each load-time variation curve is used to train the pre-set machine learning model to obtain a load prediction model. Specifically, first, the time axis of each load-time variation curve is extracted respectively. Next, a training sample set is formed according to each load-time variation curve and the time axis matching each load-time variation curve. Here, the load-time variation curve is used as the annotation data in the training sample, that is, it is used to tell the machine learning model the actual load situation at a specific time point. Finally, this training sample set is used to train the machine learning model. After repeated learning and optimization, a load prediction model that can accurately predict the server load is finally obtained.

[0037] S120: Obtain a performance indicator curve set of the target server, and calculate an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set.

[0038] Among them, the performance indicator curve set includes at least one performance indicator curve group, and the number of performance indicator curve groups is consistent with the number of load-time change curves. The performance indicator curve group includes the CPU utilization-time curve, memory utilization-time curve, disk I / O rate-time curve and network bandwidth utilization-time curve of the target server within the sampling time period.

[0039] Specifically, in the formulation of elastic scaling strategies, it is necessary to obtain a set of performance indicator curves for the target server. The performance indicators here refer to various parameters and metrics that can reflect the server's operating status and workload. For example, CPU usage indicates the proportion of CPU usage; memory usage reflects the usage of memory resources; disk I / O rate reflects the speed of disk reading and writing; and network bandwidth usage shows the proportion of network transmission data occupied.

[0040] The performance indicator curve set includes at least one performance indicator curve group, and the number of performance indicator curve groups is the same as the number of load-time change curves. Each performance indicator curve group covers the CPU usage-time curve, memory usage-time curve, disk I / O rate-time curve and network bandwidth usage-time curve of the target server in the sampling time period. For example, if the sampling time period is one hour and the performance indicator curves of each day in a week are obtained, there will be seven performance indicator curve groups. In each curve group, the CPU usage-time curve may show the high and low changes of CPU usage at different times of the day, such as reaching a peak of 80% at 10 am; the memory usage-time curve may show that the memory usage suddenly rises to 70% at 3 pm; the disk I / O rate-time curve can reflect that the disk read and write speed is faster at 12 noon; the network bandwidth usage-time curve shows that the network bandwidth usage reaches 60% at 8 pm. By comprehensively analyzing and calculating these rich performance indicator curves, the upper and lower load thresholds of the target server are obtained. The upper load threshold is the maximum load that the server can bear. Exceeding this threshold may cause the server performance to seriously degrade or even crash. The lower load threshold is the minimum load level required for the server to maintain normal operation. Below this threshold may cause resource waste. In this way, the server load range can be determined more accurately, providing important basis and guidance for subsequent elastic scaling strategies.

[0041] S130. Obtain a predicted load curve for a target time period through the load prediction model, and obtain an elastic scaling strategy that matches the target server according to the predicted load curve, an upper load threshold, and a lower load threshold.

[0042] Among them, obtaining the predicted load curve of the target time period through the load prediction model includes: extracting the target time axis of the target time period in response to the user's target time period determination operation; inputting the target time axis into the load prediction model to obtain the predicted load curve of the target time period.

[0043] Furthermore, an elastic scaling strategy matching the target server is obtained according to the predicted load curve, the load upper threshold and the load lower threshold, including: judging whether there is at least one upper time point and / or lower time point in the predicted load curve, the load value corresponding to the upper time point is greater than the load upper threshold, and the load value corresponding to the lower time point is less than the load lower threshold; if there is an upper time point, generating a load expansion instruction based on the upper time point; if there is a lower time point, generating a load reduction instruction based on the lower time point; and aggregating and storing each load expansion instruction and load reduction instruction to obtain an elastic scaling strategy matching the target server.

[0044] In a specific implementation scenario of this embodiment, exemplarily, in the formulation process of the elastic scaling strategy, the predicted load curve of the target time period is first obtained through the load prediction model. After the user determines the target time period, the system will respond to this operation and extract the target time axis of the target time period. For example, if the target time period set by the user is the next 48 hours, the time axis corresponding to these 48 hours will be extracted. Then the target time axis is input into the load prediction model, and the predicted load curve of the target time period is obtained after calculation and analysis by the model. Then, the elastic scaling strategy matching the target server is determined according to the predicted load curve, the upper load threshold and the lower load threshold. The "upper load threshold" refers to the maximum load that the server can bear. If this value is exceeded, the server may experience a sharp drop in performance or even failure. The "lower load threshold" is the minimum load required for the server to maintain normal operation. If it is lower than this value, it will cause resource waste. For example, the CPU usage of the server is less than 20% and may be considered to be lower than the lower load threshold. Specifically, it is necessary to determine whether there is at least one upper limit time point and / or lower limit time point in the predicted load curve. The load value corresponding to the upper limit time point is greater than the upper load threshold, and the load value corresponding to the lower limit time point is less than the lower load threshold. If there is an upper limit time point, a load expansion instruction will be generated based on it, such as increasing the number of server instances or improving server configuration. If there is a lower limit time point, a load reduction instruction will be generated based on it, such as reducing the number of server instances or lowering server configuration. Finally, each load expansion instruction and load reduction instruction are aggregated and stored to form a complete set of elastic scaling policies that match the target server. In this way, through accurate prediction and scientific judgment, an effective strategy that adapts to changes in server load can be formulated to ensure the stable operation of the server and the rational use of resources.

[0045] The technical solution of the embodiment of the present invention obtains at least one load-time variation curve of the target server within a sampling time period, and uses each load-time variation curve to train a pre-set machine learning model to obtain a load prediction model, then obtains a performance indicator curve set of the target server, and calculates the load upper threshold and load lower threshold of the target server based on the performance indicator curve set, and finally obtains the predicted load curve of the target time period through the load prediction model, and obtains an elastic scaling strategy matching the target server based on the predicted load curve, the load upper threshold and the load lower threshold, thereby realizing the formulation of an elastic scaling strategy for the server load, improving the efficiency of formulating the elastic scaling strategy, and thereby improving the adjustment efficiency of the server load.

[0046] Embodiment 2

[0047] Figure 2 A flowchart of a method for formulating an elastic scaling strategy provided in Example 2 of the present invention. This embodiment is refined based on the above-mentioned embodiment. In this embodiment, the method for calculating the upper and lower load thresholds of the target server based on the performance indicator curve set is specifically refined.

[0048] like Figure 2 As shown, the method includes:

[0049] S210. Obtain at least one load-time variation curve of the target server within a sampling time period, and use each load-time variation curve to train a pre-set machine learning model to obtain a load prediction model.

[0050] S220: Obtain a performance indicator curve set of the target server, and form a training sample set according to each load-time variation curve and each performance indicator curve group.

[0051] The load-time variation curve is used as labeling data in training samples.

[0052] Specifically, in the process of formulating elastic scaling strategies, it is necessary to obtain the performance indicator curve set of the target server. The "performance indicator curve set" refers to a set of curves that reflect the operating status and load of the target server. For example, it includes curves of the CPU usage, memory usage, disk I / O rate, network bandwidth usage and other performance indicators of the server in different time periods. Taking CPU usage as an example, its curve may show that the usage is high at certain times of the day, reaching 80% or even 90%, while the usage drops to about 20% at night; the memory usage curve may show that the memory usage is close to 100% during business peak hours, and only 30% during trough hours. Then, a training sample set is formed based on each load-time change curve and each performance indicator curve group. The "load-time change curve" is a curve that describes the dynamic changes of server load over time, such as the changes of load indicators such as the number of requests processed by the server and data throughput at different time points in a day. These load-time change curves are used as labeled data in training samples. The role of labeled data is to provide clear goals and standards for machine learning models so that the model can learn the relationship between different performance indicator curves and loads. For example, if the load-time curve shows that the server load increases sharply between 10 and 11 a.m., and the corresponding CPU usage curve also reaches a peak and the memory usage curve increases rapidly, then the model can learn the corresponding pattern between this load change and performance indicator change, so that it can more accurately predict future load conditions and make effective elastic scaling decisions. The training sample set formed in this way provides a solid data foundation for the subsequent construction of accurate load prediction models and the formulation of reasonable elastic scaling strategies.

[0053] S230: Use the training sample set to train the preset cluster analysis model to obtain a load calculation model.

[0054] The load calculation model is used to calculate the current load of the server according to the performance indicator information of the target server.

[0055] Exemplarily, in the formulation of elastic scaling strategies, a training sample set is used to train a preset clustering analysis model to obtain a load calculation model. A "clustering analysis model" is a data analysis method that can cluster similar data points in a data set together to form different categories or clusters. For example, in the scenario of server load, the clustering analysis model can divide the operating status of the server into different categories such as high load, medium load and low load according to different load characteristics and performance indicator data. This preset clustering analysis model is repeatedly trained and optimized by using a training sample set. The training sample set contains a large amount of server performance indicator data and corresponding load condition annotations. The load calculation model is a model obtained after training that can accurately calculate the current load of the target server based on its performance indicator information. For example, it can comprehensively calculate the current load level of the server based on the real-time data of performance indicators such as the server's CPU utilization, memory utilization, disk I / O speed, and network bandwidth utilization. Assuming that the target server's CPU usage is 70%, memory usage is 50%, disk I / O speed is at a medium level, and network bandwidth usage is 40%, the load calculation model will comprehensively consider the values ​​of these performance indicators and the relationship between them to calculate that the server is currently in a medium load state. The load calculation model obtained in this way can provide a key load evaluation basis for the server's elastic scaling decision, ensuring that the server can flexibly adjust resources according to the actual load situation to ensure the stability and efficiency of the service.

[0056] S240: Calculate an upper load threshold and a lower load threshold of the target server based on the load calculation model.

[0057] Among them, the load upper limit threshold and load lower limit threshold of the target server are calculated based on the load calculation model, including: obtaining a pre-set maximum indicator threshold set, the maximum performance threshold includes a maximum CPU usage threshold, a maximum memory usage threshold, a maximum disk I / O rate threshold and a maximum network bandwidth usage threshold; inputting the maximum performance threshold into the load calculation model to obtain the load upper limit threshold of the target server; obtaining a pre-set minimum performance threshold set, the minimum performance threshold set includes a minimum CPU usage threshold, a minimum memory usage threshold, a minimum disk I / O rate threshold and a minimum network bandwidth usage threshold; inputting the minimum performance threshold into the load calculation model to obtain the load lower limit threshold of the target server.

[0058] Specifically, first obtain the preset maximum indicator threshold set. The "maximum performance threshold" here includes the maximum threshold of CPU usage, the maximum threshold of memory usage, the maximum threshold of disk I / O rate, and the maximum threshold of network bandwidth usage. For example, the maximum threshold of CPU usage may be set to 85%, which means that when the CPU usage exceeds 85%, the server may face a performance bottleneck; the maximum threshold of memory usage may be 90%, exceeding this value may lead to insufficient memory; the maximum threshold of disk I / O rate is, for example, 100MB per second, exceeding it may affect the data reading and writing speed; the maximum threshold of network bandwidth usage is assumed to be 80%, exceeding it may cause network congestion. Then input these maximum performance thresholds into the load calculation model, and obtain the upper limit threshold of the load of the target server through analysis and calculation of the model. Next, obtain the preset minimum performance threshold set, which includes the minimum threshold of CPU usage, the minimum threshold of memory usage, the minimum threshold of disk I / O rate, and the minimum threshold of network bandwidth usage. For example, the minimum threshold of CPU utilization may be set to 10%. A value lower than this may indicate that CPU resources are not fully utilized; the minimum threshold of memory utilization may be 20%. A value lower than this may indicate that memory is idle; the minimum threshold of disk I / O rate may be 5MB per second, for example. A value lower than this may mean that disk performance is not fully utilized; the minimum threshold of network bandwidth utilization is assumed to be 10%. A value lower than this may indicate a waste of network resources. Finally, these minimum performance thresholds are input into the load calculation model to obtain the lower limit threshold of the target server's load. Through such precise calculation and setting, an accurate threshold basis can be provided for the elastic scaling of the server, ensuring that the server runs efficiently and stably within a reasonable load range.

[0059] S250: Obtain a predicted load curve for a target time period through the load prediction model, and obtain an elastic scaling strategy that matches the target server based on the predicted load curve, an upper load threshold, and a lower load threshold.

[0060] The technical solution of the embodiment of the present invention obtains at least one load-time variation curve of the target server within a sampling time period, and uses each load-time variation curve to train a preset machine learning model to obtain a load prediction model, then obtains a performance indicator curve set of the target server, and forms a training sample set according to each load-time variation curve and each performance indicator curve group, wherein the load-time variation curve is used as the annotation data in the training sample, and then uses the training sample set to train a preset clustering analysis model to obtain a load calculation model, and calculates the load upper limit threshold and load lower limit threshold of the target server based on the load calculation model, and finally obtains the predicted load curve of the target time period through the load prediction model, and obtains the elastic scaling strategy matching the target server according to the predicted load curve, the load upper limit threshold and the load lower limit threshold, thereby realizing the formulation of an elastic scaling strategy for the server load, improving the efficiency of formulating the elastic scaling strategy, and thereby improving the adjustment efficiency of the server load.

[0061] Embodiment 3

[0062] Figure 3 This is a schematic diagram of the structure of a device for formulating an elastic scaling strategy provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0063] The load prediction model training module 310 is used to obtain at least one load-time variation curve of the target server within the sampling time period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein the sampling time axis corresponding to each load-time variation curve is the same, but the sampling date is different;

[0064] The load threshold calculation module 320 is used to obtain a performance indicator curve set of the target server, and calculate the upper load threshold and the lower load threshold of the target server according to the performance indicator curve set;

[0065] The strategy generation module 330 is used to obtain a predicted load curve for a target time period through the load prediction model, and obtain an elastic scaling strategy matching the target server according to the predicted load curve, an upper load threshold and a lower load threshold.

[0066] The technical solution of the embodiment of the present invention obtains at least one load-time variation curve of the target server within a sampling time period, and uses each load-time variation curve to train a pre-set machine learning model to obtain a load prediction model, then obtains a performance indicator curve set of the target server, and calculates the load upper threshold and load lower threshold of the target server based on the performance indicator curve set, and finally obtains the predicted load curve of the target time period through the load prediction model, and obtains an elastic scaling strategy matching the target server based on the predicted load curve, the load upper threshold and the load lower threshold, thereby realizing the formulation of an elastic scaling strategy for the server load, improving the efficiency of formulating the elastic scaling strategy, and thereby improving the adjustment efficiency of the server load.

[0067] Based on the above embodiment, the load prediction model training module 310 includes:

[0068] A time axis extraction unit, used to extract the time axis of each load-time variation curve respectively;

[0069] A first sample set generating unit, configured to form a training sample set according to each load-time variation curve and a time axis matching each load-time variation curve, wherein the load-time variation curve is used as annotation data in the training sample;

[0070] The first model training unit is used to train the machine learning model using the training sample set to obtain a load prediction model.

[0071] Based on the above embodiment, the load threshold calculation module 320 includes:

[0072] A second sample set generating unit, configured to form a training sample set according to each load-time variation curve and each performance indicator curve group, wherein the load-time variation curve is used as the annotation data in the training sample;

[0073] A second model training unit is used to train a preset cluster analysis model using a training sample set to obtain a load calculation model, wherein the load calculation model is used to calculate a current load of the server according to performance indicator information of the target server;

[0074] A threshold calculation unit is used to calculate the upper load threshold and the lower load threshold of the target server based on the load calculation model.

[0075] Based on the above embodiment, the threshold calculation unit includes:

[0076] A maximum data acquisition unit is used to acquire a preset maximum indicator threshold set, wherein the maximum performance threshold includes a maximum CPU usage threshold, a maximum memory usage threshold, a maximum disk I / O rate threshold, and a maximum network bandwidth usage threshold;

[0077] An upper limit calculation unit, used for inputting the maximum performance threshold into a load calculation model to obtain a load upper limit threshold of a target server;

[0078] A minimum data acquisition unit is used to acquire a preset minimum performance threshold set, wherein the minimum performance threshold set includes a CPU usage minimum threshold, a memory usage minimum threshold, a disk I / O rate minimum threshold, and a network bandwidth usage minimum threshold;

[0079] The lower limit calculation unit is used to input the minimum performance threshold into the load calculation model to obtain the load lower limit threshold of the target server.

[0080] Based on the above embodiment, the strategy generation module 330 includes:

[0081] A target time axis extraction unit, configured to extract a target time axis of the target time period in response to a user's target time period determination operation;

[0082] The load curve acquisition unit is used to input the target time axis into the load prediction model to obtain the predicted load curve of the target time period.

[0083] Based on the above embodiment, the strategy generation module 330 further includes:

[0084] a judging unit, configured to judge whether there is at least one upper limit time point and / or lower limit time point in the predicted load curve, the load value corresponding to the upper limit time point being greater than the upper load threshold, and the load value corresponding to the lower limit time point being less than the lower load threshold;

[0085] A first instruction generating unit, configured to generate a load extension instruction based on the upper limit time point if an upper limit time point exists;

[0086] A second instruction generating unit, configured to generate a load reduction instruction based on the lower limit time point if there is a lower limit time point;

[0087] The aggregation storage unit is used to aggregate and store each load expansion instruction and each load reduction instruction to obtain an elastic scaling strategy that matches the target server.

[0088] An elastic scaling strategy formulation device provided in an embodiment of the present invention can execute an elastic scaling strategy formulation method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0089] Embodiment 4

[0090] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0091] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0092] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0093] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for formulating an elastic scaling strategy.

[0094] Accordingly, the method comprises:

[0095] Obtain at least one load-time variation curve of the target server within a sampling period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein each load-time variation curve corresponds to the same sampling time axis but different sampling dates;

[0096] Obtaining a performance indicator curve set of the target server, and calculating an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set;

[0097] A predicted load curve for a target time period is obtained through the load prediction model, and an elastic scaling strategy matching the target server is obtained according to the predicted load curve, an upper load threshold and a lower load threshold.

[0098] In some embodiments, a method for formulating an elastic scaling strategy may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for formulating an elastic scaling strategy described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for formulating an elastic scaling strategy in any other appropriate manner (e.g., by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

Claims

1. A method for formulating an elastic scaling strategy, characterized in that: include: Obtain at least one load-time variation curve of the target server within a sampling period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein each load-time variation curve has the same sampling time axis and different sampling dates; Obtaining a performance indicator curve set of the target server, and calculating an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set; A predicted load curve for a target time period is obtained through the load prediction model, and an elastic scaling strategy matching the target server is obtained according to the predicted load curve, an upper load threshold and a lower load threshold.

2. The method according to claim 1, characterized in that The performance indicator curve set includes at least one performance indicator curve group, and the number of performance indicator curve groups is consistent with the number of load-time variation curves. The performance indicator curve group includes the CPU usage-time curve, memory usage-time curve, disk I / O rate-time curve and network bandwidth usage-time curve of the target server within a sampling time period.

3. The method according to claim 1, characterized in that The pre-set machine learning model is trained using each load-time variation curve to obtain a load prediction model, including: Extract the time axis of each load-time variation curve respectively; Forming a training sample set according to each load-time variation curve and a time axis matching each load-time variation curve, wherein the load-time variation curve is used as annotation data in the training sample; The machine learning model is trained using the training sample set to obtain a load prediction model.

4. The method according to claim 1, characterized in that Calculating the upper and lower load thresholds of the target server according to the performance indicator curve set includes: Forming a training sample set according to each load-time variation curve and each performance indicator curve group, wherein the load-time variation curve is used as the annotation data in the training sample; Using the training sample set to train the preset cluster analysis model to obtain a load calculation model, wherein the load calculation model is used to calculate the current load of the server according to the performance indicator information of the target server; An upper load threshold and a lower load threshold of the target server are calculated based on the load calculation model.

5. The method according to claim 4, characterized in that Calculating the upper and lower load thresholds of the target server based on the load calculation model includes: Obtain a preset maximum indicator threshold set, wherein the maximum performance threshold includes a maximum CPU usage threshold, a maximum memory usage threshold, a maximum disk I / O rate threshold, and a maximum network bandwidth usage threshold; Inputting the maximum performance threshold into the load calculation model to obtain the load upper limit threshold of the target server; Obtain a preset minimum performance threshold set, wherein the minimum performance threshold set includes a CPU usage minimum threshold, a memory usage minimum threshold, a disk I / O rate minimum threshold, and a network bandwidth usage minimum threshold; The minimum performance threshold is input into the load calculation model to obtain the load lower limit threshold of the target server.

6. The method according to claim 1, characterized in that Obtaining a predicted load curve for a target time period through the load prediction model includes: In response to a user's operation of determining a target time period, extracting a target time axis of the target time period; The target time axis is input into a load prediction model to obtain a predicted load curve for the target time period.

7. The method according to claim 1, characterized in that Obtaining an elastic scaling strategy matching the target server according to the predicted load curve, the upper load threshold, and the lower load threshold includes: Determining whether there is at least one upper limit time point and / or lower limit time point in the predicted load curve, the load value corresponding to the upper limit time point is greater than the upper load threshold, and the load value corresponding to the lower limit time point is less than the lower load threshold; If there is an upper limit time point, generating a load extension instruction based on the upper limit time point; If there is a lower limit time point, generating a load reduction instruction based on the lower limit time point; Each load expansion instruction and each load reduction instruction are aggregated and stored to obtain an elastic scaling strategy that matches the target server.

8. A device for formulating an elastic scaling strategy, characterized in that: include: A load prediction model training module is used to obtain at least one load-time variation curve of the target server within a sampling period, and use each load-time variation curve to train a preset machine learning model to obtain a load prediction model, wherein each load-time variation curve corresponds to the same sampling time axis but different sampling dates; A load threshold calculation module is used to obtain a performance indicator curve set of a target server, and calculate an upper load threshold and a lower load threshold of the target server according to the performance indicator curve set; The strategy generation module is used to obtain the predicted load curve of the target time period through the load prediction model, and obtain the elastic scaling strategy matching the target server according to the predicted load curve, the upper load threshold and the lower load threshold.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for formulating an elastic scaling strategy according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for formulating an elastic scaling strategy according to any one of claims 1 to 7 when executed.

11. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements a method for formulating an elastic scaling policy according to any one of claims 1 to 7.

Citation Information

Cited By

  • Power management method and device based on dynamic load, electronic equipment and medium

    CN120090197A