Task unloading method and system based on task similarity and storage medium

By connecting multiple devices with the same task to the same edge server, and selecting one device to offload the task to the edge server for calculation, the remaining devices share the calculation results, solving the problems of unreasonable resource allocation and inefficient task processing in the existing technology, and achieving optimization of task processing and efficient utilization of resources.

CN119789150AActive Publication Date: 2025-04-08YANTAI UNIV

Patent Information

Application Number
CN202510264933.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-04-08
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

The prior art does not fully consider the specific characteristics of the task and the real-time load of edge computing nodes in task offload decisions, resulting in unreasonable resource allocation and inefficient task processing.

Method used

Through a task similarity-based method, multiple devices with the same task are connected to the same edge server, and one device is selected to offload the task to the edge server for calculations. The remaining devices share the calculation results, saving repetitive energy costs.

Benefits of technology

It realizes the optimization of task processing and efficient utilization of resources, reduces unnecessary computing redundancy, improves the utilization rate of edge computing resources, reduces overall energy consumption, and accelerates task processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119789150A_ABST
    Figure CN119789150A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of loading of computer programs, in particular to a task unloading method and system based on task similarity and a storage medium, and the method comprises the following steps: initializing an unmatched edge server set and an unmatched equipment set, and generating a similarity score between equipment based on a task list of the equipment; the edge server and the equipment respectively establish respective preference lists according to respective preference functions; matching the equipment with an edge server; calculating the shortest distance between every two clusters based on the equipment task type, and outputting a result cluster; selecting a cluster head from the result cluster, and sending a task main body code and an input parameter to an edge server by the cluster head; other devices in the result cluster send task input parameters to the edge server; channel allocation is carried out on the devices in the result cluster based on the size proportion of the device unloading tasks in the cluster; and carrying out power optimization on the equipment based on an equipment matching result and a sub-channel allocation result. According to the method, the unloading task can be completed with low energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer program loading, and in particular to a task unloading method, system and storage medium based on task similarity. Background Art

[0002] With the gradual development of Internet technology, various terminal products and applications have emerged, generating massive computing needs.

[0003] In the existing technical framework, when offloading tasks submitted by user terminals, the physical distance between the user terminal and the edge computing node is usually used as the main basis for decision-making. The specific process is: when it is detected that the distance between the user terminal and a certain edge computing node falls within the preset threshold range, the system will choose to offload the task to the edge computing node for processing. Although this method simplifies the decision-making process of task offloading to a certain extent, it does not fully consider the specific characteristics of the task and the real-time load of the edge computing node, and may therefore lead to unreasonable resource allocation and low task processing efficiency. Summary of the invention

[0004] The present invention provides a task offloading method, system and storage medium based on task similarity, which connects multiple devices with more identical tasks to the same edge server. In each task processing stage, only one device needs to be selected from the devices with the same task to offload the task to the edge server for calculation. The remaining devices only need to send the task input parameters to share their calculation results, thereby saving repeated energy costs in the process.

[0005] The technical solution of the present invention is as follows: A task unloading method based on task similarity comprises the following steps: S1. Initialize the unmatched edge server set and device set, and based on the task list of each device, use cross comparison to obtain the same type of tasks, count the number, and generate similarity scores between devices; Based on the gain of the device to the edge server subchannel, a preference function of the device to the edge server is established, and based on the similarity score, the remaining power of the device and the gain of the device to the edge server subchannel, a preference function of the edge server to the device is established; The preference function values ​​of the device for all edge servers are sorted from large to small to establish a first preference list; each edge server establishes a second preference list according to the preference function of the edge server for the device; each device sends an offload request to the first edge server in the first preference list, and the edge server counts the number of offload requests received in the current time slot. If the number of offload requests is not greater than the number of sub-channels of the edge server, the match is successful; S2, cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set a distance threshold, and when the shortest distance between two clusters is less than the distance threshold, merge the devices corresponding to the two clusters; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; A device with the highest product of channel gain and residual energy is selected from the result cluster as the cluster head. The cluster head sends the task body code and input parameters of the offloading task to the edge server to allocate the number of sub-channels for the devices in the result cluster. S3. Optimize the transmission power of all devices in the cluster in their sub-channels: set the initial power of the devices in the cluster, establish the objective function according to the constraints of transmission power and delay, calculate the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, as a combination of energy consumption functions, to obtain the optimal transmission power of each device in the cluster.

