Task scheduling method, device, storage medium and apparatus

CN116980188BActive Publication Date: 2026-09-11JIANGSU MOBILE INFORMATION SYST INTEGRATION CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310886509.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2026-09-11
Estimated Expiration
2043-07-18

AI Technical Summary

Technical Problem

[0003]本发明的主要目的在于提供一种任务调度方法、设备、存储介质及装置,旨在解决在无线充电边缘计算环境下,如何对安全加密任务进行调度优化的技术问题

Benefits of technology

[0041] This invention discloses a method for acquiring security encryption tasks on a device in a wireless charging edge computing environment, constructing a neighborhood based on the security encryption tasks, selecting a target task sequence from the task sequences in the neighborhood, generating a task offloading scheduling scheme based on the target task sequence, and allocating the security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme. Because this invention generates a task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence, it can effectively address the task scheduling problem for security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks and saving energy consumption in a wireless charging edge computing environment, and thus effectively improving the service quality of mobile devices in mobile edge computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116980188B_ABST
    Figure CN116980188B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of edge computing, and discloses a task scheduling method, device, storage medium and apparatus, which comprises: obtaining a security encryption task on a device in a wireless charging edge computing environment, constructing a neighborhood based on the security encryption task, selecting a target task sequence from the task sequence of the neighborhood, generating a task offloading scheduling scheme according to the target task sequence, and distributing the security encryption task to the device and a server for execution according to the task offloading scheduling scheme. Since the present application generates a task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence, it can effectively deal with the task scheduling problem of security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks in a wireless charging edge computing environment and saving energy consumption, and thus effectively improving the service quality of mobile devices in mobile edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing technology, and in particular to a task scheduling method, device, storage medium and apparatus. Background Technology

[0002] The integration of Mobile Edge Computing (MEC) and Wireless Power Transfer (WPT) introduces a new paradigm called Wireless Power Mobile Edge Computing (WP-MEC). Mobile devices harvest power from edge devices via WPT and offload intensive computing loads to edge devices via MEC. A fundamental problem in WP-MEC networks is scheduling the computing power of mobile devices to improve network computing performance. In a WP-MEC network, mobile devices are powered solely by WPT. Therefore, the energy consumption of each mobile device's local computing and offloading should never exceed the energy it harvests. However, due to the half-duplex nature of mobile devices, wireless power transfer and offloading cannot occur simultaneously, dividing time in a WP-MEC network into two parts: WPT time and offloading time. Therefore, the time allocation for WPT and offloading in a WP-MEC network will affect the amount of energy harvested by each mobile device, and consequently, the computing scheduling of the WP-MEC network. This means that the computing scheduling problem in a WP-MEC network should jointly consider WPT time allocation and mobile device computing scheduling. Summary of the Invention

[0003] The main objective of this invention is to provide a task scheduling method, device, storage medium, and apparatus, which aims to solve the technical problem of how to optimize the scheduling of secure encryption tasks in a wireless charging edge computing environment.

[0004] To achieve the above objectives, the present invention provides a task scheduling method, the task scheduling method comprising the following steps:

[0005] Acquire secure encryption tasks on the device in a wireless charging edge computing environment;

[0006] A neighborhood is constructed based on the security encryption task, and a target task sequence is selected from the task sequence of the neighborhood;

[0007] A task offloading schedule is generated based on the target task sequence, and the security encryption task is allocated to devices and servers for execution according to the task offloading schedule.

[0008] Optionally, the step of constructing a neighborhood based on the secure encryption task and selecting a target task sequence from the task sequence of the neighborhood includes:

[0009] Sort the security encryption tasks to obtain the target task sequence;

[0010] Constructing a neighborhood based on the target task sequence;

[0011] Calculate the completion time of the task sequence in the neighborhood, and perform bubble sort on the task sequence in the neighborhood according to the completion time;

[0012] A new sequence of target tasks is obtained based on the bubble sort results;

[0013] The process of constructing a neighborhood based on the target task sequence is repeated until no new task sequence can be obtained or the number of iterations is reached, at which point the target task sequence is obtained.

[0014] Optionally, the completion time of the task sequence in the computational neighborhood includes:

[0015] Calculate the local execution time on the device and the server execution time on the server for each task sequence in the neighborhood.

[0016] When the local execution time is less than the server execution time, the task allocation scheme is to leave the task to be executed on the device.

[0017] When the local execution time is greater than or equal to the server execution time, the task allocation scheme is to offload the task to the server for execution;

[0018] Update the local execution time, server execution time, and task execution time. The task execution time is the maximum value between the local execution time and the server execution time.

[0019] Calculate the maximum energy limit of the computing device and the current energy consumption corresponding to the assigned task;

[0020] When the current energy consumption exceeds the maximum energy limit, change the task allocation scheme to another scheme and return to the steps of updating the local execution time, server execution time, and task execution time;

[0021] When the current energy consumption is less than or equal to the maximum energy limit, the task allocation scheme remains unchanged;

[0022] The process iteratively calculates the local execution time on the device and the server execution time on the server for each task in the neighborhood task sequence until all tasks in the neighborhood task sequence have been assigned and completed. The task execution time is then used as the completion time of the task sequence in the neighborhood.

[0023] Optionally, the maximum energy limit of the computing device includes:

[0024] Calculate the charging time based on the time slot of the current execution time;

[0025] The maximum energy limit of the device is calculated based on the initial energy and the energy collected during the charging time.

[0026] Optionally, the current energy consumption corresponding to the computational allocation task includes:

[0027] The local energy consumption of computing tasks remaining on the device for execution and the offloading energy consumption of each task offloaded to the server for execution;

[0028] The current energy consumption corresponding to the allocated task is calculated based on the local energy consumption and the energy consumption of the unloaded portion.

