Method, device, storage medium and electronic device for generating task offloading strategy

By acquiring and utilizing the execution and transmission time of computing tasks on terminals and edge servers, and determining the task offloading strategy, the problem of incomplete factors in the prior art is solved, and the execution efficiency and delay satisfaction of computing tasks are improved.

CN118916092BActive Publication Date: 2025-02-11STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411384739.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-11
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In mobile edge computing, the prior art does not consider comprehensive considerations when unloading computing tasks, resulting in the generated task unloading strategy that cannot meet the task execution delay requirements, resulting in low efficiency in computing tasks.

Method used

By obtaining the local execution time required for the target calculation task to be executed at the target terminal and the target transmission time for transmitting the target calculation task to the target edge server, the task offload strategy is determined based on these two durations, and the calculation task is executed at the terminal or the edge server.

Benefits of technology

It improves the accuracy of the determination of the task unloading strategy, improves the execution efficiency of the calculation task, and ensures the satisfaction of the task execution delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916092B_ABST
    Figure CN118916092B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium and electronic device for generating a task offloading strategy. Relating to the field of communication technology, the method comprises: obtaining the local execution time required for the target computing task to be executed at the target terminal; obtaining the target transmission time for transmitting the target computing task to the target edge server; based on the local execution time and the target transmission time, determining the task offloading strategy of the target computing task, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed at the target terminal or at the target edge server. The present invention solves the technical problem in the related art that when performing computing task offloading, the factors are not fully considered, resulting in the generated task offloading strategy being unable to meet the task execution delay requirements, thereby resulting in low computing task execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, storage medium and electronic device for generating a task offloading strategy. Background Art

[0002] Mobile edge computing technology deploys edge servers near user terminal devices to meet the needs of certain computing tasks with large computing volume and short latency requirements. In order to reduce the latency and energy consumption of mobile devices, task offloading technology is used in mobile edge computing. Task offloading technology solves the problem of insufficient computing resources of terminal devices by offloading device computing tasks to edge nodes or cloud servers. However, with the rapid growth of the number of mobile devices in the Internet of Things and their computing tasks, it has brought a heavy burden to the terminals.

[0003] The related art provides feasible solutions to solve the problem of task offloading with different optimization objectives in the context of edge computing. However, the related art does not take into account all factors when offloading computing tasks. For example, it does not take into account the latency sensitivity requirements of some computing tasks, resulting in the generated task offloading strategy being unable to meet the task execution latency requirements, which in turn leads to low computing task execution efficiency.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for generating a task offloading strategy, so as to at least solve the technical problem in the related art that, when performing computing task offloading, factors are not fully considered, resulting in the generated task offloading strategy being unable to meet the task execution delay requirements, thereby resulting in low computing task execution efficiency.

[0006] According to one aspect of an embodiment of the present invention, a method for generating a task offloading strategy is provided, comprising: obtaining a local execution time required for executing a target computing task at a target terminal; obtaining a target transmission time for transmitting the target computing task to a target edge server; and determining a task offloading strategy for the target computing task based on the local execution time and the target transmission time, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed at the target terminal or at the target edge server.

[0007] According to another aspect of an embodiment of the present invention, a device for generating a task offloading strategy is also provided, including: a local execution duration acquisition module, used to obtain the local execution duration required for the target computing task to be executed on the target terminal; a transmission duration acquisition module, used to obtain the target transmission duration for transmitting the target computing task to the target edge server; a task offloading strategy determination module, used to determine the task offloading strategy of the target computing task based on the local execution duration and the target transmission duration, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server.

[0008] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing any one of the methods for generating a task offloading strategy.

[0009] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the methods for generating task offloading strategies.

[0010] In an embodiment of the present invention, by obtaining the local execution time required for the target computing task to be executed at the target terminal; obtaining the target transmission time for transmitting the target computing task to the target edge server; and determining the task offloading strategy of the target computing task based on the local execution time and the target transmission time, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed at the target terminal or at the target edge server, the purpose of comprehensively determining the task offloading strategy based on the local execution time of the computing task and the transmission time required for transmission to the edge server for execution is achieved, thereby achieving the technical effect of improving the accuracy of determining the task offloading strategy and thereby improving the efficiency of computing task execution, thereby solving the technical problem in the related art that when performing computing task offloading, the factors considered are not comprehensive, resulting in the generated task offloading strategy being unable to meet the task execution delay requirements, thereby resulting in low computing task execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary 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 drawings:

[0012] Figure 1 is a flow chart of a method for generating a task offloading strategy according to an embodiment of the present invention;

[0013] Figure 2 is a flowchart of an optional method for generating a task offloading strategy according to an embodiment of the present invention;

[0014] Figure 3 is an optional performance analysis result comparison diagram according to an embodiment of the present invention;

[0015] Figure 4 is another optional performance analysis result comparison diagram according to an embodiment of the present invention;

