Resource scheduling method and device, electronic equipment, storage medium and program product

Through the prediction model, the resource demand and actual resource ownership are predicted, and the resources are dynamically scheduled, the limitations of resource scheduling in the 5G multimedia call environment are solved, and resource utilization efficiency and user experience are improved.

CN118984309APending Publication Date: 2024-11-19CHINA MOBILE INTERNET CO LTD +1

Patent Information

Application Number
CN202410975360.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In the complex 5G multimedia call environment, traditional static computing power scheduling strategies cannot respond quickly, resulting in great limitations in resource scheduling and low resource utilization efficiency.

Method used

By obtaining resource usage information, input it into the resource prediction model to predict future resource requirements, determine the remaining resources based on the actual resource ownership, dynamically schedule resources, and achieve optimal resource utilization.

Benefits of technology

Quickly adapt to network changes, reduce resource scheduling limitations, improve resource utilization efficiency, optimize user experience and reduce operational costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984309A_ABST
    Figure CN118984309A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource scheduling method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: obtaining resource use information which is a resource used by a first node for calling a target capability in a first time period; the resource use information is input into a resource prediction model, the resource demand of the first node for calling the capability in a second time period after the current moment is predicted through the resource prediction model, and the first time period is the time period before the current moment; determining residual resources of the first node in the second time period according to the actual resource ownership amount of the first node and the resource demand; and scheduling resources required for calling the capability by the first node based on the residual resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a resource scheduling method, device, electronic device, storage medium and program product. Background Art

[0002] In the context of the new call media capability platform of the fifth generation mobile communication technology (5G), with the explosive growth of the demand for multimedia calls, with the development of 5G, multimedia calls are no longer simple voice exchanges, but integrate multiple media forms such as video, voice, text, and images. In this context, the integration of artificial intelligence (AI) technology, especially AI capabilities such as natural language processing, computer vision, speech recognition and speech synthesis, has further enhanced the interactivity and fun of multimedia calls. When calling these AI capabilities, how to efficiently and intelligently dispatch computing resources to call AI capabilities in a complex network environment composed of multiple computing power clusters has become a key technical challenge to improve service quality, optimize user experience, and reduce operating costs.

[0003] In some scenarios, traditional computing power scheduling strategies are often based on static scheduling, which is to pre-determine which computing power resources the task is assigned to before the task starts. However, in a complex network environment, traffic and computing power resources are changing dynamically in real time. In the event of traffic peaks or emergencies, this static scheduling method cannot respond quickly, and resource scheduling has great limitations, resulting in inefficient resource utilization. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a resource scheduling method, device, electronic device and storage medium, which solves the problem that resource scheduling has large limitations and leads to low resource utilization efficiency.

[0005] In order to solve the above technical problems, the embodiments of the present application are implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a resource scheduling method, which includes: obtaining resource usage information, wherein the resource usage information is the resources used by a first node to call a target capability within a first time period; inputting the resource usage information into a resource prediction model, and predicting the resource requirements of the first node to call the capability within a second time period after a current moment through the resource prediction model, wherein the first time period is a time period before the current moment; determining the remaining resources of the first node within the second time period based on the actual resource ownership of the first node and the resource requirements; and scheduling the resources required for the first node to call the capability based on the remaining resources.

[0007] In a second aspect, an embodiment of the present application provides a resource scheduling device, which includes: an acquisition module, used to acquire resource usage information, wherein the resource usage information is the resources used by the first node to call the target capability within a first time period; a prediction module, used to input the resource usage information into a resource prediction model, and predict the resource requirements of the first node to call the capability within a second time period after the current moment through the resource prediction model, wherein the first time period is the time period before the current moment; a determination module, used to determine the remaining resources of the first node within the second time period based on the actual resource ownership of the first node and the resource requirements; and a scheduling module, used to schedule the resources required for the first node to call the capability based on the remaining resources.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the steps of the resource scheduling method mentioned in the first aspect.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the resource scheduling method mentioned in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the resource scheduling method mentioned in the first aspect.