[0029] Optionally, constructing the neighborhood based on the target task sequence includes:

[0030] Create an empty neighborhood and add the target task sequence to the empty neighborhood;

[0031] Traverse the target task sequence, starting from the first task and swapping its position with the subsequent tasks. Each time a task is swapped, the resulting new task sequence is placed in the neighborhood. Continue this process until the second-to-last task is swapped with the last task, thus obtaining the neighborhood.

[0032] Optionally, constructing the neighborhood based on the target task sequence includes:

[0033] Create an empty neighborhood and add the target task sequence to the empty neighborhood;

[0034] Traverse the target task sequence, starting from the first task and inserting it into the subsequent tasks in turn. Place the newly generated task sequence into the neighborhood. Continue the loop until the second to last task is inserted into the last task, and then obtain the neighborhood.

[0035] Furthermore, to achieve the above objectives, the present invention also proposes a task scheduling device, which includes a memory, a processor, and a task scheduling program stored in the memory and executable on the processor, the task scheduling program being configured to implement the task scheduling method described above.

[0036] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a task scheduler, which, when executed by a processor, implements the task scheduling method described above.

[0037] In addition, to achieve the above objectives, the present invention also proposes a task scheduling device, which includes: a task acquisition module, a sequence selection module, and a task scheduling module;

[0038] The task acquisition module is used to acquire the security encryption tasks on the device in the wireless charging edge computing environment;

[0039] The sequence selection module is used to construct a neighborhood based on the security encryption task and select a target task sequence from the task sequences in the neighborhood.

[0040] The task scheduling module is used to generate a task offloading scheduling scheme based on the target task sequence, and to allocate the security encryption task to the device and server for execution according to the task offloading scheduling scheme.

[0041] This invention discloses a method for acquiring security encryption tasks on a device in a wireless charging edge computing environment, constructing a neighborhood based on the security encryption tasks, selecting a target task sequence from the task sequences in the neighborhood, generating a task offloading scheduling scheme based on the target task sequence, and allocating the security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme. Because this invention generates a task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence, it can effectively address the task scheduling problem for security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks and saving energy consumption in a wireless charging edge computing environment, and thus effectively improving the service quality of mobile devices in mobile edge computing. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the structure of the task scheduling device in the hardware operating environment involved in the embodiments of the present invention;

[0043] Figure 2 This is a flowchart illustrating the first embodiment of the task scheduling method of the present invention;

[0044] Figure 3 This is a flowchart illustrating the second embodiment of the task scheduling method of the present invention;

[0045] Figure 4 This is a detailed flowchart of an embodiment of the task scheduling method of the present invention;

[0046] Figure 5 This is a structural block diagram of the first embodiment of the task scheduling device of the present invention.

[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0048] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the task scheduling device structure of the hardware operating environment involved in the embodiments of the present invention.

[0050] like Figure 1 As shown, the task scheduling device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the task scheduling device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0052] like Figure 1 As shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a task scheduler.

[0053] exist Figure 1 In the task scheduling device shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the user equipment; the task scheduling device calls the task scheduling program stored in the memory 1005 through the processor 1001 and executes the task scheduling method provided in the embodiment of the present invention.

[0054] Based on the above hardware structure, an embodiment of the task scheduling method of the present invention is proposed.

[0055] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the task scheduling method of the present invention, which presents the first embodiment of the task scheduling method of the present invention.

[0056] The integration of MEC and WPT introduces a new paradigm called Wireless Mobile Edge Computing (WP-MEC), where mobile devices harvest power from edge devices via WPT and offload intensive computational loads to edge devices via MEC. A fundamental problem in WP-MEC networks is scheduling the computation of mobile devices to improve network computing performance. In WP-MEC networks, mobile devices are powered solely by WPT. Therefore, the energy consumption of each mobile device's local computation and offloading should never exceed the energy it harvests. However, due to the half-duplex transmission of mobile devices, wireless power harvesting and offloading cannot occur simultaneously, dividing time in the WP-MEC network into two parts: WPT time and offloading time. Therefore, the time allocation for WPT and offloading in a WP-MEC network will affect the amount of energy harvested by each mobile device, and consequently, the computation scheduling of the WP-MEC network. This means that the computation scheduling problem in WP-MEC networks should jointly consider WPT time allocation and mobile device computation scheduling.

[0057] Currently, significant progress has been made in WP-MEC networks and in the field of safety-critical tasks. To maximize the computational performance of WP-MEC networks, a method is proposed to maximize the weighted sum computational rate of all mobile devices within the WP-MEC network. To minimize the execution cost of WP-MEC networks, a dynamic computation offloading method based on Lyapunov optimization and a two-stage method to minimize the transmission energy of edge devices are proposed. For safety-critical tasks, a safety-critical task scheduling method for MEC environments is proposed.

[0058] However, existing technical solutions have the following problems and drawbacks: existing task scheduling methods for resource-constrained MEC systems either fail to consider the encryption / decryption overhead during the offloading process of security-critical tasks, or fail to consider energy harvesting in wireless power transfer mechanisms. Therefore, they are not applicable to solving the edge computing task scheduling scenario considered in this invention. To overcome these shortcomings, this embodiment generates a task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence. This effectively addresses the task scheduling problem for security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks and saving energy in the wireless charging edge computing environment, thus effectively improving the service quality of mobile devices in mobile edge computing.

[0059] In the first embodiment, the task scheduling method includes the following steps:

[0060] Step S10: Obtain the security encryption task on the device in the wireless charging edge computing environment.

[0061] It should be understood that the execution subject of the method in this embodiment can be a task scheduling device with data processing, network communication and program running functions, and this embodiment does not limit this.