[0016] Figure 5 It is a schematic diagram of a device for generating a task offloading strategy according to an embodiment of the present invention. DETAILED DESCRIPTION

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

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

[0019] According to an embodiment of the present invention, a method embodiment for generating a task offloading strategy is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0020] Optionally, the method for generating a task offloading strategy provided by an embodiment of the present invention is applied to an edge computing system architecture including a user layer and an edge computing layer, wherein the user layer is a mobile terminal in the Internet of Things, including multiple terminals, and the terminal generates a computing task in each time slot. The computing task can be selected to be executed locally on the terminal or on the edge server according to the latency requirements. The edge computing layer includes multiple edge servers. The data between the terminal and the edge server is transmitted via a wireless network, and a roadside unit (RSU) can be used to represent the wireless transmission device at the location of the edge server.

[0021] At user level, use Indicates the number of terminals in a time slot. Represents the computing resource set of multiple terminals (i.e., n terminals). Assume that each terminal generates a computing task in each time slot ,use Represents a set of computing tasks for n terminals. Computing tasks Including the amount of data that needs to be processed , the number of CPU cycles requested , upper limit of task processing delay Three attributes. Use Represents the set of offloading decisions of n terminals for computing tasks. Uninstall decision The value is ,in . Represents a computing task Execute locally, Represents a computing task Offload to the jth edge server for execution. At the edge computing layer, use Represents a set of available computing resources consisting of the available computing resources of multiple (i.e., m) edge servers in the edge computing layer.

[0022] Figure 1 is a flowchart of a method for generating a task offloading strategy according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0023] Step S102, obtaining the local execution time required for executing the target computing task on the target terminal;

[0024] Optionally, the target computing task may be a computing task initiated by a target terminal, and the target terminal is any terminal among a plurality of terminals included in the user layer. The local execution duration is the duration required for the target computing task to be executed locally in the target terminal.

[0025] Step S104, obtaining a target transmission duration for transmitting the target computing task to the target edge server;

[0026] Optionally, the target edge server can be any one of the multiple edge servers included in the edge computing layer; or it can be selected from multiple edge servers based on a predetermined screening rule, for example, it can be the edge server closest to the target terminal among multiple edge servers, or the edge server with the most abundant allocatable resources, or the edge server with the highest comprehensive score of distance and allocatable resources. Specifically, the distance is inversely proportional to the score, and the amount of allocatable resources is directly proportional to the score. The comprehensive score can be obtained by, but is not limited to, weighted calculation of the distance and the amount of allocatable resources. The target transmission time is the time required to transmit the target computing task from the target terminal to the target edge server.

[0027] It should be noted that the target computing task can be transmitted directly from the target terminal to the target edge server, or the target terminal can first send the target computing task to the intermediate edge server, and then the intermediate edge server can forward it to the target edge server, wherein the intermediate edge server can be the edge server closest to the target terminal, or it can be the edge server with the smallest total distance from the target terminal and the target edge server.

[0028] Optionally, when the target computing task is forwarded from the intermediate edge server to the target edge server, the first duration of the target computing task sent from the target terminal to the intermediate edge server and the second duration of the target computing task sent from the intermediate edge server to the target edge server can be obtained, and the sum of the first duration and the second duration can be used as the target transmission duration.

[0029] Specifically, the target terminal i can determine the target computing task by the following method: Target transmission time for uploading to the target edge server :

[0030]

[0031] in, Represents the target computing task The time required to transmit from the target terminal i to the roadside unit corresponding to the kth edge server (i.e., the intermediate edge server) closest to it using the wireless network, i.e., the first time; Represents the target computing task The time required to use the optical fiber network to forward from the roadside unit corresponding to the kth edge server to the roadside unit corresponding to the jth edge server (ie, the target edge server), ie, the second time. represents the wireless transmission rate between the target terminal i and the kth edge server, It is the transmission rate of the fiber optic network. represents the distance between the target terminal i and the kth edge server; represents the distance between the kth edge server and the jth edge server.

[0032] Optionally, the target terminal i and the kth edge server location RSU use wireless data transmission, and the transmission distance is Indicates that the channel bandwidth used for wireless transmission Indicates that the transmission power of terminal i is Indicates that network noise uses Indicates that the wireless transmission rate It can be calculated as follows.

[0033]

[0034] Step S106, determining a task offloading strategy for the target computing task based on the local execution duration and the target transmission duration, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server.

[0035] It should be noted that the local execution time is used to indicate the time required for the target computing task to be executed directly on the target terminal, and the target transmission time is used to indicate the transmission time required for the target terminal to transmit to the target edge server. The task offloading strategy of the target computing task can be determined according to the size of the local execution time and the target transmission time to determine whether the target computing task is better executed locally on the target terminal or offloaded to the target edge server.

