Resource capacity adjusting method and device for computing power scheduling resource pool and computer equipment
By collecting and analyzing user demand and resource data in the computing power scheduling resource pool, and using the self-attention mechanism and Gaussian joint distribution function to predict future demand, the problem of inaccurate resource capacity adjustment is solved, and efficient dynamic adjustment of resources and guarantee of service quality are achieved.
Patent Information
- Application Number
- CN202510755153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-19
AI Technical Summary
The existing computing power scheduling resource pool resource capacity adjustment method is not very accurate, resulting in resource waste or reduced service quality.
By collecting time series data on user demand distribution and computing power resource performance indicators, the self-attention mechanism of the user demand distribution prediction model is used to extract time series data features, construct a Gaussian joint distribution function, predict future demand, and adjust resource capacity based on the difference and idle resource data.
It improves the accuracy and timeliness of resource capacity adjustment, optimizes resource utilization, and ensures service quality.
Smart Images

Figure CN120670259A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing resource scheduling, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for adjusting the resource capacity of a computing power scheduling resource pool. Background Art
[0002] A cloud resource pool refers to a strategy for pooling and managing computing, storage, and network resources within a cloud computing environment to achieve efficient allocation and utilization. Cloud resource pools can be further divided into resident task resource pools and computing power scheduling resource pools, depending on task type. Resident task resource pools are suitable for long-running tasks (such as web services and databases), which require long-term resource utilization to ensure service continuity and stability. Computing power scheduling resource pools, as a key component of the cloud resource pool, are primarily used to manage and allocate resources for short-term computing tasks (such as batch processing and AI training). Computing power resources are recyclable and reusable after the tasks are completed. Dynamic scaling technology for computing power resource pools aims to optimize the allocation of available resources within the computing power scheduling resource pool by analyzing historical changes in computing power resources and rationally expanding or reducing the total amount of computing, storage, and network resource pools.
[0003] Predictive autoscaling is a key technology for optimizing the efficiency of computing resource pool scheduling. It dynamically adjusts the provided computing resources by predicting user needs to ensure service quality.
[0004] However, the current method for adjusting the resource capacity of the computing power scheduling resource pool has the problem of low accuracy of capacity adjustment. Summary of the Invention
[0005] Based on this, it is necessary to provide a resource capacity adjustment method, device, computer equipment, computer-readable storage medium and computer program product for a computing power scheduling resource pool that can improve adjustment accuracy in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for adjusting the resource capacity of a computing power scheduling resource pool, comprising:
[0007] Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment;
[0008] The user demand distribution time series data and computing resource performance indicator time series data are input into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing resource pool to be adjusted corresponding to each historical time window before the current moment. Each time series data feature sequence contains multiple time series data features, which correspond to different historical moments contained in each historical time window.
[0009] Obtain the actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0010] When the Gaussian joint distribution function meets the preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function;
[0011] Based on the difference between the predicted user demand distribution data and the current user demand distribution data, as well as the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted.
[0012] In conjunction with the first aspect, in one embodiment, user demand distribution time series data and computing resource performance indicator time series data are input into a user demand distribution prediction model, and the self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing resource pool to be adjusted corresponding to each historical time window before the current moment, including:
[0013] The user demand distribution time series data and computing resource performance indicator time series data are grouped to obtain time series data sequences corresponding to each historical time window before the current moment; each time series data sequence contains multiple time series data, corresponding to different historical moments in each historical time window;
[0014] Each time series data sequence is input into the user demand distribution prediction model, and the feature output sequence corresponding to each time series data sequence is obtained through the self-attention mechanism in the user demand distribution prediction model; the feature output sequence includes multiple feature outputs;
[0015] According to each feature output sequence, each time series data feature sequence is obtained.
[0016] In combination with the first aspect, in one embodiment, obtaining each time series data feature sequence according to each feature output sequence includes:
[0017] Get the feature output weights pre-set for each feature output;
[0018] For each feature output sequence, each feature output is weighted and summed using the feature output weight to obtain the feature sequence of each time series data.
[0019] In combination with the first aspect, in one embodiment, the method further includes:
[0020] Obtain the current predicted user demand distribution data corresponding to any current time series data feature sequence through the Gaussian joint distribution function;
[0021] Obtain the prediction error corresponding to the Gaussian joint distribution function based on the actual user demand distribution data and the current predicted user demand distribution data corresponding to the current time series data feature sequence;
[0022] When the prediction error is less than a preset error threshold, determining that the Gaussian joint distribution function meets a preset condition;
[0023] When the prediction error is greater than or equal to the error threshold, the output weights of each feature are adjusted, and new feature sequences of each time series data are obtained. The process then returns to the step of constructing a Gaussian joint distribution function using the feature sequences of each time series data and the actual user demand distribution data until the Gaussian joint distribution function meets the preset conditions.
[0024] In conjunction with the first aspect, in an exemplary embodiment, adjusting the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data, includes:
[0025] A difference threshold is obtained based on idle resource data and a preset scaling trigger threshold;
[0026] When the absolute value of the difference is greater than the difference threshold, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted based on the difference and the scaling trigger threshold.
[0027] In conjunction with the first aspect, in one embodiment, adjusting the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference and the scaling trigger threshold includes:
[0028] Based on the absolute value of the difference and the scaling trigger threshold, the resource capacity change value is obtained;
[0029] If the positive or negative sign of the difference indicates that the difference is a positive number, the resource capacity change value is added to the resource capacity to obtain the adjusted resource capacity, and the preset value is subtracted from the scaling trigger threshold to obtain the new scaling trigger threshold; the new scaling trigger threshold is used as the preset scaling trigger threshold.
[0030] If the sign of the difference indicates that the difference is a negative number, the resource capacity change value is subtracted from the resource capacity to obtain the adjusted resource capacity, and the scaling trigger threshold is added to the preset value to obtain the new scaling trigger threshold.
[0031] In a second aspect, the present application further provides a resource capacity adjustment device for a computing power scheduling resource pool, comprising:
[0032] The data acquisition module is used to collect the time series data of user demand distribution and computing resource performance index up to the current moment from the computing resource pool to be adjusted, and obtain the idle resource data at the current moment;
[0033] The feature extraction module is used to input the user demand distribution time series data and the computing power resource performance indicator time series data into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences corresponding to each historical time window before the current moment in the computing power scheduling resource pool to be adjusted. Each time series data feature sequence contains multiple time series data features, which correspond to different historical moments in each historical time window.
[0034] A function construction module is used to obtain the actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0035] A data prediction module is used to obtain the predicted user demand distribution data corresponding to the next moment through the Gaussian joint distribution function when the Gaussian joint distribution function meets the preset conditions;
[0036] The capacity adjustment module is used to adjust the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data.
[0037] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0038] Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment;
[0039] The user demand distribution time series data and computing resource performance indicator time series data are input into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing resource pool to be adjusted corresponding to each historical time window before the current moment. Each time series data feature sequence contains multiple time series data features, which correspond to different historical moments contained in each historical time window.
[0040] Obtain the actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0041] When the Gaussian joint distribution function meets the preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function;
[0042] Based on the difference between the predicted user demand distribution data and the current user demand distribution data, as well as the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0044] Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment;
[0045] The user demand distribution time series data and computing resource performance indicator time series data are input into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing resource pool to be adjusted corresponding to each historical time window before the current moment. Each time series data feature sequence contains multiple time series data features, which correspond to different historical moments contained in each historical time window.
[0046] Obtain the actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0047] When the Gaussian joint distribution function meets the preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function;
[0048] Based on the difference between the predicted user demand distribution data and the current user demand distribution data, as well as the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted.
[0049] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0050] Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment;
[0051] The user demand distribution time series data and computing resource performance indicator time series data are input into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing resource pool to be adjusted corresponding to each historical time window before the current moment. Each time series data feature sequence contains multiple time series data features, which correspond to different historical moments contained in each historical time window.
[0052] Obtain the actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0053] When the Gaussian joint distribution function meets the preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function;
[0054] Based on the difference between the predicted user demand distribution data and the current user demand distribution data, as well as the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted.
[0055] The resource capacity adjustment method, device, computer equipment, computer-readable storage medium and computer program product of the computing power scheduling resource pool described above collect user demand distribution time series data and computing power resource performance index time series data up to the current moment from the computing power scheduling resource pool to be adjusted, and obtain idle resource data at the current moment, input the user demand distribution time series data and computing power resource performance index time series data into the user demand distribution prediction model, and extract the time series data feature sequence of each historical time window of the computing power scheduling resource pool to be adjusted corresponding to the current moment through the self-attention mechanism of the user demand distribution prediction model, and each time series data feature sequence includes Multiple time series data features correspond to different historical moments contained in each historical time window, and then the actual user demand distribution data corresponding to each time series data feature sequence is obtained from the user demand distribution time series data. The Gaussian joint distribution function is constructed using each time series data feature sequence and each actual user demand distribution data. When the Gaussian joint distribution function meets the preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function. According to the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted. By collecting data in real time from the computing power scheduling resource pool to be adjusted and using the real-time collected data to train the model in real time, the timeliness and accuracy of the model output are improved, thereby improving the accuracy of the predicted user demand distribution data corresponding to the current moment, thereby ensuring the timeliness and accuracy of the resource capacity adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1 This is a diagram illustrating an application environment of a method for adjusting resource capacity of a computing power scheduling resource pool in one embodiment;
[0058] Figure 2 1 is a flow chart of a method for adjusting the resource capacity of a computing power scheduling resource pool in one embodiment;
[0059] Figure 3 A schematic diagram of a process for adjusting resource capacity in another embodiment;
[0060] Figure 4 This is a structural block diagram of a resource capacity adjustment device for a computing power scheduling resource pool in one embodiment;
[0061] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0063] A cloud resource pool refers to a strategy for pooling and managing computing, storage, and network resources within a cloud computing environment to achieve efficient allocation and utilization. Cloud resource pools can be further divided into resident task resource pools and computing power scheduling resource pools, depending on task type. Resident task resource pools are suitable for long-running tasks (such as web services and databases), which require long-term resource utilization to ensure service continuity and stability. Computing power scheduling resource pools, as a key component of the cloud resource pool, are primarily used to manage and allocate resources for short-term computing tasks (such as batch processing and AI training). Computing power resources are recyclable and reusable after the tasks are completed. Dynamic scaling technology for computing power resource pools aims to optimize the allocation of available resources within the computing power scheduling resource pool by analyzing historical changes in computing power resources and rationally expanding or reducing the total amount of computing, storage, and network resource pools.
[0064] Predictive autoscaling is a key technology for optimizing the efficiency of computing resource pool scheduling. It dynamically adjusts the provided computing resources by anticipating user demand to ensure service quality. However, user demand for cloud platform services is often highly complex, characterized by high uncertainty and scale-sensitive time dependencies, posing a significant challenge to accurately predicting future demand. This also makes autoscaling challenging. Autoscaling must account for demand uncertainty and maintain a reasonable balance between low operating costs and service quality, two conflicting factors.
[0065] Traditional autoscaling strategies fall into two extremes. Conservative strategies, based on historical demand statistics, provide a safe and sufficient number of resource instances to ensure user demand is always met. This results in significant resource waste and high operating costs. At the other extreme, reactive strategies adjust the number of resource instances based on immediate user demand. However, due to the cold start nature of instances (spinning new instances to increase cloud resource capacity takes time), this can lead to periodic degradation in service quality.
[0066] The resource capacity adjustment method of the computing scheduling resource pool provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated with server 104 or placed in the cloud or on other network servers. Server 104 has a computing power scheduling resource pool. When terminal 102 initiates a service request, server 104 can call a resource instance in the computing power scheduling resource pool to respond to the service request.
[0067] Server 104 collects user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing power scheduling resource pool to be adjusted, and obtains idle resource data at the current moment, inputs the user demand distribution time series data and computing resource performance indicator time series data into the user demand distribution prediction model, and extracts time series data features of the computing power scheduling resource pool to be adjusted corresponding to each historical time window before the current moment through the self-attention mechanism of the user demand distribution prediction model. Each time series data feature includes multiple time series data features, which respectively correspond to different historical moments contained in each historical time window. The actual user demand distribution data corresponding to each time series data feature sequence is obtained from the user demand distribution time series data. The Gaussian joint distribution function is constructed using each time series data feature sequence and each actual user demand distribution data. When the Gaussian joint distribution function meets preset conditions, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function. Finally, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data. Terminal 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart car devices, and projectors. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Head-mounted devices may include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. Server 104 may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0068] In an exemplary embodiment, Figure 2 As shown, a method for adjusting the resource capacity of a computing power scheduling resource pool is provided. Figure 1 The server 104 in the example is used as an example to illustrate the process, including the following steps S201 to S205.
[0069] Step S201: Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment.
[0070] Among them, the computing power scheduling resource pool can be understood as a component of the cloud resource pool, where the cloud resource pool refers to the pooled management of computing, storage, network and other resources according to certain strategies in the cloud computing environment. The computing power scheduling resource pool is mainly used for the management and allocation of short-term computing tasks (such as batch processing, AI training, etc.); the user demand distribution time series data can be understood as the user demand distribution data at different times. The user demand distribution data refers to the statistical distribution reflecting the needs or preferences of different users for a certain product, service or function; the computing power resource performance index time series data can be understood as the computing power resource performance index data at the current moment. The computing power resource performance index data includes the number of tasks being executed P, the number of tasks in the queue Q, and the CPU demand number CPU req 、GPU requirements number GPU req , CPU utilization C, GPU utilization G, memory utilization M; idle resource data can be understood as resource instances that can currently be called to respond to user needs.
[0071] For example, the server 104 collects the user demand distribution time series data D up to the current time t from the computing power scheduling resource pool to be adjusted. <d1,d2,...,d t > and computing power resource performance indicator time series data, where the computing power resource performance indicator time series data as of time t includes the number of tasks being executed P, the number of tasks in the queue Q, the number of CPU requirements CPU req 、GPU requirements number GPU req , CPU utilization C, GPU utilization G, memory utilization M; where dt is the historical user demand distribution at time t, P= <p1,p2,...,p t >, p t is the number of tasks being executed at time t; where Q= <q1,q2,...,q t >,q t is the number of tasks queued at time t, CPU req = <cpu req1 ,cpu req2 ,...,cpu reqt >, cpu reqt is the number of CPU requirements at time t, GPU req = <gpu req1 ,gpu req2 ,...,gpu reqt >,gpu reqt is the number of tasks being executed at time t, C= <c1,c2,...,c t >, c t is the CPU utilization at time t, G= <g1,g2,...,g t >, g tis the GPU utilization at time t, M= <m1,m2,...,m t >, m t Memory utilization at time t, and at the same time obtain the free resource data at time t .
[0072] Based on the above implementation method, by obtaining multi-dimensional data from the computing power scheduling resource pool to be adjusted, including the diversity of data and the diversity of collection time nodes, the data coverage is increased, laying a data foundation for the subsequent prediction of user demand distribution data, and also improving the timeliness of the real-time trained prediction model.
[0073] In step S202, the user demand distribution time series data and the computing power resource performance indicator time series data are input into the user demand distribution prediction model, and the time series data feature sequence corresponding to each historical time window before the current moment of the computing power scheduling resource pool to be adjusted is extracted through the self-attention mechanism of the user demand distribution prediction model; each time series data feature sequence contains multiple time series data features, which respectively correspond to different historical moments contained in each historical time window.
[0074] Among them, the user demand distribution prediction model can be understood as a machine learning model that is trained in real time and has self-correction capabilities; the time series data feature sequence can be understood as a collection of total time series data feature sequences that integrates the user demand distribution data time series data and the computing resource performance indicator time series.
[0075] Optionally, the user demand distribution time series data D= <d1,d2,...,d t > Input the user demand distribution prediction model with the computing power resource performance indicator time series data, and extract the time series data feature sequence of each historical time window H before the current time t in the computing power scheduling resource pool to be adjusted through the self-attention mechanism of the user demand distribution prediction model. =< , ,..., >, which contains multiple time series data features =< , ,..., >.
[0076] Based on the above implementation method, the self-attention mechanism is used to realize the feature extraction of user demand distribution time series data and computing resource performance indicator time series data, which ensures the accuracy of feature extraction. Secondly, by dividing the historical time window, a large amount of data can be grouped and sorted, which increases the amount of training data, thereby ensuring the generality of the prediction model and improving the prediction speed of user demand prediction.
[0077] Step S203 , obtaining actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and constructing a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data.
[0078] Among them, the Gaussian joint distribution function can be understood as a Gaussian process regression model, which is a non-parametric Bayesian method used to predict continuous variables.
[0079] For example, the server 104 obtains the characteristic sequence of each time series data from the user demand distribution time series data. The corresponding actual user demand distribution data d i+H , as the characteristic sequence S of the time series data ξi The label and output the feature subsequence S ξi and its labels are constructed as training data {S ξi ,d i+H}, and use the Gaussian process regression model to model all N pairs of training data (that is, the aforementioned construction of the Gaussian joint distribution function) to obtain the joint distribution , where d is the user demand distribution, m is the mean function, K is the covariance matrix derived from the kernel function, and N(m,k) means that when N pairs of training data d are input, the value of function f is a multivariate normal distribution, whose mean is determined by the mean function and the covariance is determined by the kernel function.
[0080] Based on the above implementation method, by obtaining the actual user demand distribution data corresponding to each time series data feature sequence and constructing training data, the Gaussian joint distribution function is constructed using the training data, and the Gaussian joint distribution function is constructed in real time, thereby ensuring the timeliness of the Gaussian joint distribution function, thereby improving the timeliness and accuracy of user demand distribution prediction.
[0081] Step S204 : when the Gaussian joint distribution function satisfies a preset condition, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function.
[0082] The preset conditions can be understood as pre-set minimum conditions for determining the distribution prediction accuracy of the constructed Gaussian joint distribution function.
[0083] Optionally, the server 104 will use the joint distribution obtained in step S203 Get the mean value as the predicted value at time i+H , according to the predicted value and the actual value d i+H Get the prediction error and determine whether the prediction error meets the minimum requirement. If it does, get the joint distribution at this time , and according to the joint distribution at this time Calculate all predicted values from time t+1 to time t+H< , ,..., >, and then based on < , ,..., > the mean As the predicted user demand distribution data corresponding to the next moment of the current moment.
[0084] According to the aforementioned embodiment, when the constructed Gaussian joint distribution function meets the set conditions, the Gaussian joint distribution function is used to obtain the predicted user demand distribution data corresponding to the next moment, and the distribution prediction accuracy of the constructed Gaussian joint distribution function is evaluated by setting conditions, thereby improving the prediction accuracy of the predicted user demand distribution data.
[0085] Step S205 : adjusting the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data.
[0086] For example, the server 104 calculates and predicts user demand distribution data and the user demand distribution data d at time t t The difference between , judge the difference Is it a positive or negative value.
[0087] If it is a positive value, it means that future user demand is greater than current user demand, and further determine whether there is If it is true, it means that the resource pool needs to be expanded. Indicates the scaling trigger threshold, based on the scaling trigger threshold and the difference , the resource capacity of the computing power scheduling resource pool to be adjusted is expanded. Otherwise, it indicates that user demand is stable, the computing power scheduling resource pool does not need to be adjusted, and dynamic scaling scheduling is completed.
[0088] If it is a negative value, it means that the future user demand is less than the current user demand. If it is true, it means that the resource pool needs to be scaled down according to the scaling trigger threshold and the difference. , the resource capacity of the computing power scheduling resource pool to be adjusted is scaled down. Otherwise, it indicates that user demand is stable, the computing power scheduling resource pool does not need to be adjusted, and dynamic scaling scheduling is completed.
[0089] Based on the above implementation, by comparing the size between the predicted user demand distribution data and the current user demand distribution data, if the predicted user demand distribution data is greater than the current user demand distribution data, further determine whether capacity expansion is needed. If the difference between the two is determined, Perform capacity expansion operations; if the predicted user demand distribution data is less than the current user demand distribution data, further determine whether capacity reduction is needed. If the judgment is passed, based on the gap between the two Perform capacity reduction operations. Use corresponding means in different situations to achieve adaptive adjustment of resource capacity, realize intelligent resource scheduling, improve resource utilization, and ensure user service experience.
[0090] In the resource capacity adjustment method for the computing power scheduling resource pool described above, user demand distribution time series data and computing power resource performance indicator time series data up to the current moment are collected from the computing power scheduling resource pool to be adjusted, as well as idle resource data at the current moment. The user demand distribution time series data and computing power resource performance indicator time series data are input into a user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract time series data feature sequences corresponding to each historical time window before the current moment of the computing power scheduling resource pool to be adjusted. Each time series data feature sequence includes multiple time series data features, corresponding to different historical moments contained in each historical time window. Then, actual user demand distribution data corresponding to each time series data feature sequence is obtained from the user demand distribution time series data. A Gaussian joint distribution function is constructed using each time series data feature sequence and each actual user demand distribution data. When the Gaussian joint distribution function meets preset conditions, the Gaussian joint distribution function is used to obtain predicted user demand distribution data corresponding to the next moment. The resource capacity of the computing power scheduling resource pool to be adjusted is adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data. By collecting data in real time on the computing power scheduling resource pool to be adjusted and using the real-time collected data to train the model immediately, the timeliness and accuracy of the model output are improved, thereby improving the accuracy of the predicted user demand distribution data corresponding to the current moment, thereby ensuring the timeliness and accuracy of resource capacity adjustment.
[0091] In one embodiment, the user demand distribution time series data and the computing power resource performance indicator time series data are input into the user demand distribution prediction model. The self-attention mechanism of the user demand distribution prediction model is used to extract the time series data feature sequences of the computing power scheduling resource pool to be adjusted corresponding to each historical time window before the current moment, including:
[0092] The user demand distribution time series data and the computing resource performance indicator time series data are grouped to obtain time series data sequences corresponding to each historical time window before the current moment; each time series data sequence contains multiple time series data, which correspond to different historical moments of each historical time window; each time series data sequence is input into the user demand distribution prediction model, and the feature output sequence corresponding to each time series data sequence is obtained through the self-attention mechanism in the user demand distribution prediction model; the feature output sequence contains multiple feature outputs; according to each feature output sequence, the feature sequence of each time series data is obtained.
[0093] Optionally, the server 104 groups the user demand distribution time series data D and the computing resource performance index time series data obtained in step S201 up to time t, and generates a time series data sequence set S= by using a sliding window of size H. <S1,S2,...,S N >, each time series data sequence contains multiple time series data, such as the i-th subsequence S in the set i ={ <d i ,d i+1 ,...,d i+H-1 >, <p i ,p i+1 ,...,p i+H-1 >, i ,q i+1 ,...,q i+H-1 >, <CPU reqi ,CPU reqi+1 ,...,CPU reqi+H-1 >, <GPU reqi ,GPU reqi+1 ,...,GPU reqi+H-1 >, <c i ,c i+1 ,...,c i+H-1 >, <g i ,g i+1 ,...,g i+H-1 >, <m i ,m i+1 ,...,m i+H-1 >}, and there is i∈[1, N], each time series data sequence is input into the user demand distribution prediction model, and the feature output sequence corresponding to each slow data sequence is obtained through the self-attention mechanism in the user demand distribution prediction model. i In terms of i The feature output corresponding to the sequence is 、 、 、 、 、 、 ,as well as ,Finally, the feature sequence of time series data is obtained according to the output sequence of each feature.
[0094] According to the aforementioned implementation method, by grouping the user demand distribution time series data and computing resource performance indicator data, and by dividing a large amount of data into multiple groups of data, multiple groups of data sets for model training can be obtained. Dividing the same data into multiple groups of data according to different forms greatly increases the amount of data training, thereby achieving the training intensity of model training, improving the adaptability of the model to the current environment, and thereby improving the prediction accuracy of user demand distribution.
[0095] In one embodiment, each time series data feature sequence is obtained based on each feature output sequence, including: obtaining a feature output weight pre-set for each feature output; for each feature output sequence, using each feature output weight to perform weighted summation on each feature output to obtain each time series data feature sequence.
[0096] For example, the server 104 obtains the feature output weights w1 to w8 set in advance for each feature output, w1 being The corresponding feature output weight, w2 as The corresponding feature output weight, w3 as The corresponding feature output weight, w4 as The corresponding feature output weight, w5 as The corresponding feature output weight, w6 as The corresponding feature output weight, w7 as The corresponding feature output weight, w8 as The corresponding feature output weight. And there is , j∈[1,8], output sequence for each feature, with sequence S i For example, for S i All corresponding feature outputs are weighted averaged to obtain the subsequence S i The corresponding final feature output ξi=w1ξ di +w2ξ pi +w3ξ qi +w4ξ CPUreqi +w5ξ GPUreqi +w6ξ ci +w7ξ gi +w8ξ mi , and according to each sequence S i The corresponding final feature output ξi constructs a feature output subsequence set =< , ,..., >, combining multiple sequences S i Constructing a feature sequence set for time series data =< , ,..., >.
[0097] Based on the above implementation method, weights are used to achieve the fusion of multi-source data features, which enhances the feature expression ability of the time series data feature sequence. Secondly, key features are highlighted through weight adjustment, and the model's sensitivity to important signals is improved; the multi-source data features are fused into the same feature, which facilitates the subsequent construction of the Gaussian joint distribution function and simplifies the construction process.
[0098] In an exemplary embodiment, the method also includes: obtaining the current predicted user demand distribution data corresponding to any current time series data feature sequence through the Gaussian joint distribution function; obtaining the prediction error corresponding to the Gaussian joint distribution function based on the actual user demand distribution data and the current predicted user demand distribution data corresponding to the current time series data feature sequence; when the prediction error is less than a preset error threshold, determining that the Gaussian joint distribution function meets the preset conditions; when the prediction error is greater than or equal to the error threshold, adjusting the output weights of each feature, and obtaining new time series data feature sequences, and returning to the step of constructing the Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data, until the Gaussian joint distribution function meets the preset conditions.
[0099] Optionally, the server 104 obtains any current time series data feature sequence S by constructing the Gaussian joint distribution function. ξi The corresponding Gaussian joint distribution ,from Get the mean value as the predicted value at time i+H , according to the current time series data feature sequence S ξi The corresponding actual user demand distribution data d i+H , Current predicted user demand distribution data and a preset loss function, calculate the prediction error corresponding to the Gaussian joint distribution function, and when the prediction error is less than the preset error threshold, determine that the Gaussian joint distribution function meets the preset conditions; when the preset error is greater than or equal to the error threshold, return to adjust the feature output weight set for each feature output (if the feature output corresponding to a certain output weight has a large impact on the user demand distribution, then increase the value of the output weight, otherwise reduce the value of the output weight), and obtain new feature sequences of each time series data, and return to the step of constructing a Gaussian joint distribution function using the feature sequences of each time series data and the actual user demand distribution data, until the Gaussian joint distribution function meets the preset conditions.
[0100] According to the aforementioned implementation, by making an error judgment on the predicted distribution information of the constructed Gaussian joint distribution function, and using the comparison result between the error and the pre-set error threshold to determine whether the Gaussian joint distribution function needs to be reconstructed, the environmental adaptability of the Gaussian joint distribution function is guaranteed, and when reconstructing is required, the feature output weights are adjusted, and the controllability of w1~w8 is returned to provide flexible scalability for optimizing specific tasks or adapting to different scenarios.
[0101] In one embodiment, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data, including: obtaining a difference threshold based on the idle resource data and a preset scaling trigger threshold; when the absolute value of the difference is greater than the difference threshold, adjusting the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference and the scaling trigger threshold.
[0102] The scaling trigger threshold can be understood as the pre-set scaling limit of the computing power scheduling resource pool. Since there will be space loss during the commissioning process, the scaling trigger threshold is generally set to a percentage less than 1, usually 70% to 90%.
[0103] For example, the server 104 obtains a preset scaling trigger threshold value. , and based on idle resource data Get the difference threshold , when the absolute value of the difference is greater than the difference threshold ( ),and When the value is positive, the computing power scheduling resource pool needs to be expanded. and scaling trigger thresholds , expand the resource capacity of the computing power scheduling resource pool to be adjusted; when the absolute value of the difference is greater than the difference threshold ( ),and When the value is negative, the computing power scheduling resource pool needs to be scaled down. and scaling trigger thresholds , and scale down the resource capacity of the computing power scheduling resource pool to be adjusted.
[0104] Based on the above implementation, by calculating the corresponding difference threshold based on the idle resource data and the pre-set scaling trigger threshold, and associating the difference threshold with the idle resource data in the computing power scheduling resource pool at the current moment, the accuracy of judging whether the computing power scheduling resource pool to be adjusted needs to be adjusted is improved. The difference and scaling trigger threshold are used to perform corresponding expansion / contraction operations on the resource capacity of the computing power scheduling resource pool to be adjusted, thereby improving the flexibility of resource scheduling and resource utilization.
[0105] In an exemplary embodiment, Figure 3 As shown, according to the difference and the scaling trigger threshold, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted, including step S301, step S302a, and step S302b.
[0106] Step S301: Obtain a resource capacity change value based on the absolute value of the difference and a scaling trigger threshold.
[0107] In step S302a, if the sign of the difference indicates that the difference is a positive number, the resource capacity change value is added to the resource capacity to obtain the adjusted resource capacity, and the preset value is subtracted from the scaling trigger threshold to obtain a new scaling trigger threshold; the new scaling trigger threshold is used as the preset scaling trigger threshold.
[0108] Alternatively, the server 104 calculates the absolute value of the difference. and scaling trigger thresholds , calculate the change in resource capacity and get the change value of resource capacity .exist The positive and negative signs represent the case where the difference is a positive number, that is, the predicted user demand distribution data at the next moment Greater than the current user demand distribution data d t In the case of , it means that the resource instances required at the next moment have increased and capacity expansion is required: Use the resource capacity change value Add the resource capacity to obtain the adjusted resource capacity, and subtract 1% from the scaling trigger threshold to obtain the new scaling trigger threshold. The new scaling trigger threshold is used as the preset scaling trigger threshold for calculating the difference threshold for the next round.
[0109] Based on the aforementioned implementation, the sign of the difference is used to determine the changing trend (increase or decrease) of user demand, improving the sensitivity and accuracy of scheduling. When the predicted demand increases (the difference is positive), resource capacity is adjusted based on the change to ensure that resource supply and demand are synchronized and resource shortages are avoided. Furthermore, the scaling trigger threshold is dynamically adjusted (reduced by 1%) to control the trigger threshold for expansion, ensuring the sensitivity and adjustability of the trigger condition and avoiding frequent and unnecessary resource adjustments.
[0110] Step S302b: If the sign of the difference indicates that the difference is a negative number, the resource capacity change value is subtracted from the resource capacity to obtain the adjusted resource capacity, and the scaling trigger threshold is added to the preset value to obtain a new scaling trigger threshold.
[0111] For example, in The positive and negative signs represent the case where the difference is negative, that is, the predicted user demand distribution data at the next moment Less than the current user demand distribution data d t If the resource instance required at the next moment is reduced, a scaling operation is required: subtract the resource capacity change value from the resource capacity. , obtain the adjusted resource capacity, and add 1% to the scaling trigger threshold to obtain the new scaling trigger threshold.
[0112] According to the aforementioned implementation, when the predicted demand increases (the difference is negative), resource capacity is adjusted based on the change to ensure that resource supply is synchronized with demand and avoid resource shortages. In addition, the scaling trigger threshold is dynamically adjusted (increased by 1%) to control the trigger threshold for scaling down, ensuring the sensitivity and adjustability of the trigger condition and avoiding frequent and unnecessary resource adjustments.
[0113] In one embodiment, a specific implementation method for adjusting the resource capacity of a computing power scheduling resource pool is provided. This method consists of two main steps: historical data feature extraction and predictive dynamic scaling adjustment. The specific method includes the following steps (the following data is a specific example and does not limit the implementation of this application to this specific case):
[0114] (1) Obtain the historical user demand distribution time series data D = from the computing resource pool as of time t <d1,d2,...,d t > and computing power resource performance indicator time series data, where the computing power resource performance indicator time series data as of time t includes the number of tasks being executed P, the number of tasks in the queue Q, the number of CPU requirements CPU req 、GPU requirements number GPU req , CPU utilization C, GPU utilization G, memory utilization M; where dt is the historical user demand distribution at time t, P= <p1,p2,...,p t >, p t is the number of tasks being executed at time t; where Q= <q1,q2,...,q t >,q t is the number of tasks queued at time t, CPU req = <cpu req1 ,cpu req2 ,...,cpu reqt >, cpureqt is the number of CPU requirements at time t, GPU req = <gpu req1 ,gpu req2 ,...,gpu reqt >,gpu reqt is the number of tasks being executed at time t, C= <c1,c2,...,c t >, c t is the CPU utilization at time t, G= <g1,g2,...,g t >, g t is the GPU utilization at time t, M= <m1,m2,...,m t >, m t is the memory utilization at time t.
[0115] (2) Based on the historical user demand distribution time series data D and computing resource performance index time series data obtained at time t in step (1), a subsequence set S = is generated using a sliding window of size H. <S1,S2,...,S N >, where the i-th subsequence S in the subsequence set i ={ <d i ,d i+1 ,...,d i+H-1 >, <p i ,p i+1 ,...,p i+H-1 >, i ,q i+1 ,...,q i+H-1 >, <CPU reqi ,CPU reqi+1 ,...,CPU reqi+H-1 >, <GPU reqi ,GPU reqi+1 ,...,GPU reqi+H-1 >, <c i ,c i+1 ,...,c i+H-1 >, <g i ,g i+1 ,...,g i+H-1 >, <m i ,m i+1 ,...,m i+H-1 >}, and i∈[1,N].
[0116] (3) For each subsequence S in the subsequence set obtained in step (2), i For example, it is input into the self-attention mechanism in the Transformer architecture for feature extraction to obtain the subsequence S i The corresponding feature output 、 、 、 、 、 、 ,as well as .
[0117] (4) Each subsequence S obtained in step (3) i All corresponding feature outputs are weighted averaged to obtain the subsequence S i The corresponding final feature output ξi=w1ξ di +w2ξ pi +w3ξ qi +w4ξ CPUreqi +w5ξ GPUreqi +w6ξ ci +w7ξ gi +w8ξ mi , and according to each subsequence S i The corresponding final feature output ξi constructs a feature output subsequence set =< , ,..., >, each feature output subsequence in the feature output subsequence set =< , ,..., >, where w1~w8 are feature output weights, and their initial values are all set to 0.125, and , j∈[1,8];
[0118] (5) For each feature output subsequence S in the feature output subsequence set obtained in step (4), ξi For example, the historical user demand distribution d at time i+H is obtained from the historical user demand distribution time series data D obtained in step (1). i+H , as the feature output subsequence S ξi The label and output the feature subsequence S ξi and its labels are constructed as training data {S ξi ,d i+H} and use Gaussian process regression model to model all N pairs of training data to obtain the joint distribution , where d is the user demand distribution, m is the mean function, K is the covariance matrix derived from the kernel function, and N(m,k) means that when N pairs of training data d are input, the value of function f is a multivariate normal distribution, whose mean is determined by the mean function and the covariance is determined by the kernel function.
[0119] Specifically, the kernel function used in this application is a Gaussian kernel function.
[0120] (6) The joint distribution obtained from step (5) Get the mean value as the predicted value at time i+H , calculate the predicted value at time i+H through the loss function and the historical user demand distribution d at time i+H i+H and determine whether the error is less than a preset threshold (the threshold value in this application ranges from 0 to 1, preferably 0.005). If so, obtain the joint distribution at this time. , and go to step (7), otherwise adjust the feature output weight in step (4) (if the feature output corresponding to a certain output weight has a great influence on the user demand distribution, then increase the value of the output weight, otherwise reduce the value of the output weight), and return to step (4).
[0121] Specifically, the loss function used in this step is the mean square loss function.
[0122] (7) According to the joint distribution obtained in step (6) Calculate all predicted values from time t+1 to time t+H< , ,..., >.
[0123] (8) Obtain the mean of all predicted values from time t+1 to time t+H obtained in step (7) , and obtain the mean The historical user demand distribution d at time t obtained in step (1) t The difference between .
[0124] (9) Obtain idle resource data at time t from the computing resource pool , and judge the difference obtained in step (8) Is it a positive value or a negative value? If it is a positive value, it means that the future user demand is greater than the current user demand, and then the process goes to step (10). If it is a negative value, it means that the future user demand is less than the current user demand, and then the process goes to step (11).
[0125] (10) Determine whether there is If it is established, it means that the resource pool needs to be expanded, and then go to step (12). Otherwise, it means that the user demand is in a stable state, the resource pool does not need to be adjusted, and the dynamic scaling scheduling is completed. Indicates the scaling trigger threshold. The value range is 70% to 90%, preferably 80%.
[0126] (11) Determine whether there is If it is true, it means that the resource pool needs to be scaled down, and then go to step (12). Otherwise, it means that the user demand is in a stable state, the resource pool does not need to be adjusted, and the dynamic scaling scheduling is completed.
[0127] (12) Obtain the difference from step (9) , the expansion resource capacity is After executing an expansion operation, The value is reduced by 1%, and dynamic scaling scheduling is completed.
[0128] (13) Obtain the difference from step (9) , shrinking resource capacity to After executing a shrink operation, The value increases by 1%, and dynamic scaling scheduling is completed.
[0129] Compared with the existing technology, this application has the following technical advantages:
[0130] 1. Obtain multi-dimensional data from the computing power scheduling resource pool to be adjusted, and use the self-attention mechanism to capture the multi-dimensional features of the multi-dimensional data, generate the corresponding time series data feature sequence, and use the self-attention mechanism to extract features to ensure the accuracy of feature extraction.
[0131] 2. Using the Gaussian joint distribution function to predict user demand distribution data can quantify the prediction uncertainty and thus complete accurate demand forecasting.
[0132] 3. Use the feature sequence of time series data and the corresponding actual user demand distribution data to construct a Gaussian function. When the Gaussian joint distribution function does not meet the preset conditions, return to adjust the feature output weights and reconstruct the Gaussian joint distribution function, ensuring the timeliness and accuracy of the constructed Gaussian distribution function, thereby ensuring the accurate prediction of user demand distribution.
[0133] 4. Obtain the difference between the predicted user demand distribution data and the current user demand distribution data, and construct a difference threshold based on the pre-set scaling trigger threshold and idle resources. Compare the absolute value of the difference with the difference threshold. Adjust the resource capacity and update the scaling trigger threshold according to the pre-set adjustment rules to achieve a flexible trade-off between operating costs and service quality.
[0134] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0135] Based on the same inventive concept, an embodiment of the present application further provides a resource capacity adjustment device for a computing power scheduling resource pool for implementing the resource capacity adjustment method for the computing power scheduling resource pool involved above. The implementation solution provided by the device is similar to the implementation solution described in the above method. Therefore, the specific limitations in the embodiments of the resource capacity adjustment device for one or more computing power scheduling resource pools provided below can be found in the above limitations on the resource capacity adjustment method for the computing power scheduling resource pool, and will not be repeated here.
[0136] In an exemplary embodiment, Figure 4 As shown, a resource capacity adjustment device for a computing power scheduling resource pool is provided, comprising: a data acquisition module 401, a feature extraction module 402, a function construction module 403, a data prediction module 404 and a capacity adjustment module 405, wherein:
[0137] The data acquisition module 401 is used to collect user demand distribution time series data and computing resource performance index time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment;
[0138] Feature extraction module 402 is used to input user demand distribution time series data and computing resource performance indicator time series data into the user demand distribution prediction model, and extract the time series data feature sequences corresponding to each historical time window before the current moment in the computing resource pool to be adjusted through the self-attention mechanism of the user demand distribution prediction model; each time series data feature sequence includes multiple time series data features, which respectively correspond to different historical moments in each historical time window;
[0139] Function construction module 403, used to obtain actual user demand distribution data corresponding to each time series data feature sequence from the user demand distribution time series data, and construct a Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data;
[0140] The data prediction module 404 is configured to obtain the predicted user demand distribution data corresponding to the next moment through the Gaussian joint distribution function when the Gaussian joint distribution function satisfies a preset condition;
[0141] The capacity adjustment module 405 is configured to adjust the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data.
[0142] In one embodiment, the feature extraction module 402 further includes a data grouping submodule, a feature output submodule, and a feature extraction submodule, wherein:
[0143] The data grouping module is used to group the user demand distribution time series data and the computing resource performance indicator time series data to obtain time series data sequences corresponding to each historical time window before the current moment; each time series data sequence contains multiple time series data, corresponding to different historical moments in each historical time window;
[0144] The feature output submodule is used to input each time series data sequence into the user demand distribution prediction model, and obtain the feature output sequence corresponding to each time series data sequence through the self-attention mechanism in the user demand distribution prediction model; the feature output sequence includes multiple feature outputs;
[0145] The feature extraction submodule is used to obtain the feature sequence of each time series data according to each feature output sequence.
[0146] In one embodiment, the feature extraction submodule is further used to obtain feature output weights pre-set for each feature output; for each feature output sequence, each feature output is weighted and summed using each feature output weight to obtain each time series data feature sequence.
[0147] In an exemplary embodiment, the resource capacity adjustment device of the computing power scheduling resource pool also includes a function verification module, which is used to obtain the current predicted user demand distribution data corresponding to any current time series data feature sequence through the Gaussian joint distribution function; obtain the prediction error corresponding to the Gaussian joint distribution function based on the actual user demand distribution data and the current predicted user demand distribution data corresponding to the current time series data feature sequence; when the prediction error is less than the preset error threshold, determine that the Gaussian joint distribution function meets the preset conditions; when the prediction error is greater than or equal to the error threshold, adjust the output weights of each feature, and obtain new time series data feature sequences, and return to the step of constructing the Gaussian joint distribution function using each time series data feature sequence and each actual user demand distribution data, until the Gaussian joint distribution function meets the preset conditions.
[0148] In one embodiment, the capacity adjustment module 405 further includes a difference threshold construction submodule and a capacity adjustment submodule, wherein:
[0149] A difference threshold construction submodule is used to obtain a difference threshold based on idle resource data and a preset scaling trigger threshold;
[0150] The capacity adjustment submodule is used to adjust the resource capacity of the computing power scheduling resource pool to be adjusted based on the difference and the scaling trigger threshold when the absolute value of the difference is greater than the difference threshold.
[0151] In one embodiment, the capacity adjustment submodule is further configured to obtain a resource capacity change value based on an absolute value of the difference and a scaling trigger threshold; if the positive or negative sign of the difference indicates that the difference is a positive number, the resource capacity change value is added to the resource capacity to obtain an adjusted resource capacity, and a preset value is subtracted from the scaling trigger threshold to obtain a new scaling trigger threshold; the new scaling trigger threshold is used as the preset scaling trigger threshold; if the positive or negative sign of the difference indicates that the difference is a negative number, the resource capacity change value is subtracted from the resource capacity to obtain an adjusted resource capacity, and the scaling trigger threshold is added to the preset value to obtain a new scaling trigger threshold.
[0152] Each module in the resource capacity adjustment device for the computing power scheduling resource pool can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, memory and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store user demand distribution data, computing resource performance indicator data, idle resource data, time series data feature sequences, and predicted user demand distribution data. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a resource capacity adjustment method for a computing power scheduling resource pool.
[0154] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0155] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the resource capacity adjustment method of the computing power scheduling resource pool of the above embodiment is implemented.
[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the resource capacity adjustment method of the computing power scheduling resource pool of the above embodiment is implemented.
[0157] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the resource capacity adjustment method of the computing power scheduling resource pool of the above embodiment.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0159] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0160] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0161] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for adjusting the resource capacity of a computing power scheduling resource pool, characterized in that: The method comprises: Collect user demand distribution time series data and computing resource performance indicator time series data up to the current moment from the computing resource pool to be adjusted, and obtain idle resource data at the current moment; Inputting the user demand distribution time series data and the computing power resource performance indicator time series data into the user demand distribution prediction model, and extracting the time series data feature sequences of the computing power scheduling resource pool to be adjusted corresponding to each historical time window before the current moment through the self-attention mechanism of the user demand distribution prediction model; each of the time series data feature sequences includes multiple time series data features, respectively corresponding to different historical moments contained in each of the historical time windows; Obtaining actual user demand distribution data corresponding to each of the time series data feature sequences from the user demand distribution time series data, and constructing a Gaussian joint distribution function using each of the time series data feature sequences and each of the actual user demand distribution data; When the Gaussian joint distribution function satisfies a preset condition, the predicted user demand distribution data corresponding to the next moment is obtained through the Gaussian joint distribution function; According to the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, and the idle resource data, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted.
2. The method according to claim 1, characterized in that The step of inputting the user demand distribution time series data and the computing power resource performance indicator time series data into the user demand distribution prediction model, and extracting the time series data feature sequences of the computing power scheduling resource pool to be adjusted corresponding to each historical time window before the current moment through the self-attention mechanism of the user demand distribution prediction model, includes: Grouping the user demand distribution time series data and the computing resource performance indicator time series data to obtain time series data sequences corresponding to each historical time window before the current moment; each of the time series data sequences includes multiple time series data, each corresponding to a different historical moment in each historical time window; Inputting each of the time series data sequences into the user demand distribution prediction model, and obtaining a feature output sequence corresponding to each of the time series data sequences through a self-attention mechanism in the user demand distribution prediction model; the feature output sequence includes multiple feature outputs; According to each of the characteristic output sequences, each of the time series data characteristic sequences is obtained.
3. The method according to claim 2, characterized in that The step of obtaining each of the time series data feature sequences according to each of the feature output sequences includes: Obtaining a feature output weight pre-set for each of the feature outputs; For each of the feature output sequences, weighted summation is performed on each of the feature outputs using each of the feature output weights to obtain each of the time series data feature sequences.
4. The method according to claim 3, characterized in that The method further comprises: Obtain the current predicted user demand distribution data corresponding to any current time series data feature sequence through the Gaussian joint distribution function; Obtaining a prediction error corresponding to the Gaussian joint distribution function based on actual user demand distribution data corresponding to the current time series data feature sequence and the current predicted user demand distribution data; When the prediction error is less than a preset error threshold, determining that the Gaussian joint distribution function meets a preset condition; When the prediction error is greater than or equal to the error threshold, the weights of the feature outputs are adjusted, and new feature sequences of each time series data are obtained, and the step of constructing a Gaussian joint distribution function using the feature sequences of each time series data and the actual user demand distribution data is returned to until the Gaussian joint distribution function meets the preset conditions.
5. The method according to claim 1, wherein The adjusting the resource capacity of the computing power scheduling resource pool to be adjusted according to the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, and the idle resource data, includes: Obtaining a difference threshold based on the idle resource data and a preset scaling trigger threshold; When the absolute value of the difference is greater than the difference threshold, the resource capacity of the computing power scheduling resource pool to be adjusted is adjusted according to the difference and the scaling trigger threshold.
6. The method according to claim 5, characterized in that The adjusting the resource capacity of the computing power scheduling resource pool to be adjusted according to the difference and the scaling trigger threshold includes: Obtaining a resource capacity change value based on an absolute value of the difference and the scaling trigger threshold; If the positive or negative sign of the difference indicates that the difference is a positive number, adding the resource capacity to the resource capacity change value to obtain an adjusted resource capacity, and subtracting a preset value from the scaling trigger threshold to obtain a new scaling trigger threshold; the new scaling trigger threshold is used as the preset scaling trigger threshold; If the sign of the difference indicates that the difference is a negative number, the resource capacity change value is subtracted from the resource capacity to obtain an adjusted resource capacity, and the scaling trigger threshold is added to the preset value to obtain a new scaling trigger threshold.
7. A resource capacity adjustment device for a computing power scheduling resource pool, characterized in that: The device comprises: The data acquisition module is used to collect the time series data of user demand distribution and computing resource performance index up to the current moment from the computing resource pool to be adjusted, and obtain the idle resource data at the current moment; A feature extraction module is configured to input the user demand distribution time series data and the computing power resource performance indicator time series data into a user demand distribution prediction model, and extract, through the self-attention mechanism of the user demand distribution prediction model, a time series data feature sequence corresponding to each historical time window before the current moment of the computing power scheduling resource pool to be adjusted; each of the time series data feature sequences includes multiple time series data features, each corresponding to a different historical moment contained in each historical time window; a function construction module, configured to obtain actual user demand distribution data corresponding to each of the time series data feature sequences from the user demand distribution time series data, and construct a Gaussian joint distribution function using each of the time series data feature sequences and each of the actual user demand distribution data; A data prediction module, configured to obtain predicted user demand distribution data corresponding to the next moment through the Gaussian joint distribution function when the Gaussian joint distribution function satisfies a preset condition; The capacity adjustment module is used to adjust the resource capacity of the computing power scheduling resource pool to be adjusted according to the difference between the predicted user demand distribution data and the user demand distribution data at the current moment, as well as the idle resource data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.