Method and device for determining resource allocation strategy and electronic equipment

By acquiring business information about computing tasks, matching the most relevant historical tasks, and using transfer learning and resource scheduling models to determine the initial resource allocation strategy, the problem of uneven resource allocation in AI inference tasks is solved, and dynamic resource allocation and rapid task response are achieved.

CN121071507APending Publication Date: 2025-12-05CHINA TELECOM CORP LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511214212.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

In existing technologies, resource allocation strategies for AI inference tasks often adopt static or semi-static methods, which leads to uneven resource allocation when facing dynamic changes, affecting system performance.

Method used

By acquiring business information about computing tasks, matching the most similar historical tasks, using transfer learning and resource scheduling models to determine the initial resource allocation strategy, and adjusting the resource allocation strategy according to the target resource pool, dynamic resource allocation is achieved.

Benefits of technology

It enables precise resource allocation in AI inference tasks, meets the resource allocation strategies of different business types, realizes dynamic resource allocation and rapid task response, and thus solves the technical problem of uneven resource allocation affecting system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071507A_ABST
    Figure CN121071507A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for determining a resource allocation strategy and electronic equipment. The method comprises the steps that service information of a calculation task is acquired, and the service information comprises a service type and a resource demand of the calculation task; determining a target historical task matched with the calculation task from a plurality of historical tasks matched with the service type; an initial resource allocation strategy of the calculation task is determined according to a historical resource allocation strategy corresponding to the target historical task, and the historical resource allocation strategy is at least used for indicating the priority of resource allocation; a target resource pool meeting the resource requirement is determined from a plurality of sub-resource pools, the initial resource allocation strategy is adjusted according to the target resource pool, a target resource allocation strategy is obtained, and the sub-resource pools are logic division units of computing resources. According to the method and the device, the technical problem that the system performance is influenced due to non-uniform resource allocation during reasoning task processing because a static or semi-static resource allocation strategy is mostly adopted in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a method and device for determining resource allocation strategy and electronic equipment. BACKGROUND

[0002] With the wide application of AI technology in various industries, such as real-time video analysis, facial recognition and other scenarios, the demand for computing resources and network bandwidth presents high dynamicity and uncertainty. These businesses usually need to process a large amount of data in a very short time, so there are strict requirements for the rapid allocation and optimization adjustment of resources.

[0003] However, the related art mostly adopts static or semi-static resource allocation strategy. This method may be effective enough when facing static load, but it is not powerful enough in the face of dynamic changes of AI inference tasks, resulting in uneven resource allocation in processing inference tasks and affecting system performance.

[0004] At present, no effective solution has been proposed for the above problems. SUMMARY

[0005] The embodiments of the present application provide a method and device for determining resource allocation strategy and electronic equipment to at least solve the technical problem that the related art mostly adopts static or semi-static resource allocation strategy, resulting in uneven resource allocation in processing inference tasks and affecting system performance.

[0006] According to an aspect of the embodiments of the present application, a method for determining resource allocation strategy is provided, comprising: obtaining business information of a computing task, wherein the business information includes the business type and resource requirement of the computing task; determining a target historical task matched with the computing task from a plurality of historical tasks matched with the business type; determining an initial resource allocation strategy of the computing task according to a historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy is used at least to indicate the priority of resource allocation; determining a target resource pool meeting the resource requirement from a plurality of sub-resource pools, and adjusting the initial resource allocation strategy according to the target resource pool to obtain a target resource allocation strategy, wherein the sub-resource pool is a logical division unit of computing resources.

[0007] In some embodiments of the present application, the initial resource allocation strategy of the computing task is determined according to the historical resource allocation strategy corresponding to the target historical task, comprising: obtaining a first resource scheduling model corresponding to the historical resource allocation strategy, wherein the historical resource allocation strategy is determined by the first resource scheduling model; comparing the similarity between the target historical task and the computing task with a similarity threshold to obtain a first comparison result; determining an adjustment mode of the resource scheduling model according to the comparison result to obtain a second resource scheduling model after adjustment, wherein the second resource scheduling model is used to determine the initial resource allocation strategy according to the business information.

[0008] In some embodiments of the present application, the adjustment mode of the resource scheduling model is determined according to the comparison result to obtain the second resource scheduling model after adjustment, comprising: in the case that the first comparison result indicates that the similarity is greater than the first similarity threshold, adjusting the classifier of the first resource scheduling model to obtain a third resource scheduling model, wherein the adjustment of the classifier is used to match the output demand of the computing task; in the case that the first comparison result indicates that the similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold, adjusting the full connection layer of the first resource scheduling model to obtain a fourth resource scheduling model, wherein the adjustment of the full connection layer is used to match the combination mode of the input features corresponding to the business information.

[0009] In some embodiments of the present application, further comprising: in the case that the first comparison result indicates that the similarity is less than the third similarity threshold, determining a preset number of historical tasks as a meta-training set, initializing a fifth resource scheduling model using a meta-learning framework, and training the fifth resource scheduling model using the meta-training set to obtain the fifth resource scheduling model after training.

[0010] In some embodiments of the present application, the initial resource allocation strategy is adjusted according to the target resource pool to obtain a target resource allocation strategy, comprising: obtaining state information of the target resource pool, wherein the state information is used to reflect the resource usage of the sub-resource pool; determining a difference value between the state information and the resource demand, wherein the difference value is used to quantitatively represent the matching degree between the target resource pool and the computing task; comparing the difference value with a preset difference value to obtain a second comparison result; in the case that the second comparison result satisfies a first preset condition, adjusting the initial resource allocation strategy to obtain the target resource allocation strategy, wherein the adjustment includes adjusting the resource allocation priority in the initial resource allocation strategy.

[0011] In some embodiments of the present application, the sub-resource pool is determined by: obtaining design parameters of a resource pool corresponding to the computing resources, wherein the design parameters include the number of sub-resource pools, the resource type and resource capacity of each sub-resource pool; dividing the computing resources into multiple sub-resource pools according to the design parameters; wherein after the multiple sub-resource pools are divided, the method further comprises: determining a scheduling agent corresponding to each sub-resource pool, wherein the scheduling agent is used to manage the resource allocation of the sub-resource pool, and the scheduling agent is associated with at least one computing node; determining a state space, an action space and a reward function corresponding to the scheduling agent, wherein the state space is used to reflect the resource usage and task demand information of the sub-resource pool, the action space is used to reflect the resource allocation and task management operations performed by the scheduling agent, and the reward function is used to train the scheduling agent.