[0011] Through the technical solution disclosed in the embodiment of the present application, firstly, resource usage information is obtained, and the resource usage information is the resources used by the first node to call the target capability in the first time period; then the resource usage information is input into the resource prediction model, and the resource prediction model is used to predict the resource demand of the first node to call the capability in the second time period after the current moment, and the first time period is the time period before the current moment. In this way, the present application can predict the resource demand of various capabilities in the future when calling the capability through the resource prediction model, and then determine the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the predicted resource demand, and the available resources are the available resources of the predicted node; finally, the resources required for the first node to call the capability are scheduled based on the remaining resources. In this way, resources can be dynamically scheduled according to the predicted available resources of the node and the predicted resource demand of the capability, so as to quickly adapt to complex network changes, achieve optimal utilization of resources, reduce the limitations of resource scheduling, and improve resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0013] Figure 1 A schematic diagram of a resource scheduling method according to an embodiment of the present invention;

[0014] Figure 2 A schematic diagram of a capability portrait of a CPU resource of the capability provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a module composition of a resource scheduling device provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The purpose of the embodiments of the present application is to provide a resource scheduling method, device, electronic device and storage medium, which solves the problem that resource scheduling has large limitations and leads to low resource utilization efficiency.

[0018] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0019] For example, Figure 1 As shown, an embodiment of the present application provides a resource scheduling method, the execution subject of the method may be a server, and the resource scheduling method may specifically include the following steps:

[0020] In step S101, resource usage information is obtained.

[0021] The resource usage information is the resources used by the first node to call the target capability during the first time period.

[0022] Specifically, the first node includes resources such as a central processing unit (CPU), a graphics processing unit (GPU), memory, computing power, bandwidth, and request volume. The first time period is a historical time period before the current moment, and the first time period may include multiple time periods with a time interval of δ. The resource usage information includes the CPU resources, GPU resources, memory resources, computing power resources, request volume resources, and bandwidth resources of the first node calling the target capability in each time period of the first time period. The target capability can be an AI capability, such as natural language processing, computer vision, speech recognition, and speech synthesis.

[0023] In step S103, the resource usage information is input into a resource prediction model, and the resource prediction model is used to predict the resource demand of the first node for calling the capacity in a second time period after the current moment.

[0024] The first time period is the time period before the current moment, that is, the historical time period of the current moment, and the second time period is the future time period after the current moment.

[0025] Specifically, the resource prediction model uses the resource usage information of the target capability in the historical period to predict the resource demand of the target capability in the future. The resource prediction model can be a capability profile of the predicted capability. The capability profile represents the multi-target resource demand of a capability at each moment in the future. Assuming a capability C, its capability profile can be described as a two-dimensional matrix, as follows:

[0026]

[0027]

[0028] In the above formula, R represents the capability profile, r CPU Indicates the CPU resource requirements at each moment of the capacity in the future T moments (such as to ), r mem Indicates the memory resource requirements of each moment of the capability in the future T moments (such as and ), r GPU Indicates the GPU resource requirements at each moment in the future T moments (such as to ), r qps Indicates the request volume of each moment of the capacity in the future T moments (such as to ), r netio Indicates the bandwidth resource requirements of each moment of the capacity in the future T moments (such as to ), r netGZ Indicates the number of connections from the physical source address GZ that the capability can receive in the next T time periods (e.g. to ), it is worth noting that the embodiment of the present application only lists GZ, and there should be several request source addresses in actual applications.

[0029] In the above formula, when T=1, R has only one column, and the capability profile of the capability becomes a static capability profile.

[0030] When a capability has only one resource target, R has only one row, and the capability profile of the capability becomes a single-target profile.

