Resource allocation method and device, equipment, storage medium and product

By using the target linear planning algorithm in the computing power network to determine the resource requirements, the problem that resource allocation cannot meet the service-level agreement is solved, and the optimal utilization of resources and efficient execution of computing tasks are achieved.

CN118964036APending Publication Date: 2024-11-15SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411148937.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing resource allocation method cannot achieve optimal resource utilization while meeting the requirements of service-level agreements, resulting in inefficient computing power networks when computing task allocation.

Method used

The target linear planning algorithm is used to determine the target demand of the dominant resource based on the task type and service level agreement, and when the preset demand of the demand and non-dominant resource does not exceed the remaining resources of the computing power network, resource allocation is carried out. .

Benefits of technology

The optimal utilization of computing power network resources is realized, ensuring that computing tasks are successfully executed while meeting the requirements of service-level agreements, and improving resource utilization efficiency and adaptability and stability of computing power networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964036A_ABST
    Figure CN118964036A_ABST
Patent Text Reader

Abstract

The invention discloses a resource allocation method and device, equipment, a storage medium and a product. The method is applied to a computing power network and comprises the steps that task information of a target computing task is acquired, and the task information comprises a task type, a preset demand quantity of basic resources and a service level protocol; wherein the basic resources comprise dominant resources and non-dominant resources; based on the preset demand quantity of the dominant resources and a service level protocol, determining a target demand quantity of the dominant resources by using a target linear programming algorithm, the target linear programming algorithm being determined based on the task type; and when the target demand quantity of the dominant resources and the preset demand quantity of the non-dominant resources do not exceed the residual resource quantity in the computing power network, allocating resources to the target computing task. And the requirements of a service level protocol of the target computing task are fully considered, and optimal utilization of computing power network resources is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computing power network technology, and in particular, to a resource allocation method, device, equipment, storage medium and product. Background Art

[0002] With the technological innovations of the Internet, big data, cloud computing, artificial intelligence, blockchain, etc., the development of the digital economy has been accelerated. The development of the data economy will promote the generation of massive data. Data processing requires powerful computing power and widely covered network connections coordinated by cloud, edge, and end. The computing network is a new type of information infrastructure that allocates and flexibly schedules computing resources, storage resources, and network resources between cloud, edge, and end according to business needs. The essence of the computing network is a computing resource service. In the future, corporate customers or individual users will not only need networks and clouds, but also need to flexibly schedule computing tasks to appropriate places. The core value of the network is to improve efficiency. The telephone network improves the efficiency of human communication, and the Internet improves the efficiency of human collaborative work. The emergence of the computing network is to improve the collaborative work efficiency of cloud, edge, and end computing. The difference is that traditional networks serve humans directly, while computing networks serve intelligent machines directly and indirectly serve humans through intelligent machines. The computing network builds an interconnected network between massive data, efficient computing power, and ubiquitous intelligence, bringing intelligence to everyone, every family, and every organization.

[0003] However, the existing resource allocation method has the problem of being unable to achieve optimal utilization of resources while meeting the requirements of the Service Level Agreement (SLA). Summary of the invention

[0004] The present invention provides a resource allocation method, device, equipment, storage medium and product to solve the problem that some resource allocation methods cannot achieve optimal utilization of resources while meeting the requirements of a service level agreement.

[0005] According to one aspect of the present invention, a resource allocation method is provided, which is applied to a computing power network, and the method includes:

[0006] Acquire task information of the target computing task, the task information including task type, preset demand of basic resources and service level agreement; wherein the basic resources include dominant resources and non-dominant resources;

[0007] Based on the preset demand of the dominant resource and the service level agreement, a target demand of the dominant resource is determined by using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type;

[0008] When the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network, resources are allocated to the target computing task.

[0009] According to another aspect of the present invention, a resource allocation device is provided, which is applied to a computing power network, and the device includes:

[0010] An information acquisition module, used to acquire task information of a target computing task, wherein the task information includes a task type, a preset demand for basic resources, and a service level agreement; wherein the basic resources include dominant resources and non-dominant resources;

[0011] A demand determination module, configured to determine a target demand of the dominant resource based on a preset demand of the dominant resource and the service level agreement using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type;