[0012] In some embodiments of the present application, further comprising: predicting the predicted resource demand of the system in a preset time period by using a prediction model; determining a load balancing degree index corresponding to the predicted resource demand, wherein the load balancing degree index is used to quantitatively represent the balance degree of the computing resource allocation of the system; comparing the load balancing degree index with a load threshold to obtain a third comparison result; in the case that the third comparison result indicates that the load balancing degree index is less than the load threshold, re-dividing the sub-resource pools of the system.

[0013] In some embodiments of the present application, the multiple sub-resource pools include: a first sub-resource pool and a second sub-resource pool, and the first sub-resource pool and the second sub-resource pool share part of the shared resources, wherein the first sub-resource pool and the second sub-resource pool are any two sub-resource pools logically adjacent to each other; the method further comprises: in the case that the resource usage of the first sub-resource pool and the resource usage of the second sub-resource pool both satisfy a second preset condition, obtaining a first borrowing request of the first sub-resource pool and a second borrowing request of the second sub-resource pool, wherein the borrowing request is used to request the use right of part of the shared resources, and the borrowing request includes a borrowed resource amount; determining the use right of the shared resources according to the first borrowing request and the second borrowing request.

[0014] According to a further aspect of the embodiments of the present application, a device for determining a resource allocation strategy is also provided, comprising: an obtaining module configured to obtain service information of a computing task, wherein the service information comprises a service type and resource requirements of the computing task; a matching module configured to determine a target historical task matched with the computing task from a plurality of historical tasks matched with the service type; a determining module configured to determine an initial resource allocation strategy of the computing task according to a historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy is used at least to indicate a priority of resource allocation; and an adjusting module configured to determine a target resource pool meeting the resource requirements from a plurality of sub-resource pools, and adjust the initial resource allocation strategy according to the target resource pool to obtain a target resource allocation strategy, wherein the sub-resource pool is a logical division unit of computing resources.

[0015] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising: a memory and a processor, the memory is configured to store program instructions; the processor is connected with the memory and is configured to execute the above-mentioned method for determining a resource allocation strategy.

[0016] According to a further aspect of the embodiments of the present application, a non-volatile storage medium is also provided, comprising a stored computer program, wherein a device in which the non-volatile storage medium is located executes the above-mentioned method for determining a resource allocation strategy by running the computer program.

[0017] According to a further aspect of the embodiments of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the above-mentioned method for determining a resource allocation strategy.

[0018] In the embodiments of the present application, by comprehensively evaluating the service information of the computing task to match the most relevant historical task instance, and by learning from the historical resource allocation strategy to establish the initial resource allocation scheme of the computing task, and by screening the target resource pool meeting the specific resource requirements of the computing task from the plurality of pre-defined sub-resource pools, and by adjusting the initial resource allocation strategy based on the actual situation of the target resource pool, the purpose of precisely allocating resources to meet the requirements of different service types is achieved, thereby realizing the technical effects of dynamic resource allocation and rapid task response, and further solving the technical problem that the related art mostly uses static or semi-static resource allocation strategy, resulting in uneven resource allocation when processing inference tasks, and affecting system performance. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are included to provide a further understanding of the present application, form a part of the present application and illustrate the illustrative embodiments of the present application and the explanation of the present application, and do not constitute improper limitations on the present application. In the drawings:

[0020] Figure 1is a hardware structure block diagram of a computer terminal according to an embodiment of the resource allocation strategy determination method of the application;

[0021] Figure 2 is a flow chart of a resource allocation strategy determination method according to an embodiment of the application;

[0022] Figure 3 is a structural schematic diagram of a resource allocation strategy determination device according to an embodiment of the application. DETAILED DESCRIPTION

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

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0025] In order to better understand the embodiments of the application, the technical terms involved in the embodiments of the application are explained as follows:

[0026] Computing task: Computing task refers to a specific workload that requires processor, memory, storage or network resources to complete, such as AI inference task. In the embodiments of the application, the characteristics (business type, resource demand and priority) of the computing task are important basis for the scheduling center to make resource allocation and optimization strategy.

[0027] Transfer learning is a machine learning method that allows a model to leverage knowledge gained from previous tasks on new tasks, thereby accelerating the learning process. In this embodiment, transfer learning is used to accelerate adaptation to new tasks. By evaluating task feature similarity, a suitable historical model is selected for fine-tuning or feature layer transfer, significantly shortening the cold-start task completion time.

[0028] In the current technological context, the rapid growth and complexity of AI inference services have posed new challenges to the management of computing resources and bandwidth. AI applications, especially those involving real-time data processing, such as video analytics and facial recognition, have highly dynamic and uncertain demands on computing resources and network bandwidth. These applications typically need to process large amounts of data in a very short time, thus placing stringent requirements on the rapid allocation and optimization of resources.

[0029] The resource management methods employed in related technologies mostly adopt static or semi-static resource allocation strategies. While this approach may be effective enough when dealing with static loads, it often falls short when handling the dynamic changes in AI inference tasks. This leads to problems such as uneven resource allocation, resource waste, performance bottlenecks, and deficiencies in data security and compliance. For example, uneven resource allocation may affect system performance when handling critical tasks due to insufficient resources, while resource waste may lead to unnecessary cost expenditures when the system load is low.

[0030] Furthermore, resource management solutions for related technologies often lack flexibility and real-time performance monitoring and optimization. These systems lack advanced optimization algorithms and real-time monitoring mechanisms, and cannot effectively predict and respond to rapid changes in demand, resulting in deficiencies in user experience and operational efficiency.

[0031] To address the aforementioned technical problems, this application provides corresponding solutions, which are detailed below.

[0032] The resource allocation strategy determination method provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a method for determining resource allocation strategies is shown. Figure 1As shown, the computer terminal 10 can include one or more processors (processors can include, but are not limited to, processing devices such as microprocessors MCU or programmable logic devices FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected through wired and / or wireless networks. In addition, it can also include a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or fewer components than those shown in Figure 1 or have a different configuration than that shown in Figure 1 .

[0033] It should be noted that the one or more processors and / or other data processing circuits described above can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements incorporated into the computer terminal 10 in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor to control (for example, selection of a variable resistance terminal path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the resource allocation strategy determination method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the resource allocation strategy determination method described above. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed with respect to the processor, which can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission module 106 is configured to receive or send data via a network. The network can include, for example, a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC) that can connect to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module that is configured to communicate with the Internet wirelessly.

[0036] The display can be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10.

[0037] It is noted that in some alternative embodiments, the above-mentioned Figure 1 The computer terminal can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, one or more of the functions described above can be implemented by software stored in memory or stored as computer readable instructions on a computer readable medium such as a compact disc, a disk, or a hard drive. When software is involved, such software can be implemented with a general purpose computer or a special purpose computer. Both these options can also be implemented as a firmware, microcode, or either or both of them can implement radio-frequency identification (RFID) tags or devices, or other circuitry. Figure 1 is merely one example of a particular implementation and is intended to illustrate the types of components that can be present in the computer terminal described above.

[0038] In the above-described operating environment, the embodiments of the present application provide a method for determining a resource allocation strategy. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0039] Figure 2 is a flowchart of a method for determining a resource allocation strategy according to an embodiment of the present application, as shown in Figure 2 The method includes the following steps:

[0040] In step S202, the service information of the computing task is obtained, wherein the service information includes the service type and resource requirement of the computing task.

[0041] In step S202, the service information refers to various data and attributes related to the computing task, including but not limited to the service type, resource requirement, task priority, etc. The service type defines the nature of the task, such as image recognition, natural language processing, etc. The resource requirement refers to the amount of computing resources required for task execution, including CPU, GPU, memory, and network bandwidth, etc. The task priority is determined according to the importance and timeliness of the service, and is used as a basis for decision-making by the scheduling center when resources are scarce.

[0042] It should be noted that the business type defines the essential characteristics of the computing task, and different types of businesses may have different needs and preferences for resources, for example, image processing tasks may prefer GPU resources, while text analysis tasks may require higher CPU and memory requirements, and resource requirements include the minimum resources required to perform computing tasks, which are the main reference for the scheduling center to determine the amount of resource allocation.

[0043] In some embodiments of the present application, the scheduling center can obtain the business information of the computing task by analyzing the task instructions or calling the metadata interface, for example, when receiving a video analysis task, the scheduling center can automatically read the metadata of the task, including the resolution, frame rate, encoding format, etc. of the video, to infer the required CPU and GPU resources of the task. In addition, the scheduling center can use a classification algorithm (such as support vector machine, random forest, etc.) to identify the business type of the computing task, and then call the preset resource demand model to predict the specific resource demand of the task, for example, if the task is determined to be voice recognition by the classifier, then the CPU and memory requirements of this task can be predicted according to the statistical data of similar historical tasks.

[0044] Step S204, determining a target historical task matching the computing task from a plurality of historical tasks matching the business type.

[0045] In the above step S204, the historical task refers to a computing task that has been executed in the past, including but not limited to the result of the task, the amount of resources consumed, the execution time and the priority of the task, etc. The target historical task is the most similar task selected from the historical task database under the guidance of the business type of the current computing task, and its resource allocation strategy and execution can be used as a reference for the current task resource allocation decision, thereby speeding up the decision-making process and improving the accuracy of resource allocation.

[0046] In some embodiments of the present application, the graph convolutional network (GCN) can be used for feature extraction of the computational graph of the AI model, and the operator type, tensor dimension, etc. of the new task and the historical task are compared. The characteristics of the new task are converted into vector form, and the cosine similarity is calculated with the vector of the historical task, and the historical task with the highest similarity is selected as the target historical task.

[0047] It should be noted that an AI model refers to a mathematical model containing algorithms and parameters used in performing specific artificial intelligence computational tasks. Computational tasks, especially those involving AI inference, training, and prediction, are not simple one-time operations, but rather complex processes that require processing data according to a specific algorithmic framework and structure. The AI ​​model is the core of this process, composed of various operators (such as convolution, fully connected layers, and activation functions). These operators transform the input data to achieve specific AI functions, such as image classification, speech recognition, and natural language processing. In some embodiments of this application, the computational task is the AI ​​inference task, which can apply a pre-trained AI model. For example, the model can be used to classify new image data or perform sentiment analysis on a piece of text. The execution of the AI ​​inference task depends on the structure and parameters of the AI ​​model, and the computation graph is a visual representation of the model structure.

[0048] Specifically, the target historical task can be determined through the following steps:

[0049] (1) Data preparation: Constructing a computational graph.

[0050] Step 1.1: Obtain the computation graph of the new computation task AI model, including all the operators of the model (such as convolution, pooling, activation functions, etc.) and the connections between them.

[0051] Step 1.2: For each historical task, construct the computation graph of its AI model to ensure that all comparison objects are represented in a uniform graph structure.

[0052] Step 1.3: Normalize the computation graph, including but not limited to encoding operator types and normalizing tensor dimensions, to ensure the consistency and comparability of feature vectors.

[0053] (2) Feature extraction, for example, can be achieved using Graph Convolutional Networks (GCNs), specifically:

[0054] Step 2.1: Design and train the GCN model. It should be noted that GCN is a neural network that can process graph-structured data. It learns the feature representations of nodes (i.e., operators) by performing convolution operations on the graph.

[0055] Step 2.2: Input the normalized computation graph constructed in Step 1 into the GCN model. The model learns the feature vector of each operator through graph convolutional layers. The feature vector can contain information such as the type of operator, execution frequency, and dependencies, depending on the structure of the model and the training objective.

[0056] Step 2.3: Extract the global feature representation of each computational graph, for example, it can be achieved by the output of the last few layers in the GCN model, or by graph aggregation operations (such as average, maximum, attention mechanism, etc.), to obtain a fixed-length vector representing the entire AI model's computational graph features.

[0057] (3) Similarity calculation, for example, cosine similarity can be used, specifically:

[0058] Step 3.1: Calculate the cosine similarity between the new task AI model computational graph feature vector and each historical task AI model computational graph feature vector. Cosine similarity measures the directional similarity between two vectors, and is not affected by their magnitudes.

[0059] Step 3.2: Compare the similarity scores of all historical tasks, and select the task with the highest score as the "target historical task", which means that the target historical task and the new task have the most similar computational graphs in terms of operator types, tensor dimensions, etc.

[0060] (4) Resource allocation strategy borrowing and adjustment.

[0061] Step 4.1: Based on the resource allocation strategy of the target historical task, determine the initial resource allocation scheme for the new task, including but not limited to the type and quantity of computing resources (such as CPU, GPU), memory allocation, network bandwidth reservation, etc.

[0062] Step 4.2: Fine-tune the initial resource allocation scheme according to the specific needs of the new task, such as data volume, expected processing time, etc., to more accurately match the resource needs of the new task.

[0063] Through the above steps, the scheduling center not only can quickly and accurately identify the most similar historical task to the new task, but also can fine-tune the resource allocation strategy based on the historical task's resource allocation strategy, combined with the characteristics of the new task, to more efficiently allocate resources and avoid resource waste.

[0064] Step S206, determining the initial resource allocation strategy of the computing task according to the historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy at least indicates the priority of resource allocation.

[0065] In the above step S206, the historical resource allocation strategy refers to the specific resource allocation plan adopted by the target historical task during execution, including but not limited to the allocation amount and priority of computing resources (CPU, GPU), memory, network bandwidth, etc.