[0031] For example, Figure 2 The figure shows the capability portrait of the CPU resources of a certain capability, in which the CPU resource usage of the capability at 512 historical time points is used to predict the CPU resource demand of the capability at 96 future time points. The figure shows the CPU resource usage of the capability at 512 historical time points (corresponding to the historical values ​​in the figure), the CPU resources actually used by the capability (corresponding to the actual values ​​in the figure), and the predicted CPU resource demand of the capability (corresponding to the predicted values ​​in the figure).

[0032] Furthermore, the resource prediction model can adopt the Transformer model. The Transformer model is a sequence-to-sequence deep learning model based on the self-attention mechanism. The Transformer model consists of an encoder and a decoder. Both the encoder and the decoder are stacked by multiple structures of the same level. Each layer mainly includes a self-attention layer and a feedforward neural network layer.

[0033] In the self-attention layer, the representation of each element in the input sequence is calculated by weighted summing it with other elements, so that each element can obtain global context information. The self-attention mechanism can better capture long-range dependencies in the sequence.

[0034] The feedforward neural network layer performs nonlinear transformation on the representation of each position through a fully connected layer and activation function to enhance the representation ability of the model.

[0035] The encoder is used to transform the input sequence into a contextual representation, and the decoder uses this contextual representation to generate the output sequence. Each time step of the decoder focuses on different positions in the input sequence by adding an additional self-attention layer.

[0036] For example, for a capability using a single resource, obtain the resource usage information H of the capability in a historical period before the current moment with a time interval of δ. H includes the usage of a resource by the capability in the historical period. Standardize H to get H norm =[r -n ,r -n+1 ,…,r -1 ],r -n ,r -n+1 ,…,r -1 is the normalized resource usage, H norm Input into the resource prediction model (LSTM sequence predictor) and calculate r = LSTM (H norm ), the autoregressive iteration calculates the predicted value r1, r2, ..., r of the resource demand for the capacity at T moments after the current moment and with a time interval of δ t , that is, r=[r1,r2,…,r t ], and finally, output r. Similarly, the resource requirements of other resources used by the capability are predicted separately. Afterwards, since each row of R represents different resources, their numerical distributions are often very different. We perform 0-1 standardization on each component to balance the impact of each component on the overall portrait, and finally obtain the multi-resource capability portrait R of the capability.

[0037] Furthermore, when selecting the length of the first time period and the time interval δ after each time period in the first time period, the number of sampling points can be fixed first, and then the time interval δ can be customized, and the length of the selected first time period can be determined according to the number of sampling points and the time interval δ. For example, if the sampling point N=500, 500 sampling points are selected.

[0038] If δ=3 minutes is set, the ability profile at the minute level can be realized, which requires about one day of historical data before the current moment for prediction.

[0039] If δ is set to 1 hour, hour-level capability profiling can be achieved, which requires about one month of historical data before the current moment for prediction.

[0040] If δ=12 hours is set, a daily-level capability profile can be achieved, which requires about one year of historical data before the current moment for prediction.

[0041] In step S105, the remaining resources of the first node in the second time period are determined according to the actual resource ownership and resource demand of the first node.

[0042] Specifically, the resource portrait of the node can be used to describe the remaining resources of the first node in the second period, that is, the resource portrait depicts the remaining or available situation of multiple resources of the node at each moment in the future. The resource portrait of the node can be quickly derived from the actual resource situation of the node and the capability portrait running on the node, that is, the difference between the actual resource ownership and resource demand of the first node is determined as the remaining resources.

[0043] For example, suppose the actual resource ownership of the node is:

[0044] J=(J CPU ,J mem ,J GPU ,J qps ,J netio ,J netGZ )

[0045] Among them, J CPU Indicates the CPU resources actually owned by the node, J mem Indicates the actual memory resources owned by the node, J GPU Indicates the GPU resources actually owned by the node, J qps Indicates the QPS resources actually owned by the node, J netio Indicates the bandwidth resources actually owned by the node, J netGZ Indicates the maximum number of requests from GZ that the node can handle and when the node is located in GZ, J netGZ =100.