[0062] It should be noted that the security encryption task on the device can be a set of tasks on the device; for example, the device contains a task set π. s ={π1,π2,…,π n} and can form a task sequence π = (π1, π2, ..., π) n The sequence consists of n tasks, and the decision variable x is determined by the number of tasks. i (x i ∈[0,1]) is used as a decision variable to represent whether the task is offloaded to the server or executed on the device. When x i When = 1, it represents task π. i Calculated on the device; when x i When π = 0, it represents task π. i Offloading the computation to a server allows π to be divided into two subsequences. and Where π L ={π|x i =1,i=1,2,…,N},π O ={π|x i =0,i=1,2,…,N}, and the sequence π L and sequence π O The order of tasks in the sequence remains consistent with the order in the original sequence π. Each task is independent and indivisible, and can be either offloaded or left on the device for processing. Each task contains three attributes: task π. i The amount of data to be processed, c i (bit), processing task π i Number of CPU cycles required per bit of data φ i (cycles / bit) represents task π. i The selected security policy p l Security Policy p l The amount of encrypted data per bit is denoted as α. l (cycles / bit), the corresponding amount of decrypted data per bit is β l (cycles / bit)

[0063] Understandably, to facilitate subsequent domain construction and selection of target task sequences, this embodiment, in addition to obtaining the security encryption tasks on the device, also needs to obtain device information and server information. The device information includes the task offloading power P. O (mw), the device's calculated power P u(w) Device CPU frequency f u (GHz), initial battery level E0, server information includes server transmission power P e (w) Attenuated transmission power server CPU frequency f e (GHz).

[0064] Step S20: Construct a neighborhood based on the security encryption task, and select a target task sequence from the task sequence of the neighborhood.

[0065] It should be noted that the target task sequence can be the optimal task sequence with the shortest completion time.

[0066] It should be understood that constructing a neighborhood based on a security encryption task and selecting a target task sequence from the task sequence in the neighborhood can be done by sorting the security encryption tasks to obtain a sorted task sequence, constructing a neighborhood based on the sorted task sequence, and selecting a target task sequence based on the completion time of the task sequences in the neighborhood.

[0067] Step S30: Generate a task offloading schedule based on the target task sequence, and allocate the security encryption task to the device and server for execution according to the task offloading schedule.

[0068] It is understandable that allocating security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme can mean that the security encryption task part remains to be computed on the device and the security encryption task part is offloaded to the server for computed.

[0069] In specific implementations, for example, because the task offloading scheduling scheme will set the task set π = (π1, π2, ..., π...), n Divide into two subsequences and Where π L ={π|x i =1,i=1,2,…,N},π O ={π|x i =0,i=1,2,…,N}, where when x i When = 1, it represents task π. i The calculation remains on the device; when x i When π = 0, it represents task π. i The computation is offloaded to the server. Therefore, a task offloading schedule can be directly generated based on the target task sequence, and the security encryption tasks can be allocated to devices and servers for execution according to the task offloading schedule.

[0070] This embodiment discloses a method for acquiring security encryption tasks on a device in a wireless charging edge computing environment, constructing a neighborhood based on the security encryption tasks, selecting a target task sequence from the task sequences in the neighborhood, generating a task offloading scheduling scheme based on the target task sequence, and allocating the security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme. Since this embodiment generates the task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence, it can effectively address the task scheduling problem for security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks in a wireless charging edge computing environment and saving energy consumption, thus effectively improving the service quality of mobile devices in mobile edge computing.

[0071] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the task scheduling method of the present invention, based on the above. Figure 2 The first embodiment shown is followed by a second embodiment of the task scheduling method of the present invention.

[0072] In the second embodiment, step S20 includes:

[0073] Step S201: Sort the security encryption tasks to obtain the target task sequence.

[0074] It should be understood that, in order to improve the reliability of the target task sequence, in this embodiment, a neighborhood is constructed by moving tasks in the task sequence, and the completion time of the task sequence in each construction is calculated until the target task sequence with the shortest completion time is obtained.

[0075] It should be noted that the target task sequence can be the optimal task sequence with the shortest completion time.

[0076] It is understandable that sorting the security encryption tasks to obtain the target task sequence can be done by sorting the security encryption tasks using one of the following methods: Longest Task First (LTF), Random, or Shortest Task First (STF).

[0077] Step S202: Construct a neighborhood based on the target task sequence.

[0078] It should be understood that constructing a neighborhood based on the target task sequence can be done through either swapping or insertion. The advantages and disadvantages of swapping and insertion are as follows: Advantages of swapping: 1. Simple and intuitive: Swapping is simple to operate and easy to understand and implement; 2. Wide applicability: Applicable to various data structures, not limited to arrays; 3. Fewer comparisons: Since swapping is done by comparing adjacent elements, the number of comparisons between adjacent elements is reduced. Disadvantages of swapping: 1. More data moves: Because each swap requires moving the element's position, the number of data moves is relatively high, resulting in lower efficiency; 2. Instability: Swapping may cause changes in the relative order of identical elements, meaning the sorted result may be unstable. Advantages of insertion: 1. Fewer data moves: Insertion only requires inserting elements into the correct position, without frequent element movement, thus reducing the number of data moves and increasing efficiency; 2. Stability: Insertion maintains the relative order of identical elements, meaning the sorted result is stable. The disadvantages of the Insertion method are: 1. Higher implementation complexity: Compared with the swap method, the insertion method requires more logic to determine the insertion position of the element; 2. Not friendly to large-scale data: When the data scale is large, the efficiency of the insertion method will decrease significantly because elements need to be moved frequently.

[0079] Furthermore, to reduce the complexity of constructing the neighborhood, this embodiment can employ a swapping movement method. Step S202 includes:

[0080] Create an empty neighborhood and add the target task sequence to the empty neighborhood;

[0081] Traverse the target task sequence, starting from the first task and swapping its position with the subsequent tasks. Each time a task is swapped, the resulting new task sequence is placed in the neighborhood. Continue this process until the second-to-last task is swapped with the last task, thus obtaining the neighborhood.

[0082] Furthermore, to reduce the number of data moves, this embodiment can employ an Insertion-based movement method. Step S202 includes:

[0083] Create an empty neighborhood and add the target task sequence to the empty neighborhood;

[0084] Traverse the target task sequence, starting from the first task and inserting it into the subsequent tasks in turn. Place the newly generated task sequence into the neighborhood. Continue the loop until the second to last task is inserted into the last task, and then obtain the neighborhood.

[0085] Step S203: Calculate the completion time of the task sequence in the neighborhood, and perform bubble sort on the task sequence in the neighborhood according to the completion time.

[0086] It is understandable that bubble sorting of the task sequence in the neighborhood based on the completion time can be performed by bubble sorting the task sequence in the neighborhood in ascending order of completion time.

[0087] Step S204: Obtain a new target task sequence based on the bubble sort result.

[0088] It should be understood that obtaining a new target task sequence based on the bubble sort result can be achieved by taking the first task sequence in the neighborhood after bubble sort as the new target task sequence.

[0089] Step S205: Repeat the steps of constructing a neighborhood based on the target task sequence until no new task sequence can be obtained or the number of iterations is reached, and obtain the target task sequence.

[0090] Understandably, the loop constructs a neighborhood based on the target task sequence until no new task sequence can be obtained or the number of iterations is reached, in order to find the optimal task sequence with the shortest completion time as the target task sequence.

[0091] This embodiment constructs a neighborhood by moving tasks in the task sequence and calculates the completion time of the task sequence in each construction until the target task sequence with the shortest completion time is obtained, thereby improving the reliability of the target task sequence.

[0092] Based on the above Figure 3 The second embodiment shown presents a third embodiment of the task scheduling method of the present invention.

[0093] It should be understood that, in order to obtain the target task scheduling with the goal of minimizing the completion time under the constraint of maximum energy, in this embodiment, the completion time of the task sequence in the neighborhood is obtained by comparing the local execution time of the task sequence on the device and the server execution time on the server, and by comparing the current energy consumption corresponding to the assigned task with the maximum energy limit of the device.

[0094] In the third embodiment, calculating the completion time of the task sequence in the neighborhood includes:

[0095] Calculate the local execution time on the device and the server execution time on the server for each task sequence in the neighborhood. If the local execution time is less than the server execution time, the task allocation scheme is to keep the task on the device for execution. If the local execution time is greater than or equal to the server execution time, the task allocation scheme is to unload the task to the server for execution. Update the local execution time, server execution time, and task execution time. The task execution time is the maximum value between the local execution time and the server execution time. Calculate the device's maximum energy limit and the current energy consumption corresponding to the task allocation. If the current energy consumption is greater than the maximum energy limit, change the task allocation scheme to another scheme and return to the steps of updating the local execution time, server execution time, and task execution time. If the current energy consumption is less than or equal to the maximum energy limit, maintain the task allocation scheme unchanged. Repeat the steps of calculating the local execution time on the device and the server execution time on the server for each task sequence in the neighborhood until all tasks in the task sequence in the neighborhood have been allocated. Use the task execution time as the completion time of the task sequence in the neighborhood.

[0096] Furthermore, the maximum energy limit of the computing device includes:

[0097] Calculate the charging time based on the time slot of the current execution time;

[0098] The maximum energy limit of the device is calculated based on the initial energy and the energy collected during the charging time.

[0099] Furthermore, the current energy consumption corresponding to the computational allocation task includes:

[0100] The local energy consumption of computing tasks remaining on the device for execution and the offloading energy consumption of each task offloaded to the server for execution;

[0101] The current energy consumption corresponding to the allocated task is calculated based on the local energy consumption and the energy consumption of the unloaded portion.

[0102] For ease of understanding, the following example illustrates the task scheduling method, but it does not limit this approach. The task scheduling method includes the following steps:

[0103] Step S1: Read task information, device information, and server information;

[0104] Step S2: Construct a neighborhood based on the optimal task sequence and find the optimal task sequence in the neighborhood;

[0105] Step S3: Output the allocation strategy and completion time.

[0106] In step S1, the read task information has the following properties: the device contains a task set π. s ={π1,π2,…,π n} and can form a task sequence π = (π1, π2, ..., π) n The sequence consists of n tasks, and the decision variable x is determined by the number of tasks. i (x i ∈[0,1]) is used as a decision variable to represent whether the task is offloaded to the server or executed on the device. When x i When = 1, it represents task π. i Calculated on the device; when x i When π = 0, it represents task π. i The value of π (calculated on a server) can divide π into two subsequences. and Where π L ={π|x i =1,i=1,2,…,N},π O ={π|x i =0,i=1,2,…,N}, and the sequence π L and sequence π O The order of tasks in the sequence remains consistent with the order in the original sequence π. Each task is independent and indivisible, and can be either offloaded or left on the device for processing. Each task contains three attributes: task π. i The amount of data to be processed, c i (bit), processing task π i Number of CPU cycles required per bit of data φ i (cycles / bit) represents task π. i The selected security policy p l Security Policy p l The amount of encrypted data per bit is denoted as α. l (cycles / bit), the corresponding amount of decrypted data per bit is β l (cycles / bit)