[0066] In some embodiments of the present application, the scheduling center can analyze the priority of resource allocation in the historical resource allocation strategy of the target historical task, for example, if the target historical task considers GPU resources as the highest priority when executing, the scheduling center can also give GPU resources the highest priority in the initial resource allocation strategy of the current computing task, ensuring that critical operators such as convolution layers can be executed quickly. In addition, the scheduling center can also formulate an initial resource allocation strategy for the current computing task according to the proportion of resource usage of the target historical task during execution, for example, if the CPU usage of the target historical task accounts for 30% of the total resources and the GPU usage accounts for 60% within a certain period of time, then the scheduling center will allocate CPU and GPU resources to the new task in a similar proportion according to the total amount of current resources.

[0067] In order to improve the accuracy and adaptability of the resource allocation strategy, the initial resource allocation strategy of the computing task can be determined by the following method: obtaining a first resource scheduling model corresponding to a historical resource allocation strategy, wherein the historical resource allocation strategy is determined by the first resource scheduling model; comparing the similarity between the target historical task and the computing task with a similarity threshold to obtain a first comparison result; determining an adjustment mode of the resource scheduling model according to the comparison result to obtain an adjusted second resource scheduling model, wherein the second resource scheduling model is used to determine the initial resource allocation strategy according to the business information.

[0068] Specifically, the first resource scheduling model is an algorithm model used by the scheduling center to determine the historical resource allocation strategy, for example, the model can be based on machine learning (such as using neural networks to predict resource demand), or based on rules (such as setting fixed resource allocation proportions according to task type and priority).

[0069] In some embodiments of the present application, historical task scheduling models stored in the resource optimization engine can be loaded, which are obtained through multiple executions and optimizations and can reflect the best resource allocation practices for specific types of tasks. For the target historical task, the scheduling center can call the corresponding model. By comparing the similarity with the similarity threshold, when the similarity is high, the parameters and configurations of the first resource scheduling model can be directly used as the basis of the second resource scheduling model, or only some details (such as classifiers) of the first resource scheduling model are slightly adjusted; when the similarity is low, the first resource scheduling model of the target historical task can be taken as the starting point, additional learning mechanisms (such as transfer learning) can be introduced, and the specific attributes (such as data volume, input / output characteristics) of the current computing task and the real-time resource pool state (such as resource utilization, network delay) can be combined to deeply adjust the parameters and logic of the first resource scheduling model, forming the second resource scheduling model.

[0070] To reduce the cold start time of new tasks, the adjustment method of the resource scheduling model can be determined in the following manner to obtain an adjusted second resource scheduling model: in the case where the first comparison result indicates that the similarity is greater than the first similarity threshold, adjusting the classifier of the first resource scheduling model to obtain a third resource scheduling model, wherein the adjustment of the classifier is used to match the output requirements of the computing task; in the case where the first comparison result indicates that the similarity is less than or equal to the first similarity threshold and the similarity is greater than the second similarity threshold, adjusting the fully connected layer of the first resource scheduling model to obtain a fourth resource scheduling model, wherein the adjustment of the fully connected layer is used to match the combination mode of the input features corresponding to the business information.

[0071] Specifically, the first similarity threshold is used to determine whether the similarity of the current task and the target historical task is high enough to directly reuse or fine-tune the classifier of the first resource scheduling model, and the second similarity threshold is lower than the first similarity threshold and is used to determine whether the similarity of the current task and the target historical task is sufficient to adjust the fully connected layer.

[0072] (1) In the case where the similarity is greater than the first similarity threshold, the classifier is adjusted: that is, using transfer learning, the weights of the feature extraction layer in the first resource scheduling model are retained, and only the weights of the last layer of the classifier are adjusted to match the output requirements of the current computing task. For example, if the target historical task is image classification, and the current computing task involves image recognition and positioning, the classifier is adjusted to adapt to more complex target output requirements.

[0073] (2) In the case where the similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold, the fully connected layer is adjusted: that is, applying online learning, freezing the bottom feature extraction of the first resource scheduling model, and only adjusting the weights of the fully connected layer to better match the input feature combination mode corresponding to the business information. For example, if the input features of the current computing task have subtle differences from the target historical task, such as dataset size, type, distribution, etc., the fully connected layer parameters are fine-tuned to compensate for these differences.

[0074] In some embodiments of the present application, the first resource scheduling model can include input layer, hidden layer (including convolutional layer, fully connected layer), classifier (output layer) and other main components, wherein:

[0075] (1) Input layer: receiving multiple types of input data, including characteristics of the computing task (such as task type, required resource type), historical task data (such as historical resource usage, task completion time), system resource state (such as real-time CPU, GPU utilization, memory usage, network bandwidth usage) and the like.

[0076] (2) Hidden layer: containing convolutional layer for feature extraction and fully connected layer for feature combination.

[0077] Convolutional layer: used to process the spatial structure information in the input data, such as the topological relationship of operators in the computational graph of the task, to capture the demand characteristics of the task for specific hardware resources (such as GPU).

[0078] Fully connected layer: maps the high-dimensional features extracted by the convolutional layer to a lower-dimensional space for further feature combination and abstraction, to learn the interaction and demand priority between different types of resources.

[0079] (3) Classifier (output layer): based on the output of the hidden layer, the classifier predicts the resource allocation strategy for each computing task, which may include resource type (CPU, GPU, RAM, network bandwidth), resource quantity, resource priority, etc. For example, the structure of the classifier can be several output nodes, each node representing the allocation amount or priority of a resource type.

[0080] On this basis, the adjustment of the classifier is mainly to adapt to the output demand changes of the computing task. In the case of high similarity, that is, when the new task is very close to the historical task in terms of resource demand, it is assumed that the input features (such as task type, data volume) have been well learned and abstracted by the model. The focus of adjustment can be placed on the classifier for fine-tuning the predicted resource allocation amount or resource priority to more accurately match the specific needs of the new task. In some embodiments of the present application, only the weights of the classifier can be adjusted, while the input and hidden layers are frozen, which is equivalent to fine-tuning the final result output based on the learning achievements of the historical tasks, so that it is more in line with the characteristics of the new task.

[0081] The adjustment of the fully connected layer is more aimed at the combination of input features. In the case of medium similarity, that is, the new task has some similarity to the historical task, but the specific input features of the task (such as changes in data type and data volume) differ. At this time, by adjusting the fully connected layer, the model can better understand these differences and make more reasonable resource combination predictions. In some embodiments of the present application, the weights of the fully connected layer can be updated while keeping the input layer and the convolutional layer unchanged. This update involves more data and computing resources, as it requires the model to relearn the association between input features and resource demand patterns. However, compared to training the entire model from scratch, adjusting the fully connected layer is still an efficient model adaptation method.