[0006] S1 also includes, if the offload request count is greater than the number of sub-channels of the edge server, selecting the same number of devices as the number of sub-channels from the front to the back in the second preference list to match the edge server, updating the first preference list for the devices that have not been successfully matched, and then the edge server updates the second preference list, and repeating the above matching operation until all devices are matched.

[0007] S3 obtains the optimal transmission power allocated to each device in the cluster, and the specific steps are: Solve the objective function, and the solution obtained is the transmit power of the device in the cluster in the sub-channel. Substitute it back into the energy consumption function combination, update the iterative energy consumption function combination until the second constraint is met, and output the optimal transmit power allocated to the device in the cluster.

[0008] The second constraint condition described in S3 is specifically: or , in, is the transmission power of the nth device on the kth subchannel, is the total number of devices, is the total number of subchannels, For the Devices, For the sub-channels, For the l + The inverse of the task rate sent by the nth device on subchannel k after 1 iterations, For the l+1 The energy consumption of the nth device sending tasks on subchannel k after 1 iterations, is the bandwidth of the subchannel, For the nth device in The gain to edge server m on the subchannel is, is the Gaussian white noise power, is the same-layer interference received by edge server m on the kth subchannel, For the l +1 The transmit power of the nth device on the kth subchannel after 1 iteration, is the total task size, is the precision parameter used to control the termination of iteration, is the number of iterations, is the maximum number of iterations.

[0009] The preference function of the edge server for the device in S1 is specifically: , in, is the preference function of edge server m for the nth device, is the weight variable of the ratio of the edge server subchannel gain to the remaining power and the similarity score, For the nth device in The gain to edge server m on the subchannel is, For equipment The remaining power, For device u and device Similarity score.

[0010] S2 describes the allocation of subchannels to each cluster and the devices within the cluster, where the number of subchannels allocated by the cluster head is: , in, Cluster Cluster head The number of allocated subchannels, Cluster The number of subchannels allocated, Cluster The amount of task body code data that all devices should send, Cluster Head The amount of input parameter data of its own task; Cluster The sum of the task input parameter data of all devices in the Cluster The number of devices, i Cluster No. i devices.

[0011] S2 describes the allocation of subchannels for each cluster and the devices in the cluster, where the devices other than the cluster head The number of allocated subchannels for: , in, Cluster The number of subchannels allocated, Cluster Cluster head removal equipment The amount of task input parameter data, Cluster The amount of task body code data that all devices should send, Cluster The sum of the task input parameter data of all devices in the system.

[0012] The same type of tasks described in S1 are tasks for unloading tasks in the current time slots of different devices with the same main body code.

[0013] A task offloading system based on task similarity, comprising: Matching module: Initialize the unmatched edge server set and device set, based on the task list of each device, use cross comparison to obtain the same type of tasks, count the number, and generate a similarity score between devices; based on the gain of the device to the edge server sub-channel, establish the device's preference function for the edge server, and based on the similarity score, the remaining power of the device and the gain of the device to the edge server sub-channel, establish the edge server's preference function for the device; sort the device's preference function values ​​for all edge servers from large to small to establish a first preference list; each edge server establishes a second preference list based on the edge server's preference function for the device; each device sends an unloading request to the first edge server in the first preference list, and the edge server counts the number of unloading requests received in the current time slot. If the number of unloading requests is not greater than the number of edge server sub-channels, the match is successful; Transmission module: cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set the distance threshold, and merge the devices corresponding to the two clusters when the shortest distance between two clusters is less than the distance threshold; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; select a device with the highest product of channel gain and residual energy from the result cluster as the cluster head, and the cluster head sends the task body code of the unloading task and the input parameters of the unloading task to the edge server to allocate the number of sub-channels for the devices in the result cluster; Allocation module: optimizes the transmission power of all devices in the cluster in their sub-channels, sets the initial power of the devices in the cluster, establishes the objective function according to the constraints of transmission power and delay, calculates the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, and obtains the optimal transmission power of each device in the cluster as a combination of energy consumption functions.

