Resource management method and device, electronic equipment and storage medium

By extracting the trend and periodic characteristics of the cloud platform's historical resource usage data, using a time series prediction model to predict future loads and generate early warning information, the problem of insufficient virtual machine capacity expansion in traditional methods is solved, and timely response to changes in business load and flexibility in resource management are achieved.

CN120762897APending Publication Date: 2025-10-10CHINA POST INFORMATION TECH (BEIJING CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510887169.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Traditional virtual machine capacity expansion methods lack the ability to predict future loads, resulting in the system being unable to respond in a timely manner when business load suddenly increases, affecting user experience and service quality.

Method used

By obtaining the mean series data of the cloud platform's historical resource usage data, extracting trend features and periodic features, reconstructing the time series data, and loading the time series prediction model for prediction, early warning information is generated for timely expansion.

Benefits of technology

It enables accurate prediction of future resource demands, timely response to changes in business load, and improves the flexibility of resource management and system responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762897A_ABST
    Figure CN120762897A_ABST
Patent Text Reader

Abstract

The invention discloses a resource management method and device, electronic equipment and a storage medium. The method is applied to a cloud platform and comprises the following steps: acquiring mean value sequence data of historical resource use data of the cloud platform; the mean value sequence data comprises a mean value of all virtual machine resource use data in the cloud platform at each moment; extracting trend features and periodic features of the mean value sequence data; performing data reconstruction based on the trend features and the periodic features to obtain time sequence data; loading a time sequence prediction model in the cloud platform, inputting the time sequence data into the time sequence prediction model for prediction, and obtaining a prediction result in a future preset time period; and generating early warning information under the condition that the prediction result meets the early warning condition. According to the resource management method and device, the future trend of resource use data is predicted, the resources are managed in time, the problem that the system cannot respond in time when the service load is suddenly increased is solved, and the flexibility of resource management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a resource management method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of cloud computing technology, cloud platform resource management faces the challenges of efficiency, flexibility, and automation. As one of the core resources of cloud platforms, the dynamic expansion capability of virtual machines is directly related to the performance and user experience of cloud services.

[0003] Traditional VM scaling methods rely primarily on simple threshold-triggered mechanisms, which have significant limitations when dealing with dynamically changing workloads. For example, most existing solutions rely on reactive scaling based on real-time monitoring data, lacking the ability to predict future workloads. This can result in the system being unable to respond promptly to sudden increases in workload, impacting user experience and service quality. Summary of the Invention

[0004] The present invention provides a resource management method, device, electronic device and storage medium to solve the problem that the system cannot respond in time when the business load suddenly increases.

[0005] According to one aspect of the present invention, a resource management method is provided, which is applied to a cloud platform and includes:

[0006] Obtaining mean sequence data of historical resource usage data of the cloud platform; the mean sequence data includes the average value of resource usage data of all virtual machines in the cloud platform at each moment;

[0007] Extracting trend features and period features of the mean sequence data; the trend features are used to reflect the direction of change of the mean sequence data, and the period features are used to capture regular fluctuations in the mean sequence data;

[0008] Reconstructing data based on the trend characteristics and the period characteristics to obtain time series data;

[0009] Loading the time series prediction model in the cloud platform, inputting the time series data into the time series prediction model for prediction, and obtaining prediction results within a preset time period in the future;

[0010] When the prediction result meets the warning condition, a warning message is generated.

[0011] According to another aspect of the present invention, there is provided a resource management device, which is applied to a cloud platform and includes:

[0012] The mean sequence data acquisition module is used to obtain the mean sequence data of the historical resource usage data of the cloud platform; the mean sequence data includes the average value of the resource usage data of all virtual machines in the cloud platform at each moment;

[0013] a feature extraction module, configured to extract trend features and period features of the mean sequence data; the trend features are configured to reflect the direction of change of the mean sequence data, and the period features are configured to capture regular fluctuations in the mean sequence data;

[0014] A time series data reconstruction module is used to reconstruct data based on the trend characteristics and the period characteristics to obtain time series data;

[0015] A prediction module is used to load the time series prediction model in the cloud platform, input the time series data into the time series prediction model for prediction, and obtain the prediction results within a preset time period in the future;

[0016] The early warning module is used to generate early warning information when the prediction result meets the early warning conditions.

[0017] According to another aspect of the present invention, an electronic device is provided, comprising:

[0018] at least one processor; and

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the resource management method described in any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the resource management method according to any embodiment of the present invention when executed.

[0022] The technical scheme of the embodiment of the present application comprises the following steps: obtaining mean sequence data of historical resource usage data of a cloud platform; the mean sequence data comprises average values of resource usage data of all virtual machines in the cloud platform at each time; extracting trend features and periodic features of the mean sequence data; the trend features are used to reflect the change direction of the mean sequence data, and the periodic features are used to capture regular fluctuations in the mean sequence data; performing data reconstruction based on the trend features and the periodic features to obtain time sequence data; loading a time sequence prediction model in the cloud platform, inputting the time sequence data into the time sequence prediction model for prediction to obtain a prediction result in a future preset time period; and generating an early warning information in a case where the prediction result meets an early warning condition. By predicting the future trend of the resource usage data, the resources are managed in a timely manner, the problem that the system cannot respond in a timely manner when the business load suddenly increases is solved, and the flexibility of resource management is improved.

[0023] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0025] Figure 1 is a flowchart of a resource management method provided by the first embodiment of the present application;