[0082] In some embodiments of the present application, the following steps can also be performed: in the case where the first comparison result indicates that the similarity is less than the third similarity threshold, determining a preset number of historical tasks as a meta-training set, initializing a fifth resource scheduling model using a meta-learning framework, and training the fifth resource scheduling model using the meta-training set to obtain the fifth resource scheduling model after training is completed.

[0083] The third similarity threshold is a threshold lower than the second similarity threshold, and when the similarity between the computing task and the historical task is lower than the threshold, it indicates that the difference between the tasks is large and cannot be simply handled by transferring learning or fine-tuning the existing model.

[0084] It should be noted that the meta-learning framework such as MAML (Model-Agnostic Meta-Learning) is a learning framework that enables the model to quickly adapt to new tasks. In some embodiments of the present application, the meta-learning framework is used to initialize and train the fifth resource scheduling model (i.e., the second resource scheduling model), so that it can quickly learn and adjust the resource scheduling strategy based on a small number of samples even when facing new computing tasks with large differences from historical tasks.

[0085] Specifically, the fifth resource scheduling model can be obtained by the following steps:

[0086] (1) Determine the meta-training set: For example, by calculating the cosine similarity between the feature vector of the computing task and the historical task set, the lowest similarity of a preset number (such as 20) of historical tasks is selected as the meta-training set. When the new computing task has large differences from the historical tasks, the meta-training set can provide task samples covering a wide range of differences for the model, so that the model can face diversified input features during the training phase.

[0087] (2) Initialize the fifth resource scheduling model using the meta-learning framework: For example, use the MAML framework to initialize the fifth resource scheduling model. During the training process, the model uses the tasks in the meta-training set for fast adaptation learning, that is, the model can quickly find the optimal solution based on a small amount of data for each task (such as only 5 samples for each task) through gradient descent.

[0088] After the model is initialized, the fifth resource scheduling model can be iteratively trained, and each training cycle includes a fast adaptation phase and a slow adaptation phase. In the fast adaptation phase, the model will update the gradient based on a small amount of data for each historical task; in the slow adaptation phase, the model will average the updated gradients of all historical tasks in the meta-training set to update the global model parameters, ensuring that the model can quickly adjust the strategy when facing new tasks.

[0089] By using the MAML framework, the problem of long training time and large resource consumption of traditional models is solved, especially when dealing with new tasks that have large differences in characteristics from historical tasks. Among them, the selection of meta-training set and the training process of the model aim to enable the model to quickly learn new tasks and new environments, improve the flexibility and efficiency of resource scheduling, and shorten the task cold start time.

[0090] In step S208, the target resource pool that meets the resource requirement is determined from the multiple sub-resource pools, and the initial resource allocation strategy is adjusted according to the target resource pool to obtain the target resource allocation strategy, wherein the sub-resource pool is a logical division unit of computing resources.

[0091] In the above step S208, the initial resource allocation strategy is a preliminary resource allocation scheme formulated according to the characteristics of the computing task (such as task type, data volume, resource demand prediction) and historical resource scheduling strategy, the sub-resource pool is a logical division unit of computing resources, by dividing the whole resource pool into multiple sub-pools, each sub-pool can independently manage a specific group of computing resources and bandwidth to support different types and scales of computing tasks, and the target resource pool is one or more sub-resource pools selected from multiple sub-resource pools that can meet the specific resource requirements of the current computing task.

[0092] In some embodiments of the present application, the optimal resource pool combination can be predicted by analyzing the resource requirements and priorities of the computing task and the real-time state of each sub-resource pool (such as resource utilization, task queue length, bandwidth occupation, etc.), using a graph neural network (GNN) algorithm. For example, if the computing task requires a large amount of GPU resources, the scheduling center will give priority to sub-resource pools with low GPU resource utilization and short task queues. In addition, the scheduling center can also consider the physical connection bandwidth and delay between sub-resource pools to ensure that the target resource pool not only matches in resource demand, but also can provide low-delay communication in network topology.

[0093] After determining the target resource pool, the scheduling center can dynamically adjust the resource amount and priority in the initial resource allocation strategy based on the current resource state and historical resource usage of the target resource pool. For example, if the GPU resource utilization in the target resource pool is higher than the average value, the scheduling center can increase the GPU resources allocated to this resource pool to meet the high performance requirements of the computing task. In some embodiments of the present application, considering that the target resource pool can share resources and cooperate with other sub-resource pools, the scheduling center can also adjust the rules and strategies of cross-pool resource borrowing, such as allowing temporary borrowing of resources under certain conditions.

[0094] In some embodiments of the present application, the sub-resource pool can be determined by: obtaining design parameters of a resource pool corresponding to the computing resources, wherein the design parameters include the number of sub-resource pools, the resource type and resource capacity of each sub-resource pool; and dividing the computing resources into multiple sub-resource pools according to the design parameters.

[0095] After the multiple sub-resource pools are divided, the following steps can also be performed: determining a scheduling agent corresponding to each sub-resource pool, wherein the scheduling agent is used to manage the resource allocation of the sub-resource pool, and the scheduling agent is associated with at least one computing node; determining a state space, an action space and a reward function corresponding to the scheduling agent, wherein the state space is used to reflect the resource usage and task demand information of the sub-resource pool, the action space is used to reflect the resource allocation and task management operations performed by the scheduling agent, and the reward function is used to train the scheduling agent.

[0096] Specifically, the design parameters include but are not limited to the number of sub-resource pools, the resource type (such as CPU, GPU, storage, network bandwidth) and resource capacity (such as CPU core number, GPU number, storage space size, bandwidth size) of each sub-resource pool. The design parameters are customized according to the overall resource capacity and business demand of the system, and are used to guide the scheduling center how to divide the computing resources.

[0097] In order to avoid uneven allocation and waste of resources, the number, resource type and resource capacity of the sub-resource pool can be dynamically adjusted according to the analysis of the overall resource capacity, historical task data and business demand of the system. For example, when the number of real-time video analysis tasks (the highest demand for first resources) in the system surges, the scheduling center can increase the number of GPU resource (first resource) pools to meet the high demand of video processing for GPU resources.

[0098] After obtaining the design parameters, the scheduling center can use a graph neural network (GNN) algorithm to dynamically adjust the division of the sub-resource pool in combination with the physical topology structure (such as the connection method and bandwidth between servers) and real-time load of the computing resources, to ensure that each sub-resource pool can effectively manage tasks according to its resource type and capacity.

