Movatterモバイル変換


[0]ホーム

URL:


CN117724840A - Distribution method and device of computing tasks, storage medium and electronic equipment - Google Patents

Distribution method and device of computing tasks, storage medium and electronic equipment
Download PDF

Info

Publication number
CN117724840A
CN117724840ACN202311745244.8ACN202311745244ACN117724840ACN 117724840 ACN117724840 ACN 117724840ACN 202311745244 ACN202311745244 ACN 202311745244ACN 117724840 ACN117724840 ACN 117724840A
Authority
CN
China
Prior art keywords
computing
target
task
information
allocation strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311745244.8A
Other languages
Chinese (zh)
Inventor
王维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Bestpay Co Ltd
Original Assignee
China Telecom Bestpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Bestpay Co LtdfiledCriticalChina Telecom Bestpay Co Ltd
Priority to CN202311745244.8ApriorityCriticalpatent/CN117724840A/en
Publication of CN117724840ApublicationCriticalpatent/CN117724840A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention discloses a computing task distribution method, a computing task distribution device, a storage medium and electronic equipment. The method comprises the following steps: receiving a calculation task request sent by a terminal node, wherein the calculation task request at least comprises attribute information and task information of a calculation task; determining a target allocation strategy corresponding to the calculation task according to the attribute information, and determining calculation force demand information corresponding to the calculation task according to the task information; determining idle computing power resource information of each computing node through a target model, and determining a target computing node from a plurality of computing nodes according to computing power demand information and the idle computing power resource information; and distributing the computing tasks to the target computing nodes according to the target distribution strategy. The invention solves the technical problems of lower accuracy of calculation task allocation in the prior art by allocating the calculation tasks through manual experience.

Description

Translated fromChinese
计算任务的分配方法、装置、存储介质及电子设备Computing task allocation methods, devices, storage media and electronic equipment

技术领域Technical field

本发明涉及边缘计算技术领域,具体而言,涉及一种计算任务的分配方法、装置、存储介质及电子设备。The present invention relates to the technical field of edge computing, and specifically to a computing task allocation method, device, storage medium and electronic equipment.

背景技术Background technique

随着边缘用户数量的不断增长,多个用户将竞争有限的传输资源和计算资源,目前,现有技术中主要通过人工经验对计算任务进行分配,计算任务的分配准确性较低,而不合理的任务分配将会大大降低信道的质量,加大对计算资源的竞争,从而增大任务端到端时延,影响用户体验。As the number of edge users continues to grow, multiple users will compete for limited transmission resources and computing resources. Currently, computing tasks are mainly allocated through manual experience in the existing technology. The accuracy of the allocation of computing tasks is low and unreasonable. The task allocation will greatly reduce the quality of the channel and increase the competition for computing resources, thereby increasing the end-to-end delay of the task and affecting the user experience.

针对上述的问题,目前尚未提出有效的解决方案。In response to the above problems, no effective solution has yet been proposed.

发明内容Contents of the invention

本发明实施例提供了一种计算任务的分配方法、装置、存储介质及电子设备,以至少解决现有技术中通过人工经验对计算任务进行分配,存在计算任务分配准确性较低的技术问题。Embodiments of the present invention provide a method, device, storage medium, and electronic device for allocating computing tasks to at least solve the technical problem of low accuracy in allocating computing tasks through manual experience in the prior art.

根据本发明实施例的一个方面,提供了一种计算任务的分配方法,包括:接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;依据目标分配策略将计算任务分配至目标计算节点。According to an aspect of an embodiment of the present invention, a computing task allocation method is provided, including: receiving a computing task request sent by a terminal node, wherein the computing task request at least includes attribute information and task information of the computing task; based on the attribute information Determine the target allocation strategy corresponding to the computing task, and determine the computing power demand information corresponding to the computing task based on the task information, where the target allocation strategy is one of the following: the first allocation strategy, the second allocation strategy, and the allocation rule of the first allocation strategy Different from the allocation rules of the second allocation strategy, the computing power demand information represents the information of computing resources required to process computing tasks; the idle computing power resource information of each computing node is determined through the target model, and based on the computing power demand information and idle Computing resource information, determine the target computing node from multiple computing nodes; allocate computing tasks to the target computing node according to the target allocation strategy.

进一步地,依据属性信息确定计算任务对应的目标分配策略,包括:依据属性信息确定计算任务对应的目标网络场景,其中,目标网络场景为以下之一:第一网络场景、第二网络场景,第一网络场景下的用户数量小于第二网络场景下的用户数量;若目标网络场景为第一网络场景,则将第一分配策略作为目标分配策略;若目标网络场景为第二网络场景,则将第二分配策略作为目标分配策略。Further, determining a target allocation strategy corresponding to the computing task based on the attribute information includes: determining a target network scenario corresponding to the computing task based on the attribute information, where the target network scenario is one of the following: a first network scenario, a second network scenario, The number of users in one network scenario is less than the number of users in the second network scenario; if the target network scenario is the first network scenario, then the first allocation strategy is used as the target allocation strategy; if the target network scenario is the second network scenario, then The second allocation strategy serves as the target allocation strategy.

进一步地,通过目标模型确定每个计算节点的空闲算力资源信息,包括:获取每个计算节点的算力资源信息和每个计算节点的待计算的计算任务量,其中,算力资源信息至少包括逻辑运算资源的资源数据、并行计算资源的资源数据以及神经网络计算资源的资源数据;确定待计算的计算任务量对逻辑运算资源的需求信息、对并行计算资源的需求信息以及对神经网络计算资源的需求信息,得到待计算的计算任务量对应的算力需求信息;通过目标模型对待计算的计算任务量对应的算力需求信息和算力资源信息进行计算,得到每个计算节点的空闲算力资源信息。Further, determining the idle computing resource information of each computing node through the target model includes: obtaining the computing resource information of each computing node and the amount of computing tasks to be calculated for each computing node, wherein the computing resource information is at least Including resource data of logical computing resources, resource data of parallel computing resources, and resource data of neural network computing resources; determining the demand information for logical computing resources, demand information for parallel computing resources, and neural network computing for the amount of computing tasks to be calculated. The resource demand information is used to obtain the computing power demand information corresponding to the amount of computing tasks to be calculated; the computing power demand information and computing power resource information corresponding to the amount of computing tasks to be calculated are calculated through the target model, and the idle computing power of each computing node is obtained. human resources information.

进一步地,依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点,包括:依据算力需求信息和空闲算力资源信息,判断每个计算节点是否满足计算任务的算力需求,得到第一判断结果;依据第一判断结果,从多个计算节点中确定满足算力需求的计算节点,得到目标计算节点。Further, the target computing node is determined from multiple computing nodes based on the computing power demand information and the idle computing power resource information, including: judging whether each computing node meets the computing task requirements based on the computing power demand information and the idle computing power resource information. According to the computing power demand, the first judgment result is obtained; based on the first judgment result, the computing node that meets the computing power demand is determined from multiple computing nodes, and the target computing node is obtained.

进一步地,在目标分配策略为第一分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,其中,时延数据用于表征计算任务的传输时长,能耗数据用于表征计算任务的传输能耗;判断时延数据是否满足第一判定条件,得到第二判断结果,并判断能耗数据是否满足第二判定条件,得到第三判断结果,其中,第一判定条件用于确定时延数据是否小于预设时延阈值,第二判定条件用于确定能耗数据是否小于预设能耗阈值;若第二判断结果表征时延数据满足第一判定条件,且第三判断结果表征能耗数据满足第二判定条件,则将计算任务分配至目标计算节点。Further, when the target allocation strategy is the first allocation strategy, allocating the computing tasks to the target computing nodes according to the target allocation strategy includes: obtaining the delay data and energy consumption data of the computing tasks, wherein the delay data is used for Characterizes the transmission time of the computing task, and the energy consumption data is used to characterize the transmission energy consumption of the computing task; judge whether the delay data meets the first judgment condition, and obtain the second judgment result, and judge whether the energy consumption data satisfies the second judgment condition, and obtain The third judgment result, in which the first judgment condition is used to determine whether the delay data is less than the preset delay threshold, and the second judgment condition is used to determine whether the energy consumption data is less than the preset energy consumption threshold; if the second judgment result represents If the delay data satisfies the first determination condition, and the third determination result indicates that the energy consumption data satisfies the second determination condition, the computing task is assigned to the target computing node.