[0012] A resource allocation module is used to allocate resources to the target computing task when the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network.

[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the resource allocation method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the resource allocation method described in any embodiment of the present invention when executed.

[0018] The technical solution provided by the embodiment of the present invention is applied to a computing power network, and the method includes: obtaining task information of a target computing task, wherein the task information includes a task type, a preset demand for basic resources, and a service level agreement; wherein the basic resources include dominant resources and non-dominant resources; based on the preset demand for the dominant resources and the service level agreement, using a target linear programming algorithm, determining the target demand for the dominant resources, wherein the target linear programming algorithm is determined based on the task type; when the target demand for the dominant resources and the preset demand for the non-dominant resources do not exceed the remaining resources in the computing power network, allocating resources to the target computing task. Through the above technical solution, based on the preset demand for the dominant resources and the service level agreement of the target computing task, using a target linear programming algorithm, determining the target demand for the dominant resources, fully considering the requirements of the service level agreement of the target computing task, and then when the target demand for the dominant resources and the preset demand for the non-dominant resources do not exceed the remaining resources in the computing power network, allocating resources to the target computing task, thereby achieving optimal utilization of computing power network resources.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flow chart of a resource allocation method provided in Embodiment 1 of the present invention;

[0022] Figure 2 is a flow chart of a resource allocation method provided by Embodiment 2 of the present invention;

[0023] Figure 3 is a structural diagram of a resource allocation device provided in Embodiment 3 of the present invention;

[0024] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

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

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

[0027] Embodiment 1

[0028] Figure 1 This is a flow chart of a resource allocation method provided in the first embodiment of the present invention. This embodiment is applicable to the case of resource allocation for computing tasks. The method can be executed by a resource allocation device. The resource allocation device can be implemented in the form of hardware and / or software. The resource allocation device can be configured in an electronic device, and the electronic device is applied to a computing network. Figure 1 As shown, the method includes:

[0029] S110. Obtain task information of the target computing task, wherein the task information includes task type, preset demand quantity of basic resources, and service level agreement; wherein the basic resources include dominant resources and non-dominant resources.

[0030] In this embodiment, a computing task can be understood as a series of computing operations or data processing tasks that need to be performed by resources in the computing network. For example, the computing task can be graphics rendering, data analysis, or scientific computing. The target computing task can be understood as a computing task that currently requires resource allocation. Task information includes task type, preset demand for basic resources, and service level agreement.

[0031] Among them, the basic resources can be understood as the resources required for the target computing task when it is executed. These basic resources may include but are not limited to central processing unit (CPU) resources, graphics processing unit (GPU) resources, artificial intelligence (AI) chip resources, field programmable gate array (FPGA) resources, memory resources, disk resources and network bandwidth resources. According to the degree of demand for basic resources during the execution of the target computing task, the basic resources can be divided into dominant resources and non-dominant resources. The dominant resource can be understood as the most critical resource for the smooth execution of the target computing task. For example, the dominant resource can be a CPU dominant resource, a GPU dominant resource or an AI chip dominant resource. Non-dominant resources include other basic resources required for the target computing task in addition to the dominant resource. The preset demand for basic resources includes the preset demand for each resource. The task type can be understood as the type of computing task determined based on the dominant resource. For example, when the dominant resource is a CPU dominant resource, the task type is a CPU type; when the dominant resource is a GPU dominant resource, the task type is a GPU type.

[0032] A service level agreement can be understood as an agreement or contract between a service provider and its customers on the quality, level, and performance of the service. The content of a service level agreement may include but is not limited to the following:

[0033]

[0034]

[0035]

[0036] Specifically, the task information of the target computing task input by the user is obtained, and the task information includes the task type, the preset demand of basic resources and the service level agreement. The task information can be represented in a structured text format such as JSON (JavaScript Object Notation) or XML (Extensible Markup Language).

[0037] S120. Based on the preset demand of the dominant resource and the service level agreement, determine the target demand of the dominant resource using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type.

[0038] In this embodiment, the target linear programming algorithm can be understood as a pre-set algorithm for calculating the target demand of the dominant resource of the target computing task. The target linear programming algorithm is determined based on the task type.

[0039] Specifically, since the preset demand for the dominant resource of the target computing task may not meet the requirements for the dominant resource in the service level agreement, the target linear programming algorithm is first determined according to the task type of the target computing task. Then, the target demand for the dominant resource of the target computing task is calculated using the target linear programming algorithm by combining the preset demand for the dominant resource and the requirements for the dominant resource in the service level agreement. The target demand is used as the basis for resource allocation to ensure that the target computing task can be smoothly executed under the established service level and cost-effectiveness.

[0040] S130. When the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network, allocate resources to the target computing task.

[0041] In this embodiment, the resources in the computing network include but are not limited to CPU, GPU, AI chip (such as tensor processing unit TPU or neural network processing unit NPU), FPGA, memory, disk and network bandwidth. The remaining resources in the computing network can include the remaining resources of each resource type. As shown in the following table:

[0042]

[0043] Specifically, each resource in the computing power network is monitored and the remaining resource amount of each resource is calculated in advance. Then, it is determined whether the target demand of the dominant resource and the preset demand of each resource in the non-dominant resource do not exceed the remaining resource amount of the corresponding resource in the computing power network. If so, resources can be allocated to the target computing task according to the target demand of the dominant resource and the preset demand of each resource in the non-dominant resource.

[0044] Optionally, if the target demand for the dominant resource and the preset demand for each of the non-dominant resources have any one resource demand that exceeds the remaining resource amount of the corresponding resource in the computing power network, it means that the computing power network cannot normally execute the target computing task at this time, so no resources are allocated for the target computing task. The target computing task will enter a waiting state for resource allocation. In the waiting state, when some computing tasks in the computing power network are completed and some resources are released, the target demand for the dominant resource and the preset demand for the non-dominant resource are recalculated to see whether they do not exceed the remaining resources in the computing power network. If so, resources can be allocated normally for the target computing task.

[0045] The technical solution provided in the first embodiment of the present invention is applied to a computing power network, and the method includes: obtaining task information of a target computing task, wherein the task information includes a task type, a preset demand for basic resources, and a service level agreement; wherein the basic resources include dominant resources and non-dominant resources; based on the preset demand for the dominant resources and the service level agreement, using a target linear programming algorithm, determining the target demand for the dominant resources, wherein the target linear programming algorithm is determined based on the task type; when the target demand for the dominant resources and the preset demand for the non-dominant resources do not exceed the remaining resources in the computing power network, allocating resources to the target computing task. Through the above technical solution, based on the preset demand for the dominant resources and the service level agreement of the target computing task, using a target linear programming algorithm, determining the target demand for the dominant resources, fully considering the requirements of the service level agreement of the target computing task, and then when the target demand for the dominant resources and the preset demand for the non-dominant resources do not exceed the remaining resources in the computing power network, allocating resources to the target computing task, thereby achieving optimal utilization of computing power network resources.

[0046] In some embodiments, the target linear programming algorithm includes an objective function and resource constraints, wherein the objective function is determined based on a proportional-integral-differential control algorithm, the objective function is used to minimize resource usage costs, and the resource constraints are used to ensure that the sum of the amount of resources allocated to the computing tasks currently running in the computing network and the amount of resources to be allocated to the target computing tasks does not exceed the total amount of resources in the computing network. Through the above technical solution, the resource utilization efficiency is effectively improved, and the adaptability and stability of the computing network in the face of dynamic changes are enhanced, providing strong support for the efficient operation and scientific management of the computing network.

[0047] In this embodiment, the proportional-integral-differential control algorithm is a very important component of the control system. It combines the three control strategies of proportional (P), integral (I) and differential (D) to achieve precise control of the controlled object. The objective function is to minimize resource usage. The amount of resources allocated to the computing tasks running in the computing power network includes the amount of resources of each resource allocated to the computing tasks running in the computing power network. The amount of resources to be allocated to the target computing task includes the amount of resources of each resource to be allocated to the target computing task. The total amount of resources of the computing power network includes the total amount of resources of each resource in the computing power network.

[0048] The linear programming algorithm includes an objective function and resource constraints. Different computing tasks of different task types construct different objective functions, and thus different linear programming algorithms are obtained. Therefore, it is necessary to pre-set the corresponding linear programming algorithms according to different task types. Then, the linear programming algorithm determined according to the task type of the target computing task is used as the target linear programming algorithm.

[0049] Optionally, when constructing the objective function, it is necessary to first determine the task type of the computing task, and then consider the preset demand for the dominant resource of the computing task and the provisions in the service level agreement, and determine it in conjunction with the proportional-integral-derivative control algorithm.

[0050] For example, a computing task of central processing unit type is used as an example to explain the construction of a linear programming algorithm. Taking into account the preset demand for CPU in the computing task and the provisions of the service level agreement for CPU, the proportional-integral-differential control algorithm is combined to determine the objective function:

[0051]

[0052] Among them, cpu_i represents the amount of cpu resources allocated to computing task i, cpu_min_i represents the preset demand for the dominant resource cpu, and K cpu_p is a linear coefficient, e1(t) represents the parameters in the service level agreement regarding the CPU that have a greater impact on the computing task, such as computing speed. cpu_i is the integral coefficient, ∫e1(t)dt represents the error integral of a time period, K cpu_d is the differential coefficient, The derivative of the error represents the speed at which the error changes.

[0053] After the objective function is determined, resource constraints are added to the objective function, and then the linear programming algorithm for the computing task of the central processing unit type is determined based on the objective function and the resource constraints.

[0054] Similarly, the linear programming algorithm for GPU-based computing tasks can be determined as follows:

[0055]

[0056] Among them, gpu_i represents the amount of gpu resources allocated to computing task i, gpu_min_i represents the preset demand for the dominant resource gpu, and K gpu_p is a linear coefficient, and e2(t) represents the parameters of the GPU in the service level agreement that have a greater impact on the computing task, such as computing speed. gpu_i is the integral coefficient, ∫e2(t)dt represents the error integral of a time period, K gpu_dis the differential coefficient, The derivative of the error represents the speed at which the error changes.

[0057] By analogy, we can obtain linear programming algorithms corresponding to computing tasks of different task types.

[0058] In some embodiments, the task type is a central processing unit type, a graphics processor type, an artificial intelligence chip type, a field programmable gate array type, a memory type, a disk type, or a network bandwidth type. Through the above technical solution, various types of computing tasks are comprehensively considered, laying a solid foundation for further improving the allocation capacity of the computing network.

[0059] Specifically, considering that the dominant resources are generally any one of the resources such as central processing unit, image processor, artificial intelligence chip, field programmable gate array, memory, disk and network bandwidth, the corresponding task type can be one of the types such as central processing unit, image processor, artificial intelligence chip, field programmable gate array, memory, disk and network bandwidth.

[0060] Embodiment 2

[0061] Figure 2 is a flow chart of a resource allocation method provided in Embodiment 2 of the present invention. This embodiment is optimized and extended based on the above optional embodiments. Optionally, the resource allocation method further includes: obtaining the actual running result of the target computing task; optimizing the target linear programming algorithm based on the service level agreement and the actual running result. Figure 2 As shown, the method includes:

[0062] S210. Obtain task information of the target computing task, wherein the task information includes task type, preset demand quantity of basic resources, and service level agreement; wherein the basic resources include dominant resources and non-dominant resources.

[0063] S220. Based on the preset demand of the dominant resource and the service level agreement, determine the target demand of the dominant resource using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type.

[0064] S230: When the target demand for the dominant resource and the preset demand for the non-dominant resource do not exceed the remaining resources in the computing power network, allocate resources to the target computing task.

[0065] S240: Obtain the actual running result of the target computing task.

[0066] In this embodiment, the actual operation result may include the completion time of the target computing task and the usage rate of each allocated resource, such as CPU usage rate, GPU usage rate, and memory usage rate.

[0067] Specifically, the time required for the target computing task to be completed from the start of execution to the completion of execution is calculated, and the usage rate of each resource allocated to the target computing task is obtained through a monitoring tool.

[0068] S250: Optimize the target linear programming algorithm based on the service level agreement and the actual operation result.

[0069] Specifically, a preset neural network is used to extract the specified value of the resource corresponding to the actual operation result in the service level agreement, and based on the specified value and the actual operation result, the target linear programming algorithm is optimized under the condition that the preset conditions are met. The preset conditions can be set according to the actual situation.

[0070] The technical solution provided in the second embodiment of the present invention obtains the actual operation results of the target computing task, and optimizes the target linear programming algorithm through the actual operation results and the service level agreement, which not only improves the execution efficiency and accuracy of the algorithm, but also ensures that the service always meets the SLA requirements, and realizes the flexible matching and continuous optimization between algorithm performance and business needs.

[0071] In some embodiments, the actual operation result includes the actual completion time and the actual utilization rate of the dominant resource; the service level agreement includes the preset completion time and the preset utilization rate of the dominant resource; the optimization of the target linear programming algorithm based on the service level agreement and the actual operation result includes: determining the ratio of the actual completion time and the actual utilization rate of the dominant resource as a first ratio; determining the ratio of the preset completion time and the preset utilization rate of the dominant resource in the service level agreement as a second ratio; optimizing the target linear programming algorithm based on the first ratio and the second ratio. Through the above technical solution, the optimization of the target linear programming algorithm is achieved, and the adaptability and flexibility of the computing power network allocation are enhanced, thereby optimizing the task completion time and cost-effectiveness while ensuring the service quality.

[0072] Specifically, the actual completion time of the target computing task from the start of execution to the completion of execution is calculated, and the actual utilization rate of the dominant resources of the target computing task is monitored by a monitoring tool, and the actual completion time is divided by the actual utilization rate of the dominant resources to obtain a first ratio; the preset completion time of the target computing task and the preset utilization rate of the dominant resources are extracted from the service level agreement through a preset neural network, and the preset completion time is divided by the preset utilization rate of the dominant resources to obtain a second ratio; and then, when the first ratio and the second ratio meet the preset conditions, the target linear programming algorithm is optimized.

[0073] In some embodiments, the target linear programming algorithm is optimized based on the first ratio and the second ratio, including: when the first ratio is greater than the second ratio, the target linear programming algorithm is optimized using a genetic algorithm in an artificial intelligence model. Through the above technical solution, the optimization of the target linear programming algorithm is achieved, effectively enhancing the adaptability and flexibility of computing power network allocation.

[0074] Specifically, when the first ratio is greater than the second ratio, it is determined that the preset condition is met, and at this time, the target linear programming algorithm is optimized using the genetic algorithm in the artificial intelligence model. It is worth noting that the optimization of the target linear programming algorithm is mainly to optimize the coefficients in the objective function.

[0075] Optionally, when the first ratio is less than or equal to the second ratio, the preset condition is not met, and at this time, the target linear programming algorithm is not optimized.

[0076] Embodiment 3

[0077] Figure 3 Schematic diagram of a resource allocation device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0078] An information acquisition module 31 is used to acquire task information of a target computing task, wherein the task information includes a task type, a preset demand amount of basic resources, and a service level agreement; wherein the basic resources include dominant resources and non-dominant resources;

