Cloud resource prediction method and device, equipment and medium
By using pre-trained neural network models in cloud resource prediction and combining time domain and frequency domain characteristics, the problem of inaccurate cloud resource prediction in the existing technology is solved, and more accurate and comprehensive prediction results are achieved.
Patent Information
- Application Number
- CN202411791226.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The results of the cloud resource prediction using time domain features are inaccurate.
Through the pre-trained neural network model, the time domain characteristics and frequency domain characteristics of real-time cloud resource utilization are obtained, and the cloud resource prediction results are obtained based on these characteristics.
The frequency domain features are used to capture the changing patterns of signals at different frequencies, provide more comprehensive timing information, improve the long-term dependence problem of neural network models when processing timing data, and improve the comprehensiveness and accuracy of cloud resource prediction results.
Smart Images

Figure CN119788540A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud computing and big data technology, and specifically to a cloud resource prediction method, apparatus, device and medium. Background Art
[0002] Cloud computing is a model that provides computing resources and services through the Internet. It combines computer technology with network technology, stores data and applications on remote servers, and accesses and manages them through the network. In a cloud computing network, tenants can use cloud resources purchased from cloud computing service providers for services.
[0003] In order to timely guarantee the application needs of a large number of tenants and the quality of service (QoS) of tenants, cloud computing service providers need to predict the resources of the cloud computing network. However, the cloud resource prediction methods provided by the existing technology mainly use time domain features for calculation to obtain cloud resource prediction results, which may lead to inaccurate cloud resource prediction results. Summary of the invention
[0004] The embodiments of the present application provide a cloud resource prediction method, apparatus, device and medium to solve the problem of inaccurate cloud resource prediction results using time domain features.
[0005] In a first aspect, an embodiment of the present application provides a cloud resource prediction method, the method comprising:
[0006] Get real-time cloud resource usage;
[0007] Call the pre-trained neural network model and load the model parameters;
[0008] The real-time cloud resource utilization rate is input into the neural network model, the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate are obtained through the neural network model, and the cloud resource prediction result is obtained according to the time domain characteristics and the frequency domain characteristics.
[0009] In a second aspect, an embodiment of the present application provides a cloud resource prediction device, the device comprising:
[0010] The acquisition module is used to obtain the real-time cloud resource usage rate;
[0011] The calling module is used to call the pre-trained neural network model and load the model parameters;
[0012] The cloud resource prediction module is used to input the real-time cloud resource utilization rate into the neural network model, obtain the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through the neural network model, and obtain the cloud resource prediction result based on the time domain characteristics and the frequency domain characteristics.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.
[0015] The cloud resource prediction method, apparatus, device and medium provided in the embodiments of the present application can obtain cloud resource prediction results according to the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through a pre-trained neural network model, and make full use of the following characteristics of the frequency domain characteristics: the frequency domain characteristics can capture the change pattern of the signal at different frequencies, thereby providing more comprehensive time series information, and the frequency domain characteristics can also improve the long-term dependency problem that the neural network model usually faces when processing time series data by providing information at different time scales, thereby capturing the dependency relationship at different time scales, and the frequency domain characteristics can also reflect the energy distribution of the signal at different frequencies. This feature is less affected by outliers or noise, so that the neural network model has a certain robustness to noise and outliers, and the frequency domain characteristics can also provide a finer-grained interpretation of the time series data, thereby improving the comprehensiveness and accuracy of the cloud resource prediction results, and solving the problem of inaccurate cloud resource prediction results using time domain features in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0017] Figure 1 is a flow chart of an embodiment of the cloud resource prediction method of the present application;
[0018] Figure 2 is a flowchart of another embodiment of the cloud resource prediction method of the present application;
[0019] Figure 3 yes Figure 2 One of the flowcharts of step 104 in the cloud resource prediction method of the present application is shown;
[0020] Figure 4 yes Figure 2 The second flowchart of step 104 in the cloud resource prediction method of the present application is shown;
[0021] Figure 5 yes Figure 4 The flowchart of step 305 in step 104 shown;
[0022] Figure 6 yes Figure 5 The schematic diagram of TCN convolution calculation in step 305 is shown;
[0023] Figure 7 It is a structural diagram of an embodiment of a cloud resource prediction device of the present application;
[0024] Figure 8 It is a schematic diagram of the structure of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION
[0025] All actions to obtain signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] Please refer to Figure 1 , which shows a process 100 of an embodiment of a cloud resource prediction method according to the present application. The cloud resource prediction method can be applied to various electronic devices with data processing functions. For example, the above electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the cloud resource prediction method may be a processor in the above electronic device.
[0029] like Figure 1 As shown, the cloud resource prediction method includes the following steps:
[0030] Step 101: Obtain real-time cloud resource usage.
[0031] Step 102: Call the pre-trained neural network model and load the model parameters.
[0032] Step 103: input the real-time cloud resource utilization rate into the neural network model, obtain the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through the neural network model, and obtain the cloud resource prediction result based on the time domain characteristics and frequency domain characteristics.
[0033] The cloud resource prediction method provided in the embodiment of the present application can obtain cloud resource prediction results according to the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through a pre-trained neural network model, and fully utilizes the following characteristics of the frequency domain characteristics: the frequency domain characteristics can capture the change pattern of the signal at different frequencies, thereby providing more comprehensive time series information, and the frequency domain characteristics can also improve the long-term dependency problem that the neural network model usually faces when processing time series data by providing information at different time scales, thereby capturing the dependency relationship at different time scales, and the frequency domain characteristics can also reflect the energy distribution of the signal at different frequencies. This feature is less affected by outliers or noise, so that the neural network model has a certain robustness to noise and outliers, and the frequency domain characteristics can also provide a finer-grained interpretation of the time series data, thereby improving the comprehensiveness and accuracy of the cloud resource prediction results, and solving the problem of inaccurate cloud resource prediction results using time domain features in the prior art.
[0034] Please refer to Figure 2 , which shows a process 100 of an embodiment of a cloud resource prediction method according to the present application. The cloud resource prediction method can be applied to various electronic devices with data processing functions. For example, the above electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the cloud resource prediction method may be a processor in the above electronic device.
[0035] like Figure 2 As shown in Figure 2, the cloud resource prediction method is Figure 1 The method is basically the same as shown, except that before step 101, the following steps may also be included:
[0036] Step 104: Build a neural network model based on historical cloud resource usage.
[0037] For example, Figure 3 As shown, step 104 may include:
[0038] Step 301: Obtain a historical cloud resource usage rate set within a first time period, where the historical cloud resource usage rate set includes multiple historical cloud resource usage rates.
[0039] Step 302: construct a neural network model based on the historical cloud resource usage rate set in the first time period.
[0040] Optional, such as Figure 4 As shown, after step 301, the following steps may also be included:
[0041] Step 303: normalize the historical cloud resource usage set to obtain a normalized historical cloud resource usage set.
[0042] Specifically, step 303 can be expressed as: the historical cloud resource usage rate set M={m1,m2,…,m T}, perform normalization processing, and obtain the normalized historical cloud resource usage rate set
[0043] Among them, m T is the historical cloud resource utilization rate at time T; the normalized formula is 1≤t≤T,m max M={m1,m2,…,m T}The maximum value of the historical cloud resource usage included in the table.
[0044] Step 304: adopt a sliding window mechanism to cut the normalized historical cloud resource usage set to obtain historical cloud resource usage subsets in multiple second time periods.
[0045] In this embodiment, step 304 can use the sliding window mechanism to convert the historical cloud resource usage rate set M = {m1, m2, ..., m T} is divided into multiple historical cloud resource usage subsets: {m1,m2,…,m h},{m2,m3,…,m h+1},{m3,m4,…,m h+2},…,{m T-h+1 ,m T-h+2 ,…,m T}. The segmented data is recorded as data set D.
[0046] At this time, step 302 can be replaced by: step 305, constructing a neural network model according to each historical cloud resource usage subset.
[0047] For example, Figure 5 As shown, step 305 may include the following steps:
[0048] Step 501: Perform a fast Fourier transform on the historical cloud resource usage subset to obtain frequency domain characteristics of the time series data of the historical cloud resource usage subset.
[0049] Exemplarily, step 501 may be implemented by the following steps:
[0050] First, for the second time period h, the one-dimensional time series D with channel dimension C 1D ∈R h×c , the time series data of the historical cloud resource usage subset {m1,m2,…,m h}Use fast Fourier transform to obtain Fourier transform result {M k} is: {Mk}:=M1,M1,…,M h ,in,
[0051] Secondly, decompose the Fourier transform result into real part sequence and imaginary part sequence; M k =M kr +j·M ki ;
[0052] Third, perform conjugate processing on the decomposed Fourier transform result to obtain the conjugate processing result:
[0053] {M k} * ={M k} * :=M1 * ,M2 * ,…,M h *
[0054] in,
[0055] Fourth, by corresponding multiplication, the decomposed Fourier transform result is multiplied by the conjugate processing result to obtain the Fourier feature:
[0056]
[0057] Fifth, perform two repeated one-dimensional convolutions on the Fourier features and add the rectified linear unit (relu) activation function for processing, that is: F′=ReLU[G conv1d (F)], F″=ReLU[G conv1d (F′)], and obtain the frequency domain features F″ of the time series data of the historical cloud resource usage subset.
[0058] Step 502: Use a temporal convolutional network (TCN) to process the historical cloud resource usage subset to obtain the time domain characteristics of the time series data of the historical cloud resource usage subset.
[0059] like Figure 6 As shown in the figure, it is a schematic diagram of TCN convolution calculation. Figure 6 As shown, illustratively, step 502 may be implemented by the following steps:
[0060] First, based on the time series data of the historical cloud resource usage subset {m1,m2,…,m h} and convolution kernel f:{0,...,k-1}, after dilated convolution calculation, get l neuron outputs:
[0061]
[0062] Among them, k is the convolution kernel size, d is the expansion factor, f(i) is the i-th element in the convolution kernel, and x l-d·i is the time series data corresponding to the multiplication of the elements in the convolution kernel;
[0063] Secondly, the neuron output is passed through three consecutive TCN structures for deep feature extraction to obtain the time domain features of the time series data of the historical cloud resource usage subset.
[0064] In this embodiment, the TCN feature extraction expressions of the three stages can be recorded as: 1 TCN , G 2 TCN , G 3 TCN .
[0065] Step 503: perform a tensor connection operation on the frequency features and the time domain features in the channel dimension, use a jump connection to fuse the frequency features and the time domain features, and obtain a fusion feature of the time domain and the frequency domain.
[0066] Exemplarily, step 503 may be to obtain the time domain feature G of the TCN in the first stage. 1 TCN , and the time domain feature G of the third stage TCN 3 TCN , and the frequency domain feature F″ is fused to obtain the time domain and frequency domain fusion feature H = Concat (G 1 TCN ,G 3 TCN ,F″), where Concat means concatenating tensors in the channel dimension.
[0067] Step 504: Perform TCN calculation on the time domain and frequency domain fusion features to obtain prediction results corresponding to the historical cloud resource usage rate subset.
[0068] Optional, such as Figure 2 As shown, after step 104, the following steps may also be included:
[0069] Step 105: Train the neural network model to obtain model parameters.
[0070] Exemplarily, step 105 may include:
[0071] First, the target loss function in the back propagation direction is obtained as the root mean square error:
[0072]
[0073] in, is the predicted value corresponding to the i-th cloud resource utilization sample, is the true value corresponding to the actual i-th cloud resource utilization sample, and n is the number of samples;
[0074] Secondly, the model parameters in the applied network model are updated through the gradient descent method (Stochastic Gradient Descent, SGD) to optimize the target loss function to the minimum and obtain the global optimal solution. When the neural network model reaches convergence, the neural network model training is stopped and the model parameters are obtained.
[0075] The cloud resource prediction method provided in the embodiment of the present application can obtain cloud resource prediction results according to the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through a pre-trained neural network model, and fully utilizes the following characteristics of the frequency domain characteristics: the frequency domain characteristics can capture the change pattern of the signal at different frequencies, thereby providing more comprehensive time series information, and the frequency domain characteristics can also improve the long-term dependency problem that the neural network model usually faces when processing time series data by providing information at different time scales, thereby capturing the dependency relationship at different time scales, and the frequency domain characteristics can also reflect the energy distribution of the signal at different frequencies. This feature is less affected by outliers or noise, so that the neural network model has a certain robustness to noise and outliers, and the frequency domain characteristics can also provide a finer-grained interpretation of the time series data, thereby improving the comprehensiveness and accuracy of the cloud resource prediction results, and solving the problem of inaccurate cloud resource prediction results using time domain features in the prior art.
[0076] Please refer to Figure 7 As an implementation of the methods shown in the figures, the present application provides an embodiment of a cloud resource prediction device. The device embodiment corresponds to the method shown in the above embodiments, and the device can be specifically applied to various electronic devices.
[0077] like Figure 7 As shown, the cloud resource prediction device 700 of this embodiment includes:
[0078] The acquisition module 701 is used to acquire the real-time cloud resource usage rate;
[0079] A calling module 702 is used to call a pre-trained neural network model and load model parameters;
[0080] The cloud resource prediction module 703 is used to input the real-time cloud resource utilization rate into the neural network model, obtain the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through the neural network model, and obtain the cloud resource prediction result based on the time domain characteristics and the frequency domain characteristics.
[0081] Optionally, the cloud resource prediction device 700 of this embodiment may further include:
[0082] A neural network model construction module is used to obtain a set of historical cloud resource usage rates within a first time period, wherein the historical cloud resource usage rate set includes multiple historical cloud resource usage rates; and construct the neural network model based on the historical cloud resource usage rate set within the first time period.
[0083] Optionally, the neural network model construction module is also used to normalize the historical cloud resource usage set to obtain a normalized historical cloud resource usage set; use a sliding window mechanism to cut the normalized historical cloud resource usage set to obtain historical cloud resource usage subsets within multiple second time periods; and construct the neural network model based on each of the historical cloud resource usage subsets.
[0084] In this embodiment, the normalization process performed by the neural network model building module can be specifically expressed as:
[0085] The historical cloud resource usage rate set M = {m1, m2, ..., m T}, perform normalization processing, and obtain the normalized historical cloud resource usage rate set
[0086] Among them, m T is the historical cloud resource utilization rate at time T; the normalized formula is 1≤t≤T,m max M={m1,m2,…,m T}The maximum value of the historical cloud resource usage included in the table.
[0087] In this embodiment, the neural network model building module can use the sliding window mechanism to transform the historical cloud resource usage rate set M = {m1, m2, ..., m T} is divided into multiple historical cloud resource usage subsets: {m1,m2,…,m h},{m2,m3,…,m h+1},{m3,m4,…,m h+2},…,{m T-h+1 ,m T-h+2 ,…,m T}. The segmented data is recorded as data set D.
[0088] Optionally, the neural network model building module is also used to perform fast Fourier transform on the historical cloud resource usage subset to obtain frequency domain features of the time series data of the historical cloud resource usage subset; use a time convolution network (TCN) to process the historical cloud resource usage subset to obtain time domain features of the time series data of the historical cloud resource usage subset; perform tensor connection operations on the frequency features and the time domain features in the channel dimension, use jump connections to fuse the frequency features and the time domain features, and obtain time domain and frequency domain fusion features; perform TCN calculations on the time domain and frequency domain fusion features to obtain prediction results corresponding to the historical cloud resource usage subset.
[0089] Optionally, the neural network model building module is further used to calculate the one-dimensional time series D with a channel dimension C in the second time period h. 1D ∈R h×c , the time series data of the historical cloud resource usage subset {m1,m2,…,m h}Use fast Fourier transform to obtain Fourier transform result {M k} is: {M k}:=M1,M1,…,M h ,in,
[0090] Decomposing the Fourier transform result into a real part sequence and an imaginary part sequence; k =M kr +j·M ki ;
[0091] The decomposed Fourier transform result is subjected to conjugate processing to obtain a conjugate processing result:
[0092]
[0093] in,
[0094] The decomposed Fourier transform result is multiplied by the conjugate processing result by corresponding multiplication to obtain the Fourier feature:
[0095]
[0096] The Fourier feature is subjected to two repeated one-dimensional convolutions and processed with the rectified linear unit relu activation function, that is: F′=ReLU[G conv1d (F)], F″=ReLU[G conv1d (F′)], obtain the frequency domain features F″ of the time series data of the historical cloud resource usage subset.
[0097] Optionally, the neural network model building module is further used to generate a neural network model based on the time series data {m1, m2, ..., m h} and convolution kernel f:{0,...,k-1}, after dilated convolution calculation, get l neuron outputs:
[0098]
[0099] Among them, k is the convolution kernel size, d is the expansion factor, f(i) is the i-th element in the convolution kernel, and x l-d·i is the time series data corresponding to the multiplication of the elements in the convolution kernel;
[0100] The neuron output is passed through three consecutive TCN structures for deep feature extraction to obtain the time domain features of the time series data of the historical cloud resource usage subset.
[0101] In this embodiment, the TCN feature extraction expressions of the three stages can be recorded as: 1 TCN , G 2 TCN , G 3 TCN .
[0102] Exemplarily, the neural network model building module can be the time domain feature G of the TCN in the first stage 1 TCN , and the time domain feature G of the third stage TCN 3 TCN , and the frequency domain feature F″ is fused to obtain the time domain and frequency domain fusion feature H = Concat (G 1 TCN ,G 3 TCN ,F″), where Concat means concatenating tensors in the channel dimension.
[0103] Optionally, the cloud resource prediction device 700 of this embodiment may further include:
[0104] A neural network model training module, used to train the neural network model to obtain the model parameters, including:
[0105] The target loss function for the back propagation direction is the root mean square error:
[0106]
[0107] in, is the predicted value corresponding to the i-th cloud resource utilization sample, is the true value corresponding to the actual i-th cloud resource utilization sample, and n is the number of samples;
[0108] The model parameters in the applied network model are updated by the gradient descent method SGD so that the target loss function is optimized to the minimum and the global optimal solution is obtained. When the neural network model reaches convergence, the neural network model training is stopped and the model parameters are obtained.
[0109] The specific implementation method of the cloud resource prediction device provided in the embodiment of the present application can be found in the above Figure 1-6 The cloud resource prediction method provided in the embodiment of the present application is described and will not be described in detail here.
[0110] The cloud resource prediction device provided in the embodiment of the present application can obtain cloud resource prediction results according to the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through a pre-trained neural network model, and fully utilizes the following characteristics of the frequency domain characteristics: the frequency domain characteristics can capture the change pattern of the signal at different frequencies, thereby providing more comprehensive time series information, and the frequency domain characteristics can also improve the long-term dependency problem that the neural network model usually faces when processing time series data by providing information at different time scales, thereby capturing the dependency relationship at different time scales, and the frequency domain characteristics can also reflect the energy distribution of the signal at different frequencies. This feature is less affected by outliers or noise, so that the neural network model has a certain robustness to noise and outliers, and the frequency domain characteristics can also provide a finer-grained interpretation of the time series data, thereby improving the comprehensiveness and accuracy of the cloud resource prediction results, and solving the problem of inaccurate cloud resource prediction results using time domain features in the prior art.
[0111] Reference below Figure 8 , which shows a schematic structural diagram of an electronic device for implementing some embodiments of the present application. Figure 8 The electronic 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.
[0112] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0113] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a disk, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0114] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of 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 some such embodiments, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present application are executed.
[0115] It should be noted that the computer-readable medium described in some embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0116] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0117] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the real-time cloud resource usage rate; calls a pre-trained neural network model and loads model parameters; inputs the real-time cloud resource usage rate into the neural network model, obtains the time domain characteristics and frequency domain characteristics of the real-time cloud resource usage rate through the neural network model, and obtains the cloud resource prediction result based on the time domain characteristics and the frequency domain characteristics.
[0118] Computer program code for performing the operations of some embodiments 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 also conventional procedural programming languages such as "C" language 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, or may be connected to an external computer (e.g., through the Internet using an Internet service provider), including a local area network (LAN) or a wide area network (WAN).
[0119] 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.
[0120] The units described in some embodiments of the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a first determination unit, a second determination unit, a selection unit, and a third determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0122] The above description is only some preferred embodiments of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present application to form a technical solution.
Claims
1. A cloud resource prediction method, characterized in that: The method comprises: Get real-time cloud resource usage; Call the pre-trained neural network model and load the model parameters; The real-time cloud resource utilization rate is input into the neural network model, the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate are obtained through the neural network model, and the cloud resource prediction result is obtained according to the time domain characteristics and the frequency domain characteristics.
2. The method according to claim 1, characterized in that Before obtaining the real-time cloud resource usage rate, the method further includes: Acquire a historical cloud resource usage rate set within a first time period, wherein the historical cloud resource usage rate set includes multiple historical cloud resource usage rates; The neural network model is constructed according to a set of historical cloud resource usage rates in the first time period.
3. The method according to claim 2, characterized in that After obtaining the historical cloud resource usage rate set within the first time period, the method further includes: Normalizing the historical cloud resource usage rate set to obtain a normalized historical cloud resource usage rate set; Using a sliding window mechanism, the normalized historical cloud resource usage set is segmented to obtain historical cloud resource usage subsets within multiple second time periods; The constructing the neural network model according to the historical cloud resource usage rate set in the first time period includes: The neural network model is constructed according to each subset of the historical cloud resource usage rates.
4. The method according to claim 3, characterized in that The step of constructing the neural network model according to each subset of the historical cloud resource usage rate comprises: Performing a fast Fourier transform on the historical cloud resource usage subset to obtain frequency domain characteristics of the time series data of the historical cloud resource usage subset; Using a time convolutional network (TCN) to process the historical cloud resource usage subset, and obtaining the time domain characteristics of the time series data of the historical cloud resource usage subset; Performing a tensor connection operation on the frequency feature and the time domain feature in the channel dimension, using a jump connection to fuse the frequency feature and the time domain feature, and obtaining a time domain and frequency domain fusion feature; Perform TCN calculation on the time domain and frequency domain fusion features to obtain a prediction result corresponding to the historical cloud resource usage rate subset.
5. The method according to claim 4, characterized in that The performing of a fast Fourier transform on the historical cloud resource usage subset to obtain the frequency domain features of the time series data of the historical cloud resource usage subset includes: For the second time period h, the one-dimensional time series D with channel dimension C 1D ∈R h×c , the time series data of the historical cloud resource usage subset {m1,m2,…,m h }Use fast Fourier transform to obtain Fourier transform result {M k } is: {M k }:=M1,M1,…,M h ,in, Decomposing the Fourier transform result into a real part sequence and an imaginary part sequence; k =M kr +j·M ki ; The decomposed Fourier transform result is subjected to conjugate processing to obtain a conjugate processing result: {M k } * ={M k } * :=M1 * ,M2 * ,…,M h * in, The decomposed Fourier transform result is multiplied by the conjugate processing result by corresponding multiplication to obtain the Fourier feature: The Fourier features are subjected to two repeated one-dimensional convolutions and processed with a rectified linear unit (relu) activation function to obtain frequency domain features of the time series data of the historical cloud resource usage subset.
6. The method according to claim 1, characterized in that The use of a time convolutional network (TCN) network to process the historical cloud resource usage subset to obtain the time domain features of the time series data of the historical cloud resource usage subset includes: According to the time series data {m1,m2,…,m h } and convolution kernel f:{0,...,k-1}, after dilated convolution calculation, get l neuron outputs: Among them, k is the convolution kernel size, d is the expansion factor, f(i) is the i-th element in the convolution kernel, and x l-d·i is the time series data corresponding to the multiplication of the elements in the convolution kernel; The neuron output is passed through three consecutive TCN structures for deep feature extraction to obtain the time domain features of the time series data of the historical cloud resource usage subset.
7. The method according to claim 1, characterized in that The method also includes the step of training the neural network model to obtain the model parameters, the step including The target loss function for the back propagation direction is the root mean square error: in, is the predicted value corresponding to the i-th cloud resource utilization sample, is the true value corresponding to the actual i-th cloud resource utilization sample, and n is the number of samples; The model parameters in the applied network model are updated by the gradient descent method SGD so that the target loss function is optimized to the minimum and the global optimal solution is obtained. When the neural network model reaches convergence, the neural network model training is stopped and the model parameters are obtained.
8. A cloud resource prediction device, characterized in that: The device comprises: The acquisition module is used to obtain the real-time cloud resource usage rate; The calling module is used to call the pre-trained neural network model and load the model parameters; The cloud resource prediction module is used to input the real-time cloud resource utilization rate into the neural network model, obtain the time domain characteristics and frequency domain characteristics of the real-time cloud resource utilization rate through the neural network model, and obtain the cloud resource prediction result based on the time domain characteristics and the frequency domain characteristics.
9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Cloud server load prediction method based on signal decomposition and hybrid model
CN117389824A
Resource load trend prediction and early warning method and system oriented to IaaS operation
CN117648181A
Cloud resource prediction method and system based on stacking time convolutional network
CN117785445A
Server energy consumption prediction method based on time-frequency domain feature fusion
CN119046880A
Computing resource autoscaling based on predicted metric behavior
US20220374273A1