[0099] It should be noted that the scheduling agent is an intelligent agent equipped for each sub-resource pool, responsible for managing resource allocation and task scheduling within the sub-resource pool. Through interaction with the scheduling center, the scheduling agent adjusts the resource allocation strategy according to real-time load and task demand, ensuring effective utilization of resources and timely completion of tasks. The state space reflects the real-time resource usage and information of unfinished tasks of the sub-resource pool, the action space defines the resource allocation and task management operations that the scheduling agent can take, and the reward function quantitatively evaluates each step of the scheduling agent's decision-making according to resource utilization, task completion time, and resource conflict, to guide its learning process.

[0100] In some embodiments of the present application, the scheduling center allocates independent scheduling agents for each sub-resource pool, which can be, for example, deep neural network-based agents trained using multi-agent reinforcement learning (MARL) algorithms. For example, the scheduling agent allocated by the scheduling center for the GPU resource pool will be responsible for the allocation and scheduling of GPU resources. The state space, action space, and reward function corresponding to the scheduling agent are determined, including:

[0101] (1) The state space includes but is not limited to real-time resource utilization, task queue depth, and task priority distribution of the sub-resource pool;

[0102] (2) The action space includes but is not limited to the amount of resources allocated to the task, adjusting the task priority, and rejecting low-priority tasks;

[0103] (3) The reward function is designed based on resource utilization, task completion time, and resource conflict frequency, for example, when the resource utilization is above 80% and the task completion time is below the average, the reward function gives positive reinforcement to the scheduling agent, otherwise, it gives punishment.

[0104] In some embodiments of the present application, the reward function can be:

[0105]

[0106] where R is the reward value, representing the comprehensive evaluation result of the agent's behavior; U is the resource utilization, defined as the proportion of used resources in the total resources in the sub-resource pool, with a value range of 0 < U < 1; T is the task completion time, in seconds, with a value range of T > 0; C is the resource conflict frequency, used to record the number of conflicts between the agent and other agents during resource allocation, with a value range of C > 0; α, β, γ are weight parameters, used to adjust the relative influence of resource utilization, task completion time, and resource conflict on the reward.

[0107] It should be noted that the reward function converts multiple key effects of the agent behavior (such as resource utilization, task completion time, and resource conflict frequency) into a numerical value, i.e., the reward value R, so that the agent can understand the comprehensive effect of its decision through numerical feedback and promote it to learn a better resource allocation strategy. Moreover, by assigning different weights (α, β, γ) to resource utilization U, the inverse of task completion time 1 / T, and resource conflict frequency C, respectively, the scheduling center can guide the agent to improve resource utilization and speed up task completion while reducing resource conflicts, achieving comprehensive optimization of system performance and resource management.

[0108] In the scenario of AI inference services, the resources that the scheduling center needs to manage include computing resources (such as CPU and GPU) and bandwidth resources, while the tasks cover different types of AI inference such as image recognition and speech-to-text. When allocating resources, the agent (scheduling agent) needs to balance the goals of resource utilization, task response speed, and avoiding resource conflicts.

[0109] For example, assume that at a certain time, the sub-resource pool managed by agent A is in a high-load state, while the sub-resource pool managed by agent B is lightly loaded. At this time, if agent A simply pursues high resource utilization (α is large) when allocating resources, it may lead to an increase in resource conflicts with agent B (C increases), thereby reducing the reward value R. Conversely, if agent A takes into account the resource state of agent B and reasonably allocates tasks through intelligent collaboration mechanisms (such as resource borrowing protocols), although the resource utilization may not reach the maximum (α affects), it can significantly reduce the number of resource conflicts (γ has less impact), while speeding up the completion time of the task (β is large), ultimately improving the reward value R. This strategy helps to build a system that is resource-efficient, fast in task response, and low in conflict rate, improving user satisfaction with AI services and overall system performance.

[0110] To ensure that the resource allocation strategy is highly matched with the current resource pool state, the initial resource allocation strategy can be adjusted in the following manner: obtaining state information of the target resource pool, wherein the state information is used to reflect the resource usage of the sub-resource pool; determining a difference value between the state information and the resource demand, wherein the difference value is used to quantitatively represent the matching degree of the target resource pool and the computing task; comparing the difference value with a preset difference value to obtain a second comparison result; and adjusting the initial resource allocation strategy to obtain a target resource allocation strategy under the condition that the second comparison result satisfies a first preset condition, wherein the adjustment includes adjusting the resource allocation priority in the initial resource allocation strategy.

[0111] Specifically, the state information is used to reflect the real-time resource usage of the target resource pool, including but not limited to the current resource utilization, task queue length, bandwidth occupation, etc., and the difference value is used to quantitatively represent the gap between the state information of the target resource pool and the resource demand of the computing task, so as to determine whether the resource allocation strategy needs to be adjusted, and the direction and degree of adjustment.

[0112] In some embodiments of the present application, the scheduling center compares the calculated difference value with the preset difference value (i.e. threshold value), if the difference value is less than the preset difference value, it indicates that the current resource allocation strategy basically meets the task demand; on the contrary, if the difference value is greater than or equal to the preset difference value, it indicates that the resource allocation strategy needs to be further optimized to better meet the task demand.

[0113] Suppose the scheduling center is managing a resource system containing CPU pool, GPU pool and storage pool, where the GPU pool is the target resource pool, mainly responsible for processing computing tasks of image recognition and video analysis, at present, there is a high-priority real-time video analysis task (task A) and several medium-low-priority image recognition tasks (tasks B, C, D) in the system, at this time, the target resource allocation strategy can be obtained by the following steps:

[0114] (1) Obtain the state information of the target resource pool: the scheduling center monitors the resource usage of the GPU pool in real time, including GPU utilization, current task queue length, bandwidth occupation rate, etc.

[0115] (2) Determine the difference value between the state information and the resource demand: calculate the gap between the resource demand of task A and the current available resource of GPU pool, suppose task A needs to occupy 50% of the computing power of GPU pool, while the current GPU availability is 60%, then the difference value is 10%.

[0116] (3) Compare the second comparison result with the preset condition: compare the difference value with the preset difference value threshold, if the preset difference value threshold is 20% (i.e. the amount of resources reserved to avoid excessive resource tension), the difference value 10% does not reach the threshold, triggering the adjustment of resource allocation strategy.

[0117] (4) Adjust the resource allocation priority: since the second comparison result meets the adjustment condition (such as the difference value does not reach the preset threshold), the scheduling center starts to adjust the initial resource allocation strategy, especially focusing on the priority of resource allocation, in order to speed up the execution of task A, the scheduling center decides to raise the resource allocation priority of task A from the initial "high" to "highest", and temporarily reduce the resource allocation priority of tasks B, C, D to "medium".