[0046] The capabilities running on this node are [C1,C2,…,C n ], capabilities [C1,C2,…,C n ] corresponding capability profile (i.e., capabilities C1, C2, …, C n The resource requirements) are [R1,R2,…,R n ].

[0047] Then the resource profile of the node R J for:

[0048] R J =J-(R1+R2+…+R n )

[0049] Among them, J is the actual resource ownership of the node.

[0050] As can be seen from the formula, the node resource portrait has two advantages: first, the node resource portrait is a time series, not a static one, so it has a certain degree of foresight; second, the node resource portrait integrates the time series characteristics of all capabilities on it. In fact, the superposition effect of the sequence is better than the superposition of the maximum or minimum value or even the average value within each sequence. In this way, the node resource portrait is used for the subsequent resource scheduling.

[0051] In step S107, resources required for the first node to call the capability are scheduled based on the remaining resources.

[0052] Specifically, scheduling the resources required for the first node to call the capability can be to dynamically adjust the capability to maximize resource utilization. Through the above embodiment, the resource profile of the node (available resources) and the capability profile of the capability running on each node (capability resource requirements) are obtained, so that we can have a certain control over the resource utilization of the node in the future. By setting a threshold for dynamic scheduling, when the resource profile of a node is lower than the threshold, dynamic scheduling of resources will be triggered.

[0053] In one possible implementation, scheduling the resources required for the first node to call the capability based on the remaining resources includes: calculating the ratio of the remaining resources to the actual resource ownership of the first node to obtain the remaining resource ratio; if the remaining resource ratio is greater than a threshold, scheduling the resources required for the capability from the first node; if the remaining resource ratio is not greater than the threshold, scheduling the capability to the second node, and scheduling the resources required for the capability from the second node, and the remaining resource ratio of the second node is greater than the threshold.

[0054] Specifically, suppose a node has a resource profile (remaining resources) of R J , all capabilities and capability profiles (resource requirements) running on it are [C1,C2,…,Cn ] and [R1,R2,…,R n ], the actual total amount of resources J owned by the node is:

[0055] J=(J CPU ,J mem ,J GPU ,J qps )

[0056] Then the relative remaining resource ratio of the node can be calculated:

[0057] rate=R J / J

[0058] Among them, rate represents the remaining resource ratio of the node in the future period (second period), and sets the resource scheduling threshold τ = [τ CPU ,τ mem ,τ GPU ,τ qps ], calculate whether to trigger the dynamic resource scheduling of the node.

[0059] If rate>τ at all future moments, it means that the remaining resources on the node are more than the set threshold. There is no need to schedule from other nodes, and the corresponding resources can be directly scheduled from the first node.

[0060] If rate < τ at some point in the future, it means that the remaining resources on the node are less than the set threshold, and the capacity needs to be scheduled to another node (the second node). It is worth noting that it is necessary to ensure that the proportion of remaining resources of the second node is greater than the threshold so that the resources on the second node can meet the resource requirements of the capacity.

[0061] In a possible implementation, there are multiple capabilities, and if the proportion of remaining resources is not greater than a threshold, scheduling the capabilities to the second node includes: determining a target capability with the greatest resource demand from each capability; and scheduling the target capability to the second node.

[0062] Specifically, when there are multiple capabilities, it is necessary to consider which capability to schedule to the second node, and a target capability with the largest resource demand can be determined from each capability; and the target capability is scheduled to the second node.

[0063] Furthermore, we can also use the capability profile A of the i-th capability i The actual resource ownership of a resource of the node B i The matching degree of the i-th capability is calculated by the variance of the values ​​of , and the matching degree is used to determine which capability to schedule. The specific formula is as follows:

[0064]