进一步地,在目标分配策略为第二分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,并获取目标计算节点的计算时延数据和计算能耗数据,其中,计算时延数据用于表征目标计算节点的计算时长,计算能耗数据用于表征目标计算节点的计算能耗;依据时延数据和计算时延数据进行计算,得到计算任务对应的总时延,并依据能耗数据和计算能耗数据进行计算,得到计算任务对应的总能耗;判断总时延和总能耗是否满足目标约束条件,得到第四判断结果,其中,目标约束条件用于表征总时延和总能耗之间的关联关系;若第四判断结果表征总时延和总能耗满足目标约束条件,则将计算任务分配至目标计算节点。Further, when the target allocation strategy is the second allocation strategy, allocating the computing tasks to the target computing nodes according to the target allocation strategy includes: obtaining the delay data and energy consumption data of the computing tasks, and obtaining the computing tasks of the target computing nodes. Latency data and computing energy consumption data, where the computing latency data is used to characterize the computing time of the target computing node, and the computing energy consumption data is used to characterize the computing energy consumption of the target computing node; based on the latency data and computing latency data Calculate, obtain the total delay corresponding to the computing task, and perform calculations based on the energy consumption data and computing energy consumption data to obtain the total energy consumption corresponding to the computing task; judge whether the total delay and total energy consumption meet the target constraints, and obtain the fourth Judgment result, in which the target constraint is used to represent the correlation between the total delay and total energy consumption; if the fourth judgment result represents that the total delay and total energy consumption meet the target constraint, then the computing task is assigned to the target calculation node.

进一步地,在依据目标分配策略将计算任务分配至目标计算节点之后,该方法还包括:接收目标计算节点返回的任务计算结果,并将任务计算结果发送至终端节点。Further, after allocating the computing task to the target computing node according to the target allocation policy, the method further includes: receiving the task calculation result returned by the target computing node, and sending the task calculation result to the terminal node.

根据本发明实施例的另一方面,还提供了一种计算任务的分配装置,包括:第一接收模块,用于接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;第一确定模块,用于依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;第二确定模块,用于通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;第一处理模块,用于依据目标分配策略将计算任务分配至目标计算节点。According to another aspect of the embodiment of the present invention, a device for allocating computing tasks is also provided, including: a first receiving module configured to receive a computing task request sent by a terminal node, wherein the computing task request at least includes the number of the computing task. Attribute information and task information; the first determination module is used to determine the target allocation strategy corresponding to the computing task based on the attribute information, and determine the computing power demand information corresponding to the computing task based on the task information, where the target allocation strategy is one of the following: A first allocation strategy and a second allocation strategy. The allocation rules of the first allocation strategy are different from the allocation rules of the second allocation strategy. The computing power demand information represents the information of the computing power resources required to process the computing task; the second determination module is used to Determine the idle computing resource information of each computing node through the target model, and determine the target computing node from multiple computing nodes based on the computing power demand information and idle computing resource information; the first processing module is used to allocate the strategy based on the target Allocate computing tasks to target computing nodes.

根据本发明实施例的另一方面,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,计算机程序被设置为运行时执行上述的计算任务的分配方法。According to another aspect of the embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the above computing task allocation method when running. .

根据本发明实施例的另一方面,还提供了一种电子设备,该电子设备包括一个或多个处理器;存储器,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行时,使得一个或多个处理器实现用于运行程序,其中,程序被设置为运行时执行上述的计算任务的分配方法。According to another aspect of the embodiment of the present invention, an electronic device is also provided. The electronic device includes one or more processors; a memory for storing one or more programs. When one or more programs are processed by one or more When the processors are executed, one or more processors are implemented to run the program, wherein the program is configured to execute the above computing task allocation method at runtime.

在本发明实施例中,采用接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;依据目标分配策略将计算任务分配至目标计算节点的方式,对于不同的网络场景采用不同的分配策略,并通过算力量化模型(即目标模型)确定节点的空闲算力,从而能够将计算任务分配给最优计算节点(即目标计算节点),提高了任务分配的准确性,从而提升了信道的质量,降低了对计算资源的竞争,达到了最小化端到端时延或者最低能量开销的目的,从而实现了提高任务分配的准确性的技术效果,进而解决了现有技术中通过人工经验对计算任务进行分配,存在计算任务分配准确性较低的技术问题。In the embodiment of the present invention, a computing task request sent by a terminal node is received, wherein the computing task request at least includes attribute information and task information of the computing task; the target allocation strategy corresponding to the computing task is determined based on the attribute information, and the target allocation strategy corresponding to the computing task is determined based on the task information. Determine the computing power demand information corresponding to the computing task, where the target allocation strategy is one of the following: a first allocation strategy, a second allocation strategy, the allocation rules of the first allocation strategy and the allocation rules of the second allocation strategy are different, and the computing power demand The information represents the information of computing resources required to process computing tasks; the idle computing resource information of each computing node is determined through the target model, and the target is determined from multiple computing nodes based on the computing power demand information and idle computing resource information. Computing nodes; allocate computing tasks to target computing nodes according to the target allocation strategy. Different allocation strategies are adopted for different network scenarios, and the idle computing power of the node is determined through the computing power quantization model (i.e., the target model), so that the idle computing power of the node can be determined. Computing tasks are assigned to the optimal computing node (i.e., the target computing node), which improves the accuracy of task allocation, thereby improving the quality of the channel, reducing competition for computing resources, and minimizing end-to-end delay or lowest energy. The purpose of the overhead is to achieve the technical effect of improving the accuracy of task allocation, thereby solving the technical problem of low accuracy of computing task allocation in the existing technology that allocates computing tasks through manual experience.

附图说明Description of the drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached picture:

图1是根据本发明实施例的一种可选的计算任务的分配方法的流程图;Figure 1 is a flow chart of an optional computing task allocation method according to an embodiment of the present invention;

图2是根据本发明实施例的一种可选的确定空闲算力的流程图;Figure 2 is an optional flow chart for determining idle computing power according to an embodiment of the present invention;

图3是根据本发明实施例的一种可选的计算任务的分配装置的示意图;Figure 3 is a schematic diagram of an optional computing task allocation device according to an embodiment of the present invention;

图4是根据本发明实施例的一种可选的电子设备的示意图。Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of the present invention.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description 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 is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the invention described herein are capable of being practiced in sequences 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, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.

需要说明的是,本发明所涉及的相关信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于展示的数据、分析的数据等),均为经用户授权或者经过各方充分授权的信息和数据。例如,本系统和相关用户或机构间设置有接口,在获取相关信息之前,需要通过接口向前述的用户或机构发送获取请求,并在接收到前述的用户或机构反馈的同意信息后,获取相关信息。It should be noted that the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, analysis data, etc.) involved in the present invention are authorized by the user. Or information and data fully authorized by all parties. For example, there is an interface between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned users or institutions through the interface, and after receiving the consent information fed back by the aforementioned users or institutions, obtain the relevant information. information.

实施例1Example 1

根据本发明实施例,提供了一种计算任务的分配方法的实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, an embodiment of a method for allocating computing tasks is provided. It should be noted that the steps shown in the flow chart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and ,Although a logical sequence is shown in the flowcharts, in some cases, the steps shown or described may be performed in a sequence different from that herein.

图1是根据本发明实施例的一种可选的计算任务的分配方法的流程图,如图1所示,该方法包括如下步骤:Figure 1 is a flow chart of an optional computing task allocation method according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:

步骤S101,接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息。Step S101: Receive a computing task request sent by the terminal node, where the computing task request at least includes attribute information and task information of the computing task.

步骤S102,依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息。Step S102, determine the target allocation strategy corresponding to the computing task based on the attribute information, and determine the computing power demand information corresponding to the computing task based on the task information, where the target allocation strategy is one of the following: a first allocation strategy, a second allocation strategy, The allocation rules of the first allocation strategy are different from the allocation rules of the second allocation strategy, and the computing power demand information represents the information of the computing power resources required to process the computing task.

可选地,终端节点可以是用户终端,计算任务可以是神经网络的计算任务、逻辑运算任务等,属性信息可以是任务ID等信息,任务信息至少包括计算目标,例如,以能耗最低为目标对计算任务进行计算的信息,或者以时延最低为目标对计算任务进行计算的信息。Optionally, the terminal node may be a user terminal, the computing task may be a neural network computing task, a logical operation task, etc., the attribute information may be information such as a task ID, and the task information at least includes the computing goal, for example, the goal is to minimize energy consumption. Information about computing tasks, or information about computing tasks with the lowest latency as the goal.

可选地,通过计算任务的分配系统接收终端节点发送的计算任务请求,可以依据属性信息确定出计算任务对应的目标分配策略是第一分配策略还是第二分配策略,例如,通过任务ID等信息可以确定出当前计算场景是单用户场景还是多用户场景,若是单用户场景,则将单用户分配策略(即第一分配策略)作为目标分配策略;若是多用户场景,则将多用户分配策略(即第二分配策略)作为目标分配策略。然后依据任务信息可以确定出计算任务所需的算力资源。Optionally, by receiving the computing task request sent by the terminal node through the computing task distribution system, it can be determined according to the attribute information whether the target distribution strategy corresponding to the computing task is the first distribution strategy or the second distribution strategy, for example, through the task ID and other information It can be determined whether the current computing scenario is a single-user scenario or a multi-user scenario. If it is a single-user scenario, the single-user allocation strategy (i.e., the first allocation strategy) is used as the target allocation strategy; if it is a multi-user scenario, the multi-user allocation strategy (i.e., the first allocation strategy) is used. That is, the second allocation strategy) is used as the target allocation strategy. Then the computing resources required for the computing task can be determined based on the task information.