[0107] In step S1, the device and server information includes the following properties: Device information includes task offloading power P O (mw), the device's calculated power P u (w) Device CPU frequency f u (GHz), initial battery level E0. Server information includes the server's transmission power P. e (w) Attenuated transmission power P e f (w) Server CPU frequency f e(GHz). Meanwhile, we assume that in the WP-MEC system, the server transmits RF power only during the WPT time within a time slot T, i.e., energy transmission occurs within time τ0, and the remaining time T-τ0 in the time slot is used for task offloading. The total WPT time when all tasks are completed is denoted as T. wpt Meanwhile, the server is equipped with only a single-core CPU, so tasks offloaded to the server are scheduled using a first-in, first-out (FIFO) strategy. The device also has only one transmission antenna, meaning it can only offload one task to the server at a time.

[0108] In step S2, the specific steps for constructing a neighborhood based on the optimal task sequence and finding the optimal task sequence within that neighborhood are as follows:

[0109] Step S21: Initialize the optimal task sequence. The task sequence obtained by sorting the tasks according to one of the sorting methods LTF, Random, and STF is the optimal task sequence.

[0110] Step S22: Construct a neighborhood based on the optimal task sequence;

[0111] Step S23: Calculate the completion time of the task sequence in the neighborhood, and perform bubble sort on the task sequence in the neighborhood in ascending order of completion time.

[0112] Step S24: Obtain the optimal task sequence, which is the first task sequence in the neighborhood after bubble sort.

[0113] Step S25, repeat steps S22-S24 until no task sequence with a shorter completion time is found or the number of iterations is reached;

[0114] Step S26: Output the optimal task sequence.

[0115] In step S22, there are two methods for constructing a neighborhood based on the optimal task sequence: swapping and insertion.

[0116] The swapping method involves the following steps:

[0117] Step S2211: Create an empty neighborhood and add the optimal task sequence to it;

[0118] Step S2212: Traverse the optimal task sequence, starting from the first task, and swap the positions of the optimal task sequence with the subsequent tasks. Each time a task is swapped, the newly generated task sequence is placed in the neighborhood, until the second to last task swaps with the last task.

[0119] Step S2213: Output the neighborhood.

[0120] The insertion movement method involves the following steps:

[0121] Step S2221: Create an empty neighborhood and add the optimal task sequence to it;

[0122] Step S2222: Traverse the optimal task sequence, starting from the first task and inserting it into the subsequent tasks in turn. Place the generated new task sequence into the neighborhood until the second to last task is inserted into the last task and the loop ends.

[0123] Step S2223: Output the neighborhood.

[0124] In step S23, calculating the completion time of the task sequence in the neighborhood involves the following steps:

[0125] Step S231: Initialize all parameters to 0, including local execution time L, server execution time S, and task execution time M;

[0126] Step S232, calculate the execution time of the task on the device using formula (1). At the same time, the data encryption time is first calculated using formulas (3), (4), (5), (6), and (10) respectively. Data decryption time Transmission rate R, data transmission time Task computation time on the server Then, use formula (2) to calculate the execution time of the task on the server.

[0127] Step S233, update L and S;

[0128] Step S234: Compare L and S. If L is smaller, the task remains to be executed on the device, i.e., x i =1; otherwise, the task is offloaded to the server for execution, i.e., x i =0;

[0129] Step S235, update L, S, and M;

[0130] Step S236: Calculate the current device's maximum energy limit and current energy consumption;

[0131] Step S237: Compare the current energy consumption with the device's maximum energy limit. If the energy consumption exceeds the maximum energy limit, change the current task allocation scheme to another scheme. Update L, S, and M; otherwise, leave them unchanged.

[0132] Step S238, repeat S232 to S237 until all tasks in the task set have been assigned;

[0133] Step S239: Output the unloading scheme and M.

[0134] In step S233, L is updated to L and The sum of L and L, and for the update L in steps S235 and S237, if the task is executed on the device, then L is the sum of L and L. The sum of the values ​​is equal to the sum of the values ​​of L and L. Otherwise, any changes made by L in this task assignment are revoked.

[0135] In steps S235 and S237, the update method for S is as follows: if the task is executed on the server, the update method in step S233 is followed; otherwise, the changes to S in this task assignment are revoked. The S update steps in step S233 are as follows:

[0136] Step S2331: Calculate the execution time of all current tasks on the server. The number of time slots T included, denoted as H, is calculated using... Divide by the difference between time slot T and WPT time, and take the upper limit value;

[0137] Step S2332: Calculate the current server completion time, i.e., the time for H WPF operations. sum;

[0138] Step S2333: Output the current server completion time.

[0139] In steps S235 and S237, M is updated by taking the maximum value between L and S.

[0140] In step S236, the specific steps for calculating the current device's maximum energy limit are as follows:

[0141] Step S2361: Calculate the number of time slots T contained in the current execution time (taking the lower bound), denoted as BL;

[0142] Step S2362: Obtain the remainder between the current execution time and time slot T;

[0143] Step S2363: If the remainder is less than the WPT time, the charging time is the sum of BL WPT times and the remainder; otherwise, the charging time is BL+1 WPT times.

[0144] Step S2364, the maximum energy value is the sum of the initial energy E0 and the energy E collected during the charging time. H (Calculate using formula (7)) the sum;

[0145] Step S2365: Output the maximum energy value.

[0146] In step S236, the method for calculating the current energy consumption is as follows: First, use formulas (11)(12)(8)(9) to calculate the total local computing time T respectively. L Energy consumption of each task unloaded to the server for execution. Local energy consumption E L Energy consumption E of unloading part O The current energy consumption is then the local energy consumption E. L Energy consumption E of unloading part O The sum of the two parts.

[0147] The specific formula is as follows:

[0148] Calculate the execution time of the task on the device. Use the following formula:

[0149]

[0150] Calculate the execution time of the task on the server. Use the following formula:

[0151]

[0152] in, Representing tasks Data encryption time, data decryption time, data transmission time, and computation time on the server.

[0153] Calculate data encryption time Use the following formula:

[0154]

[0155] Calculate data decryption time Use the following formula:

[0156]

[0157] Calculate data transmission time Use the following formula:

[0158]

[0159] Where R represents the transfer rate at which the task is unloaded to the server.

[0160] Computation time of computation tasks on the server Use the following formula:

[0161]

[0162] Calculate the energy E collected during the charging time. H Use the following formula:

[0163]

[0164] Where μ∈(0,1) is the conversion efficiency of the device.

[0165] Calculate local energy consumption E L Use the following formula:

[0166]

[0167] Where k is the energy efficiency coefficient of the equipment, T L This indicates the total local calculation time.

[0168] Calculate the energy consumption E of the unloading section. O Use the following formula:

[0169]

[0170] in, Indicates task Unloading energy consumption.

[0171] The transmission rate R is calculated using the following formula:

[0172]

[0173] Where B (MHz) is the spectral bandwidth, g0 (dB) is the path loss constant, d0 (m) is the reference distance, d (m) is the distance from the actual device to the server, θ is the path loss exponent, and σ 2 (dBm / Hz) represents the noise power spectral density between the device and the server.

[0174] Calculate the total local computation time T L Use the following formula:

[0175]

[0176] Since the edge server is assumed to have unlimited energy when the task is offloaded for computation, the energy consumption of the offloading part consists only of the energy consumed in encrypting the data before offloading and the energy consumed in sending the data. The calculation method is as follows:

[0177]

[0178] Where, γ l Indicates security policy p l Energy consumption per bit during encryption.

[0179] For ease of understanding, please refer to Figure 4 This explanation does not limit the scope of this plan. Figure 4This is a detailed flowchart of one embodiment of the task scheduling method. In this embodiment, the user's mobile device needs to process 10 tasks, and the goal is to obtain the optimal solution that minimizes the completion time of the following task portions being offloaded to the MEC server for execution. The data volume of the tasks is shown in Table 1:

[0180] Table 1

[0181]

[0182] The detailed data on the security levels are shown in Table 2:

[0183] Table 2

[0184]

[0185] Step SS1: Input task information, device and server information. After reading the data, we can obtain a task set π. s ={π0,π1,...,π9}. Meanwhile, the device and server information is shown in Table 3:

[0186] Table 3

[0187]

[0188] Step SS2: Initialize the optimal task sequence by sorting the tasks in the task set using one of the following sorting methods: LTF, Random, or STF. In this example, LTF is used for sorting, and the resulting optimal task sequence is (π4,π6,π9,π1,π8,π7,π2,π3,π0,π5).

[0189] Step SS3 involves constructing neighborhoods using swapping (or insertion). The core of swapping is to traverse the optimal task sequence, starting with the first task and swapping it with subsequent tasks. Each swap generates a new task sequence, which is then added to the neighborhood. This process continues until the second-to-last task is swapped with the last task. The core of insertion, on the other hand, is to traverse the optimal task sequence, starting with the first task and inserting it sequentially into subsequent tasks, adding the generated new task sequence to the neighborhood. This cycle continues until the second-to-last task is inserted into the last task, at which point the loop ends.

[0190] Step SS4 calculates the completion time of all task sequences within the neighborhood. Its sub-steps are as follows:

[0191] Step SS41: Initialize all parameters to 0, including local execution time L, server execution time S, and task execution time M;

[0192] Step SS42, use formula (1) to calculate the execution time of the task on the device. At the same time, the data encryption time is first calculated using formulas (3), (4), (5), (6), and (10) respectively. Data decryption time Transmission rate R, data transmission time Task computation time on the server Then, use formula (2) to calculate the execution time of the task on the server.

[0193] Step SS43, update L and S, where L is updated to L and S. The sum of the times S is updated to H WPF times. The sum, where H is calculated using... Divide by the difference between time slot T and WPT time, and take the upper limit value;

[0194] Step SS44: Compare L and S. If L is smaller, the task remains to be executed on the device, i.e., x. i =1; otherwise, the task is offloaded to the server for execution, i.e., x i =0;

[0195] Step SS45: Update L, S, and M, where, if the task is executed on the device, L is updated to L and If the sum is equal to the sum of the values ​​of S and H, the update of S is revoked; otherwise, S is updated to H (calculated using...). Divide the time in slot T by the difference between the WPT time and take the upper bound) and the WPF time. The update of L is revoked. M is updated to the maximum value between L and S;

[0196] Step SS46: Calculate the current device's maximum energy limit and current energy consumption. The maximum energy limit is calculated as follows: First, calculate the number of time slots T included in the current execution time (taking the lower bound), denoted as BL. Then, obtain the remainder between the current execution time and time slot T and compare the remainder with the WPT time. If the remainder is less than the WPT time, the charging time is the sum of BL WPT times and the remainder; otherwise, the charging time is BL + 1 WPT time. Finally, the maximum energy value is obtained, which is the sum of the initial energy E0 and the energy E collected during the charging time. H (Calculated using formula (7)) The sum of the two. The current energy consumption is calculated as follows: First, use formulas (11)(12)(8)(9) to calculate the total local calculation time T respectively. L Energy consumption of each task unloaded to the server for execution. Local energy consumption E L Energy consumption E of unloading part O The current energy consumption is then the local energy consumption E.L Energy consumption E of unloading part O The sum of the two parts;

[0197] Step SS47: Compare the current energy consumption with the device's maximum energy limit. If the energy consumption exceeds the maximum energy limit, change the current task allocation scheme to another scheme (the allocation scheme includes both execution on the device and execution on the server), and update L, S, and M (same as SS45); otherwise, leave it unchanged.