[0065] Among them, VSD(A,B) represents the matching degree between the resource demand of the capability and the actual resource possession of the node. The smaller the value, the higher the matching degree. Finally, the capability with the smallest VSD(A,B) value on the node is selected, and this capability needs to be dispatched. Among them, the smaller the VSD(A,B) value, the closer the resource demand of the capability is to the actual resource possession of the node. The actual resource possession of the node may not meet the resource demand of the capability. Therefore, this capability needs to be dispatched. After the capability is dispatched, re-run the deployment allocation plan on all other nodes in the cluster to redeploy the capability to other nodes.

[0066] For example, if rate < τ holds for a resource component (such as CPU) at some point in the future, it means that the CPU resources of the node are insufficient, and the capability that uses the most CPU resources needs to be scheduled. Specifically, the capability profile R of the i-th capability is used. iCPU The actual CPU resource ownership of the node CPU The matching degree of the i-th ability is calculated based on the variance of the values:

[0067] VSD CPU (J CPU ,R iCPU )

[0068] In the above formula, VSD CPU (J CPU ,R iCPU ) represents the matching degree of the ith capability, which is the smallest among the matching degrees of various capabilities, indicating that the CPU resource demand of the ith capability is closer to the remaining CPU resources of the node. Therefore, when VSD is the smallest, the CPU usage of the ith capability is the largest (closest to the remaining CPU resources of the node), and the ith capability needs to be scheduled out.

[0069] Through the technical solution disclosed in the embodiment of the present application, firstly, resource usage information is obtained, and the resource usage information is the resources used by the first node to call the target capability in the first time period; then the resource usage information is input into the resource prediction model, and the resource prediction model is used to predict the resource demand of the first node to call the capability in the second time period after the current moment, and the first time period is the time period before the current moment. In this way, the present application can predict the resource demand of various capabilities in the future when calling the capability through the resource prediction model, and then determine the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the predicted resource demand, and the available resources are the available resources of the predicted node; finally, the resources required for the first node to call the capability are scheduled based on the remaining resources. In this way, the resources can be dynamically scheduled according to the predicted available resources of the node and the predicted resource demand of the capability, so as to quickly adapt to complex network changes, achieve optimal utilization of resources, reduce the limitations of resource scheduling, and improve resource utilization efficiency.

[0070] In one possible implementation, before inputting resource usage information into a resource prediction model and predicting resource demand of the capability in a second time period after the current moment through the resource prediction model, the method also includes: determining a sampling interval and a sampling point; determining a historical sampling time length according to the sampling interval and the sampling point; obtaining historical resource usage information of each time period of the historical sampling time length of the capability at the first node; performing feature transformation on the historical resource usage information of each time period of the historical sampling time series through a sliding window and inputting the feature transformation into the initial resource prediction model for iterative training to obtain a resource prediction model.

[0071] Specifically, the initial resource prediction model can be a Transformer model. The original Transformer model is not suitable for direct application to the prediction of time series because each value in the time series can hardly represent the context information. The Transformer model based on the sliding window in the embodiment of the present application is used for the prediction of time series. Although the single point value in the time series does not have context information, the time point in a window of a certain length can be regarded as a "Token" with context information. The set of time points in the window is input into the Transformer model after feature transformation, and the context information of the data sequence can be obtained.

[0072] Furthermore, for each piece of data d, the historical resource usage information of a certain capability at multiple time points (sampling points) is continuously collected with a sampling interval of δ, the sampling time length is determined according to the number of sampling points and the sampling interval, and the historical resource usage information of the capability is collected according to the sampling time length. A total of D training samples are collected for different capabilities.

[0073] Furthermore, the historical resource usage information can be divided into a training set and a label set. For example, for CPU usage, the collection length can be 24 hours, and the sampling interval can be 3 minutes, of which 20 hours are used as the training set for model input and 4 hours are used as training labels.

[0074] It is worth noting that in order to improve the generalization of the model, it is necessary to collect data from various situations, such as different capability types, different server conditions, and different time periods, to enrich the data scenarios.