[0036] Optionally, the number of target CPU clock cycles required to execute the target computing task and the computing resources required for local execution of the target computing task can be obtained. Based on the number of target CPU clock cycles and the computing resources required for local execution on the target terminal, the local execution time required for the target computing task to be executed on the target terminal can be obtained in the following manner:

[0037]

[0038] in, Indicates the local execution time required for the target computing task to be executed on the target terminal. Indicates the target CPU clock cycle requested by the target terminal, Indicates the computing resources required for the local execution of the target computing task, where the computing resources can be but are not limited to the CPU clock frequency corresponding to the local execution of the target computing task on the target terminal.

[0039] In an optional embodiment, based on the local execution time and the target transmission time, a task offloading strategy for the target computing task is determined, including: when the local execution time is less than a preset first time threshold and the target transmission time is greater than the local execution time, the task offloading strategy is determined to be: executing the target computing task at the target terminal; or when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, the task offloading strategy is determined to be: executing the target computing task at the target edge server.

[0040] Optionally, the preset first duration threshold is the preset maximum delay requirement for the execution of the computing task at the target terminal, and the preset first duration threshold can reflect the local execution capability of the target terminal. By comparing the local execution duration with the preset first duration threshold, it can be determined whether the duration required for the target computing task to be executed at the target terminal exceeds the maximum delay requirement that the target terminal can bear; at the same time, when determining whether to transmit to the target edge server for execution, it is also necessary to consider whether the transmission cost of the target computing task from the target terminal to the target edge server is too large. Based on this, the local execution duration is less than the preset first duration threshold, and the target transmission duration is greater than the local execution duration, that is, when the duration required for the computing task to be executed at the target terminal is within the maximum delay requirement that the target terminal can bear, and the transmission time of transmitting the target computing task from the target terminal to the target edge server is too long, the target computing task is executed locally at the target terminal, otherwise the target computing task is considered to be sent to the target edge server for execution. Through the above method, when determining the target computing task offloading strategy, factors such as the task execution capability of the target terminal and the task transmission time consumption are taken into consideration, thereby improving the task execution efficiency and reducing the resource loss caused by task execution.

[0041] In an optional embodiment, when the local execution time is greater than or equal to a preset first time threshold, or the target transmission time is less than or equal to the local execution time, the task offloading strategy is determined as: executing the target computing task on the target edge server, including: when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, obtaining the target execution time of the target computing task on the target edge server; summing the target transmission time and the target execution time to obtain the total time required for the target computing task to be executed on the target edge server; when the total time required for the target computing task to be executed on the target edge server is less than a preset second time threshold, determining the task offloading strategy is: executing the target computing task on the target edge server.

[0042] Optionally, the target execution time is the execution time required for the target computing task to be executed on the target edge server. It should be noted that the time consumed for unloading the target computing task to the target edge server for execution includes, in addition to the actual target execution time, the target transmission time for transmitting the target computing task from the target terminal to the target edge server. The sum of the target transmission time and the target execution time is taken as the total time required for the target computing task to be executed on the target edge server. The size of the total time can be used to observe the cost required for transmitting the target computing task to the target edge server for execution. The preset second time can be understood as the preset maximum consumption time that allows the computing task to be executed on the edge server. Only when the total time required for the target computing task to be executed on the target edge server is less than the preset second time threshold, can the target computing task be unloaded to the target edge server for execution. In the above manner, the situation where the target computing task consumes too much resources when it is executed on the target edge server can be avoided.

[0043] In an optional embodiment, obtaining a target execution time of a target computing task executed on a target edge server includes: obtaining a target number of CPU clock cycles required to execute the target computing task; obtaining a target computing resource allocated by the target edge server to the target computing task; and dividing the target number of CPU clock cycles by the target computing resource to obtain the target execution time.

[0044] Optionally, the target CPU clock cycle number is the number of clock cycles required by the CPU processor when executing the target computing task. The CPU clock cycle number can be used to measure the complexity and execution time of the computing task. The target computing resources are the various hardware and software resources required by the target edge server when executing the target computing task. The target computing resources may include but are not limited to CPU resources, memory resources, storage resources, network resources, software resources, etc. The CPU resources are responsible for executing the program instructions corresponding to the target computing task, including but not limited to processing power, number of cores, number of threads, and CPU clock cycle frequency; memory resources are used to store programs and data in the running target computing task so that the CPU can quickly access them. The size and speed of memory resources will directly affect the execution efficiency of the computing task; storage resources include storage devices such as hard disks and solid-state drives, which are used to permanently store data and programs. The read and write speed of storage resources will also affect the execution time of the computing task, especially when large amounts of data need to be read and written frequently; if the execution of the target computing task requires network communication, network resources such as network bandwidth, latency, and stability are also key computing resources.

[0045] Optionally, the target CPU clock cycle number may be divided by the target computing resource, and the result obtained is the target execution time required for the target edge server to execute the target computing task. The specific formula is as follows:

[0046]

[0047] in, Indicates the target execution time. represents the target computing resource, Indicates the number of target CPU clock cycles.

[0048] It should be noted that when the target execution time is calculated by dividing the target CPU clock cycle number by the target computing resource, the target computing resource can be the CPU clock frequency that the target edge server can allocate to the target computing task. The length of time the target computing task is executed on the CPU of the target edge server is calculated by dividing the target CPU clock cycle number by the target computing resource. This length of time can be used as the target execution time required for the target computing task to be executed on the target edge server. The above method can achieve accurate measurement of the execution time of the target computing task on the target edge server.

[0049] Optionally, further obtain the target transmission duration and target execution time Perform sum calculation to obtain the total time required for the target computing task to be executed on the target edge server , that is, satisfy .

[0050] In an optional embodiment, obtaining the target computing resources allocated by the target edge server to the target computing task includes: obtaining a delay urgency index when the target computing task is executed in the target edge server, and a computing amount ratio when the target computing task is executed in the target edge server; dividing the computing amount ratio and the delay urgency index to obtain a weight of the computing resources obtained by the target computing task in the target edge server; and multiplying the available computing resources and the weight of the target edge server to obtain the target computing resources.

[0051] Optionally, the delay urgency index is used to indicate the relative urgency of the target computing task. When judging whether it can be executed on the target edge server, the resources allocated by the target edge server for the target computing task are calculated based on the delay urgency of the task, the amount of computing tasks, and other information, so as to obtain the delay of unloading to the edge server for execution. The smaller the delay urgency, the more it needs to be executed as soon as possible. The computing amount ratio is used to indicate the computing amount occupancy of the target computing task when it is executed on the target edge server. The larger the computing amount ratio corresponding to the target computing task, the greater the probability that it needs to be executed on the target edge server. By dividing the computing amount ratio and the delay urgency index, the weight of the computing resources obtained by the target computing task on the target edge server can be obtained, which can reflect the urgency of the target computing task and the execution capability of the target edge server for the target computing task. The target computing resources allocated to the target computing task calculated based on the weight can better meet the computing task requirements with large computing tasks and short delay requirements, so as to solve the problem of long processing delay when delay-sensitive tasks are unloaded.

[0052] Optionally, the computing workload ratio and the latency urgency index are divided to obtain a formula for the weight of the computing resources obtained by the target computing task on the target edge server as follows:

[0053]

[0054] in, Indicates the weight of the computing resources obtained by the target computing task on the target edge server. Indicates the proportion of the target computing task when it is executed in the target edge server. Indicates the latency urgency indicator when the target computing task is executed in the target edge server.

[0055] Optionally, the weight of the computing resources obtained by the target computing task on the target edge server can be normalized to obtain the normalized weight, and the available computing resources of the target edge server and the normalized weight can be multiplied to obtain the target computing resources, which can be expressed by the following formula:

[0056]

[0057]

[0058] in, represents the normalized weight; Indicates the proportion of computing workload corresponding to any computing task executed in the target edge server; represents the set of computing tasks offloaded to the target edge server for execution, that is, the total number of computing tasks executed in the target edge server; Indicates the available computing resources of the target edge server.

[0059] In an optional embodiment, a delay urgency index when a target computing task is executed in a target edge server and a computing amount ratio when the target computing task is executed in the target edge server are obtained, including: identifying multiple computing tasks that need to be executed in the target edge server; obtaining preset maximum execution times corresponding to the multiple computing tasks, and CPU clock cycle numbers corresponding to the multiple computing tasks; summing up the preset maximum execution times corresponding to the multiple computing tasks to obtain a first summation result; summing up the CPU clock cycle numbers corresponding to the multiple computing tasks to obtain a second summation result; calculating the ratio of the preset maximum execution time of the target computing task to the first summation result to obtain a delay urgency index; calculating the ratio of the target CPU clock cycle number to the second summation result to obtain the computing amount ratio.

[0060] Optionally, the ratio of the preset maximum execution time of the target computing task to the sum of the preset maximum execution times corresponding to the multiple computing tasks executed on the target edge server (i.e., the first summation result) is used as the delay urgency index corresponding to the target computing task. The smaller the delay urgency index, the smaller the delay urgency corresponding to the target computing task, and the faster the execution is needed. The formula is as follows:

[0061]

[0062] in, Indicates the preset maximum execution time of the target computing task; Indicates the preset maximum execution time corresponding to any computing task among multiple computing tasks executed by the target edge server; Represents the first summation result; the explanation of other variables is the same as above and will not be repeated here.

[0063] Optionally, the computing load ratio is used to indicate the computing load occupancy of the target computing task when it is executed on the target edge server. The target CPU clock cycle number corresponding to the target computing task is calculated, and the ratio of the target CPU clock cycle number corresponding to multiple computing tasks executed on the target edge server (i.e., the second summation result) is used as the computing load ratio of the target computing task. The larger the computing load ratio corresponding to the target computing resource, the greater the probability that it needs to be executed on the target edge server. It is expressed as follows by the formula:

[0064]

[0065] in, Indicates the number of CPU clock cycles corresponding to any one of the multiple computing tasks executed by the target edge server. Represents the second summation result; the explanation of other variables is the same as above and will not be repeated here.

[0066] In an optional embodiment, the method further includes: when the total time required for the target computing task to be executed on the target edge server is greater than or equal to a preset second time threshold, determining at least one other edge server other than the target edge server from multiple edge servers; performing the same operation as the target edge server on the at least one other edge server, and determining a first edge server from the at least one other edge server for which the total time required for the target computing task to be executed on the corresponding other edge servers is less than the preset second time threshold; and determining a task offloading strategy as: executing the target computing task on the first edge server.

[0067] Optionally, when determining the actual task offloading strategy, each of the multiple edge servers performs the same operation as the target edge server to obtain the total duration corresponding to the multiple edge servers. If there is a first edge server among the multiple edge servers whose total duration required to execute the target computing task is less than a preset second duration threshold, the task offloading strategy is determined to execute the target computing task on the first edge server, that is, the target computing task is offloaded to the first edge server to be executed by the first edge server.

[0068] Optionally, if there are multiple edge servers among the multiple edge servers whose total time required to execute the target computing task is less than a preset second time threshold, the task offloading strategy is determined as: offloading the target computing task to the edge server with the shortest total time among the multiple first edge servers, and the edge server with the shortest total time among the multiple first edge servers executes the target computing task.

[0069] Optionally, if there is no edge server among the multiple edge servers whose total time required to execute the target computing task is less than a preset second time threshold, that is, the conditions for local execution by the target terminal and unloading by the edge server cannot be met, the target computing task is unloaded and executed in a random manner, that is, a random edge server among the multiple edge servers is used to execute the target computing task; or the target computing task can also be executed by the edge server among the multiple edge servers whose total time required to execute the target computing task is the shortest.

[0070] Through the above steps S102 to S106, the purpose of comprehensively determining the task offloading strategy according to the local execution time of the computing task and the transmission time required for transmission to the edge server for execution can be achieved, thereby achieving the technical effect of improving the accuracy of the task offloading strategy determination and thus improving the efficiency of computing task execution, thereby solving the technical problem in the related technology that when unloading computing tasks, the factors are not fully considered, resulting in the generated task offloading strategy being unable to meet the task execution delay requirements, thereby resulting in low computing task execution efficiency.

[0071] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 2 is a flowchart of an optional method for generating a task offloading strategy according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0072] S1, build a network model for delay-sensitive task offloading.

[0073] Specifically, the network model is constructed based on the edge computing system architecture including the user layer and the edge computing layer, wherein the user layer is the mobile terminal in the Internet of Things, including multiple terminals, and the terminal generates computing tasks in each time slot. The computing tasks can be selected to be executed locally on the terminal or on the edge server according to the latency requirements. The edge computing layer includes multiple edge servers. The data between the target terminal and the edge server is transmitted through the wireless network, and the roadside unit (RSU) can be used to represent the wireless transmission equipment at the location of the edge server.

[0074] At user level, use Indicates the number of terminals in a time slot. Represents the computing resource set of multiple terminals (i.e., n terminals). Assume that each terminal generates a computing task in each time slot ,use Represents a set of computing tasks for n terminals. Computing tasks Including the amount of data that needs to be processed , the number of CPU cycles requested , upper limit of task processing delay Three attributes. Use Represents the set of offloading decisions of n terminals for computing tasks. Uninstall decision The value is ,in . Represents a computing task Execute locally, Represents a computing task Offload to the jth edge server for execution. At the edge computing layer, use Represents the available computing resources of multiple (i.e., m) edge servers in the edge computing layer.

[0075] S2, design an efficient offloading mechanism based on task characteristics in edge computing environment, including:

[0076] S21, determine whether the task can be executed locally;

[0077] S211, judgment task Local execution latency Is it less than the delay requirement? If the requirements are not met, go to step S2;

[0078] S212, judgment task The transmission delay Is it less than the execution delay? If the requirements are not met, go to step S2;

[0079] S213, judgment If the requirements are not met, go to step S2;

[0080] S214, Mission Execute locally and the algorithm ends;

[0081] S22, determining whether the target computing task can be executed on the target edge server, specifically including:

[0082] S221, determine the target computing task The time delay urgency ;

[0083] S222, determine the target computing task The proportion of computational ;

[0084] S223, determine the target computing task The weight of ES resources that can be obtained ;

[0085] S224, determine the target computing ES server j to be assigned to the task Computing resources ;

[0086] S225, determine the target computing task Execution time ;