[0026] Figure 2 is a structural schematic diagram of a resource management device provided by the second embodiment of the present application;

[0027] Figure 3 is a structural schematic diagram of an electronic device provided by the third embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0029] It is to be understood that the terms "first", "second", and the like, used in the description and the claims of the application, as well as the above-described drawings, are used to distinguish similar objects, and are not necessarily used to describe a particular sequential or chronological order. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the application described herein can be implemented in other than the order illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that comprises a list of steps or units need not be limited to those steps or units that are clearly listed, but can include other steps or units that are not clearly listed or inherent to such processes, methods, products, or apparatuses.

[0030] Embodiment one

[0031] Figure 1 is a flowchart of a resource management method provided by the embodiment one of the application. The embodiment can predict the resource usage of the virtual machines that have realized resource balancing, so as to manage the resources in a future period. The method can be executed by a resource management device, which can be realized in the form of hardware and / or software, and can be configured in a server of a cloud platform. As shown in the figure, the method comprises the following steps. Figure 1

[0032] S110, obtaining mean sequence data of historical resource usage data of the cloud platform; the mean sequence data comprises average values of all virtual machine resource usage data in the cloud platform at each time point.

[0033] The historical resource usage data refers to the resource usage data of the virtual machines in the cloud platform in a past period of time. Specifically, the resource usage data can be the CPU usage rate and the memory usage rate of each virtual machine. For example, the historical resource usage data can be the resource usage rate or the memory usage amount in the last 14 days. Correspondingly, the mean sequence data is the average value of all virtual machine resource usage data in the cloud platform at each time point. Specifically, the mean sequence data comprises a CPU usage rate average value sequence and a memory usage rate average value sequence.

[0034] On the basis of the above embodiment, optionally, the step of obtaining the mean sequence data of the historical resource usage data of the cloud platform comprises the following steps: obtaining the historical resource usage data of each virtual machine in the cloud platform, and determining the mean sequence data of the historical resource usage data based on the historical resource usage data of each virtual machine.

[0035] In the embodiment of the application, the historical resource usage data of each virtual machine is monitored in real time by a monitoring tool built in the cloud platform. The CPU usage rate and the memory usage rate are calculated in a statistical period (which can be set to 60 seconds). The calculation formula is:​

[0036] CPU usage rate = max 60秒 (CPU usage rate);

[0037] Memory usage rate = max 60 (memory usage amount) / total memory amount;

[0038] According to the above formula, the CPU usage rate and the memory usage rate of each virtual machine are calculated every 60 seconds, and are stored in the database respectively.

[0039] Further, the CPU usage rate average sequence (denoted as cpu_ratio_avg) and the memory usage rate average sequence (denoted as memory_ratio_avg) of all virtual machines in the cloud platform are calculated (60 seconds granularity)

[0040] For example, the CPU usage rate average sequence (denoted as cpu_ratio_avg) and the memory usage rate average sequence (denoted as memory_ratio_avg) are shown in Table 1.

[0041] Table 1

[0042] Time cpu_ratio_avg (%) memory_ratio_avg (%) 2025-01-01 00:00:00 30 42 2025-01-01 00:01:00 32 48 2025-01-01 00:02:00 35 50 …… …… ……

[0043] In some embodiments, a data filtering mechanism is set, and a data filtering task is performed regularly (which can be set to every day): judging whether the data is greater than 3 months, if yes, automatically deleting the data 3 months ago.

