Cloud computing server performance prediction model training method and device, medium and equipment
Through sample expansion of cloud computing server performance index data and hyperparameter optimization of the whale optimization algorithm, the small sample problem is solved, the prediction accuracy and stability of the cloud computing server performance prediction model are improved, and the performance problem is solved. Effective early warning and processing.
Patent Information
- Application Number
- CN202410713988.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-11
AI Technical Summary
Due to the imbalance of sample data, the performance prediction model of cloud computing servers has low prediction accuracy, and it is difficult for existing technology to effectively improve the prediction performance of the model.
By obtaining the performance index data of the cloud computing server, perform standardized processing and filter out the sample sets that exceed the alarm threshold and the sample sets that do not exceed the alarm threshold. The small sample set is expanded according to the proportion of the number of samples to form a balanced training set and test set. , and use the whale optimization algorithm to optimize the hyperparameters, and finally build an efficient performance prediction model.
It improves the prediction accuracy of the cloud computing server performance prediction model, enhances the stability and prediction performance of the model, can effectively detect performance problems in advance and formulate solutions, reduce operation and maintenance pressure, and avoid server failures.
Smart Images

Figure CN118760893A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing service technology, and in particular to a method, device, medium and equipment for training a cloud computing server performance prediction model. Background Art
[0002] With the rapid development of information technology and the advent of the big data era, people's consumption, payment, social and other lifestyles have undergone tremendous changes. Many lifestyles have gradually shifted from traditional offline modes to online modes, which makes high-performance servers very urgent to ensure the safe, stable and efficient operation of online platforms and to protect people's daily life needs.
[0003] Cloud computing server is a simple, efficient, scalable, secure, reliable, low-cost, and quickly deployed computing server. It provides efficient and stable processing and analysis of big data and provides key computing resources. Therefore, it is very important to accurately predict the performance of cloud computing servers, issue timely warnings of server failures, and prepare corresponding solutions in advance to ensure the safe, stable, and efficient operation of cloud computing servers.
[0004] Since the fluctuations in the usage resources and performance indicators of cloud computing servers are affected by specific computing applications, an automatic alarm will be issued when the computing resources or performance indicators exceed the set threshold, and then human intervention will be performed to deal with the problem. This also makes the sample data volume of computing resources and performance indicators that exceed the set threshold much smaller than the sample data volume of computing resources and performance indicators that are lower than the set threshold. There is a small sample problem, which leads to low prediction accuracy of the performance prediction model of cloud computing servers. Summary of the invention
[0005] In response to at least one of the above technical problems, an embodiment of the present invention provides a cloud computing server performance prediction model training method and device, medium, and equipment.
[0006] According to the first aspect, the cloud computing server performance prediction model training method provided by the embodiment of the present invention includes:
[0007] Obtain performance indicator data of cloud computing servers;
[0008] Performing standardization processing on the performance indicator data;
[0009] Screening out performance indicator data exceeding an alarm threshold from the performance indicator data after standard processing, forming a first sample set with the performance indicator data exceeding the alarm threshold, and forming a second sample set with the performance indicator data not exceeding the alarm threshold;
[0010] Expanding the first sample set according to a ratio of the number of samples in the first sample set to the number of samples in the second sample set;
[0011] Dividing the expanded first sample set and the second sample set into a training set and a test set;
[0012] Constructing a cloud computing server performance prediction model, and using a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters;
[0013] According to the optimal hyperparameters, a cloud computing server performance prediction model is configured with hyperparameters;
[0014] After the hyperparameter configuration is completed, the cloud computing server performance prediction model is trained using the training set, and after the training converges, the prediction performance of the cloud computing server performance prediction model is tested using the test set.
[0015] In one embodiment, the expanding the first sample set according to the ratio of the number of samples in the first sample set to the number of samples in the second sample set includes:
[0016] Determining an expansion ratio N of the first sample set according to a ratio of the number of samples in the first sample set and the second sample set; wherein N is an integer greater than 1;
[0017] For each sample in the first sample set, calculating the Euclidean distance between the sample and each other sample in the first sample set except the sample;
[0018] According to the calculated Euclidean distances, determine the g neighboring samples of the sample; where g is an integer greater than 1;
[0019] Select N neighboring samples from the g neighboring samples of the sample;
[0020] Based on the sample and each neighboring sample selected from g neighboring samples of the sample, generate a corresponding new sample, and add the new sample to the first sample set;
[0021] The newly added sample is determined by using a first calculation formula, and the first calculation formula is:
[0022] a new =a+rand(0,1)×(a′-a)
[0023] Among them, a new is the newly added sample, a is the sample, a′ is the central sample of the current first sample set, and rand() is a random function.
[0024] In one embodiment, the use of the whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters includes:
[0025] A1. Initialize the position of each whale individual in the whale cluster, randomly select the best whale individual from the initialized whale individuals, set the optimization range of each hyperparameter in the hyperparameter group, set the objective function as the root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is lower than the threshold, and initialize the search number threshold; wherein, the position of each whale individual represents a group of hyperparameters;
[0026] A2. Determine a search method according to the current number of iterations; wherein the search method includes a global search method and a local search method;
[0027] A3. According to the search method, the position of each whale individual in the whale cluster is updated. After the position update is completed, the whale individual with the lowest root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is selected from the whale cluster as the current best whale individual;
[0028] A4, judging whether the objective function is satisfied and judging whether the current number of iterations exceeds the search number threshold;
[0029] A5. If the objective function is satisfied or the current number of iterations exceeds the search number threshold, the iteration is stopped, and the hyperparameter group represented by the position of the current best whale individual is output as the optimal hyperparameter;
[0030] A6. If the objective function is not satisfied and the current number of iterations does not exceed the search number threshold, the current number of iterations is increased by 1 and the process returns to A2.
[0031] In one embodiment, determining the search mode according to the current number of iterations includes:
[0032] Determine a first parameter that is linearly related to the current number of iterations; wherein the first parameter is a parameter that decreases linearly from 2 to 0 as the current number of iterations increases;
[0033] Calculate the search parameter according to the first parameter so that the search parameter falls into three ranges of [-2, -1], [-1, 1], and [1, 2] in sequence as the number of iterations increases;
[0034] If the search parameter is outside the range of [-1, 1], the search mode is determined to be a global search mode;
[0035] If the search parameter is within the range of [-1, 1], a local search method is selected; wherein the local search method includes a search method based on a shrinking surround mechanism and a search method based on a bubbling net attack mechanism;
[0036] Get random probability parameters;
[0037] If the random probability parameter is less than 0.5, the search method is determined to be a search method based on a shrinking and surrounding mechanism; if the random probability parameter is greater than or equal to 0.5, the search method is determined to be a search method based on a foaming network attack mechanism;
[0038] The search parameter is calculated using a second calculation formula, and the second calculation formula is:
[0039] A1=2e*r1-e
[0040] Among them, A1 is the search parameter, e is the first parameter, and r1 is a random number between 0 and 1.
[0041] In one embodiment, updating the position of each individual whale in the whale cluster according to the search method includes:
[0042] If the determined search method is a search method based on the shrinking and surrounding mechanism, the third calculation formula is used to calculate the updated position of each individual whale, and the third calculation formula is:
[0043]
[0044] C1=2r2
[0045] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0046] In one embodiment, updating the position of each individual whale in the whale cluster according to the search method includes:
[0047] If the determined search method is a search method based on the bubble net attack mechanism, the fourth calculation formula is used to calculate the updated position of each whale individual, and the fourth calculation formula is:
[0048]
[0049] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, b is the logarithmic spiral shape constant, and ι is a random number between -1 and 1.
[0050] In one embodiment, updating the position of each individual whale in the whale cluster according to the search method includes:
[0051] If the determined search method is a global search method, the fifth calculation formula is used to calculate the updated position of each individual whale. The fifth calculation formula is:
[0052]
[0053] C1=2r2
[0054] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of a random whale individual in the whale cluster, where the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0055] According to the second aspect, the cloud computing server performance prediction model training device provided by the embodiment of the present invention includes:
[0056] A first acquisition module is used to acquire performance indicator data of the cloud computing server;
[0057] A first processing module, used for performing standardization processing on the performance indicator data;
[0058] A sample screening module, used to screen out performance indicator data exceeding the alarm threshold from the performance indicator data after standard processing, form the performance indicator data exceeding the alarm threshold into a first sample set, and form the performance indicator data not exceeding the alarm threshold into a second sample set;
[0059] A sample expansion module, configured to expand the first sample set according to a ratio of the number of samples in the first sample set to the number of samples in the second sample set;
[0060] A sample division module, used for dividing the expanded first sample set and the second sample set into a training set and a test set;
[0061] A hyperparameter optimization module is used to build a cloud computing server performance prediction model and use a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters;
[0062] A hyperparameter configuration module, used to configure the hyperparameters of the cloud computing server performance prediction model according to the optimal hyperparameters;
[0063] The model training module is used to train the cloud computing server performance prediction model using the training set after the hyperparameter configuration is completed, and to test the prediction performance of the cloud computing server performance prediction model using the test set after the training converges.
[0064] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0065] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.
[0066] The cloud computing server performance prediction model training method, device, medium, and equipment provided by the embodiment of the present invention first obtain the performance indicator data of the cloud computing server and standardize the performance indicator data, filter out the performance indicator data exceeding the alarm threshold to form a first sample set, and the remaining performance indicator data to form a second sample set, then determine the sample quantity ratio of the two sample sets, expand the first sample set according to the sample quantity ratio, and after the expansion is completed, divide the expanded first sample set and the original second sample set into a test set and a training set, and then use the whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters, and use the optimal hyperparameters to configure the cloud computing server performance prediction model. After the hyperparameter configuration is completed, the cloud computing server performance prediction model is trained using the training set, and after the training converges, the prediction performance of the cloud computing server performance prediction model is tested using the test set. In the above process, the first sample set is expanded, and the sample quantities of the expanded first sample set and the second sample set are balanced, which improves the problem of low prediction accuracy of the trained model due to the small number of samples exceeding the alarm threshold. Moreover, by optimizing the cloud computing server performance prediction model through the whale optimization algorithm, the prediction performance of the model can be improved, and finally a cloud computing server performance prediction model with higher prediction accuracy can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A schematic diagram of a process for training a cloud computing server performance prediction model in one embodiment of the present invention;
[0068] Figure 2 It is a structural block diagram of a cloud computing server performance prediction model training device in one embodiment of the present invention. DETAILED DESCRIPTION
[0069] In a first aspect, an embodiment of the present invention provides a method for training a cloud computing server performance prediction model, the method comprising the following steps S110 to S180:
[0070] S110, obtaining performance indicator data of the cloud computing server;
[0071] Among them, the performance indicator data may include machine number, CPU utilization, memory utilization, disk space utilization, memory bandwidth utilization, number of network packet inputs, number of network packet outputs and other data.
[0072] For example, the memory utilization is collected every 10 seconds within an hour, and [x1, x2, ..., x n ] time series data, where x n Memory utilization of the nth collection.
[0073] S120, performing standardization processing on the performance indicator data;
[0074] For example, the memory utilization is normalized using the following calculation formula:
[0075]
[0076] Among them, z represents the standardized time series of memory utilization, μ represents the mean of the original time series of memory utilization, and σ represents the standard deviation of the original time series.
[0077] S130, filtering out performance indicator data exceeding the alarm threshold from the performance indicator data after standard processing, forming a first sample set with the performance indicator data exceeding the alarm threshold, and forming a second sample set with the performance indicator data not exceeding the alarm threshold;
[0078] The performance indicator data exceeding the alarm threshold refers to data indicating that a problem has occurred in the cloud computing server and that alarm processing is required. The performance indicator data not exceeding the alarm threshold refers to data indicating that the cloud computing server is operating normally and that alarm processing is not required.
[0079] It can be seen that there are relatively few samples in the first sample set, and the first sample set is a small sample data set.
[0080] S140: Expanding the first sample set according to the ratio of the number of samples in the first sample set to the number of samples in the second sample set;
[0081] For example, if the number of samples in the first sample set is 1 / 5 of the number of samples in the second sample set, then the first sample set needs to be expanded 5 times to balance the first sample set and the second sample set.
[0082] In one embodiment, in S140, the expanding the first sample set according to the ratio of the number of samples in the first sample set to the number of samples in the second sample set may include S141 to S145:
[0083] S141, determining an expansion ratio N of the first sample set according to a ratio of the number of samples in the first sample set and the second sample set; wherein N is an integer greater than 1;
[0084] For example, if the number of samples in the first sample set is 1 / 5 of the number of samples in the second sample set, then the expansion ratio N is 5. If the sample number ratio is not an integer, the sample number ratio needs to be rounded up or down.
[0085] S142. For each sample in the first sample set, calculate the Euclidean distance between the sample and each other sample in the first sample set except the sample.
[0086] S143, determining g neighboring samples of the sample according to each calculated Euclidean distance; wherein g is an integer greater than 1;
[0087] S144, selecting N neighboring samples from g neighboring samples of the sample;
[0088] S145: Generate a corresponding new sample based on the sample and each neighboring sample selected from g neighboring samples of the sample, and add the new sample to the first sample set;
[0089] The newly added sample is determined by using a first calculation formula, and the first calculation formula is:
[0090] a new =a+rand(0,1)×(a′-a)
[0091] Among them, a new is the newly added sample, a is the sample, a′ is the central sample of the current first sample set, and rand() is a random function.
[0092] For example, for the first sample set including sample 1, sample 2 ... sample 100, for sample 1, it is necessary to calculate the Euclidean distances between sample 1 and sample 2 ... sample 100 respectively, and obtain 99 Euclidean distances. Set g to 10, then select the 10 neighboring samples closest to sample 1 from sample 2 ... sample 100 according to these 99 Euclidean distances. Then randomly select 5 neighboring samples from these 10 neighboring samples. Assuming that these 5 neighboring samples are sample 3, sample 5, sample 70, sample 83 and sample 99, then generate a new sample based on sample 1 and sample 3, and put the new sample into the first sample set. Generate a new sample based on sample 1 and sample 5, and put the new sample into the first sample set. Generate a new sample based on sample 1 and sample 70, and put the new sample into the first sample set. Generate a new sample based on sample 1 and sample 83, and put the new sample into the first sample set. Generate a new sample based on sample 1 and sample 99, and put the new sample into the first sample set. This is an expansion based on sample 1. Similarly, expansion based on sample 2 ... sample 100 can be achieved, thus achieving a 5-fold expansion of the first sample set.
[0093] The parameter a′ is the central sample of the current first sample set, that is, each time a new sample is generated, the new sample is added to the first sample set, so that the first sample set changes. A central sample is selected for the current first sample set. The so-called central sample refers to the sample with the smallest sum of Euclidean distances to other samples in the first sample set.
[0094] It can be seen that the above process adopts the synthetic sampling technology, that is, starting from the minority class samples, finding the neighboring samples, and synthesizing new minority class samples to keep the number of minority class samples consistent with the number of majority class samples.
[0095] S150, dividing the expanded first sample set and the second sample set into a training set and a test set;
[0096] S160, constructing a cloud computing server performance prediction model, and using a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain optimal hyperparameters;
[0097] The cloud computing server performance prediction model can be built based on the gated recurrent unit GRU. The built cloud computing server performance prediction model can include a reset gate and an update gate. The function expressions of the reset gate and the update gate are as follows:
[0098] r t =σ(W r ·[h t-1 ,x t ])
[0099] z t =σ(W z ·[h t-1 ,x t ])
[0100] Among them, r t is the function expression of the reset gate, z t is the function expression of the update gate, σ() is the sigmod activation function, Wr is the reset matrix, Wz is the update matrix, h t-1 is the hidden layer information of the previous moment, and xt is the input information of the current moment.
[0101] Hidden layer state information at the current moment Use rt to control how much previous memory information needs to be retained and the hidden state information at the current moment The expression is as follows:
[0102]
[0103] Among them, W is the hidden layer weight, is the hidden layer state information at the current moment.
[0104] The hidden layer information at the current moment needs to use z t To control the hidden information h from the previous moment t-1 How much information is forgotten in the calculation, and how much hidden state information at the current moment needs to be added Finally, we get the hidden layer information h at the current moment t, the specific expression is as follows:
[0105]
[0106] By introducing the fully connected layer, the performance prediction of the cloud computing server is realized. The hyperparameters of the entire prediction model include the number of hidden layer neurons, the learning rate, the dropout factor, i.e. the discarding parameter, the batch_size, etc. The setting of the hyperparameters has a great influence on the performance of the model. In order to find the best hyperparameter combination, the embodiment of the present invention adopts the whale optimization algorithm to optimize the hyperparameters.
[0107] Among them, the whale optimization algorithm, abbreviated as WOA, is a new group intelligence optimization algorithm that simulates the predation behavior of humpback whales in nature. The predation behavior of whales mainly includes: surrounding prey, bubble net attack or search predation. The purpose of whale predation is to capture prey. When a group of whales are looking for prey, there will definitely be a situation where a whale finds the prey first. At this time, other whales will definitely swim to the whale that has found the prey to compete for the prey. This predation process can be applied to the process of solving problems with WOA, that is, one solution can be represented by one whale individual, and several solutions can be represented by several whale individuals. The process of searching for a solution to a problem using WOA can be regarded as several whale individuals constantly updating their individual positions until a satisfactory solution is found.
[0108] In one embodiment, the whale optimization algorithm is used in S160 to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters, which may include A1 to A6:
[0109] A1. Initialize the position of each whale individual in the whale cluster, randomly select the best whale individual from the initialized whale individuals, set the optimization range of each hyperparameter in the hyperparameter group, set the objective function as the root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is lower than the threshold, and initialize the search number threshold; wherein, the position of each whale individual represents a group of hyperparameters;
[0110] That is, in A1, the initialization operation is performed to set the position of each whale individual, and the position is used to represent a set of hyperparameters. For example, if there are 6 hyperparameters in a set of hyperparameters, then the position of the whale individual is a vector including 6 elements. The number of whale individuals in the whale cluster can be customized, for example, 40. Then a whale individual is randomly selected from the whale cluster as the current best whale individual, and the position of the best whale individual is X * Expressed as d is the number of hyperparameters. The position of the individual whale in the jth iteration can be expressed as After updating its position, it can be expressed as
[0111] The objective function is that the root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is lower than a threshold. For example, after configuring the cloud computing server performance prediction model with a hyperparameter group represented by the position of an individual whale, the cloud computing server performance prediction model is used to predict the performance index to obtain the predicted value, and then the root mean square function value of the difference between the predicted value and the actual value is calculated, so as to know whether the position of the individual whale meets the objective function.
[0112] The search number threshold is the threshold of the iteration number.
[0113] Among them, the optimization range can ensure that the hyperparameters are optimized within this range during the optimization process.
[0114] A2. Determine a search method according to the current number of iterations; wherein the search method includes a global search method and a local search method;
[0115] In one embodiment, A2 may include A21-A26:
[0116] A21. Determine a first parameter that is linearly related to the current number of iterations; wherein the first parameter is a parameter that decreases linearly from 2 to 0 as the current number of iterations increases;
[0117] For example, the first parameter is 2 during the first iteration, 1.8 during the second iteration, and 1.6 during the third iteration, and they decrease linearly in sequence.
[0118] A22. Calculate the search parameter according to the first parameter so that the search parameter falls into the three ranges of [-2, -1], [-1, 1], and [1, 2] in sequence as the number of iterations increases;
[0119] The search parameter may be calculated using a second calculation formula, where the second calculation formula is:
[0120] A1=2e*r1-e
[0121] Among them, A1 is the search parameter, e is the first parameter, and r1 is a random number between 0 and 1.
[0122] That is, in the first few iterations, the search parameter falls within the range [-2, -1]. In the middle few iterations, the search parameter falls within the range [-1, 1]. In the last few iterations, the search parameter falls within the range [1, 2].
[0123] A23. If the search parameter is outside the range of [-1, 1], the search mode is determined to be a global search mode;
[0124] A24. If the search parameter is within the range of [-1, 1], a local search method is selected; wherein the local search method includes a search method based on a shrinking surround mechanism and a search method based on a bubbling network attack mechanism;
[0125] That is to say, in the first few iterations, the position of each whale individual is updated by global search. In the middle few iterations, the position of each whale individual is updated by local search. In the following few iterations, the position of each whale individual is updated by global search. It can be seen that the embodiment of the present invention realizes the position update of each whale individual by combining global and local methods.
[0126] Since there are two local search methods: a search method based on a shrinking surround mechanism and a search method based on a bubbling net attack mechanism, it is necessary to further determine which local search method to select.
[0127] A25. Obtain random probability parameters;
[0128] A26. If the random probability parameter is less than 0.5, the search method is determined to be a search method based on a shrinking and surrounding mechanism; if the random probability parameter is greater than or equal to 0.5, the search method is determined to be a search method based on a foaming network attack mechanism.
[0129] The random probability parameter p is randomly generated or set manually. If the random probability parameter is less than 0.5, the search method based on the shrinking and surrounding mechanism is selected. If the random probability parameter is greater than or equal to 0.5, the search method based on the foaming network attack mechanism is selected.
[0130] A3. According to the search method, the position of each whale individual in the whale cluster is updated. After the position update is completed, the whale individual with the lowest root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is selected from the whale cluster as the current best whale individual;
[0131] That is to say, after determining the search method, the position of each individual whale needs to be updated according to the search method. After the position of each individual whale is updated, the individual whale with the lowest root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is selected, and then the individual whale with the lowest root mean square function value is used as the current best individual whale.
[0132] In one embodiment, the updating of the position of each individual whale in the whale cluster according to the search method in A3 may include: if the determined search method is a search method based on a shrinking and surrounding mechanism, then using a third calculation formula to calculate the updated position of each individual whale, the third calculation formula being:
[0133]
[0134] C1=2r2
[0135] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0136] In one embodiment, the updating of the position of each individual whale in the whale cluster according to the search method in A3 may include: if the determined search method is a search method based on a bubble net attack mechanism, then using a fourth calculation formula to calculate the updated position of each individual whale, the fourth calculation formula is:
[0137]
[0138] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, b is the logarithmic spiral shape constant, and ι is a random number between -1 and 1.
[0139] It can be seen that the search method based on the bubble network attack mechanism is a spiral position update mechanism, that is, the whale individuals approach the current best whale individual in a spiral manner.
[0140] In practice, when whales are hunting prey, they not only shrink the encirclement, but also swim towards the prey in a spiral form. Therefore, there is a 50% probability of choosing to shrink the encirclement or swim towards the prey in a spiral form. Therefore, the random probability parameter is compared with 0.5 to select the corresponding local search method.
[0141] In one embodiment, the updating of the position of each individual whale in the whale cluster according to the search method in A3 may include: if the determined search method is a global search method, using a fifth calculation formula to calculate the updated position of each individual whale, the fifth calculation formula being:
[0142]
[0143] C1=2r2
[0144] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of a random whale individual in the whale cluster, where the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0145] When the value of A1 is not in [-1,1], the individual whale may not approach the current best individual whale, but select a whale from the current whale group to approach, which is the idea of search and predation. Although search and predation may cause the current individual whale to deviate from the target prey, it will enhance the global search ability of the whale group. The position X of the randomly selected individual whale rand for
[0146] A4, judging whether the objective function is satisfied and judging whether the current number of iterations exceeds the search number threshold;
[0147] A5. If the objective function is satisfied or the current number of iterations exceeds the search number threshold, the iteration is stopped, and the hyperparameter group represented by the position of the current best whale individual is output as the optimal hyperparameter;
[0148] A6. If the objective function is not satisfied and the current number of iterations does not exceed the search number threshold, the current number of iterations is increased by 1 and the process returns to A2.
[0149] That is, if the objective function is satisfied, or the current number of iterations exceeds the search number threshold, the iteration ends, and the hyperparameter group represented by the position of the best whale individual is output as the optimal hyperparameter. If the objective function is not satisfied, and the current number of iterations does not exceed the search number threshold, it means that the iteration needs to be continued, so the number of iterations is increased by 1 and returned to A2.
[0150] It is understandable that the whale optimization algorithm has fewer parameters and a fast convergence speed. The two predation mechanisms of surrounding prey and bubble net attack belong to local search methods, and the global search method is also used. By adjusting the value range of A1 in the mathematical model of predation behavior, the whale optimization algorithm has the ability of global search and local search, which is convenient for finding the global optimal solution.
[0151] S170, configuring hyperparameters of a cloud computing server performance prediction model according to the optimal hyperparameters;
[0152] S180: After the hyperparameter configuration is completed, the cloud computing server performance prediction model is trained using the training set, and after the training converges, the prediction performance of the cloud computing server performance prediction model is tested using the test set.
[0153] After obtaining the optimal hyperparameters based on S160, the hyperparameters of the cloud computing server performance prediction model are configured. After the configuration is completed, model training and model testing are performed to test whether the cloud computing server performance prediction model that meets the requirements can be applied to the performance prediction scenario of the cloud computing server.
[0154] In the performance prediction scenario of cloud computing servers, the performance operation data of cloud computing servers over a period of time is collected and the data is standardized; then the performance indicators of the cloud computing servers are predicted using the trained cloud computing server performance prediction model. When the prediction result exceeds the set threshold, an alarm message is generated to remind the operation and maintenance personnel that there may be problems with the cloud computing server and that timely investigation is required; when the prediction result does not exceed the set threshold, the cloud computing server is in normal operation.
[0155] Conduct source analysis on the alarm information, trace the corresponding time series information based on the alarm information, and infer the machine number corresponding to the alarm problem of the current performance indicator from the time series information, so that the operation and maintenance personnel can promptly check the alarm problem and formulate solutions.
[0156] It can be seen that the embodiment of the present invention adopts a data enhancement method to solve the problem of small samples in the performance indicator data of cloud computing servers, and at the same time optimizes the cloud computing server performance prediction model based on the whale optimization algorithm to improve the prediction performance of the model, and finally obtains a cloud computing server performance prediction model with high prediction accuracy. By predicting the relevant performance of cloud computing servers in the future, setting relevant thresholds, and issuing server problem alarms, operation and maintenance personnel can discover problems in advance and formulate corresponding solutions, reduce the pressure on operators, and avoid major losses to the enterprise.
[0157] That is, the performance indicator data of cloud computing servers are collected and standardized regularly, and the standardized data is put into the trained cloud computing server performance prediction model to obtain the prediction results. According to manual experience, the threshold limit of the performance indicator evaluation of the cloud computing server is set; finally, the output prediction result of the prediction model is compared with the set threshold limit, and an alarm message is issued when the threshold limit is exceeded. The part of the performance indicator prediction output value that exceeds the threshold limit is traced, the cause is analyzed, and the specific machine number that caused the problem is found, so as to deal with the problem.
[0158] It can be seen that the embodiment of the present invention solves the problem of low performance prediction accuracy of cloud computing servers under small samples, and effectively enhances the stability and accuracy of the prediction model. It can also quickly identify and locate resource blocks with alarms and solve problems based on alarms and problem analysis in application scenarios to ensure safe and stable operation of the server. For operation and maintenance personnel, real-time prediction of the performance of cloud computing servers, early understanding of warning information, and formulation of relevant solutions can prevent problems before they occur, avoid the rapid decline in performance of cloud computing servers or even downtime, affect the normal operation of original businesses, and cause significant losses to the enterprise, effectively reducing the operating pressure of operation and maintenance personnel.
[0159] In a second aspect, an embodiment of the present invention provides a cloud computing server performance prediction model training device, see Figure 2 , the device 100 comprises:
[0160] A first acquisition module 110 is used to acquire performance indicator data of a cloud computing server;
[0161] A first processing module 120, configured to perform standardization processing on the performance indicator data;
[0162] The sample screening module 130 is used to screen out the performance indicator data exceeding the alarm threshold from the performance indicator data after standard processing, form the performance indicator data exceeding the alarm threshold into a first sample set, and form the performance indicator data not exceeding the alarm threshold into a second sample set;
[0163] A sample expansion module 140, configured to expand the first sample set according to a sample quantity ratio between the first sample set and the second sample set;
[0164] A sample division module 150, configured to divide the expanded first sample set and the second sample set into a training set and a test set;
[0165] A hyperparameter optimization module 160 is used to construct a cloud computing server performance prediction model and use a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters;
[0166] A hyperparameter configuration module 170, configured to configure hyperparameters of a cloud computing server performance prediction model according to the optimal hyperparameters;
[0167] The model training module 180 is used to train the cloud computing server performance prediction model using the training set after the hyperparameter configuration is completed, and to test the prediction performance of the cloud computing server performance prediction model using the test set after the training converges.
[0168] In one embodiment, the sample expansion module is specifically used to: determine the expansion ratio N of the first sample set according to the ratio of the number of samples in the first sample set and the second sample set; wherein N is an integer greater than 1; for each sample in the first sample set, calculate the Euclidean distance between the sample and each other sample in the first sample set except the sample; determine g neighboring samples of the sample according to the calculated Euclidean distances; wherein g is an integer greater than 1; select N neighboring samples from the g neighboring samples of the sample; based on the sample and each neighboring sample selected from the g neighboring samples of the sample, generate a corresponding new sample, and add the new sample to the first sample set; wherein the new sample is determined by a first calculation formula, and the first calculation formula is:
[0169] a new =a+rand(0,1)×(a′-a)
[0170] Among them, a new is the newly added sample, a is the sample, a′ is the central sample of the current first sample set, and rand() is a random function.
[0171] In one embodiment, the super parameter optimization module includes:
[0172] An initialization unit is used to perform: A1, initializing the position of each whale individual in the whale cluster, randomly selecting the best whale individual from the initialized whale individuals, setting the optimization range of each hyperparameter in the hyperparameter group, setting the objective function to the root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is lower than a threshold, and initializing the search number threshold; wherein the position of each whale individual represents a group of hyperparameters;
[0173] A mode determination unit, used to execute: A2, determining a search mode according to the current number of iterations; wherein the search mode includes a global search mode and a local search mode;
[0174] A position updating unit, used to execute: A3, updating the position of each whale individual in the whale cluster according to the search method, and after the position update is completed, selecting from the whale cluster a whale individual with the lowest root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model as the current best whale individual;
[0175] A judging unit, configured to execute: A4, judging whether the objective function is satisfied and judging whether the current number of iterations exceeds the search number threshold;
[0176] A result output unit, used to execute: A5, if the objective function is satisfied or the current iteration number exceeds the search number threshold, then stop the iteration, and output the hyperparameter group represented by the position of the current best whale individual as the optimal hyperparameter;
[0177] The iteration return unit is used to execute: A6. If the objective function is not satisfied and the current iteration number does not exceed the search number threshold, the current iteration number is increased by 1 and returned to A2.
[0178] In one embodiment, the mode determination unit includes:
[0179] A first determination subunit is used to determine a first parameter that is linearly related to the current number of iterations; wherein the first parameter is a parameter that decreases linearly from 2 to 0 as the current number of iterations increases;
[0180] A first calculation subunit is used to calculate the search parameter according to the first parameter, so that the search parameter falls into three ranges of [-2, -1], [-1, 1], and [1, 2] in sequence as the number of iterations increases;
[0181] A second determining subunit, configured to determine that the search mode is a global search mode if the search parameter is outside the range of [-1, 1];
[0182] A first selection subunit, configured to select a local search method if the search parameter is within the range of [-1, 1]; wherein the local search method includes a search method based on a shrinking surround mechanism and a search method based on a bubbling net attack mechanism;
[0183] A first acquisition subunit, used to acquire a random probability parameter;
[0184] A third determining subunit is used to determine that the search mode is a search mode based on a shrinking and surrounding mechanism if the random probability parameter is less than 0.5; and to determine that the search mode is a search mode based on a foaming network attack mechanism if the random probability parameter is greater than or equal to 0.5;
[0185] The first calculation subunit calculates the search parameter using a second calculation formula, and the second calculation formula is:
[0186] A1=2e*r1-e
[0187] Among them, A1 is the search parameter, e is the first parameter, and r1 is a random number between 0 and 1.
[0188] In one embodiment, the position updating unit is specifically used to: if the determined search method is a search method based on a shrinking and surrounding mechanism, then a third calculation formula is used to calculate the updated position of each individual whale, and the third calculation formula is:
[0189]
[0190] C1=2r2
[0191] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0192] In one embodiment, the position updating unit is specifically used to: if the determined search method is a search method based on a bubble net attack mechanism, then use a fourth calculation formula to calculate the updated position of each whale individual, and the fourth calculation formula is:
[0193]
[0194] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, b is the logarithmic spiral shape constant, and l is a random number between -1 and 1.
[0195] In one embodiment, the position updating unit is specifically used to: if the determined search mode is a global search mode, then use the fifth calculation formula to calculate the updated position of each individual whale, and the fifth calculation formula is:
[0196]
[0197] C1=2r2
[0198] in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of a random whale individual in the whale cluster, where the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
[0199] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0200] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0201] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0202] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0203] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0204] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0205] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0206] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0207] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0208] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0209] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0210] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0211] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A cloud computing server performance prediction model training method, characterized in that: include: Obtain performance indicator data of cloud computing servers; Performing standardization processing on the performance indicator data; Screening out performance indicator data exceeding an alarm threshold from the performance indicator data after standard processing, forming a first sample set with the performance indicator data exceeding the alarm threshold, and forming a second sample set with the performance indicator data not exceeding the alarm threshold; Expanding the first sample set according to a ratio of the number of samples in the first sample set to the number of samples in the second sample set; Dividing the expanded first sample set and the second sample set into a training set and a test set; Constructing a cloud computing server performance prediction model, and using a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters; According to the optimal hyperparameters, a cloud computing server performance prediction model is configured with hyperparameters; After the hyperparameter configuration is completed, the cloud computing server performance prediction model is trained using the training set, and after the training converges, the prediction performance of the cloud computing server performance prediction model is tested using the test set.
2. The method according to claim 1, characterized in that: The expanding the first sample set according to the ratio of the number of samples in the first sample set to the number of samples in the second sample set includes: Determining an expansion ratio N of the first sample set according to a ratio of the number of samples in the first sample set and the second sample set; wherein N is an integer greater than 1; For each sample in the first sample set, calculating the Euclidean distance between the sample and each other sample in the first sample set except the sample; According to the calculated Euclidean distances, determine the g neighboring samples of the sample; where g is an integer greater than 1; Select N neighboring samples from the g neighboring samples of the sample; Based on the sample and each neighboring sample selected from g neighboring samples of the sample, generate a corresponding new sample, and add the new sample to the first sample set; The newly added sample is determined by using a first calculation formula, and the first calculation formula is: a new =a+rand(0,1)×)a′-a Among them, a new is the newly added sample, a is the sample, a′ is the central sample of the current first sample set, and rand() is a random function.
3. The method according to claim 1, characterized in that: The method of optimizing the hyperparameters of the cloud computing server performance prediction model using the whale optimization algorithm to obtain the optimal hyperparameters includes: A1. Initialize the position of each whale individual in the whale cluster, randomly select the best whale individual from the initialized whale individuals, set the optimization range of each hyperparameter in the hyperparameter group, set the objective function as the root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is lower than the threshold, and initialize the search number threshold; wherein, the position of each whale individual represents a group of hyperparameters; A2. Determine a search method according to the current number of iterations; wherein the search method includes a global search method and a local search method; A3. According to the search method, the position of each whale individual in the whale cluster is updated. After the position update is completed, the whale individual with the lowest root mean square function value of the difference between the predicted value and the actual value of the cloud computing server performance prediction model is selected from the whale cluster as the current best whale individual; A4, judging whether the objective function is satisfied and judging whether the current number of iterations exceeds the search number threshold; A5. If the objective function is satisfied or the current number of iterations exceeds the search number threshold, the iteration is stopped, and the hyperparameter group represented by the position of the current best whale individual is output as the optimal hyperparameter; A6. If the objective function is not satisfied and the current number of iterations does not exceed the search number threshold, the current number of iterations is increased by 1 and the process returns to A2.
4. The method according to claim 3, characterized in that: The step of determining the search mode according to the current number of iterations includes: Determine a first parameter that is linearly related to the current number of iterations; wherein the first parameter is a parameter that decreases linearly from 2 to 0 as the current number of iterations increases; According to the first parameter, the search parameter is calculated so that the search parameter falls into three ranges of [-2, -1], [-1, 1], and [1, 2] in sequence as the number of iterations increases; If the search parameter is outside the range of [-1,1], the search mode is determined to be a global search mode; If the search parameter is within the range of [-1,1], a local search method is selected; wherein the local search method includes a search method based on a shrinking surround mechanism and a search method based on a bubbling net attack mechanism; Get random probability parameters; If the random probability parameter is less than 0.5, the search method is determined to be a search method based on a shrinking and surrounding mechanism; if the random probability parameter is greater than or equal to 0.5, the search method is determined to be a search method based on a foaming network attack mechanism; The search parameter is calculated using a second calculation formula, and the second calculation formula is: A1=2e*r1-e Among them, A1 is the search parameter, e is the first parameter, and r1 is a random number between 0 and 1.
5. The method according to claim 4, characterized in that: The updating of the position of each individual whale in the whale cluster according to the search method includes: If the determined search method is a search method based on the shrinking and surrounding mechanism, the third calculation formula is used to calculate the updated position of each individual whale, and the third calculation formula is: in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
6. The method according to claim 4, characterized in that: The updating of the position of each individual whale in the whale cluster according to the search method includes: If the determined search method is a search method based on the bubble net attack mechanism, the fourth calculation formula is used to calculate the updated position of each whale individual, and the fourth calculation formula is: in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of the current best whale individual, and the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, b is the logarithmic spiral shape constant, and l is a random number between -1 and 1.
7. The method according to claim 4, characterized in that: The updating of the position of each individual whale in the whale cluster according to the search method includes: If the determined search method is a global search method, the fifth calculation formula is used to calculate the updated position of each individual whale. The fifth calculation formula is: in, is the kth component of the updated position of an individual whale, is the kth component of the whale's individual position before update, j is the current iteration number, is the kth component in the position of a random whale individual in the whale cluster, where the kth component represents the kth hyperparameter in a set of hyperparameters, D k is the first intermediate parameter, D k The |·| in represents the calculation of the absolute value, r2 is a random number between 0 and 1, and C1 is the second intermediate parameter.
8. A cloud computing server performance prediction model training device, characterized in that: include: A first acquisition module is used to acquire performance indicator data of a cloud computing server; A first processing module, used for performing standardization processing on the performance indicator data; A sample screening module, used to screen out performance indicator data exceeding the alarm threshold from the performance indicator data after standard processing, form the performance indicator data exceeding the alarm threshold into a first sample set, and form the performance indicator data not exceeding the alarm threshold into a second sample set; A sample expansion module, configured to expand the first sample set according to a ratio of the number of samples in the first sample set to the number of samples in the second sample set; A sample division module, used for dividing the expanded first sample set and the second sample set into a training set and a test set; A hyperparameter optimization module is used to build a cloud computing server performance prediction model and use a whale optimization algorithm to optimize the hyperparameters of the cloud computing server performance prediction model to obtain the optimal hyperparameters; A hyperparameter configuration module, used to configure the hyperparameters of the cloud computing server performance prediction model according to the optimal hyperparameters; The model training module is used to train the cloud computing server performance prediction model using the training set after the hyperparameter configuration is completed, and to test the prediction performance of the cloud computing server performance prediction model using the test set after the training converges.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Server performance prediction method based on particle swarm optimization nerve network
CN103164742A
Cloud server aging prediction method based on GA-GRU model
CN113377639A
A government and enterprise service system-oriented performance prediction method and system
CN113656266A
Cloud server fault diagnosis method based on WT-GA-GRU model
CN113821401A
Cited By
Satellite abnormal instruction detection method and device, satellite and storage medium
CN119154938A
Wafer processing device and method, electronic equipment and computer medium
CN121552242A