[0075] The historical resource usage information of each period of the historical sampling time series is transformed into features through a sliding window and input into the initial resource prediction model for iterative training. During the training process, the mini-batch gradient descent method is used, k is the sample size of a batch (i.e., batch) during training, and the Dropout strategy is applied to randomly remove some long short-term memory network hidden layer units and their weights with a certain probability to prevent overfitting of the training data. The loss function uses cross entropy, which is as follows:

[0076]

[0077] In the above formula, y (i) is the true label at the i-th moment, representing the target value, such as the CPU usage at the i-th moment; x (i) is the input sample at the i-th moment. If the sliding window size used in training is 3, then x (i) is equal to the CPU usage at the three moments i-3, i-2, and i-1. θ represents the parameters of the initial resource prediction model. Since the model in this paper is trained based on Transformer, θ represents the parameters of various matrices inside Transformer. The parameters will be randomly initialized, and then change with the training process. Finally, a θ that minimizes the loss function will be selected; λ is a regularization parameter, which is mainly used to control the complexity of the model and prevent the model from being too complex to avoid overfitting (that is, the model performs well on the training data, but poorly on the new data). The larger λ is, the simpler the model is, thereby reducing the risk of overfitting. The smaller λ is, the more complex the model is, which may better fit the training data, but is also more prone to overfitting.

[0078] Finally, the effect of the model can be evaluated, which can be done using the following formula:

[0079]

[0080] In the above formula, n is the number of time points for training labels, y i represents the true label at the i-th moment, such as the actual CPU usage at the i-th moment; y i ′Represents the predicted value at the i-th moment, such as the CPU usage predicted by the model at the i-th moment.

[0081] The historical resource usage information of each time period of the historical sampling time series is transformed into features through a sliding window and input into an initial resource prediction model for iterative training. Before obtaining the resource prediction model, the method also includes: determining the mean and standard deviation of the historical resource usage information; standardizing the historical resource usage information according to the mean and standard deviation to obtain standardized data; performing data cleaning on the standardized data to obtain cleaned data; the historical resource usage information of each time period of the historical sampling time series is transformed into features through a sliding window and input into the initial resource prediction model for iterative training. Obtaining the resource prediction model includes: transforming the features of the cleaned data through a sliding window and inputting it into the initial resource prediction model for iterative training to obtain the resource prediction model.

[0082] Specifically, directly using the collected historical data for training may cause poor training results. This is because the original data has dimensions, which is not conducive to model learning. On the other hand, the collected historical data may also contain damaged data that needs to be cleaned. Therefore, data preprocessing mainly involves data standardization and data cleaning, and then using the cleaned data for model training to improve the model training effect.

[0083] The data is standardized using 0-1 standardization. Assuming that the mean value of the sample set is m and the standard deviation is S, the standardized data of the training sample d is expressed as

[0084] Then the standardized data is cleaned, such as removing missing values ​​and outliers, to obtain cleaned data.

[0085] Corresponding to the resource scheduling method provided in the above embodiment, based on the same technical concept, the embodiment of the present application also provides a resource scheduling device, Figure 3 A schematic diagram of the module composition of a resource scheduling device provided in an embodiment of the present application, wherein the resource scheduling device is used to execute Figure 1 Describe the resource scheduling method, such as Figure 3As shown, the resource scheduling device 300 includes: an acquisition module 301, used to acquire resource usage information, the resource usage information is the resources used by the first node to call the target capability within a first time period; a prediction module 302, used to input the resource usage information into a resource prediction model, and predict the resource demand of the first node to call the capability within a second time period after the current moment through the resource prediction model, the first time period being the time period before the current moment; a determination module 303, used to determine the remaining resources of the first node within the second time period according to the actual resource ownership and resource demand of the first node; and a scheduling module 304, used to schedule the resources required for the first node to call the capability based on the remaining resources.