步骤S103,通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点。Step S103: Determine the idle computing resource information of each computing node through the target model, and determine the target computing node from multiple computing nodes based on the computing power demand information and the idle computing resource information.

步骤S104,依据目标分配策略将计算任务分配至目标计算节点。Step S104: Allocate computing tasks to target computing nodes according to the target allocation strategy.

可选地,通过算力量化模型(即目标模型)可以确定出每个计算节点的空闲算力资源信息,依据算力需求信息和空闲算力资源信息,可以从多个计算节点中确定出最优的边缘计算节点(即目标计算节点),然后可以依据确定出的目标分配策略将计算任务分配至最优计算节点。其中,算力量化模型表示如下:Optionally, the idle computing power resource information of each computing node can be determined through the computing power quantization model (ie, the target model). Based on the computing power demand information and the idle computing power resource information, the optimal computing power resource information can be determined from multiple computing nodes. The optimal edge computing node (i.e., the target computing node) is determined, and then the computing tasks can be allocated to the optimal computing node according to the determined target allocation strategy. Among them, the computing power quantization model is expressed as follows:

其中,Cbr表示总的算力需求,n为逻辑运算芯片数量,i为n的索引,f(ai)为逻辑运算的映射函数,αi为第i个逻辑运算芯片的映射比例系数,q1(TOPS)为逻辑运算的冗余算力;m为并行计算芯片数量,j为m的索引,f(bj)为并行计算的映射函数,βj为第j个并行计算芯片的映射比例系数,q2(FLOPS)为并行计算的冗余算力;p为神经网络加速芯片的数量,k为p的索引,f(ck)为神经网络加速的映射函数,γk为第k个神经网络加速芯片的映射比例系数,q3(FLOPS)为神经网络加速的冗余算力。Among them, Cbr represents the total computing power requirement, n is the number of logic operation chips, i is the index of n, f(ai ) is the mapping function of the logic operation, αi is the mapping proportion coefficient of the i-th logic operation chip, q1 (TOPS) is the redundant computing power of logical operations; m is the number of parallel computing chips, j is the index of m, f(bj ) is the mapping function of parallel computing, and βj is the mapping of the jth parallel computing chip The proportional coefficient, q2 (FLOPS) is the redundant computing power for parallel computing; p is the number of neural network acceleration chips, k is the index of p, f (ck ) is the mapping function of neural network acceleration, γk is the kth The mapping proportion coefficient of a neural network acceleration chip, q3 (FLOPS) is the redundant computing power of neural network acceleration.

基于上述步骤S101至步骤S104所限定的方案,可以获知,在本发明实施例中,采用接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;依据目标分配策略将计算任务分配至目标计算节点的方式,对于不同的网络场景采用不同的分配策略,并通过算力量化模型(即目标模型)确定节点的空闲算力,从而能够将计算任务分配给最优计算节点(即目标计算节点),提高了任务分配的准确性,从而提升了信道的质量,降低了对计算资源的竞争,达到了最小化端到端时延或者最低能量开销的目的,从而实现了提高任务分配的准确性的技术效果,进而解决了现有技术中通过人工经验对计算任务进行分配,存在计算任务分配准确性较低的技术问题。Based on the solution defined in the above steps S101 to S104, it can be known that in the embodiment of the present invention, the computing task request sent by the terminal node is received, wherein the computing task request at least includes the attribute information and task information of the computing task; according to The attribute information determines the target allocation strategy corresponding to the computing task, and determines the computing power demand information corresponding to the computing task based on the task information, where the target allocation strategy is one of the following: the first allocation strategy, the second allocation strategy, the first allocation strategy The allocation rules are different from the allocation rules of the second allocation strategy. The computing power demand information represents the information of the computing power resources required to process the computing tasks; the idle computing power resource information of each computing node is determined through the target model, and the computing power demand information is determined based on the computing power demand information. and idle computing resource information, determine the target computing node from multiple computing nodes; allocate computing tasks to the target computing node according to the target allocation strategy, adopt different allocation strategies for different network scenarios, and use the computing power quantization model (i.e., the target model) determines the idle computing power of the node, thereby allocating computing tasks to the optimal computing node (i.e., the target computing node), improving the accuracy of task allocation, thereby improving the quality of the channel and reducing the need for computing resources. The competition achieves the purpose of minimizing the end-to-end delay or the lowest energy overhead, thereby achieving the technical effect of improving the accuracy of task allocation, thereby solving the existing problem of allocating computing tasks through manual experience in the existing technology. Technical issues with low task assignment accuracy.

在一种可选的实施例中,依据属性信息确定计算任务对应的目标分配策略,包括:依据属性信息确定计算任务对应的目标网络场景,其中,目标网络场景为以下之一:第一网络场景、第二网络场景,第一网络场景下的用户数量小于第二网络场景下的用户数量;若目标网络场景为第一网络场景,则将第一分配策略作为目标分配策略;若目标网络场景为第二网络场景,则将第二分配策略作为目标分配策略。In an optional embodiment, determining the target allocation strategy corresponding to the computing task based on the attribute information includes: determining the target network scenario corresponding to the computing task based on the attribute information, where the target network scenario is one of the following: a first network scenario , the second network scenario, the number of users in the first network scenario is less than the number of users in the second network scenario; if the target network scenario is the first network scenario, the first allocation strategy is used as the target allocation strategy; if the target network scenario is In the second network scenario, the second allocation strategy is used as the target allocation strategy.

可选地,在依据属性信息确定计算任务对应的目标分配策略的过程中,依据属性信息可以确定出计算任务对应的目标网络场景是单用户场景(即第一网络场景)还是多用户场景(即第二网络场景),若目标网络场景为单用户场景,则确定目标分配策略为单用户分配策略;若目标网络场景为多用户场景,则确定目标分配策略为多用户分配策略。Optionally, in the process of determining the target allocation strategy corresponding to the computing task based on the attribute information, it can be determined based on the attribute information whether the target network scenario corresponding to the computing task is a single-user scenario (i.e., the first network scenario) or a multi-user scenario (i.e., a multi-user scenario). Second network scenario), if the target network scenario is a single-user scenario, the target allocation strategy is determined to be a single-user allocation strategy; if the target network scenario is a multi-user scenario, the target allocation strategy is determined to be a multi-user allocation strategy.

图2是根据本发明实施例的一种可选的确定空闲算力的流程图,如图2所示,在通过目标模型确定每个计算节点的空闲算力资源信息的过程中,包括以下步骤:Figure 2 is an optional flow chart for determining idle computing power according to an embodiment of the present invention. As shown in Figure 2, the process of determining the idle computing power resource information of each computing node through the target model includes the following steps :

步骤S201,获取每个计算节点的算力资源信息和每个计算节点的待计算的计算任务量,其中,算力资源信息至少包括逻辑运算资源的资源数据、并行计算资源的资源数据以及神经网络计算资源的资源数据;Step S201: Obtain the computing resource information of each computing node and the amount of computing tasks to be calculated for each computing node, where the computing resource information at least includes resource data of logical computing resources, resource data of parallel computing resources, and neural networks. Resource data for computing resources;

步骤S202,确定待计算的计算任务量对逻辑运算资源的需求信息、对并行计算资源的需求信息以及对神经网络计算资源的需求信息,得到待计算的计算任务量对应的算力需求信息;Step S202, determine the demand information for logical computing resources, the demand information for parallel computing resources, and the demand information for neural network computing resources for the computing task to be calculated, and obtain the computing power demand information corresponding to the computing task to be calculated;

步骤S203,通过目标模型对待计算的计算任务量对应的算力需求信息和算力资源信息进行计算,得到每个计算节点的空闲算力资源信息。Step S203: Calculate the computing power demand information and computing power resource information corresponding to the computing task volume to be calculated through the target model to obtain the idle computing power resource information of each computing node.

例如,首先获取每个计算节点(如边缘计算节点)的算力资源信息和每个计算节点的待计算的计算任务量,然后确定待计算的计算任务量对逻辑运算资源的需求信息、对并行计算资源的需求信息以及对神经网络计算资源的需求信息,得到待计算的计算任务量对应的算力需求信息,然后可以通过算力量化模型对待计算的计算任务量对应的算力需求信息和算力资源信息进行计算,得到每个计算节点的空闲算力资源信息,即冗余算力,例如,可以将相关数据代入算力量化模型进行计算,得到计算节点的空闲算力。For example, first obtain the computing resource information of each computing node (such as an edge computing node) and the amount of computing tasks to be calculated for each computing node, and then determine the demand information for the amount of computing tasks to be calculated on logical computing resources, and the requirements for parallel computing. The demand information for computing resources and the demand information for neural network computing resources can be used to obtain the computing power demand information corresponding to the amount of computing tasks to be calculated, and then the computing power demand information and computing power requirements corresponding to the amount of computing tasks to be calculated can be used through the computational power quantization model. The computing power resource information is calculated to obtain the idle computing power resource information of each computing node, that is, the redundant computing power. For example, the relevant data can be substituted into the computing power quantization model for calculation to obtain the idle computing power of the computing node.

