Method and device for predicting utilization rate of central processing unit and electronic equipment

By decomposing the CPU usage time series and using a deep learning model to extract temporal features, the problem of low prediction accuracy in the existing technology is solved and more accurate CPU usage prediction is achieved.

CN118567914APending Publication Date: 2024-08-30ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310191225.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing CPU usage prediction methods only consider time characteristics and fail to effectively capture the change patterns of data mutation points, resulting in low prediction accuracy.

Method used

By obtaining the initial time series, decomposing it into intermediate time series at different frequency scales, and inputting them into the pre-trained deep learning model for prediction, time features are extracted to predict CPU usage, taking into account the mutation point change rules of CPU usage data.

Benefits of technology

It improves the accuracy of CPU usage prediction and can more effectively capture the mutation point change patterns of data, thus improving the accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567914A
    Figure CN118567914A
Patent Text Reader

Abstract

The invention relates to a method and device for predicting the utilization rate of a central processing unit and electronic equipment, and the method comprises the steps: obtaining an initial time sequence which comprises a time sequence corresponding to the utilization rate of the central processing unit and a time sequence corresponding to a parameter factor related to the utilization rate of the central processing unit; decomposing the initial time sequence to obtain intermediate time sequences corresponding to different frequency scales; inputting the intermediate time sequence into a pre-trained deep learning model for prediction to obtain a predicted value of the utilization rate of the central processing unit; wherein the pre-trained deep learning model is used for extracting the time features of the intermediate time sequence, and predicting the utilization rate of the central processing unit according to the extracted time features. Therefore, not only is the time characteristic of the related data of the utilization rate of the central processing unit considered, but also the mutation point change rule of the related data of the utilization rate of the central processing unit is considered, so that the accuracy of a prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and in particular to a method, device and electronic device for predicting the usage rate of a central processing unit. Background Art

[0002] The central processing unit (CPU) of the device is mainly used to execute various instructions in the device system. The CPU usage rate is mainly used to measure the CPU load index, and its value represents the severity of the CPU load. When the CPU load is too heavy, it will cause the system application to freeze, and even cause the system to freeze. When the system issues an early warning for CPU usage, it means that the system is overloaded and cannot work properly. Therefore, it is necessary to issue an early warning before the CPU load is overloaded, so that the system operation and maintenance personnel can check the system in advance, find out the abnormal points, and avoid system unavailability.

[0003] However, the existing CPU usage prediction method only considers the time characteristics of the CPU usage data, but does not consider the change law of the CPU usage data mutation point, which leads to the problem of low prediction accuracy of the existing CPU usage prediction method at the CPU usage data mutation point. Summary of the invention

[0004] The present application provides a method, device and electronic device for predicting the usage rate of a central processing unit to solve the problem that the existing CPU usage prediction method only considers the time characteristics of the CPU usage data, but does not consider the changing rules of the CPU usage data mutation point, thereby resulting in the existing CPU usage prediction method having low prediction accuracy at the CPU usage data mutation point.

[0005] In a first aspect, an embodiment of the present application provides a method for predicting a usage rate of a central processing unit, the method comprising:

[0006] Acquire an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit;

[0007] Decomposing the initial time series to obtain intermediate time series corresponding to different frequency scales;

[0008] Inputting the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the utilization rate of the central processing unit;

[0009] The pre-trained deep learning model is used to extract the time features of the intermediate time series and predict the usage rate of the central processing unit based on the extracted time features.

[0010] Optionally, the parameter factors include a first factor for characterizing the usage rate of the central processing unit required for the process to run, a second factor for characterizing the usage rate of the central processing unit required for the system to wait for input and output, and a third factor for characterizing the usage rate of the central processing unit required for the system to handle interrupts;

[0011] Decomposing the initial time series to obtain intermediate time series corresponding to different frequency scales includes:

[0012] The time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales, wherein the first time series is the time series corresponding to the first factor, the second time series is the time series corresponding to the second factor, and the third time series is the time series corresponding to the third factor.

[0013] Optionally, before respectively decomposing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales, the method further includes:

[0014] Normalizing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series, and the third time series respectively;

[0015] The step of respectively decomposing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales includes:

[0016] The time series corresponding to the usage rate of the CPU after normalization, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales.

[0017] Optionally, the decomposing the time series corresponding to the usage rate of the CPU after normalization, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales includes:

[0018] Using the impulse response corresponding to the preset low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on the target time series respectively to decompose the low-frequency component and the high-frequency component corresponding to the first layer, wherein the target time series is any one of the time series corresponding to the usage rate of the central processing unit after normalization, the first time series, the second time series and the third time series;

[0019] Using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposing the low-frequency component and the high-frequency component corresponding to the second layer, and taking the low-frequency component and the high-frequency component corresponding to the second layer as the new low-frequency component and the high-frequency component corresponding to the first layer, and repeating the steps: using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposing the low-frequency component and the high-frequency component corresponding to the second layer;

[0020] When a preset condition is met, the convolution calculation is stopped, wherein the preset condition is that the maximum value of the absolute values ​​of all low-frequency components and all high-frequency components decomposed in the current layer is less than a preset multiple of the maximum value of the absolute value of the low-frequency component corresponding to the first layer.

[0021] Optionally, the pre-trained deep learning model includes a hidden layer, wherein the hidden layer includes a forget gate, an input gate, and an output gate;

[0022] The step of inputting the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the CPU usage rate includes:

[0023] Inputting each sampling point of the intermediate time series into the hidden layer in chronological order;

