Method and apparatus for allocating computing tasks, electronic device, and storage medium
By using a central server to calculate task allocation methods in the rail power distribution system, and by employing a method that minimizes the energy consumption of intelligent terminals and the central server, the problem of low computational efficiency is solved, and more efficient computational task processing is achieved.
Patent Information
- Application Number
- CN202411368263.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In systems such as rail power distribution systems that require the management of large amounts of data, existing technologies have failed to effectively utilize the computing resources of smart terminals, resulting in low computing efficiency.
By calculating the total energy consumption of each computing task across multiple computing entities through a central server, the lowest-cost task allocation method distributes computing tasks to multiple computing entities for execution, thereby reducing the computing pressure on the central server.
It improves the overall computing efficiency of the computing system, reduces the energy consumption of the computing system, and improves the efficiency of computing task processing.
Smart Images

Figure CN119356851B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computing task allocation technology, and in particular to a computing task allocation method, apparatus, electronic device, and storage medium. Background Technology
[0002] In systems such as rail power distribution systems that require the management of large amounts of data, maintenance personnel typically deploy numerous smart terminals and sensors at the network edge to monitor equipment operating status in real time. This generates a large number of computational tasks that need to be processed. To address these tasks, existing technologies usually rely on centralized processing via servers, failing to flexibly utilize the computing resources of smart terminals, thus leading to problems such as low computational efficiency. Summary of the Invention
[0003] To address the aforementioned problems, this application provides a method, apparatus, electronic device, and storage medium for allocating computing tasks, which helps to solve problems such as low computing efficiency in computing systems.
[0004] To achieve the above objectives, in a first aspect, embodiments of this application provide a method for allocating computing tasks, characterized in that it is applied to a central server of a computing system, the computing system including n+1 computing entities, each computing entity including n smart terminals and a central server, the method comprising: acquiring m task data sent by the n smart terminals, the m task data corresponding to m computing tasks, the m computing tasks being generated by the n smart terminals; calculating m computing energy consumptions based on the m task data, the computing energy consumption being the energy consumption generated by the corresponding computing task being executed in any computing entity; calculating m transmission energy consumptions based on the m task data, the transmission energy consumption being the energy consumption generated by the corresponding computing task being transmitted to any computing entity; generating a task allocation result based on the m computing energy consumptions and the m transmission energy consumptions, the task allocation result corresponding to the allocation method of the m computing tasks with the lowest total energy consumption, the total energy consumption including the m computing energy consumptions and the m transmission energy consumptions.
[0005] As can be seen, in this embodiment of the application, the central server calculates the task allocation method with the lowest total energy consumption among all possible allocation methods for each of the m computing tasks, and allocates the computing tasks to multiple computing entities for execution, thereby reducing the computing pressure on the central server, improving the overall computing efficiency of the computing system and reducing the energy consumption of the computing system.
[0006] In conjunction with the first aspect, in one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, the task data includes the computing resources required for the corresponding computing task, and the computing energy consumption satisfies the following formula:
[0007]
[0008] in, E ij c The energy consumption generated when the computing tasks generated by the intelligent terminal i are executed on the computing entity j; k To calculate the energy consumption coefficient, k >0; C i For smart terminals i The computing resources required for the resulting computational tasks; r ij For the main body of calculation j Assigned to smart terminals i The computing resources required for the generated computational tasks.
[0009] As can be seen, in this embodiment of the application, by calculating the energy consumption coefficient, the required computing resources of the computing task, and the computing resources allocated to the computing task by the computing entity, the computing energy consumption generated when each computing task is executed on any computing entity can be calculated. Then, the central server can determine the computing task allocation method with the lowest total energy consumption based on the computing energy consumption generated when each computing task is executed on any computing entity, thereby reducing the energy consumption of the computing system.
[0010] In conjunction with the first aspect, in one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task data includes the input data volume and output data volume of the corresponding computing task; calculating m transmission energy consumptions based on m task data includes: calculating the transmission rate of the computing system, the transmission rate satisfying the following formula:
[0011]
[0012] in, R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them; W To calculate the bandwidth of the system; p i t For smart terminals i The transmission power; H ij For smart terminals i With computing entity j Channel gain between; ω To reduce the ambient noise level of the computing system; p h t H hj This represents the transmission impact from other computing entities on the same channel;
[0013] Calculate the transmission energy consumption of m computing tasks based on the transmission rate, the amount of input data and the amount of output data for m computing tasks.
[0014] As can be seen, in this embodiment of the application, the central server considers the transmission energy consumption generated by sending the input data of the computing task and the transmission energy consumption generated by the computing results after the computing task is completed when calculating the transmission energy consumption, thereby improving the accuracy of the calculated transmission energy consumption.
[0015] In conjunction with the first aspect, in one possible embodiment, calculating the transmission energy consumption of the m computing tasks based on the transmission rate, the amount of input data, and the amount of output data of the m computing tasks includes: determining the transmission target of each of the m computing tasks; if the transmission target of the computing task is the central server, the transmission energy consumption of the computing task satisfies the following formula:
[0016]
[0017] in, E ij t The computing tasks generated by the smart terminal i are transmitted to the computing entity. j The transmission energy consumed during execution, and the computing entity j Central server; D i For smart terminals i The amount of input data generated for the computational task. B i For smart terminals i The amount of output data generated by the computational task p i r For smart terminals i The receiving power, R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them;
[0018] If the target of the computation task is a smart terminal, the transmission energy consumption satisfies the following formula:
[0019]
[0020] in: E ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. jThe transmission energy consumed during execution, and the computing entity j For smart terminals; D i For smart terminals i The amount of input data generated for the computational task; B i For smart terminals i The amount of output data generated by the computational task; p j r For the main body of calculation j The received power; p j t For the main body of calculation j The transmission power; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them.
[0021] As can be seen, in this embodiment of the application, when calculating transmission energy consumption, only the energy consumption generated by the smart terminal transmitting and receiving relevant data of computing tasks is calculated, and the energy consumption generated by the central server with sufficient computing power transmitting and receiving relevant data of computing tasks is not calculated. This allows the impact of the central server's transmission energy consumption on the allocation of computing tasks to be ignored, and more computing tasks to be assigned to the central server with high computing power, thereby improving the computing task processing efficiency of the computing system.
[0022] In conjunction with the first aspect, in one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task data includes the required computing resources, input data volume, output data volume, and maximum latency of the corresponding computing task. In the task allocation result, the task duration of any computing task is no greater than the corresponding maximum latency. The method further includes: calculating the execution time of the m computing tasks based on their required computing resources, where the execution time satisfies the following formula:
[0023]
[0024] in, T ij c Characterizing smart terminals i The generated computational tasks are handled by the computational entity. j Execution time; C i For smart terminals i The computing resources required for the resulting computational tasks;r ij For smart terminals i Execution Calculation Entity j The computing resources provided per unit time for executing the assigned computing tasks; the transmission time of the m computing tasks is calculated based on the input and output data amounts of the m computing tasks, and the transmission time satisfies the following formula:
[0025]
[0026] in, T ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j Transmission time; D i For smart terminals i The amount of input data generated for the computational task. B i For smart terminals i The amount of output data generated by the computational task; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between the m computing tasks is determined; the processing mode of each computing task is determined; if the processing mode of the computing task is non-local processing, the sum of the execution time and transmission time of the computing task is determined as the task time of the computing task; if the processing mode of the computing task is local processing, the execution time of the computing task is determined as the task time of the computing task.
[0027] As can be seen, in this embodiment of the application, by determining the task time of the computing task executed on different computing entities, the allocation scheme in the task allocation result where the task time of the computing task exceeds the maximum delay is prevented, thus ensuring that the computing tasks in the computing system can be completed in a timely manner.
[0028] In conjunction with the first aspect, in one possible embodiment, the set of smart terminal IDs is T, and the set of computing entity IDs is M. The task allocation result is generated based on m computing energy consumptions and m transmission energy consumptions, including: inputting the m computing energy consumptions and m transmission energy consumptions into a resource allocation model, and using the task allocation moments output by the resource allocation model as the task allocation result. The convergence objective of the resource allocation model is as follows:
[0029]
[0030] in, a ij Assign a matrix to the task, if the smart terminal i The generated computational tasks are assigned to the computational entity. j implement a ij =1, otherwise a ij =0, i ∈T, j ∈M; E ij c Characterizing smart terminals i The generated tasks are in the computing entity j Energy consumption during execution; E ij t Characterizing smart terminals i The generated tasks are transmitted to the computing entity. j Energy consumption generated during execution.
[0031] In conjunction with the first aspect, in one possible embodiment, each computational task is executed by a computational agent, and the convergence objective satisfies the following constraint C1:
[0032] .
[0033] Secondly, embodiments of this application provide a computing task allocation apparatus for executing a computing task allocation method. The apparatus belongs to a computing system, which includes n+1 computing entities, each computing entity including n smart terminals and a central server. The apparatus includes:
[0034] Acquisition Unit: Used to acquire m task data sent by n smart terminals, where the m task data correspond to m computing tasks, and the m computing tasks are generated by the n smart terminals;
[0035] The computing unit is used to: calculate m computing energy consumptions based on m task data, where the computing energy consumption is the energy consumption generated by the corresponding computing task when it is executed in any computing entity;
[0036] Calculate m transmission energy consumptions based on m task data. Transmission energy consumption is the energy consumption generated when the corresponding computing task is transmitted to any computing entity.
[0037] Generation Unit: Used to generate task allocation results based on m computing energy consumption and m transmission energy consumption. The task allocation results correspond to the allocation method of m computing tasks with the lowest total energy consumption. The total energy consumption includes m computing energy consumption and m transmission energy consumption.
[0038] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, and one or more instructions being adapted to be loaded by the processor and execute part or all of the method as described in the first aspect.
[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform part or all of the methods as described in the first aspect.
[0040] Fifthly, this application provides a computer program product that, when read and executed by a computer, causes the computer to perform part or all of the method described in the first aspect.
[0041] It is understood that the beneficial effects of the embodiments described in the second to fifth aspects can be referred to the beneficial effects of the method described in the first aspect, and will not be repeated here. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A schematic diagram illustrating an application scenario of a computing task allocation method provided in an embodiment of this application;
[0044] Figure 2 A flowchart illustrating a method for allocating computing tasks according to an embodiment of this application;
[0045] Figure 3 A schematic diagram illustrating the execution process of a computing task provided in an embodiment of this application;
[0046] Figure 4A A schematic diagram illustrating a task allocation result provided in an embodiment of this application;
[0047] Figure 4B A schematic diagram illustrating another task allocation result provided in an embodiment of this application;
[0048] Figure 5 A flowchart illustrating another method for allocating computing tasks provided in an embodiment of this application;
[0049] Figure 6A schematic diagram of a computing task allocation device provided in an embodiment of this application;
[0050] Figure 7 This application provides a schematic diagram of the structure of an electronic device. Detailed Implementation
[0051] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0052] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0053] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0054] The embodiments of this application will now be described with reference to the accompanying drawings.
[0055] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of a computing task allocation method provided in an embodiment of this application. Application scenario 100 includes a central server 101 and n smart terminals 102. The central server 101 and the multiple smart terminals belong to a computing system. The central server 101 is used to determine how to allocate the m computing tasks generated by the multiple smart terminals 102 in the computing system.
[0056] In this embodiment, only the case of three smart terminals 102 communicating with a central server 101 is shown. In a real scenario, there may be more or fewer smart terminals 102.
[0057] The central server 101 receives m task data points sent by n smart terminals 102. These task data points correspond to m computational tasks. Each computational task is generated by one or more of the n smart terminals 102. The task data records information such as the computation content, computational load, and source of the computational task.
[0058] The central server 101 calculates m computing energy consumptions based on m task data. Each computing energy consumption corresponds to the energy consumption generated by the computing task executed by any computing entity. The computing entities here include the central server 101 and n smart terminals 102.
[0059] The central server 101 calculates m transmission energy consumptions based on m task data. Here, transmission energy consumption refers to the energy consumption generated when the corresponding computing task is transmitted to any computing entity.
[0060] After determining the specific values of computational and transmission energy consumption that each computing task will generate in each computing entity, the central server generates a task allocation result based on the m computational energy consumption and m transmission energy consumption. The task allocation result corresponds to the allocation method of the m computing tasks to minimize the total energy consumption, which includes the m computational energy consumption and m transmission energy consumption. In other words, the task allocation result records how to allocate each computing task to achieve the minimum total energy consumption after completing all m computing tasks.
[0061] As can be seen, in this embodiment of the application, the central server calculates the task allocation method with the lowest total energy consumption among all possible allocation methods for each of the m computing tasks, and allocates the computing tasks to multiple computing entities for execution, thereby reducing the computing pressure on the central server, improving the overall computing efficiency of the computing system and reducing the energy consumption of the computing system.
[0062] Please see Figure 2 , Figure 2 This application provides a flowchart illustrating a method for allocating computational tasks, which can be based on... Figure 1 The application scenarios shown are implemented as follows: Figure 2 As shown, steps S201-S204 are included:
[0063] S201: The central server obtains m task data sent by n smart terminals. The m task data correspond to m computing tasks, and the m computing tasks are generated by the n smart terminals.
[0064] Specifically, the computing tasks here are generated by n smart terminals. After a smart terminal generates a computing task, it collects and acquires task data, which includes information such as the content of the corresponding computing task, the amount of input data, and the amount of output data. The smart terminal sends the task data to the central server so that the central server can determine how to allocate all m computing tasks in the computing system based on the information in the task data, so as to achieve the goal of minimizing the energy consumption of the computing system when processing m computing tasks.
[0065] Optionally, in one possible embodiment, after receiving the task data sent by the smart terminal, the central server stores the task data; if the number of stored task data is greater than a preset number or the interval between the last processing of the computing task is greater than a preset time, then the subsequent steps S202 and subsequent steps are executed; the estimated processing time is sent to the smart terminal, the estimated processing time is the estimated time for the central server to process the stored computing task next, and the estimated time is used by the smart terminal to determine whether it needs to send the task data of the new computing task to the central server after generating a new computing task.
[0066] As can be seen, in this embodiment of the application, the central server sends the estimated processing time of the computing task to the smart terminal, so that the smart terminal can estimate the processing time of the new computing task locally after generating a new computing task. If the processing time is greater than the estimated processing time, the new computing task is processed locally directly, thereby improving the processing efficiency of the computing system.
[0067] S202: The central server calculates the energy consumption of m tasks based on the data of m tasks. The energy consumption is the energy consumption generated by the corresponding computing task when it is executed by any computing entity.
[0068] Specifically, the central server here calculates the computing energy consumption of each computing task based on the data of m computing tasks. The computing energy consumption is the energy consumption generated when the corresponding computing task is executed on any computing entity. In other words, the computing energy consumption includes the energy consumption that may be generated when each computing task is executed on any computing entity.
[0069] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, the task data includes the computing resources required for the corresponding computing task, and the computing energy consumption satisfies the following formula (1):
[0070] (1)
[0071] in, E ij c The computing tasks generated for the smart terminal i are in the computing entity j Energy consumption generated during execution; kTo calculate the energy consumption coefficient, k >0; C i For smart terminals i The computing resources required for the resulting computational tasks; r ij For the main body of calculation j Assigned to smart terminals i The computing resources required for the generated computational tasks.
[0072] Specifically, the n smart terminals are numbered 1, 2, 3...n, and the set of smart terminal numbers is T, which includes 1, 2, 3...n. The computing entity consists of n smart terminals and a central server, which is numbered 0. That is to say, the set of computing entity numbers M includes 0, 1, 2, 3...n.
[0073] In this embodiment, the task data includes the computing resources required for the corresponding computing task, i.e., the computing power required by the computing entity to complete the corresponding computing task. The computing energy consumption of the computing task is calculated based on the computing resources, satisfying equation (1), where the computing coefficient is... k and computing entity j Assigned to smart terminals i Computational resources of the generated computational tasks r ij The specific value is stored in the central server.
[0074] As can be seen, in this embodiment of the application, by calculating the energy consumption coefficient, the required computing resources of the computing task, and the computing resources allocated to the computing task by the computing entity, the computing energy consumption generated when each computing task is executed on any computing entity can be calculated. Then, the central server can determine the computing task allocation method with the lowest total energy consumption based on the computing energy consumption generated when each computing task is executed on any computing entity, thereby reducing the energy consumption of the computing system.
[0075] S203: The central server calculates m transmission energy consumptions based on m task data. The transmission energy consumption is the energy consumption generated when the corresponding computing task is transmitted to any computing entity.
[0076] Specifically, the transmission energy consumption here refers to the energy consumed when a corresponding computing task is transmitted between any two computing entities. Each computing task is generated on a different smart terminal. However, when a smart terminal generates a computing task, it may be unable to handle the task itself due to reasons such as being executing other computing tasks or having insufficient computing power to process the task at hand. In this case, the computing task needs to be sent to other computing entities for computation, thus incurring transmission energy consumption.
[0077] The transmission energy consumption here refers to the energy consumed when transmitting a computing task to any computing entity. In other words, transmission energy consumption includes the energy consumed when transmitting a task to any computing entity. If the computing task is transmitted to the computing entity that generated the task, meaning the task is executed locally, there will be no transmission energy consumption, or the transmission energy consumption will be zero.
[0078] In one possible embodiment, the set of smart terminal numbers is T, the set of computing entity numbers is M, and the task data includes the input data and output data of the corresponding computing task; calculating m transmission energy consumption based on m task data includes: calculating the transmission rate of the computing system, the transmission rate satisfying the following formula (2):
[0079] (2)
[0080] in, R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them; W To calculate the bandwidth of the system; p i t For smart terminals i The transmission power; H ij For smart terminals i With computing entity j Channel gain between; ω To reduce the ambient noise level of the computing system; p h t H hj This represents the transmission impact from other computing entities on the same channel; based on the transmission rate, the input data volume and output data volume of m computing tasks, calculate the transmission energy consumption of m computing tasks.
[0081] Specifically, the input data volume here refers to the amount of data required to perform the corresponding computing task. This input data is sent from the smart terminal that generates the computing task to the computing entity that ultimately executes the computing task. The input data volume is specifically used to calculate the transmission energy consumption generated when sending the computing task from the smart terminal that generates the computing task to the computing entity that executes the computing task.
[0082] The output data volume here refers to the amount of output data obtained after the corresponding computing task is completed. The output data is sent back to the smart terminal that generated the corresponding computing task. Therefore, the output data volume is specifically used to calculate the transmission energy consumption generated when sending the computing results of the computing task back to the smart terminal that generated the computing task.
[0083] In addition, it is necessary to calculate the transmission rate of the computing system. The transmission rate here includes the data transmission rate between any two computing entities, which is specifically calculated using equation (2), where the bandwidth of the computing system is the intelligent terminal. i Transmission power, smart terminals i With computing entity j The channel gain between them, the environmental noise floor of the computing system, and the transmission impact from other computing entities can be read and stored by the central server, or determined directly according to a preset correspondence.
[0084] The central server calculates the transmission energy consumption of m computing tasks based on the transmission rate, the amount of input data and the amount of output data of m computing tasks. In other words, the central server simultaneously considers the transmission energy consumption generated when the computing task is sent from the intelligent terminal that generates the computing task to the computing entity that executes the computing task before processing, and the transmission energy consumption generated when the computing result of the computing task is sent back to the intelligent terminal that generates the computing task after processing.
[0085] For example, please see Figure 3 , Figure 3 This illustration shows the execution process of a computing task according to an embodiment of this application. The computing task is generated in a first smart terminal and computed in a second smart terminal. First, the first smart terminal sends the computing task to the second smart terminal. This transmission energy consumption occurs once when the first smart terminal sends the computing task and the second smart terminal receives it. Then, after the second smart terminal receives the computing task, completes the computation, and sends the computation result back to the first smart terminal, another transmission energy consumption occurs. Therefore, a central server needs to calculate the transmission energy consumption of the computing task based on the transmission rate, the amount of input data, and the amount of output data.
[0086] As can be seen, in this embodiment of the application, the central server considers the transmission energy consumption generated by sending the input data of the computing task and the transmission energy consumption generated by the computing results after the computing task is completed when calculating the transmission energy consumption, thereby improving the accuracy of the calculated transmission energy consumption.
[0087] In one possible embodiment, the transmission energy consumption of the m computing tasks is calculated based on the transmission rate, the amount of input data and the amount of output data of the m computing tasks, including: determining the transmission object of each computing task in the m computing tasks; if the transmission object of the computing task is the central server, the transmission energy consumption of the computing task satisfies the following formula (3):
[0088] (3)
[0089] in, E ij tThe computing tasks generated by the smart terminal i are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j Central server; D i For smart terminals i The amount of input data generated for the computational task. B i For smart terminals i The amount of output data generated by the computational task p i r For smart terminals i The received power; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them.
[0090] If the target of the computing task is a smart terminal, the transmission energy consumption satisfies the following formula (4):
[0091] (4)
[0092] in: E ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j The transmission energy consumed during execution, and the computing entity j For smart terminals; D i For smart terminals i The amount of input data generated for the computational task; B i For smart terminals i The amount of output data generated by the computational task; p j r For the main body of calculation j The received power; p j t For the main body of calculation j The transmission power; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entityj Transmitted to smart terminal i The transmission rate between them.
[0093] Specifically, when analyzing the transmission energy consumption of a computing task, it is necessary to analyze the transmission object of the computing task. When the transmission object of the computing task is the central server, that is, when the computing entity is the central server, the transmission energy consumption of the computing task satisfies equation (3). Here, only the smart terminal is calculated. i The energy consumption generated when transmitting computing tasks to the central server is taken into account. This is because the central server has sufficient computing resources and transmitting and computing a large number of computing tasks will not affect the execution efficiency of the computing tasks. Therefore, in this embodiment of the application, if the executing entity is the central server, the energy consumption generated by the central server receiving the input data of the computing tasks and sending the output data of the computing tasks is not calculated when considering the energy consumption of data transmission.
[0094] When the transmission target of the computing task is a smart terminal, that is, when the computing entity is a smart terminal, the limited computing power and transmission efficiency of the smart terminal need to be considered. If a large amount of the smart terminal's resources are used for data transmission and computing, the computing task may not be able to quickly obtain the computing results and transmit the computing results to the corresponding smart terminal in a timely manner. Therefore, when the transmission target of the computing task is a smart terminal, the transmission energy consumption satisfies equation (4). That is to say, in this embodiment of the application, when the central server calculates the transmission energy consumption of the computing task, it calculates the energy consumption generated by the smart terminal that generates the computing task in sending the computing task and receiving the computing results, as well as the energy consumption generated by the smart terminal that executes the computing task in receiving and executing the task and sending the computing results.
[0095] As can be seen, in this embodiment of the application, when calculating transmission energy consumption, only the energy consumption generated by the smart terminal transmitting and receiving relevant data of computing tasks is calculated, and the energy consumption generated by the central server with sufficient computing power transmitting and receiving relevant data of computing tasks is not calculated. This allows the impact of the central server's transmission energy consumption on the allocation of computing tasks to be ignored, and more computing tasks to be assigned to the central server with high computing power, thereby improving the computing task processing efficiency of the computing system.
[0096] S204: The central server generates task allocation results based on m computing energy consumption and m transmission energy consumption. The task allocation results correspond to the allocation method of m computing tasks when the total energy consumption is the lowest. The total energy consumption includes m computing energy consumption and m transmission energy consumption.
[0097] Specifically, after determining the computational and transmission energy consumption that each computational task will generate when processed in any computational entity, it is possible to determine how to allocate m computational tasks to minimize the total energy consumption.
[0098] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task allocation result is generated based on m computing energy consumptions and m transmission energy consumptions, including:
[0099] Input m computational energy consumptions and m transmission energy consumptions into the resource allocation model, and use the task allocation moments output by the resource allocation model as the task allocation result. The convergence objective of the resource allocation model is as follows (5):
[0100] (5)
[0101] in, a ij Assign a matrix to the task, if the smart terminal i The generated computational tasks are assigned to the computational entity. j implement a ij =1, otherwise a ij =0, i ∈T, j ∈M; E ij c Characterizing smart terminals i The generated tasks are in the computing entity j Energy consumption during execution; E ij t Characterizing smart terminals i The generated tasks are transmitted to the computing entity. j Energy consumption generated during execution.
[0102] Specifically, in this embodiment, the resources are used to output the allocation method with the lowest total energy consumption from all possible allocation methods of the m computing tasks based on the computing energy consumption and transmission energy consumption of the m computing tasks. This allocation method is determined by a task allocation matrix. a ij express.
[0103] For example, please see Figure 4A , Figure 4A This is a schematic diagram of a task allocation result provided in an embodiment of this application, wherein the allocation matrix... i The identifier of the smart terminal, jThe numbering of the computing entity indicates that the central server is numbered 0. Taking the elements marked in the box here as an example, an element with a value of 0 in the matrix means that the computing task generated by the corresponding smart terminal numbered 5 is transmitted to the computing entity numbered 5 for execution, and the number of computing tasks is 0. An element with a value of 1 in the matrix means that the computing task generated by the corresponding smart terminal numbered 2 is transmitted to the central server for execution, and the number of computing tasks is 1. The elements in the last column represent the computing tasks processed by the central server. This only shows the task allocation matrix of a computing system with one central server and five smart terminals. In actual applications, there may be more or fewer smart terminals.
[0104] For example, please see Figure 4B , Figure 4B This is a schematic diagram illustrating another task allocation result provided in an embodiment of this application. Each black box represents a computing task, and the position of each black box represents the allocation method of the corresponding computing task. Taking the upper left black box as an example, it represents that the computing task generated by smart device 5 is executed by computing entity 0. Here, smart device 5 is the smart device numbered 5, and computing entity 0 is the central server.
[0105] In one possible embodiment, each computational task is executed by a computational agent, and the convergence objective satisfies the following constraint C1:
[0106] (6).
[0107] Specifically, the constraint C1 here is set to 1 to constrain the task assignment matrix. a ij Each task will be assigned to one execution entity for execution.
[0108] Furthermore, in order to satisfy more allocation rules, the convergence objective here also needs to satisfy more constraints.
[0109] Each smart terminal executes at most one computational task, and the convergence objective satisfies the following constraint C2:
[0110] (7)
[0111] The computational resources required for the task cannot exceed the maximum computational resources that the computing entity can provide, and the convergence objective satisfies the following constraint C3:
[0112] (8)
[0113] Where rjmax is the maximum computing resource of computing entity j.
[0114] The computational entity provides maximum computational resources when performing computational tasks, and the convergence objective satisfies the following constraint C4:
[0115] (9)
[0116] The central server provides more than 0 computing resources when executing computing tasks, and the convergence objective satisfies the following constraint C5:
[0117] (10)
[0118] When no computational task is being executed on the computational entity, the computational entity does not provide computational resources, and the convergence objective satisfies the following constraint C6:
[0119] (11)
[0120] The above-described embodiments of the application describe a method for allocating computing tasks based on computational energy consumption and transmission energy consumption. Based on this, and under the constraint of a maximum latency for each computing task, this application also provides another method for allocating computing tasks. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 A flowchart illustrating another method for allocating computing tasks according to an embodiment of this application includes steps S501-S504:
[0121] S501: The central server obtains m task data sent by n smart terminals. The m task data correspond to m computing tasks, which are generated by the n smart terminals. The task data includes the maximum latency of the corresponding computing task.
[0122] S502: The central server calculates the energy consumption of m tasks based on the data of m tasks. The energy consumption is the energy consumption generated by the corresponding computing task when it is executed by any computing entity.
[0123] S503: The central server calculates m transmission energy consumptions based on m task data. The transmission energy consumption is the energy consumption generated when the corresponding computing task is transmitted to any computing entity.
[0124] For a detailed description of steps S501-S503, please refer to the aforementioned steps S201-S203 and related descriptions, which will not be repeated here.
[0125] S504: The central server generates task allocation results based on m computing energy consumption and m transmission energy consumption. The task allocation results correspond to the allocation method of m computing tasks with the lowest total energy consumption. The total energy consumption includes m computing energy consumption and m transmission energy consumption. The task duration of any computing task in the task allocation results is less than the corresponding maximum latency.
[0126] Specifically, when a computation task is performed according to the task allocation result, the task duration must be less than the corresponding maximum latency. The maximum latency refers to the time limit for the intelligent terminal to process the computation task after it has been generated. The task duration includes both transmission and computation time. In other words, when a computation task is performed according to the task allocation result, the sum of the computation and transmission time of the task cannot exceed the time limit of that task.
[0127] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task data includes the required computing resources, input data volume, output data volume, and maximum latency of the corresponding computing task. In the task allocation result, the task duration of any computing task is no greater than the corresponding maximum latency. The method further includes:
[0128] Calculate the execution time of m computing tasks based on their required computing resources. The execution time satisfies the following formula (12):
[0129] (12)
[0130] in, T ij c Characterizing smart terminals i The generated computational tasks are handled by the computational entity. j Execution time; C i For smart terminals i The computing resources required for the resulting computational tasks; r ij For the main body of calculation j Execution assigned to smart terminals i The computing resources provided by the generated computing tasks per unit of time;
[0131] The transmission time of the m computing tasks is calculated based on the input and output data amounts of the m computing tasks. The transmission time satisfies the following formula (13):
[0132] (13)
[0133] in, T ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j Transmission time; D i For smart terminals i The amount of input data generated for the computational task. B i For smart terminals i The amount of output data generated by the computational taskR ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them;
[0134] Determine the processing mode of each of the m computing tasks; if the processing mode of a computing task is non-local processing, then the sum of the execution time and transmission time of the computing task is determined as the task time of the computing task; if the processing mode of a computing task is local processing, then the execution time of the computing task is determined as the task time of the computing task.
[0135] Specifically, in this embodiment, the computation time required for the computation task is first determined based on the computational resources required by the computational task and the computational resources that the executing entity can provide per unit time. Here, the unit time is specifically determined based on the processor clock frequency of the computing entity. The specific calculation process is shown in equation (12). Then, the transmission time required for the computational task is determined based on the input data volume, output data volume, transmission efficiency of the corresponding computing entity, transmission speed, and other data. The computation process of the computing entity is shown in equation (13).
[0136] Obviously, for computation tasks processed locally, there is no need to transmit the computation task. Therefore, if the processing mode of the computation task is non-local processing, the sum of the execution time and transmission time of the computation task is determined as the task time of the computation task; if the processing mode of the computation task is local processing, the execution time of the computation task is determined as the task time of the computation task.
[0137] Furthermore, if the task allocation results generated based on m computational energy consumptions and m transmission energy consumptions are determined through a resource allocation model, the convergence objective of this resource allocation model also satisfies the following constraint C7:
[0138] (14)
[0139] in T ij For smart terminals i The generated computational tasks are sent to the computational entity. j Task execution time, T i max The maximum latency of the computing task generated by the smart terminal i.
[0140] As can be seen, in this embodiment of the application, by determining the task time of the computing task executed on different computing entities, the allocation scheme in the task allocation result where the task time of the computing task exceeds the maximum delay is prevented, thus ensuring that the computing tasks in the computing system can be completed in a timely manner.
[0141] By implementing the methods in the above-described embodiments, it can be seen that generating the task allocation method corresponding to the lowest total energy consumption through the central server reduces the energy consumption of the computing system and the computational pressure on the central server, thereby improving the overall computational efficiency and reducing the energy consumption of the computing system. Simultaneously considering both computational and transmission energy improves the accuracy of the total energy consumption. Ignoring the impact of the central server's transmission energy consumption on allocation, more computational tasks are assigned to the central server with higher computing power, improving the computational task processing efficiency of the computing system.
[0142] Based on the description of the above configuration method embodiments, this application also provides a computing task allocation device 600, which may be running in... Figure 1 A computer program (including program code) in the application scenario shown. The computing task allocation device 600 can be applied to Figure 1 The application scenarios shown are executed. Figure 2 or Figure 5 The method shown. Please refer to [link / reference]. Figure 6 , Figure 6 This application provides a schematic diagram of a computing task allocation device, which includes:
[0143] Acquisition unit 601: used to acquire m task data sent by n smart terminals, where the m task data correspond to m computing tasks, and the m computing tasks are generated by the n smart terminals;
[0144] Computing unit 602: used to calculate m computing energy consumptions based on m task data, where computing energy consumption is the energy consumption generated by the corresponding computing task when executed by any computing entity;
[0145] Calculate m transmission energy consumptions based on m task data. Transmission energy consumption is the energy consumption generated when the corresponding computing task is transmitted to any computing entity.
[0146] Generation unit 603: is used to generate task allocation results based on m computing energy consumption and m transmission energy consumption. The task allocation results correspond to the allocation method of m computing tasks when the total energy consumption is the lowest. The total energy consumption includes m computing energy consumption and m transmission energy consumption.
[0147] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, the task data includes the computing resources required for the corresponding computing task, and the computing energy consumption satisfies the following formula:
[0148]
[0149] in, E ij c The computing tasks generated for the smart terminal i are in the computing entity j Energy consumption generated during execution; k To calculate the energy consumption coefficient, k >0; C i For smart terminals i The computing resources required for the resulting computational tasks; r ij For the main body of calculation j Assigned to smart terminals i The computing resources required for the generated computational tasks.
[0150] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task data includes the input data and output data of the corresponding computing task; in calculating m transmission energy consumptions based on m task data, the computing unit 602 is further specifically used to: calculate the transmission rate of the computing system, the transmission rate satisfying the following formula:
[0151]
[0152] in, R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them; W To calculate the bandwidth of the system; p i t For smart terminals i The transmission power; H ij For smart terminals i With computing entity j Channel gain between; ω To reduce the ambient noise level of the computing system; p h t H hj This represents the transmission impact from other computing entities on the same channel;
[0153] Calculate the transmission energy consumption of m computing tasks based on the transmission rate, the amount of input data and the amount of output data for m computing tasks.
[0154] In one possible embodiment, in calculating the transmission energy consumption of the m computing tasks based on the transmission rate, the amount of input data and the amount of output data of the m computing tasks, the computing unit 602 is further specifically used to: determine the transmission target of each of the m computing tasks; if the transmission target of the computing task is a central server, the transmission energy consumption of the computing task satisfies the following formula:
[0155]
[0156] in, E ij t The computing tasks generated by the smart terminal i are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j Central server; D i For smart terminals i The amount of input data generated for the computational task. B i For smart terminals i The amount of output data generated by the computational task p i r For smart terminals i The receiving power, R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them;
[0157] If the target of the computation task is a smart terminal, the transmission energy consumption satisfies the following formula:
[0158]
[0159] in: E ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j The transmission energy consumed during execution, and the computing entity j For smart terminals; D i For smart terminals i The amount of input data generated for the computational task; B i For smart terminals i The amount of output data generated by the computational task; p jr For the main body of calculation j The received power; p j t For the main body of calculation j The transmission power; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between them.
[0160] In one possible embodiment, the set of smart terminal IDs is T, the set of computing entity IDs is M, and the task data includes the required computing resources, input data volume, output data volume, and maximum latency of the corresponding computing task. In the task allocation result, the task duration of any computing task is no greater than the corresponding maximum latency. The computing unit 602 is further specifically used to: calculate the execution time of the m computing tasks based on their required computing resources, where the execution time satisfies the following formula:
[0161]
[0162] in, T ij c Characterizing smart terminals i The generated computational tasks are handled by the computational entity. j Execution time; C i For smart terminals i The computing resources required for the resulting computational tasks; r ij For smart terminals i Execution Calculation Entity j The computing resources provided per unit time for executing the assigned computing tasks; the transmission time of the m computing tasks is calculated based on the input and output data amounts of the m computing tasks, and the transmission time satisfies the following formula:
[0163]
[0164] in, T ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j Transmission time; D i For smart terminals i The amount of input data generated for the computational task. Bi For smart terminals i The amount of output data generated by the computational task; R ij For data from smart terminals i Transmitted to computing body j The transmission rate between them R ji For data from the computing entity j Transmitted to smart terminal i The transmission rate between the m computing tasks is determined; the processing mode of each computing task is determined; if the processing mode of the computing task is non-local processing, the sum of the execution time and transmission time of the computing task is determined as the task time of the computing task; if the processing mode of the computing task is local processing, the execution time of the computing task is determined as the task time of the computing task.
[0165] In one possible embodiment, the set of smart terminal IDs is T, and the set of computing entity IDs is M. Regarding generating task allocation results based on m computing energy consumptions and m transmission energy consumptions, the computing unit 602 is further specifically used to: input the m computing energy consumptions and m transmission energy consumptions into the resource allocation model, and use the task allocation moments output by the resource allocation model as the task allocation results. The convergence objective of the resource allocation model is as follows:
[0166]
[0167] in, a ij Assign a matrix to the task, if the smart terminal i The generated computational tasks are assigned to the computational entity. j implement a ij =1, otherwise a ij =0, i ∈T, j ∈M; E ij c Characterizing smart terminals i The generated tasks are in the computing entity j Energy consumption during execution; E ij t Characterizing smart terminals i The generated tasks are transmitted to the computing entity. j Energy consumption generated during execution.
[0168] In one possible embodiment, each computational task is executed by a computational agent, and the convergence objective satisfies the following constraint C1:
[0169] .
[0170] Based on the description of the above method and device embodiments, please refer to... Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 The electronic device 700 shown (specifically, the electronic device 700 may be a computer device, Figure 1 The central server 101 shown includes a memory 701, a processor 702, a communication interface 703, and a bus 704. The memory 701, processor 702, and communication interface 703 are connected to each other via the bus 704.
[0171] The memory 701 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0172] The memory 701 can store programs. When the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 703 are used to execute the various steps of the computing task allocation method of the embodiments of this application.
[0173] The processor 702 may be a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute related programs to achieve the functions required by the units in the electronic device 700 of this application embodiment, or to execute the computing task allocation method of the method embodiment of this application.
[0174] The processor 702 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the computational task allocation method of this application can be completed by the integrated logic circuits in the hardware of the processor 702 or by instructions in software form. The aforementioned processor 702 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 701. The processor 702 reads the information in the memory 701 and, in conjunction with its hardware, performs the functions required by the units included in the electronic device 700 of this application embodiment, or performs the task allocation method of the method embodiment of this application.
[0175] The communication interface 703 uses transceiver devices, such as, but not limited to, transceivers, to enable communication between the electronic device 700 and other devices or communication networks. For example, data can be acquired through the communication interface 703.
[0176] Bus 704 may include a pathway for transmitting information between various components of electronic device 700 (e.g., memory 701, processor 702, communication interface 703).
[0177] It should be noted that, although Figure 7 The illustrated electronic device 700 only shows a memory 701, a processor 702, and a communication interface 703. However, those skilled in the art should understand that in specific implementations, the electronic device 700 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the electronic device 700 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that the electronic device 700 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 7 All the devices shown.
[0178] This application embodiment also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in the memory through the data interface to implement the computing task allocation method.
[0179] Optionally, as one implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the computational task allocation method.
[0180] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods.
[0181] This application also provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform one or more steps of any of the methods described above.
[0182] Those skilled in the art will appreciate that the functionality described in conjunction with the various illustrative logic blocks, modules, and algorithmic steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality described by the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may comprise a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium that includes any medium facilitating the transfer of a computer program from one place to another (e.g., based on a communication protocol). In this way, the computer-readable medium may substantially correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. The data storage medium may be any available medium accessible by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this application. A computer program product may comprise a computer-readable medium.
[0183] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or any other media that can be used to store desired program code in the form of instructions or data structures and is accessible by a computer. Furthermore, any connection is properly referred to as computer-readable media. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are specifically addressed to non-temporary tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. The combination of the above items should also be included in the scope of computer-readable media.
[0184] Instructions can be executed by one or more processors, such as digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the foregoing structures or any other structures suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described in the various illustrative logic blocks, modules, and steps described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Moreover, the techniques can be fully implemented within one or more circuit or logic elements.
[0185] The technology of this application can be implemented in a wide variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs), or a set of ICs (e.g., chipsets). The various components, modules, or units described in this application are intended to emphasize functional aspects of the apparatus for performing the disclosed technology, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units can be combined with suitable software and / or firmware within coded hardware units, or provided via interoperable hardware units (containing one or more processors as described above).
[0186] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the specific descriptions of the corresponding steps in the foregoing method embodiments, and will not be repeated here.
[0187] It should be understood that in the description of this application, unless otherwise stated, " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B can represent A or B; where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Additionally, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply difference. In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner to facilitate understanding.
[0188] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling, direct coupling, or communication connection shown or discussed between each other may be indirect coupling or communication connection through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0190] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be read-only memory (ROM), random access memory (RAM), or magnetic media, such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as digital versatile discs (DVDs), or semiconductor media, such as solid state disks (SSDs).
[0191] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
[0192] The device embodiments described above are merely illustrative. The units and modules described as separate components may or may not be physically separate. Furthermore, some or all of the units and modules can be selected to achieve the purpose of this embodiment, depending on actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0193] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for allocating computational tasks, characterized in that, A central server is applied to a computing system, the computing system comprising n+1 computing entities, each computing entity comprising n smart terminals and a central server, the method comprising: Acquire m task data sent by n smart terminals, wherein the m task data correspond to m computing tasks, and the m computing tasks are generated by the n smart terminals; Calculate m computing energy consumptions based on the m task data, where the computing energy consumption is the energy consumption generated by the corresponding computing task when it is executed by any computing entity. Calculate m transmission energy consumptions based on the m task data, where each transmission energy consumption is the energy consumed when a corresponding computing task is transmitted to any computing entity. The set of smart terminal IDs is T, and the set of computing entity IDs is M. The task data includes the input and output data amounts of the corresponding computing task. Specifically, this includes calculating the transmission rate of the computing system, where the transmission rate satisfies the following formula: Among them, the R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between; W The bandwidth of the computing system; p i t For the smart terminal i The transmission power; H ij For the smart terminal i With the computing entity j The channel gain between; ω The ambient noise floor of the computing system; p h t H hj This represents the transmission impact from other computing entities on the same channel; Based on the transmission rate, the amount of input data for the m computing tasks, and the amount of output data for the m computing tasks, the transmission energy consumption of the m computing tasks is calculated, including: Determine the transmission target for each of the m computing tasks; if the transmission target of the computing task is the central server, the transmission energy consumption of the computing task satisfies the following formula: Among them, the E ij t The computing tasks generated by the smart terminal i are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j As the central server; the D i For smart terminals i The amount of input data generated for the computational task, the B i For smart terminals i The amount of output data generated by the computational task, the p i r For the smart terminal i The received power, the R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between them, the R ji For data from the computing entity j Transmitted to the smart terminal i The transmission rate between them; If the target of the computing task is a smart terminal, the transmission energy consumption satisfies the following formula: Wherein: the E ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j For smart terminals; the D i For the smart terminal i The amount of input data generated for the computational task; the B i For the smart terminal i The amount of output data generated by the computational task; p j r For the computing entity j The received power; p j t For the computing entity j The transmission power; R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between them, the R ji For data from the computing entity j Transmitted to the smart terminal i The transmission rate between them; A task allocation result is generated based on the m computational energy consumptions and the m transmission energy consumptions. The task allocation result corresponds to the allocation method of the m computational tasks when the total energy consumption is the lowest. The total energy consumption includes the m computational energy consumptions and the m transmission energy consumptions.
2. The method according to claim 1, characterized in that, The set of smart terminal IDs is T, the set of computing entity IDs is M, the task data includes the computing resources required for the corresponding computing task, and the computing energy consumption satisfies the following formula: Among them, the E ij c The computing tasks generated for the smart terminal i are in the computing entity j The energy consumption generated during the execution; k To calculate the energy consumption coefficient, k >0; the C i For smart terminals i The computational resources required for the generated computational tasks; r ij For the main body of calculation j Assigned to smart terminals i The computing resources required for the generated computational tasks.
3. The method according to claim 1 or 2, characterized in that, The set of smart terminal IDs is T, the set of computing entity IDs is M, the task data includes the required computing resources, input data volume, output data volume, and maximum latency of the corresponding computing task, and the task duration of any computing task in the task allocation result is not greater than the corresponding maximum latency. The method further includes: The execution time of the m computing tasks is calculated based on the required computing resources of the m computing tasks, and the execution time satisfies the following formula: Among them, the T ij c Characterizing smart terminals i The generated computational tasks are handled by the computational entity. j Execution time; the C i For the smart terminal i The computational resources required for the generated computational tasks; r ij For smart terminals i Execution Calculation Entity j The computing resources provided per unit of time for executing assigned computing tasks; The transmission time of the m computing tasks is calculated based on the amount of input data and the amount of output data, and the transmission time satisfies the following formula: Among them, the T ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j The transmission time; D i For the smart terminal i The amount of input data generated for the computational task, the B i For the smart terminal i The amount of output data generated by the computational task; R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between them, the R ji For data from the computing entity j Transmitted to the smart terminal i The transmission rate between them; Determine the processing mode for each of the m computing tasks; If the processing mode of the computing task is non-local processing, then the sum of the execution time and transmission time corresponding to the computing task is determined as the task time of the computing task. If the processing mode of the computing task is local processing, then the execution time corresponding to the computing task is determined as the task time of the computing task.
4. The method according to claim 1 or 2, characterized in that, The set of smart terminal IDs is T, the set of computing entity IDs is M, and the step of generating task allocation results based on the m computing energy consumptions and the m transmission energy consumptions includes: The m computational energy consumptions and m transmission energy consumptions are input into the resource allocation model, and the task allocation moments output by the resource allocation model are used as the task allocation results. The convergence objective of the resource allocation model is as follows: Among them, the a ij Assign a matrix to the task, if the smart terminal i The generated computational tasks are assigned to the computational entity. j Execute the a ij =1, otherwise the above a ij =0, i ∈T, j ∈M; the E ij c Characterizing the smart terminal i The generated tasks are in the computing entity j The energy consumption generated during execution; the E ij t Characterizing the smart terminal i The generated tasks are transmitted to the computing entity. j Energy consumption generated during execution.
5. The method according to claim 4, characterized in that, Each computational task is executed by a computational agent, and the convergence objective satisfies the following constraint C1: 。 6. A computing task allocation device, characterized in that, The device is used to execute a method for allocating computing tasks. The device belongs to a computing system, which includes n+1 computing entities. Each computing entity includes n intelligent terminals and a central server. The device includes: Acquisition unit: used to acquire m task data sent by n smart terminals, wherein the m task data correspond to m computing tasks, and the m computing tasks are generated by the n smart terminals; The computing unit is used to: calculate m computing energy consumptions based on the m task data, wherein the computing energy consumption is the energy consumption generated by the corresponding computing task when it is executed by any computing entity; Calculate m transmission energy consumptions based on the m task data, where each transmission energy consumption is the energy consumed when a corresponding computing task is transmitted to any computing entity. The set of smart terminal IDs is T, and the set of computing entity IDs is M. The task data includes the input and output data amounts of the corresponding computing task. Specifically, this includes calculating the transmission rate of the computing system, where the transmission rate satisfies the following formula: Among them, the R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between; W The bandwidth of the computing system; p i t For the smart terminal i The transmission power; H ij For the smart terminal i With the computing entity j The channel gain between; ω The ambient noise floor of the computing system; p h t H hj This represents the transmission impact from other computing entities on the same channel; Based on the transmission rate, the amount of input data for the m computing tasks, and the amount of output data for the m computing tasks, the transmission energy consumption of the m computing tasks is calculated, including: Determine the transmission target for each of the m computing tasks; if the transmission target of the computing task is the central server, the transmission energy consumption of the computing task satisfies the following formula: Among them, the E ij t The computing tasks generated by the smart terminal i are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j As the central server; the D i For smart terminals i The amount of input data generated for the computational task, the B i For smart terminals i The amount of output data generated by the computational task, the p i r For the smart terminal i The received power, the R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between them, the R ji For data from the computing entity j Transmitted to the smart terminal i The transmission rate between them; If the target of the computing task is a smart terminal, the transmission energy consumption satisfies the following formula: Wherein: the E ij t For smart terminals i The generated computational tasks are transmitted to the computing entity. j The transmission energy consumption generated during execution, the computing entity j For smart terminals; the D i For the smart terminal i The amount of input data generated for the computational task; the B i For the smart terminal i The amount of output data generated by the computational task; p j r For the computing entity j The received power; p j t For the computing entity j The transmission power; R ij For data from the smart terminal i Transmitted to the computing entity j The transmission rate between them, the R ji For data from the computing entity j Transmitted to the smart terminal i The transmission rate between them; Generation unit: used to generate task allocation results based on the m computing energy consumptions and the m transmission energy consumptions. The task allocation results correspond to the allocation method of the m computing tasks when the total energy consumption is the lowest. The total energy consumption includes the m computing energy consumptions and the m transmission energy consumptions.
7. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program for electronic data interchange, wherein the computer program causes a computer to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Task unloading method for maximizing computing power of D2D-MEC system
CN112000481A
Internet of Things cross-domain subtask combination cooperative computing method and system
CN113821318A