在一种可选的实施例中,依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点,包括:依据算力需求信息和空闲算力资源信息,判断每个计算节点是否满足计算任务的算力需求,得到第一判断结果;依据第一判断结果,从多个计算节点中确定满足算力需求的计算节点,得到目标计算节点。In an optional embodiment, determining the target computing node from multiple computing nodes based on the computing power demand information and the idle computing power resource information includes: judging each computing node based on the computing power demand information and the idle computing power resource information. Whether the computing node meets the computing power requirements of the computing task is obtained, and the first judgment result is obtained; based on the first judgment result, the computing node that meets the computing power requirements is determined from multiple computing nodes, and the target computing node is obtained.

可选地,在依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点的过程中,依据算力需求信息和空闲算力资源信息,可以判断出每个计算节点是否满足计算任务的算力需求,得到第一判断结果,然后可以依据第一判断结果,从多个计算节点中确定出满足算力需求的计算节点,得到最优计算节点。Optionally, in the process of determining the target computing node from multiple computing nodes based on the computing power demand information and the idle computing power resource information, each computing node can be determined based on the computing power demand information and the idle computing power resource information. The first judgment result is obtained to determine whether the computing power requirement of the computing task is met. Then, the computing node that meets the computing power requirement can be determined from multiple computing nodes based on the first judgment result, and the optimal computing node can be obtained.

例如,当算力需求数据大于或等于计算节点的空闲算力数据时,该节点无法满足计算任务的算力需求;当算力需求数据小于计算节点的空闲算力数据,并且,当前空闲算力被使用后,剩余的空闲算力大于预设值时,认为该节点可以满足计算任务的算力需求。For example, when the computing power demand data is greater than or equal to the idle computing power data of the computing node, the node cannot meet the computing power demand of the computing task; when the computing power demand data is less than the idle computing power data of the computing node, and the current idle computing power After being used, when the remaining idle computing power is greater than the preset value, the node is considered to be able to meet the computing power requirements of the computing task.

在一种可选的实施例中,在目标分配策略为第一分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,其中,时延数据用于表征计算任务的传输时长,能耗数据用于表征计算任务的传输能耗;判断时延数据是否满足第一判定条件,得到第二判断结果,并判断能耗数据是否满足第二判定条件,得到第三判断结果,其中,第一判定条件用于确定时延数据是否小于预设时延阈值,第二判定条件用于确定能耗数据是否小于预设能耗阈值;若第二判断结果表征时延数据满足第一判定条件,且第三判断结果表征能耗数据满足第二判定条件,则将计算任务分配至目标计算节点。In an optional embodiment, when the target allocation strategy is the first allocation strategy, allocating the computing tasks to the target computing nodes according to the target allocation strategy includes: obtaining the latency data and energy consumption data of the computing tasks, Among them, the delay data is used to characterize the transmission time of the computing task, and the energy consumption data is used to characterize the transmission energy consumption of the computing task; it is judged whether the delay data meets the first judgment condition, the second judgment result is obtained, and whether the energy consumption data is judged The second judgment condition is met to obtain a third judgment result, wherein the first judgment condition is used to determine whether the delay data is less than the preset delay threshold, and the second judgment condition is used to determine whether the energy consumption data is less than the preset energy consumption threshold; If the second judgment result represents that the delay data satisfies the first judgment condition, and the third judgment result represents that the energy consumption data satisfies the second judgment condition, then the computing task is assigned to the target computing node.

可选地,在目标分配策略为单用户分配策略的情况下,在依据目标分配策略将计算任务分配至目标计算节点的过程中,首先获取计算任务的时延数据和能耗数据,然后判断时延数据是否满足时延判定条件(即第一判定条件),得到第二判断结果,并判断能耗数据是否满足能耗判定条件(即第二判定条件),得到第三判断结果,若第二判断结果表征时延数据满足时延判定条件,且第三判断结果表征能耗数据满足能耗判定条件,则将计算任务分配至确定出的最优计算节点。例如,当时延数据小于预设时延阈值时,满足时延判定条件;当能耗数据小于预设能耗阈值时,满足能耗判定条件。Optionally, when the target allocation policy is a single-user allocation policy, in the process of allocating computing tasks to target computing nodes according to the target allocation policy, the latency data and energy consumption data of the computing tasks are first obtained, and then the timing is determined. Whether the delay data satisfies the delay judgment condition (i.e., the first judgment condition), the second judgment result is obtained, and it is judged whether the energy consumption data satisfies the energy consumption judgment condition (i.e., the second judgment condition), and the third judgment result is obtained. If the second If the judgment result represents that the delay data satisfies the delay judgment condition, and the third judgment result represents that the energy consumption data satisfies the energy consumption judgment condition, then the computing task is assigned to the determined optimal computing node. For example, when the delay data is less than the preset delay threshold, the delay determination condition is met; when the energy consumption data is less than the preset energy consumption threshold, the energy consumption determination condition is met.

可选地,还可以将用户时延标准(即本地处理时间大于任务传输时延与边缘计算时间之和)作为时延判定条件,将设备能耗最低标准(即任务在边缘节点处理,维持终端设备的最低能量开销)作为能耗判定条件。Optionally, the user delay standard (that is, the local processing time is greater than the sum of the task transmission delay and the edge computing time) can also be used as the delay determination condition, and the minimum equipment energy consumption standard (that is, the task is processed at the edge node to maintain the terminal The lowest energy consumption of the device) is used as the energy consumption determination condition.

在一种可选的实施例中,在目标分配策略为第二分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,并获取目标计算节点的计算时延数据和计算能耗数据,其中,计算时延数据用于表征目标计算节点的计算时长,计算能耗数据用于表征目标计算节点的计算能耗;依据时延数据和计算时延数据进行计算,得到计算任务对应的总时延,并依据能耗数据和计算能耗数据进行计算,得到计算任务对应的总能耗;判断总时延和总能耗是否满足目标约束条件,得到第四判断结果,其中,目标约束条件用于表征总时延和总能耗之间的关联关系;若第四判断结果表征总时延和总能耗满足目标约束条件,则将计算任务分配至目标计算节点。In an optional embodiment, when the target allocation strategy is the second allocation strategy, allocating the computing tasks to the target computing nodes according to the target allocation strategy includes: obtaining the latency data and energy consumption data of the computing tasks, And obtain the computing delay data and computing energy consumption data of the target computing node, where the computing delay data is used to characterize the computing time of the target computing node, and the computing energy consumption data is used to characterize the computing energy consumption of the target computing node; according to the latency Calculate the data and computing delay data to obtain the total delay corresponding to the computing task, and perform calculations based on the energy consumption data and computing energy consumption data to obtain the total energy consumption corresponding to the computing task; determine whether the total delay and total energy consumption satisfy The target constraint condition is used to obtain the fourth judgment result, in which the target constraint condition is used to represent the correlation between the total delay and the total energy consumption; if the fourth judgment result represents that the total delay and total energy consumption satisfy the target constraint condition, then Allocate computing tasks to target computing nodes.

可选地,在目标分配策略为多用户分配策略的情况下,在依据目标分配策略将计算任务分配至目标计算节点的过程中,首先获取计算任务的时延数据和能耗数据,并获取最优计算节点的计算时延数据和计算能耗数据,然后对时延数据和计算时延数据进行求和计算,可以得到计算任务对应的总时延,并对能耗数据和计算能耗数据进行求和计算,可以得到计算任务对应的总能耗,然后判断总时延和总能耗是否满足目标约束条件,例如,目标约束条件可以是总时延和总能耗的加权和小于设定值,得到第四判断结果,若第四判断结果表征总时延和总能耗满足目标约束条件,则将计算任务分配至最优计算节点。Optionally, when the target allocation policy is a multi-user allocation policy, in the process of allocating computing tasks to target computing nodes according to the target allocation policy, first obtain the latency data and energy consumption data of the computing tasks, and obtain the latest Optimize the computing delay data and computing energy consumption data of the computing nodes, and then sum up the delay data and computing delay data to obtain the total delay corresponding to the computing task, and perform the calculation on the energy consumption data and computing energy consumption data. Through summation calculation, the total energy consumption corresponding to the computing task can be obtained, and then it is judged whether the total delay and total energy consumption meet the target constraint conditions. For example, the target constraint condition can be that the weighted sum of the total delay and total energy consumption is less than the set value. , the fourth judgment result is obtained. If the fourth judgment result indicates that the total delay and total energy consumption meet the target constraints, the computing task is assigned to the optimal computing node.