[0087] S226, if < , then the target computing task is offloaded to the target edge server for execution, and the algorithm ends;

[0088] S223: If no uninstallation strategy is obtained in step S1 and step S2, a random uninstallation strategy is selected.

[0089] It should be noted that in the related art, when unloading computing tasks, tasks that are sensitive to latency requirements are not taken into account and need to be unloaded in the shortest possible time. In order to solve the problem of long processing delay when unloading latency-sensitive tasks, this embodiment proposes an efficient unloading mechanism based on task characteristics in an edge computing environment. This mechanism determines whether a task is suitable for local execution from two dimensions: whether the transmission delay is greater than the execution delay and whether the local execution of the task leads to a large consumption of local resources.

[0090] It should be noted that since the local terminal and edge server cannot be unloaded, a random strategy mechanism is used to unload the task.

[0091] Exemplarily, the present embodiment can be simulated and performance analyzed using Python language, but is not limited to it. The simulation environment includes 60 terminals and 3 edge servers to build a network model. In terms of wireless network performance, the channel bandwidth of the roadside unit is 10~20 megahertz (MHz), and the network noise is -100 decibel milliwatts (dBm). In terms of wired fiber network performance, the data transmission rate is 0.8 gigabits per second (Gbps). In terms of terminal performance, the transmission power is 30~40dBm, the CPU frequency is 0.5~1.75GHz, the unit resource energy consumption is 0.06, and the terminal generates a task in each time slot. The data volume of the task is 500~1000 kilobytes (KB), the required CPU processing speed is 1 thousand cycles / bit (Kcycles / bit), and the maximum delay is 0.8~4s. The CPU frequency of the edge server is 10~35GHz, and the unit resource energy consumption is 0.03.

[0092] When the task The utility of task execution when executed locally on the target terminal Use is calculated as follows:

[0093]

[0094] in, Represents the computing energy consumption of target terminal i per second. Indicates the maximum execution time of tasks in all terminals (i.e. multiple terminals). Indicates the maximum energy consumption of all terminal tasks when they are executed locally. Represents the weight of the target terminal's processing delay and energy consumption for the target computing task.

[0095] Target computing task Energy consumption of execution at edge servers Calculate using the following method:

[0096]

[0097] in, , , They represent the energy consumption of data transmission by the target terminal, the energy consumption of data transmission by optical fiber, and the computing energy consumption of the edge server respectively.

[0098] Target computing task Utilities executed on edge servers Calculate using the following method:

[0099]

[0100] in, Indicates the maximum energy consumption when all terminal tasks are offloaded to the edge server.

[0101] In summary, the average cost of all terminals is Calculated as follows:

[0102]

[0103] in, , Respectively represent tasks The policy executed on the local terminal or edge server. The value is 0 or 1.

[0104] To verify the performance of the algorithm in this embodiment, the following three algorithms were compared in the experiment. (1) All Tasks Offloaded to Edge Servers Execution Mechanism (ATOEM), which offloads all tasks to the edge server for processing and is used to analyze the performance of edge server processing tasks. (2) All Tasks Local Terminal Execution Mechanism (ATLEM), which leaves all tasks to be processed locally and is used to analyze the performance of local task processing. (3) Time delay sensitive efficient offload mechanism based on task characteristics (TDSEOM) in the edge computing environment proposed in this embodiment.

[0105] Figure 3 is an optional performance analysis result comparison diagram according to an embodiment of the present invention. Figure 3The performance analysis results of the two algorithms under different edge server performance scenarios are shown in Figure 2. Since the performance of the local offloading algorithm is not affected by the change of edge server performance, the performance of the local offloading algorithm is not analyzed in this environment. Figure 3 The middle X-axis represents the increase in the computing frequency of the edge server from 10 GHz to 35 GHz. Figure 3 It can be seen that as the computing frequency of the edge server increases, the average cost of both algorithms decreases. This is because as the computing frequency of the edge server increases, the terminal tasks can be processed in a shorter time, reducing the value of the average cost. In terms of algorithm comparison, the average cost of algorithm ATOEM is the largest, because when the task is uploaded from the terminal to the edge server for execution, the transmission delay is large. The average cost of algorithm TDSEOM is better than that of algorithm ATOEM, because algorithm TDSEOM can provide better actions for the intelligent agent.

[0106] Figure 4 is another optional performance analysis result comparison diagram according to an embodiment of the present invention, Figure 4 The performance analysis results of the algorithm under different terminal local performance scenarios are shown. Since the performance of the edge server offloading algorithm is not affected by the change of local server performance, the performance of the edge server offloading algorithm is not analyzed in this environment. Figure 4 The X-axis shows the terminal's computing frequency increasing from 0.5 GHz to 1.75 GHz. Figure 4 It can be seen that as the local calculation frequency of the terminal increases, the average cost of the algorithm is decreasing. This is because as the local calculation frequency of the terminal increases, the terminal task can be processed in a shorter time, reducing the average cost and average delay. In terms of algorithm performance comparison, the average cost of algorithm ATLEM is the largest. This is because compared with the edge server, the local performance of the terminal is lower and the energy consumption is higher, so it takes a longer time and consumes more energy when processing tasks. The average cost of algorithm TDSEOM is better than that of algorithm ATLEM, indicating that algorithm TDSEOM can provide better actions for the intelligent agent.