[0044] S120, extracting the trend feature and the period feature of the average sequence data; the trend feature is used to reflect the change direction of the average sequence data, and the period feature is used to capture the regular fluctuation in the average sequence data.

[0045] In the embodiments of the present application, the average sequence data is subjected to feature extraction, and two important components, the trend feature and the period feature, are separated from the average sequence data. Specifically, the moving average method is adopted for the trend feature extraction, and the trend feature is estimated as follows:

[0046]

[0047] wherein t is a time point, represents the trend feature, x i represents the i-th resource usage data average in the window.

[0048] The extraction process of the period feature is as follows:

[0049] 1) removing the trend feature, wherein d tdenotes the sequence data after removing the periodic characteristics of the mean sequence data;

[0050] 2) Calculate the period length based on the Fourier transform;

[0051] 3) Extract the periodic characteristics, assuming that the period length is m, and let k be the position within the period (for example, if m = 12, k can be an integer from 1 to 12), calculate the average value of position k within each period wherein, jm+k denotes the jth complete period plus the position k within the period; n denotes the time length of the mean sequence data, denotes the number of periods, and it should be noted that if If the ratio is not an integer, round down.

[0052] 4) Standardize the periodic characteristics, wherein, is the average value of all S k .

[0053] 5) Final periodic characteristics, y t = S' t mod m , t mod D denotes mapping the time point t to the position k within a period.

[0054] S130, reconstruct the data based on the trend characteristics and the periodic characteristics to obtain time series data.

[0055] In the embodiments of the present application, the time series data is reconstructed by adding the trend characteristics and the periodic characteristics. The reconstructed time series data is a more smooth and representative data sequence. Through data reconstruction, noise can be effectively filtered out to avoid its interference with model prediction, and at the same time, in the application scenario of the present application, no negative impact on early warning effect is caused.

[0056] S140, load the time series prediction model in the cloud platform, input the time series data into the time series prediction model for prediction to obtain the prediction result in the future preset time period.

[0057] The time series prediction model is used to predict the resource usage data in the future preset time period through historical resource usage data, and specifically, the time series prediction model can be an informer model. The time series prediction model is trained by a data set composed of time series data, and the trained time series prediction model is stored in the cloud platform. The input sequence length of the time series prediction model is 14 days, and the output sequence length is 1 day (i.e. using the data of the last 14 days to predict the data trend of the next 1 day).

[0058] In the embodiments of the present application, time series data is input into a time series prediction model for prediction to obtain a prediction result in a future preset time period. The preset time period can be one day. For example, the resource usage data of the last 14 days is selected, the trend feature and the periodic feature are extracted and reconstructed to obtain the time series data, which is input into the time series prediction model as the input of the time series prediction model, and the resource usage data in the future one day is predicted.

[0059] It should be noted that different time series prediction models are loaded for different resource usage data. Specifically, the time series prediction models corresponding to the CPU usage rate and the memory usage rate are different.

[0060] On the basis of the above-mentioned embodiments, the time series prediction model can optionally include a dynamic adjustment module. The dynamic adjustment module is configured to extract data features of the time series data, input the data features into a multi-layer perception machine to generate sparse adjustment parameters, and adjust a sparse attention layer in the time series prediction model based on the sparse adjustment parameters.

[0061] On the basis of the sparse attention mechanism of the informer, the present application introduces an adaptive sparse attention mechanism, that is, by introducing a dynamic adjustment module, the sparsity degree is dynamically adjusted according to the data features of the time series data. The dynamic adjustment module serves as a pre-module to extract data features of the time series data. The data features include but are not limited to volatility features, mutation trend features, etc. The volatility features can be standard deviations, and the mutation trend features can be sliding differentials. The data features are input into a multi-layer perception machine to generate sparse adjustment parameters, and the sparse attention layer in the time series prediction model is adjusted based on the sparse adjustment parameters. The sparse adjustment parameters include but are not limited to threshold values for attention screening, sampling densities, etc., which are not limited here. Through the dynamic adjustment module, the calculation complexity can be adjusted according to the data features, thereby improving the accuracy of modeling.