[0079] A demand determination module 32, configured to determine a target demand of the dominant resource based on the preset demand of the dominant resource and the service level agreement using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type;

[0080] The resource allocation module 33 is used to allocate resources to the target computing task when the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network.

[0081] The technical solution provided in the third embodiment of the present invention fully considers the requirements of the service level agreement of the target computing task and realizes the optimal utilization of computing power network resources.

[0082] Optionally, the target linear programming algorithm includes an objective function and resource constraints, wherein the objective function is determined based on a proportional-integral-derivative control algorithm, the objective function is used to minimize resource usage costs, and the resource constraints are used to ensure that the sum of the amount of resources allocated to the computing tasks running in the computing power network and the amount of resources to be allocated to the target computing tasks does not exceed the total amount of resources of the computing power network.

[0083] Optionally, the resource allocation device further includes:

[0084] A result acquisition module, used to obtain the actual running result of the target computing task;

[0085] An algorithm optimization module is used to optimize the target linear programming algorithm based on the service level agreement and the actual operation result.

[0086] Optionally, the actual operation result includes the actual completion time and the actual utilization rate of the dominant resource; the service level agreement includes the preset completion time and the preset utilization rate of the dominant resource;

[0087] Optionally, the algorithm optimization module includes:

[0088] A first determining unit, configured to determine a ratio of the actual completion time to the actual utilization rate of the dominant resource as a first ratio;