[0107] In this embodiment, a device for generating a task offloading strategy is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0108] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the method for generating the above-mentioned task offloading strategy. Figure 5is a schematic diagram of the structure of a device for generating a task offloading strategy according to an embodiment of the present invention. Figure 5 As shown, the above-mentioned task offloading strategy generation device includes: a local execution time acquisition module 500, a transmission time acquisition module 502, and a task offloading strategy determination module 504, wherein:

[0109] The local execution time acquisition module 500 is used to acquire the local execution time required for the target computing task to be executed on the target terminal;

[0110] A transmission duration acquisition module 502, connected to the local execution duration acquisition module 500, is used to acquire a target transmission duration for transmitting a target computing task to a target edge server;

[0111] The task offloading strategy determination module 504 is connected to the transmission duration acquisition module 502, and is used to determine the task offloading strategy of the target computing task based on the local execution duration and the target transmission duration, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server.

[0112] In an embodiment of the present invention, a local execution time acquisition module 500 is set to obtain the local execution time required for the target computing task to be executed at the target terminal; a transmission time acquisition module 502 is connected to the local execution time acquisition module 500 and is used to obtain the target transmission time for transmitting the target computing task to the target edge server; a task offloading strategy determination module 504 is connected to the transmission time acquisition module 502 and is used to determine the task offloading strategy of the target computing task based on the local execution time and the target transmission time, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed at the target terminal or at the target edge server, thereby achieving the purpose of comprehensively determining the task offloading strategy based on the local execution time of the computing task and the transmission time required for transmission to the edge server for execution, thereby achieving the technical effect of improving the accuracy of the task offloading strategy determination and thus improving the computing task execution efficiency, thereby solving the technical problem in the related art that when performing computing task offloading, the factors are not fully considered, resulting in the generated task offloading strategy being unable to meet the task execution delay requirements, thereby resulting in low computing task execution efficiency.

[0113] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0114] It should be noted that the local execution duration acquisition module 500, the transmission duration acquisition module 502, and the task offloading strategy determination module 504 correspond to steps S102 to S106 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the modules as part of the device can be run in a computer terminal.

[0115] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.

[0116] The above-mentioned task offloading strategy generation device may also include a processor and a memory. The above-mentioned local execution time acquisition module 500, transmission time acquisition module 502, task offloading strategy determination module 504, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions.

[0117] The processor includes a kernel, which retrieves the corresponding program module from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0118] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any of the above-mentioned methods for generating task offloading strategies.

[0119] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0120] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: obtain the local execution time required for the target computing task to be executed on the target terminal; obtain the target transmission time for transmitting the target computing task to the target edge server; based on the local execution time and the target transmission time, determine the task offloading strategy for the target computing task, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server.

[0121] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any one of the above-mentioned methods for generating a task offloading strategy is executed.

[0122] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, the program is suitable for executing the steps of initializing the generation method of any one of the above-mentioned task offloading strategies.

[0123] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining the local execution time required for executing the target computing task on the target terminal; obtaining the target transmission time for transmitting the target computing task to the target edge server; based on the local execution time and the target transmission time, determining the task offloading strategy for the target computing task, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server.

[0124] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining a local execution time required for executing a target computing task at a target terminal; obtaining a target transmission time for transmitting the target computing task to a target edge server; and determining a task offloading strategy for the target computing task based on the local execution time and the target transmission time, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed at the target terminal or at the target edge server.