[0086] It can be seen from the technical solution provided by the above embodiment of the present application that firstly, resource usage information is obtained, and the resource usage information is the resources used by the first node to call the target capability in the first time period; then the resource usage information is input into the resource prediction model, and the resource prediction model is used to predict the resource demand of the first node to call the capability in the second time period after the current moment, and the first time period is the time period before the current moment. In this way, the present application can predict the resource demand of various capabilities in the future when calling the capability through the resource prediction model, and then determine the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the predicted resource demand, and the available resources are the available resources of the predicted node; finally, the resources required for the first node to call the capability are scheduled based on the remaining resources. In this way, resources can be dynamically scheduled according to the predicted available resources of the node and the predicted resource demand of the capability, so as to quickly adapt to complex network changes, achieve optimal utilization of resources, reduce the limitations of resource scheduling, and improve resource utilization efficiency.

[0087] In one possible implementation, the scheduling module 304 is also used to calculate the ratio of the remaining resources to the actual resource ownership of the first node to obtain the remaining resource ratio; if the remaining resource ratio is greater than the threshold, the resources required for the capacity are scheduled from the first node; if the remaining resource ratio is not greater than the threshold, the capacity is scheduled to the second node, and the resources required for the capacity are scheduled from the second node, and the remaining resource ratio of the second node is greater than the threshold.

[0088] In a possible implementation, the scheduling module 304 is further configured to determine a target capacity with the largest resource demand from among the various capacities; and schedule the target capacity to the second node.

[0089] In a possible implementation, the determination module 303 is further configured to determine the difference between the actual resource ownership and the resource demand as the remaining resources.

[0090] In a possible implementation, the determination module 303 is also used to determine the sampling interval and the sampling point; determine the historical sampling time length according to the sampling interval and the sampling point; obtain the historical resource usage information of each period of the historical sampling time length of the capability at the first node; perform feature transformation on the historical resource usage information of each period of the historical sampling time series through a sliding window and input it into the initial resource prediction model for iterative training to obtain a resource prediction model.

[0091] In one possible implementation, the determination module 303 is also used to determine the mean value and standard deviation of historical resource usage information; standardize the historical resource usage information according to the mean value and standard deviation to obtain standardized data; perform data cleaning on the standardized data to obtain cleaned data; perform feature transformation on the cleaned data through a sliding window and input it into the initial resource prediction model for iterative training to obtain a resource prediction model.

[0092] The resource scheduling device provided in the embodiment of the present application can implement each process in the embodiment corresponding to the above-mentioned resource scheduling method, and has the same or similar beneficial effects. To avoid repetition, it will not be described here.

[0093] It should be noted that the resource scheduling device provided in the embodiment of the present application and the resource scheduling method provided in the embodiment of the present application are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned resource scheduling method, and has the same or similar beneficial effects, and the repetitive parts will not be repeated.

[0094] Corresponding to the resource scheduling method provided in the above embodiment, based on the same technical concept, the embodiment of the present application further provides an electronic device, which is used to execute the above resource scheduling method. Figure 4 A schematic diagram of the structure of an electronic device for implementing each embodiment of the present application is shown in FIG. Figure 4 As shown. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, and the memory 402 may store one or more storage applications or data. Among them, the memory 402 may be a temporary storage or a permanent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device.

[0095] Furthermore, the processor 401 may be configured to communicate with the memory 402 to execute a series of computer executable instructions in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input and output interfaces 405, and one or more keyboards 406.

[0096] Specifically in this embodiment, the electronic device includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to achieve the above Figure 1 The various steps in the method embodiment are similar to those in the method embodiment, and have the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present application will not be described again here.

[0097] This embodiment also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above Figure 1 Each step in the method embodiment has the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present application will not be described again here.

[0098] The present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above Figure 1 Each step in the method embodiment has the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present application will not be described again here.