在一种可选的实施例中,在依据目标分配策略将计算任务分配至目标计算节点之后,接收目标计算节点返回的任务计算结果,并将任务计算结果发送至终端节点。In an optional embodiment, after allocating the computing task to the target computing node according to the target allocation policy, the task calculation result returned by the target computing node is received, and the task calculation result is sent to the terminal node.

可选地,在依据目标分配策略将计算任务分配至目标计算节点之后,例如,依据单用户分配策略或者多用户分配策略将计算任务分配至最优计算节点,此时计算任务在边缘节点(即最优计算节点)处理,终端设备(即终端节点)需要监听等待任务的回传,即接收最优计算节点返回的任务计算结果,并将任务计算结果发送至终端节点。Optionally, after the computing tasks are allocated to the target computing nodes according to the target allocation strategy, for example, the computing tasks are allocated to the optimal computing nodes according to the single-user allocation strategy or the multi-user allocation strategy. At this time, the computing tasks are on the edge nodes (i.e. Optimal computing node) processing, the terminal device (i.e., the terminal node) needs to listen for the return of the waiting task, that is, receive the task calculation result returned by the optimal computing node, and send the task calculation result to the terminal node.

在本发明实施例中,采用接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;依据目标分配策略将计算任务分配至目标计算节点的方式,对于不同的网络场景采用不同的分配策略,并通过算力量化模型(即目标模型)确定节点的空闲算力,从而能够将计算任务分配给最优计算节点(即目标计算节点),提高了任务分配的准确性,从而提升了信道的质量,降低了对计算资源的竞争,达到了最小化端到端时延或者最低能量开销的目的,从而实现了提高任务分配的准确性的技术效果,进而解决了现有技术中通过人工经验对计算任务进行分配,存在计算任务分配准确性较低的技术问题。In the embodiment of the present invention, a computing task request sent by a terminal node is received, wherein the computing task request at least includes attribute information and task information of the computing task; the target allocation strategy corresponding to the computing task is determined based on the attribute information, and the target allocation strategy corresponding to the computing task is determined based on the task information. Determine the computing power demand information corresponding to the computing task, where the target allocation strategy is one of the following: a first allocation strategy, a second allocation strategy, the allocation rules of the first allocation strategy and the allocation rules of the second allocation strategy are different, and the computing power demand The information represents the information of computing resources required to process computing tasks; the idle computing resource information of each computing node is determined through the target model, and the target is determined from multiple computing nodes based on the computing power demand information and idle computing resource information. Computing nodes; allocate computing tasks to target computing nodes according to the target allocation strategy. Different allocation strategies are adopted for different network scenarios, and the idle computing power of the node is determined through the computing power quantization model (i.e., the target model), so that the idle computing power of the node can be determined. Computing tasks are assigned to the optimal computing node (i.e., the target computing node), which improves the accuracy of task allocation, thereby improving the quality of the channel, reducing competition for computing resources, and minimizing end-to-end delay or lowest energy. The purpose of the overhead is to achieve the technical effect of improving the accuracy of task allocation, thereby solving the technical problem of low accuracy of computing task allocation in the existing technology that allocates computing tasks through manual experience.

实施例2Example 2

根据本发明实施例,提供了一种计算任务的分配装置的实施例,其中,图3是根据本发明实施例的一种可选的计算任务的分配装置的示意图,如图3所示,该装置包括:第一接收模块301,用于接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;第一确定模块302,用于依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;第二确定模块303,用于通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;第一处理模块304,用于依据目标分配策略将计算任务分配至目标计算节点。According to an embodiment of the present invention, an embodiment of an apparatus for allocating computing tasks is provided, wherein FIG. 3 is a schematic diagram of an optional apparatus for allocating computing tasks according to an embodiment of the present invention. As shown in FIG. 3, The device includes: a first receiving module 301, configured to receive a computing task request sent by a terminal node, where the computing task request at least includes attribute information and task information of the computing task; a first determining module 302, configured to determine the computing task based on the attribute information. The target allocation strategy corresponding to the task, and determine the computing power demand information corresponding to the computing task based on the task information, where the target allocation strategy is one of the following: the first allocation strategy, the second allocation strategy, the allocation rule of the first allocation strategy and the third allocation strategy. The allocation rules of the two allocation strategies are different, and the computing power demand information represents the information of computing resources required to process computing tasks; the second determination module 303 is used to determine the idle computing resource information of each computing node through the target model, and based on The computing power demand information and the idle computing power resource information are used to determine the target computing node from multiple computing nodes; the first processing module 304 is used to allocate computing tasks to the target computing node according to the target allocation strategy.

需要说明的是,上述的第一接收模块301、第一确定模块302、第二确定模块303以及第一处理模块304对应于上述实施例中的步骤S101至步骤S104,四个模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例1所公开的内容。It should be noted that the above-mentioned first receiving module 301, first determining module 302, second determining module 303 and first processing module 304 correspond to steps S101 to step S104 in the above embodiment. The four modules and the corresponding steps The implemented examples and application scenarios are the same, but are not limited to the content disclosed in Embodiment 1 above.

可选的,第一确定模块包括:第三确定模块,用于依据属性信息确定计算任务对应的目标网络场景,其中,目标网络场景为以下之一:第一网络场景、第二网络场景,第一网络场景下的用户数量小于第二网络场景下的用户数量;第四确定模块,用于若目标网络场景为第一网络场景,则将第一分配策略作为目标分配策略;第五确定模块,用于若目标网络场景为第二网络场景,则将第二分配策略作为目标分配策略。Optionally, the first determination module includes: a third determination module, used to determine the target network scenario corresponding to the computing task based on the attribute information, where the target network scenario is one of the following: the first network scenario, the second network scenario, the third network scenario. The number of users in one network scenario is less than the number of users in the second network scenario; the fourth determination module is used to use the first allocation strategy as the target allocation strategy if the target network scenario is the first network scenario; the fifth determination module, It is used to use the second allocation strategy as the target allocation strategy if the target network scenario is the second network scenario.

可选的,第二确定模块包括:第一获取模块,用于获取每个计算节点的算力资源信息和每个计算节点的待计算的计算任务量,其中,算力资源信息至少包括逻辑运算资源的资源数据、并行计算资源的资源数据以及神经网络计算资源的资源数据;第六确定模块,用于确定待计算的计算任务量对逻辑运算资源的需求信息、对并行计算资源的需求信息以及对神经网络计算资源的需求信息,得到待计算的计算任务量对应的算力需求信息;第一计算模块,用于通过目标模型对待计算的计算任务量对应的算力需求信息和算力资源信息进行计算,得到每个计算节点的空闲算力资源信息。Optionally, the second determination module includes: a first acquisition module, used to acquire the computing resource information of each computing node and the amount of computing tasks to be calculated for each computing node, where the computing resource information at least includes logical operations. Resource data of resources, resource data of parallel computing resources, and resource data of neural network computing resources; the sixth determination module is used to determine the demand information for logical computing resources, the demand information for parallel computing resources for the computing task to be calculated, and The demand information for neural network computing resources is used to obtain computing power demand information corresponding to the amount of computing tasks to be calculated; the first computing module is used to obtain computing power demand information and computing power resource information corresponding to the amount of computing tasks to be calculated through the target model Perform calculations to obtain the idle computing resource information of each computing node.

可选的,第二确定模块还包括:第一判断模块,用于依据算力需求信息和空闲算力资源信息,判断每个计算节点是否满足计算任务的算力需求,得到第一判断结果;第七确定模块,用于依据第一判断结果,从多个计算节点中确定满足算力需求的计算节点,得到目标计算节点。Optionally, the second determination module also includes: a first judgment module, used to judge whether each computing node meets the computing power demand of the computing task based on the computing power demand information and the idle computing power resource information, and obtain the first judgment result; The seventh determination module is used to determine the computing node that meets the computing power requirement from multiple computing nodes based on the first judgment result, and obtain the target computing node.

可选的,在目标分配策略为第一分配策略的情况下,第一处理模块包括:第二获取模块,用于获取计算任务的时延数据和能耗数据,其中,时延数据用于表征计算任务的传输时长,能耗数据用于表征计算任务的传输能耗;第二判断模块,用于判断时延数据是否满足第一判定条件,得到第二判断结果,并判断能耗数据是否满足第二判定条件,得到第三判断结果,其中,第一判定条件用于确定时延数据是否小于预设时延阈值,第二判定条件用于确定能耗数据是否小于预设能耗阈值;第二处理模块,用于若第二判断结果表征时延数据满足第一判定条件,且第三判断结果表征能耗数据满足第二判定条件,则将计算任务分配至目标计算节点。Optionally, when the target allocation strategy is the first allocation strategy, the first processing module includes: a second acquisition module, used to acquire the delay data and energy consumption data of the computing task, where the delay data is used to characterize The transmission duration of the computing task, and the energy consumption data are used to characterize the transmission energy consumption of the computing task; the second judgment module is used to judge whether the delay data meets the first judgment condition, obtain the second judgment result, and judge whether the energy consumption data satisfies the The second judgment condition is to obtain a third judgment result, wherein the first judgment condition is used to determine whether the delay data is less than the preset delay threshold, and the second judgment condition is used to determine whether the energy consumption data is less than the preset energy consumption threshold; The second processing module is used to allocate the computing task to the target computing node if the second judgment result represents that the delay data satisfies the first judgment condition, and the third judgment result represents that the energy consumption data satisfies the second judgment condition.