[0198] Step SS48: Repeat steps SS42 to SS47 until all tasks in the task set have been assigned.

[0199] Step SS49, output the uninstallation scheme and M.

[0200] Step SS5: Compare the completion times of the task sequences in the neighborhood. Sort the task sequences in the neighborhood in ascending order of completion time using bubble sort.

[0201] Step SS6: Find the task sequence with the shortest completion time. After sorting, the first task sequence in the neighborhood is the task sequence with the shortest completion time.

[0202] Step SS7, repeat steps SS3-SS6 until the maximum number of iterations, 15, is reached;

[0203] Step SS8 outputs the allocation scheme and minimum completion time. Ultimately, the minimum completion times using the swapping and insertion methods are 28.12003829924812s and 28.120038299248115s, respectively.

[0204] Furthermore, this embodiment of the invention also proposes a storage medium storing a task scheduler, which, when executed by a processor, implements the task scheduling method described above.

[0205] In addition, refer to Figure 5 The present invention also proposes a task scheduling device, which includes: a task acquisition module 10, a sequence selection module 20, and a task scheduling module 30.

[0206] The task acquisition module 10 is used to acquire security encryption tasks on the device in a wireless charging edge computing environment.

[0207] It should be noted that the security encryption task on the device can be a set of tasks on the device; for example, the device contains a task set π. s ={π1,π2,…,π n} and can form a task sequence π = (π1, π2, ..., π)n The sequence consists of n tasks, and the decision variable x is determined by the number of tasks. i (x i ∈[0,1]) is used as a decision variable to represent whether the task is offloaded to the server or executed on the device. When x i When = 1, it represents task π. i Calculated on the device; when x i When π = 0, it represents task π. i Offloading the computation to a server allows π to be divided into two subsequences. and Where π L ={π|x i =1,i=1,2,…,N},π O ={π|x i =0,i=1,2,…,N}, and the sequence π L and sequence π O The order of tasks in the sequence remains consistent with the order in the original sequence π. Each task is independent and indivisible, and can be either offloaded or left on the device for processing. Each task contains three attributes: task π. i The amount of data to be processed, c i (bit), processing task π i Number of CPU cycles required per bit of data φ i (cycles / bit) represents task π. i The selected security policy p l Security Policy p l The amount of encrypted data per bit is denoted as α. l (cycles / bit), the corresponding amount of decrypted data per bit is β l (cycles / bit)

[0208] Understandably, to facilitate subsequent domain construction and selection of target task sequences, this embodiment, in addition to obtaining the security encryption tasks on the device, also needs to obtain device information and server information. The device information includes the task offloading power P. O (mw), the device's calculated power P u (w) Device CPU frequency f u (GHz), initial battery level E0, server information includes server transmission power P e (w) Attenuated transmission power server CPU frequency f e (GHz).

[0209] The sequence selection module 20 is used to construct a neighborhood based on the security encryption task and select a target task sequence from the task sequences in the neighborhood.

[0210] It should be noted that the target task sequence can be the optimal task sequence with the shortest completion time after sorting the security encryption tasks.

[0211] It should be understood that constructing a neighborhood based on a security encryption task and selecting a target task sequence from the task sequence in the neighborhood can be done by sorting the security encryption tasks to obtain a sorted task sequence, constructing a neighborhood based on the sorted task sequence, and selecting a target task sequence based on the completion time of the task sequences in the neighborhood.

[0212] The task scheduling module 30 is used to generate a task unloading scheduling scheme according to the target task sequence, and to allocate the security encryption task to the device and server for execution according to the task unloading scheduling scheme.

[0213] It is understandable that allocating security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme can mean that the security encryption task part remains to be computed on the device and the security encryption task part is offloaded to the server for computed.

[0214] In specific implementations, for example, because the task offloading scheduling scheme will set the task set π = (π1, π2, ..., π...), n Divide into two subsequences and Where π L ={π|x i =1,i=1,2,…,N},π O ={π|x i =0,i=1,2,…,N}, where when x i When = 1, it represents task π. i The calculation remains on the device; when x i When π = 0, it represents task π. i The computation is offloaded to the server. Therefore, a task offloading schedule can be directly generated based on the target task sequence, and the security encryption tasks can be allocated to devices and servers for execution according to the task offloading schedule.

[0215] This embodiment discloses a method for acquiring security encryption tasks on a device in a wireless charging edge computing environment, constructing a neighborhood based on the security encryption tasks, selecting a target task sequence from the task sequences in the neighborhood, generating a task offloading scheduling scheme based on the target task sequence, and allocating the security encryption tasks to devices and servers for execution according to the task offloading scheduling scheme. Since this embodiment generates the task offloading scheduling scheme by constructing a neighborhood and selecting a target task sequence, it can effectively address the task scheduling problem for security encryption tasks in a wireless charging edge computing environment, thereby effectively shortening the completion time of security encryption tasks in a wireless charging edge computing environment and saving energy consumption, thus effectively improving the service quality of mobile devices in mobile edge computing.

[0216] Other embodiments or specific implementations of the task scheduling device described in this invention can be found in the above-described method embodiments, and will not be repeated here.