[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0103] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0104] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0108] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A resource scheduling method, characterized in that: The resource scheduling method comprises: Acquire resource usage information, where the resource usage information is resources used by the first node to call the target capability during the first time period; Inputting the resource usage information into a resource prediction model, and predicting the resource demand of the first node for calling the capability in a second time period after the current moment through the resource prediction model, where the first time period is a time period before the current moment; Determine the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the resource demand; Resources required for the first node to invoke the capability are scheduled based on the remaining resources.

2. The resource scheduling method according to claim 1, characterized in that: The scheduling of resources required for the first node to call the capability based on the remaining resources includes: Calculate the ratio of the remaining resources to the actual resource ownership of the first node to obtain a remaining resource ratio; If the remaining resource ratio is greater than a threshold, scheduling resources required for the capability from the first node; If the proportion of the remaining resources is not greater than the threshold, the capability is scheduled to the second node, and the resources required for the capability are scheduled from the second node, and the proportion of the remaining resources of the second node is greater than the threshold.

3. The resource scheduling method according to claim 2, characterized in that: The capabilities are multiple, and if the remaining resource ratio is not greater than a threshold, scheduling the capabilities to the second node includes: Determine the target capability with the greatest resource requirements from among the capabilities described; The target capacity is scheduled to the second node.

4. The resource scheduling method according to claim 1, characterized in that: The determining the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the resource demand includes: A difference between the actual resource ownership and the resource requirement is determined as the remaining resource.

5. The resource scheduling method according to any one of claims 1 to 4, characterized in that: Before inputting the resource usage information into the resource prediction model and predicting the resource demand of the capability in a second time period after the current moment by using the resource prediction model, the method further includes: Determine sampling intervals and sampling points; Determine the length of historical sampling time according to the sampling interval and sampling point; Acquire historical resource usage information of the capability in each period of the historical sampling time length of the first node; The historical resource usage information of each period of the historical sampling time series is subjected to feature transformation through a sliding window and input into an initial resource prediction model for iterative training to obtain the resource prediction model.

6. The resource scheduling method according to claim 1, characterized in that: Before performing feature transformation on the historical resource usage information of each period of the historical sampling time series through a sliding window and inputting the feature transformation into the initial resource prediction model for iterative training to obtain the resource prediction model, the method further includes: determining a mean and a standard deviation of the historical resource usage information; Standardizing the historical resource usage information according to the average value and the standard deviation to obtain standardized data; Performing data cleaning on the standardized data to obtain cleaned data; The historical resource usage information of each period of the historical sampling time series is transformed by a sliding window and input into the initial resource prediction model for iterative training to obtain the resource prediction model, which includes: The cleaned data is subjected to feature transformation through a sliding window and input into an initial resource prediction model for iterative training to obtain the resource prediction model.

7. A resource scheduling device, characterized in that: include: An acquisition module, configured to acquire resource usage information, wherein the resource usage information is resources used by the first node to call the target capability during a first period of time; A prediction module, configured to input the resource usage information into a resource prediction model, and predict, by means of the resource prediction model, a resource demand of the first node for calling the capability in a second time period after a current moment, wherein the first time period is a time period before the current moment; A determination module, configured to determine the remaining resources of the first node in the second time period according to the actual resource ownership of the first node and the resource demand; A scheduling module is used to schedule resources required for the first node to call the capability based on the remaining resources.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the steps of the resource scheduling method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the resource scheduling method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Task scheduling method and system based on resource demand prediction

    CN114579270A

  • Resource demand prediction model training, demand prediction and resource scheduling method and system

    CN116627630A

  • Task scheduling method and device

    CN116775233A

  • Virtual machine scheduling method, device and equipment and computer readable storage medium

    CN116974698A

  • Resource scheduling decision-making method and device, equipment, medium and program product

    CN117290093A

Cited By

  • Task scheduling method and device, electronic equipment and computer readable storage medium

    CN119883573A