可选的,在目标分配策略为第二分配策略的情况下,第一处理模块包括:第三获取模块,用于获取计算任务的时延数据和能耗数据,并获取目标计算节点的计算时延数据和计算能耗数据,其中,计算时延数据用于表征目标计算节点的计算时长,计算能耗数据用于表征目标计算节点的计算能耗;第二计算模块,用于依据时延数据和计算时延数据进行计算,得到计算任务对应的总时延,并依据能耗数据和计算能耗数据进行计算,得到计算任务对应的总能耗;第三判断模块,用于判断总时延和总能耗是否满足目标约束条件,得到第四判断结果,其中,目标约束条件用于表征总时延和总能耗之间的关联关系;第三处理模块,用于若第四判断结果表征总时延和总能耗满足目标约束条件,则将计算任务分配至目标计算节点。Optionally, when the target allocation strategy is the second allocation strategy, the first processing module includes: a third acquisition module, used to acquire the delay data and energy consumption data of the computing task, and acquire the computing time of the target computing node. Latency data and computing energy consumption data, where the computing delay data is used to characterize the computing time of the target computing node, and the computing energy consumption data is used to characterize the computing energy consumption of the target computing node; the second computing module is used to calculate the computing time based on the latency data. Calculate with the computing delay data to obtain the total delay corresponding to the computing task, and perform calculations based on the energy consumption data and computing energy consumption data to obtain the total energy consumption corresponding to the computing task; the third judgment module is used to determine the total delay and whether the total energy consumption satisfies the target constraint condition to obtain the fourth judgment result, in which the target constraint condition is used to characterize the correlation between the total delay and the total energy consumption; the third processing module is used to characterize if the fourth judgment result If the total delay and total energy consumption meet the target constraints, the computing tasks will be assigned to the target computing nodes.

可选的,计算任务的分配装置还包括:发送模块,用于在依据目标分配策略将计算任务分配至目标计算节点之后,接收目标计算节点返回的任务计算结果,并将任务计算结果发送至终端节点。Optionally, the computing task allocation device further includes: a sending module, configured to receive the task calculation result returned by the target computing node after allocating the computing task to the target computing node according to the target allocation policy, and send the task calculation result to the terminal. node.

实施例3Example 3

根据本发明实施例的另一方面,还提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,其中,计算机程序被设置为运行时执行上述的计算任务的分配方法。According to another aspect of the embodiment of the present invention, a computer-readable storage medium is also provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above computing task allocation method when running.

实施例4Example 4

根据本发明实施例的另一方面,还提供了一种电子设备,其中,图4是根据本发明实施例的一种可选的电子设备的示意图,如图4所示,电子设备包括一个或多个处理器;存储器,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行时,使得一个或多个处理器实现用于运行程序,其中,程序被设置为运行时执行上述的计算任务的分配方法。处理器执行程序时实现以下步骤:接收终端节点发送的计算任务请求,其中,计算任务请求中至少包括计算任务的属性信息和任务信息;依据属性信息确定计算任务对应的目标分配策略,并依据任务信息确定计算任务对应的算力需求信息,其中,目标分配策略为以下之一:第一分配策略、第二分配策略,第一分配策略的分配规则和第二分配策略的分配规则不同,算力需求信息表征处理计算任务所需的算力资源的信息;通过目标模型确定每个计算节点的空闲算力资源信息,并依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点;依据目标分配策略将计算任务分配至目标计算节点。According to another aspect of the embodiment of the present invention, an electronic device is also provided, wherein FIG. 4 is a schematic diagram of an optional electronic device according to the embodiment of the present invention. As shown in FIG. 4, the electronic device includes one or Multiple processors; memory for storing one or more programs so that when the one or more programs are executed by one or more processors, the one or more processors are implemented for running the programs, wherein the programs are configured An allocation method for performing the above calculation tasks at runtime. When the processor executes the program, it implements the following steps: receives a computing task request sent by the terminal node, where the computing task request at least includes attribute information and task information of the computing task; determines the target allocation strategy corresponding to the computing task based on the attribute information, and determines the target allocation strategy corresponding to the computing task based on the task The information determines the computing power demand information corresponding to the computing task, where the target allocation strategy is one of the following: a first allocation strategy, a second allocation strategy, the allocation rules of the first allocation strategy and the allocation rules of the second allocation strategy are different, and the computing power Demand information represents the information of computing resources required to process computing tasks; the idle computing resource information of each computing node is determined through the target model, and determined from multiple computing nodes based on the computing power demand information and idle computing resource information. Target computing node; allocate computing tasks to the target computing node according to the target allocation strategy.

可选的,处理器执行程序时还实现以下步骤:依据属性信息确定计算任务对应的目标分配策略,包括:依据属性信息确定计算任务对应的目标网络场景,其中,目标网络场景为以下之一:第一网络场景、第二网络场景,第一网络场景下的用户数量小于第二网络场景下的用户数量;若目标网络场景为第一网络场景,则将第一分配策略作为目标分配策略;若目标网络场景为第二网络场景,则将第二分配策略作为目标分配策略。Optionally, the processor also implements the following steps when executing the program: determining the target allocation strategy corresponding to the computing task based on the attribute information, including: determining the target network scenario corresponding to the computing task based on the attribute information, where the target network scenario is one of the following: In the first network scenario and the second network scenario, the number of users in the first network scenario is less than the number of users in the second network scenario; if the target network scenario is the first network scenario, the first allocation strategy is used as the target allocation strategy; if If the target network scenario is the second network scenario, the second allocation strategy is used as the target allocation strategy.

可选的,处理器执行程序时还实现以下步骤:通过目标模型确定每个计算节点的空闲算力资源信息,包括:获取每个计算节点的算力资源信息和每个计算节点的待计算的计算任务量,其中,算力资源信息至少包括逻辑运算资源的资源数据、并行计算资源的资源数据以及神经网络计算资源的资源数据;确定待计算的计算任务量对逻辑运算资源的需求信息、对并行计算资源的需求信息以及对神经网络计算资源的需求信息,得到待计算的计算任务量对应的算力需求信息;通过目标模型对待计算的计算任务量对应的算力需求信息和算力资源信息进行计算,得到每个计算节点的空闲算力资源信息。Optionally, when the processor executes the program, the following steps are also implemented: determining the idle computing resource information of each computing node through the target model, including: obtaining the computing power resource information of each computing node and the to-be-computed computing power of each computing node. The amount of computing tasks, where the computing resource information at least includes resource data of logical computing resources, resource data of parallel computing resources, and resource data of neural network computing resources; determine the demand information of the computing tasks to be calculated on logical computing resources, and the requirements for logical computing resources. The demand information for parallel computing resources and the demand information for neural network computing resources are used to obtain the computing power demand information corresponding to the amount of computing tasks to be calculated; the computing power demand information and computing power resource information corresponding to the amount of computing tasks to be calculated are obtained through the target model Perform calculations to obtain the idle computing resource information of each computing node.

可选的,处理器执行程序时还实现以下步骤:依据算力需求信息和空闲算力资源信息,从多个计算节点中确定目标计算节点,包括:依据算力需求信息和空闲算力资源信息,判断每个计算节点是否满足计算任务的算力需求,得到第一判断结果;依据第一判断结果,从多个计算节点中确定满足算力需求的计算节点,得到目标计算节点。Optionally, when the processor executes the program, the following steps are also implemented: determining the target computing node from multiple computing nodes based on the computing power demand information and the idle computing power resource information, including: based on the computing power demand information and the idle computing power resource information. , determine whether each computing node meets the computing power requirements of the computing task, and obtain the first judgment result; based on the first judgment result, determine the computing node that meets the computing power requirements from multiple computing nodes, and obtain the target computing node.