[0014] A task unloading storage medium based on task similarity stores a computer program, which implements the steps of the above method when executed by a processor.

[0015] The beneficial effects of the present invention are: By connecting multiple devices with a large number of identical tasks to the same edge server, we can optimize task processing and efficiently utilize resources. Specifically, at each task processing stage, we select a representative cluster head device and offload its tasks to the edge server for calculation. This innovation greatly reduces unnecessary computational redundancy, because the remaining devices that only need to send task input parameters can instantly share the computational results without having to perform the entire computation process themselves.

[0016] The present invention also proposes a strategy for allocating subchannels required for communication between different devices. The core advantage of this strategy is that, with the increasing number of IoT devices and the rapid growth of task requirements, the present invention not only improves the utilization rate of edge computing resources and reduces overall energy consumption, but also has far-reaching significance for promoting the development of a green and sustainable IoT ecosystem. In addition, by reducing the repeated execution of computing tasks, the present invention also speeds up task processing and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In the attached picture: Figure 1 A comparison chart of average energy consumption between the present invention and the comparative scheme; Figure 2 This is a comparison chart of the average delay between the present invention and the comparative solution. DETAILED DESCRIPTION

[0018] The technical solution of the present invention is as follows: In the scenario of the present invention, the key goal is cooperative offloading between devices, and devices performing local computing will not benefit from cooperative offloading. Therefore, the present invention considers that all devices upload tasks to the edge server, and the device's task offloading strategy becomes a question of which edge server to offload to.

[0019] The above problem is solved while satisfying the following first constraint conditions, namely, each device can only select one edge server for computation offloading; each device is assigned only one subchannel; both task offloading and subchannel allocation are binary; power limits on each subchannel and each edge server; and maximum latency requirements for devices to complete tasks.

[0020] In order to solve the proposed problem, the problem is decomposed into three sub-problems, namely the offloading decision sub-problem, the sub-channel allocation sub-problem and the power allocation sub-problem. Corresponding solutions are proposed for each sub-problem. A matching-based computational offloading strategy is proposed to solve the offloading decision sub-problem; for the sub-channel allocation sub-problem, a cooperation-based sub-channel allocation strategy is proposed; finally, a concave-convex function-based power allocation is proposed to optimize power allocation.

[0021] A task unloading method based on task similarity comprises the following steps: S1. Initialize the unmatched edge server set and device set, and based on the task list of each device, use cross comparison to obtain the same type of tasks, count the number, and generate similarity scores between devices; Based on the gain of the device to the edge server subchannel, a preference function of the device to the edge server is established, and based on the similarity score, the remaining power of the device and the gain of the device to the edge server subchannel, a preference function of the edge server to the device is established; The preference function values ​​of the device for all edge servers are sorted from large to small to establish a first preference list; each edge server establishes a second preference list based on the preference function of the edge server for the device; each device sends an unloading request to the first edge server in the first preference list, and the edge server counts the number of unloading requests received in the current time slot. If the number of unloading requests is not greater than the number of sub-channels of the edge server, the match is successful.

[0022] If the offload request count is greater than the number of sub-channels on the edge server, select the same number of devices as the number of sub-channels from the front to the back in the second preference list to match the edge server. The devices that are not successfully matched update the first preference list, and then the edge server updates the second preference list. Repeat the above matching operation until all devices are matched.

[0023] The constraints of the transmission power and delay are the first constraints.

[0024] Among them, the main body codes of the tasks of the same type that are unloading tasks of different devices in the current time slot are the same.

[0025] Each edge server is connected to a base station and uses orthogonal frequency division multiple access technology. There are different types of devices within the coverage of the edge server. Each device has its own task list for a period of time and continuously processes a series of tasks, but only processes the tasks of the current time slot in each time slot. The edge servers connected to the base station use high-speed optical fiber wiring, and the communication delay between them is not considered; the edge servers are powered by cables, and the energy consumption of processing tasks is not considered. Since the output result task volume is relatively small, the download delay is ignored.

[0026] The present invention adopts a binary offloading solution to better achieve cooperative offloading and save device energy. All devices offload their tasks to the edge server for calculation, and each device only offloads tasks to one edge server.

[0027] In order to match more devices with the same reusable tasks to the same edge server in each time slot, the concept of similarity scoring is introduced.