[0024] Using the forget gate, the input gate and the output gate respectively, the values ​​of each sampling point of the intermediate time series are calculated in sequence to extract the time features of the intermediate time series;

[0025] The time feature is used to predict and output a predicted value of the usage rate of the central processing unit.

[0026] In a second aspect, an embodiment of the present application further provides a method for training a prediction model for CPU usage, the method comprising:

[0027] Acquire a sample time series, wherein the sample time series includes a sample series corresponding to the usage rate of the central processing unit and a sample series corresponding to a parameter factor related to the usage rate of the central processing unit, wherein the sample series corresponding to the usage rate of the central processing unit is used to represent a true value of the usage rate of the central processing unit corresponding to each sampling point;

[0028] Decomposing the sample time series to obtain training sample sequences corresponding to different frequency scales;

[0029] Inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model;

[0030] The deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

[0031] Optionally, inputting the training sample sequence into a model to be trained for iterative training to obtain a deep learning model includes:

[0032] Inputting the training sample sequence into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence;

[0033] Determine the evaluation result of the model to be trained according to the predicted value corresponding to each sampling point of the training sample sequence and the actual value of the usage rate of the central processing unit corresponding to each sampling point;

[0034] When the error value between the predicted value and the true value represented by the evaluation result is greater than or equal to a preset threshold, continue to input the training sample sequence into the model to be trained for iterative training to obtain the predicted value corresponding to each sampling point of the training sample sequence, until the error value is less than the preset threshold, stop the iterative training and obtain the deep learning model.

[0035] In a third aspect, an embodiment of the present application further provides a device for predicting the usage rate of a central processing unit, the device comprising:

[0036] A first acquisition module is used to acquire an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit;

[0037] A first decomposition module is used to decompose the initial time series to obtain intermediate time series corresponding to different frequency scales;

[0038] A prediction module, used for inputting the intermediate time series into a pre-trained deep learning model for prediction, to obtain a predicted value of the utilization rate of the central processing unit;

[0039] The pre-trained deep learning model is used to extract the time features of the intermediate time series and predict the usage rate of the central processing unit based on the extracted time features.

[0040] In a fourth aspect, an embodiment of the present application further provides a training device for a prediction model of CPU usage, the device comprising:

[0041] A second acquisition module is used to acquire a sample time series, wherein the sample time series includes a sample series corresponding to the usage rate of the central processing unit and a sample series corresponding to a parameter factor related to the usage rate of the central processing unit, wherein the sample series corresponding to the usage rate of the central processing unit is used to represent the true value of the usage rate of the central processing unit corresponding to each sampling point;

[0042] A second decomposition module is used to decompose the sample time series to obtain training sample sequences corresponding to different frequency scales;

[0043] A training module, used for inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model;

[0044] The deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

[0045] In a fifth aspect, an embodiment of the present application further provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0046] Memory, used to store computer programs;

[0047] The processor is used to implement the steps of the method for predicting the usage rate of the central processing unit described in any embodiment of the first aspect, or implement the steps of the method for training a prediction model for the usage rate of the central processing unit described in any embodiment of the second aspect when executing the program stored in the memory.

[0048] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for predicting the usage rate of a central processing unit described in any embodiment of the first aspect are implemented, or the steps of the method for training a prediction model for the usage rate of a central processing unit described in any embodiment of the second aspect are implemented.

[0049] In an embodiment of the present application, by obtaining an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit; decomposing the initial time series to obtain an intermediate time series corresponding to different frequency scales; inputting the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the utilization rate of the central processing unit; wherein the pre-trained deep learning model is used to extract the time features of the intermediate time series, and predict the utilization rate of the central processing unit according to the extracted time features. In the above manner, the initial time series can be decomposed to obtain an intermediate time series corresponding to different frequency scales, thereby obtaining the mutation point change law of the data related to the utilization rate of the central processing unit, and then the decomposed intermediate time series is input into a pre-trained deep learning model for prediction to obtain the time features of the data related to the utilization rate of the central processing unit. That is to say, when predicting the utilization rate of the central processing unit, not only the time features of the data related to the utilization rate of the central processing unit are considered, but also the mutation point change law of the data related to the utilization rate of the central processing unit is considered, thereby improving the accuracy of the prediction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1 A flowchart of a method for predicting the usage rate of a central processing unit provided in an embodiment of the present application;

[0053] Figure 2 A schematic diagram of a target time series decomposition process provided in an embodiment of the present application;

[0054] Figure 3A calculation flow chart of an LSTM model provided in an embodiment of the present application;

[0055] Figure 4 A flowchart of a method for training a prediction model for CPU usage provided in an embodiment of the present application;

[0056] Figure 5 A flowchart of another method for predicting the usage rate of a central processing unit provided in an embodiment of the present application;

[0057] Figure 6 A comparison chart of the prediction results of directly using the LSTM model for prediction provided in an embodiment of the present application and the prediction results of using the model proposed in the present application for prediction;

[0058] Figure 7 A schematic diagram of the structure of a device for predicting the usage rate of a central processing unit provided in an embodiment of the present application;

[0059] Figure 8 A schematic diagram of the structure of a training device for a prediction model of CPU usage provided in an embodiment of the present application;

[0060] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0062] See also Figure 1 , Figure 1 A flowchart of a method for predicting the usage rate of a central processing unit provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method for predicting the usage rate of the central processing unit may include the following steps:

[0063] Step 101: Acquire an initial time series, wherein the initial time series includes a time series corresponding to the usage rate of the central processing unit and a time series corresponding to a parameter factor related to the usage rate of the central processing unit.

[0064] Specifically, the above-mentioned initial time series may include a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to the parameter factors related to the utilization rate of the central processing unit. Among them, the time series corresponding to the utilization rate of the central processing unit may refer to the total utilization rate of the central processing unit of the device to be predicted collected within a time period at one end of the current moment and before the current moment; the time series corresponding to the parameter factors related to the utilization rate of the central processing unit may refer to the utilization rate of the central processing unit corresponding to each parameter factor collected within a time period at one end of the current moment and before the current moment. For example, assuming that the t corresponding to the current moment is 5, the initial time series includes the time series corresponding to the total utilization rate of the central processing unit of the device to be predicted when t is 1, 2, 3, 4 and 5 respectively, and the time series corresponding to each parameter factor.

[0065] It should be noted that the device to be predicted here can be any device with a CPU. The time intervals between the sampling points in the time series corresponding to the utilization rate of the central processing unit and the time series corresponding to the parameter factors related to the utilization rate of the central processing unit are the same. Specifically, the size of the time interval can be set according to the prediction requirements, and the embodiment of the present application does not make specific restrictions. In an optional embodiment, sampling can be performed at time intervals of minutes, such as 1 minute, 10 minutes, 20 minutes, 30 minutes, etc.

[0066] Step 102: Decompose the initial time series to obtain intermediate time series corresponding to different frequency scales.

[0067] Specifically, the decomposition method of the initial time series can be wavelet decomposition, empirical mode decomposition, etc., which is not specifically limited in the embodiment of the present application.

[0068] In this step, by decomposing the initial time series, intermediate time series corresponding to different frequency scales can be obtained, so as to obtain more mutation point information of CPU usage-related data to solve the problem of uneven distribution of CPU usage-related data.

[0069] Step 103: input the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the CPU usage rate;

[0070] Among them, the pre-trained deep learning model is used to extract the time features of the intermediate time series, and predict the utilization rate of the central processing unit based on the extracted time features.

[0071] Specifically, the above-mentioned deep learning model can adopt a long short-term memory neural network (Long Short-Term Memory, abbreviated as LSTM) model, a Transformer model (that is, an autoregressive model proposed by the Google team in 2017) or a variant model based on the LSTM model, which is not specifically limited in the embodiments of the present application.

[0072] In this step, the intermediate time series can be input into a pre-trained deep learning model, and the time features of the intermediate time series can be extracted through the deep learning model, that is, the chronological relationship between the CPU usage related data on the time axis is mined, and the CPU usage is predicted based on the extracted time features.

[0073] In this embodiment, the initial time series can be decomposed to obtain intermediate time series corresponding to different frequency scales, thereby obtaining the mutation point change law of the data related to the CPU usage rate, and then the decomposed intermediate time series is input into the pre-trained deep learning model for prediction to obtain the time characteristics of the data related to the CPU usage rate. In other words, when predicting the CPU usage rate, not only the time characteristics of the data related to the CPU usage rate are considered, but also the mutation point change law of the data related to the CPU usage rate is considered, thereby improving the accuracy of the prediction result.

[0074] Further, the parameter factors include a first factor for characterizing the usage rate of the central processing unit occupied by the process running, a second factor for characterizing the usage rate of the central processing unit occupied by the system waiting for input and output, and a third factor for characterizing the usage rate of the central processing unit occupied by the system processing interrupts;

[0075] The above step 102, decomposing the initial time series to obtain intermediate time series corresponding to different frequency scales, includes:

[0076] The time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales.

[0077] In one embodiment, the parameter factors may include a first factor for characterizing the usage rate of the central processing unit required for the process to run, a second factor for characterizing the usage rate of the central processing unit required for the system to wait for input and output, and a third factor for characterizing the usage rate of the central processing unit required for the system to handle interrupts. That is to say, when decomposing the initial time series, the time series corresponding to the three parameter factors and the time series corresponding to the usage rate of the central processing unit can be decomposed separately to obtain intermediate time series corresponding to different frequency scales. For example, assuming that each time series in the initial time series is decomposed into 8 intermediate time series corresponding to different frequency scales, a total of 4*8 intermediate time series can be obtained, and thus these 4*8 intermediate time series can be used as inputs of the deep learning model, so that the model prediction results are more accurate.

[0078] In this embodiment, the usage rate of the central processing unit required for process running, the usage rate of the central processing unit required for the system to wait for input and output, the usage rate of the central processing unit required for the system to handle interrupts, and the total usage rate of the central processing unit of the system can be used together as the basis for model prediction. Compared with the prior art which usually only uses the total usage rate of the central processing unit of the system as the basis for model prediction, this embodiment introduces more variables that affect the CPU usage rate, which is conducive to mining the usage characteristics of the system CPU resources, thereby improving the accuracy of prediction.

[0079] Furthermore, before the above step of respectively decomposing the time series corresponding to the CPU usage rate, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales, the method further includes:

[0080] Normalizing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series, and the third time series respectively;

[0081] The above steps respectively decompose the time series corresponding to the CPU usage rate, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales, including:

[0082] The time series corresponding to the normalized CPU usage rate, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales.

[0083] In one embodiment, before respectively decomposing the time series corresponding to the CPU usage rate, the first time series, the second time series, and the third time series to obtain intermediate time series corresponding to different frequency scales, it is also necessary to respectively normalize the time series corresponding to the CPU usage rate, the first time series, the second time series, and the third time series. Specifically, the normalization process may be performed using the following formula:

[0084]

[0085] Among them, X i Indicates x i The normalized value, x i represents the i-th value in the target time series, min(x) represents the minimum value in the target time series, max(x) represents the maximum value in the target time series, and the target time series is any time series among the time series corresponding to the normalized CPU usage rate, the first time series, the second time series, and the third time series.

[0086] In this embodiment, the time series corresponding to the CPU usage rate, the first time series, the second time series and the third time series are first normalized, and then the normalized time series corresponding to the CPU usage rate, the first time series, the second time series and the third time series are decomposed to obtain intermediate time series corresponding to different frequency scales. In this way, the CPU usage rate related data after normalization are in the same distribution range, which is conducive to the model learning complex rules in the data and shortening the prediction time of the model.

[0087] Furthermore, the above steps of respectively decomposing the time series corresponding to the normalized CPU usage rate, the first time series, the second time series, and the third time series to obtain intermediate time series corresponding to different frequency scales include:

[0088] Using the impulse response corresponding to the preset low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on the target time series respectively, and the low-frequency component and the high-frequency component corresponding to the first layer are decomposed, wherein the target time series is any one of the time series corresponding to the usage rate of the normalized central processing unit, the first time series, the second time series and the third time series;

[0089] Using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposition is performed to obtain the low-frequency component and the high-frequency component corresponding to the second layer, and the low-frequency component and the high-frequency component corresponding to the second layer are used as the new low-frequency component and the high-frequency component corresponding to the first layer, and the steps are repeated: using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposition is performed to obtain the low-frequency component and the high-frequency component corresponding to the second layer;

[0090] When a preset condition is met, the convolution calculation is stopped, wherein the preset condition is that the maximum value of the absolute values ​​of all low-frequency components and all high-frequency components decomposed in the current layer is less than a preset multiple of the maximum value of the absolute value of the low-frequency component corresponding to the first layer.

[0091] In one embodiment, the time series corresponding to the usage rate of the normalized CPU, the first time series, the second time series, and the third time series can be decomposed to obtain intermediate time series corresponding to different frequency scales. Specifically, the impulse response corresponding to the preset low-pass filter and the impulse response corresponding to the high-pass filter are first used to perform convolution calculations on the target time series respectively, and the low-frequency components and high-frequency components corresponding to the first layer are decomposed; then, the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter are used to perform convolution calculations on each component of the low-frequency components and high-frequency components corresponding to the first layer respectively, and the low-frequency components and high-frequency components corresponding to the second layer are decomposed; then, the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter are used to perform convolution calculations on each component of the low-frequency components and high-frequency components corresponding to the second layer respectively, and the low-frequency components and high-frequency components corresponding to the third layer are decomposed, and this cycle is repeated until the preset conditions are met and the decomposition is stopped.

[0092] For ease of understanding, we take the three-layer decomposition of the target time series as an example. The decomposition process of the target time series is as follows: Figure 2 As shown, the third layer can finally obtain 8 high and low frequency components after wavelet decomposition.

[0093] Specifically, the following formulas can be used to perform low-frequency decomposition and high-frequency decomposition operations on the target time series:

[0094]

[0095]

[0096] in, represents the low-frequency component after the i-th decomposition of the k-th layer, represents the high-frequency component after the i-th decomposition of the k-th layer, h L represents the impulse response corresponding to the low-pass filter, h h represents the impulse response corresponding to the high-pass filter, Represents the convolution operation; D represents the data to be decomposed. In the first decomposition, D represents the original target time series. In the subsequent decomposition, D represents the high-frequency component or low-frequency component after the previous decomposition.

[0097] Stop decomposition when the k-th layer decomposition satisfies the following formula:

[0098]

[0099] in, Represents the maximum value of the absolute values ​​of all low-frequency components and all high-frequency components after the k-th layer decomposition, M = 2 k , Represents the absolute value of the low-frequency component corresponding to the first layer.

[0100] In this embodiment, by decomposing the initial time series, the problems of mutation and uneven distribution of CPU usage data can be solved, and the difficulty of deep learning model mining the change law of mutation point of CPU usage data is reduced. In addition, through wavelet decomposition, CPU usage data can be converted into frequency information of different frequency scales corresponding to the time. After the mutation point data is decomposed, the high-frequency information is rich, which alleviates the problem of low prediction accuracy of deep learning model due to lack of mutation point information.

[0101] Further, the pre-trained deep learning model includes a hidden layer, wherein the hidden layer includes a forget gate, an input gate, and an output gate;

[0102] In the above step 103, the intermediate time series is input into the pre-trained deep learning model for prediction to obtain the predicted value of the CPU usage rate, including:

[0103] Input each sampling point of the intermediate time series into the hidden layer in chronological order;

[0104] The forget gate, input gate and output gate are used to calculate the values ​​of each sampling point of the intermediate time series in turn to extract the time features of the intermediate time series;

[0105] Using time features, the predicted value of CPU usage is predicted and output.

[0106] In one embodiment, the deep learning model is an LSTM model, which is a recursive neural network. The periodic connection of hidden layer neurons is used to capture the dynamic dependency of the input time series. By introducing a forget gate, an input gate, and an output gate, it can store, learn, and express time series information in any long observation window. It is often used for tasks such as time series classification, prediction, and anomaly detection. The calculation flow chart of the LSTM model is as follows: Figure 3 As shown, the following formula can be used for calculation:

[0107] f t =sigmoid(W f ·h t-1 +U f ·x t +b f );

[0108] i t =sigmoid(W i ·h t-1 +U i ·x t +b i );

[0109] TC t =tanh(W a ·h t-1 +U a x t +b c );

[0110] C t =f t *C t-1 +i t *TC t ;

[0111] o t =sigmoid(W o ·h t-1 +U o ·x t +b o );

[0112] h t =o t *tanh(C t );

[0113]

[0114] Among them, W f , U f 、b f , W i , U i 、bi , W a , U a 、b c , W o , U o 、b o , V and b y Both represent model parameters, h t-1 represents the memory information at time t-1, h t represents the memory information at time t, C t-1 represents the cell state at time t-1, C t represents the cell state at time t, x t represents the value at time t of any intermediate time series, Represents the predicted value of the model output, sigmoid and tanh represent different activation functions. t Indicates that the forget gate is based on the input information x t Calculate the forgetting ratio of memory information, i t Indicates that the input gate is based on the input information x t Process the input information at the current moment. The sigmoid activation function is mainly responsible for updating the memory information, and the tanh activation function is mainly used to create a new state vector C t , and added to the current state information. Memory information h t-1 and input information x t Determines the output result of the output gate.

[0115] In this embodiment, the information of the time series can be stored, learned, and expressed within any long observation window by introducing a forget gate, an input gate, and an output gate, which helps the hidden layer capture the dynamic dependency of the intermediate time series of the input, that is, the time feature.

[0116] See also Figure 4 , Figure 4 A flowchart of a method for training a prediction model for CPU usage provided in an embodiment of the present application is provided. Figure 4 As shown, the training method of the prediction model for the usage rate of the central processing unit may include the following steps:

[0117] Step 401, obtaining a sample time series, wherein the sample time series includes a sample series corresponding to the utilization rate of the central processing unit and a sample series corresponding to a parameter factor related to the utilization rate of the central processing unit, wherein the sample series corresponding to the utilization rate of the central processing unit is used to characterize the true value of the utilization rate of the central processing unit corresponding to each sampling point.

[0118] Specifically, the sample time series may include a sample series corresponding to the CPU usage rate and a sample series corresponding to the parameter factors related to the CPU usage rate. The sample series corresponding to the CPU usage rate may refer to the total CPU usage rate of the device to be predicted collected over a long period of time in history; the sample series corresponding to the parameter factors related to the CPU usage rate may refer to the CPU usage rate corresponding to each parameter factor of the device to be predicted collected over a long period of time in history.

[0119] It should be noted that the training device for the prediction model of the CPU usage rate here can be any device, which can be the same device as the device to be predicted, or a different device from the prediction device, and the embodiments of the present application do not make specific limitations. As an optional implementation, in order not to affect the business performance of the device to be predicted itself, the prediction model training can be performed on other devices, and then the trained prediction model is deployed to the device to be predicted for prediction. The time intervals between each sampling point in the sample sequence corresponding to the CPU usage rate and the sample sequence corresponding to the parameter factors related to the CPU usage rate are the same, and need to be the same as the time intervals between each sampling point in the initial time series during the prediction stage.

[0120] Step 402: Decompose the sample time series to obtain training sample sequences corresponding to different frequency scales.

[0121] Specifically, the sample time series may be decomposed by wavelet decomposition, empirical mode decomposition, or the like, which is not specifically limited in the embodiments of the present application.

[0122] In this step, by decomposing the sample time series, training sample sequences corresponding to different frequency scales can be obtained. The specific decomposition steps can be referred to the decomposition steps of the initial time series during prediction, which will not be repeated here.

[0123] Step 403: input the training sample sequence into the model to be trained for iterative training to obtain a deep learning model;

[0124] Among them, the deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

[0125] In this step, the training sample sequence can be input into the model to be trained, and the time features of the training sample sequence can be extracted by the model to be trained, and the usage rate of the central processing unit can be predicted according to the extracted time features to obtain a predicted value. Specifically, the model to be trained includes a hidden layer, wherein the hidden layer includes a forget gate, an input gate, and an output gate. When the training sample sequence is input into the model to be trained for iterative training, each sampling point of the training sample sequence can be input into the hidden layer in chronological order; the values ​​of each sampling point of the training sample sequence are calculated in turn by using the forget gate, the input gate, and the output gate, respectively, to extract the time features of the training sample sequence, and then obtain the predicted value of the usage rate of the central processing unit of each sampling point. Then, according to the error value between the predicted value and the true value, the model parameters of the model to be trained are trained to obtain a deep learning model. In this embodiment, the sample time series can be decomposed to obtain training sample sequences corresponding to different frequency scales, and then the training sample sequence can be input into the model to be trained to obtain a deep learning model, which is convenient for the subsequent prediction of the usage rate of the central processing unit through the trained deep learning model, thereby improving the accuracy of the prediction result.

[0126] Furthermore, the above step 403, inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model, specifically includes:

[0127] Input the training sample sequence into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence;

[0128] Determine the evaluation result of the model to be trained according to the predicted value corresponding to each sampling point of the training sample sequence and the actual value of the usage rate of the central processing unit corresponding to each sampling point;

[0129] When the evaluation result indicates that the error between the predicted value and the true value is greater than or equal to the preset threshold, the training sample sequence continues to be input into the model to be trained for iterative training to obtain the predicted value of the training sample sequence at each sampling point. When the error value is less than the preset threshold, the iterative training is stopped to obtain a deep learning model.

[0130] In one embodiment, when training a deep learning model, the training sample sequence can be input into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence, and then the evaluation result of the model to be trained is determined according to the prediction value corresponding to each sampling point of the training sample sequence and the actual value of the usage rate of the central processing unit corresponding to each sampling point. If the error value between the prediction value and the actual value represented by the evaluation result is greater than or equal to a preset threshold, the training sample sequence is continuously input into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence, until the error value is less than the preset threshold, the iterative training is stopped to obtain the deep learning model. Specifically, the evaluation result of the model to be trained can be determined by the following formula:

[0131]

[0132] Among them, Y t represents the true value at time t, represents the predicted value at time t, Ω Test It refers to all the moments included in the training sample sequence, and Rse represents the relative square root error, that is, the evaluation result of the model to be trained.

[0133] Through the above method, the trained deep learning model can have a better learning effect, and can store, learn and express time series information in any long observation window, which is conducive to the hidden layer capturing the dynamic dependency relationship of the intermediate time series of the input, that is, the time feature.

[0134] In one example, the CPU usage prediction method may specifically include model construction, model training, model deployment, and a CPU usage prediction process after model deployment. The specific process is as follows: Figure 5 shown.

[0135] The model training phase includes the following steps:

[0136] 1. First, collect CPU usage data on the host (i.e. the device to be predicted above), including the CPU usage occupied by process running, the CPU usage occupied by the system waiting for IO, the CPU usage occupied by the system processing interrupts, and the total CPU usage of the system. The interval for collecting data is determined according to the prediction requirements. Usually, for CPU usage prediction, it can be collected at a time interval of minutes.

[0137] 2. Normalize the collected data (i.e., the sample time series mentioned above). After normalization, the CPU usage-related data are in the same distribution range, which is conducive to the model learning the complex rules in the data and shortening the model training cycle.

[0138] 3. Divide the preprocessed data set into a training set and a test set. The ratio can be set arbitrarily according to the size of the collected data set. Use the training set (i.e., the training sample sequence mentioned above) to train the model to be trained.

[0139] 4. Perform wavelet decomposition on the training set data to solve the problems of mutation and uneven distribution of CPU usage data, and reduce the difficulty of the prediction model to mine the change law of CPU usage data mutation points. Wavelet decomposition can convert CPU usage data into frequency information of different frequency scales corresponding to the time. After decomposition, the mutation point data is rich in high-frequency information, which alleviates the problem of low model prediction accuracy due to lack of mutation point information.

[0140] 5. Build the LSTM model and use the tensorflow deep learning framework according to Figure 2 The LSTM model calculation process is used to build a training model. In addition, the relative square root error can be used as a prediction model evaluation indicator.

[0141] 6. Deploy the trained deep learning model to the corresponding prediction machine (which can be the model to be trained or other devices other than the model to be trained).

[0142] The model prediction phase can include the following steps:

[0143] 1. Collect CPU usage data related to prediction, similar to step 1 of the training process above. Note that the time interval must be consistent with the time interval for collecting the training data set.

[0144] 2. Normalize and preprocess the data related to the predicted CPU usage, which is similar to step 2 of the above training process.

[0145] 3. Perform multiple stationary wavelet transformations on the normalized preprocessed data, similar to step 4 of the previous training process.

[0146] 4. Input the CPU usage data after stationary wavelet transform into the deployed deep learning model to obtain the predicted value of CPU usage data.

[0147] In this embodiment, the wavelet transform and the LSTM model can be combined, that is, the mining model mines the characteristics of data mutations and extracts the time series relationship and nonlinear characteristics of the CPU usage related data. Figure 6A comparison chart is shown of the prediction results of directly using the LSTM model for prediction and the prediction results of using the model proposed in this application for prediction. By comparison, it can be found that when the data changes slowly, the prediction results of the prediction method proposed in this application and the direct use of the LSTM model for prediction are similar, and both can predict the CPU usage rate relatively accurately. However, when the CPU usage data suddenly changes, the prediction accuracy of the prediction method proposed in this application is much higher than the accuracy of directly using the LSTM model for prediction.

[0148] See also Figure 7 , Figure 7 A schematic diagram of a CPU usage prediction device provided in an embodiment of the present application. Figure 7 As shown, the CPU usage prediction device 700 may include:

[0149] The first acquisition module 701 is used to acquire an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit;

[0150] A first decomposition module 702 is used to decompose the initial time series to obtain intermediate time series corresponding to different frequency scales;

[0151] A prediction module 703 is used to input the intermediate time series into a pre-trained deep learning model for prediction, and obtain a predicted value of the CPU usage rate;

[0152] Among them, the pre-trained deep learning model is used to extract the time features of the intermediate time series, and predict the utilization rate of the central processing unit based on the extracted time features.

[0153] Further, the parameter factors include a first factor for characterizing the usage rate of the central processing unit required for the process to run, a second factor for characterizing the usage rate of the central processing unit required for the system to wait for input and output, and a third factor for characterizing the usage rate of the central processing unit required for the system to handle interrupts; the first decomposition module 702 includes:

[0154] The decomposition submodule is used to decompose the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series respectively to obtain intermediate time series corresponding to different frequency scales.

[0155] Furthermore, the first decomposition module 702 further includes:

[0156] A normalization processing submodule, used for respectively normalizing the time series corresponding to the utilization rate of the central processing unit, the first time series, the second time series and the third time series;

[0157] The decomposition submodule is further used to decompose the time series corresponding to the normalized CPU usage rate, the first time series, the second time series and the third time series respectively to obtain intermediate time series corresponding to different frequency scales.

[0158] Furthermore, the decomposition submodules include:

[0159] A convolution calculation unit, used to perform convolution calculations on the target initial time series respectively by using the impulse response corresponding to the preset low-pass filter and the impulse response corresponding to the high-pass filter, and decompose to obtain the low-frequency component and the high-frequency component corresponding to the first layer, wherein the target initial time series is any one of the time series corresponding to the usage rate of the normalized central processing unit, the first time series, the second time series and the third time series;

[0160] The processing unit is used to use the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter to perform convolution calculation on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decompose and obtain the low-frequency component and the high-frequency component corresponding to the second layer, and use the low-frequency component and the high-frequency component corresponding to the second layer as the new low-frequency component and the high-frequency component corresponding to the first layer, and repeat the steps of: using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, respectively, performing convolution calculation on each component of the low-frequency component and the high-frequency component corresponding to the first layer, and decomposing and obtaining the low-frequency component and the high-frequency component corresponding to the second layer;

[0161] A stopping unit is used to stop the convolution calculation when a preset condition is met, wherein the preset condition is that the maximum value of the absolute values ​​of all low-frequency components and all high-frequency components currently decomposed is less than a preset multiple of the maximum value of the absolute value of the low-frequency component corresponding to the first layer.

[0162] Further, the pre-trained deep learning model includes a hidden layer, wherein the hidden layer includes a forget gate, an input gate, and an output gate; the prediction module 703 includes:

[0163] The input submodule is used to input each sampling point of the intermediate time series into the hidden layer in chronological order;

[0164] The extraction submodule is used to calculate the value of each sampling point of the intermediate time series in sequence by using the forget gate, input gate and output gate respectively, and extract the time features of the intermediate time series;

[0165] The prediction submodule is used to predict and output the predicted value of the CPU usage rate by using the time feature.

[0166] It should be noted that the device 700 can implement the steps of the method for predicting the usage rate of the central processing unit provided in any of the aforementioned method embodiments, and can achieve the same technical effect, which will not be described in detail here.

[0167] See also Figure 8 , Figure 8 A schematic diagram of a structure of a training device for a prediction model of CPU usage provided in an embodiment of the present application. Figure 8 As shown, the training device 800 for the prediction model of the CPU usage rate may include:

[0168] The second acquisition module 801 is used to acquire a sample time series, wherein the sample time series includes a sample series corresponding to the utilization rate of the central processing unit and a sample series corresponding to a parameter factor related to the utilization rate of the central processing unit, wherein the sample series corresponding to the utilization rate of the central processing unit is used to represent the true value of the utilization rate of the central processing unit corresponding to each sampling point;

[0169] The second decomposition module 802 is used to decompose the sample time series to obtain training sample sequences corresponding to different frequency scales;

[0170] The training module 803 is used to input the training sample sequence into the model to be trained for iterative training to obtain a deep learning model;

[0171] Among them, the deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

[0172] Furthermore, the training module 803 includes:

[0173] The output submodule is used to input the training sample sequence into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence;

[0174] A determination submodule is used to determine the evaluation result of the model to be trained according to the predicted value corresponding to each sampling point of the training sample sequence and the actual value of the usage rate of the central processing unit corresponding to each sampling point;

[0175] The training submodule is used to continue inputting the training sample sequence into the model to be trained for iterative training when the error value between the predicted value and the true value represented by the evaluation result is greater than or equal to the preset threshold, and obtain the predicted value corresponding to each sampling point of the training sample sequence. When the error value is less than the preset threshold, the iterative training is stopped to obtain the deep learning model.

[0176] It should be noted that the device 800 can implement the steps of the training method for the prediction model of the usage rate of the central processing unit provided by any of the aforementioned method embodiments, and can achieve the same technical effect, which will not be described one by one here.

[0177] like Fig. 9 As shown, the embodiment of the present application further provides an electronic device, including a processor 911, a communication interface 912, a memory 913 and a communication bus 914, wherein the processor 911, the communication interface 912, and the memory 913 communicate with each other through the communication bus 914.

[0178] Memory 913, used for storing computer programs;

[0179] In one embodiment of the present application, the processor 911, when executing the program stored in the memory 913, implements the steps of the method for predicting the usage rate of the central processing unit provided by any of the aforementioned method embodiments, or implements the steps of the method for training a prediction model for the usage rate of the central processing unit provided by any of the aforementioned method embodiments.

[0180] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of a method for predicting the usage rate of a central processing unit as provided in any of the aforementioned method embodiments, or implements the steps of a method for training a prediction model for the usage rate of a central processing unit as provided in any of the aforementioned method embodiments.

[0181] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0182] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for predicting the usage rate of a central processing unit, characterized in that: The method comprises: Acquire an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit; Decomposing the initial time series to obtain intermediate time series corresponding to different frequency scales; Inputting the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the utilization rate of the central processing unit; The pre-trained deep learning model is used to extract the time features of the intermediate time series and predict the usage rate of the central processing unit based on the extracted time features.

2. The method according to claim 1, characterized in that The parameter factors include a first factor for characterizing the usage rate of the central processing unit required for process operation, a second factor for characterizing the usage rate of the central processing unit required for system waiting for input and output, and a third factor for characterizing the usage rate of the central processing unit required for system processing interrupts; Decomposing the initial time series to obtain intermediate time series corresponding to different frequency scales includes: The time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales, wherein the first time series is the time series corresponding to the first factor, the second time series is the time series corresponding to the second factor, and the third time series is the time series corresponding to the third factor.

