CN-121585622-B - Method, equipment and computer readable medium for regulating and controlling server capacity of performance system
Abstract
The invention discloses a method, equipment and a computer storage medium for regulating and controlling server capacity of a performance system, wherein the method for regulating and controlling the server capacity comprises the steps of obtaining historical data of a server to generate a historical data set, wherein the historical data set comprises historical data samples of a plurality of time periods, the historical data samples comprise a time sequence of server task quantity in unit time, training a task quantity prediction model by the historical data set in a first time period, generating a predicted task quantity time sequence in a period to be predicted based on the task quantity prediction model, and regulating and controlling the server capacity by the predicted task quantity time sequence. The task quantity prediction model is trained based on historical data samples of the time sequence, and the predicted task quantity time sequence in the period to be predicted is generated, so that the capacity of the server is regulated and controlled in advance, and the running stability of the server is ensured.
Inventors
- LI YUANZHE
Assignees
- 浙江鸟潮供应链管理有限公司
- 拉扎斯网络科技(上海)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260127
Claims (9)
- 1. A server capacity regulation and control method of a performance system is characterized by comprising the following steps: Acquiring server historical data to generate a historical data set, wherein the historical data set comprises historical data samples of a plurality of time periods, and the historical data samples comprise a time sequence of the task amount of the server in unit time; Training a task quantity prediction model by using the historical data set in a first time stage, and generating a predicted task quantity time sequence in a period to be predicted based on the task quantity prediction model, wherein the first time stage is a period of a plurality of time durations before the period to be predicted; generating a task amount peak sub-period and a task amount peak in a period to be predicted based on the task amount time sequence to be predicted; Regulating and controlling the capacity of the server according to the predicted task amount time sequence; acquiring CPU utilization rate of the server and task quantity in unit time in real time in a second time stage, wherein the second time stage is a certain period between the first time stage and a peak subperiod of a period to be predicted; Acquiring the CPU utilization rate of the historical data of the server, the task quantity in unit time and the mutual corresponding relation of the number of server devices; Generating a safe water level regression model based on the mutual correspondence of CPU utilization rate, task quantity in unit time and the number of server devices in the historical data; And inputting the CPU utilization rate acquired in real time and the task amount in unit time into a safe water level regression model, and secondarily regulating and controlling the server capacity based on an output result, wherein the output result is the number of server devices required to be configured for meeting the current task amount under the condition that the CPU utilization rate is below a safe water level, and the safe water level is a CPU utilization rate threshold value bearable by a server.
- 2. The server capacity control method of a performance system according to claim 1, wherein controlling the server capacity based on the predicted task amount time series includes: deploying the server reference capacity in advance based on the task volume peak; generating a task amount peak sub-period and a task amount peak in a period to be predicted based on the task amount time sequence, and further comprising: constructing a task amount regression model based on time by using the predicted task amount time sequence; and generating a task quantity peak subinterval and a task quantity peak in the period to be predicted based on the task quantity regression model.
- 3. The server capacity modulation method of a performance system of claim 2, wherein deploying the server reference capacity in advance based on the task volume peak comprises: acquiring the single-equipment task processing speed of the server below a safe water level; and deploying the number of server devices based on the task volume peak value and the single-device task processing speed.
- 4. The method of server capacity modulation for a performance system of claim 1, wherein obtaining a server history data generation history data set further comprises: Acquiring an activity state identifier of server historical data; assigning an activity state identifier to an element in the historical data sample; And in the first time stage, screening the historical data set by using the activity state identification, and training and optimizing a task quantity prediction model by using the screened historical data set.
- 5. The method of claim 4, further comprising obtaining an activity status identification within the period to be predicted and inputting a task amount prediction model to obtain a predicted task amount time sequence within the period to be predicted.
- 6. The method of server capacity modulation for a performance system of claim 1, wherein obtaining a server history data generation history data set further comprises: And obtaining the time characteristics of the time period to be predicted, screening server historical data according to the time characteristics, and generating a historical data set according to the server historical data containing the same time characteristics as the time period to be predicted, wherein the time characteristics are used for representing the time period corresponding to the server historical data.
- 7. The server capacity control method of a performance system according to any one of claims 1 to 6, characterized in that the specific step of training a task amount prediction model with the history data set, generating a predicted task amount time series within a period to be predicted based on the task amount prediction model includes: s201, arranging historical data samples in a historical data set into a time sequence according to a time sequence, setting a sliding window containing k unit time lengths, taking historical data acquired by each sliding window as one-time input, and taking task quantity data of the next unit time corresponding to the sliding window as a corresponding label; s202, inputting the input and the corresponding label into a task quantity prediction model for training; S203, acquiring the current latest task quantity in k continuous unit time as input, and inputting a trained task quantity prediction model, wherein the task quantity prediction model outputs task quantity predicted values in 1 unit time in the future; S204, adopting a rolling prediction strategy, adding the task quantity predicted value obtained last time to the end of the last input sequence, removing task quantity data of the first unit time in the input as a new input, inputting a task quantity prediction model again, and finishing m times of prediction by rolling; s205, obtaining m times of prediction results and generating a predicted task amount time sequence according to time sequence arrangement.
- 8. An electronic device comprising a processor and a memory, the memory storing a computer program, the processor implementing the server capacity modulation method according to any one of claims 1 to 7 when executing the computer program.
- 9. A computer readable medium, characterized in that it stores computer instructions that, when executed by a processor, implement the server capacity modulation method of any one of claims 1 to 7.
Description
Method, equipment and computer readable medium for regulating and controlling server capacity of performance system Technical Field The invention relates to the technical field of performance systems, in particular to a method and equipment for regulating and controlling the capacity of a server of a performance system and a computer readable medium. Background In a high concurrency scene of a sales promotion of an e-commerce platform, the matching of server resource allocation of a performance system and task quantity (order quantity, access quantity and the like) is required to be ensured, so that the problems of overhigh system operation load or low server utilization rate in the peak period of the task quantity are prevented. In the related art, a static pressure capacity measurement method, a passive capacity expansion method for CPU utilization rate threshold detection, a historical data average prediction method and the like are generally adopted to perform server capacity configuration, the server capacity is regulated and controlled according to real-time load pressure of a server, capacity expansion is performed when the server runs beyond the limit, hysteresis is achieved, time sequence fluctuation cannot be responded in advance, response capability to sudden amplification during activity is lacked, adaptability in a performance system with periodic time sequence fluctuation is poor, and problems that the running load in the performance system is too high or the server utilization rate is low can not be effectively solved. Disclosure of Invention The present invention aims to solve one of the technical problems in the prior art to a certain extent. Therefore, the invention provides a method, equipment and a computer readable medium for regulating and controlling the capacity of a server of a performance system, and solves the problems of overhigh running load or low server utilization rate in the performance system. In order to achieve the above object, the present invention provides a method for regulating and controlling server capacity of a performance system, including: Acquiring server historical data to generate a historical data set, wherein the historical data set comprises historical data samples of a plurality of time periods, and the historical data samples comprise a time sequence of the task amount of the server in unit time; Training a task quantity prediction model by using the historical data set in a first time stage, and generating a predicted task quantity time sequence in a period to be predicted based on the task quantity prediction model, wherein the first time stage is a period of a plurality of time durations before the period to be predicted; generating a task amount peak sub-period and a task amount peak in a period to be predicted based on the task amount time sequence to be predicted; Regulating and controlling the capacity of the server according to the predicted task amount time sequence; And in a second time stage, acquiring the CPU utilization rate of the server and the task amount in unit time in real time, and secondarily regulating and controlling the capacity of the server based on the CPU utilization rate and the task amount in unit time acquired in real time, wherein the second time stage is a certain period between the first time stage and a peak subperiod of a period to be predicted. According to the technical scheme, the prediction model is trained in the first time stage, the task quantity peak subperiod and the corresponding task quantity peak value in the period to be predicted are generated based on the prediction model, the prediction result generated in the first time stage is optimized and secondarily regulated and controlled based on the CPU utilization rate obtained in real time in the second time stage before the arrival of the task quantity peak value subperiod in the period to be predicted, and the accuracy of the prediction result and the processing capacity of the server on emergencies are improved through double-stage prediction and regulation and control. Preferably, the server capacity is regulated based on the predicted task amount time sequence, and the method further comprises: And deploying the server reference capacity in advance based on the task volume peak value. Preferably, the task amount time sequence is used for generating a task amount peak sub-period and a task amount peak in a period to be predicted, and the method further comprises the following steps: constructing a task amount regression model based on time by using the predicted task amount time sequence; and generating a task quantity peak subinterval and a task quantity peak in the period to be predicted based on the task quantity regression model. Preferably, deploying the server reference capacity in advance based on the task volume peak value includes: acquiring the single-equipment task processing speed of the server below a safe water level, wherein the safe water