[0028] The similarity score is defined as follows: assuming that each device has a task list, use cross comparison to find tasks with the same code type, count the number of tasks to calculate the similarity score between them, and give higher similarity scores to devices with more overlapping tasks.

[0029] The similarity score is used to influence the preference for selecting the same base station and is added when establishing the base station's preference function for the device.

[0030] During computation offloading, each device is willing to associate with the edge server with the best channel conditions to obtain a high offloading rate. The preference function of a device to an edge server: , in, For the nth device in The gain to edge server m on the sub-channel.

[0031] Each device can calculate the preference for the edge server according to the above formula and generate a first preference list.

[0032] The edge server's preference function for the device is as follows: , in, is the preference function of edge server m for the nth device, is the weight variable of the ratio of the edge server subchannel gain to the remaining power and the similarity score, For the nth device in The gain to edge server m on the subchannel is, For equipment The remaining power, For device u and device Similarity score.

[0033] Each edge server can calculate the preference for the device according to the above formula and generate a second preference list.

[0034] If the device does not match the first server in its first preference list, the first preference list is updated until a successful match is found with one of the servers, and so on, to ensure that all devices can match with the server.

[0035] The edge server's preference function for devices can reflect that the base station has a higher preference for devices with good channel conditions and low power for offloading tasks. Tasks can be processed preferentially for low-power devices to save energy consumption of low-power devices. The addition of similarity scores can match more devices with the same tasks to the same base station to save more device energy consumption.

[0036] S2, cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set a distance threshold, and when the shortest distance between two clusters is less than the distance threshold, merge the devices corresponding to the two clusters; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; A device with the highest product of channel gain and residual energy is selected from the result cluster as the cluster head. The cluster head sends the task body code and input parameters of the offloading task to the edge server. The remaining devices in the result cluster send the input parameters of the offloading task to the edge server to allocate the number of sub-channels for the devices in the result cluster.

[0037] In order to better achieve the purpose of cooperative offloading, the aggregation clustering algorithm in the hierarchical clustering algorithm is used to cluster the devices with the same type of reusable tasks in the current time slot, and then select a device from the cluster as the cluster head. The cluster head sends the task body code and its own task input parameters to the edge server, and the remaining devices in the cluster send their own task input parameters to the edge server.

[0038] Devices are defined as data points, and the task similarity between devices is defined as distance, ensuring that data points with close distances are grouped into the same cluster.

[0039] Allocate sub-channels in each cluster according to the ratio of the number of devices, and the edge server Below cluster, then it is The number of subchannels allocated to a cluster is : , in, is the number of sub-channels in the system, Cluster The number of devices.

[0040] Adopt the shortest distance merging rule and use the device's current time slot task type to calculate the distance between devices u and n , Score the similarity between device u and device n. The shortest distance among all clusters is set to ,like is the shortest distance between these devices, then At the same time, a stopping condition is set in the algorithm, namely the distance threshold ,when < When , the clusters where devices u and n are located are merged. > When , the merging stops. Each iteration calculates the distance between all devices and will have the shortest distance The clusters of the two devices are merged to obtain the result cluster, regardless of the number of devices in the cluster.

[0041] Then for each result cluster with a number of devices greater than 2, that is The cluster head is selected for the cluster, and the device with the largest product of channel gain and residual energy in the cluster is selected as the cluster head. The cluster head selected in this way is the device with high channel gain and residual energy, which is beneficial to reducing the total energy consumption and delay and reducing energy consumption for low-power devices.

[0042] The present invention allocates the number of sub-channels to the cluster head and other devices according to the ratio of the total task size sent by the cluster head to the total task size sent by other devices in the result cluster.

[0043] The number of sub-channels is allocated to the devices in the result cluster, where the number of sub-channels allocated by the cluster head is: , in, Cluster Cluster head The number of allocated subchannels, Cluster The number of subchannels allocated, Cluster The amount of task body code data that all devices should send, Cluster Head The amount of input parameter data of its own task; Cluster The sum of the task input parameter data of all devices in the Cluster The number of devices, i Cluster No. i devices.