可选的,处理器执行程序时还实现以下步骤:在目标分配策略为第一分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,其中,时延数据用于表征计算任务的传输时长,能耗数据用于表征计算任务的传输能耗;判断时延数据是否满足第一判定条件,得到第二判断结果,并判断能耗数据是否满足第二判定条件,得到第三判断结果,其中,第一判定条件用于确定时延数据是否小于预设时延阈值,第二判定条件用于确定能耗数据是否小于预设能耗阈值;若第二判断结果表征时延数据满足第一判定条件,且第三判断结果表征能耗数据满足第二判定条件,则将计算任务分配至目标计算节点。Optionally, when the processor executes the program, the following steps are also implemented: when the target allocation strategy is the first allocation strategy, allocate the computing tasks to the target computing nodes according to the target allocation strategy, including: obtaining the latency data of the computing tasks and Energy consumption data, in which the delay data is used to characterize the transmission time of the computing task, and the energy consumption data is used to characterize the transmission energy consumption of the computing task; determine whether the delay data meets the first determination condition, obtain the second determination result, and determine Whether the energy consumption data satisfies the second judgment condition, a third judgment result is obtained. The first judgment condition is used to determine whether the delay data is less than the preset delay threshold, and the second judgment condition is used to determine whether the energy consumption data is less than the preset delay threshold. Energy consumption threshold; if the second judgment result represents that the delay data satisfies the first judgment condition, and the third judgment result represents that the energy consumption data satisfies the second judgment condition, then the computing task is assigned to the target computing node.

可选的,处理器执行程序时还实现以下步骤:在目标分配策略为第二分配策略的情况下,依据目标分配策略将计算任务分配至目标计算节点,包括:获取计算任务的时延数据和能耗数据,并获取目标计算节点的计算时延数据和计算能耗数据,其中,计算时延数据用于表征目标计算节点的计算时长,计算能耗数据用于表征目标计算节点的计算能耗;依据时延数据和计算时延数据进行计算,得到计算任务对应的总时延,并依据能耗数据和计算能耗数据进行计算,得到计算任务对应的总能耗;判断总时延和总能耗是否满足目标约束条件,得到第四判断结果,其中,目标约束条件用于表征总时延和总能耗之间的关联关系;若第四判断结果表征总时延和总能耗满足目标约束条件,则将计算任务分配至目标计算节点。Optionally, when the processor executes the program, the following steps are also implemented: when the target allocation strategy is the second allocation strategy, allocate the computing tasks to the target computing nodes according to the target allocation strategy, including: obtaining the latency data of the computing tasks and Energy consumption data, and obtain the computing delay data and computing energy consumption data of the target computing node. The computing delay data is used to characterize the computing time of the target computing node, and the computing energy consumption data is used to characterize the computing energy consumption of the target computing node. ; Calculate based on the delay data and computing delay data to obtain the total delay corresponding to the computing task, and perform calculations based on the energy consumption data and computing energy consumption data to obtain the total energy consumption corresponding to the computing task; judge the total delay and the total Whether the energy consumption satisfies the target constraint, a fourth judgment result is obtained, in which the target constraint is used to represent the correlation between the total delay and the total energy consumption; if the fourth judgment result represents that the total delay and the total energy consumption meet the target If the constraints are met, the computing tasks will be assigned to the target computing nodes.

可选的,处理器执行程序时还实现以下步骤:在依据目标分配策略将计算任务分配至目标计算节点之后,接收目标计算节点返回的任务计算结果,并将任务计算结果发送至终端节点。Optionally, the processor also implements the following steps when executing the program: after allocating the computing task to the target computing node according to the target allocation policy, receiving the task calculation result returned by the target computing node, and sending the task calculation result to the terminal node.