[0062] On the basis of the above-mentioned embodiments, the output layer of the time series prediction model can optionally include a Bayesian neural network module. The Bayesian neural network module adds uncertainty quantization to the prediction result. The Bayesian neural network module is configured to sample the weight posterior distribution of the time series prediction model to obtain a plurality of weight samples. Each weight sample is subjected to complete inference to obtain a prediction result set. Statistical analysis is performed on the prediction result set to obtain a confidence interval of the prediction result, which includes an upper interval and a lower interval. Correspondingly, the input of the time series data into the time series prediction model for prediction to obtain a prediction result in a future preset time period includes inputting the time series data into the time series prediction model for prediction to obtain a confidence interval of the prediction result in the future preset time period.

[0063] In order to quantify the uncertainty of the prediction result, a Bayesian neural network module is introduced in the output layer of the time series prediction model, which can provide the confidence interval of the prediction result and enhance the interpretability of the model. Specifically, the Bayesian neural network module can use the Monte Carlo sampling method to sample the weight posterior distribution of the time series prediction model to obtain a plurality of weight samples; for each weight sample, a complete inference is performed to obtain a prediction result set; wherein the prediction result set includes the prediction result corresponding to each weight sample. Statistical analysis is performed on the prediction result set to obtain the confidence interval of the prediction result, and the interval includes an upper interval and a lower interval.

[0064] Correspondingly, the time series data is input into the time series prediction model for prediction to obtain a prediction result in a future preset time period, including: inputting the time series data into the time series prediction model for prediction to obtain the confidence interval of the prediction result in the future preset time period.

[0065] Based on the above embodiment, optionally, the statistical analysis on the prediction result set to obtain the confidence interval of the prediction result includes: determining the prediction mean and the prediction variance based on the prediction result set respectively, and determining the confidence interval of the prediction result based on the prediction mean and the prediction variance.

[0066] Specifically, the calculation formula of the prediction mean is as follows:

[0067]

[0068] Wherein, μ y represents the prediction mean, N represents the number of prediction results in the prediction result set, f wi (x) represents the i-th prediction result in the prediction result set.

[0069] The calculation formula of the prediction variance is as follows:

[0070]

[0071] Wherein, represents the prediction variance, σ 2 is the observation noise variance (a learnable parameter).

[0072] For example, if the confidence interval of the prediction result is a 95% confidence interval: [μ y -1.96σ y , μ y +1..96σ y ]. If the t-distribution assumption is adopted, the confidence interval is [μ y ±t v,0.975 ·σ y]; wherein, V represents a degree of freedom, and is a learnable parameter.

[0073] S150, generating early warning information in a case where the prediction result meets an early warning condition.

[0074] In the embodiments of the application, the prediction result is detected, and early warning information corresponding to the prediction result is generated if the prediction result meets an early warning condition. The early warning information includes one or more of alarm information, warning information, and expansion early warning information.

[0075] On the basis of the above-mentioned embodiments, the early warning information is generated in a case where the prediction result meets an early warning condition, including: detecting an upper interval of a confidence interval of the prediction result, and generating early warning information when the upper interval of the confidence interval meets an early warning condition; and the early warning condition includes one or more of an alarm threshold, a warning threshold, and an expansion early warning rule.

[0076] In the embodiments of the application, an early warning condition configuration is performed, and the early warning condition configuration includes the following parameter configurations:

[0077] Parameter 1: CPU usage rate warning threshold, default value 70%;

[0078] Parameter 2: CPU usage rate alarm threshold, default value 80%;

[0079] Parameter 3: Memory usage rate warning threshold, default value 85%;

[0080] Parameter 4: Memory usage rate alarm threshold, default value 95%;

[0081] Parameter 5: Expansion early warning rule configuration, default: CPU usage rate and memory usage rate reach the warning threshold at the same time, or one of them reaches the alarm threshold.

[0082] The prediction result of the next day can be detected according to the configured early warning condition to trigger early warning. Specifically, the detection object is the upper interval of the prediction result (i.e., CPU usage rate and memory usage rate), and the detection starts from the first time point. When the warning threshold or the alarm threshold is reached, the corresponding warning information or alarm information is issued. When the expansion early warning rule is met, the expansion early warning information is issued. It can be understood that if the warning, the alarm, and the expansion early warning are continuously triggered, they are compressed into one early warning information, and the recording time is the time of the first triggering.

[0083] In some embodiments, the trend prediction of the CPU usage rate and the memory usage rate is respectively displayed through a visual chart, including the data trend of the last 14 days, the prediction confidence interval band of the next day, and the prediction trend, wherein the prediction value=(predicted upper interval+predicted lower interval) / 2.

