CPU trend prediction method and device and computer storage medium
By constructing the orderly classification variables and continuous variables of the CPU performance index data, and selecting the fitting or classification algorithm based on the linear relationship, the CPU trend is predicted, and the problem of the dynamic change of the CPU utilization rate in the existing technology has achieved the CPU. Continuous prediction of utilization rate supports the optimization of system resources.
Patent Information
- Application Number
- CN202411492209.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art is difficult to effectively capture the continuity and dynamicity of CPU utilization over time, making it difficult to accurately plan and system optimization in practical applications.
By constructing ordered categorical variables and continuous variables based on the collected CPU performance index data, it is judged whether there is a linear relationship between the two. If so, a fitting algorithm will be used. If not, a classification algorithm will be used to predict the future cycle. CPU trends.
The continuous trend forecast for the CPU utilization rate in the future will support the accurate planning and performance optimization of system resources.
Smart Images

Figure CN119357003A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a CPU trend prediction method, device and computer storage medium. Background Art
[0002] In computer science, CPU utilization prediction is crucial for system resource management. In related technologies, CPU utilization prediction solutions can only provide discrete numerical predictions at a specific time point, but fail to capture the continuity and dynamics of CPU utilization over time. Therefore, they cannot effectively reflect the dynamic trend of CPU utilization over time, making it difficult to perform accurate resource planning and system optimization based on the prediction results in practical applications. Summary of the invention
[0003] The main purpose of this application is to provide a CPU trend prediction method, device and computer storage medium, aiming to solve the technical problem of how to achieve continuous trend prediction of CPU utilization in future cycles.
[0004] To achieve the above purpose, the present application provides a CPU trend prediction method, which includes: Based on the collected CPU performance indicator data, construct an ordered categorical variable and a continuous variable corresponding to the CPU performance indicator data; Determine whether there is a linear relationship between the ordered categorical variable and the continuous variable, and if there is a linear relationship between the ordered categorical variable and the continuous variable, adopt a fitting algorithm; If there is no linear relationship between the ordered categorical variable and the continuous variable, a classification algorithm is used; The CPU performance indicator data is processed according to the classification algorithm or the fitting algorithm, the CPU trend in the future period is predicted, and the prediction result is output.
[0005] In one embodiment, the step of constructing an ordered categorical variable and a continuous variable corresponding to the CPU performance indicator data based on the collected CPU performance indicator data includes: Taking the performance indicators collected at the same collection time point as elements, constructing a performance indicator set corresponding to the collection time point; Sorting the performance indicator set based on the collection time point to construct a performance indicator set sequence; Based on a preset time interval, the performance indicator set sequence is divided into a plurality of sub-performance indicator set sequences as the ordered classification variables; and The same performance indicators collected at different collection time points are sorted based on the collection time points to construct a performance indicator sequence as the continuous variable.
[0006] In one embodiment, the step of determining whether there is a linear relationship between the ordered categorical variable and the continuous variable comprises: Performing a trend test on the CPU performance indicator data, establishing a null hypothesis and an alternative hypothesis, wherein the null hypothesis indicates that there is no linear relationship between the ordered categorical variable and the continuous variable, and the alternative hypothesis indicates that there is a linear relationship between the ordered categorical variable and the continuous variable; Calculating a statistic according to a trend test formula, wherein the statistic is used to test the linear relationship between the ordered categorical variable and the continuous variable; Based on the degrees of freedom and the statistic, a significance level is determined, where the significance level is the probability that the performance indicator data will appear under the premise that the null hypothesis is true.
[0007] In one embodiment, the step of determining the significance level based on the degrees of freedom and the statistic comprises: When the significance level is less than or equal to the preset significance level, the null hypothesis is rejected and the alternative hypothesis is accepted to determine that there is a linear relationship between the ordered categorical variable and the ordered variable; When the significance level is greater than the preset significance level, the null hypothesis is accepted to determine that there is no linear relationship between the ordered categorical variable and the ordered variable.
[0008] In one embodiment, the step of processing the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicting the CPU trend in a future period, and outputting the prediction result includes: The performance indicator data is processed by using a fitting algorithm to obtain a linear regression equation of the CPU trend in a future period; Based on the linear regression equation, a continuous function image distributed over time is output.
[0009] In one embodiment, the step of outputting a continuous function image distributed over time based on the linear regression equation comprises: Determine the predicted value of the CPU performance index corresponding to each time point according to the linear regression equation; Matching the performance indicator prediction value with the time point and outputting a continuous function image; Identifying a maximum predicted value in the continuous function graph, and comparing the maximum predicted value with the CPU performance threshold; If the maximum predicted value is greater than the CPU performance threshold, an adjustment mechanism is triggered to adjust the CPU performance indicator data.
[0010] In one embodiment, the step of processing the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicting the CPU trend in a future period, and outputting the prediction result further includes: Processing the performance indicator data using a classification algorithm to obtain a category or state of the CPU in a future cycle; The classification probability results for each of the categories or states are calculated to predict the probability distribution of CPU trends.
[0011] In one embodiment, the step of calculating the classification probability result of each of the categories or states to predict the probability distribution of the CPU trend includes: Classifying the CPU performance indicator data and determining a classification result of each of the CPU performance indicator data; Counting the number of samples of each classification result, and calculating the relative frequency of the number of samples of each classification result relative to the total number of samples as the classification probability; According to the classification probability of each of the classification results, a probability distribution diagram of the CPU trend is obtained, and a prediction result is output.
[0012] An embodiment of the present application also provides a CPU trend prediction device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the CPU trend prediction method described above.
[0013] An embodiment of the present application also provides a computer storage medium, which is a computer-readable storage medium. A computer program is stored on the computer storage medium. When the computer program is executed by a processor, the steps of the CPU trend prediction method described above are implemented.
[0014] The embodiment of the present application discloses a CPU trend prediction method, which constructs ordered categorical variables and continuous variables corresponding to the CPU performance indicator data based on the collected CPU performance indicator data; determines whether there is a linear relationship between the ordered categorical variables and the continuous variables, and if there is a linear relationship between the ordered categorical variables and the continuous variables, adopts a fitting algorithm; if there is no linear relationship between the ordered categorical variables and the continuous variables, adopts a classification algorithm; processes the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicts the CPU trend in the future period, and outputs the prediction result. The present application realizes the dynamic prediction of the CPU trend in the future period by performing trend inspection and algorithm selection on the CPU performance indicator data, and effectively supports the accurate planning and performance optimization of system resources by providing continuous CPU trend prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of the first embodiment of the CPU trend prediction method involved in the embodiment scheme of the present application; Figure 2 Another brief flow chart of the first embodiment of the CPU trend prediction method involved in the embodiment of the present application; Figure 3 This is a flow chart of a second embodiment of a CPU trend prediction method according to an embodiment of the present application; Figure 4 A brief flow chart of a selector of a second embodiment of a CPU trend prediction method involved in an embodiment of the present application; Figure 5 This is a structural diagram of the CPU trend prediction device for this application.
[0016] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0017] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0018] In computer science, CPU utilization prediction is crucial for system resource management. In related technologies, CPU utilization prediction solutions mostly rely on statistical methods or machine learning techniques, which can usually only provide discrete numerical prediction results and cannot effectively reflect the dynamic change trend of CPU utilization over time, making it difficult to perform accurate resource planning and system optimization based on the prediction results in actual applications.
[0019] In order to solve the above-mentioned defects existing in the related art, the embodiment of the present application proposes a CPU trend prediction method, which constructs an ordered categorical variable and a continuous variable corresponding to the CPU performance indicator data based on the collected CPU performance indicator data; determines whether there is a linear relationship between the ordered categorical variable and the continuous variable, and if there is a linear relationship between the ordered categorical variable and the continuous variable, a fitting algorithm is used; if there is no linear relationship between the ordered categorical variable and the continuous variable, a classification algorithm is used; the CPU performance indicator data is processed according to the classification algorithm or the fitting algorithm, the CPU trend in the future period is predicted, and the prediction result is output. The present application realizes the dynamic prediction of the CPU trend in the future period by performing trend inspection and algorithm selection on the CPU performance indicator data, and effectively supports the accurate planning and performance optimization of system resources by providing continuous CPU utilization trend prediction.
[0020] For ease of understanding, the technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0021] The CPU trend prediction method of the first embodiment proposed in this application, please refer to Figure 1 The method comprises steps S10 to S40: Step S10: Based on the collected CPU performance indicator data, construct ordered categorical variables and continuous variables corresponding to the CPU performance indicator data.
[0022] It should be noted that CPU performance indicator data usually comes from system ports and is collected through tracking points, crawlers, etc. Tracking points are used to collect data when the system is running by pre-setting data collection points in the system. Crawlers are used to automatically capture data on the Internet by writing programs. CPU performance indicator data includes actual CPU load, actual CPU usage, CPU waiting time, CPU running time, and number of CPU interrupts.
[0023] Optionally, the collected CPU performance indicator data is cleaned, including deleting duplicate values, processing missing values, consistency processing, and outlier processing. Data cleaning can improve the quality of CPU performance indicator data, thereby improving the accuracy and reliability of subsequent analysis and prediction. By deleting duplicate values, the influence of redundant data on the analysis and prediction results can be avoided; by processing missing values, gaps in the data can be filled or data with missing values can be deleted to ensure data integrity; by consistency processing, the uniformity of data format and unit can be ensured to facilitate subsequent analysis and prediction; by processing outliers, outliers in the data can be identified and processed to avoid interference of outliers on the analysis and prediction results.
[0024] Optionally, performance indicators collected at the same collection time point are used as elements to construct a performance indicator set corresponding to the collection time point; the performance indicator set is sorted based on the collection time point to construct a performance indicator set sequence; based on a preset time interval, the performance indicator set sequence is divided into multiple sub-performance indicator set sequences as the ordered categorical variable; and the same performance indicators collected at different collection time points are sorted based on the collection time point to construct a performance indicator sequence as the continuous variable.
[0025] It should be noted that ordered categorical variables refer to variables that have clear order of values in data analysis. These categories are sorted according to certain standards but are not continuous. For example, in CPU performance indicator data, the CPU load status can be divided into three levels: "low", "medium" and "high". These levels are sorted by performance intensity, but there is no continuous numerical relationship between the levels.
[0026] It should be noted that a continuous variable refers to a variable whose value is a real number, which can change continuously within a certain range and has an infinite number of possible values. In CPU performance indicator data, continuous variables are CPU performance indicators that are measured continuously over time, such as CPU usage. These performance indicators can take any value within their definition domain, including decimals, thereby reflecting subtle changes in the corresponding CPU performance.
[0027] Exemplarily, based on the collected CPU performance indicator data, corresponding ordered categorical variables and continuous variables are constructed. The performance indicators at the same collection time point are constructed into a performance indicator set. For example, the performance indicator set at 08:00 includes a load rate of 30%, a utilization rate of 20%, a temperature of 50°C, etc.; the performance indicator set at 09:00 includes a load rate of 35%, a utilization rate of 30%, a temperature of 55°C, etc. The performance indicator set is then sorted according to the collection time point to form a performance indicator set sequence, such as a performance indicator set sequence from 08:00 to 10:00. Then, based on a preset time interval, the performance indicator set sequence is divided into multiple sub-performance indicator set sequences as ordered categorical variables. If each hour is set as a time interval, the performance indicator set sequence from 08:00 to 10:00 is divided into two sub-performance indicator set sequences: a sub-sequence from 08:00 to 09:00 and a sub-sequence from 09:00 to 10:00.
[0028] At the same time, the same performance indicators collected at different collection time points are sorted based on the collection time points to construct a performance indicator sequence as a continuous variable. Taking the actual CPU usage rate as an example, the performance indicator sequence of the actual CPU usage rate is 20%, 35%, 40%, and 45%.
[0029] Step S20: determining whether there is a linear relationship between the ordered categorical variable and the continuous variable; if there is a linear relationship between the ordered categorical variable and the continuous variable, adopting a fitting algorithm.
[0030] Step S30: When there is no linear relationship between the ordered categorical variable and the continuous variable, a classification algorithm is used.
[0031] It should be noted that a linear relationship refers to a direct proportional relationship between two variables, that is, the change of one variable can be expressed by a linear function of another variable. In mathematics, it is usually expressed as of the form, where is the dependent variable, is the independent variable, and is a constant.
[0032] Determining whether there is a linear relationship between variables usually relies on correlation coefficients (such as the Pearson correlation coefficient), which can quantify the strength and direction of the linear relationship between two variables. When the correlation coefficient between two variables is close to 1 or -1, it indicates that there is a strong linear relationship between them; if the correlation coefficient is close to 0, it indicates that the linear relationship between them is weak and there may be a nonlinear relationship. By using statistical methods to evaluate the trend of CPU performance indicator data over time, determine whether there is a linear relationship between ordered categorical variables and continuous variables, and then select a suitable algorithm based on the changing characteristics of CPU performance indicator data.
[0033] Having a linear relationship means that the trend of change between variables can be described by a straight line (one-dimensional) or a plane (multi-dimensional). In this case, it is appropriate to use a fitting algorithm (such as linear regression) because the fitting algorithm aims to find a best-fit line or plane to minimize the difference between the observed and predicted values. The purpose of the fitting algorithm is to capture the linear relationship between variables and make predictions or decisions based on this relationship.
[0034] On the contrary, when there is no linear relationship between variables, it means that their changing trends cannot be effectively described by a straight line or a plane, and the distribution of the data may have obvious category boundaries. In addition, when there is no linear relationship between variables, there may be interactions between variables, which means that the impact of one variable may depend on the level of another variable. Therefore, more complex functional forms, such as polynomials, exponentials, logarithms, etc., are required to process these data. In this case, classification algorithms are more appropriate. Because classification algorithms can better handle nonlinear relationships between variables and can capture complex interactions and patterns between variables. The purpose of classification algorithms is to predict the category or label of the output variable based on the values of the input variables.
[0035] The linear fitting algorithm is based on the principle of minimizing the sum of squared errors and can find the best fitting straight line so that the difference between the predicted value and the actual value is minimized.
[0036] The following uses the least squares method to prove the applicability of the linear fitting algorithm: Suppose there is a set of data points , we want to find a straight line To fit these points, determine the parameters in the linear fit (slope) and (Intercept). First, define the objective function S as follows:
[0037] In order to find the objective function Minimum parameters , for S Find the partial derivative and set it to zero. Because when the partial derivative is zero, the objective function S reaches its minimum value.
[0038]
[0039] By rearranging the above equation (1), we can obtain:
[0040]
[0041]
[0042] remember for , for , for , then equation (1) can be written as:
[0043] Similarly, in order to find the objective function Minimum parameters , for S Find the partial derivatives and set them to zero.
[0044]
[0045] By rearranging the above equation (3), we can obtain:
[0046]
[0047] remember for , then equation (3) can be written as:
[0048] Then solve the system of simultaneous equations, substitute equation (4) into equation (2), and we get for:
[0049]
[0050]
[0051]
[0052] Then Substituting the value of into equation (4), we get for:
[0053]
[0054]
[0055] This way you can get and The optimal solution is used to calculate the parameters of the fitted line. This proves the effectiveness of the linear fitting algorithm when the data has a linear relationship and can effectively find the best fitting line.
[0056] By performing linear fitting on the CPU performance index data, we can observe the closeness between the fitting line and the data points. If the fitting line can pass through the data points well, it means that the linear fitting algorithm is suitable for the data set.
[0057] In order to prove the applicability of the classification algorithm when processing data sets that do not have a linear relationship, this embodiment uses a decision tree to prove: It should be noted that information gain is a key indicator used in decision tree algorithms to select features for segmentation. When building a decision tree, you need to select a feature at each node to segment the data set. The purpose is to determine which feature can minimize the uncertainty of the data, so that the data of the child node is as "pure" as possible (that is, the samples in the same child node belong to the same category as much as possible).
[0058] Information gain measures the change in entropy before and after a feature is used to segment the data. Entropy is a measure of the uncertainty of a data set. The greater the information gain, the more the uncertainty of the data is reduced after the feature is segmented.
[0059] Specifically, the information gain is calculated as follows:
[0060] in, is the training set, is a feature, are all possible values of the feature, is the feature in the training set The value of A subset of Is the training set The entropy of .
[0061] The calculation formula for entropy is:
[0062] in, It is The relative frequency of the classes in the training set.
[0063] After calculating the information gain of each feature, the feature with the largest information gain is selected as the node of the decision tree to split the data set.
[0064] Next, in order to ensure that the constructed decision tree model has good generalization ability, methods such as cross-validation are used to evaluate the performance of the model. The core tool for evaluating model performance is the confusion matrix, which intuitively shows the relationship between the actual category and the model predicted category. Based on the confusion matrix, the accuracy ( )、Accuracy( )、Recall( ) and F1 score ( ) and other evaluation metrics that provide quantitative measures of model performance.
[0065] The evaluation index calculation formula is as follows:
[0066]
[0067]
[0068]
[0069] in, It is a real example. It is a true negative example. It is a false positive example. is a false negative example.
[0070] Specifically, assume that there is the following confusion matrix:
[0071] In this confusion matrix, the true positive is 100, true negative examples is 200, false positive is 20, false negative is 50.
[0072] Based on the confusion matrix, the accuracy, precision, recall and F1 score are calculated as follows:
[0073]
[0074]
[0075]
[0076] Based on the calculation results of the above evaluation indicators, it can be seen that the classification model performs well when processing data sets that do not have a linear relationship. The accuracy is much higher than the level of random guessing (50%), and the F1 score shows that the model has achieved a good balance between precision and recall.
[0077] Since these evaluation metrics are relatively high, there is good reason to believe that the classification algorithm is suitable for this dataset. This further confirms that when the dataset does not have a linear relationship, the classification algorithm can effectively classify the data and provide reliable prediction results.
[0078] Optionally, after data cleaning is completed, the cleaned CPU performance indicator data is input into the CPU trend prediction core system. The CPU trend prediction core system includes an algorithm warehouse, a selector, and a calculator. The algorithm warehouse is the core part of the system and supports a variety of regression algorithms, including linear regression, polynomial regression, ridge regression, stepwise regression, lasso regression, etc., to adapt to different types of data features and analysis requirements.
[0079] As the decision-making unit of the core system of CPU trend prediction, the selector is responsible for selecting the appropriate algorithm from the algorithm warehouse to process a specific data set. The selector first performs a primary screening of the CPU performance indicator data, and uses the Cochran-Armitage trend test to evaluate the linear trend of the data, that is, whether the CPU performance indicator data is suitable for a classification algorithm or a fitting algorithm. Based on the judgment results of the primary screening, the selector will enter the secondary screening and select a suitable regression algorithm or classification algorithm from the algorithm warehouse according to the specific attributes of the CPU performance indicator data, such as the linear relationship between the independent variable and the dependent variable, multicollinearity, data dimension, regularization requirements, and whether dimensionality reduction is required.
[0080] The calculator is the component that performs the actual calculation task. It is used to receive the CPU performance indicator data after the algorithm and data cleaning filtered by the selector, and perform detailed algorithm calculation and analysis. The task of the calculator is to perform regression analysis on the CPU performance indicator data according to the selected algorithm and generate a prediction model. The prediction model can describe the linear relationship of the CPU performance indicator over time, or in the classification problem, predict the probability distribution of the CPU performance indicator.
[0081] Optionally, the selector uses the Cochran-Armitage trend test to perform a primary screening on the CPU performance indicator data. First, establish the null hypothesis and the alternative hypothesis. Establishing the hypothesis is an important step in the Cochran-Armitage trend test. The null hypothesis is that there is no linear trend between the ordered categorical variable and the continuous variable, that is, there is no linear relationship between the ordered categorical variable and the continuous variable. The alternative hypothesis indicates that there is a linear relationship between the ordered categorical variable and the continuous variable. Among them, the alternative hypothesis can be selected as unilateral or bilateral according to actual needs, such as a unilateral upward trend or a unilateral downward trend. Then, according to the trend test formula, calculate the statistic , the statistic is used to test the linear relationship between the ordered categorical variable and the continuous variable. According to the degree of freedom and the numerical value of the statistic, the significance level p-value, that is, the result of the hypothesis test, can be calculated. The significance level can be understood as the probability that the CPU performance indicator data appears under the premise that the null hypothesis is true. When the significance level is less than or equal to the preset significance level, the null hypothesis is rejected and the alternative hypothesis is accepted, and it is determined that there is a linear relationship between the ordered categorical variable and the ordered variable; when the significance level is greater than the preset significance level, the null hypothesis is accepted, and it is determined that there is no linear relationship between the ordered categorical variable and the ordered variable.
[0082] It should be noted that the statistic is a value between -1 and 1, which is used to measure the strength of the linear relationship between the ordered categorical variable and the continuous variable.
[0083] It should be noted that the alternative hypothesis can be divided into the following three situations: a unilateral upward trend, in which the ordered categorical variable has an upward trend as the continuous variable increases; a unilateral downward trend, in which the ordered categorical variable has a downward trend as the continuous variable increases; a bilateral trend, in which there is a certain linear trend between the ordered categorical variable and the continuous variable, but there is no restriction on whether it is increasing or decreasing.
[0084] For example, the Cochran-Armitage trend test is used to detect whether there is a trend relationship between the ordered categorical variables and the continuous variables. First, the null hypothesis (H0) is established: there is no linear relationship between the time period division and the actual CPU usage. The alternative hypothesis (H1) is established: there is a linear relationship between the time period division and the actual CPU usage, and it is expected that the CPU usage is the highest during the peak period and the lowest during the off-peak period, that is, there is a downward trend from the peak to the off-peak.
[0085] According to the formula of Cochran-Armitage trend test, the statistic is calculated This step involves coding the time periods and recording the observed values of CPU usage corresponding to each time period. The calculation formula for the Cochran-Armitage trend test is as follows:
[0086] in, is the number of categories for an ordered categorical variable, It is in The observed sample size in the category, It is in The number of events observed in the category, It is in The number of events observed in the category, is the total sample size.
[0087] According to the calculated Value and The probability distribution based on the value is used to determine the significance level p value. If the p value is less than or equal to the pre-set significance level (for example, the pre-set significance level is 0.05), the null hypothesis is rejected, and it is believed that there is a significant linear trend between the time period division and the actual CPU usage rate; if the p value is greater than the significance level, the null hypothesis cannot be rejected, indicating that there is insufficient evidence to support the hypothesis that there is a linear relationship between the time period and the CPU usage rate.
[0088] Optionally, after the first-level screening determines that the CPU performance indicator data has a linear trend, the selector enters the second-level screening stage. The second-level screening stage is used to screen out algorithms suitable for the current data set from the algorithm warehouse. The second-level screening stage determines whether the current data set is suitable for a classification algorithm or a fitting algorithm based on the specific attributes of the CPU performance indicator data. The factors to be considered mainly include (1) the linear relationship between the independent variable and the dependent variable; (2) the multicollinearity of the independent variables; (3) the number of data dimensions (i.e., the number of independent variables and dependent variables); (4) the necessity of regularization; (5) whether dimensionality reduction is required (such as the dimension coefficient becoming 0), etc.
[0089] Optionally, when the output result of the Cochran-Armitage trend test indicates that there is a linear relationship between the ordered categorical variable and the continuous variable (i.e., the p-value is less than or equal to the pre-set significance level), a fitting algorithm, such as linear regression, is selected to analyze the CPU performance indicator data because the data exhibits a certain linear pattern. On the contrary, if the output result of the trend test shows that there is no linear trend between the ordered categorical variable and the continuous variable (i.e., the p-value is greater than the pre-set significance level), it is necessary to consider using a classification algorithm, such as logistic regression or decision tree, to process the CPU performance indicator data because the CPU performance indicator data may be more suitable for a classification model to capture its inherent patterns or classification boundaries. Ultimately, the results of the secondary screening will directly guide the execution of the calculator. The calculator will process the CPU performance indicator data based on the algorithm type determined by the secondary screening to ensure that the algorithm used can effectively capture the patterns and trends of the CPU performance indicator data.
[0090] For example, if the Cochran-Armitage trend test result shows that there is a significant linear relationship between the time period division and the actual CPU usage (for example, p value = 0.01 < 0.05), then a fitting algorithm can be selected to analyze the CPU performance indicator data. Linear regression is selected as the analysis tool because the data shows a significant linear trend. The time period is used as the independent variable ( ), taking the actual CPU usage as the dependent variable ( ), and ensure that the data has been cleaned and there are no duplicate values, missing values, or outliers. Use the least squares method to perform linear regression analysis on the data and establish a linear model ,in is the intercept, is the slope, is the error term. By building a linear model, you can predict the CPU usage based on the time period or analyze the trend of CPU usage over time.
[0091] For example, if the Cochran-Armitage trend test result shows that there is no linear relationship between the time period division and the actual CPU usage (for example, p value = 0.15> 0.05), a classification algorithm can be selected to process the CPU performance indicator data. Decision tree or logistic regression is selected as the analysis tool because the CPU performance indicator data may be more suitable for classification models to capture its inherent patterns. Use time period as an independent variable ( ), and discretize the actual CPU usage to form a categorical target variable ( ). Use the decision tree algorithm to construct classification rules by recursively splitting the data set; or use the logistic regression algorithm to classify and analyze the data and build a classification model to predict which category the CPU usage belongs to in different time periods. By building this logistic regression model, you can predict whether the CPU usage belongs to the "low", "medium" or "high" category according to the time period, or analyze the classification characteristics of the CPU usage in different time periods.
[0092] Step S40: Processing the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicting the CPU trend in a future period, and outputting the prediction result.
[0093] It should be noted that, when the fitting algorithm is used, a linear model will be established to predict the trend of CPU performance indicators in the future period; if the classification algorithm is selected, a classification model will be established to predict the classification probability of CPU performance indicators in the future period.
[0094] Optionally, a fitting algorithm is used to process the CPU performance index data to obtain a linear regression equation for the CPU trend in the future period. The linear regression equation for the CPU trend prediction output by the calculator is received, and a corresponding continuous function image distributed over time is output according to the linear regression equation.
[0095] Specifically, the linear regression equation is converted into a continuous function image distributed over time. The parameters of the linear regression model are determined, and the parameters are obtained by minimizing the square error between the actual observations in the historical data and the model predictions. Once the model parameters are determined, the value range of the independent variable is selected, such as the range of the time period, and then the value of the independent variable is selected at equal intervals within the time period or as needed. The independent variable value is substituted into the linear regression equation to calculate the corresponding dependent variable value, that is, the predicted CPU performance indicator trend. Through the above calculations, a series of point pairs are generated, each point pair contains an independent variable value and a dependent variable value, that is, according to the linear regression equation, the predicted value of the CPU performance indicator corresponding to each time point is determined.
[0096] Then use drawing software or programming libraries, such as Matplotlib or Excel, to plot these point pairs on the coordinate axis, with the independent variable value as the horizontal axis and the dependent variable value as the vertical axis, that is, match the predicted value of the CPU performance indicator with the time point and output a continuous function graph.
[0097] By connecting these points, a curve or straight line is formed, which represents the trend of the CPU performance index over time or other independent variables within the selected independent variable range. Finally, a continuous function image distributed over time is obtained, which shows the trend forecast of the CPU performance index. Then, based on the continuous function image, the maximum predicted value in the continuous function image is identified, and the maximum predicted value is compared with the CPU performance threshold. If the maximum predicted value is greater than the CPU performance threshold, the adjustment mechanism is triggered to adjust the CPU performance index data.
[0098] Optionally, a classification algorithm is used to process the CPU performance indicator data to obtain the category or state of the CPU in the future cycle. The classification probability result of each category or state calculated by the calculator is received to predict the probability distribution of the CPU trend.
[0099] Specifically, a classification algorithm is used to process CPU performance indicator data to predict the state of the CPU in future cycles. First, the data needs to be cleaned to ensure that the data is suitable for model training. Next, a suitable classification algorithm is selected, such as decision tree, random forest, support vector machine, or naive Bayes, and the data set is divided into a training set and a test set. The model is trained using the training set, and the model will learn the relationship between CPU usage and each feature. After training, the model can output a probability estimate for each input sample belonging to each category. The probability can be calculated using an activation function such as the softmax function, which reflects the model's confidence that the sample belongs to each CPU usage state. Then, the model is evaluated using the test set, and the model performance is measured by calculating indicators such as accuracy, recall, and F1 score.
[0100] Ultimately, the model will be used to predict the state of the CPU in future cycles and gain insight into the trend of CPU usage by analyzing the predicted probability distribution.
[0101] Optionally, the step of calculating the classification probability result of each category or state to predict the probability distribution of the CPU trend includes: classifying the CPU performance indicator data to determine the classification result of each CPU performance indicator data; counting the number of samples of each classification result, and calculating the relative frequency of the number of samples of each classification result relative to the total number of samples as the classification probability; according to the classification probability of each classification result, obtaining the probability distribution diagram of the CPU trend, and outputting the prediction result. In the process of outputting the prediction result, the discrete classification probability can be converted into a continuous CPU utilization time series through sequence reconstruction technology, including estimating the possible duration of each state in the prediction period, and using the linear interpolation method to create a smooth transition between state transition points, thereby constructing a continuous CPU utilization prediction curve.
[0102] Furthermore, in order to make the time series smoother and reduce noise and fluctuations, the interpolated series can be smoothed, such as by applying a moving average or a low-pass filter. The final prediction results are output in the form of charts and numerical reports. The charts include probability distribution graphs and time series curves, which intuitively show the prediction of the future trend of the CPU, while the numerical reports provide specific prediction values, such as the predicted CPU utilization and state duration at each time point.
[0103] Exemplarily, the CPU performance index data is classified using the classification model to determine the classification result to which each CPU performance index data point belongs. According to the actual load rate of the CPU, its state is divided into three categories: "low load", "medium load" and "high load". Through statistical analysis of the model prediction results, the following classification probability distribution diagrams are obtained: the probability of the "low load" state is 0.4, the probability of the "medium load" state is 0.5, and the probability of the "high load" state is 0.1.
[0104] Next, to convert these classification probabilities into a continuous time series, we assume that starting from t = 0, based on the state probability distribution, we can estimate which state the CPU may be in during the next period of time. For example, if the model predicts that the CPU is in the "low load" state at t = 0, then it is reasonable to assume that the CPU utilization will remain at a low level in the next 2 hours.
[0105] On this basis, the time series reconstruction is performed. First, the start and end time points of each state are determined. For example, if the CPU is in the "low load" state at t=0, and it is predicted that this will last for 2 hours, then the end time point of the "low load" state will be t=2. During these 2 hours, it is assumed that the CPU utilization remains at a fixed low level. Similar processing is performed for the "medium load" and "high load" states. Then, linear interpolation is used to create a smooth transition between the state transition points, and a continuous CPU utilization curve can be obtained.
[0106] In this way, not only can the possible state of the CPU in the future time period be predicted, but also a continuous utilization prediction curve can be provided. This prediction curve can help managers better understand the dynamic changes of CPU load and make accurate resource allocation decisions.
[0107] Optionally, after the calculator base processes the CPU performance indicator data according to the determined algorithm type, the system will make decisions and execute according to the output results (classification / fitting results) of the calculator. By analyzing the prediction results output by the calculator and comparing the maximum predicted CPU value in the continuous function image corresponding to the prediction results with the CPU performance threshold, it is evaluated whether there is a dangerous moment in the CPU operating state in the future cycle. If the prediction results indicate that there is a risk of a dangerous moment, the system will automatically trigger the execution phase and take predetermined measures to reduce the risk, such as by adjusting the CPU predicted load for the next cycle.
[0108] The execution phase includes dynamic adjustment of resource allocation, optimization of task scheduling, and possible physical resource expansion. These measures are designed to ensure that CPU usage remains within a safe range to avoid performance bottlenecks or system instability. At the same time, the system will continue to monitor actual CPU usage and compare it with the prediction model so that the model can be updated and optimized in real time.
[0109] In addition, the system will regularly collect new CPU performance indicator data and integrate it into the prediction model to improve the model's prediction accuracy for future trends. Through the process of self-adjustment and learning, the system can adapt to changing operating conditions and achieve efficient management and prediction of CPU resources. The entire process forms an automated closed-loop system that can continuously monitor, predict, and optimize CPU performance indicators without human intervention.
[0110] For example, to help understand the implementation process of the CPU trend prediction method of this embodiment, please refer to Figure 2 , Figure 2 A brief flowchart of a CPU trend prediction method is provided, specifically: By collecting CPU performance indicator data, the CPU performance indicator data is then cleaned to improve the quality of the CPU performance indicator data. The CPU performance indicator data after data cleaning is then input into the CPU trend prediction core system. The CPU trend prediction core system includes an algorithm warehouse, a selector, and a calculator. Among them, the algorithm warehouse integrates a variety of algorithms, including linear regression, partial least squares regression, polynomial regression, etc., to meet complex data processing needs. The algorithms in the algorithm warehouse support the entire process from structured data input to output, and have auxiliary calculation parameters. These parameters serve as a reference for the selector to select the algorithm.
[0111] As the core function of the CPU trend prediction core system, the selector mainly includes two parts: primary screening and secondary screening. The primary screening is used to determine whether the input data is linear, that is, whether the data is suitable for classification or fitting algorithm, and the secondary screening determines the specific algorithm based on the auxiliary calculation parameters.
[0112] In the first-level screening stage, the selector first performs a preliminary analysis of the input data set to determine whether the data meets the assumption of a linear relationship. This step uses statistical test methods, such as the Cochran-Armitage trend test, to evaluate the correlation between variables.
[0113] After completing the first-level screening, the second-level screening further refines the algorithm selection process. In the second-level screening stage, the selector determines the algorithm that is suitable for the current data set and prediction target based on the core characteristic parameters of the algorithm, such as model complexity, overfitting risk, training time, etc. For example, if the data set has multicollinearity and the feature dimension of the data set is too high, Lasso (Least absolute shrinkage and selection operator) regression or lasso regression may be selected.
[0114] In this embodiment, the calculator is an efficient data processing module. The calculator not only performs the operation of the algorithm, but also monitors the algorithm performance and adjusts the parameters. The calculator receives the preprocessed and sorted time series data and inputs it into the selected algorithm for training and prediction. In the case of the fitting algorithm, the calculator will output a linear regression equation or other form of mathematical model to predict the CPU usage in the future cycle; in the case of the classification algorithm, the calculator will output the classification probability to predict the state that the CPU may be in in the future cycle.
[0115] Finally, decisions and actions are made based on the output of the calculator. For the fitting algorithm, a continuous prediction function graph will be obtained, showing the trend of CPU usage over time; for the classification algorithm, a series of classification probability values will be obtained, indicating the possible state distribution of the CPU in different time periods. Based on the results of classification or fitting, the operating status of the CPU in future cycles can be predicted and evaluated, and corresponding measures can be taken to optimize system performance or avoid potential risks.
[0116] Based on the above embodiments, the CPU trend prediction method of the second embodiment proposed in this application is shown in FIG. Figure 3 ,The selector of the CPU trend prediction core system in this method mainly includes the following steps: Step S201: Determine whether there is a linear relationship between the ordered categorical variable and the continuous variable.
[0117] It should be noted that in the selector, the first-level filter is used to determine whether the data is linear, that is, to determine whether the CPU performance indicator data is suitable for the classification algorithm or the fitting algorithm.
[0118] Step S202: If there is a linear relationship between the ordered categorical variable and the continuous variable, a fitting algorithm is used for the CPU performance indicator data.
[0119] Step S203: If there is no linear relationship between the ordered categorical variable and the continuous variable, a classification algorithm is applied to the CPU performance indicator data.
[0120] It should be noted that, based on the results of the first-level screening, the second-level screening determines the specific algorithm under the classification algorithm or fitting algorithm used for the CPU performance indicator data.
[0121] For example, to help understand the implementation process of the selector of this embodiment, please refer to Figure 4 , Figure 4 A brief flow diagram of the selector is provided, specifically: First, the Cochran-Armitage trend test is performed to determine whether there is a linear trend between the ordered categorical variable and the continuous variable. If the test results show that there is no linear trend between the ordered categorical variable and the continuous variable, the selector will select a classification algorithm, such as logistic regression, which is suitable for situations where there is no obvious linear relationship between the ordered categorical variable and the continuous variable.
[0122] When the trend test results indicate that there is a linear trend between the ordered categorical variable and the continuous variable, the selector will select the fitting algorithm and further analyze whether there is a nonlinear relationship between the independent and dependent variables. If there is a nonlinear relationship, the selector will use the polynomial regression algorithm, which can fit the data points to form a nonlinear function, thereby better capturing the complex patterns of the data.
[0123] If there is no nonlinear relationship between the independent and dependent variables, but there is multicollinearity between the independent variables, the selector will choose an algorithm based on the data dimension and whether regularization is needed. If the data dimension is not high and the data does not need regularization and is not overfitted, ridge regression may be used to solve the multicollinearity problem. If the data dimension is too high, the selector will consider using lasso regression or lasso regression. Lasso regression can compress certain dimensional coefficients to zero, thereby achieving feature selection and dimensionality reduction; if the dimensional coefficient does not need to be 0, then lasso regression is selected. In the case of low data dimension, if the data needs regularization to improve the generalization ability of the model, the selector may choose ElasticNet regression.
[0124] If the data is not high dimensional and regularization is not needed, but there is a risk of overfitting, the selector may use stepwise regression, which is a greedy algorithm that builds a model by gradually adding or removing variables to prevent overfitting.
[0125] The present application provides a CPU trend prediction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the CPU trend prediction method in the above-mentioned embodiment one.
[0126] Reference below Figure 5 , which shows a schematic diagram of the structure of a CPU trend prediction device suitable for implementing the embodiment of the present application. The CPU trend prediction device in the embodiment of the present application may include various hardware and software components for implementing the scheduling method of the inspection task. Figure 5 The CPU trend prediction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0127] like Figure 5 As shown, the CPU trend prediction device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the CPU trend prediction device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. Communication device 1009 can allow CPU trend prediction device to carry out wireless or wired communication with other equipment to exchange data.Although CPU trend prediction device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown.Can implement or have more or less systems alternatively.
[0128] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0129] The CPU trend prediction device provided by the present application adopts the CPU trend prediction device method in the above embodiment, which can solve the technical problem of how to achieve continuous trend prediction of CPU utilization in future cycles. Compared with the prior art, the beneficial effects of the CPU trend prediction device provided by the present application are the same as the beneficial effects of the CPU trend prediction method provided by the above embodiment, and the other technical features in the CPU trend prediction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0130] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0132] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the CPU trend prediction method in the above-mentioned embodiment.
[0133] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0134] The computer-readable storage medium may be included in the CPU trend prediction device; or may exist independently without being assembled into the CPU trend prediction device.
[0135] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the CPU trend prediction device, the CPU trend prediction device: constructs ordered categorical variables and continuous variables corresponding to the CPU performance indicator data based on the collected CPU performance indicator data; determines whether there is a linear relationship between the ordered categorical variables and the continuous variables, and if there is a linear relationship between the ordered categorical variables and the continuous variables, adopts a fitting algorithm; if there is no linear relationship between the ordered categorical variables and the continuous variables, adopts a classification algorithm; processes the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicts the CPU trend in the future period, and outputs the prediction result.
[0136] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0138] The modules involved in the embodiments described in the present application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0139] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned CPU trend prediction method, and can solve the technical problem of how to achieve continuous trend prediction of CPU utilization in future cycles. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the CPU trend prediction method provided in the above-mentioned embodiment, and will not be elaborated here.
[0140] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned CPU trend prediction method when executed by a processor.
[0141] The computer program product provided by the present application can solve the technical problem of how to achieve continuous trend prediction of CPU utilization in future cycles. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the CPU trend prediction method provided by the above embodiment, which will not be repeated here.
[0142] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0145] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A CPU trend prediction method, characterized in that: The method comprises: Based on the collected CPU performance indicator data, construct an ordered categorical variable and a continuous variable corresponding to the CPU performance indicator data; Determine whether there is a linear relationship between the ordered categorical variable and the continuous variable, and if there is a linear relationship between the ordered categorical variable and the continuous variable, adopt a fitting algorithm; If there is no linear relationship between the ordered categorical variable and the continuous variable, a classification algorithm is used; The CPU performance indicator data is processed according to the classification algorithm or the fitting algorithm, the CPU trend in the future period is predicted, and the prediction result is output.
2. The method according to claim 1, characterized in that The step of constructing ordered categorical variables and continuous variables corresponding to the CPU performance indicator data based on the collected CPU performance indicator data includes: Taking the performance indicators collected at the same collection time point as elements, constructing a performance indicator set corresponding to the collection time point; Sorting the performance indicator set based on the collection time point to construct a performance indicator set sequence; Based on a preset time interval, the performance indicator set sequence is divided into a plurality of sub-performance indicator set sequences as the ordered classification variables; and The same performance indicators collected at different collection time points are sorted based on the collection time points to construct a performance indicator sequence as the continuous variable.
3. The method according to claim 1, characterized in that The step of determining whether there is a linear relationship between the ordered categorical variable and the continuous variable comprises: Performing a trend test on the CPU performance indicator data, establishing a null hypothesis and an alternative hypothesis, wherein the null hypothesis indicates that there is no linear relationship between the ordered categorical variable and the continuous variable, and the alternative hypothesis indicates that there is a linear relationship between the ordered categorical variable and the continuous variable; Calculating a statistic according to a trend test formula, wherein the statistic is used to test the linear relationship between the ordered categorical variable and the continuous variable; Based on the degrees of freedom and the statistic, a significance level is determined, where the significance level is the probability that the performance indicator data will appear under the premise that the null hypothesis is true.
4. The method according to claim 3, characterized in that The step of determining the significance level based on the degrees of freedom and the statistics comprises: When the significance level is less than or equal to the preset significance level, the null hypothesis is rejected and the alternative hypothesis is accepted to determine that there is a linear relationship between the ordered categorical variable and the ordered variable; When the significance level is greater than the preset significance level, the null hypothesis is accepted to determine that there is no linear relationship between the ordered categorical variable and the ordered variable.
5. The method according to claim 1, characterized in that The step of processing the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicting the CPU trend in a future period, and outputting the prediction result includes: The performance indicator data is processed by using a fitting algorithm to obtain a linear regression equation of the CPU trend in a future period; Based on the linear regression equation, a continuous function image distributed over time is output.
6. The method according to claim 5, characterized in that The step of outputting a continuous function image distributed over time based on the linear regression equation comprises: Determine the predicted value of the CPU performance index corresponding to each time point according to the linear regression equation; Matching the performance indicator prediction value with the time point and outputting a continuous function image; Identifying a maximum predicted value in the continuous function graph, and comparing the maximum predicted value with the CPU performance threshold; If the maximum predicted value is greater than the CPU performance threshold, an adjustment mechanism is triggered to adjust the CPU performance indicator data.
7. The method according to claim 1, characterized in that The step of processing the CPU performance indicator data according to the classification algorithm or the fitting algorithm, predicting the CPU trend in a future period, and outputting the prediction result also includes: Processing the performance indicator data using a classification algorithm to obtain a category or state of the CPU in a future cycle; The classification probability results for each of the categories or states are calculated to predict the probability distribution of CPU trends.
8. The method according to claim 7, characterized in that The step of calculating the classification probability result of each of the categories or states to predict the probability distribution of the CPU trend includes: Classifying the CPU performance indicator data and determining a classification result of each of the CPU performance indicator data; Counting the number of samples of each classification result, and calculating the relative frequency of the number of samples of each classification result relative to the total number of samples as the classification probability; According to the classification probability of each of the classification results, a probability distribution diagram of the CPU trend is obtained, and a prediction result is output.
9. A CPU trend prediction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the CPU trend prediction method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that: The computer storage medium is a computer-readable storage medium, and a computer program is stored on the computer storage medium. When the computer program is executed by a processor, the steps of the CPU trend prediction method according to any one of claims 1 to 8 are implemented.