Task Offloading Method, Device and Equipment Based on Distribution Transformer Gateways in Distribution Substations
By building a task collection and screening tasks with high priority based on task level and resource loss, the problem of increased resource loss and delay of terminal equipment in the intelligent distribution station area is solved, and the optimization of resource loss and delay is achieved.
Patent Information
- Application Number
- CN202210360652.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-04-07
AI Technical Summary
In the intelligent distribution station area, the prior art has problems of increased resource loss and delay in terminal equipment during task unloading, especially the overall delay increase due to the constraints of execution order between tasks.
By building a task set, the task level and resource loss are determined, the tasks with high priority are selected and offloaded to the target distribution station area distribution gateway for processing, maintain the dependency between tasks, and at the same time, the tasks with resource loss meet the conditions are preferred.
Reduce resource loss and delay of terminal equipment, and further optimize the performance of terminal equipment by selecting the appropriate allocation gateway for uninstallation.
Smart Images

Figure CN114637606B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of distribution networks, and in particular, to a task offloading method, device, computer device, storage medium, and computer program product based on a distribution transformer gateway in a distribution substation area. Background Art
[0002] In an intelligent distribution substation area with a "cloud-edge-end" collaborative framework, a large number of distribution network gateway servers are deployed on the user side to offload tasks on terminal devices to the distribution network gateway servers, thereby reducing communication latency.
[0003] In traditional technologies, when performing task offloading, each task is offloaded to a distribution network gateway server according to the dependency relationship of the distribution network gateway servers; however, this method is restricted by the execution order between tasks. Although it can reduce the resource consumption of terminal devices, its overall latency will also increase. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a task offloading method, device, computer device, computer-readable storage medium, and computer program product based on a distribution transformer gateway in a distribution substation area that can reduce the latency and resource consumption of terminal devices.
[0005] In a first aspect, the present disclosure provides a task offloading method based on a distribution transformer gateway in a distribution substation area. The method includes:
[0006] Determine the task levels of the tasks to be offloaded in each task set according to the task execution times of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution substation area;
[0007] Respectively screen out the tasks to be offloaded whose task levels meet a first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set;
[0008] Determine the priorities of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set;
[0009] Screen out the target tasks to be offloaded whose priorities meet a second preset condition from the candidate task set, and offload the target tasks to be offloaded to a target distribution transformer gateway in the distribution substation area for processing;
[0010] Update the tasks to be offloaded in the task set including the target task to be offloaded, and jump to the step of respectively screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded.
[0011] In one embodiment, determining the task levels of the offloading tasks in each of the task sets according to the task execution times of the offloading tasks in the task sets corresponding to multiple terminal devices in a distribution transformer area includes:
[0012] Inputting the average task execution time of the offloading task in the task set, the task level of the next task of the offloading task, and the data exchange time between the offloading task and the next task of the offloading task into a task level estimation model to obtain the task level of the offloading task.
[0013] In one embodiment, the method further includes:
[0014] Obtaining the average task execution time of the offloading task according to the task execution time of the offloading task on the terminal device in the task set and the execution time of the offloading task on each distribution transformer gateway in the distribution transformer area;
[0015] Obtaining the data exchange time between the offloading task and the next task of the offloading task according to the data exchange amount between the offloading task and the next task of the offloading task, the bandwidths between the terminal device and each distribution transformer gateway respectively, and the bandwidths of each distribution transformer gateway.
[0016] In one embodiment, determining the priorities of the offloading tasks in the candidate task set according to the resource consumption of the offloading tasks in the candidate task set includes:
[0017] Obtaining a first weight and a second weight; the first weight is used to represent the weight coefficient of the task level, and the second weight is used to represent the weight coefficient of the resource consumption;
[0018] Performing weighted summation on the task level and the resource consumption according to the first weight and the second weight to obtain the priority of the offloading task.
[0019] In one embodiment, before determining the priorities of the offloading tasks in the candidate task set according to the resource consumption of the offloading tasks in the candidate task set, it further includes:
[0020] Obtaining the computing energy consumption information of the terminal device according to the computing energy consumption information per unit time of the terminal device and the task execution time of the offloading tasks in the candidate task set corresponding to the terminal device on the terminal device;
[0021] Obtain the transmission energy consumption information of the terminal device according to the transmission power of the terminal device and the data exchange time between the task to be offloaded and the next task of the task to be offloaded;
[0022] Obtain the resource loss of the task to be offloaded according to the calculated energy consumption information and the transmission energy consumption information.
[0023] In one embodiment, before offloading the target task to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing, it further includes:
[0024] Obtain the actual completion times of the target task to be offloaded according to the actual start time of offloading the target task to be offloaded to the distribution transformer gateway in the distribution transformer area and the execution times of the target task to be offloaded on each distribution transformer gateway in the distribution transformer area;
[0025] From the actual completion times of the target task to be offloaded, filter out the actual completion time with the smallest actual completion time to obtain the actual minimum completion time of the target task to be offloaded;
[0026] Determine the target distribution transformer gateway corresponding to the offloading of the target task to be offloaded from each distribution transformer gateway according to the actual minimum completion time.
[0027] In a second aspect, the present disclosure also provides a task offloading device based on a distribution transformer gateway in a distribution transformer area.
[0028] The device includes:
[0029] A task level determination module, configured to determine the task levels of the tasks to be offloaded in each task set according to the task execution times of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area;
[0030] A task set determination module, configured to respectively filter out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set;
[0031] A priority determination module, configured to determine the priorities of the tasks to be offloaded in the candidate task set according to the resource losses of the tasks to be offloaded in the candidate task set;
[0032] A target task offloading module, configured to filter out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing;
[0033] An uninstall task condition module is used to update the uninstall tasks in the task set including the target uninstall task to be uninstalled, and jump to the step of screening out the uninstall tasks whose task levels meet the first preset condition from the uninstall tasks in each of the task sets to obtain a candidate task set, until all the uninstall tasks in each of the task sets are uninstalled.
[0034] In a third aspect, the present disclosure also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Determine the task levels of the uninstall tasks in each of the task sets according to the task execution times of the uninstall tasks in the task sets corresponding to multiple terminal devices in the distribution substation area;
[0036] Respectively screen out the uninstall tasks whose task levels meet the first preset condition from the uninstall tasks in each of the task sets to obtain a candidate task set;
[0037] Determine the priorities of the uninstall tasks in the candidate task set according to the resource consumption of the uninstall tasks in the candidate task set;
[0038] Screen out the target uninstall task to be uninstalled whose priority meets the second preset condition from the candidate task set, and uninstall the target uninstall task to the target distribution transformer gateway in the distribution substation area for processing;
[0039] Update the uninstall tasks in the task set including the target uninstall task to be uninstalled, and jump to the step of screening out the uninstall tasks whose task levels meet the first preset condition from the uninstall tasks in each of the task sets to obtain a candidate task set, until all the uninstall tasks in each of the task sets are uninstalled.
[0040] In a fourth aspect, the present disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0041] Determine the task levels of the uninstall tasks in each of the task sets according to the task execution times of the uninstall tasks in the task sets corresponding to multiple terminal devices in the distribution substation area;
[0042] Respectively screen out the uninstall tasks whose task levels meet the first preset condition from the uninstall tasks in each of the task sets to obtain a candidate task set;
[0043] Determine the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set;
[0044] Filter out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing;
[0045] Update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of filtering out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set, until all the tasks to be offloaded in each task set are offloaded.
[0046] In a fifth aspect, the present disclosure also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the following steps:
[0047] Determine the task levels of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area according to the task execution times of the tasks to be offloaded;
[0048] Respectively filter out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set;
[0049] Determine the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set;
[0050] Filter out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing;
[0051] Update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of filtering out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set, until all the tasks to be offloaded in each task set are offloaded.
[0052] The above task offloading method, device, computer device, storage medium, and computer program product based on the distribution transformer gateway in the distribution substation area determine the task levels of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution substation area according to the task execution times of the tasks to be offloaded in the task sets; then, respectively, screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set; determine the priorities of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set; screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution substation area for processing; update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of respectively screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded. By adopting this method, through constructing task sets for the tasks of the terminal devices in the distribution substation area, the association relationships between the tasks of the terminal devices can be obtained, providing a basis for the subsequent execution of task offloading. Furthermore, through screening based on task levels and resource consumption, while maintaining the dependency relationships between the tasks in the task sets of the terminal devices, the tasks to be offloaded whose resource consumption meets the second preset condition are preferentially offloaded, thereby reducing the resource consumption of the terminal devices in the distribution substation area. By selecting the target distribution transformer gateway for offloading, the latency of the terminal devices is further reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 FIG. is an application environment diagram of a task offloading method based on a distribution transformer gateway in a distribution substation area in one embodiment;
[0054] Figure 2 FIG. is a flowchart of a task offloading method based on a distribution transformer gateway in a distribution substation area in one embodiment;
[0055] Figure 3 FIG. is a schematic diagram of a task set in the form of a directed acyclic graph in one embodiment;
[0056] Figure 4 FIG. is a flowchart of a task offloading method based on a distribution transformer gateway in a distribution substation area in another embodiment;
[0057] Figure 5 FIG. is a result graph of the average latency of terminal devices in the case of different numbers of distribution transformer gateways in one embodiment;
[0058] Figure 6 FIG. is a result graph of the resource consumption of terminal devices in the case of different numbers of distribution transformer gateways in one embodiment;
[0059] Figure 7 The result graph of the average delay of the terminal device in the case of different numbers of terminal devices in an embodiment;
[0060] Figure 8 The result graph of the resource loss of the terminal device in the case of different numbers of terminal devices in an embodiment;
[0061] Figure 9 The structural block diagram of the task offloading device based on the distribution transformer gateway in a distribution area in an embodiment;
[0062] Figure 10 The internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0063] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] The task offloading method based on the distribution transformer gateway provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal devices in the distribution transformer area communicate with the distribution transformer gateway server through the network. Each distribution transformer gateway server is interconnected through a high-speed optical fiber network, and each terminal device is also connected through the network. The data storage system can store the data that the distribution transformer gateway server needs to process. The data storage system can be integrated on the distribution transformer gateway server, or placed on the cloud or other network servers. According to the task execution time of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area, determine the task levels of the tasks to be offloaded in each task set; then respectively screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set; according to the resource consumption of the tasks to be offloaded in the candidate task set, determine the priorities of the tasks to be offloaded in the candidate task set; screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing; update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of respectively screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded. Among them, the terminal device can be, but is not limited to, various smart meters, monitoring terminals, etc. in the distribution transformer area, and can be marked as SM1, SM2, and SM3. The distribution transformer gateway server, also abbreviated as the distribution transformer gateway, can be implemented by an independent distribution transformer gateway server in the distribution transformer area or a distribution transformer gateway server cluster composed of multiple distribution transformer gateway servers. The distribution transformer gateway server can be marked as ED1, ED2, and ED3. Among them, the task sets can be marked as W1, W2, W3, W4, and W5.
[0065] In one embodiment, as Figure 2 shown, a task offloading method based on a distribution transformer gateway in a distribution transformer area is provided. Taking the method applied to the Figure 1 terminal devices therein as an example for description, it includes the following steps:
[0066] Step S201, according to the task execution time of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area, determine the task levels of the tasks to be offloaded in each task set.
[0067] Among them, the task set includes the tasks to be offloaded corresponding to the terminal devices. The task set can be in the form of a flowchart of tasks, or in the form of a directed acyclic graph of tasks, or in other types of forms.
[0068] For example, the task execution process of terminal device i can be represented as Figure 3 the directed acyclic graph Zi = (Wi, Vi) shown,Figure 3 The weight Wi marked on the nodes in Figure 3 represents the cost of the corresponding task to be offloaded, such as 7.1, 5.2, 0.8, etc.; the weight Vi on the directed edge represents the communication cost between two tasks to be offloaded, such as 1.2, 1.0, 0.7, etc.
[0069] Specifically, perform task sorting on the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area, obtain the dependency relationship between the tasks to be offloaded in each task set, and store the dependency relationship in the task set. Obtain the task execution time of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution transformer area, and input the task execution time of the tasks to be offloaded in each task set into the task level estimation model to obtain the task level of the tasks to be offloaded in each task set.
[0070] Step S202: Screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set.
[0071] Among them, the first preset condition can be the task to be offloaded with the highest task level, or the task to be offloaded with the lowest task level. Of course, it can also be other conditions related to the task level.
[0072] Specifically, when there is a dependency relationship between the tasks to be offloaded in the task set, the first preset condition can be set as the task to be offloaded with the highest task level value in the task set. Then, screen out the tasks to be offloaded with the highest task level from the tasks to be offloaded in each task set, and generate a candidate task set based on all the tasks to be offloaded with the highest task level.
[0073] Step S203: Determine the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set.
[0074] Among them, the resource consumption refers to the resources consumed by the terminal device when processing the task to be offloaded, such as the transmission energy consumption when the terminal device transmits the task to be offloaded, or the computing energy consumption when the terminal device executes the task to be offloaded.
[0075] Specifically, obtain the resource consumption of each task to be offloaded in the candidate task set, and input the resource consumption of each task to be offloaded into the priority evaluation model to obtain the priority corresponding to each task to be offloaded.
[0076] Step S204: Screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing.
[0077] Among them, the second preset condition can be the to-be-offloaded task with the highest priority, or the to-be-offloaded task with the lowest priority. Of course, it can also be other conditions related to the priority.
[0078] Among them, the target distribution transformer gateway can be the distribution transformer gateway in the distribution area, or the terminal device in the distribution area, or also the local terminal device.
[0079] Specifically, when the second preset condition is set as the to-be-offloaded task with the highest priority value in the task set, from the candidate task set, filter out the to-be-offloaded task with the highest priority as the target to-be-offloaded task; determine the target distribution transformer gateway and offload the target to-be-offloaded task to the target distribution transformer gateway for processing. Among them, the target distribution transformer gateway can be the one that minimizes the execution delay of the to-be-offloaded task.
[0080] It should be noted that the target to-be-offloaded task in this disclosure can be offloaded to any distribution transformer gateway server in the network of the distribution area, or directly executed on the local terminal device. For different to-be-offloaded tasks on the same terminal device, they can also be offloaded to different distribution transformer gateway servers. For example, if it is detected that the delay of the terminal device is the smallest when the to-be-offloaded task is executed on the local terminal device, then the target distribution transformer gateway at this time is the local terminal device.
[0081] Step S205: Update the to-be-offloaded tasks in the task set including the target to-be-offloaded task, and jump to the step of filtering out the to-be-offloaded tasks whose task levels meet the first preset condition from the to-be-offloaded tasks in each task set to obtain the candidate task set, until all the to-be-offloaded tasks in each task set are offloaded.
[0082] Specifically, from multiple task sets, filter out the task set including the target to-be-offloaded task to obtain the target task set, and update the to-be-offloaded tasks in the target task set; among them, the update method can be to delete the target to-be-offloaded task in the target task set, or the to-be-offloaded tasks in the target task set also carry task identification information, such as the to-be-offloaded identifier and the offloaded identifier, and modify the to-be-offloaded identifier of the target to-be-offloaded task in the target task set to the offloaded identifier. Of course, it can also be other update methods, which are not specifically limited here. Then jump to the above step S202, and repeat the above steps S202 to S205 until all the to-be-offloaded tasks in each task set are offloaded.
[0083] In the above task offloading method based on the distribution transformer gateway in the distribution substation area, according to the task execution time of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution substation area, determine the task levels of the tasks to be offloaded in each task set; then respectively screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set; determine the priorities of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set; screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution substation area for processing; update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of respectively screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded. By adopting this method, through constructing task sets for the tasks of the terminal devices in the distribution substation area, the association relationship between the tasks of the terminal devices can be obtained, providing a basis for the subsequent execution of task offloading. Furthermore, through screening based on task levels and resource consumption, while maintaining the dependency relationship between the tasks in the task set of the terminal device, the tasks to be offloaded with resource consumption meeting the second preset condition are preferentially offloaded, thereby reducing the resource consumption of the terminal devices in the distribution substation area. By offloading through the selected target distribution transformer gateway, the delay of the terminal devices is further reduced.
[0084] In one embodiment, the above step S201, according to the task execution time of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution substation area, determine the task levels of the tasks to be offloaded in each task set, specifically includes the following contents:
[0085] Input the average task execution time of the tasks to be offloaded in the task set, the task level of the next task of the task to be offloaded, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model to obtain the task level of the task to be offloaded.
[0086] Specifically, obtain the average task execution time of the tasks to be offloaded in the task set, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded. Input the average task execution time of the tasks to be offloaded in the task set, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model, and input the task level of the next task of the task to be offloaded into the task level estimation model to maintain the dependency relationship between the tasks to be offloaded in the task set. The task level estimation model outputs the task level of the task to be offloaded.
[0087] In practical applications, the task level estimation model can be expressed by the following formula:
[0088] Ran(i,k) = T i,k + max(Ran(i,k′)+C kk′ )
[0089] Wherein, T i,k represents the average task execution time of the task k to be offloaded by the terminal device i; C kk′ represents the data exchange time between the task to be offloaded and the next task of the task to be offloaded; Ran(i,k) represents the task level of the task k to be offloaded, and Ran(i,k′) represents the task level of the next task k′ of the task to be offloaded; if k′ depends on k, then Ran(i,k) must be greater than Ran(i,k′).
[0090] In this embodiment, the task execution time of the task to be offloaded in the task set corresponding to multiple terminal devices in the distribution transformer area is determined, and then, by preferentially offloading the tasks to be offloaded with higher task levels, the dependency relationship between the tasks to be offloaded in the task set can be ensured. At the same time, the independent tasks to be offloaded, that is, the tasks to be offloaded without dependency relationship, can also be preferentially offloaded.
[0091] In one embodiment, the task offloading method based on the distribution transformer area distribution transformer gateway further includes the steps of obtaining the average execution time of the task to be offloaded and the data exchange time between the task to be offloaded and the next task of the task to be offloaded, and specifically includes the following content:
[0092] According to the task execution time of the task to be offloaded on the terminal device in the task set and the execution time of the task to be offloaded on each distribution transformer gateway in the distribution transformer area, the average task execution time of the task to be offloaded is obtained; according to the data exchange amount between the task to be offloaded and the next task of the task to be offloaded, the bandwidth between the terminal device and each distribution transformer gateway, and the bandwidth of each distribution transformer gateway, the data exchange time between the task to be offloaded and the next task of the task to be offloaded is obtained.
[0093] Specifically, assuming that there are A = {1, 2,..., m,..., M} distribution transformer gateway servers and B = {1, 2,..., i,..., N} terminal devices in the distribution transformer area, the average task execution time of the task to be offloaded in the task set can be obtained by the following formula:
[0094]
[0095] Wherein, represents the task execution time of the task k to be offloaded by the terminal device i on the local terminal device i.
[0096] The data exchange time between the task to be offloaded and the next task of the task to be offloaded can be obtained through the following formula:
[0097]
[0098] where k’ ∈ succ(k), and succ(k) represents one or more next tasks of the task to be offloaded k; data kk′ represents the data exchange volume between the task to be offloaded k and the next task k’ of the task to be offloaded; represents the bandwidth between the terminal device i and the distribution transformer gateway m; B mm′ represents the bandwidth between the distribution transformer gateway m and m’. When m = m’, it means that the task to be offloaded k and the next task k’ of the task to be offloaded are executed at the same location.
[0099] In this embodiment, by calculating the task execution time of the task to be offloaded on the local terminal device and each distribution transformer gateway in the distribution transformer area, and then obtaining the average task execution time of the task to be offloaded, based on the data exchange volume between the task to be offloaded and the next task of the task to be offloaded, and the bandwidth between the terminal device and each distribution transformer gateway in the distribution transformer area, the data exchange time between the task to be offloaded and the next task of the task to be offloaded can be obtained, so as to determine the task level of the task to be offloaded to maintain the dependency relationship of the tasks to be offloaded in any set.
[0100] In one embodiment, in step S203 above, according to the resource consumption of the tasks to be offloaded in the candidate task set, determine the priority of the tasks to be offloaded in the candidate task set, which specifically includes the following content:
[0101] Obtain a first weight and a second weight; the first weight is used to represent the weight coefficient of the task level, and the second weight is used to represent the weight coefficient of the resource consumption; according to the first weight and the second weight, perform a weighted sum of the task level and the resource consumption to obtain the priority of the task to be offloaded.
[0102] Specifically, obtain the weight coefficient of the task level and mark it as the first weight, obtain the weight coefficient of the resource consumption and mark it as the second weight, and then perform a weighted sum of the task level and the resource consumption according to the first weight and the second weight to obtain the priority of the task to be offloaded.
[0103] It should be noted that since the tasks to be offloaded in the candidate task set are all the tasks to be offloaded with the highest task level among the various terminal devices in the distribution transformer area, the resource consumption of each task to be offloaded has a greater impact on the priority. That is to say, generally, the greater the resource consumption of the task to be offloaded, the higher the priority of the task to be offloaded.
[0104] In practical applications, the priority of the task to be offloaded is obtained through the following formula:
[0105]
[0106] Among them, Pri(i,k) represents the priority of the task to be offloaded; α i and β i respectively represent the weight coefficient of the task level and the weight coefficient of resource consumption of the terminal device i. The terminal device i can set α i and β i according to the actual situation, but α i and β i must always satisfy α i +β i =1; X i represents the computing energy consumption of the terminal device i per unit time; represents the transmission power consumption of the terminal device i; Size i,k represents the size of the task k to be offloaded.
[0107] In this embodiment, according to the task level and resource consumption of the task to be offloaded, the priority of the task to be offloaded is determined. By preferentially offloading the tasks to be offloaded with higher resource consumption, more local resources can be saved for the terminal device, thereby reducing the resource consumption of the terminal device in the distribution substation area.
[0108] In one embodiment, before determining the priority of the task to be offloaded in the candidate task set according to the resource consumption of the task to be offloaded in the candidate task set, it further includes:
[0109] According to the computing energy consumption information per unit time of the terminal device and the task execution time of the task to be offloaded in the candidate task set corresponding to the terminal device on the terminal device, the computing energy consumption information of the terminal device is obtained; according to the transmission power of the terminal device and the data exchange time between the task to be offloaded and the next task of the task to be offloaded, the transmission energy consumption information of the terminal device is obtained; according to the computing energy consumption information and the transmission energy consumption information, the resource consumption of the task to be offloaded is obtained.
[0110] Among them, the resource consumption of the task to be offloaded includes the computing energy consumption information and the transmission energy consumption information of the terminal device corresponding to the task to be offloaded.
[0111] Specifically, the energy consumption information calculated per unit time of the terminal device and the task execution time of the offloading tasks in the candidate task set corresponding to the terminal device on the terminal device are input into the device computing energy consumption evaluation model to obtain the computing energy consumption information of the terminal device; the transmission power of the terminal device and the data exchange time between the offloading task and the next task of the offloading task are input into the device transmission energy consumption evaluation model to obtain the transmission energy consumption information of the terminal device; furthermore, according to the computing energy consumption information and the transmission energy consumption information, the resource loss of the offloading task is obtained.
[0112] In practical applications, the offloading policy file is marked as Among them, indicates that the offloading policy of the offloading task k on the terminal device i is to execute locally, indicates that the offloading policy of the offloading task k on the terminal device i is to offload the offloading task k to the distribution transformer gateway server M for execution.
[0113] The resource loss of the offloading task is obtained through the following formula:
[0114] Cons=Cons C +Cons t
[0115] Among them, Cons C represents the computing energy consumption information of the terminal device, and Cons t represents the transmission energy consumption information of the terminal device.
[0116] The computing energy consumption information Cons of the offloading task C can be obtained through the following formula:
[0117]
[0118] Among them, is a binary indicator function, and when and only when the condition is true, otherwise
[0119] The transmission energy consumption information Cons of the offloading task t can be obtained through the following formula:
[0120]
[0121] Among them, and are the same as similarly.
[0122] In this embodiment, according to the task level and resource consumption of the task to be offloaded, the priority of the task to be offloaded is determined. By preferentially offloading the task to be offloaded with higher resource consumption, more local resources can be saved for the terminal device, thereby reducing the resource consumption of the terminal device in the distribution substation area.
[0123] In one embodiment, before offloading the target task to be offloaded to the target distribution transformer gateway in the distribution substation area for processing, it further includes:
[0124] According to the actual start time when the target task to be offloaded is offloaded to the distribution transformer gateway in the distribution substation area and the execution time of the target task to be offloaded on each distribution transformer gateway in the distribution substation area, the respective actual completion times of the target task to be offloaded are obtained; from the respective actual completion times of the target task to be offloaded, the actual completion time with the smallest actual completion time is selected to obtain the actual minimum completion time of the target task to be offloaded; according to the actual minimum completion time, the target distribution transformer gateway corresponding to the offloading of the target task to be offloaded is determined from each distribution transformer gateway.
[0125] Among them, the offloading strategy of the task to be offloaded is a non-preemptive task offloading strategy, that is, it cannot be interrupted before the execution of a certain task to be offloaded is completed, and when the execution of the task to be offloaded is completed, the execution of the next task to be offloaded starts. Then the overall running delay in this method can be expressed as the overall time from the start of the execution of the first task to be offloaded to the end of the execution of the last task to be offloaded.
[0126] Specifically, according to the actual start time when the target task to be offloaded is offloaded to the distribution transformer gateway in the distribution substation area and the execution time of the target task to be offloaded on each distribution transformer gateway in the distribution substation area, the respective actual completion times of the target task to be offloaded are obtained; the respective actual completion times of the target task to be offloaded are minimized, and from the respective actual completion times of the target task to be offloaded, the actual completion time with the smallest actual completion time is selected to obtain the actual minimum completion time of the target task to be offloaded; the distribution transformer gateway corresponding to the actual minimum completion time is used as the target distribution transformer gateway corresponding to the offloading of the target task to be offloaded.
[0127] In practical applications, the actual minimum completion time of the target task to be offloaded can be expressed by the following formula:
[0128]
[0129] Among them, represents the execution time of the offloading task k of the terminal device i on the distribution transformer gateway server m. When m = -i, it represents the execution time of the offloading task k of the terminal device i on the local terminal device; Time A(i, k, m)' represents the actual earliest start time on the terminal device i when the to-be-unloaded task k is unloaded to the distribution transformer gateway server m.
[0130] Since the next task of the to-be-unloaded task cannot start before the to-be-unloaded task is completed, then Time T (i, k, m) can also be expressed by the following formula:
[0131] Time A (i, k, m) = max{avail{i, k, m}, Time T (i, k, m)}
[0132] Among them, Time T (i, k, m) represents the theoretical earliest start time of the to-be-unloaded task k on the distribution transformer gateway server m or the terminal device i; avail{i, k, m} represents the earliest time when the distribution transformer gateway server m or the terminal device i is ready to start executing the task.
[0133] And avail{i, k, m} is always greater than Time T (i, k, m) to ensure the dependency relationship between the to-be-unloaded tasks. Then Time T (i, k, m) can be defined by the following formula:
[0134]
[0135] Among them, represents the data exchange time between the to-be-unloaded task k and the next task k' of the to-be-unloaded task when the to-be-unloaded task k and the next task k' of the to-be-unloaded task are executed on m and m' respectively.
[0136] It is calculated by the following formula:
[0137]
[0138] From the above formula, it can be seen that Time A (i, k') is in a recursive form, and the exit condition of the recursion is:
[0139]
[0140] Among them, Time T (i, 1, m) = 0 indicates that the theoretical earliest start time of the first to-be-unloaded task of each terminal device is 0.
[0141] Furthermore, through Time A(i, |Wi|) represents the actual minimum completion time of the last task to be offloaded (with serial number |Wi|) on the terminal device i, that is, the minimum running delay of the task set Zi on the terminal device i.
[0142] In this embodiment, the distribution transformer gateway corresponding to the actual minimum completion time is used as the target distribution transformer gateway for offloading the target task to be offloaded, reducing the overall running delay of the tasks in the distribution transformer area.
[0143] In one embodiment, as Figure 4 shown, another task offloading method based on the distribution transformer gateway in the distribution transformer area is provided. Taking the terminal in Figure 1 as an example, the method includes the following steps:
[0144] Step S401: Input the average task execution time of the task to be offloaded in the task set, the task level of the next task of the task to be offloaded, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model to obtain the task level of the task to be offloaded.
[0145] Step S402: Screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set.
[0146] Step S403: According to the energy consumption information calculated per unit time of the terminal device and the task execution time of the task to be offloaded in the candidate task set corresponding to the terminal device, obtain the computing energy consumption information of the terminal device.
[0147] Step S404: Obtain the transmission energy consumption information of the terminal device according to the transmission power of the terminal device and the data exchange time between the task to be offloaded and the next task of the task to be offloaded; obtain the resource loss of the task to be offloaded according to the computing energy consumption information and the transmission energy consumption information.
[0148] Step S405: Obtain the first weight and the second weight; the first weight is used to represent the weight coefficient of the task level, and the second weight is used to represent the weight coefficient of the resource loss; according to the first weight and the second weight, perform a weighted sum of the task level and the resource loss to obtain the priority of the task to be offloaded.
[0149] Step S406: Screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set.
[0150] Step S407: According to the actual start time of offloading the target task to be offloaded to the distribution transformer gateway in the distribution transformer area and the execution time of the target task to be offloaded on each distribution transformer gateway in the distribution transformer area, obtain the actual completion times of the target task to be offloaded.
[0151] Step S408: From the actual completion times of each target task to be offloaded, filter out the actual completion time with the minimum actual completion time to obtain the actual minimum completion time of the target task to be offloaded.
[0152] Step S409: According to the actual minimum completion time, determine the target distribution transformer gateway corresponding to the target task to be offloaded from each distribution transformer gateway; and offload the target task to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing, and update the tasks to be offloaded in the task set including the target task to be offloaded.
[0153] Step S410: Jump to the step of filtering out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain the candidate task set, until all the tasks to be offloaded in each task set are offloaded.
[0154] The above task offloading method based on the distribution transformer gateway in the distribution transformer area can provide the following beneficial effects: By constructing a task set for the tasks of the terminal devices in the distribution transformer area, the association relationship between the tasks of the terminal devices can be obtained, providing a basis for the subsequent execution of task offloading. Furthermore, through the screening of task levels and resource consumption, while maintaining the dependency relationship between the tasks in the task set of the terminal device, the tasks to be offloaded with resource consumption meeting the second preset condition are preferentially offloaded, thereby reducing the resource consumption of the terminal devices in the distribution transformer area. By selecting the target distribution transformer gateway for offloading, the delay of the terminal device is further reduced.
[0155] In one embodiment, another task offloading method based on the distribution transformer gateway in the distribution transformer area is provided, and the specific steps are as follows:
[0156] (1) Construction of a directed acyclic graph, which specifically includes the following content:
[0157] Assume there are A = {1, 2,..m,..M} distribution transformer gateway servers and B = {1, 2,..i,..N} terminal devices. Each terminal device has a large amount of data volume and computing volume (i.e., tasks to be offloaded) to complete. The task execution process of terminal device i can be represented by a directed acyclic graph Zi = (Wi, Vi).
[0158] (2) Determine the delay modeling method of the terminal devices in the distribution transformer area and determine the resource consumption modeling method of the terminal devices in the distribution transformer area.
[0159] (3) Task offloading, which specifically includes the following content:
[0160] As can be seen from the above, before the task to be unloaded is completed, the next task of the task to be unloaded cannot be started. Therefore, the unloading order of the tasks to be unloaded will affect the overall running delay. Set the unloading policy as Set the unloading sequence of the tasks to be unloaded as Set Indicate that the scheduled time of the task to be unloaded k is earlier than The task to be unloaded k' of the distribution transformer gateway server, even for the same Different Will also result in different avail{i,k,m}, thus generating different unloading results; when And Are both determined, a unique unloading result will be obtained.
[0161] Based on the above analysis, the task unloading of the terminal equipment in the distribution transformer area can be described by the following formula:
[0162]
[0163] s.t.Cons≤C
[0164]
[0165]
[0166] Among them, C represents the threshold, and s.t.Cons≤C is used to control the resource consumption of the terminal equipment to be less than the threshold C; |Wi| represents the last task to be unloaded in the task set of the terminal equipment i.
[0167] Furthermore, referring to Table 1, unload the tasks to be unloaded in the task sets of each terminal equipment in the distribution transformer area.
[0168] Table 1
[0169]
[0170] (4) Simulation verification, which specifically includes the following contents:
[0171] Simulation verification 1: In the scenario of a fixed number of terminal devices, the number of distribution transformer gateway servers is continuously increased. The average delay results and resource consumption results of the terminal devices in the technical solution provided by this disclosure, the Potential Game based Offloading Algorithm (PGBOA), and the single-server task offloading algorithm (SSDTOA) are compared. The simulation results are as follows Figure 5 、 Figure 6 shown.
[0172] The average delay results of the terminal devices refer to Figure 5 , and from Figure 5 it can be seen that when the number of distribution transformer gateway servers reaches 25, the average delay of the technical solution provided by this disclosure is only 12 ms. The second smallest average delay is the SSDTOA algorithm, and the largest average delay is the PGBOA algorithm. The reason why the average delay of the PGBOA algorithm is the largest is that the PGBOA algorithm regards the tasks of the terminal devices as a whole and offloads them to the distribution transformer gateway servers for processing. Therefore, as the number of distribution transformer gateway servers increases, the PGBOA algorithm does not perform parallel operations on the directed acyclic graph Zi = (Wi, Vi). In the SSDTOA algorithm, this algorithm restricts that all tasks to be offloaded on the terminal devices must be offloaded to the same distribution transformer gateway server. Therefore, the SSDTOA algorithm cannot improve performance as the number of distribution transformer gateway servers increases.
[0173] Furthermore, the resource consumption of the terminal devices in the technical solution provided by this disclosure is compared with the SSDTOA algorithm. The overall resource consumption results of the terminal devices refer to Figure 6 . When the number of distribution transformer gateway servers is 20, the energy consumption of the technical solution provided by this disclosure is 972 joules, and the energy consumption of the SSDTOA algorithm is 984 joules. Therefore, the technical solution provided by this disclosure has less resource consumption.
[0174] Simulation verification 2: In the scenario of a fixed number of distribution transformer gateways, the number of terminal devices is continuously increased, and the directed acyclic graphs of each terminal device are set to be the same. The average delay results and resource consumption results of the terminal devices in the technical solution provided by this disclosure, the PGBOA algorithm, and the SSDTO algorithm are compared. The simulation results are as follows Figure 7 、 Figure 8 shown.
[0175] The average delay results of the terminal devices refer to Figure 7 , and from Figure 7It can be seen that when the number of terminal devices reaches 25, the average delay of the technical solution provided by the embodiments of the present disclosure is 25 ms, the SSDTOA algorithm is 69 ms, and the PGBOA algorithm is 105 ms. Therefore, the average delay of the technical solution provided by the embodiments of the present disclosure is the smallest.
[0176] Furthermore, the technical solution provided by the embodiments of the present disclosure compares the resource consumption of terminal devices with the SSDTOA algorithm. The overall resource consumption result of the terminal devices is referred to Figure 8 , when the number of terminal devices increases to 25, the energy consumption of the technical solution provided by the embodiments of the present disclosure is 965 joules, and the energy consumption of the SSDTOA algorithm is 982 joules. Therefore, the resource consumption of the technical solution provided by the embodiments of the present disclosure is smaller.
[0177] In this embodiment, according to the task level of the terminal device, the dependency relationship between the tasks to be offloaded in the task set of the terminal device is maintained, and the terminal devices with high resource consumption are preferentially offloaded, thereby reducing the resource loss of the terminal devices in the distribution transformer area. By selecting the target distribution transformer gateway with the lowest actual completion time for offloading, the overall delay of the terminal device is further reduced.
[0178] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.
[0179] Based on the same inventive concept, the embodiments of the present application also provide a task offloading device based on a distribution transformer area distribution transformer gateway for implementing the above-mentioned task offloading method based on a distribution transformer area distribution transformer gateway. The implementation solutions for solving problems provided by this device are similar to those described in the above method. Therefore, the specific limitations in one or more embodiments of the task offloading device based on a distribution transformer area distribution transformer gateway provided below can refer to the limitations on the task offloading method based on a distribution transformer area distribution transformer gateway in the above text, and will not be repeated here.
[0180] In one embodiment, as Figure 9As shown, a task offloading device 900 based on a distribution transformer gateway in a distribution substation area is provided, including: a task level determination module 901, a task set determination module 902, a priority determination module 903, a target task offloading module 904, and an offloading task judgment module 905, where:
[0181] The task level determination module 901 is configured to determine the task levels of the tasks to be offloaded in each task set according to the task execution times of the tasks to be offloaded in the task sets corresponding to multiple terminal devices in the distribution substation area.
[0182] The task set determination module 902 is configured to respectively screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set.
[0183] The priority determination module 903 is configured to determine the priorities of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set.
[0184] The target task offloading module 904 is configured to screen out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offload the target tasks to be offloaded to the target distribution transformer gateway in the distribution substation area for processing.
[0185] The offloading task judgment module 905 is configured to update the tasks to be offloaded in the task set including the target tasks to be offloaded, and jump to the step of respectively screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set, until all the tasks to be offloaded in each task set are offloaded.
[0186] In one embodiment, the task level determination module 901 is further configured to input the average task execution time of the tasks to be offloaded in the task set, the task level of the next task of the task to be offloaded, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model to obtain the task level of the task to be offloaded.
[0187] In one embodiment, the task offloading device 900 based on the distribution transformer gateway in the distribution substation area further includes a time information acquisition module, configured to obtain the average task execution time of the tasks to be offloaded according to the task execution time of the tasks to be offloaded on the terminal device in the task set and the execution time of the tasks to be offloaded on each distribution transformer gateway in the distribution substation area; and obtain the data exchange time between the task to be offloaded and the next task of the task to be offloaded according to the data exchange amount between the task to be offloaded and the next task of the task to be offloaded, the bandwidth between the terminal device and each distribution transformer gateway respectively, and the bandwidth of each distribution transformer gateway.
[0188] In one embodiment, the priority determination module 903 is further configured to obtain a first weight and a second weight; the first weight is used to represent the weight coefficient of the task level, and the second weight is used to represent the weight coefficient of the resource consumption; according to the first weight and the second weight, the task level and the resource consumption are weighted and summed to obtain the priority of the task to be offloaded.
[0189] In one embodiment, the task offloading device 900 based on the distribution transformer area distribution transformer gateway further includes a resource consumption acquisition module, configured to calculate the energy consumption information according to the unit time of the terminal device, and the task execution time of the task to be offloaded in the candidate task set corresponding to the terminal device on the terminal device, to obtain the computing energy consumption information of the terminal device; according to the transmission power of the terminal device and the data exchange time between the task to be offloaded and the next task of the task to be offloaded, to obtain the transmission energy consumption information of the terminal device; according to the computing energy consumption information and the transmission energy consumption information, to obtain the resource consumption of the task to be offloaded.
[0190] In one embodiment, the task offloading device 900 based on the distribution transformer area distribution transformer gateway further includes a distribution transformer gateway determination module, configured to obtain the actual completion times of the target task to be offloaded according to the actual start time of the target task to be offloaded to the distribution transformer gateway in the distribution transformer area and the execution time of the target task to be offloaded on each distribution transformer gateway in the distribution transformer area; from the actual completion times of the target task to be offloaded, screen out the actual completion time with the smallest actual completion time to obtain the actual minimum completion time of the target task to be offloaded; according to the actual minimum completion time, determine the target distribution transformer gateway corresponding to the offloading of the target task to be offloaded from each distribution transformer gateway.
[0191] Each module in the above task offloading device based on the distribution transformer area distribution transformer gateway can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0192] In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as Figure 10As shown in the figure. The computer device includes a processor, a memory, a communication interface, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a task offloading method based on a distribution transformer gateway in a distribution area.
[0193] Those skilled in the art can understand that Figure 10 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0194] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0195] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0196] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0197] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties.
[0198] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0199] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0200] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A task offloading method based on a distribution transformer gateway in a distribution substation area, characterized in that The method includes: Obtaining the average task execution time of the task to be offloaded according to the task execution time of the task to be offloaded in the task set on the terminal device and the execution time of the task to be offloaded on each distribution transformer gateway in the distribution transformer area; Obtaining the data exchange time between the task to be offloaded and the next task of the task to be offloaded according to the data exchange volume between the task to be offloaded and the next task of the task to be offloaded, the bandwidth between the terminal device and each distribution transformer gateway respectively, and the bandwidth of each distribution transformer gateway; Inputting the average task execution time of the task to be offloaded in the task set, the task level of the next task of the task to be offloaded, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model to obtain the task level of the task to be offloaded; Screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set; Determining the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set; Screening out the target tasks to be offloaded whose priorities meet the second preset condition from the candidate task set, and offloading the target tasks to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing; Updating the tasks to be offloaded in the task set including the target task to be offloaded, and jumping to the step of screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded.
2. The method according to claim 1, wherein The second preset condition includes that the priority is the highest in the candidate task set.
3. The method according to claim 1, characterized in that The updating of the tasks to be offloaded in the task set including the target task to be offloaded includes: Deleting the target task to be offloaded in the target task set; Or, modifying the offloading flag of the target task to be offloaded in the target task set to an offloaded flag.
4. The method according to claim 1, wherein The determining the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set includes: Obtaining a first weight and a second weight; the first weight is used to represent the weight coefficient of the task level, and the second weight is used to represent the weight coefficient of the resource consumption; Performing weighted summation on the task level and the resource consumption according to the first weight and the second weight to obtain the priority of the task to be offloaded.
5. The method according to claim 1, wherein Before determining the priority of the tasks to be offloaded in the candidate task set according to the resource consumption of the tasks to be offloaded in the candidate task set, it further includes: Obtaining the computing energy consumption information of the terminal device according to the computing energy consumption information per unit time of the terminal device and the task execution time of the tasks to be offloaded in the candidate task set corresponding to the terminal device; Obtain the transmission energy consumption information of the terminal device according to the transmission power of the terminal device and the data exchange time between the task to be offloaded and the next task of the task to be offloaded. Obtain the resource loss of the task to be offloaded according to the calculated energy consumption information and the transmission energy consumption information.
6. The method according to any one of claims 1 to 5, characterized in that Before offloading the target task to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing, it further includes: Obtain the actual completion times of the target task to be offloaded according to the actual start time of offloading the target task to be offloaded to the distribution transformer gateway in the distribution transformer area and the execution times of the target task to be offloaded on each distribution transformer gateway in the distribution transformer area. From the actual completion times of the target task to be offloaded, screen out the actual completion time with the smallest actual completion time to obtain the actual minimum completion time of the target task to be offloaded. Determine the target distribution transformer gateway corresponding to the offloading of the target task to be offloaded from each distribution transformer gateway according to the actual minimum completion time.
7. A task offloading device based on a distribution transformer gateway in a distribution substation area, characterized in that, The device includes: A task level determination module, configured to obtain the average task execution time of the task to be offloaded according to the task execution time of the task to be offloaded in the terminal device in the task set and the execution times of the task to be offloaded on each distribution transformer gateway in the distribution transformer area; obtain the data exchange time between the task to be offloaded and the next task of the task to be offloaded according to the data exchange amount between the task to be offloaded and the next task of the task to be offloaded, the bandwidth between the terminal device and each distribution transformer gateway, and the bandwidth of each distribution transformer gateway; input the average task execution time of the task to be offloaded in the task set, the task level of the next task of the task to be offloaded, and the data exchange time between the task to be offloaded and the next task of the task to be offloaded into the task level estimation model to obtain the task level of the task to be offloaded. A task set determination module, configured to screen out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set. A priority determination module, configured to determine the priorities of the tasks to be offloaded in the candidate task set according to the resource losses of the tasks to be offloaded in the candidate task set. A target task offloading module, configured to screen out the target task to be offloaded whose priority meets the second preset condition from the candidate task set and offload the target task to be offloaded to the target distribution transformer gateway in the distribution transformer area for processing. An offloading task condition module, configured to update the tasks to be offloaded in the task set including the target task to be offloaded, and jump to the step of screening out the tasks to be offloaded whose task levels meet the first preset condition from the tasks to be offloaded in each task set to obtain a candidate task set until all the tasks to be offloaded in each task set are offloaded.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Task scheduling device and task scheduling method in multimode distributive system
CN102831012A
Task unloading method and related device
CN114217881A