[0044] Allocate the number of sub-channels for the devices in the resulting cluster, except for the cluster head. The number of allocated subchannels for: , in, Cluster The number of subchannels allocated, Cluster Cluster head removal equipment The amount of task input parameter data, Cluster The amount of task body code data that all devices should send, Cluster The sum of the task input parameter data of all devices in the system.

[0045] S3. Optimize the transmission power of all devices in the cluster in their sub-channels: set the initial power of the devices in the cluster, establish the objective function according to the constraints of transmission power and delay, calculate the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, as a combination of energy consumption functions, to obtain the optimal transmission power of each device in the cluster.

[0046] Establish the objective function according to the first constraint: , in, is the transmission power of the nth device on the kth subchannel, is the total number of devices, is the total number of subchannels, is the bandwidth of the subchannel, is the total task size, For the nth device in The gain to MEC edge server m on the sub-channel, is the Gaussian white noise power, is the same-layer interference received by edge server m on the kth subchannel.

[0047] The energy consumption function combination formula is: , in, Represents the inverse of the rate at which the nth device sends tasks. Represents the energy consumption of the task sent by the nth device, is the transmission power of the nth device on the kth subchannel, is the total task size, The transmission rate for sending tasks to the nth device.

[0048] To obtain the optimal transmission power allocated to devices in the cluster, the specific steps are: Use the CCCP (Convex-ConCave Procedure) method to solve the objective function. The solution obtained is the transmit power of the devices in the cluster in their sub-channels. Substitute it back into the energy consumption function combination and update the iterative energy consumption function combination until the second constraint is met: or , in, is the transmission power of the nth device on the kth subchannel, is the total number of devices, is the total number of subchannels, For the Devices, For the sub-channels, For the l + The inverse of the task rate sent by the nth device on subchannel k after 1 iterations, For the l +1 The energy consumption of the nth device sending tasks on subchannel k after 1 iterations, is the bandwidth of the subchannel, For the nth device in The gain to edge server m on the subchannel is, is the Gaussian white noise power, is the same-layer interference received by edge server m on the kth subchannel, For the l +1 The transmit power of the nth device on the kth subchannel after 1 iteration, is the total task size, is the precision parameter used to control the termination of iteration, is the number of iterations, is the maximum number of iterations.

[0049] The optimal transmission power allocated to devices in the output cluster is: , in, is the optimal power of the nth device on the kth subchannel, is the total bandwidth allocated to the nth device, is the gradient of the second convex function on the power of the kth subchannel, The Lagrangian multipliers in the Lagrangian function constructed when optimizing the power for the nth device, for, is the same-layer interference received by edge server m on the kth subchannel, is the maximum transmit power of the nth device on the kth subchannel.

[0050] The present invention optimizes the transmission power for each device separately, rather than optimizing the power for all devices in a cluster and then distributing it.

[0051] A task offloading system based on task similarity, comprising: Matching module: Under the constraints of transmission power and delay, initialize the unmatched edge server set and device set, based on the task list of each device, use cross comparison to obtain the same type of tasks, count the number, and generate a similarity score between devices; based on the gain of the device to the edge server subchannel, establish the device's preference function for the edge server, and based on the similarity score, the remaining power of the device and the gain of the device to the edge server subchannel, establish the edge server's preference function for the device; sort the device's preference function values ​​for all edge servers from large to small to establish a first preference list; each edge server establishes a second preference list based on the edge server's preference function for the device; each device sends an offload request to the first edge server in the first preference list, and the edge server counts the number of offload requests received in the current time slot. If the number of offload requests is not greater than the number of edge server subchannels, the match is successful; Transmission module: cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set the distance threshold, and merge the devices corresponding to the two clusters when the shortest distance between two clusters is less than the distance threshold; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; select a device with the highest product of channel gain and residual energy from the result cluster as the cluster head, the cluster head sends the task body code of the unloading task and the input parameters of the unloading task to the edge server, and the remaining devices in the result cluster send the input parameters of the unloading task to the edge server; Allocation module: optimizes the transmission power of all devices in the cluster in their sub-channels, sets the initial power of the devices in the cluster, establishes the objective function according to the constraints of transmission power and delay, calculates the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, and obtains the optimal transmission power of each device in the cluster as a combination of energy consumption functions.

[0052] A task unloading storage medium based on task similarity stores a computer program, which implements the steps of the above method when executed by a processor.

[0053] The method of the present invention is compared with the following three schemes: Comparison scheme 1 (random matching): randomly assigning subchannels to offload tasks, with the maximum communication power; Comparison scheme 2 (no similarity matching): randomly assign subchannels to offload tasks and optimize power based on CCCP; Comparative Scheme 3 (Similarity Matching without Clustering): Divide the similarity tasks of the offload tasks, add the similarity score to the matching process and match, randomly assign subchannels to the offload tasks, and optimize the power based on CCCP.

[0054] like Figure 1 , Figure 2 As shown, the energy consumption of the present invention is reduced by 28.53% - 52.57%; the delay is reduced by 39.86% - 66.28%; therefore, the present invention achieves optimization of task processing and efficient use of resources by connecting multiple devices with a large number of identical tasks to the same edge server.

[0055] The present invention also proposes a strategy for allocating subchannels required for communication between different devices. The core advantage of this strategy is that, with the increasing number of IoT devices and the rapid growth of task requirements, the present invention not only improves the utilization rate of edge computing resources, but also effectively extends the battery life of the device and reduces overall energy consumption, which has far-reaching significance for promoting the development of a green and sustainable IoT ecosystem. In addition, by reducing the repeated execution of computing tasks, the present invention also speeds up task processing and improves user experience.

Claims

1. A task offloading method based on task similarity, characterized in that: The steps include: S1. Initialize the unmatched edge server set and device set, and based on the task list of each device, use cross comparison to obtain the same type of tasks, count the number, and generate similarity scores between devices; Based on the gain of the device to the edge server subchannel, a preference function of the device to the edge server is established, and based on the similarity score, the remaining power of the device and the gain of the device to the edge server subchannel, a preference function of the edge server to the device is established; Sort the preference function values ​​of the device for all edge servers from large to small to establish a first preference list; Each edge server establishes a second preference list according to the preference function of the edge server for the device; each device sends an offload request to the first edge server in the first preference list, and the edge server counts the number of offload requests received in the current time slot, and if the number of offload requests is not greater than the number of sub-channels of the edge server, the match is successful; S2, cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set a distance threshold, and when the shortest distance between two clusters is less than the distance threshold, merge the devices corresponding to the two clusters; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; A device with the highest product of channel gain and residual energy is selected from the result cluster as the cluster head. The cluster head sends the task body code of the offloading task and the input parameters of the offloading task to the edge server. The remaining devices in the result cluster send the input parameters of the offloading task to the edge server to allocate the number of sub-channels for the devices in the result cluster. S3. Optimize the transmission power of all devices in the cluster in their sub-channels: set the initial power of the devices in the cluster, establish the objective function according to the constraints of transmission power and delay, calculate the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, as a combination of energy consumption functions, to obtain the optimal transmission power of each device in the cluster.

2. The task offloading method based on task similarity according to claim 1 is characterized in that: S1 also includes, if the offload request count is greater than the number of sub-channels of the edge server, selecting the same number of devices as the number of sub-channels from the front to the back in the second preference list to match the edge server, updating the first preference list for the devices that have not been successfully matched, and then the edge server updates the second preference list, and repeating the above matching operation until all devices are matched.

3. The task offloading method based on task similarity according to claim 1, characterized in that: S3 obtains the optimal transmission power allocated to each device in the cluster, and the specific steps are: Solve the objective function, and the solution obtained is the transmit power of the device in the cluster in the sub-channel. Substitute it back into the energy consumption function combination, update the iterative energy consumption function combination until the second constraint is met, and output the optimal transmit power allocated to the device in the cluster.

4. The task offloading method based on task similarity according to claim 3 is characterized in that: The second constraint condition described in S3 is specifically: or , in, is the transmission power of the nth device on the kth subchannel, is the total number of devices, is the total number of subchannels, For the Devices, For the sub-channels, For the l + The inverse of the task rate sent by the nth device on subchannel k after 1 iterations, For the l +1 The energy consumption of the nth device sending tasks on subchannel k after 1 iterations, is the bandwidth of the subchannel, For the nth device in The gain to edge server m on the subchannel is, is the Gaussian white noise power, is the same-layer interference received by edge server m on the kth subchannel, For the The transmit power of the nth device on the kth subchannel after the iteration, is the total task size, is the precision parameter used to control the termination of iteration, is the number of iterations, is the maximum number of iterations.

