Service resource allocation determination method, model training method and device
By incorporating time-frequency transformation and causal discovery networks into the prediction model, the problem of inaccurate prediction of future workloads is solved, enabling more efficient allocation of computing resources and improving resource utilization and economic benefits.
Patent Information
- Application Number
- CN202510905893.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies struggle to accurately predict future service workloads, leading to improper allocation of computing resources, low resource utilization, and insufficient economic benefits.
A predictive model, including a time-frequency transformation module, a causal discovery network, and an indicator prediction network, is used to convert time-domain data into frequency-domain data through Fourier transform, discover causal relationships between indicators, and perform fusion and prediction based on frequency-domain data to determine future computing resource allocation.
It improves the resource utilization and economic efficiency of the service cluster by more accurately predicting workloads and optimizing resource allocation decisions.
Smart Images

Figure CN120994362A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and more particularly to a method for determining resource allocation for a service, a model training method, and an apparatus. Background Technology
[0002] Service clusters, such as cloud computing services, can provide various online computing services through their numerous computing units. With the rapid growth of data centers and the increasing complexity of their operation and management, the demand for computing resources in service clusters is constantly increasing. The importance of efficient resource allocation for different services is becoming increasingly prominent, while optimizing the utilization of computing resources also presents significant challenges. Therefore, it is necessary to develop new methods to predict potential future workloads and make informed resource allocation decisions to improve resource utilization and economic efficiency. Simultaneously, privacy protection must be ensured for service-related privacy data during the resource allocation decision-making process.
[0003] Currently, there is a desire for improved solutions that can more accurately predict the future workload of services, thereby more accurately determining the computing resources allocated to services and improving the resource utilization of service clusters. Summary of the Invention
[0004] This specification describes one or more embodiments of a service resource allocation determination method, model training method, and apparatus to more accurately predict the future workload of a service, thereby more accurately determining the computing resources to be allocated to the service and improving the resource utilization of the service cluster. The specific technical solutions are as follows.
[0005] In a first aspect, an embodiment provides a method for determining resource allocation for a service, utilizing a prediction model, wherein the prediction model includes a time-frequency transformation module, a causal discovery network, and an indicator prediction network; the method includes:
[0006] For any first indicator among multiple indicators related to the workload of the first service, the indicator values of the first indicator at several historical moments are used as time-domain data and input into the time-frequency transformation module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data;
[0007] The causal discovery network determines the causal relationship between the multiple indicators based on their frequency domain data, and then uses the causal relationship to fuse the frequency domain data of the multiple indicators to obtain the fused frequency domain data of each of the multiple indicators.
[0008] Based on the fused frequency domain data of the multiple indicators, the prediction network predicts the values of multiple indicators at the next time step.
[0009] Based on the multiple predicted index values, the computing resources allocated to the first service at the next moment are determined.
[0010] In one implementation, the step of fusing the frequency domain data of the multiple indicators using the causal relationship includes:
[0011] Based on the causal relationship, determine the attention score between any first indicator and each indicator;
[0012] The frequency domain data of the multiple indicators are weighted and summed based on the attention score to obtain the fused frequency domain data of the first indicator.
[0013] In one implementation, the indicator prediction network includes a mapping subnetwork and a prediction subnetwork; the step of predicting multiple predicted indicator values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators includes:
[0014] Through the mapping sub-network, for any first index, the fused frequency domain data of the first index is mapped to the parameterized distribution of the next time step;
[0015] Based on the parameterized distribution of the first indicator, the predicted indicator value of the first indicator at the next time step is predicted through the prediction sub-network.
[0016] In one implementation, the prediction subnetwork includes a distribution transformation network and a prediction output network; the step of predicting the predicted index value of the first index at the next time step based on the parameterized distribution of the first index through the prediction subnetwork includes:
[0017] The parameterized distribution of the first indicator is transformed into a corresponding non-parametric distribution through the distribution transformation network.
[0018] Based on the nonparametric distribution of the first index, the predicted index value at the next time step is predicted using the prediction output network.
[0019] In one implementation, the step of predicting the predicted index value of the first index at the next time step based on the nonparametric distribution of the first index through the prediction output network includes:
[0020] The nonparametric distribution of the first index is sampled through the prediction output network, and its predicted index value at the next time moment is predicted based on the sampled data.
[0021] In one implementation, the prediction output network is a multilayer perceptron; the step of predicting the predicted index value of the first index at the next time step based on the nonparametric distribution of the first index through the prediction output network includes:
[0022] The multilayer perceptron is used to process the vector data corresponding to the nonparametric distribution of the first indicator through a neural network to obtain its predicted indicator value at the next time step.
[0023] In one implementation, the plurality of indicators includes several target indicators for characterizing the computing resources used; the step of determining the computing resources allocated to the first service at the next time step based on the values of the plurality of predicted indicators includes:
[0024] Based on the predicted values of the aforementioned target indicators, a decision is made to allocate computing resources to the first service.
[0025] In one implementation, the step of deciding on the allocation of computing resources to the first service based on the predicted values of the plurality of target indicators includes:
[0026] Using Bayesian decision theory, based on the predicted indicators of the aforementioned target indicators, the available computing resources in the service cluster, and the configuration method of the computing resources, the computing resources allocated to the first service are determined.
[0027] In one implementation, the plurality of metrics further includes: service traffic metrics and / or service quality metrics.
[0028] Secondly, the embodiments provide a method for training a predictive model to determine the allocation of computing resources. The predictive model includes a time-frequency transformation module, a causal discovery network, and an indicator prediction network. The method includes:
[0029] For any first indicator among multiple indicators related to the workload of the sample service, the indicator values of the first indicator at several historical moments are used as time-domain data and input into the time-frequency transformation module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data.
[0030] The causal discovery network determines the causal relationship between the multiple indicators based on their frequency domain data, and then uses the causal relationship to fuse the frequency domain data of the multiple indicators to obtain the fused frequency domain data of each of the multiple indicators.
[0031] Based on the fused frequency domain data of the multiple indicators, the prediction network predicts the values of multiple indicators at the next time step.
[0032] Based on the multiple predicted index values and the multiple actual index values of the sample service at the next time step, the prediction loss is determined;
[0033] The causal discovery network and the indicator prediction network are updated based on the predicted loss.
[0034] Thirdly, the embodiments provide a resource allocation determination apparatus for a service, which utilizes a prediction model. The prediction model includes a time-frequency transformation module, a causal discovery network, and an indicator prediction network. The apparatus includes:
[0035] The data conversion unit is configured to take any first indicator from a plurality of indicators related to the workload of the first service, and input the indicator values of the first indicator at several historical moments as time-domain data into the time-frequency conversion module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data.
[0036] The causal discovery unit is configured to determine the causal relationship between the multiple indicators based on the frequency domain data of the multiple indicators through the causal discovery network, and to fuse the frequency domain data of the multiple indicators using the causal relationship to obtain the fused frequency domain data of each of the multiple indicators.
[0037] The indicator prediction unit is configured to predict multiple predicted indicator values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators through the indicator prediction network.
[0038] The resource determination unit is configured to determine the computing resources allocated to the first service at the next moment based on the multiple predicted index values.
[0039] Fourthly, an embodiment provides a predictive model training apparatus for determining computing resource allocation. The predictive model includes a time-frequency transformation module, a causal discovery network, and an indicator prediction network. The apparatus includes:
[0040] The time-frequency conversion unit is configured to take any first indicator from a plurality of indicators related to the workload of the sample service, and input the indicator values of the first indicator at several historical moments as time-domain data into the time-frequency conversion module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data includes the periodicity and trend characteristics of the time-domain data.
[0041] The causal fusion unit is configured to determine the causal relationship between the multiple indicators based on the frequency domain data of the multiple indicators through the causal discovery network, and to fuse the frequency domain data of the multiple indicators using the causal relationship to obtain the fused frequency domain data of each of the multiple indicators.
[0042] The data prediction unit is configured to predict multiple predicted index values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators through the index prediction network.
[0043] The loss determination unit is configured to determine the predicted loss based on the multiple predicted index values and the multiple actual index values of the sample service at the next time step.
[0044] The network update unit is configured to update the causal discovery network and the indicator prediction network based on the prediction loss.
[0045] Fifthly, an embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in any one of the first to second aspects.
[0046] In a sixth aspect, an embodiment provides a computing device including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method described in any one of the first to second aspects.
[0047] In the methods and apparatus provided in the embodiments of this specification, the time-frequency transformation module in the prediction model converts the indicator values of the first service at several historical moments from time-domain data to frequency-domain data. This makes it easier to discover causal relationships between multiple indicators. By fusing these causal relationships with the frequency-domain data, more accurate predicted indicator values can be obtained based on the fused frequency-domain data of multiple indicators. The embodiments of this specification use frequency-domain data to discover causal relationships between different indicators and uncover their inherent correlations. These correlations comprehensively reflect the overall operation of the service. Based on these inherent correlations, the future workload required by the service can be predicted more accurately, thereby improving the resource utilization of the service cluster. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0049] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this application;
[0050] Figure 2 A flowchart illustrating a method for determining resource allocation for a service, provided as an example.
[0051] Figure 3This is a schematic diagram comparing time-domain data and corresponding frequency-domain data.
[0052] Figure 4 A schematic diagram of the architecture of the prediction model provided for the embodiment;
[0053] Figure 5 A schematic diagram of the internal processing flow of an encoder and decoder is provided for an embodiment;
[0054] Figure 6 A flowchart illustrating computational resource decision-making using Bayesian decision theory is provided for an embodiment.
[0055] Figure 7 This is a schematic block diagram of a service resource allocation determination device provided in an embodiment. Detailed Implementation
[0056] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0057] As mentioned above, service clusters include, but are not limited to, cloud computing services, and can also be load balancing clusters or storage clusters. A service cluster contains multiple computing units and provides services to the outside world through these units. The services that a service cluster can provide include model inference services and data storage services. The services provided by a service cluster can be online or offline; for example, a service cluster can provide online AI (Artificial Intelligence) model inference services, which are used for model training and inference using the trained model. The computing units contained in a service cluster can be distributed or non-distributed.
[0058] When a service cluster provides a service, it generates an actual workload. This workload includes access volume, traffic, and the computing resources used. The computing resources within the workload refer to the actual computing resources used by the service cluster when providing the service, including CPU usage, GPU (graphics processing unit) usage, and memory usage.
[0059] When a service cluster provides a service, it can obtain service status data corresponding to that service. Service status data refers to the status data of the service when the service cluster provides computational services. This data includes several performance metrics, such as service traffic, computing resources used, and service quality. These metrics can be used to describe the service's performance and utilization. In other words, the workload contains this service status data, including service traffic metrics, computing resource usage metrics, and service quality metrics.
[0060] Service traffic can refer to the number of times a service is called within a certain time unit, such as 1 day, 1 hour, or 1 minute. Service traffic reflects how frequently a service is called.
[0061] The computing resources used by the service, such as CPU usage, GPU usage, and memory usage, can be expressed in terms of numbers.
[0062] Service quality includes, for example, average service latency, CPU utilization, GPU utilization, and memory utilization.
[0063] The service cluster can also record historical metrics, which are service status data recorded at multiple timestamps, including metrics such as service traffic, computing resources used by the service, and service quality. Service traffic, computing resources used by the service, and service quality are information at different levels, which can be used to capture and improve predictive performance.
[0064] In the process of a service cluster providing services to the outside world, workload forecasting and resource scheduling are often required. Workload forecasting refers to predicting the workload that may be generated in the future based on historical usage, thereby assisting in the resource scheduling and management of the service cluster. Resource scheduling optimizes resource allocation based on the predicted workload for the service, thereby improving resource utilization and service quality.
[0065] Resource scheduling can be performed at the basic unit of computation. A computation unit includes a specific configuration of computing resources such as CPU, GPU, and memory. A computation unit can be implemented as a container (pod). For example, a container contains computing resources such as 2 CPUs, 4 GPUs, and 5 memory.
[0066] Resource allocation for a service is not limited to allocating computing resources within a service cluster; it can also include allocating computing resources outside the service cluster, such as allocating computing resources on a single computing device, including CPU usage, GPU usage, and memory usage. The following explanation will use computing resources within a service cluster as an example.
[0067] This application also involves prediction tasks and automatic scaling decisions. The prediction task, based on historical indicators and hierarchical information, predicts the possible distribution of indicators at a future timestamp. Automatic scaling decisions refer to determining the appropriate number of computing units to allocate to the service based on the predicted indicator distribution and the configured computing units.
[0068] The embodiments provided in this application are described below.
[0069] Figure 1This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this application. It includes a service cluster and a computing device. The service cluster contains several computing units. The computing device is used to perform prediction tasks and autoscaling decisions. Specifically, the service cluster can provide the computing device with service status data of a certain service at several historical moments. When the computing device receives the service status data from the service cluster, it uses a prediction model to perform causal discovery between multiple indicators, obtains the causal relationships between the indicators, and predicts computing resources based on these causal relationships and the service status data, i.e., predicts the computing resources to be allocated to the service at the next moment. Figure 1 This is merely one implementation scenario of this application; other implementation scenarios can be derived based on this scenario. For example, a service cluster can store historical service status data in a data center, and computing devices can retrieve historical service status data from the data center.
[0070] In the above-described implementation scenarios, this application provides a resource allocation determination method, aiming to more accurately predict the future workload that a service may generate, thereby more accurately determining the computing resources allocated to the service in the future based on this workload, and improving the resource utilization of the service cluster. This method is implemented based on a prediction model, which is used to predict the workload that a service may generate at a future time (i.e., the time after the current time).
[0071] The following is combined with Figure 2 The embodiments are described in detail below.
[0072] Figure 2 This is a flowchart illustrating a method for determining resource allocation for a service, provided in an embodiment. Prediction model N1 predicts the potential workload of the first service S1 at future times based on historical service status data of the first service S1. The historical time can be a moment within a first time period prior to a base time, and the future time can be the moment immediately following the base time. For example, if the time unit is one day, the first time period is one week, and the base time can be any moment or the current moment, prediction model N1 can predict the computing resources for the first day after the week based on service status data within the week prior to the base time.
[0073] The prediction model N1 includes a time-frequency transformation module A, a causal discovery network B, and an indicator prediction network C. The causal discovery network B and the indicator prediction network C contain model parameters, while the time-frequency transformation module A does not contain model parameters.
[0074] This method is executed by a computing device, which can be any device, equipment, platform, or cluster of devices with computing and processing capabilities. The method specifically includes the following steps.
[0075] Step S210: For any first indicator a among multiple indicators (e.g., n indicators) related to the workload of the first service S1, the indicator values of the first indicator a at several historical moments are used as time-domain data and input into the time-frequency conversion module A. In the video conversion module A, Fourier transform is used to convert the time-domain data into frequency-domain data.
[0076] The frequency domain data contains the periodicity and trend characteristics of the corresponding time domain data. n is generally an integer greater than 1. "Several" includes one or more.
[0077] The values of n metrics at several historical points in time can be obtained from the service status data of the first service S1 at those historical points. The service status data includes the metric data of multiple metrics of the first service S1. The first service S1 is any service provided by the service cluster, such as a model inference service. The n metrics include computing resource metrics, and may also include service traffic metrics and / or service quality metrics. Table 1 lists the multiple metrics included in the service status data in a certain example.
[0078] Table 1
[0079]
[0080] The number of calls refers to the number of times the first service S1 is called per unit of time. Average latency is the average delay time. The metrics in Table 1 are merely examples. In practical applications, different metrics may exist depending on the specific scenario.
[0081] The baseline time is t, and several historical time points (t1, t2, t3, t4, etc.) refer to the service status data at multiple time points prior to the baseline time. Assume that the service status data includes three indicators a, b, and c, and the service status data at each historical time point (ti) includes indicator a data for ti, indicator b data for ti, and indicator c data for ti.
[0082] Any given moment (including historical moments and the next moment) essentially corresponds to a time period. For example, when one hour is chosen as the time unit, multiple historical moments can be understood as the first hour (t1), the second hour (t2), the third hour (t3), and so on, before the current moment t. The service status data for multiple historical moments includes: indicator data a, indicator data b, and indicator data c within the first hour; indicator data a, indicator data b, and indicator data c within the second hour; indicator data a, indicator data b, and indicator data c within the third hour, and so on. Table 2 shows the service status data details of the first service S1 at four historical moments in an example.
[0083] Table 2
[0084]
[0085] Here, xx represents the corresponding indicator value. The indicator values of the first indicator 'a' at multiple historical times t1, t2, t3, and t4 constitute the time-domain data of the first indicator 'a', and the second indicator 'b' and the third indicator 'c' are similarly represented. The service status count contains the time-domain data of n indicators, which are also indicator values or time-series data. It can be seen that the time-domain data is the indicator data of a certain indicator at different times, which includes the periodicity and trend characteristics of the indicator.
[0086] The time-frequency transformation module A performs a pure Fourier transform on the input time-domain data to obtain the corresponding frequency-domain data. This includes pre-written transformation code, but does not contain model parameters and does not require training. The time-frequency transformation module A is a pre-written program module.
[0087] Time-domain data can also be called time-domain signals, and frequency-domain data can also be called frequency-domain signals. The time-domain data of the first index 'a' can be represented as a t-dimensional vector. After Fourier transform, the t-dimensional vector is transformed into a k-dimensional vector, which is the transformed frequency-domain data. The t-dimensional vector can be the embedding vector corresponding to the time-domain data of the first index 'a'. The specific implementation of converting time-domain data to frequency-domain data using Fourier transform in time-frequency transformation module A can be found in existing technologies and will not be detailed here.
[0088] Each metric in the service status data is processed according to this step. For each metric, its time-domain data is converted to its corresponding frequency-domain data. When there are n metrics, the n time-domain data can be converted separately to obtain n frequency-domain data, denoted as D.
[0089] Step S220: Through the causal discovery network B, the causal relationship between the n indicators is determined based on the frequency domain data D of the n indicators. The frequency domain data D of the n indicators is then fused using the aforementioned causal relationship to obtain the fused frequency domain data D′ of each of the n indicators.
[0090] The causal discovery network B can be a neural network built based on causal discovery algorithms. These algorithms include those based on Granger causality tests and constraint-based Bayesian causal structure learning algorithms. The causal discovery network B is used to determine the fused frequency domain data D′ of n indicators based on the frequency domain data D of the input n indicators.
[0091] A neural network built on a causal discovery algorithm can leverage the nonlinear modeling capabilities of neural networks, combined with sparsity constraints (such as Lasso penalties), to identify potential causal relationships among frequency domain data D of n indicators. This neural network model can assign different weights to different variables, assess their contribution to prediction, and thus identify causal relationships between variables.
[0092] The causal relationships among n indicators reflect the inherent correlations between different indicators. This includes the correlations between indicators at different levels, as well as the correlations between different indicators at the same level. Therefore, this correlation can more comprehensively reflect the overall picture of service operation.
[0093] Causal relationships can be represented by numerical values between 0 and 1, with larger values indicating stronger causal relationships. Causal relationships can also include whether the causal relationship between two indicators is positive or negative. For example, one type of causal relationship includes a positive causal relationship between indicator a and indicator b; when the data for indicator a increases, the data for indicator b also increases. For instance, there is a positive causal relationship between service traffic and CPU usage; when service traffic increases, CPU usage also increases. Another type of causal relationship includes a causal relationship between indicator a and indicator b; when the data for indicator a increases, the data for indicator b decreases.
[0094] After processing in step 2, all causal relationships between multiple indicators can be discovered, such as the causal relationships between the first indicator a and the second indicator b, the first indicator a and the third indicator c, and the second indicator b and the third indicator c.
[0095] Using frequency domain data of n indicators to model the causal relationships between different indicators will result in more accurate causal relationships. This will be illustrated below with a comparison between time domain data and frequency domain data.
[0096] Figure 3 This is a comparative diagram of time-domain data and its corresponding frequency-domain data. The time-domain data is obtained by Fourier transforming the time-domain data. The time-domain data contains index values at multiple historical moments and the next moment (represented by small boxes), while the frequency-domain data contains frequency values at two frequency points, f1 and f2. Time-domain data focuses on the characteristics of data changing over time. In the time domain, the horizontal axis represents time, and the vertical axis represents the amplitude of the frequency-domain data. In the frequency domain, the horizontal axis represents frequency, and the vertical axis represents the amplitude of the frequency-domain data, i.e., a spectrum. Frequency-domain data focuses on the various frequency components of the signal and the intensity of these components.
[0097] This conversion between time-domain and frequency-domain data is lossless and does not result in any loss of data. Frequency-domain data contains the periodicity and trend characteristics of the corresponding time-domain data, and these characteristics are more pronounced in the frequency-domain data than in the time-domain data. Compared to directly analyzing the causal relationships between different indicators based on time-domain data, it is easier to model these causal relationships using frequency-domain data, and the identified causal relationships are more accurate.
[0098] In one implementation, the causal discovery network B may comprise a neural network constructed based on a causal discovery algorithm and a neural network constructed based on an attention mechanism. The former neural network is used to determine the causal relationship between n indicators based on frequency domain data D of n indicators, and the latter neural network is used to fuse the frequency domain data D of the n indicators using the causal relationship to obtain fused frequency domain data D′ of the n indicators. Both neural networks can be constructed using existing neural network structures.
[0099] In this step, when fusing the frequency domain data of n indicators using causal relationships, the following steps 1 and 2 can be performed.
[0100] Step 1: Determine the attention scores between any first indicator 'a' and each indicator based on causal relationships.
[0101] Step 2: Based on the attention score, perform a weighted summation of the frequency domain data D of the n indicators to obtain the fused frequency domain data D′ of the first indicator a.
[0102] In step 1, the causal relationship values between the first indicator 'a' and each of the other indicators can be used as the attention score. This attention score can be constructed as an n-dimensional vector. In step 2, the frequency domain data D of the n indicators can be weighted and summed directly based on this attention score vector, or the attention score can be normalized before weighting and summing the frequency domain data D of the n indicators to obtain the fused frequency domain data D′ of the first indicator 'a'. Each of the n indicators can be processed in the above manner to obtain its corresponding fused frequency domain data D′.
[0103] In practical applications, an n*n dimensional causal relationship matrix can be constructed, which includes the causal relationships between each indicator and all other indicators. For example, any element x in this causal relationship matrix... ij This represents the causal relationship value between the i-th and j-th indicators. Next, based on the product of this causal relationship matrix and the frequency domain data matrix (n*k dimensions) of the n indicators, the fused frequency domain data D′ for each of the n indicators is obtained. The frequency domain data of any indicator is a k-dimensional vector. When the frequency domain data of the first indicator 'a' is a k-dimensional vector, its fused frequency domain data D′ is also a k-dimensional vector.
[0104] For example, given three indicators, a 3x3 causal relationship matrix, after normalization, can be used as an attention score matrix (containing the attention score vector for each indicator). For instance, the attention score vector for the first indicator 'a' is (S11, S12, S13), and the frequency domain data vectors for the three indicators are X1, X2, and X3, respectively. The fused frequency domain data for the first indicator 'a' can be obtained using the following formula: S11*X1 + S12*X2 + S13*X3.
[0105] The above describes one implementation method for fusing frequency domain data of multiple indicators based on an attention mechanism and utilizing causal relationships. In practical applications, other specific implementation methods can also achieve the above fusion, such as performing other processing on the causal relationships or on the weighted summation result, etc.
[0106] The fused frequency domain data D′ of each of the n indicators contains causal relationship data between the n indicators, which makes the features of the fused frequency domain data D′ richer and more comprehensive.
[0107] Step S230: Using the indicator prediction network C, based on the fused frequency domain data D′ of each of the n indicators, predict the n predicted indicator values at the next time step.
[0108] The metric prediction network C is used to predict the values of n metrics at the next time step based on the fused frequency domain data D′ of each of the n metrics. This prediction process forecasts the workload that the first service S1 may require at the next time step, including predictions of potential service traffic, computing resources used, and service quality. Potentially usable computing resources include, for example, CPU usage, GPU usage, and memory usage. Usage can include data such as quantity (number of resources).
[0109] Step S240: Determine the computing resources allocated to the first service S1 at the next moment based on n predicted index values.
[0110] In this embodiment, the computing resources that may be used obtained in this step can be increased or decreased directly based on the possible service traffic and the possible service quality, so as to obtain the computing resources allocated to the first service S1 in the next moment.
[0111] In this embodiment, by fusing the causal relationships between multiple indicators into historical indicators, fused feature data (fused frequency domain data D′) containing the correlation between different indicators is obtained. This fused feature data can more accurately reflect the overall picture of service operation, and workload prediction based on this feature data will be more accurate.
[0112] In another embodiment of this application, the indicator prediction network C includes a mapping subnetwork C1 and a prediction subnetwork C2. Figure 4 A schematic diagram of an architecture for a prediction model provided in an embodiment.
[0113] In this embodiment, when predicting multiple predicted index values of n indicators at the next time moment based on the fused frequency domain data D′ of each of the n indicators in step S230, it can be done according to the following steps 3 and 4.
[0114] Step 3: Through the mapping sub-network C1, for any first index a, map the fused frequency domain data D′ of the first index a to the parameterized distribution at the next time step. Perform this step on all other indices among the n indices to obtain the parameterized distributions corresponding to the n indices.
[0115] The mapping subnetwork C1 is used to map the fused frequency domain data D′ of the input first indicator a to the parameterized distribution at the next time step. The fused frequency domain data D′ of the first indicator a can be the output of the causal discovery network. The mapping subnetwork C1 can be implemented using a multilayer perceptron (MLP).
[0116] The parameterized distribution can be represented by an r-dimensional vector. The parameterized distribution can be, but is not limited to, a Gaussian distribution. When the parameterized distribution is Gaussian, the r-dimensional vector contains information about the mean and standard deviation of that Gaussian distribution.
[0117] This mapping operation in the embodiment is itself a prediction of the indicator data for the next time step. The mapping can be based on the parameters in the prediction model.
[0118] Step 4: Using the prediction subnetwork C2, predict the predicted index value of the first index a at the next time step based on the parameterized distribution of the first index a.
[0119] The prediction subnetwork C2 is used to predict the value of the first indicator a at the next time step based on the parameterized distribution of the input first indicator a. The parameterized distribution of the first indicator a can be the output of the mapping subnetwork C1.
[0120] When making predictions based on the parameterized distribution of the first indicator a, the parameterized distribution of the first indicator a can be sampled directly, and the predicted value of the first indicator a at the next time step can be obtained based on the sampling results.
[0121] In this embodiment, the fused frequency domain data of any first indicator 'a' includes data from several historical moments, which reflects the periodicity and trend of the first indicator 'a'. Therefore, the parameterized distribution at the next moment can be predicted based on the fused frequency domain data D′ of the first indicator 'a' at several historical moments. Note that the prediction here is not the predicted indicator value at the next moment, i.e., it is not a point data prediction, but rather a parameterized distribution is used to replace point data prediction.
[0122] Predictions based on parameterized distributions are more accurate than point predictions. For example, knowing the variance (or standard deviation) of the parameterized distribution tells us the average deviation of the predicted result from the mean, allowing us to adjust the allocated computational resources based on the magnitude of the equation during decision-making.
[0123] In an embodiment, the prediction subnetwork C2 may further include a distribution transformation network C21 and a prediction output network C22.
[0124] In step 4, when predicting the predicted index value of the first index a at the next time step using the prediction subnetwork C2 based on the parameterized distribution of the first index a, the following steps 4-1 and 4-2 may be included.
[0125] Step 4-1: Using the distribution transformation network C21, the parameterized distribution of the first index a is transformed into its corresponding non-parametric distribution. In this application, the non-parametric distribution is equivalent to the non-parametric distribution.
[0126] In this step, the r-dimensional vector representing the parameterized distribution of the first indicator 'a' can be transformed into an h-dimensional vector representing the non-parametric distribution. Typically, h is greater than r. In practical applications, the parameterized distribution of the first indicator 'a' can be sampled to obtain a sampled vector, and the corresponding non-parametric distribution can be determined based on this sampled vector. The features contained in the non-parametric distribution are more complex.
[0127] The distribution transformation network C21 is used to transform the parameterized distribution of the input first index a into its corresponding non-parametric distribution. The parameterized distribution of the first index a can be the output of the mapping sub-network C1. The distribution transformation network C21 can be implemented using a variational autoencoder (VAE), an autoregressive model (such as LSTM or Transformer), a normalized flow, or an invertible MLP.
[0128] Step 4-1: Using the prediction output network C22, predict the value of the first indicator a at the next time step based on the nonparametric distribution of the first indicator a.
[0129] The prediction output network C22 is used to predict the value of the first indicator 'a' at the next time step based on the nonparametric distribution of the input first indicator 'a'. The nonparametric distribution of the first indicator 'a' is the output of the distribution transformation network C21. The prediction output network C22 can be implemented using an MLP.
[0130] In this step, the nonparametric distribution of the first indicator 'a' is sampled, and its predicted value at the next time step is predicted based on the sampled data. After sampling the nonparametric distributions of n indicators, the predicted value for each indicator is obtained.
[0131] Alternatively, the prediction output network C22 can also be implemented as a multilayer perceptron (MLP). The nonparametric distribution of the first indicator 'a' is input into this MLP, which then performs neural network processing on the vector data corresponding to the nonparametric distribution of 'a' to obtain its predicted indicator value at the next time step. After inputting the nonparametric distributions of n indicators into the MLP, the MLP can predict the nonparametric distributions of the n indicators separately and output their respective predicted indicator values at the next time step.
[0132] In this embodiment, parametric and non-parametric distributions are two different types of probability distributions in statistics. Parametric distributions assume that data follows a specific distributional form and are described by estimating a finite number of parameters. Their probability density function (PDF) or probability mass function (PMF) is determined by these finite number of parameters. For example, the Gaussian distribution is a parametric distribution, which can be determined by its mean and standard deviation. Non-parametric distributions, on the other hand, do not assume that data follows a specific distributional form. Instead, they learn the distribution directly from the data, and their probability density function or probability mass function does not depend on a finite number of parameters. Compared to parametric distributions, non-parametric distributions are more complex and more suitable for real-world service cluster data with complex distributional characteristics, thus resulting in higher accuracy in predicting computational resource usage.
[0133] The following section provides an overall explanation of how the prediction model N1 is implemented. The prediction model N1 can be implemented using a deep learning model, and its internal modules and networks can be functionally divided into encoders and decoders.
[0134] See Figure 5 , Figure 5 This is a schematic diagram of the internal processing flow of an encoder and decoder provided for an embodiment.
[0135] The encoder part is used to perform the following steps: through the time-frequency transformation module, the index values of multiple (n) indicators at several historical moments are converted into corresponding frequency domain data; through the causal discovery network, the causal relationship between the n indicators is determined from the frequency domain data of the n indicators; and based on the attention mechanism, the frequency domain data of multiple indicators are fused using the causal relationship to obtain the fused frequency domain data of each of the multiple indicators; and through the mapping sub-network, the fused frequency domain data is mapped to the corresponding parameterized distribution.
[0136] The decoder part is used to perform the following steps: converting n parameterized distributions into corresponding nonparametric distributions through a distribution transformation network, and sampling or predicting the corresponding prediction index values from the nonparametric distributions through a prediction output network.
[0137] In another embodiment of this application, in step S240, when determining the computing resources allocated to the first service S1 at the next moment based on n predicted index values, the decision to allocate computing resources to the first service S1 can be made based on the predicted index values of several target indicators. Here, the target indicators are indicators used to characterize the computing resources used.
[0138] In a service cluster scenario, the configuration of available computing units is pre-set; for example, the number of CPUs, GPUs, and memory in a computing unit are pre-defined. The following explains how to further determine the computing resources allocated to the first service S1 in the next moment based on the predicted values of the determined target metrics.
[0139] In one implementation, computing units with values not less than the predicted target metric can be directly allocated as computing resources to the first service S1. For example, the predicted metric might include 4 CPUs, 5 GPUs, and 6 memory. Assuming a container (computing unit) is configured with 2 CPUs, 4 GPUs, and 5 memory, then 2 containers can be selected as computing resources for this service, because 2 containers contain 4 CPUs, 8 GPUs, and 10 memory, which are greater than the predicted metric requirements of 4 CPUs, 5 GPUs, and 6 memory, respectively.
[0140] Since the predicted index values have a certain degree of uncertainty, the above method treats the predicted index values as deterministic data, which allows for optimization in the decision-making process from the predicted index values to computing resources.
[0141] To improve the effectiveness of the decision-making process and achieve a more accurate and adaptive resource allocation strategy, this embodiment can utilize Bayesian decision theory to determine the computing resources allocated to the first service based on the predicted values of several target indicators and the available computing resources in the service cluster and the configuration method of the computing resources.
[0142] This embodiment can select a better computing resource (i.e., the number of computing units) under uncertainty, as the computing resource to be allocated to the first service S1 in the next moment.
[0143] Available computing resources can be stored in a pool of computing units. Each computing unit has a fixed configuration of computing resources, including CPU, GPU, and memory. For example, each computing unit includes m1 CPUs, m2 GPUs, and m3 memory.
[0144] Specifically, when N computing units are selected, the cost of those N computing units relative to the predicted index value can be determined. 总 The cost 总 This includes the probability of having enough N computing units and the probability of not having enough. When N is the minimum number of available computing units... low and the maximum number of available computing units N high When iterating through the values, multiple costs can be obtained. 总 To minimize the cost 总 The corresponding quantity N is the number of computing units (i.e. computing resources) allocated to the first service S1 in the next moment.
[0145] The cost 总 This includes the costs calculated separately for different target metrics, i.e.
[0146] cost 总 = cost1 + ... + cost i +…+ cost c (1)
[0147] Where c is the total number of target metrics, and cost is... i Let i represent the i-th target indicator, where i takes a value between 1 and c.
[0148] The cost corresponding to each target metric i Includes the sufficiency probability p of N computing units for the target index i. under And the probability p of not having enough over Cost i It can be the probability p that is sufficient. under And the probability p of not having enough over The weighted sum of the values. The weights can be determined based on the predicted values of the corresponding service quality indicators, or they can be determined jointly based on the predicted values of the service traffic indicators and the predicted values of the service quality indicators.
[0149] For example, the weights can include a sufficient penalty value W. under And insufficient penalty value Wover Furthermore, the preset benchmark penalty can be adjusted based on the predicted index value corresponding to the target index to obtain sufficient penalty value and insufficient penalty value.
[0150] For example, the cost of target indicator i can be determined using the following formula. i :
[0151] cost i =W under *p under +W over *p over (2)
[0152] Wherein, the probability of sufficiency p under And the probability p of not having enough over The probability of sufficiency and insufficiency can be determined using the Cumulative Distribution Function (CDF). The number of computing units N, the predicted index value, and the resource configuration of each computing unit are used as input parameters to the CDF, which yields the corresponding probabilities of sufficiency and insufficiency.
[0153] Figure 6 This is a flowchart illustrating a computational resource decision-making process using Bayesian decision theory, provided in an embodiment. The available computational resource pool contains several computational units, each with a fixed configuration of CPU, GPU, and memory. When N computational units are selected, the sufficiency and insufficiency probabilities are calculated using the cumulative distribution function for the predicted number of CPUs, GPUs, and memory units. The sufficiency and insufficiency probabilities for the predicted number of CPUs are weighted and summed to obtain cost1. The sufficiency and insufficiency probabilities for the predicted number of GPUs are weighted and summed to obtain cost2. The sufficiency and insufficiency probabilities for the predicted number of memory units are weighted and summed to obtain cost3. Finally, cost1, cost2, and cost3 are summed to obtain cost. 总 By changing the value of N in this way, multiple costs can be obtained. 总 Choose the one with the lowest cost 总 The corresponding number of computing units, N, is used as the decision result.
[0154] This embodiment combines Bayesian decision theory, fully considers the uncertainty of the predicted index value, adopts a probabilistic approach to make decisions, and dynamically adjusts resource allocation to ensure that better resource allocation decisions can be made under various conditions.
[0155] The above content explains the prediction process of prediction model N1. Prediction model N1 can be obtained through training. The training process of prediction model N1 is explained below.
[0156] When training the prediction model N1, the actual indicator values of the sample service can be obtained as label data. In the forward phase of model training, the indicator values of multiple indicators related to the workload of the sample service at several historical moments are used as time-domain data and input into the time-frequency transformation module A, i.e., steps S210 to S230 are executed to obtain multiple predicted indicator values for the multiple indicators at the next moment. The execution process of the forward phase is similar to... Figure 2 The embodiments shown are the same, and will not be described again here.
[0157] Next, in the backward phase of model training, the prediction loss is determined based on multiple predicted index values and multiple actual index values of the sample service at the next time step, and the causal discovery network and index prediction network are updated based on the prediction loss.
[0158] When determining the prediction loss, the mean squared error (MSE) loss function or similar methods can be used.
[0159] Steps S210 to S230 performed on the sample services constitute one iteration update. In one iteration update, the prediction model N1 can be updated based on the prediction loss of a batch of sample services. Training is complete when the prediction model N1 reaches the convergence condition. The convergence condition can be that the number of iterations reaches a preset value, or the prediction loss is less than a preset threshold, etc.
[0160] When the indicator prediction network C includes a mapping subnetwork and a prediction subnetwork, and when the prediction subnetwork includes a distribution transformation network and a prediction output network, these networks can also be updated when updating the model parameters.
[0161] Implementation methods and methods for the model training phase Figure 2 The embodiments are based on the same inventive concept, and the specific execution process of the forward phase in model training is the same as... Figure 2 The implementation methods are the same, so they will not be repeated here.
[0162] In summary, the above embodiments can combine Fourier transform, causal discovery algorithms, variational autoencoders or autoregressive models, and Bayesian decision theory to achieve highly adaptive scalability. These embodiments can proactively respond to environmental changes, mitigate potential risks, and significantly outperform existing mature methods. In practical deployments, the embodiments demonstrate their real-world impact in large-scale service cluster environments, proving their economic value and practicality by saving substantial computational resources. The methods of these embodiments can also address the complex and ever-changing problem of service cluster resource scaling, providing a more efficient and reliable solution.
[0163] In this manual, the terms "first" in phrases such as "first service" and "first indicator," as well as the corresponding "second" (if any) in the text, are used merely for ease of distinction and description and do not have any limiting meaning.
[0164] The foregoing description describes specific embodiments of this specification; other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than those shown in the embodiments, and the desired result may still be achieved. Furthermore, the processes depicted in the drawings do not necessarily need to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0165] Figure 7 This is a schematic block diagram of a service resource allocation determination apparatus provided for an embodiment. This apparatus embodiment is related to... Figure 5 The method embodiment shown corresponds to this. The device 700 is used to determine the computing resources allocated to a first service using a prediction model, which includes a time-frequency transformation module, a causal discovery network, and an indicator prediction network. The device 700 is deployed in a computing device and specifically includes:
[0166] The data conversion unit 710 is configured to take any first indicator from a plurality of indicators related to the workload of the first service, and input the indicator value of the first indicator at several historical moments as time-domain data into the time-frequency conversion module, where the time-domain data is converted into frequency-domain data using Fourier transform; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data.
[0167] The causal discovery unit 720 is configured to determine the causal relationship between the multiple indicators based on the frequency domain data of the multiple indicators through the causal discovery network, and to fuse the frequency domain data of the multiple indicators using the causal relationship to obtain the fused frequency domain data of each of the multiple indicators.
[0168] The indicator prediction unit 730 is configured to predict multiple predicted indicator values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators through the indicator prediction network.
[0169] The resource determination unit 740 is configured to determine the computing resources allocated to the first service at the next moment based on the multiple predicted index values.
[0170] In one implementation, the causal discovery unit 720, when fusing frequency domain data of the multiple indicators using causal relationships, includes:
[0171] Based on the causal relationship, determine the attention score between any first indicator and each indicator;
[0172] The frequency domain data of the multiple indicators are weighted and summed based on the attention score to obtain the fused frequency domain data of the first indicator.
[0173] In one embodiment, the indicator prediction network includes a mapping subnetwork and a prediction subnetwork. The indicator prediction unit 730 includes:
[0174] The mapping subunit 731 is configured to map the fused frequency domain data of any first index to the parameterized distribution of the next time step through the mapping subnetwork.
[0175] Prediction subunit 732 is configured to predict the predicted index value of the first index at the next time step based on the parameterized distribution of the first index through the prediction subnetwork.
[0176] In one implementation, the prediction subnetwork includes a distribution transformation network and a prediction output network. Prediction subunit 732 includes:
[0177] The transformation subunit 21 is configured to transform the parameterized distribution of the first index into the corresponding non-parametric distribution through the distribution transformation network;
[0178] Subunit 22 is configured to predict the predicted index value of the first index at the next time step through the prediction output network, based on the nonparametric distribution of the first index.
[0179] In one implementation, the determining subunit 22 is specifically configured to sample the nonparametric distribution of the first index through the prediction output network, and predict its predicted index value at the next time step based on the sampled data.
[0180] In one embodiment, the prediction output network is a multilayer perceptron. In another embodiment, the determining subunit 22 is specifically configured to use the multilayer perceptron to perform neural network processing on the vector data corresponding to the nonparametric distribution of the first index to obtain its predicted index value at the next time step.
[0181] In one implementation, the plurality of metrics includes several target metrics for characterizing the computing resources used. The resource determination unit 740 is specifically configured to decide on the allocation of computing resources to the first service based on the predicted metric values of the plurality of target metrics.
[0182] In one implementation, the resource determination unit 740 is specifically configured to use Bayesian decision theory to determine the computing resources allocated to the first service based on the predicted indicators of the several target indicators, the available computing resources in the service cluster, and the configuration method of the computing resources.
[0183] In one implementation, the multiple metrics also include: service traffic metrics and / or service quality metrics.
[0184] The above-described apparatus embodiments correspond to the method embodiments, and detailed descriptions can be found in the description of the method embodiments section, which will not be repeated here. The apparatus embodiments are derived based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments; detailed descriptions can be found in the corresponding method embodiments.
[0185] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform... Figures 1 to 6 Any one of the methods described.
[0186] This specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement... Figures 1 to 6 Any one of the methods described.
[0187] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for storage media and computing devices are basically similar to the method embodiments, so they are described more simply; relevant parts can be referred to the descriptions of the method embodiments.
[0188] Those skilled in the art will recognize that the functions described in the embodiments of the present invention in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0189] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, or improvements made based on the technical solutions of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining resource allocation for a service, utilizing a prediction model, said prediction model comprising a time-frequency transformation module, a causal discovery network, and an indicator prediction network; the method comprising: For any first indicator among multiple indicators related to the workload of the first service, the indicator values of the first indicator at several historical moments are used as time-domain data and input into the time-frequency transformation module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data; The causal discovery network determines the causal relationship between the multiple indicators based on their frequency domain data, and then uses the causal relationship to fuse the frequency domain data of the multiple indicators to obtain the fused frequency domain data of each of the multiple indicators. Based on the fused frequency domain data of the multiple indicators, the prediction network predicts the values of multiple indicators at the next time step. Based on the multiple predicted index values, the computing resources allocated to the first service at the next moment are determined.
2. The method according to claim 1, wherein the step of fusing the frequency domain data of the plurality of indicators using the causal relationship comprises: Based on the causal relationship, determine the attention score between any first indicator and each indicator; The frequency domain data of the multiple indicators are weighted and summed based on the attention score to obtain the fused frequency domain data of the first indicator.
3. The method according to claim 1, wherein the indicator prediction network comprises a mapping subnetwork and a prediction subnetwork; the step of predicting multiple predicted indicator values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators comprises: Through the mapping sub-network, for any first index, the fused frequency domain data of the first index is mapped to the parameterized distribution of the next time step; Based on the parameterized distribution of the first indicator, the predicted indicator value of the first indicator at the next time step is predicted through the prediction sub-network.
4. The method according to claim 3, wherein the prediction sub-network comprises a distribution transformation network and a prediction output network; the step of predicting the predicted index value of the first index at the next time step based on the parameterized distribution of the first index through the prediction sub-network comprises: The parameterized distribution of the first indicator is transformed into a corresponding non-parametric distribution through the distribution transformation network. Based on the nonparametric distribution of the first index, the predicted index value at the next time step is predicted using the prediction output network.
5. The method according to claim 4, wherein the step of predicting the predicted index value of the first index at the next time moment based on the nonparametric distribution of the first index through the prediction output network comprises: The nonparametric distribution of the first index is sampled through the prediction output network, and its predicted index value at the next time step is predicted based on the sampled data.
6. The method according to claim 4, wherein the prediction output network is a multilayer perceptron; the step of predicting the predicted index value of the first index at the next time step based on the nonparametric distribution of the first index through the prediction output network includes: The multilayer perceptron is used to process the vector data corresponding to the nonparametric distribution of the first indicator through a neural network to obtain its predicted indicator value at the next time step.
7. The method according to claim 1, wherein the plurality of indicators includes several target indicators for characterizing the computing resources used; the step of determining the computing resources allocated to the first service at the next time step based on the plurality of predicted indicator values includes: Based on the predicted values of the aforementioned target indicators, a decision is made to allocate computing resources to the first service.
8. The method according to claim 7, wherein the step of deciding on the allocation of computing resources to the first service based on the predicted index values of the plurality of target indicators includes: Using Bayesian decision theory, based on the predicted indicators of the aforementioned target indicators, the available computing resources in the service cluster, and the configuration method of the computing resources, the computing resources allocated to the first service are determined.
9. The method according to claim 7, wherein the plurality of indicators further comprises: Service traffic metrics and / or service quality metrics.
10. A method for training a predictive model to determine the allocation of computing resources, the predictive model comprising a time-frequency transformation module, a causal discovery network, and an indicator prediction network, the method comprising: For any first indicator among multiple indicators related to the workload of the sample service, the indicator values of the first indicator at several historical moments are used as time-domain data and input into the time-frequency transformation module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data. The causal discovery network determines the causal relationship between the multiple indicators based on their frequency domain data, and then uses the causal relationship to fuse the frequency domain data of the multiple indicators to obtain the fused frequency domain data of each of the multiple indicators. Based on the fused frequency domain data of the multiple indicators, the prediction network predicts the values of multiple indicators at the next time step. Based on the multiple predicted index values and the multiple actual index values of the sample service at the next time step, the prediction loss is determined; The causal discovery network and the indicator prediction network are updated based on the predicted loss.
11. A resource allocation determination apparatus for a service, utilizing a prediction model, said prediction model comprising a time-frequency transformation module, a causal discovery network, and an indicator prediction network, the apparatus comprising: The data conversion unit is configured to take any first indicator from a plurality of indicators related to the workload of the first service, and input the indicator values of the first indicator at several historical moments as time-domain data into the time-frequency conversion module, where Fourier transform is used to convert the time-domain data into frequency-domain data; the frequency-domain data contains the periodicity and trend characteristics of the time-domain data. The causal discovery unit is configured to determine the causal relationship between the multiple indicators based on the frequency domain data of the multiple indicators through the causal discovery network, and to fuse the frequency domain data of the multiple indicators using the causal relationship to obtain the fused frequency domain data of each of the multiple indicators. The indicator prediction unit is configured to predict multiple predicted indicator values of the multiple indicators at the next time step based on the fused frequency domain data of the multiple indicators through the indicator prediction network. The resource determination unit is configured to determine the computing resources allocated to the first service at the next moment based on the multiple predicted index values.
12. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-10.
13. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-10.