[0084] In some embodiments, all of the warning, alarm and expansion warning issued by the early warning detection are displayed in the early warning center, and the time thereof can be viewed by the responsible person, and the expansion operation can be performed by the responsible person according to the expansion warning.

[0085] On the basis of the above-mentioned embodiments, optionally, the method further comprises: acquiring new resource usage data, constructing a mixed data set based on the new resource usage data and historical resource usage data in the historical data buffer; and locally training the time series prediction model based on the mixed data set to obtain a new time series prediction model; wherein, in the local training process, only the parameters of the preset layer at the end of the decoder are unfrozen, and the remaining layers are still in a frozen state.

[0086] In the embodiments of the present application, the monitoring tool built-in the cloud platform monitors the resource usage data of each virtual machine in real time. In order to adapt the time series prediction model to the new resource usage data, after receiving the new resource usage data, a mixed data set is constructed based on the new resource usage data and the sampled historical resource usage data in the historical data buffer; using the small batch gradient descent method, the time series prediction model is locally trained based on the mixed data set, the local weight of the model is updated, and a new time series prediction model is obtained.

[0087] It should be noted that, in order to improve the training efficiency and stability, only the parameters of the preset layer at the end of the decoder are unfrozen in the local training process, and the remaining layers are still in a frozen state. Only the parameters of the preset layer at the end of the decoder in the time series prediction model are fine-tuned. Wherein, the preset layer can be 2-3 layers at the end of the decoder. In addition, in order to avoid the forgetting of the model to the historical resource usage data, a historical data buffer can be maintained, representative old data can be periodically sampled therefrom, and a mixed data set can be constructed together with the new resource usage data to participate in training, so that the time series prediction model can dynamically adapt to the new resource usage data, and the entire time series prediction model does not need to be retrained every time new resource usage data is added.

[0088] It can be understood that, in order to ensure the accuracy of the time series prediction model, the training of the new resource usage data can be performed every 3 days, and the model can be saved to the cloud platform.

[0089] The technical solution of this embodiment is to obtain the mean series data of the historical resource usage data of the cloud platform; the mean series data includes the average value of the resource usage data of all virtual machines in the cloud platform at each moment; extract the trend characteristics and period characteristics of the mean series data; the trend characteristics are used to reflect the direction of change of the mean series data, and the period characteristics are used to capture the regular fluctuations in the mean series data; reconstruct the data based on the trend characteristics and period characteristics to obtain time series data; load the time series prediction model in the cloud platform, input the time series data into the time series prediction model for prediction, and obtain the prediction results within the preset time period in the future; generate warning information when the prediction results meet the warning conditions. By predicting the future trend of resource usage data and managing resources in a timely manner, the problem of the system being unable to respond in time when the business load suddenly increases is solved, and the flexibility of resource management is improved.

[0090] Example 2

[0091] Figure 2 This is a schematic diagram of the structure of a resource management device provided by the second embodiment of the present invention. Figure 2 As shown, the device is applied to the cloud platform and includes:

[0092] The mean sequence data acquisition module 210 is used to obtain the mean sequence data of the historical resource usage data of the cloud platform; the mean sequence data includes the average value of the resource usage data of all virtual machines in the cloud platform at each moment;

[0093] A feature extraction module 220 is configured to extract trend features and period features of the mean sequence data; the trend features are configured to reflect the direction of change of the mean sequence data, and the period features are configured to capture regular fluctuations in the mean sequence data;

[0094] A time series data reconstruction module 230 is configured to reconstruct data based on the trend characteristics and the period characteristics to obtain time series data;

[0095] The prediction module 240 is used to load the time series prediction model in the cloud platform, input the time series data into the time series prediction model for prediction, and obtain the prediction results within a preset time period in the future;

[0096] The early warning module 250 is configured to generate early warning information when the prediction result satisfies the early warning condition.

[0097] The technical scheme of the embodiment comprises the following steps: obtaining mean sequence data of historical resource usage data of a cloud platform; the mean sequence data comprises an average value of resource usage data of all virtual machines in the cloud platform at each time; trend features and periodic features of the mean sequence data are extracted; the trend features are used to reflect the change direction of the mean sequence data, and the periodic features are used to capture regular fluctuations in the mean sequence data; data reconstruction is performed based on the trend features and the periodic features to obtain time sequence data; a time sequence prediction model in the cloud platform is loaded, and the time sequence data is input into the time sequence prediction model for prediction to obtain a prediction result in a future preset time period; in the case that the prediction result meets an early warning condition, early warning information is generated. By predicting the future trend of resource usage data, the resources are managed in a timely manner, the problem that the system cannot respond in a timely manner when the business load suddenly increases is solved, and the flexibility of resource management is improved.