5. The task offloading method based on task similarity according to claim 1 is characterized in that: The preference function of the edge server for the device in S1 is specifically: , in, is the preference function of edge server m for the nth device, is the weight variable of the ratio of the edge server subchannel gain to the remaining power and the similarity score, For the nth device in The gain to edge server m on the subchannel is, For equipment The remaining power, For device u and device Similarity score.

6. The task offloading method based on task similarity according to claim 1, characterized in that: S2 is the allocation of the number of sub-channels by the devices in the result cluster, where the number of sub-channels allocated by the cluster head is: , in, Cluster Cluster head The number of allocated subchannels, Cluster The number of subchannels allocated, Cluster The amount of task body code data that all devices should send, Cluster Head The amount of input parameter data of its own task; Cluster The sum of the task input parameter data of all devices in the Cluster The number of devices, i Cluster No. i devices.

7. The method for task offloading based on task similarity according to claim 1, characterized in that: S2 is the result of allocating the number of sub-channels to the devices in the cluster, where the devices other than the cluster head The number of allocated subchannels for: , in, Cluster The number of subchannels allocated, Cluster Cluster head removal equipment The amount of task input parameter data, Cluster The amount of task body code data that all devices should send, Cluster The sum of the task input parameter data of all devices in the Cluster The number of devices, i Cluster No. i devices.

8. The task offloading method based on task similarity according to claim 1, characterized in that: The same type of tasks described in S1 are tasks for unloading tasks in the current time slots of different devices with the same main body code.

9. A task offloading system based on task similarity, characterized in that: include: Matching module: Initialize the unmatched edge server set and device set, use cross comparison to obtain the same type of tasks based on the task list of each device, count the number, and generate similarity scores between devices; establish a preference function for the device to the edge server based on the gain on the device-to-edge server subchannel, and establish a preference function for the edge server to the device based on the similarity score, the remaining power of the device, and the gain on the device-to-edge server subchannel; Sort the preference function values ​​of the device for all edge servers from large to small to establish a first preference list; Each edge server establishes a second preference list according to the preference function of the edge server for the device; each device sends an offload request to the first edge server in the first preference list, and the edge server counts the number of offload requests received in the current time slot, and if the number of offload requests is not greater than the number of sub-channels of the edge server, the match is successful; Transmission module: cluster the devices with the same type of tasks after matching, calculate the shortest distance between each two clusters based on the current time slot task type of the device, set the distance threshold, and merge the devices corresponding to the two clusters when the shortest distance between two clusters is less than the distance threshold; traverse all clusters until the shortest distance between each two clusters is greater than the distance threshold, stop merging, and output the result cluster; select a device with the highest product of channel gain and residual energy from the result cluster as the cluster head, and the cluster head sends the task body code of the unloading task and the input parameters of the unloading task to the edge server to allocate the number of sub-channels for the devices in the result cluster; Allocation module: optimizes the transmission power of all devices in the cluster in their sub-channels, sets the initial power of the devices in the cluster, establishes the objective function according to the constraints of transmission power and delay, calculates the inverse of the sending rate of the input parameters of the offload task sent by the cluster devices to the edge server, and the energy consumption of the cluster devices sending their own task input parameters to the edge server, and obtains the optimal transmission power of each device in the cluster as a combination of energy consumption functions.

10. A task offloading storage medium based on task similarity, having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Edge computing task processing method and device and computer equipment

    CN113282409A

  • Green and energy-saving unloading method based on cooperation of multiple edge nodes under power internet of things

    CN115412966A

  • MEC calculation unloading method for multi-user resource balanced allocation

    CN116755786A

  • Internet of vehicles mobile edge computing service deployment method based on deep reinforcement learning

    CN118555578A

  • Resource Allocation Method and Apparatus for Reducing the Expected Latency in Distributed Machine Learning with Multiple Users

    KR102248978B1

Cited By

  • Load balancing method and system for server optimization

    CN120050236A

  • Unmanned aerial vehicle group path planning and task unloading method and device for edge calculation

    CN121680435A