Resource demand prediction-based computing power configuration method and device, equipment, medium and product
By constructing a BKD tree index and the Grey Wolf optimization algorithm, combined with historical data from a multi-core heterogeneous computing power cluster, the task execution time is predicted, solving the problem of low accuracy in computing power configuration in existing technologies, and achieving more scientific resource allocation and task execution efficiency.
Patent Information
- Application Number
- CN202411893373.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In existing technologies, multi-core heterogeneous computing clusters neglect factors other than graphics processors when configuring computing power, resulting in low accuracy in computing power configuration.
By constructing a BKD tree index and the Grey Wolf optimization algorithm, combined with historical performance data and log data of a multi-core heterogeneous computing power cluster, the task execution time is predicted, and the global target computing power configuration is determined using the Grey Wolf optimization algorithm, taking into account the local target configuration of multiple resource dimensions.
It improves the accuracy of computing power allocation, ensures the effective use of resources and the efficiency of task execution, and adapts to the needs of different resource dimensions.
Smart Images

Figure CN119718663B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of system resource management, and in particular to a computing power configuration method and device based on resource demand prediction, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] A multi-core heterogeneous computing cluster can achieve a more optimal balance in performance and energy efficiency by integrating different types of processors. However, in the face of large-scale, multi-dimensional, and dynamically updated computing power resources, how to configure computing power has become a problem. In related technologies, by scheduling hardware resources in an artificial intelligence computing power resource cluster and predicting computing tasks, the resource utilization and training efficiency in the prediction process can be significantly improved. However, in related technologies, graphics processing units (GPUs) of the computing power cluster are generally regarded as the main factor affecting the performance of the task, and other influences are ignored. Therefore, there is a problem of low accuracy of the obtained computing power configuration scheme. SUMMARY
[0003] Therefore, it is necessary to provide a computing power configuration method and device based on resource demand prediction, computer equipment, computer readable storage medium and computer program product, which can improve the accuracy of computing power configuration.
[0004] In a first aspect, the present application provides a computing power configuration method based on resource demand prediction, comprising:
[0005] In response to a resource scheduling request, historical performance data and historical log data of a multi-core heterogeneous computing power cluster are input into a pre-trained resource demand prediction model to obtain predicted multiple tasks and a predicted execution time corresponding to each task; the tasks represent resource data of multiple resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; and the predicted execution time represents the time required by any computing power node to process the tasks;
[0006] According to each computing power node of the multi-core heterogeneous computing power cluster and the resource dimensions corresponding to the multiple tasks, a BKD tree index corresponding to each resource dimension is constructed; the BKD tree index is used to represent the corresponding relationship between each resource dimension and each task, and the load condition of each computing power node for each resource dimension;
[0007] According to each computing power node and the BKD tree index, a local target computing power configuration corresponding to each resource dimension is determined;
[0008] According to the predicted execution time corresponding to each task, the local target computing power configuration, and the grey wolf optimization algorithm, a global target computing power configuration for the multi-core heterogeneous computing power cluster is determined.
[0009] In one of the embodiments, the historical performance data and the historical log data of the multi-core heterogeneous computing power cluster are input into a pre-trained resource demand prediction model to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task, which includes:
[0010] The historical performance data and the historical log data are subjected to data cleaning processing to obtain cleaned resource data; the resource data includes historical tasks and corresponding historical execution times;
[0011] The cleaned resource data is subjected to feature extraction using the principle of maximum correlation and minimum redundancy to obtain sample resource data;
[0012] The sample resource data is input into the pre-trained resource demand prediction model to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task.
[0013] In one of the embodiments, the local target computing power configuration corresponding to each resource dimension is determined according to each computing power node and the BKD tree index, which includes:
[0014] According to each computing power node of the multi-core heterogeneous computing power cluster, a target computing power node meeting the resource scheduling request is determined;
[0015] According to the BKD tree index, the usage rate and the average usage rate of each target computing power node for each resource dimension, and the type number of the resource dimension are determined;
[0016] According to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the type number of the resource dimension, the resource idle degree of each target computing power node is determined;
[0017] According to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the average usage rate of each resource dimension, the resource usage balance degree of each target computing power node is determined;
[0018] According to the resource idle degree and the resource usage balance degree of each target computing power node, the local target computing power configuration corresponding to each resource dimension is determined.
[0019] In one of the embodiments, the local target computing power configuration corresponding to each resource dimension is determined according to the resource idle degree and the resource usage balance degree of each target computing power node, which includes:
[0020] determine a weighted score of each of the target computing power nodes for each of the resource dimensions according to the preset weight coefficients, the resource idle degree and the resource usage balance degree of each of the target computing power nodes; the preset weight coefficients include a weight coefficient of the resource idle degree and a weight coefficient of the resource usage balance degree;
[0021] determine a local target computing power configuration corresponding to each of the resource dimensions according to the target computing power node corresponding to the maximum value of the weighted score of each of the resource dimensions.
[0022] In one of the embodiments, the determining of the global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each of the tasks, the local target computing power configuration and the grey wolf optimization algorithm includes:
[0023] determine a total task execution time constraint condition and a total execution time of each of the resource dimensions according to the predicted execution time corresponding to each of the tasks;
[0024] determine a total resource utilization rate constraint condition according to the usage rate of each of the target computing power nodes for each of the resource dimensions and the total execution time of each of the resource dimensions;
[0025] determine the global target computing power configuration for the multi-core heterogeneous computing power cluster according to the local target computing power configuration, the total task execution time constraint condition, the total resource utilization rate constraint condition and the grey wolf optimization algorithm.
[0026] In one of the embodiments, the determining of the global target computing power configuration for the multi-core heterogeneous computing power cluster according to the local target computing power configuration, the total task execution time constraint condition, the total resource utilization rate constraint condition and the grey wolf optimization algorithm includes:
[0027] construct a grey wolf initial population according to the local target computing power configuration;
[0028] construct a fitness function according to the total task execution time constraint condition, the total resource utilization rate constraint condition and the grey wolf optimization algorithm;
[0029] calculate the fitness of each of the grey wolves in the grey wolf initial population according to the fitness function, and iteratively update the grey wolf initial population according to the fitness of each of the grey wolves until a preset iteration end condition is met, to obtain the global target computing power configuration for the multi-core heterogeneous computing power cluster.
[0030] In a second aspect, the application further provides a resource demand prediction-based computing power configuration device, comprising:
[0031] a demand prediction module configured to input historical performance data and historical log data of a multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model in response to a resource scheduling request, to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task; the tasks represent resource data of a plurality of resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; and the predicted execution time represents a time required by an arbitrary computing power node to process the tasks;
[0032] an index construction module configured to construct a BKD tree index corresponding to each of the resource dimensions according to the resource dimensions corresponding to each of the computing power nodes of the multi-core heterogeneous computing power cluster and the plurality of tasks; the BKD tree index is used to represent a corresponding relationship between each of the resource dimensions and each of the tasks, and a load condition of each of the computing power nodes for each of the resource dimensions;
[0033] a local configuration module configured to determine a local target computing power configuration corresponding to each of the resource dimensions according to each of the computing power nodes and the BKD tree index;
[0034] a global configuration module configured to determine a global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each of the tasks, and the local target computing power configuration and a grey wolf optimization algorithm.
[0035] In a third aspect, the application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0036] inputting historical performance data and historical log data of a multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model in response to a resource scheduling request, to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task; the tasks represent resource data of a plurality of resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; and the predicted execution time represents a time required by an arbitrary computing power node to process the tasks;
[0037] constructing a BKD tree index corresponding to each of the resource dimensions according to the resource dimensions corresponding to each of the computing power nodes of the multi-core heterogeneous computing power cluster and the plurality of tasks; the BKD tree index is used to represent a corresponding relationship between each of the resource dimensions and each of the tasks, and a load condition of each of the computing power nodes for each of the resource dimensions;
[0038] determining a local target computing power configuration corresponding to each of the resource dimensions according to each of the computing power nodes and the BKD tree index.
[0039] determine a global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each of the tasks, and the local target computing power configuration and the grey wolf optimization algorithm.
[0040] In a fourth aspect, the present application also provides a computer readable storage medium, having a computer program stored thereon, the computer program being executed by a processor to implement the following steps:
[0041] In response to a resource scheduling request, input historical performance data and historical log data of the multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model to obtain predicted multiple tasks and a predicted execution time corresponding to each task; the tasks represent resource data of multiple resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; the predicted execution time represents a time required for any computing power node to process the tasks;
[0042] According to the resource dimensions corresponding to each of the computing power nodes and the multiple tasks of the multi-core heterogeneous computing power cluster, a BKD tree index corresponding to each of the resource dimensions is constructed; the BKD tree index is used to represent a corresponding relationship between each of the resource dimensions and each of the tasks, and a load condition of each of the computing power nodes for each of the resource dimensions;
[0043] According to each of the computing power nodes and the BKD tree index, a local target computing power configuration corresponding to each of the resource dimensions is determined;
[0044] determine a global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each of the tasks, and the local target computing power configuration and the grey wolf optimization algorithm.
[0045] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, the computer program being executed by a processor to implement the following steps:
[0046] In response to a resource scheduling request, input historical performance data and historical log data of the multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model to obtain predicted multiple tasks and a predicted execution time corresponding to each task; the tasks represent resource data of multiple resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; the predicted execution time represents a time required for any computing power node to process the tasks;
[0047] construct a BKD tree index corresponding to each resource dimension according to each of the computing power nodes of the multi-core heterogeneous computing power cluster and the resource dimensions corresponding to the plurality of tasks; the BKD tree index is used to represent the corresponding relationship between each of the resource dimensions and each of the tasks, and the load condition of each of the computing power nodes for each of the resource dimensions;
[0048] determine a local target computing power configuration corresponding to each of the resource dimensions according to each of the computing power nodes and the BKD tree index;
[0049] determine a global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each of the tasks, and the local target computing power configuration and a grey wolf optimization algorithm.
[0050] The above resource demand prediction-based computing power configuration method, device, computer equipment, computer readable storage medium and computer program product, by responding to a resource scheduling request, inputting historical performance data and historical log data of a multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model, obtaining predicted execution time corresponding to a plurality of tasks and each task, wherein the task represents resource demand data of a plurality of resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster, and the predicted execution time represents the time required by any computing power node to process the task; considering the demand of multiple dimensions of resources for computing power, and quantifying the time influence of different resource dimensions on task execution, more accurate and scientific data support can be provided for computing power configuration. And according to each of the computing power nodes of the multi-core heterogeneous computing power cluster and the resource dimensions corresponding to the plurality of tasks, a BKD tree index corresponding to each resource dimension is constructed, wherein the BKD tree index is used to represent the corresponding relationship between each of the resource dimensions and each of the tasks, and the load condition of each of the computing power nodes for each of the resource dimensions, and according to each of the computing power nodes and the BKD tree index, a local target computing power configuration corresponding to each of the resource dimensions is determined; the construction of the BKD tree index can reduce the mutual influence between different resource dimensions, and more objectively obtain the local target computing power configuration adapted to each resource dimension. Further, a global target computing power configuration for the multi-core heterogeneous computing power cluster is determined according to the predicted execution time corresponding to each of the tasks, and the local target computing power configuration and a grey wolf optimization algorithm, which comprehensively considers the local target computing power configuration of each resource dimension and the predicted execution time corresponding to each task to determine the global target computing power configuration, not only considers the task processing efficiency of the computing power node, but also considers the adaptation to different resource dimensions, thereby improving the accuracy of computing power configuration. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0052] Figure 1 For an embodiment of resource demand prediction based computing power configuration method flowchart;
[0053] Figure 2 For an embodiment of BKD tree index structure diagram;
[0054] Figure 3 For an embodiment of local target computing power configuration determination step flowchart;
[0055] Figure 4 For an embodiment of global target computing power configuration determination step flowchart;
[0056] Figure 5 For an embodiment of gray wolf optimization algorithm execution step flowchart;
[0057] Figure 6 For an embodiment of resource demand prediction based multi-core heterogeneous computing power cluster adaptation method flowchart;
[0058] Figure 7 For an embodiment of resource demand prediction based computing power configuration device block diagram;
[0059] Figure 8 For an embodiment of computer device internal structure diagram. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0061] In one embodiment, as shown in Figure 1 , a resource demand prediction based computing power configuration method is provided. In this embodiment, the method is applied to a terminal for illustration. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be realized through the interaction of the terminal and the server. In this embodiment, the method includes the following steps:
[0062] In step S102, in response to the resource scheduling request, historical performance data and historical log data of the multi-core heterogeneous computing cluster are input into a pre-trained resource demand prediction model to obtain predicted tasks and corresponding predicted execution times of each task.
[0063] The resource scheduling request can be initiated when the system detects that the multi-core heterogeneous computing cluster is currently in a situation of resource overload of computing node load.
[0064] The task represents resource data of multiple resource dimensions currently needing to be processed for the multi-core heterogeneous computing cluster, and the predicted execution time represents the time required for any computing node to process the task.
[0065] The multi-core heterogeneous computing cluster can be a computing architecture that combines multiple types of processors to take advantage of different processors in the same cluster to improve computing performance and efficiency. Such a cluster is commonly used to process complex computing tasks such as deep learning, big data analysis, and scientific computing.
[0066] The historical performance data can be performance indicator records of the multi-core heterogeneous computing cluster in a historical time period, such as CPU and GPU utilization, task execution time, throughput, and response time.
[0067] The historical log data can be recorded information generated by the multi-core heterogeneous computing cluster during a historical time period, usually including error logs, access logs, and operation logs.
[0068] The pre-trained resource demand prediction model can be obtained by training an initial extreme gradient boosting (XGBoost) model using historical performance data and historical log data.
[0069] Optionally, in response to the resource scheduling request, the system inputs the historical performance data and the historical log data of the multi-core heterogeneous computing cluster into the pre-trained resource demand prediction model to obtain predicted tasks and corresponding predicted execution times of each task that the multi-core heterogeneous computing cluster needs to process in the next time period.
[0070] In step S104, a BKD tree index corresponding to each resource dimension is constructed according to each computing node of the multi-core heterogeneous computing cluster and the resource dimensions corresponding to the multiple tasks.
[0071] The BKD tree index is used to represent the correspondence between each resource dimension and each task, and the load of each computing node for each resource dimension. The BKD tree can be a modified dense k-d tree (Bushy k-dtrees, BKD), which is a multi-dimensional space partitioning tree that can efficiently handle multi-dimensional queries. The improved BKD tree is used to organize sample resource data and divide multi-dimensional resource data into multiple rectangular regions. For each resource demand block, a BKD tree index is constructed accordingly.
[0072] Optionally, the system constructs a BKD tree index corresponding to each resource dimension according to the corresponding resource dimensions of each computing node of the multi-core heterogeneous computing cluster and the plurality of tasks, for example, divides the tasks corresponding to each resource dimension into a rectangular region, and constructs a BKD tree index for each task x i The vector form of the BKD tree obtained is p i = {p i 1, p i 2, …, p i m}, where p i j represents the computing node for the jth resource dimension of task x i The total number of resource dimensions is m. As shown in Figure 2 , a structural diagram of the BKD tree index is provided.
[0073] Step S106, according to each computing node and the BKD tree index, determine the local target computing power configuration corresponding to each resource dimension.
[0074] The local target computing power configuration can be the optimal configuration of computing power under each resource dimension.
[0075] Optionally, the system determines the local target computing power configuration corresponding to each resource dimension according to the capability attributes of each computing node and the load of each computing node in the BKD tree index.
[0076] Step S108, according to the predicted execution time corresponding to each task, the local target computing power configuration and the grey wolf optimization algorithm, determine the global target computing power configuration for the multi-core heterogeneous computing cluster.
[0077] The Grey Wolf Optimizer (GWO) is a natural heuristic-based optimization algorithm that simulates the social behavior of grey wolves during hunting, aiming to solve complex optimization problems. The algorithm finds the optimal solution by simulating the group behavior of grey wolves, and is particularly suitable for continuous and discrete optimization problems.
[0078] Optionally, the system comprehensively considers the minimization of the total execution time of all tasks and approaches the respective local target computing power configurations, and adopts a grey wolf optimization algorithm to calculate the global optimal computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time of each task and the local target computing power configuration.
[0079] In the above computing power configuration method based on resource demand prediction, the historical performance data and the historical log data of the multi-core heterogeneous computing power cluster are input into a pre-trained resource demand prediction model in response to a resource scheduling request, to obtain predicted execution time of a plurality of tasks and each task, wherein the task represents resource demand data of a plurality of resource dimensions currently needing to be processed for the multi-core heterogeneous computing power cluster, and the predicted execution time represents the time required for any computing power node to process the task; the demand of the plurality of dimensions of resources for computing power is considered, and the time influence of different resource dimensions on task execution is quantified, which can provide more accurate and scientific data support for computing power configuration. And according to each computing power node of the multi-core heterogeneous computing power cluster and the resource dimensions corresponding to the plurality of tasks, a BKD tree index corresponding to each resource dimension is constructed, wherein the BKD tree index is used to represent the corresponding relationship between each resource dimension and each task, and the load condition of each computing power node for each resource dimension, and according to each computing power node and the BKD tree index, a local target computing power configuration corresponding to each resource dimension is determined; the construction of the BKD tree index can reduce the mutual influence between different resource dimensions, and more objectively obtain the local target computing power configuration adapted to each resource dimension. Further, according to the predicted execution time of each task, the local target computing power configuration and the grey wolf optimization algorithm, a global target computing power configuration for the multi-core heterogeneous computing power cluster is determined, which comprehensively considers the local target computing power configuration of each resource dimension and the predicted execution time corresponding to each task to determine the global target computing power configuration, not only considering the task processing efficiency of the computing power node, but also considering the adaptation to different resource dimensions, thereby improving the accuracy of computing power configuration.
[0080] In an exemplary embodiment, step S102 inputs the historical performance data and the historical log data of the multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model to obtain predicted execution time of a plurality of tasks and each task, including:
[0081] The historical performance data and the historical log data are subjected to data cleaning processing to obtain cleaned resource data; the cleaned resource data is subjected to feature extraction by using the maximum correlation minimum redundancy principle to obtain sample resource data; and the sample resource data is input into a pre-trained resource demand prediction model to obtain predicted execution time of a plurality of tasks and each task.
[0082] The data cleaning processing can be a data preprocessing mode of identifying and deleting abnormal data and redundant data in the data.
[0083] The maximum relevance minimum redundancy principle can be MRMR (Max-Relevance and Min-Redundancy), which is a filtering feature selection algorithm that can maximize the correlation between features and targets and reduce the redundancy between related features.
[0084] The resource data includes historical tasks and corresponding historical execution times.
[0085] Optionally, the system performs data cleaning processing on the historical performance data and the historical log data, such as using a statistical method Z-score (a method for comparing test results with normal results) to identify and remove outliers in the data set composed of the historical performance data and the historical log data:
[0086]
[0087] wherein x i is each sample data in the data set, is the mean of the n sample data in the data set, is the unbiased estimate of the standard deviation of the sample data, z i represents the Z-score of the sample data x i , the Z-score value of each sample point is calculated, and when the absolute value of z i is greater than a set threshold value, it is considered that the corresponding sample data x i is an outlier, which is removed from the data set to obtain the cleaned resource data. The maximum relevance minimum redundancy principle is used to extract features from the cleaned resource data to obtain sample resource data. The corresponding algorithm is:
[0088]
[0089]
[0090] wherein p i is the computing power feature i sequence, y is the execution time of the predicted task, H(.) represents the calculation of entropy, is the mutual information value of feature i and the execution time of the predicted task, is the mutual information value between the computing power feature i and the feature j. Then, using the maximum relevance criterion formula maxD(S,y), the features with high correlation with the sample execution time are selected; based on the minimum redundancy criterion formula min R(S), the redundant features are removed:
[0091]
[0092]
[0093] wherein D represents each computing power feature p i The average of mutual information between the historical task execution time, R is the mutual information size between each feature in S, S m is the number of selected features in the historical log data S, p i and p j are the time series of computing power features i and j, respectively, and the sample resource data containing each high-correlation feature factor and sample execution time is obtained through feature screening. Further, the system inputs the sample resource data into a pre-trained resource demand prediction model to obtain the predicted execution time of each task corresponding to the predicted multiple tasks. Specifically, the pre-trained resource demand prediction model is trained based on the XGBoost model, and the output of the model can be represented as:
[0094]
[0095] wherein y i is the historical execution time corresponding to the historical task x i ; is the predicted value of task x i after l iterations, i.e., the predicted task execution time according to the resource condition; is the sum of the predicted values of all previous trees; fl(x i ) represents the contribution of the lth tree to the sample x i .
[0096] It should be noted that the pre-trained resource demand prediction model is iteratively trained in the training process with the objective of minimizing the target function and maximizing the branch gain, and the corresponding formulas of the target function and the branch gain are as follows:
[0097]
[0098]
[0099] wherein L is the loss function of the model, used to measure the difference between the predicted value and the actual value of the model; is the regularization part introduced to reduce the error loss, used to control the complexity of the model to avoid overfitting. G L and G R are the gradients of the left and right child nodes after splitting, respectively; H L and H R are the accumulative sums of the second derivatives of the left and right child nodes after splitting, respectively. is a regularization parameter used to control the complexity of the model. is a regularization parameter for penalizing the number of newly split leaf nodes. By maximizing the branch gain, the feature value split point of the leaf node is selected, and a new branch of the tree model is constructed for each feature in the model, and finally the modeling task is completed.
[0100] In this embodiment, the Z-score method is used to clean the historical log data, and the cleaned resource data is obtained, which helps to remove noise data, improve data quality, reduce the risk of model overfitting, and extract features from the cleaned resource data according to the principle of maximum correlation and minimum redundancy. The sample resource data can reduce feature data and reduce computational complexity. Through the model output multiple tasks and their corresponding predicted execution time, multiple references can be provided for decision-making to help optimize resource allocation.
[0101] In one exemplary embodiment, as shown in Figure 3 Step S106 determines the local target computing power configuration corresponding to each resource dimension according to each computing power node and the BKD tree index, including:
[0102] Step S302 determines the target computing power node that meets the resource scheduling request from each computing power node of the multi-core heterogeneous computing power cluster.
[0103] Among them, the computing power node can be a computing unit composed of multiple processing units such as CPU, GPU, NPU (neural-network processing unit, neural network processor) in the multi-core heterogeneous computing power cluster. These nodes can flexibly schedule different types of processors according to different task requirements, thereby improving the overall computing efficiency and performance.
[0104] Optionally, the system determines the computing power nodes that are not overloaded from each computing power node of the multi-core heterogeneous computing power cluster, and determines the computing power nodes that are not overloaded as the target computing power nodes that meet the resource scheduling request. These computing power nodes can be scheduled for resource scheduling.
[0105] Step S304 determines the usage rate and average usage rate of each target computing power node for each resource dimension, and the type number of the resource dimension according to the BKD tree index.
[0106] Among them, the usage rate can be CPU usage rate, GPU usage rate and memory usage rate, etc., which respectively represent the ratio of the actual computing time of CPU in a certain time to the total time in that time period, measure the active state of GPU when performing graphics processing or computing tasks, reflect the working efficiency of GPU, and the memory usage rate represents the ratio of the used memory to the total memory, reflecting the usage of memory.
[0107] The average usage rate can be the average usage rate of each computing power node under each resource dimension, such as taking the ratio of the total CPU usage rate to the number of computing power nodes as the average usage rate of the computing power node in the resource dimension of CPU.
[0108] Optionally, the system determines the usage rate and the average usage rate of each target computing power node for each resource dimension according to the load condition of each computing power node included in the BKD tree index for each resource dimension, and determines the type quantity of the resource dimension.
[0109] Step S306, determining the resource idle degree of each target computing power node according to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the type quantity of the resource dimension.
[0110] The resource idle degree can be the ratio of the currently available computing power resource to the total computing power resource in the computing power node.
[0111] Optionally, the system determines the resource idle degree of each target computing power node according to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the type quantity of the resource dimension, and the corresponding formula is:
[0112] S(n)= ∑ n ∈ N d n [ ∑ (1 - u n p ) m ]
[0113] wherein, denotes each target computing power node, the resource idle degree of the th target computing power node, denotes the usage rate of the target computing power node for the resource dimension p, is the type quantity of the resource dimension, d n The description responds to the selection condition of the computing power node of the resource scheduling request.
[0114] Step S308, determining the resource usage balance degree of each target computing power node according to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the average usage rate of each resource dimension.
[0115] The resource usage balance degree can be represented as the standard deviation or similar measure of the resource usage of the target computing power for the resource dimension.
[0116] Optionally, the system determines the resource usage balance degree of each target computing power node according to the target computing power node, the usage rate of each target computing power node for each resource dimension, and the average usage rate of each resource dimension, and the corresponding formula is:
[0117] B(n)= ∑ n ∈ N d n ⋅ [1 - ∑ (as u n p - av u n ) 2 m ]
[0118] wherein, represents the resource usage balance degree of the target computing power node , asu n p and avu n respectively represent the usage rate and the average usage rate of each resource dimension of the target computing power node , is the type number of the resource dimension.
[0119] Step S310, according to the resource idle degree and the resource usage balance degree of each target computing power node, determine the local target computing power configuration corresponding to each resource dimension.
[0120] Optionally, the system comprehensively considers the resource idle degree and the resource usage balance degree of each target computing power node, determines the computing power node with good resource idle degree and resource usage balance degree as the local target computing power configuration corresponding to each resource dimension.
[0121] In this embodiment, the determination of the target computing power node can filter out the computing power node that can effectively support the computing power demand to be executed, the BKD tree index can efficiently store and query multidimensional data, and is suitable for processing large-scale data sets. By analyzing the usage rate and the type number of the resource dimension of the target computing power node, the resource idle degree of each node can be determined, which can help to identify available computing power resources and provide more choices for subsequent task scheduling. The resource usage balance degree can help to analyze the load conditions between different nodes in the cluster, avoid the situation that some nodes are overloaded and other nodes are idle, and thus improve the effective utilization of the overall computing power. After comprehensively considering the idle degree and the balance degree of each target computing power node, the most suitable local target computing power configuration can be configured for each resource dimension. Such configuration can ensure that the scheduling request is met while maintaining the effective allocation of cluster resources, and improve the overall computing performance.
[0122] In one exemplary embodiment, step S310 determines the local target computing power configuration corresponding to each resource dimension according to the resource idle degree and the resource usage balance degree of each target computing power node, including:
[0123] Based on the preset weighting coefficients, the resource idleness and resource usage balance of each target computing power node, the weighted score of each target computing power node for each resource dimension is determined; based on the weighted score of each target computing power node for each resource dimension, the target computing power node corresponding to the maximum weighted score under each resource dimension is determined as the local target computing power configuration for each resource dimension.
[0124] The preset weighting coefficients include the weighting coefficient for resource idleness and the weighting coefficient for resource utilization balance.
[0125] Optionally, the system performs a weighted summation based on preset weight coefficients, the resource idleness of each target computing power node, and the resource utilization balance, to determine the weighted score for each target computing power node for each resource dimension. The corresponding formula is as follows:
[0126]
[0127] in, and These are the weighting coefficients corresponding to resource idleness and resource utilization balance, respectively. Indicates the first Resource idleness of each target computing node Indicates the first Resource utilization balance of each target computing power node Indicates the first The system calculates the weighted scores of each target computing power node. Further, it sorts each target computing power node in descending order of its weighted score and selects the target computing power node corresponding to the maximum weighted score for each resource dimension as the local target computing power configuration for that resource dimension.
[0128] In this embodiment, by considering the resource idleness, resource usage balance, and weight coefficient of each target computing power node, a weighted sum is obtained, and the node with the largest weighted score is used as the local target computing power configuration for each resource dimension, thereby further improving the accuracy and adaptability of the local target computing power configuration.
[0129] In one exemplary embodiment, such as Figure 4 As shown, step S108 determines the global target computing power configuration for the multi-core heterogeneous computing power cluster based on the predicted execution time of each task, the local target computing power configuration, and the Gray Wolf optimization algorithm, including:
[0130] Step S402: Based on the predicted execution time for each task, determine the total task execution time constraints and the total execution time for each resource dimension.
[0131] The constraint condition can be a constraint condition function, which is an important concept in mathematics and optimization problems, and is usually used to limit the range of feasible solutions in the optimization process. In this embodiment, the total task execution time is a condition range that needs to be met in the process of solving the global target computing power configuration.
[0132] Optionally, the system adds the predicted execution time corresponding to each task under each resource dimension to obtain the total execution time of each resource dimension, and constructs a total task execution time constraint condition according to the predicted execution time corresponding to each task. The corresponding formula is:
[0133]
[0134] wherein x ij is a binary variable indicating that the predicted task i is assigned to the computing power node p for execution, is the predicted execution time of the predicted task on the computing power node p, and T is the total task execution time.
[0135] In step S404, the total resource utilization rate constraint condition is determined according to the usage rate of each target computing power node for each resource dimension and the total execution time of each resource dimension.
[0136] The total resource utilization rate constraint condition can be a condition range that needs to be met in the process of solving the global target computing power configuration.
[0137] Optionally, the system determines the total resource utilization rate constraint condition according to the usage rate of each target computing power node for each resource dimension and the total execution time of each resource dimension. The corresponding formula is:
[0138]
[0139] wherein, is the total resource utilization rate, is the usage rate of the target computing power node for each resource dimension, is the total execution time of each resource dimension.
[0140] In step S406, the global target computing power configuration for the multi-core heterogeneous computing power cluster is determined according to the local target computing power configuration, the total task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm.
[0141] Optionally, the system constructs a grey wolf initial population according to the local target computing power configuration, and iteratively updates the grey wolf initial population under the constraints of the total task execution time constraint condition and the total resource utilization rate constraint condition using the grey wolf optimization algorithm until a preset iteration end condition is met. The global target computing power configuration for the multi-core heterogeneous computing power cluster is obtained.
[0142] In this embodiment, by calculating the global target computing power configuration under the constraints of the total task execution time constraint condition and the total resource utilization rate constraint condition using the grey wolf optimization algorithm, the global target computing power configuration can meet the constraint conditions of minimizing the total task execution time and maximizing the total resource utilization rate, which can reduce the waste of computing power resources and improve the task execution time, thereby further improving the accuracy of computing power configuration.
[0143] In one exemplary embodiment, step S406 determines the global target computing power configuration for the multi-core heterogeneous computing power cluster according to the local target computing power configuration, the total task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm, including:
[0144] According to the local target computing power configuration, a grey wolf initial population is constructed; according to the total task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm, a fitness function is constructed; according to the fitness function, the fitness of each grey wolf in the grey wolf initial population is calculated, and the grey wolf initial population is iteratively updated according to the fitness of each grey wolf until a preset iteration end condition is met, to obtain the global target computing power configuration for the multi-core heterogeneous computing power cluster.
[0145] Wherein, the fitness is a standard for judging the good and bad of the solution in the optimization algorithm, which is used to evaluate the degree of excellence of a solution under a certain objective function, and the higher the fitness, the better the solution.
[0146] Optionally, the system constructs a grey wolf initial population by taking each local target computing power configuration as a grey wolf, and the position of each grey wolf represents a potential solution. The algorithm finds the best solution by simulating the hunting behavior of grey wolves. The system constructs a fitness function according to the task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm, and the corresponding fitness function is:
[0147]
[0148] Wherein, represents the fitness of the grey wolf i; and represents the weight coefficient of the grey wolf optimization algorithm, which is set by the technician according to the actual demand; is the total task execution time, is the total resource utilization rate. Further, as shown in Figure 5 , an execution flowchart of the grey wolf optimization algorithm is provided, the system calculates the fitness of each grey wolf in the grey wolf initial population according to the fitness function, and iteratively updates the grey wolf initial population according to the fitness of each grey wolf. During iteration, the whole wolf population is divided into wolves, wolves, The wolf and the rest of the wolf group individuals omega, four levels, the higher the level, the better the fitness. Wolf, Wolf, The wolf is the best three solutions at present, and the wolf omega is responsible for following the three-level wolf and searching and hunting for prey. For each gray wolf x i The position update formula can be expressed as: . Wherein, A, B and C are random coefficients, used to control the randomness and diversity in the search process, until the preset iteration end condition is met, such as meeting the preset iteration number or the fitness of the new generation of gray wolf position meeting the preset threshold, selecting an optimal solution from the updated gray wolf population as the global optimal power allocation, as the global target power allocation for the multi-core heterogeneous computing cluster.
[0149] In this embodiment, by applying the gray wolf optimization algorithm to the resource configuration of the multi-core heterogeneous computing cluster, the system can realize an efficient, flexible and dynamic optimization scheme, not only improving the resource utilization, but also ensuring the efficiency of task execution, adapting to complex computing environment and changing business demands, and providing more accurate global target power allocation.
[0150] In an exemplary embodiment, as shown in Figure 6 A multi-core heterogeneous computing cluster adaptation method based on resource demand prediction is provided, comprising:
[0151] Step A, the system selects a historical log data set containing multi-dimensional resource monitoring and task execution performance as a sample data set for building a task resource demand prediction model. The historical log data set is preprocessed: removing sample outliers and filling missing data with adjacent mean.
[0152] Step B, based on the machine learning extreme gradient boosting tree (XGBoost) model, a task resource demand prediction model (pre-trained resource demand prediction model) is established, the historical log data is substituted into the demand prediction model for training, and the multi-dimensional resource demand of different types of tasks is solved. Quantitative representation of the influence of multi-dimensional resources on task execution time.
[0153] Step C, based on the output of the resource demand prediction model, analyze the influence of multi-dimensional resources on the performance of energy prediction task, use the improved dense k-d tree (Bushy k-d trees, BKD) model to organize resource demand data, and divide the demand data of multi-dimensional resources (resource dimensions) into multiple blocks, and build a BKD tree index for each block. When the computing power request (resource scheduling request) arrives at the gateway, the computing power resources (computing power nodes) that meet the demand of the prediction task are weighted and sorted, and the computing power resource with the maximum weighted sum (weighted score) is selected as the locally optimal computing power resource (local target computing power configuration).
[0154] Step D, the joint optimization goal of minimizing the total execution time of the task (total task execution time) and maximizing the resource utilization (total resource utilization) is determined, the global computing power optimization scheduling problem of single prediction and combined prediction is defined and modeled, and the improved grey wolf optimization algorithm is used to solve the global computing power optimization scheduling problem. Select the optimal computing power resource as the globally optimal computing power configuration (global target computing power configuration).
[0155] In this embodiment, for the resource regulation and deployment of the computing power network in new energy power prediction, starting from the goal of cooperative scheduling of heterogeneous computing power resources, a computing power adaptation mechanism of multi-dimensional resource integration in the computing power network is established, the local to global optimization configuration of computing power resources is realized, and the efficiency of resource scheduling and the feasibility of task execution are ensured. Therefore, the timeliness and reliability of energy power prediction can be effectively improved.
[0156] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0157] Based on the same inventive concept, the embodiments of the present application also provide a resource demand prediction based computing power configuration device for implementing the above-mentioned resource demand prediction based computing power configuration method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more resource demand prediction based computing power configuration device embodiments provided below can refer to the limitations of the resource demand prediction based computing power configuration method in the above text, which will not be repeated here.
[0158] In an exemplary embodiment, as shown in Figure 7 a resource demand prediction-based computing power configuration apparatus 700 is provided, comprising a demand prediction module 702, an index construction model 704, a local configuration module 706, and a global configuration module 708, wherein:
[0159] The demand prediction module 702 is configured to input historical performance data and historical log data of the multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model in response to a resource scheduling request, to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task; the task represents resource data of a plurality of resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; and the predicted execution time represents a time required for any computing power node to process the task.
[0160] The index construction model 704 is configured to construct a BKD tree index corresponding to each resource dimension according to each computing power node of the multi-core heterogeneous computing power cluster and the resource dimension corresponding to each task; the BKD tree index is used to represent a corresponding relationship between each resource dimension and each task, and a load condition of each computing power node for each resource dimension.
[0161] The local configuration module 706 is configured to determine a local target computing power configuration corresponding to each resource dimension according to each computing power node and the BKD tree index.
[0162] The global configuration module 708 is configured to determine a global target computing power configuration for the multi-core heterogeneous computing power cluster according to the predicted execution time corresponding to each task, and the local target computing power configuration and a grey wolf optimization algorithm.
[0163] Further, in an embodiment, the demand prediction module 702 is further configured to perform data cleaning processing on the historical performance data and the historical log data to obtain cleaned resource data; the resource data includes historical tasks and corresponding historical execution times; a maximum correlation minimum redundancy principle is used to extract features from the cleaned resource data to obtain sample resource data; and the sample resource data is input into the pre-trained resource demand prediction model to obtain a plurality of predicted tasks and a predicted execution time corresponding to each task.
[0164] Further, in an embodiment, the local configuration module 706 is further configured to determine, from the plurality of computing power nodes of the multi-core heterogeneous computing power cluster, target computing power nodes that meet the resource scheduling request; determine, according to the BKD tree index, a usage rate and an average usage rate of each target computing power node for each resource dimension, and a type number of the resource dimension; determine, according to the target computing power nodes, the usage rate of each target computing power node for each resource dimension, and the type number of the resource dimension, a resource idle degree of each target computing power node; determine, according to the target computing power nodes, the usage rate of each target computing power node for each resource dimension, and the average usage rate of each resource dimension, a resource usage balance degree of each target computing power node; and determine, according to the resource idle degree and the resource usage balance degree of each target computing power node, a local target computing power configuration corresponding to each resource dimension.
[0165] Further, in an embodiment, the local configuration module 706 is further configured to determine, according to a preset weight coefficient, the resource idle degree and the resource usage balance degree of each target computing power node, a weighted score of each target computing power node for each resource dimension; the preset weight coefficient includes a weight coefficient of the resource idle degree and a weight coefficient of the resource usage balance degree; and determine, according to the weighted score of each target computing power node for each resource dimension, a target computing power node corresponding to a maximum value of the weighted score under each resource dimension, as the local target computing power configuration corresponding to each resource dimension.
[0166] Further, in an embodiment, the global configuration module 708 is further configured to determine, according to the predicted execution time of each task, a total task execution time constraint condition and a total execution time of each resource dimension; determine, according to the usage rate of each target computing power node for each resource dimension and the total execution time of each resource dimension, a total resource utilization rate constraint condition; and determine, according to the local target computing power configuration, the total task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm, a global target computing power configuration for the multi-core heterogeneous computing power cluster.
[0167] Further, in an embodiment, the global configuration module 708 is further configured to construct a grey wolf initial population according to the local target computing power configuration; construct a fitness function according to the total task execution time constraint condition, the total resource utilization rate constraint condition, and the grey wolf optimization algorithm; calculate a fitness of each grey wolf in the grey wolf initial population according to the fitness function, and iteratively update the grey wolf initial population according to the fitness of each grey wolf until a preset iteration end condition is met, to obtain the global target computing power configuration for the multi-core heterogeneous computing power cluster.
[0168] The various modules in the computing power configuration device 700 based on resource demand prediction can be realized by software, hardware and combinations thereof in whole or in part. The various modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the various modules.
[0169] In an exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured 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 operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store historical performance data and historical log data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with terminals outside through a network connection. The computer program is executed by the processor to implement a computing power configuration method based on resource demand prediction.
[0170] Those skilled in the art can understand that Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In an embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above method embodiments.
[0172] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0173] In an embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0175] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0176] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A resource demand prediction-based computing power configuration method, characterized in that, The method comprises: in response to a resource scheduling request, inputting historical performance data and historical log data of a multi-core heterogeneous computing cluster into a pre-trained resource demand prediction model to obtain predicted multiple tasks and a predicted execution time corresponding to each task; the task represents resource data of multiple resource dimensions currently needing to be processed for the multi-core heterogeneous computing cluster; the predicted execution time represents the time required for any computing node to process the task; according to each computing node of the multi-core heterogeneous computing cluster and the resource dimension corresponding to each task, a BKD tree index corresponding to each resource dimension is constructed; the BKD tree index is used to represent the corresponding relationship between each resource dimension and each task, and the load condition of each computing node for each resource dimension; determine the local target computing node configuration corresponding to each resource dimension according to each computing node and the BKD tree index; determine the total task execution time constraint condition and the total execution time of each resource dimension according to the predicted execution time corresponding to each task; determine the total resource utilization rate constraint condition according to the utilization rate of each target computing node for each resource dimension and the total execution time of each resource dimension; construct a grey wolf initial population according to the local target computing node configuration; construct a fitness function according to the total task execution time constraint condition, the total resource utilization rate constraint condition and the grey wolf optimization algorithm; calculate the fitness of each grey wolf in the grey wolf initial population according to the fitness function, and iteratively update the grey wolf initial population according to the fitness of each grey wolf until a preset iteration end condition is met, to obtain a global target computing node configuration for the multi-core heterogeneous computing cluster; the target computing node is determined based on the resource scheduling request.
2. The method of claim 1, wherein, The method comprises: inputting the historical performance data and the historical log data into the pre-trained resource demand prediction model to obtain the predicted multiple tasks and the predicted execution time corresponding to each task, comprising: performing data cleaning processing on the historical performance data and the historical log data to obtain cleaned resource data; the resource data includes historical tasks and corresponding historical execution times; using the maximum correlation minimum redundancy principle to extract features from the cleaned resource data to obtain sample resource data; 3. The method of claim 1, wherein, inputting the sample resource data into the pre-trained resource demand prediction model to obtain the predicted multiple tasks and the predicted execution time corresponding to each task. The method comprises: determining the target computing node that meets the resource scheduling request from each computing node of the multi-core heterogeneous computing cluster; determine the utilization rate and average utilization rate of each target computing node for each resource dimension, and the type number of the resource dimension according to the BKD tree index. determine, according to the target computing power nodes, the usage rate of each target computing power node for each resource dimension, and the type number of the resource dimension, a resource idle degree of each target computing power node; determine, according to the target computing power nodes, the usage rate of each target computing power node for each resource dimension, and the average usage rate of each resource dimension, a resource usage balance degree of each target computing power node; determine, according to the resource idle degree and the resource usage balance degree of each target computing power node, a local target computing power configuration corresponding to each resource dimension.
4. The method of claim 3, wherein, The determining, according to the resource idle degree and the resource usage balance degree of each target computing power node, a local target computing power configuration corresponding to each resource dimension, includes: determine, according to a preset weight coefficient, the resource idle degree and the resource usage balance degree of each target computing power node, a weighted score of each target computing power node for each resource dimension; the preset weight coefficient includes a weight coefficient of the resource idle degree and a weight coefficient of the resource usage balance degree; determine, according to the weighted score of each target computing power node for each resource dimension, the target computing power node corresponding to the maximum weighted score of each resource dimension as the local target computing power configuration corresponding to each resource dimension.
5. A computing power configuration device based on resource demand prediction, characterized in that, The apparatus includes: a demand prediction module configured to, in response to a resource scheduling request, input historical performance data and historical log data of a multi-core heterogeneous computing power cluster into a pre-trained resource demand prediction model to obtain predicted tasks and a predicted execution time corresponding to each task; the tasks represent resource data of a plurality of resource dimensions currently needing to be processed by the multi-core heterogeneous computing power cluster; and the predicted execution time represents a time required for any computing power node to process the tasks; an index construction module configured to construct a BKD tree index corresponding to each resource dimension according to each computing power node of the multi-core heterogeneous computing power cluster and the resource dimensions corresponding to the plurality of tasks; the BKD tree index is used to represent a correspondence between each resource dimension and each task, and a load condition of each computing power node for each resource dimension; a local configuration module configured to determine a local target computing power configuration corresponding to each resource dimension according to each computing power node and the BKD tree index. The global configuration module is configured to determine a total task execution time constraint and a total execution time of each resource dimension according to the predicted execution time corresponding to each task; determine a total resource utilization rate constraint according to the usage rate of each resource dimension and the total execution time of each resource dimension of each target computing power node; construct a gray wolf initial population according to the local target computing power configuration; construct a fitness function according to the total task execution time constraint, the total resource utilization rate constraint and the gray wolf optimization algorithm; calculate the fitness of each gray wolf in the gray wolf initial population according to the fitness function, and iteratively update the gray wolf initial population according to the fitness of each gray wolf until a preset iteration end condition is met, to obtain a global target computing power configuration for the multi-core heterogeneous computing power cluster; and the target computing power node is determined based on the resource scheduling request.
6. The apparatus of claim 5, wherein, The demand prediction module is further configured to perform data cleaning processing on the historical performance data and the historical log data to obtain cleaned resource data; the resource data includes historical tasks and corresponding historical execution times; and perform feature extraction on the cleaned resource data according to a maximum correlation minimum redundancy principle to obtain sample resource data. The sample resource data is input into the pre-trained resource demand prediction model to obtain predicted multiple tasks and predicted execution time corresponding to each task.
7. The apparatus of claim 5, wherein, The local configuration module is further configured to determine target computing power nodes that meet the resource scheduling request from each computing power node of the multi-core heterogeneous computing power cluster; determine the usage rate and average usage rate of each resource dimension and the type quantity of the resource dimension of each target computing power node according to the BKD tree index; determine the resource idle degree of each target computing power node according to the target computing power node, the usage rate of each resource dimension of each target computing power node and the type quantity of the resource dimension; determine the resource usage balance degree of each target computing power node according to the target computing power node, the usage rate of each resource dimension of each target computing power node and the average usage rate of each resource dimension; and determine the local target computing power configuration corresponding to each resource dimension according to the resource idle degree and the resource usage balance degree of each target computing power node.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 4.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Optimization method and optimization device for computing power resource allocation, electronic equipment and medium
CN116541176A
Computing power resource scheduling method, device and equipment and readable storage medium
CN118644007A