3. The method according to claim 2, characterized in that Before respectively decomposing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales, the method further includes: Normalizing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series, and the third time series respectively; The step of respectively decomposing the time series corresponding to the usage rate of the central processing unit, the first time series, the second time series and the third time series to obtain intermediate time series corresponding to different frequency scales includes: The time series corresponding to the usage rate of the CPU after normalization, the first time series, the second time series and the third time series are decomposed respectively to obtain intermediate time series corresponding to different frequency scales.

4. The method according to claim 3, characterized in that: The step of respectively decomposing the time series corresponding to the usage rate of the CPU after normalization, the first time series, the second time series, and the third time series to obtain intermediate time series corresponding to different frequency scales includes: Using the impulse response corresponding to the preset low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on the target time series respectively to decompose the low-frequency component and the high-frequency component corresponding to the first layer, wherein the target time series is any one of the time series corresponding to the usage rate of the central processing unit after normalization, the first time series, the second time series and the third time series; Using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposing the low-frequency component and the high-frequency component corresponding to the second layer, and taking the low-frequency component and the high-frequency component corresponding to the second layer as the new low-frequency component and the high-frequency component corresponding to the first layer, and repeating the steps: using the impulse response corresponding to the low-pass filter and the impulse response corresponding to the high-pass filter, convolution calculation is performed on each component of the low-frequency component and the high-frequency component corresponding to the first layer, decomposing the low-frequency component and the high-frequency component corresponding to the second layer; When a preset condition is met, the convolution calculation is stopped, wherein the preset condition is that the maximum value of the absolute values ​​of all low-frequency components and all high-frequency components decomposed in the current layer is less than a preset multiple of the maximum value of the absolute value of the low-frequency component corresponding to the first layer.

5. The method according to claim 1, characterized in that The pre-trained deep learning model includes a hidden layer, wherein the hidden layer includes a forget gate, an input gate, and an output gate; The step of inputting the intermediate time series into a pre-trained deep learning model for prediction to obtain a predicted value of the CPU usage rate includes: Inputting each sampling point of the intermediate time series into the hidden layer in chronological order; Using the forget gate, the input gate and the output gate respectively, the values ​​of each sampling point of the intermediate time series are calculated in sequence to extract the time features of the intermediate time series; The time feature is used to predict and output a predicted value of the usage rate of the central processing unit.

6. A method for training a prediction model for CPU usage, characterized in that: The method comprises: Acquire a sample time series, wherein the sample time series includes a sample series corresponding to the usage rate of the central processing unit and a sample series corresponding to a parameter factor related to the usage rate of the central processing unit, wherein the sample series corresponding to the usage rate of the central processing unit is used to represent a true value of the usage rate of the central processing unit corresponding to each sampling point; Decomposing the sample time series to obtain training sample sequences corresponding to different frequency scales; Inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model; The deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

7. The method according to claim 6, characterized in that The step of inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model includes: Inputting the training sample sequence into the model to be trained for iterative training to obtain the prediction value corresponding to each sampling point of the training sample sequence; Determine the evaluation result of the model to be trained according to the predicted value corresponding to each sampling point of the training sample sequence and the actual value of the usage rate of the central processing unit corresponding to each sampling point; When the error value between the predicted value and the true value represented by the evaluation result is greater than or equal to a preset threshold, continue to input the training sample sequence into the model to be trained for iterative training to obtain the predicted value corresponding to each sampling point of the training sample sequence, until the error value is less than the preset threshold, stop the iterative training and obtain the deep learning model.

8. A device for predicting the usage rate of a central processing unit, characterized in that: The device comprises: A first acquisition module is used to acquire an initial time series, wherein the initial time series includes a time series corresponding to the utilization rate of the central processing unit and a time series corresponding to a parameter factor related to the utilization rate of the central processing unit; A first decomposition module is used to decompose the initial time series to obtain intermediate time series corresponding to different frequency scales; A prediction module, used for inputting the intermediate time series into a pre-trained deep learning model for prediction, to obtain a predicted value of the utilization rate of the central processing unit; The pre-trained deep learning model is used to extract the time features of the intermediate time series and predict the usage rate of the central processing unit based on the extracted time features.

9. A training device for a prediction model of CPU usage, characterized in that: The device comprises: A second acquisition module is used to acquire a sample time series, wherein the sample time series includes a sample series corresponding to the usage rate of the central processing unit and a sample series corresponding to a parameter factor related to the usage rate of the central processing unit, wherein the sample series corresponding to the usage rate of the central processing unit is used to represent the true value of the usage rate of the central processing unit corresponding to each sampling point; A second decomposition module is used to decompose the sample time series to obtain training sample sequences corresponding to different frequency scales; A training module, used for inputting the training sample sequence into the model to be trained for iterative training to obtain a deep learning model; The deep learning model is used to predict the utilization rate of the central processing unit, and the model to be trained is used to extract the time features of the training sample sequence and predict the utilization rate of the central processing unit based on the extracted time features.

10. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the steps of the method for predicting the usage rate of a central processing unit as described in any one of claims 1 to 5, or implementing the steps of the method for training a prediction model for the usage rate of a central processing unit as described in any one of claims 6 to 7, when executing a program stored in a memory.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting the usage rate of a central processing unit described in any one of claims 1-5 are implemented, or the steps of the method for training a prediction model for the usage rate of a central processing unit described in any one of claims 6-7 are implemented.