[0217] It should be noted that all operations on the data involved in the technical solutions of this specification comply with relevant regulations and do not violate public order and good morals. For example, all operations on the data are performed with the user's authorization. In this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0218] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0219] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0220] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A task scheduling method, characterized in that, The task scheduling method includes: Acquire secure encryption tasks on the device in a wireless charging edge computing environment; A neighborhood is constructed based on the security encryption task, and a target task sequence is selected from the task sequence of the neighborhood; A task offloading schedule is generated based on the target task sequence, and the security encryption task is allocated to devices and servers for execution according to the task offloading schedule. The step of constructing a neighborhood based on the security encryption task and selecting a target task sequence from the task sequence of the neighborhood includes: Sort the security encryption tasks to obtain the target task sequence; Constructing a neighborhood based on the target task sequence; Calculate the completion time of the task sequence in the neighborhood, and perform bubble sort on the task sequence in the neighborhood according to the completion time; A new sequence of target tasks is obtained based on the bubble sort results; The process of constructing a neighborhood based on the target task sequence is repeated until no new task sequence can be obtained or the number of iterations is reached, at which point the target task sequence is obtained. The calculation of the completion time of the task sequence in the neighborhood includes: Calculate the local execution time on the device and the server execution time on the server for each task sequence in the neighborhood. When the local execution time is less than the server execution time, the task allocation scheme is to leave the task to be executed on the device. When the local execution time is greater than or equal to the server execution time, the task allocation scheme is to offload the task to the server for execution; Update the local execution time, server execution time, and task execution time. The task execution time is the maximum value between the local execution time and the server execution time. Calculate the maximum energy limit of the computing device and the current energy consumption corresponding to the assigned task; When the current energy consumption exceeds the maximum energy limit, change the task allocation scheme to another scheme and return to the steps of updating the local execution time, server execution time, and task execution time; When the current energy consumption is less than or equal to the maximum energy limit, the task allocation scheme remains unchanged; The process iteratively calculates the local execution time on the device and the server execution time on the server for each task in the neighborhood task sequence until all tasks in the neighborhood task sequence have been assigned and completed. The task execution time is then used as the completion time of the task sequence in the neighborhood.

2. The task scheduling method as described in claim 1, characterized in that, The maximum power limit of the computing device includes: Calculate the charging time based on the time slot of the current execution time; The maximum energy limit of the device is calculated based on the initial energy and the energy collected during the charging time.

3. The task scheduling method as described in claim 1, characterized in that, The current energy consumption corresponding to the computational allocation task includes: The local energy consumption of computing tasks remaining on the device for execution and the offloading energy consumption of each task offloaded to the server for execution; The current energy consumption corresponding to the allocated task is calculated based on the local energy consumption and the energy consumption of the unloaded portion.

4. The task scheduling method as described in claim 1, characterized in that, The construction of the neighborhood based on the target task sequence includes: Create an empty neighborhood and add the target task sequence to the empty neighborhood; Traverse the target task sequence, starting from the first task and swapping its position with the subsequent tasks. Each time a task is swapped, the resulting new task sequence is placed in the neighborhood. Continue this process until the second-to-last task is swapped with the last task, thus obtaining the neighborhood.

5. The task scheduling method as described in claim 1, characterized in that, The construction of the neighborhood based on the target task sequence includes: Create an empty neighborhood and add the target task sequence to the empty neighborhood; Traverse the target task sequence, starting from the first task and inserting it into the subsequent tasks in turn. Place the newly generated task sequence into the neighborhood. Continue the loop until the second to last task is inserted into the last task, and then obtain the neighborhood.

6. A task scheduling device, characterized in that, The task scheduling device includes: a memory, a processor, and a task scheduling program stored in the memory and executable on the processor. When the task scheduling program is executed by the processor, it implements the task scheduling method as described in any one of claims 1 to 5.

7. A storage medium, characterized in that, The storage medium stores a task scheduler, which, when executed by a processor, implements the task scheduling method as described in any one of claims 1 to 5.

8. A task scheduling device, characterized in that, The task scheduling device includes: a task acquisition module, a sequence selection module, and a task scheduling module; The task acquisition module is used to acquire the security encryption tasks on the device in the wireless charging edge computing environment; The sequence selection module is used to construct a neighborhood based on the security encryption task and select a target task sequence from the task sequences in the neighborhood. The task scheduling module is used to generate a task offloading scheduling scheme based on the target task sequence, and to allocate the security encryption task to the device and server for execution according to the task offloading scheduling scheme. The step of constructing a neighborhood based on the security encryption task and selecting a target task sequence from the task sequence of the neighborhood includes: Sort the security encryption tasks to obtain the target task sequence; Constructing a neighborhood based on the target task sequence; Calculate the completion time of the task sequence in the neighborhood, and perform bubble sort on the task sequence in the neighborhood according to the completion time; A new sequence of target tasks is obtained based on the bubble sort results; The process of constructing a neighborhood based on the target task sequence is repeated until no new task sequence can be obtained or the number of iterations is reached, at which point the target task sequence is obtained. The calculation of the completion time of the task sequence in the neighborhood includes: Calculate the local execution time on the device and the server execution time on the server for each task sequence in the neighborhood. When the local execution time is less than the server execution time, the task allocation scheme is to leave the task to be executed on the device. When the local execution time is greater than or equal to the server execution time, the task allocation scheme is to offload the task to the server for execution; Update the local execution time, server execution time, and task execution time. The task execution time is the maximum value between the local execution time and the server execution time. Calculate the maximum energy limit of the computing device and the current energy consumption corresponding to the assigned task; When the current energy consumption exceeds the maximum energy limit, change the task allocation scheme to another scheme and return to the steps of updating the local execution time, server execution time, and task execution time; When the current energy consumption is less than or equal to the maximum energy limit, the task allocation scheme remains unchanged; The process iteratively calculates the local execution time on the device and the server execution time on the server for each task in the neighborhood task sequence until all tasks in the neighborhood task sequence have been assigned and completed. The task execution time is then used as the completion time of the task sequence in the neighborhood.

Citation Information

Patent Citations

  • Multi-robot mobile shelf task allocation method for intelligent warehouse

    CN112785132A

  • Task scheduling method based on wireless energy supply edge network

    CN113286317A