[0089] A second determining unit, configured to determine a ratio of a preset completion time in a service level agreement to a preset utilization rate of a dominant resource as a second ratio;

[0090] An algorithm optimization unit is used to optimize the target linear programming algorithm based on the first ratio and the second ratio.

[0091] Optionally, an algorithm optimization unit is specifically used to optimize the target linear programming algorithm using a genetic algorithm in an artificial intelligence model when the first ratio is greater than the second ratio.

[0092] Optionally, the task type is a central processing unit type, a graphics processor type, an artificial intelligence chip type, a field programmable gate array type, a memory type, a disk type, or a network bandwidth type.

[0093] The resource allocation device provided in the embodiment of the present invention can execute the resource allocation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0094] Embodiment 4

[0095] Figure 4 : is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device may be an electronic device intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0096] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0097] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0098] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a resource allocation method.

[0099] In some embodiments, the resource allocation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the resource allocation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the resource allocation method in any other appropriate manner (e.g., by means of firmware).

[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0101] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0102] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0103] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0104] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0105] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A resource allocation method, characterized in that: Applied in a computing power network, the method includes: Acquire task information of the target computing task, the task information including task type, preset demand of basic resources and service level agreement; wherein the basic resources include dominant resources and non-dominant resources; Based on the preset demand of the dominant resource and the service level agreement, a target demand of the dominant resource is determined by using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type; When the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network, resources are allocated to the target computing task.

2. The method according to claim 1, characterized in that The target linear programming algorithm includes an objective function and resource constraints, wherein the objective function is determined based on a proportional-integral-derivative control algorithm, the objective function is used to minimize resource usage costs, and the resource constraints are used to ensure that the sum of the amount of resources allocated to the computing tasks running in the computing power network and the amount of resources to be allocated to the target computing tasks does not exceed the total amount of resources in the computing power network.

3. The method according to claim 2, characterized in that Also includes: Obtaining the actual running result of the target computing task; Based on the service level agreement and the actual operation result, the target linear programming algorithm is optimized.

4. The method according to claim 3, characterized in that The actual operation results include the actual completion time and the actual utilization rate of the dominant resources; the service level agreement includes the preset completion time and the preset utilization rate of the dominant resources; The optimizing the target linear programming algorithm based on the service level agreement and the actual operation result includes: The ratio of the actual completion time to the actual utilization rate of the dominant resource is determined as a first ratio; Determine the ratio of the preset completion time in the service level agreement to the preset utilization rate of the dominant resource as the second ratio; The target linear programming algorithm is optimized based on the first ratio and the second ratio.

5. The method according to claim 4, characterized in that The optimizing the target linear programming algorithm based on the first ratio and the second ratio includes: When the first ratio is greater than the second ratio, the target linear programming algorithm is optimized using a genetic algorithm in an artificial intelligence model.

6. The method according to claim 1, characterized in that The task type is a central processing unit type, an image processor type, an artificial intelligence chip type, a field programmable gate array type, a memory type, a disk type or a network bandwidth type.

7. A resource allocation device, characterized in that: Applied in a computing power network, the device comprises: An information acquisition module, used to acquire task information of a target computing task, wherein the task information includes a task type, a preset demand amount of basic resources, and a service level agreement; wherein the basic resources include dominant resources and non-dominant resources; A demand determination module, configured to determine a target demand of the dominant resource based on a preset demand of the dominant resource and the service level agreement using a target linear programming algorithm, wherein the target linear programming algorithm is determined based on the task type; A resource allocation module is used to allocate resources to the target computing task when the target demand of the dominant resource and the preset demand of the non-dominant resource do not exceed the remaining resources in the computing power network.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the resource allocation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the resource allocation method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the resource allocation method according to any one of claims 1 to 6.