[0098] On the basis of the above-mentioned embodiment, the mean sequence data acquisition module 210 is specifically configured to acquire historical resource usage data of each virtual machine in the cloud platform, and determine the mean sequence data of the historical resource usage data based on the historical resource usage data of each virtual machine.

[0099] On the basis of the above-mentioned embodiment, the time sequence prediction model comprises a dynamic adjustment module; the dynamic adjustment module is configured to extract data features of the time sequence data, input the data features into a multi-layer perception machine to generate sparse adjustment parameters, and adjust a sparse attention layer in the time sequence prediction model based on the sparse adjustment parameters.

[0100] On the basis of the above-mentioned embodiment, the output layer of the time sequence prediction model comprises a Bayesian neural network module; the Bayesian neural network module adds uncertainty quantification to the prediction result; the Bayesian neural network module is configured to sample a weight posterior distribution of the time sequence prediction model to obtain a plurality of weight samples; complete inference is performed on each weight sample to obtain a prediction result set; statistical analysis is performed on the prediction result set to obtain a confidence interval of the prediction result, and the interval comprises an upper interval and a lower interval.

[0101] Correspondingly, the prediction module 240 is configured to input the time sequence data into the time sequence prediction model for prediction to obtain a confidence interval of the prediction result in a future preset time period.

[0102] On the basis of the above-mentioned embodiment, the Bayesian neural network module is configured to determine a prediction mean and a prediction variance based on the prediction result set respectively, and determine the confidence interval of the prediction result based on the prediction mean and the prediction variance.

[0103] On the basis of the above-mentioned embodiments, optionally, the early warning module 250 is specifically configured to detect an upper interval of a confidence interval of the prediction result, and generate early warning information when the upper interval of the confidence interval meets an early warning condition; the early warning condition includes one or more of an alarm threshold, a warning threshold, and a capacity expansion early warning rule.

[0104] On the basis of the above-mentioned embodiments, optionally, the device further comprises an incremental training module configured to acquire new resource usage data, construct a hybrid data set based on the new resource usage data and historical resource usage data in a historical data buffer, and locally train the time series prediction model based on the hybrid data set to obtain a new time series prediction model; wherein, in the local training process, only the parameters of the preset layer at the end of the decoder are unfrozen, and the remaining layers are still in a frozen state.

[0105] The resource management device provided in the embodiments of the present application can execute the resource management method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0106] Embodiment three

[0107] Figure 3 is a structural schematic diagram of an electronic device provided in Embodiment Three of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0108] As shown in Figure 3 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is in communication connection with the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0110] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the resource management method.

[0111] In some embodiments, the resource management method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the resource management method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the resource management method by any other appropriate means, such as by means of firmware.

[0112] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0113] A computer program for implementing the resource management method of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor, implements the functions / operations specified in the flow diagrams and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine, or entirely on a remote machine or server.

[0114] Embodiment four

[0115] Embodiment four of the present application also provides a computer readable storage medium, the computer readable storage medium storing computer instructions, the computer instructions being used for causing a processor to execute a resource management method, the method comprising:

[0116] obtaining a mean sequence data of historical resource usage data of the cloud platform; the mean sequence data comprising an average value of resource usage data of all virtual machines in the cloud platform at each time point;

[0117] extracting a trend feature and a periodic feature of the mean sequence data; the trend feature being used for reflecting a change direction of the mean sequence data, and the periodic feature being used for capturing regular fluctuations in the mean sequence data;

[0118] reconstructing data based on the trend feature and the periodic feature to obtain time series data;

[0119] loading a time series prediction model in the cloud platform, inputting the time series data into the time series prediction model for prediction to obtain a prediction result in a future preset time period;

[0120] generating an early warning information in a case where the prediction result meets an early warning condition.

[0121] In the context of the present application, the computer readable storage medium can be a tangible medium, which can contain or store a computer program for use by or in connection with an instruction execution system, apparatus or device. The computer readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. Alternatively, the computer readable storage medium can be a machine readable signal medium. More specific examples of the machine readable storage medium will include one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0122] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0123] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by 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), blockchain network, and the Internet.