[0118] (5) Implement the adjusted strategy: the scheduling center allocates more GPU resources to task A, while limiting the use of GPU resources by tasks B, C, and D, to shorten the completion time of task A.

[0119] The scheduling center solves the problem of insufficient resources for real-time high-priority tasks by adjusting the resource allocation priority, ensuring fast response and efficient execution of critical tasks.

[0120] To improve the balance of resource allocation and reduce resource conflict rates, the following steps can be taken: use a prediction model to predict the predicted resource demand of the system within a preset time period; determine a load balancing degree index corresponding to the predicted resource demand, wherein the load balancing degree index is used to quantify the balance of the system's computing resource allocation; compare the load balancing degree index with the load threshold to obtain a third comparison result; and in the case where the third comparison result indicates that the load balancing degree index is less than the load threshold, re-divide the sub-resource pools of the system.

[0121] In some embodiments of the present application, a graph neural network (GNN) can be used in combination with historical resource usage data and current business trends to predict the demand for each type of resource (such as GPU, CPU, bandwidth, etc.) within a certain period of time in the future (for example, the next 1 hour), for example, the model can predict future resource demand based on the amount of video analysis tasks at the same time point in the past week. Then, calculate the difference between the predicted resource demand and the resource capacity under the current sub-resource pool division strategy, for example, measure this difference by variance, standard deviation or other statistical indicators, and obtain the load balancing degree index. According to the results of the prediction model and the current load balancing degree index, the scheduling center uses a dynamic graph neural network (DGNN) to re-divide (specifically, refer to the above-mentioned embodiments of sub-resource pool division) or optimize the division of sub-resource pools, for example, it can increase the number of sub-resource pools with abundant GPU resources, or adjust the resource allocation ratio between sub-resource pools, to adapt to the predicted resource demand and improve the load balancing degree index.

[0122] By dynamically re-dividing the sub-resource pools, the scheduling center can actively optimize resource allocation, improve the response speed and processing capacity of the system, especially during periods of high resource demand, effectively dispersing the load and preventing local resource bottlenecks.

[0123] The plurality of sub-resource pools comprise a first sub-resource pool and a second sub-resource pool, and the first sub-resource pool and the second sub-resource pool share part of the shared resources. The first sub-resource pool and the second sub-resource pool are any two sub-resource pools that are logically adjacent. When the resource usage of the first sub-resource pool and the resource usage of the second sub-resource pool both satisfy a second preset condition, a first borrowing request of the first sub-resource pool and a second borrowing request of the second sub-resource pool are obtained. The borrowing request is used to request the use right of part of the shared resources, and the borrowing request includes a borrowed resource amount. The use right of the shared resources is determined according to the first borrowing request and the second borrowing request.

[0124] In some embodiments of the present application, the boundaries of the sub-resource pools are allowed to overlap by a preset proportion (such as 10%-20%) of resources (i.e., part of the shared resources), and the scheduling center continuously monitors the real-time resource usage of each sub-resource pool, such as resource utilization, task queue depth, etc. When the resource usage of the first sub-resource pool and the second sub-resource pool both reach the second preset condition (for example, the resource utilization exceeds 85% and the task queue length exceeds a preset threshold), the scheduling center can receive the borrowing request of the shared resources sent by the scheduling agent of the two sub-resource pools, and the request can include information such as the borrowed resource type (such as GPU), the resource amount (for example, 10% of the borrowed GPU resources), and the borrowing time.

[0125] After receiving the borrowing requests of the first sub-resource pool and the second sub-resource pool, the scheduling center determines the use right of the shared resources according to the resource amount, the priority, and the availability of the current shared resources in the request, using an auction mechanism or a priority-based allocation strategy. For example, the scheduling center can set an auction of the use right of the resources every 5 seconds, and the sub-resource pool with a high priority has a higher weight in the auction, thereby obtaining the opportunity to preferentially meet its resource demand.

[0126] It should be noted that when only one of the sub-resource pools requests to borrow part of the shared resources within a preset time period, the scheduling center can directly determine the use right to the sub-resource pool.

[0127] Through the above steps S202 to S208, by using intelligent analysis, the business information of the computing task is matched with the most relevant historical task instance through comprehensive evaluation, and the initial resource allocation scheme of the computing task is established by referring to the historical resource allocation strategy. The target resource pool that meets the specific resource demand of the computing task is selected from the plurality of pre-defined sub-resource pools, and the initial resource allocation strategy is adjusted based on the actual situation of the target resource pool. The purpose of accurately allocating resources to meet the demand of different business types is achieved, thereby realizing the technical effects of dynamic resource allocation and fast task response, and solving the technical problem that the related art mainly uses static or semi-static resource allocation strategy, resulting in uneven resource allocation when processing inference tasks and affecting system performance.

[0128] Figure 3 is a structural diagram of a resource allocation strategy determination apparatus according to an embodiment of the present application, as shown in the figure, the apparatus comprises: Figure 3 The acquisition module 302 is configured to acquire service information of the computing task, wherein the service information comprises a service type and resource requirements of the computing task.

[0129] The matching module 304 is configured to determine a target historical task matched with the computing task from a plurality of historical tasks matched with the service type.

[0130] The determination module 306 is configured to determine an initial resource allocation strategy of the computing task according to a historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy is used at least to indicate a priority of resource allocation.

[0131] The adjustment module 308 is configured to determine a target resource pool meeting the resource requirements from a plurality of sub-resource pools, and adjust the initial resource allocation strategy according to the target resource pool to obtain a target resource allocation strategy, wherein the sub-resource pool is a logical division unit of computing resources.

[0132] It should be noted that,

[0133] The resource allocation strategy determination apparatus shown in the figure is used to execute the resource allocation strategy determination method shown in the figure, and therefore Figure 3 The related explanations and descriptions in the resource allocation strategy determination method in Figure 2 are also applicable to the resource allocation strategy determination apparatus shown in the figure, which will not be described here again. Figure 2 Figure 3 The embodiments of the present application further provide an electronic device, which comprises a memory and a processor, wherein the memory is used to store program instructions; the processor is connected with the memory and is used to execute the steps of the resource allocation strategy determination method in the embodiments of the present application.

[0134] The embodiments of the present application further provide a non-volatile storage medium, which comprises a stored computer program, wherein the device where the non-volatile storage medium is located executes the steps of the resource allocation strategy determination method in the embodiments of the present application by running the computer program.

[0135] The embodiments of the present application further provide a computer program product, which comprises computer instructions, and the computer instructions are executed by a processor to realize the steps of the resource allocation strategy determination method in the embodiments of the present application.