[0125] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0126] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0128] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0129] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0130] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0131] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for generating a task offloading strategy, characterized in that: include: Obtain the local execution time required for the target computing task to be executed on the target terminal; Obtaining a target transmission duration for transmitting the target computing task to a target edge server; Determine a task offloading strategy for the target computing task based on the local execution duration and the target transmission duration, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server; Wherein, the determining of the task offloading strategy of the target computing task based on the local execution time and the target transmission time includes: when the local execution time is less than a preset first time threshold and the target transmission time is greater than the local execution time, determining the task offloading strategy as: executing the target computing task on the target terminal; or when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, determining the task offloading strategy as: executing the target computing task on the target edge server; Wherein, when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, the task offloading strategy is determined as: executing the target computing task on the target edge server, including: when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, obtaining the target execution time of the target computing task on the target edge server; summing the target transmission time and the target execution time to obtain the total time required for the target computing task to be executed on the target edge server; when the total time required for the target computing task to be executed on the target edge server is less than the preset second time threshold, determining the task offloading strategy is: executing the target computing task on the target edge server; The obtaining of the target execution time of the target computing task executed on the target edge server comprises: obtaining the target number of CPU clock cycles required to execute the target computing task; obtaining the target computing resources allocated by the target edge server for the target computing task; and dividing the target number of CPU clock cycles by the target computing resources to obtain the target execution time; The obtaining of the target computing resources allocated by the target edge server to the target computing task includes: obtaining a delay urgency index when the target computing task is executed in the target edge server, and a computing amount ratio when the target computing task is executed in the target edge server, wherein the delay urgency index is used to indicate the relative urgency of the target computing task; dividing the computing amount ratio and the delay urgency index to obtain a weight of the computing resources obtained by the target computing task in the target edge server; and multiplying the available computing resources of the target edge server by the weight to obtain the target computing resources; The obtaining of the delay urgency index when the target computing task is executed in the target edge server, and the proportion of computing amount when the target computing task is executed in the target edge server, includes: identifying multiple computing tasks that need to be executed on the target edge server; obtaining preset maximum execution times corresponding to the multiple computing tasks, and the number of CPU clock cycles corresponding to the multiple computing tasks; summing up the preset maximum execution times corresponding to the multiple computing tasks to obtain a first summation result; summing up the number of CPU clock cycles corresponding to the multiple computing tasks to obtain a second summation result; calculating the proportion of the preset maximum execution time of the target computing task to the first summation result to obtain the delay urgency index; calculating the proportion of the target CPU clock cycle number to the second summation result to obtain the computing amount proportion.

2. The method according to claim 1, characterized in that The method further comprises: When the total duration required for executing the target computing task on the target edge server is greater than or equal to the preset second duration threshold, determining at least one other edge server except the target edge server from the plurality of edge servers; Performing the same operation as the target edge server on the at least one other edge server, and determining a first edge server from the at least one other edge server for which a total duration required for the target computing task to be executed by the corresponding other edge server is less than the preset second duration threshold; The task offloading strategy is determined as: executing the target computing task on the first edge server.

3. A device for generating a task offloading strategy, characterized in that: include: A local execution time acquisition module is used to obtain the local execution time required for the target computing task to be executed on the target terminal; A transmission duration acquisition module, used to acquire a target transmission duration for transmitting the target computing task to a target edge server; a task offloading strategy determination module, configured to determine a task offloading strategy for the target computing task based on the local execution duration and the target transmission duration, wherein the task offloading strategy is at least used to indicate whether the target computing task is executed on the target terminal or on the target edge server; The task offloading strategy determination module is further used to: when the local execution time is less than a preset first time threshold, and the target transmission time is greater than the local execution time, determine the task offloading strategy as: executing the target computing task at the target terminal; or when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, determine the task offloading strategy as: executing the target computing task at the target edge server; Wherein, the task offloading strategy determination module is also used for: when the local execution time is greater than or equal to the preset first time threshold, or the target transmission time is less than or equal to the local execution time, obtaining the target execution time of the target computing task executed on the target edge server; summing the target transmission time and the target execution time to obtain the total time required for the target computing task to be executed on the target edge server; when the total time required for the target computing task to be executed on the target edge server is less than the preset second time threshold, determining that the task offloading strategy is: executing the target computing task on the target edge server; The task offloading strategy determination module is also used to: obtain the target number of CPU clock cycles required to execute the target computing task; obtain the target computing resources allocated by the target edge server for the target computing task; divide the target number of CPU clock cycles and the target computing resources to obtain the target execution time; The task offloading strategy determination module is also used to: obtain the delay urgency index when the target computing task is executed in the target edge server, and the computing amount ratio when the target computing task is executed in the target edge server, wherein the delay urgency index is used to indicate the relative urgency of the target computing task; divide the computing amount ratio and the delay urgency index to obtain the weight of the computing resources obtained by the target computing task in the target edge server; multiply the available computing resources of the target edge server and the weight to obtain the target computing resources; The task offloading strategy determination module is also used to: identify multiple computing tasks that need to be executed on the target edge server; obtain the preset maximum execution times corresponding to the multiple computing tasks, and the number of CPU clock cycles corresponding to the multiple computing tasks; sum the preset maximum execution times corresponding to the multiple computing tasks to obtain a first summation result; sum the number of CPU clock cycles corresponding to the multiple computing tasks to obtain a second summation result; calculate the proportion of the preset maximum execution time of the target computing task to the first summation result to obtain the delay urgency index; calculate the proportion of the target CPU clock cycle number to the second summation result to obtain the computing amount proportion.

4. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method for generating a task offloading strategy as claimed in claim 1 or 2.

5. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a task offloading strategy as described in claim 1 or 2.

Citation Information

Patent Citations

  • Independent task unloading method based on local and edge collaborative cache

    CN116260871A