[0124] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0125] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present application. For example, the steps recited in the present application can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the technical solutions of the present application are achieved, and the present application is not limited herein.

[0126] The above detailed description does not limit the scope of the application. Various modifications, combinations, sub-combinations and alternatives can be made to the detailed embodiment within the scope of the application. Any modification, equivalent replacement and improvement made without departing from the spirit and principle of the application shall fall within the scope of the application.

Claims

1. A resource management method, applied to a cloud platform, characterized in that: include: Obtaining mean sequence data of historical resource usage data of the cloud platform; the mean sequence data includes the average value of resource usage data of all virtual machines in the cloud platform at each moment; Extracting trend characteristics and period characteristics of the mean sequence data; The trend feature is used to reflect the change direction of the mean sequence data, and the period feature is used to capture the regular fluctuations in the mean sequence data; Reconstructing data based on the trend characteristics and the period characteristics to obtain time series data; Loading the time series prediction model in the cloud platform, inputting the time series data into the time series prediction model for prediction, and obtaining prediction results within a preset time period in the future; When the prediction result meets the warning condition, a warning message is generated.

2. The method according to claim 1, characterized in that The method of obtaining mean sequence data of historical resource usage data of the cloud platform includes: The historical resource usage data of each virtual machine in the cloud platform is obtained, and the mean sequence data of the historical resource usage data is determined based on the historical resource usage data of each virtual machine.

3. The method according to claim 1, characterized in that The time series prediction model includes a dynamic adjustment module; The dynamic adjustment module is used to extract data features of the time series data, input the data features into a multi-layer perceptron, and generate sparse adjustment parameters; The sparse attention layer in the time series prediction model is adjusted based on the sparse adjustment parameter.

4. The method according to claim 1, wherein The output layer of the time series prediction model includes a Bayesian neural network module; the Bayesian neural network module adds uncertainty quantification to the prediction results; The Bayesian neural network module is used to sample the weight posterior distribution of the time series prediction model to obtain a plurality of weight samples; perform complete inference on each weight sample to obtain a set of prediction results; perform statistical analysis on the set of prediction results to obtain a confidence interval of the prediction result, wherein the interval includes an upper interval and a lower interval; Accordingly, the time series data is input into the time series prediction model for prediction to obtain a prediction result within a preset time period in the future, including: The time series data is input into the time series prediction model for prediction, and a confidence interval of the prediction result within a preset time period in the future is obtained.

5. The method according to claim 4, characterized in that The performing statistical analysis on the set of prediction results to obtain a confidence interval of the prediction results includes: A prediction mean and a prediction variance are determined based on the set of prediction results, and a confidence interval of the prediction result is determined based on the prediction mean and the prediction variance.

6. The method according to claim 4, characterized in that When the prediction result meets the warning condition, generating warning information includes: The upper interval of the confidence interval of the prediction result is detected, and when the upper interval of the confidence interval meets the warning condition, warning information is generated; the warning condition includes one or more of the alarm threshold, warning threshold and expansion warning rule.

7. The method according to claim 1, characterized in that The method further comprises: Acquire new resource usage data, and construct a hybrid data set based on the new resource usage data and historical resource usage data in the historical data buffer; The time series prediction model is locally trained based on the mixed data set to obtain a new time series prediction model; wherein, during the local training process, only the parameters of the preset layer at the end of the decoder are unfrozen, and the remaining layers remain in a frozen state.

8. A resource management device, applied to a cloud platform, characterized in that: include: A mean sequence data acquisition module is used to obtain mean sequence data of historical resource usage data of the cloud platform; the mean sequence data includes the average value of resource usage data of all virtual machines in the cloud platform at each moment; a feature extraction module, configured to extract trend features and period features of the mean sequence data; the trend features are configured to reflect the direction of change of the mean sequence data, and the period features are configured to capture regular fluctuations in the mean sequence data; A time series data reconstruction module is used to reconstruct data based on the trend characteristics and the period characteristics to obtain time series data; A prediction module is used to load the time series prediction model in the cloud platform, input the time series data into the time series prediction model for prediction, and obtain the prediction results within a preset time period in the future; The early warning module is used to generate early warning information when the prediction result meets the early warning conditions.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the resource management method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the resource management method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Resource management method, system and equipment for PLC program downloading and medium

    CN121151382A

  • A resource management method, system and device for PLC program download and a medium

    CN121151382B