[0136] The embodiments of the present application further provide a computer program product, which comprises computer instructions, and the computer instructions are executed by a processor to realize the steps of the resource allocation strategy determination method in the embodiments of the present application.

[0137] ​The embodiment of the present application further provides a computer program, which, when executed by a processor, implements steps of the method for determining a resource allocation strategy in each embodiment of the present application.

[0138] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.

[0139] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0140] In the several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only illustrative. For example, the division of units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0141] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0142] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0143] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0144] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A method for determining a resource allocation strategy, characterized in that, The method comprises: obtaining service information of a computing task, wherein the service information comprises a service type and resource requirements of the computing task; determining a target historical task matching the computing task from a plurality of historical tasks matching the service type; determining an initial resource allocation strategy of the computing task according to a historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy is used at least to indicate a priority of resource allocation; determining a target resource pool meeting the resource requirements from a plurality of sub-resource pools, and adjusting the initial resource allocation strategy according to the target resource pool to obtain a target resource allocation strategy, wherein the sub-resource pool is a logical division unit of computing resources.

2. The method of claim 1, wherein, The method further comprises: obtaining a first resource scheduling model corresponding to the historical resource allocation strategy, wherein the historical resource allocation strategy is determined by the first resource scheduling model; comparing a similarity between the target historical task and the computing task with a similarity threshold to obtain a first comparison result; determining an adjustment mode of the resource scheduling model according to the comparison result to obtain an adjusted second resource scheduling model, wherein the second resource scheduling model is used to determine the initial resource allocation strategy according to the service information.

3. The method of claim 2, wherein, The method further comprises: in a case where the first comparison result indicates that the similarity is greater than a first similarity threshold, adjusting a classifier of the first resource scheduling model to obtain a third resource scheduling model, wherein the adjustment of the classifier is used to match an output requirement of the computing task; in a case where the first comparison result indicates that the similarity is less than or equal to the first similarity threshold and greater than a second similarity threshold, adjusting a fully connected layer of the first resource scheduling model to obtain a fourth resource scheduling model, wherein the adjustment of the fully connected layer is used to match a combination mode of input features corresponding to the service information.

4. The method of claim 2, wherein, The method further comprises: in a case where the first comparison result indicates that the similarity is less than a third similarity threshold, determining a preset number of historical tasks as a meta-training set, initializing a fifth resource scheduling model using a meta-learning framework, training the fifth resource scheduling model using the meta-training set, and obtaining a fifth resource scheduling model after training is completed.

5. The method of claim 1, wherein, The method further comprises: obtaining state information of the target resource pool, wherein the state information is used to reflect a resource usage of the sub-resource pool; determining a difference value between the state information and the resource requirements, wherein the difference value is used to quantitatively represent a matching degree between the target resource pool and the computing task; comparing the difference value with a preset difference value to obtain a second comparison result; In a case where the second comparison result meets a first preset condition, the initial resource allocation strategy is adjusted to obtain the target resource allocation strategy, and the adjustment includes adjusting a resource allocation priority in the initial resource allocation strategy.

6. The method of claim 1, wherein, The sub-resource pool is determined by: obtaining design parameters of a resource pool corresponding to the computing resource, wherein the design parameters include a number of the sub-resource pools, a resource type of each of the sub-resource pools, and a resource capacity; and dividing the computing resource into a plurality of sub-resource pools according to the design parameters. After the plurality of sub-resource pools are divided, the method further includes: determining a scheduling agent corresponding to each of the sub-resource pools, wherein the scheduling agent is used to manage resource allocation of the sub-resource pool, and the scheduling agent is associated with at least one computing node; and determining a state space, an action space, and a reward function corresponding to the scheduling agent, wherein the state space is used to reflect resource usage and task demand information of the sub-resource pool, the action space is used to reflect resource allocation and task management operations performed by the scheduling agent, and the reward function is used to train the scheduling agent. The method further includes:

7. The method of claim 6, wherein, predicting a predicted resource demand of a system in a preset time period by using a prediction model; determining a load balancing degree index corresponding to the predicted resource demand, wherein the load balancing degree index is used to quantitatively represent a balancing degree of computing resource allocation of the system; comparing the load balancing degree index with a load threshold to obtain a third comparison result; in a case where the third comparison result indicates that the load balancing degree index is less than the load threshold, re-dividing sub-resource pools of the system. The plurality of sub-resource pools include a first sub-resource pool and a second sub-resource pool, and the first sub-resource pool and the second sub-resource pool share part of shared resources, wherein the first sub-resource pool and the second sub-resource pool are any two sub-resource pools that are logically adjacent.

8. The method of claim 1, wherein, The method further includes: in a case where resource usage of the first sub-resource pool and resource usage of the second sub-resource pool both meet a second preset condition, obtaining a first borrowing request of the first sub-resource pool and a second borrowing request of the second sub-resource pool, wherein the borrowing request is used to request a usage right of the part of shared resources, and the borrowing request includes a borrowed resource amount; determining the usage right of the shared resources according to the first borrowing request and the second borrowing request. The method includes:

9. A device for determining a resource allocation strategy, characterized in that an obtaining module configured to obtain business information of a computing task, wherein the business information includes a business type and a resource demand of the computing task; a matching module configured to determine a target historical task matched with the computing task from a plurality of historical tasks matched with the business type; a determining module configured to determine an initial resource allocation strategy of the computing task according to a historical resource allocation strategy corresponding to the target historical task, wherein the historical resource allocation strategy is used to at least indicate a priority of resource allocation. ​ An adjusting module is configured to determine a target resource pool satisfying the resource requirement from a plurality of sub-resource pools, and adjust the initial resource allocation strategy according to the target resource pool to obtain a target resource allocation strategy, wherein the sub-resource pool is a logical division unit of the computing resource.

10. An electronic device, comprising: The method comprises the following steps: A memory and a processor, the memory is used for storing program instructions; the processor is connected with the memory, and is used for executing the method for determining the resource allocation strategy according to any one of claims 1 to 8.

11. A non-volatile storage medium, comprising: The non-volatile storage medium comprises a stored computer program, wherein the device where the non-volatile storage medium is located executes the method for determining the resource allocation strategy according to any one of claims 1 to 8 by running the computer program.

12. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the method for determining the resource allocation strategy according to any one of claims 1 to 8.

Citation Information

Cited By

  • Enterprise multi-dimensional commercial index analysis data resource optimization method, medium and equipment

    CN121279891A

  • GPU resource management method and system of design simulation platform based on AI drive

    CN121807574A

  • A GPU resource management method and system based on an AI-driven design simulation platform

    CN121807574B

  • Task scheduling method and device and electronic equipment

    CN122220117A