本文中的设备可以是服务器、PC、PAD、手机等。The devices in this article can be servers, PCs, PADs, mobile phones, etc.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units may be a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the units or modules may be in electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause 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 various embodiments of the present invention. The aforementioned storage media include: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code. .

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention. These improvements and modifications can also be made. should be regarded as the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种计算任务的分配方法,其特征在于,包括:1. A method for allocating computing tasks, characterized by including:接收终端节点发送的计算任务请求,其中,所述计算任务请求中至少包括计算任务的属性信息和任务信息;Receive a computing task request sent by the terminal node, wherein the computing task request at least includes attribute information and task information of the computing task;依据所述属性信息确定所述计算任务对应的目标分配策略,并依据所述任务信息确定所述计算任务对应的算力需求信息,其中,所述目标分配策略为以下之一:第一分配策略、第二分配策略,所述第一分配策略的分配规则和所述第二分配策略的分配规则不同,所述算力需求信息表征处理所述计算任务所需的算力资源的信息;Determine a target allocation strategy corresponding to the computing task based on the attribute information, and determine computing power demand information corresponding to the computing task based on the task information, wherein the target allocation strategy is one of the following: a first allocation strategy , a second allocation strategy, the allocation rules of the first allocation strategy are different from the allocation rules of the second allocation strategy, and the computing power demand information represents information about the computing power resources required to process the computing task;通过目标模型确定每个计算节点的空闲算力资源信息,并依据所述算力需求信息和所述空闲算力资源信息,从多个计算节点中确定目标计算节点;Determine the idle computing resource information of each computing node through the target model, and determine the target computing node from multiple computing nodes based on the computing power demand information and the idle computing resource information;依据所述目标分配策略将所述计算任务分配至所述目标计算节点。The computing task is allocated to the target computing node according to the target allocation policy.2.根据权利要求1所述的方法,其特征在于,依据所述属性信息确定所述计算任务对应的目标分配策略,包括:2. The method according to claim 1, characterized in that determining the target allocation strategy corresponding to the computing task based on the attribute information includes:依据所述属性信息确定所述计算任务对应的目标网络场景,其中,所述目标网络场景为以下之一:第一网络场景、第二网络场景,所述第一网络场景下的用户数量小于所述第二网络场景下的用户数量;Determine a target network scenario corresponding to the computing task based on the attribute information, wherein the target network scenario is one of the following: a first network scenario, a second network scenario, and the number of users in the first network scenario is less than the The number of users in the second network scenario;若所述目标网络场景为所述第一网络场景,则将所述第一分配策略作为所述目标分配策略;If the target network scenario is the first network scenario, use the first allocation strategy as the target allocation strategy;若所述目标网络场景为所述第二网络场景,则将所述第二分配策略作为所述目标分配策略。If the target network scenario is the second network scenario, the second allocation strategy is used as the target allocation strategy.3.根据权利要求1所述的方法,其特征在于,通过目标模型确定每个计算节点的空闲算力资源信息,包括:3. The method according to claim 1, characterized in that determining the idle computing resource information of each computing node through the target model includes:获取所述每个计算节点的算力资源信息和所述每个计算节点的待计算的计算任务量,其中,所述算力资源信息至少包括逻辑运算资源的资源数据、并行计算资源的资源数据以及神经网络计算资源的资源数据;Obtain the computing resource information of each computing node and the amount of computing tasks to be calculated for each computing node, wherein the computing resource information at least includes resource data of logical operation resources and resource data of parallel computing resources. and resource data for neural network computing resources;确定所述待计算的计算任务量对所述逻辑运算资源的需求信息、对所述并行计算资源的需求信息以及对所述神经网络计算资源的需求信息,得到所述待计算的计算任务量对应的算力需求信息;Determine the demand information of the computing task to be calculated on the logical operation resources, the demand information on the parallel computing resources and the demand information on the neural network computing resources, and obtain the corresponding information on the computing task to be calculated. Computing power demand information;通过所述目标模型对所述待计算的计算任务量对应的算力需求信息和所述算力资源信息进行计算,得到所述每个计算节点的空闲算力资源信息。The computing power demand information corresponding to the computing task amount to be calculated and the computing power resource information are calculated through the target model to obtain the idle computing power resource information of each computing node.4.根据权利要求1所述的方法,其特征在于,依据所述算力需求信息和所述空闲算力资源信息,从多个计算节点中确定目标计算节点,包括:4. The method according to claim 1, characterized in that, based on the computing power demand information and the idle computing power resource information, determining a target computing node from a plurality of computing nodes, including:依据所述算力需求信息和所述空闲算力资源信息,判断所述每个计算节点是否满足所述计算任务的算力需求,得到第一判断结果;Determine whether each computing node meets the computing power requirements of the computing task based on the computing power demand information and the idle computing power resource information, and obtain a first judgment result;依据所述第一判断结果,从所述多个计算节点中确定满足所述算力需求的计算节点,得到所述目标计算节点。According to the first judgment result, a computing node that meets the computing power requirement is determined from the plurality of computing nodes to obtain the target computing node.5.根据权利要求1所述的方法,其特征在于,在所述目标分配策略为所述第一分配策略的情况下,依据所述目标分配策略将所述计算任务分配至所述目标计算节点,包括:5. The method of claim 1, wherein when the target allocation strategy is the first allocation strategy, the computing task is allocated to the target computing node according to the target allocation strategy. ,include:获取所述计算任务的时延数据和能耗数据,其中,所述时延数据用于表征所述计算任务的传输时长,所述能耗数据用于表征所述计算任务的传输能耗;Obtain the delay data and energy consumption data of the computing task, wherein the delay data is used to characterize the transmission duration of the computing task, and the energy consumption data is used to characterize the transmission energy consumption of the computing task;判断所述时延数据是否满足第一判定条件,得到第二判断结果,并判断所述能耗数据是否满足第二判定条件,得到第三判断结果,其中,所述第一判定条件用于确定所述时延数据是否小于预设时延阈值,所述第二判定条件用于确定所述能耗数据是否小于预设能耗阈值;It is judged whether the delay data satisfies the first judgment condition to obtain a second judgment result, and it is judged whether the energy consumption data satisfies the second judgment condition and a third judgment result is obtained, wherein the first judgment condition is used to determine Whether the delay data is less than a preset delay threshold, and the second determination condition is used to determine whether the energy consumption data is less than a preset energy consumption threshold;若所述第二判断结果表征所述时延数据满足所述第一判定条件,且所述第三判断结果表征所述能耗数据满足所述第二判定条件,则将所述计算任务分配至所述目标计算节点。If the second judgment result represents that the delay data satisfies the first judgment condition, and the third judgment result represents that the energy consumption data satisfies the second judgment condition, then the computing task is assigned to The target computing node.6.根据权利要求1所述的方法,其特征在于,在所述目标分配策略为所述第二分配策略的情况下,依据所述目标分配策略将所述计算任务分配至所述目标计算节点,包括:6. The method according to claim 1, characterized in that, when the target allocation strategy is the second allocation strategy, the computing task is allocated to the target computing node according to the target allocation strategy. ,include:获取所述计算任务的时延数据和能耗数据,并获取所述目标计算节点的计算时延数据和计算能耗数据,其中,所述计算时延数据用于表征所述目标计算节点的计算时长,所述计算能耗数据用于表征所述目标计算节点的计算能耗;Obtain the latency data and energy consumption data of the computing task, and acquire the computing latency data and computing energy consumption data of the target computing node, where the computing latency data is used to characterize the computing of the target computing node. Duration, the computing energy consumption data is used to characterize the computing energy consumption of the target computing node;依据所述时延数据和所述计算时延数据进行计算,得到所述计算任务对应的总时延,并依据所述能耗数据和所述计算能耗数据进行计算,得到所述计算任务对应的总能耗;Perform calculations based on the delay data and the calculation delay data to obtain the total delay corresponding to the computing tasks, and perform calculations based on the energy consumption data and the computing energy consumption data to obtain the corresponding calculation tasks total energy consumption;判断所述总时延和所述总能耗是否满足目标约束条件,得到第四判断结果,其中,所述目标约束条件用于表征所述总时延和所述总能耗之间的关联关系;Determine whether the total delay and the total energy consumption satisfy the target constraint, and obtain a fourth judgment result, wherein the target constraint is used to characterize the correlation between the total delay and the total energy consumption. ;若所述第四判断结果表征所述总时延和所述总能耗满足所述目标约束条件,则将所述计算任务分配至所述目标计算节点。If the fourth judgment result indicates that the total delay and the total energy consumption satisfy the target constraint, then the computing task is allocated to the target computing node.7.根据权利要求1所述的方法,其特征在于,在依据所述目标分配策略将所述计算任务分配至所述目标计算节点之后,所述方法还包括:7. The method according to claim 1, characterized in that, after allocating the computing task to the target computing node according to the target allocation policy, the method further includes:接收所述目标计算节点返回的任务计算结果,并将所述任务计算结果发送至所述终端节点。Receive the task calculation result returned by the target computing node, and send the task calculation result to the terminal node.8.一种计算任务的分配装置,其特征在于,包括:8. A device for allocating computing tasks, characterized in that it includes:第一接收模块,用于接收终端节点发送的计算任务请求,其中,所述计算任务请求中至少包括计算任务的属性信息和任务信息;The first receiving module is configured to receive a computing task request sent by the terminal node, wherein the computing task request at least includes attribute information and task information of the computing task;第一确定模块,用于依据所述属性信息确定所述计算任务对应的目标分配策略,并依据所述任务信息确定所述计算任务对应的算力需求信息,其中,所述目标分配策略为以下之一:第一分配策略、第二分配策略,所述第一分配策略的分配规则和所述第二分配策略的分配规则不同,所述算力需求信息表征处理所述计算任务所需的算力资源的信息;The first determination module is used to determine the target allocation strategy corresponding to the computing task based on the attribute information, and determine the computing power demand information corresponding to the computing task based on the task information, wherein the target allocation strategy is as follows One: a first allocation strategy and a second allocation strategy, the allocation rules of the first allocation strategy and the allocation rules of the second allocation strategy are different, and the computing power demand information represents the computing power required to process the computing task. human resource information;第二确定模块,用于通过目标模型确定每个计算节点的空闲算力资源信息,并依据所述算力需求信息和所述空闲算力资源信息,从多个计算节点中确定目标计算节点;The second determination module is used to determine the idle computing resource information of each computing node through the target model, and determine the target computing node from multiple computing nodes based on the computing power demand information and the idle computing resource information;第一处理模块,用于依据所述目标分配策略将所述计算任务分配至所述目标计算节点。A first processing module configured to allocate the computing task to the target computing node according to the target allocation policy.9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至7任一项中所述的计算任务的分配方法。9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any one of claims 1 to 7 when running. The method of allocating computing tasks.10.一种电子设备,其特征在于,所述电子设备包括一个或多个处理器;存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现用于运行程序,其中,所述程序被设置为运行时执行所述权利要求1至7任一项中所述的计算任务的分配方法。10. An electronic device, characterized in that the electronic device includes one or more processors; a memory for storing one or more programs. When the one or more programs are processed by the one or more When the processor is executed, the one or more processors are configured to execute a program, wherein the program is configured to execute the computing task allocation method described in any one of claims 1 to 7 during runtime.
CN202311745244.8A2023-12-182023-12-18Distribution method and device of computing tasks, storage medium and electronic equipmentPendingCN117724840A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311745244.8ACN117724840A (en)2023-12-182023-12-18Distribution method and device of computing tasks, storage medium and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311745244.8ACN117724840A (en)2023-12-182023-12-18Distribution method and device of computing tasks, storage medium and electronic equipment

Publications (1)

Publication NumberPublication Date
CN117724840Atrue CN117724840A (en)2024-03-19

Family

ID=90204871

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311745244.8APendingCN117724840A (en)2023-12-182023-12-18Distribution method and device of computing tasks, storage medium and electronic equipment

Country Status (1)

CountryLink
CN (1)CN117724840A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118967900A (en)*2024-10-182024-11-15浙江惠利玛产业互联网有限公司 A cloud-based 3D effect rendering method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118967900A (en)*2024-10-182024-11-15浙江惠利玛产业互联网有限公司 A cloud-based 3D effect rendering method and system

Similar Documents

PublicationPublication DateTitle
CN102958166B (en)A kind of resource allocation methods and resource management platform
CN103327072B (en)Cluster load balancing method and system
WO2023050712A1 (en)Task scheduling method for deep learning service, and related apparatus
CN111124662A (en) A fog computing load balancing method and system
CN112286623B (en) An information processing method and device, storage medium
CN116366658B (en) A cloud computing load balancing method and system
CN111798113A (en)Resource allocation method, device, storage medium and electronic equipment
CN111314869A (en) Traffic quota allocation method, device, electronic device and storage medium
CN108874324A (en)A kind of access request processing method, device, equipment and readable storage medium storing program for executing
WO2016008338A1 (en)I/o request processing method and storage system
CN117724840A (en)Distribution method and device of computing tasks, storage medium and electronic equipment
CN115543619A (en)Edge calculation method for realizing multi-network data heterogeneous fusion
CN116361006B (en) Computing network resource collaborative scheduling method and system for storage and computing separation
CN110007867A (en) A cache space allocation method, device, device and storage medium
CN104811466B (en)The method and device of cloud media resource allocation
CN109032812A (en)A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
CN113282369B (en)Virtual machine scheduling method, device, medium and equipment
CN119440847A (en) A load balancing scheduling method, device and electronic device for model reasoning
CN109376006A (en) A resource integration method based on time-varying characteristics of user needs in cloud computing environment
CN105187483B (en)Distribute the method and device of cloud computing resources
CN108984321A (en)A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
CN109062683A (en)The method, apparatus and computer readable storage medium of host resource distribution
CN106411782B (en) A bandwidth compensation method and device
CN117424820A (en)Network slice time delay constraint resource allocation method and device and electronic equipment
CN117395252A (en)Cooperative game theory-based heterogeneous resource load balancing method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Country or region after:China

Address after:100037 No. 31, Fuchengmenwai Street, Xicheng District, Beijing 4th Floor, Room 429D

Applicant after:Tianyi Payment Technology Co.,Ltd.

Address before:429D, 4th Floor, No. 31 Fuchengmenwai Street, Xicheng District, Beijing

Applicant before:TIANYI ELECTRONIC COMMERCE Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp