Task unloading methods, devices, electronic devices and storage media
By calculating the load on transmission links and edge servers, generating offloading decisions, and optimizing task offloading paths, the problem of unbalanced offloading processes in existing technologies is solved, achieving load balancing and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the computational load of edge servers and the traffic load of transmission links are not effectively considered during the task unloading process, resulting in an unbalanced unloading process that affects stability and task completion time.
By calculating the load on transmission links and edge servers in the transmission network, offloading decisions are generated. Taking into account both spectrum resources and computing resources, task offloading paths are optimized to achieve load balancing.
It achieves load balancing between edge servers and links, ensuring successful task execution and system stability, and making full use of network resources.
Smart Images

Figure CN116032935B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing technology, and in particular to a method, apparatus, electronic device, and storage medium for offloading tasks. Background Technology
[0002] The distance between the terminal device and the remote cloud server significantly limits the transmission of tasks to be unloaded to the remote cloud server. Some tasks from distant locations may experience a decrease in Quality of Experience (QoE) due to long routing latency, especially for latency-sensitive tasks.
[0003] Currently, to meet the demands of increasingly computationally intensive and latency-sensitive tasks, mobile edge computing, which pushes computing, control, and storage to the network edge (such as base stations and access points), has been proposed. Terminal devices can offload tasks to physically nearby edge servers for processing. Therefore, selecting appropriate offloading edge servers for tasks has become an urgent problem to solve.
[0004] In existing technologies, tasks are first offloaded to the local edge server closest to the terminal device. If the local edge server is too overloaded to complete the task within the latency threshold, these tasks are migrated to other less overloaded edge servers via the optical network, thus offloading the tasks from the terminal device. Furthermore, because the computational load of the edge server and the traffic load of the transmission link are not considered simultaneously during the offloading process, the load is unbalanced, affecting the stability of the offloading process. Summary of the Invention
[0005] In view of this, the purpose of this disclosure is to provide a method, apparatus, electronic device and storage medium for unloading a task.
[0006] As one aspect of this disclosure, a method for unloading a task is provided, comprising:
[0007] Obtain the task to be uninstalled and determine the transmission network of the task to be uninstalled;
[0008] Calculate the load of several transmission links in the transmission network and the load of edge servers in the transmission network;
[0009] The unloading decision for the task to be unloaded is determined based on the load of the several transmission links and the load of the edge server.
[0010] The task to be uninstalled is uninstalled according to the uninstallation decision.
[0011] Optionally, calculating the load of several transmission links in the transmission network includes:
[0012] Obtain the idle spectrum blocks in the plurality of transmission links, and calculate the weight of the idle spectrum blocks;
[0013] The weights of the plurality of transmission links are calculated based on the number of frequency slots in the idle spectrum block and the weight of the idle spectrum block;
[0014] Calculate the load variance of the several transmission links based on their weights;
[0015] The calculation of the load variance of the plurality of transmission links based on their weights is expressed as follows:
[0016]
[0017] in, This represents the load variance of several transmission links; Indicates at time AT r,j The spectrum occupancy of link (a,b) is determined based on the frequency of several transmission links at time AT. r,j The spectral state is obtained; Indicates at time AT r,j The average spectrum occupancy of link (a,b) is calculated by taking the arithmetic mean of the spectrum occupancy.
[0018] Optionally, the step of obtaining idle spectrum blocks in the plurality of transmission links and calculating the weight of the idle spectrum blocks is expressed as follows:
[0019]
[0020] Where δ(n) represents the weight of a spectrum block containing n consecutive available frequency slots, and n-u+1 represents the number of selectable u consecutive frequency slots in the available spectrum block containing n frequency slots.
[0021] Optionally, the weights of the plurality of transmission links are calculated based on the number of frequency slots in the idle spectrum block and the weight of the idle spectrum block, expressed as:
[0022]
[0023] in, H and z represent the weights of the transmission link. h Let represent the number of available spectrum blocks in the transmission link (a,b) at time t and the number of frequency slots contained in the h-th available spectrum block, respectively. This represents the set of available spectrum blocks for link (a, b) at time t.
[0024] Optionally, calculating the load of the edge servers in the transmission network includes:
[0025] The resource processing capacity of the candidate edge server is obtained based on the offloading capacity of the candidate edge server and the offloading tasks received by the candidate edge server.
[0026] The arithmetic mean of the resource processing volume is calculated to obtain the average resource processing volume of the candidate edge server;
[0027] The load variance of the candidate edge servers is calculated based on the resource processing volume and the average resource processing volume.
[0028] The load variance of the candidate edge servers is calculated and expressed as:
[0029]
[0030] in, c represents the load variance of the candidate edge servers. r,j This represents the computing resources allocated by edge server j to task r to be unloaded. AT represents the average resource processing capacity of candidate edge servers. r,j The time it takes for task r to reach candidate edge server j. This represents the load of candidate edge server j at time t.
[0031] Optionally, determining the unloading decision for the task to be unloaded based on the load of the plurality of transmission links and the load of the edge server includes:
[0032] Calculate the weight of the task to be unloaded through the several transmission links to each edge server in the transmission network, and set the path with the smallest weight as the candidate path;
[0033] The candidate paths are selected based on preset spectrum rules to obtain candidate paths that conform to the spectrum rules;
[0034] The candidate paths that conform to the aforementioned spectrum rules are modulated to obtain modulated candidate paths;
[0035] The edge servers located on the candidate paths of the modulation process are set as candidate edge servers;
[0036] Based on the candidate paths of the modulation processing and the candidate edge servers, candidate offload decisions are generated.
[0037] The bias of the transmission links is calculated based on the load of the transmission links, and the matching degree of the candidate edge servers is calculated based on the load of the candidate edge servers.
[0038] The expected strength of the candidate unloading decision is calculated based on the bias and the matching degree.
[0039] Based on the expected intensity, calculate the execution time of the candidate unloading decision;
[0040] In response to determining that the execution time of the candidate unloading decision is less than or equal to a second threshold, the candidate unloading decision is determined to be an unloading decision.
[0041] Optionally, the expected strength of the candidate unloading decision calculated based on the bias and the matching degree is expressed as:
[0042]
[0043] Among them, P r,j η represents the desired intensity. r,j τ represents the bias of the edge server. r,j The bias of several transmission links is represented by α and β, which represent the edge server matching factor and the routing and resource allocation scheme preference factor, respectively, both of which are greater than or equal to 0.
[0044] As a second aspect of this disclosure, this disclosure also provides a task unloading apparatus, comprising:
[0045] The task acquisition module acquires the tasks to be uninstalled and determines the transmission network of the tasks to be uninstalled;
[0046] The load calculation module calculates the load of several transmission links in the transmission network and the load of edge servers in the transmission network.
[0047] The unloading decision determination module determines the unloading decision of the task to be unloaded based on the load of the plurality of transmission links and the load of the edge server.
[0048] The task uninstallation module uninstalls the task to be uninstalled based on the uninstallation decision.
[0049] As a third aspect of this disclosure, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the task offloading method described above provided in this disclosure.
[0050] As a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is also provided, the non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods described in any of the above-mentioned methods.
[0051] As described above, this disclosure comprehensively considers the computing load of edge servers and the traffic load of transmission links in the metropolitan area network, and actively achieves load balancing of edge servers and links while ensuring successful task execution. It makes full use of the computing resources of edge servers and the spectrum resources of links in the network, thus ensuring the long-term stability of the system and overcoming the shortcomings of the aforementioned prior art. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a schematic diagram of a transmission network structure provided in an embodiment of the present disclosure.
[0054] Figure 2A This is a schematic diagram of a task unloading method provided in an embodiment of the present disclosure.
[0055] Figure 2B This is a schematic diagram of a method for calculating the load of a transmission link provided in an embodiment of this disclosure.
[0056] Figure 2C This is a schematic diagram illustrating a method for calculating the load of an edge server provided in an embodiment of this disclosure.
[0057] Figure 2D This is a schematic diagram of a method for determining an unloading decision provided in an embodiment of this disclosure.
[0058] Figure 3 This is a schematic diagram of the structure of a task unloading device provided in an embodiment of the present disclosure.
[0059] Figure 4 This is a schematic diagram of an electronic device structure for a task offloading method provided in an embodiment of this disclosure. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0061] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0062] In existing technologies, during the task unloading process, the task must first be sent to the local edge server closest to the terminal device, and then the local edge server forwards the task to a suitable target edge server for unloading. This means that when transmitting the task to the target edge server, uneven network traffic distribution can lead to excessive link load and high spectrum occupancy, resulting in a lack of available spectrum resources. Whether the task completion time exceeds the task execution latency threshold due to edge server overload or the lack of available spectrum resources due to excessive traffic load on the transmission path, task failure will occur.
[0063] To address the aforementioned problems, this disclosure provides a task offloading method, apparatus, electronic device, and storage medium. The method first calculates the load on the transmission links in the transmission network and the load on the edge servers. Then, it generates an offloading decision based on the load on the transmission links and the load on the edge servers. Finally, it offloads the task using the offloading decision.
[0064] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.
[0065] Figure 1 This is a schematic diagram of a transmission network structure provided in an embodiment of the present disclosure.
[0066] In some embodiments, such as Figure 1As shown, the transmission network may include edge servers 1-4, transmission links AB, BC, CD, DE, EF, FA, and optical node AF. The workload of edge server 1 can be 0.96f, the workload of edge server 2 can be 0.6f, the workload of edge server 3 can be 0.48f, and the workload of edge server 4 can be 0.92f. Each transmission link is of equal length (20 km), and each edge server has the same computing power, expressed as f = 3 × 10⁻⁶. 10 The frequency band is I = 12, and the transmission rate of one frequency band using BPSK is B = 6.25 Gbit / s; the maximum number of frequency bands that can be allocated to a task to be offloaded is F. max =4; The maximum and minimum computing resources that can be allocated to a task to be unloaded are respectively: C max =0.5f and C min =0.1f.
[0067] Figure 2A This is a schematic diagram of a task unloading method provided in an embodiment of the present disclosure.
[0068] Figure 2A The task unloading method shown further includes the following steps:
[0069] Step S10: Obtain the task to be uninstalled and the transmission network of the task to be uninstalled.
[0070] In some embodiments, we can first acquire the task to be uninstalled on the terminal device and form a transmission network for this task using the acquired task. Then, the task to be uninstalled can be transmitted to the edge server through the transmission network for uninstallation.
[0071] In some embodiments, after obtaining the task to be uninstalled, we can model the task, which can be specifically represented as: r(s,c,d,t) arr ,T max ), where s represents the access optical node of the task to be unloaded, s∈V A c represents the computing resources required to execute the task, d represents the size of the input data for the task, and t represents the computational resources required to execute the task. arr Indicates the time when the task arrives at the metropolitan optical network, T max This represents the task execution latency threshold.
[0072] In some embodiments, the transmission network of this task formed by the task to be unloaded can be represented as: G(V, E, J), where G represents this network, V represents the set of optical nodes in the transmission network, {v|v∈V}; E represents the set of transmission links, {(a,b)|(a,b)∈E, a≠b}, |E| is the number of transmission links; J represents the set of edge servers, {j|j∈J}, |J| is the number of edge servers, y j y represents the optical node where edge server j is located. j ∈V, where VA represents the set of reachable optical nodes for the task.
[0073] In some embodiments, unloaded tasks from user terminals are first aggregated to these optical nodes, and then transmitted to the corresponding target edge server (i.e., the edge server best suited for the task) based on an unloading decision. Edge computing servers are typically configured on these nodes, i.e., y j ∈V A , However, due to the high deployment cost of edge servers, it is impossible to deploy edge servers on all reachable nodes in a real network. Therefore, this invention further improves the transmission network, enabling communication within the transmission network to be carried by a flexible optical network. In the flexible optical network, the spectrum resources on the aforementioned link (a,b) can be divided into I frequency slots, and the spectrum resources of link (a,b) can be represented as Γ={1,2,3,...,I}.
[0074] In some optional embodiments, when the reachable nodes of the task to be unloaded are nodes A, C, and F, it is assumed that the edge servers are overloaded when the load on the edge servers in the transmission network exceeds their computing capacity; each edge server has the same computing capacity, f = 3 × 10. 10 The number of frequency slots on each link is I = 12, and the transmission rate of one frequency slot using BPSK is B = 6.25 Gbit / s; the maximum number of frequency slots that can be allocated to a task is F. max =4; The maximum and minimum computing resources allowed to be allocated to a task are respectively: C max =0.5f and C min =0.1f; Selectable modulation formats for transmission include BPSK, QPSK, and 8QAM. For the transmission rate and maximum transmission distance parameters supported by each modulation format, please refer to Table 3 in this disclosure. Task to be unloaded [A, 0.6 × 10 10 [cycles, 2.25 Gbits, 15, 0.8 s] At time t = 15, optical node A accesses the network. At this time, the task queues of edge servers 1, 2, 3, and 4 are shown in Table 1.
[0075] Table 1. Task queues and task execution completion times of the four edge servers at time t=15.
[0076]
[0077] In some embodiments, when the task queue is as shown in Table 1 above, the remaining occupied time of each frequency slot on each link in the network at time t=15 can be as shown in Table 2 below.
[0078] Table 2 shows the remaining occupied time (in seconds) for each frequency slot on each link at time t=15.
[0079]
[0080] Step S20: Calculate the load of several transmission links in the transmission network and the load of edge servers in the transmission network.
[0081] In some embodiments, after obtaining the unloading tasks from the user terminal, these unloading tasks can be sent to the transmission network. Then, based on the specific requirements of the task, an unloading decision can be determined for this task by comprehensively considering the load of the edge servers in the transmission network and the load of the transmission links. It is understood that in actual operation, there may be a large number of edge servers on the transmission network, and each unloading task may have several transmission links to the target edge server (i.e., the edge server most suitable for this task).
[0082] Figure 2B This is a schematic diagram of a method for calculating the load of a transmission link provided in an embodiment of this disclosure.
[0083] In some embodiments, such as Figure 2B The diagram illustrates a further explanation of the calculation of the load on several transmission links in the transmission network in step S20, specifically including the following steps:
[0084] S201: Obtain the idle spectrum blocks in the plurality of transmission links and calculate the weight of the idle spectrum blocks.
[0085] In some embodiments, the occupancy state of frequency slot i on the transmission link (a,b) at time t is determined by... Let (i∈Γ) be an expression, where, This indicates that slot i is occupied at time t. This indicates that slot i is available at time t. The weight δ(n) of an idle spectrum block containing n consecutive available slots can be expressed as:
[0086]
[0087] Here, δ(n) represents the weight of an idle spectrum block containing n consecutive available frequency slots, and n-u+1 represents the number of choices for occupying u consecutive frequency slots in an available spectrum block containing n frequency slots. The more available frequency slots an idle spectrum block contains, the higher its importance.
[0088] In some optional embodiments, when the task to be offloaded arrives at the transmission network, firstly, the importance of available spectrum blocks with different numbers of frequency slots is calculated according to the formula above, and the specific calculation results are shown in Table 3.
[0089] Table 3 contains the weights of available spectrum blocks with different numbers of slots.
[0090]
[0091] S202: Calculate the weights of the plurality of transmission links based on the number of frequency slots of the idle spectrum block and the weight of the idle spectrum block.
[0092] In some embodiments, after obtaining the weights of the idle spectrum blocks, we can update the weights of the transmission links using the weights of the idle spectrum blocks and the number of available frequency slots in the idle spectrum blocks. The weights of the transmission links can be expressed as:
[0093]
[0094] in, H and z represent the weights of the transmission link. h Let represent the number of available spectrum blocks in the transmission link (a,b) at time t and the number of frequency slots contained in the h-th available spectrum block, respectively. This represents the set of available spectrum blocks for link (a, b) at time t.
[0095] S203: Calculate the load variance of the plurality of transmission links based on their weights.
[0096] In some embodiments, after obtaining the weights of the transmission links, we can also calculate the load of the transmission links based on the weights of the transmission links. This can also be understood as calculating the spectrum utilization rate of the links at a certain moment, and then calculating the load imbalance of several transmission links in the entire network based on the spectrum utilization rate of the links.
[0097] In some embodiments, minimizing the weighted sum of the load imbalance of the transport links and the load imbalance of the edge servers is the objective of this invention. However, since each task has many candidate offloading decisions, and the weighted sum of each candidate offloading decision is different, selecting the one with the smallest weighted sum by traversing all candidate offloading decisions is the worst approach and has high complexity. Therefore, we propose a method to determine the final offloading decision by updating the weights of the transport links to determine candidate offloading decisions and calculating bias and fitness. This design eliminates the need to traverse all candidate offloading decisions when using the method disclosed herein. Moreover, our proposed method does not require calculating the weighted sum of these two imbalances, but instead transforms it into calculating bias and fitness, making the computation process much easier.
[0098] Specifically, the load variance of a transmission link can be expressed as:
[0099]
[0100] in, This represents the load variance of several transmission links after selecting server j; Indicates at time AT r,j The spectrum occupancy of link (a,b) is determined based on the frequency of several transmission links at time AT. r,j The spectral state is obtained; Indicates at time AT r,j The average spectrum occupancy of link (a,b) is calculated by taking the arithmetic mean of the spectrum occupancy.
[0101] In some embodiments, the smaller the load variance of the aforementioned transmission links, the more balanced the spectrum usage between transmission links, and thus the more balanced the load on the transmission links.
[0102] In some embodiments, we can calculate the load on the transmission link using the method described above and obtain the final result. Next, we can also calculate the load on the edge server, determine the final offloading decision based on the load on the transmission link and the load on the edge server, and offload the tasks to be offloaded based on the offloading decision.
[0103] Figure 2C This is a schematic diagram illustrating a method for calculating the load of an edge server provided in an embodiment of this disclosure.
[0104] In some embodiments, such as Figure 2C The diagram illustrates a further explanation of the calculation of the load on the edge servers in the transmission network in step S20, specifically including the following steps:
[0105] S204: The resource processing capacity of the candidate edge server is obtained based on the offloading capacity of the candidate edge server and the offloading tasks received by the candidate edge server.
[0106] In some embodiments, after calculating the load on the transmission link, we can also calculate the load on the edge server, and then determine the final offloading decision based on the load on the transmission link and the load on the edge server.
[0107] In some embodiments, when calculating the load on an edge server, it is necessary to first calculate the resource processing capacity of the edge server, which can be specifically expressed as follows:
[0108]
[0109] Among them, c r,j C represents the amount of resource processing allocated by edge server j to task r. max This indicates the amount of resource processing that an edge server can allocate to a maximum of one task, C. min This indicates the minimum amount of resources that an edge server can allocate to a single task. C represents the load on edge server j at time t. j This represents the computing power of edge server j.
[0110] In some embodiments, the above formula in It can be represented as: in, This represents the task queue of edge server j at time t.
[0111] S205: Calculate the arithmetic average of the resource processing volume to obtain the average resource processing volume of the candidate edge server.
[0112] In some embodiments, after obtaining the server's resource processing capacity, we can also calculate the average resource processing capacity of the edge server based on that capacity. Specifically, an edge server can process multiple tasks simultaneously, and the computing resources allocated to a task are released only when that task is completed. This represents the remaining computing resources of edge server j at time t. Indicates the edge server at time AT r,j The average resource processing capacity can be expressed as, in, The smaller the value, the more balanced the load distribution among the edge servers. It's understandable that the average resource processing capacity of an edge server can be calculated by taking the arithmetic mean of the resource processing capacity.
[0113] S206: Calculate the load variance of the candidate edge server based on the resource processing volume and the average resource processing volume.
[0114] In some embodiments, after obtaining the resource processing volume and average resource processing volume of the edge server through the above calculation method, we can calculate the load of the edge server by calculating the resource processing volume and average resource processing volume. The load of the edge server can also be specifically defined as the amount of its computing resources being occupied.
[0115] In some embodiments, the load variance of the edge server can be expressed as:
[0116]
[0117] in, c represents the load variance of the candidate edge servers after selecting server j. r,j This represents the amount of computing resources allocated to the candidate edge server j for the task r to be unloaded. AT represents the average resource processing capacity of candidate edge servers. r,j The time it takes for task r to reach candidate edge server j. This represents the load of candidate edge server j at time t.
[0118] In some embodiments, after obtaining the weights of several transmission links, we begin calculating transmission paths and determining candidate edge servers. Calculating the variance of the spectrum occupancy of the links and the load variance of the edge servers is merely to describe our problem. Understandably, calculating the variances of the transmission links and candidate edge servers is not our focus; updating the weights of the transmission links and calculating fitness, bias, and expected strength are our priorities. In specific technical implementations, we typically do not need to calculate these two variances.
[0119] As described above, in this disclosure, we obtained the load on the transmission link and the load on the edge server, respectively. Next, we will further determine the final offloading decision based on the load on the transmission link and the load on the edge server, and offload the task to be offloaded based on the determined offloading decision.
[0120] Step S30: Determine the unloading decision for the task to be unloaded based on the load of the plurality of transmission links and the load of the edge server.
[0121] In some embodiments, after we have determined the load of the transmission link and the edge server through the above calculations, we can further determine the unloading decision of the task to be unloaded based on the determined load and the processing resources required by the task to be unloaded.
[0122] In some embodiments, we can first determine candidate unloading decisions for the task to be unloaded by the load of the transmission link, and then further select the candidate unloading decisions by the load of the edge server to determine the final unloading decision.
[0123] In some embodiments, we can calculate the expected value of the task to be unloaded by the load of the transmission link and the load of the edge server, and determine the final unloading decision by the expected value of the task to be unloaded.
[0124] Figure 2D This is a schematic diagram of a method for determining an unloading decision provided in an embodiment of this disclosure.
[0125] In some embodiments, such as Figure 2D The diagram shows a further explanation of step S30, which specifically includes the following steps:
[0126] S301: Calculate the weight of the task to be unloaded through the several transmission links to each edge server in the transmission network, and set the path with the smallest weight as the candidate path.
[0127] In some embodiments, after obtaining the load of the transmission links, we can calculate the weight of the task to be unloaded through the plurality of transmission links to each edge server in the transmission network, and set the path with the smallest weight as a candidate path. It is understood that we can also set links with loads below a first threshold as candidate links. The first threshold can be a threshold set by manually calculating and empirically evaluating the task to be unloaded. A load below the first threshold indicates that the remaining load of the transmission link meets the load requirements of the task to be unloaded, and the task to be unloaded can be transmitted through this transmission link.
[0128] In some embodiments, we can also use Dijkstra's algorithm to calculate the distance from the access optical node s of task r to each edge server j (s≠y). j The path p with the lowest weight r,j Among them, path p r,j weight PW r,j The calculation method can be expressed as follows:
[0129] In some embodiments, if the access optical node s of the task to be unloaded r is an optical node configured by the edge server j, and no routing and resource allocation are required, then the transmission path weight is a small value Δ. The lower the weight of the transmission path, the higher the probability that the transmission path contains available spectrum, and the higher the probability that the task to be unloaded will successfully transmit using this transmission path.
[0130] In some embodiments, Table 4 represents the path with the lowest weight from optical node A to each edge server. Specifically, the transmission path with the lowest weight from optical node A to edge server 2 is: transmission link AF, transmission link FB, transmission link BC, with a path weight of 0.033 and a path length of 60km. The transmission path with the lowest weight from optical node A to edge server 3 is: transmission link AF, transmission link FB, transmission link BC, transmission link CE, with a path weight of 0.065 and a path length of 80km. The transmission path with the lowest weight from optical node A to edge server 4 is: transmission link AF, with a path weight of 0.011 and a path length of 20km.
[0131] Table 4 shows the path with the lowest weight from optical node A to each edge server.
[0132]
[0133] In some embodiments, once we find a transmission link that matches the task to be unloaded, we can set this transmission path as a candidate path. It is understood that the number of candidate paths may not be unique; any path that meets the above requirements can be considered a final candidate path.
[0134] S302: Select the candidate path based on the preset spectrum rules to obtain the candidate path that conforms to the spectrum rules.
[0135] In some embodiments, when transferring the task to be unloaded to the edge server, specific spectrum rules also need to be met.
[0136] In some embodiments, the spectrum rules can be expressed as: 1. Spectrum proximity constraint, i.e., the frequency slots allocated to tasks on a link should be adjacent; 2. Spectrum consistency constraint, i.e., for path p r,j 1. The frequency slots allocated to each task on each link should be the same; 2. Spectrum non-overlap restriction, that is, the spectrum blocks allocated to different tasks cannot overlap, and a frequency slot can only be occupied by one task at the same time.
[0137] In some embodiments, after filtering the aforementioned candidate paths according to the above rules, we can obtain candidate paths that conform to the spectrum rules.
[0138] S303: Modulate the candidate paths that conform to the spectrum rules to obtain modulated candidate paths.
[0139] In some embodiments, once we obtain candidate paths that conform to the spectral rules, we can perform modulation processing on these candidate paths.
[0140] In some embodiments, candidate path p r,j The length of the candidate path cannot exceed the maximum transmission distance of the selected modulation format. When the candidate path meets the maximum transmission distance limit of the modulation format, the modulation format with the highest modulation level is selected first.
[0141] In some embodiments, the present invention considers three modulation formats: Binary Phase Shift Keying (BPSK) (m=1), Quadrature Phase Shift Keying (QPSK) (m=2), and 8-Quadrature Amplitude Modulation (8QAM) (m=3). The higher the modulation level, the higher the transmission rate supported by a single frequency slot, and the shorter the supported transmission distance. It is understood that this disclosure only illustrates the above three modulation formats, but does not mean that the modulation processing in this disclosure can only be performed using these three modulation formats.
[0142] In some embodiments, Table 5 provides a detailed description of the three modulation processing methods described above:
[0143] Table 5. Capacity and transmission distance parameters of modulation formats
[0144]
[0145] In some embodiments, after modulating candidate paths that conform to spectral rules, we can obtain modulated candidate paths.
[0146] S304: Set the edge server located on the candidate path of the modulation process as a candidate edge server.
[0147] In some embodiments, after obtaining candidate paths for modulation processing, we can select candidate edge servers based on these paths. Specifically, we can use edge servers on the candidate paths for modulation processing as candidate edge servers.
[0148] S305: Generate candidate offloading decisions based on the candidate paths of the modulation processing and the candidate edge servers.
[0149] In some embodiments, once we have determined the candidate paths for modulation processing and the candidate edge servers, we can further determine candidate offloading decisions based on the candidate paths for modulation processing and the candidate edge servers.
[0150] In some embodiments, candidate unloading decisions can be determined using the following method. Specifically, on the candidate path of modulation processing, p r,j There may be multiple spectrum blocks that meet the above spectrum resource allocation constraints. We can first select spectrum block resources on the candidate paths of modulation processing.
[0151] In some embodiments, the method for selecting spectrum blocks is as follows: 1. Allocate as many frequency slots as possible to the task to be unloaded r, the number of allocated frequency slots being n. r,j It means that n r,j It should satisfy: 1≤n r,j ≤F max F max 1. Indicates the maximum number of frequency slots allowed to be allocated to a task; 2. When there are multiple spectrum blocks with different numbers of frequency slots, the spectrum block with the most frequency slots is selected first, which can reduce the spectrum fragmentation rate to some extent; 3. When there are multiple spectrum blocks with the same number of frequency slots, First-Fit is used to determine the spectrum block. J c Let p be the set of candidate edge servers for task r, and let p be the candidate path for modulation processing. r,j There are available spectrum resources or s=y j Add edge server j to J c This uninstallation decision is a candidate uninstallation decision for task r.
[0152] In some embodiments, after obtaining candidate offloading decisions, we can also calculate the transmission time of the task to be offloaded under each candidate offloading decision. For a candidate offloading decision with candidate edge server j, if s≠y j The task to be unloaded, r, will be transferred from its access optical node s via path p. r,j The transmission time to candidate edge server j is: TD r,j =d / (m r,j ×n r,j ×B), where m r,j Indicates the candidate path p in the modulation process r,j The modulation format used, n r,j Indicates the candidate path p in the modulation process r,j The number of frequency slots allocated above, B represents the transmission rate using a frequency slot with BPSK modulation format. If s = y j TD r,j =0. The time when task r arrives at candidate edge server j is: AT r,j =t arr +TD r,j .
[0153] In some alternative embodiments, the candidate unloading decisions may also be as shown in Table 6.
[0154] Table 6 Candidate Unloading Decisions
[0155]
[0156] S306: Calculate the bias of the plurality of transmission links based on the candidate paths of the modulation processing, and calculate the matching degree of the candidate edge servers based on the load of the candidate edge servers.
[0157] In some embodiments, we can further calculate the bias of the candidate paths of the modulation processing and the matching degree of the candidate edge servers, and calculate the expected strength of the task to be unloaded for each candidate unloading decision by the bias of the candidate links of the modulation processing and the matching degree of the candidate edge servers, so as to determine the final unloading decision.
[0158] In some embodiments, the bias of the candidate path for modulation processing can be expressed as:
[0159]
[0160] Where, τ r,j τ represents the preference for the corresponding routing and resource allocation scheme used by the task r to be unloaded, i.e., the bias of the candidate links in the modulation processing. r,j The larger the value, the greater the number of candidate paths p in the modulation process. r,j The more available frequency slots a task r contains, the more frequency slots it contains, and the higher the modulation level used, the greater the likelihood that the task r to be unloaded will choose this routing and resource allocation scheme.
[0161] In some embodiments, the matching degree of a candidate edge server can be expressed as:
[0162]
[0163] Where, η r,j This represents the matching degree between the task to be unloaded, r, and the candidate edge server, j. The specific calculation process can also be viewed as calculating the computing resources c required by the task to be unloaded, r. r,j Remaining computing resources of candidate edge server j The cosine similarity between them. η r,j The larger the value, the higher the matching degree between the two, and the more likely task r is to choose edge server j.
[0164] S307: Calculate the expected strength of the candidate unloading decision based on the bias and the matching degree.
[0165] In some embodiments, the expected strength of the task to be unloaded for each candidate unloading decision is calculated, and J is assigned according to the expected strength. cThe edge servers in the middle are sorted in descending order.
[0166] In some embodiments, the expected strength of the task to be unloaded for each candidate unloading decision can also be expressed as:
[0167]
[0168] Among them, P r,j η represents the desired intensity. r,j τ represents the bias of the edge server. r,j The bias of several transmission links is represented by α and β, which represent the edge server matching factor and the routing and resource allocation scheme preference factor, respectively, both of which are greater than or equal to 0.
[0169] In some alternative embodiments, the expected strength of the aforementioned candidate unloading decisions may also be as shown in Table 7.
[0170] Table 7 calculates the expected strength of the task to be unloaded for each candidate unloading decision.
[0171]
[0172] S308: Calculate the execution time of the candidate unloading decision based on the expected intensity.
[0173] In some embodiments, after obtaining the expected strength of the candidate unloading decision through the above calculations, we can calculate the execution time of the candidate unloading decision based on its expected strength. Specifically, we can calculate the start time and end time of the task to be unloaded, and obtain the execution time of the task to be unloaded from the difference between the two.
[0174] In some embodiments, we can also model the execution time of the task to be unloaded, r. The completion time of a task to be unloaded includes transmission time, waiting time, and computation time. The transmission time consists of two parts: the time to transmit the task to be unloaded from the terminal device to the edge server, and the time for the edge server to return the computation result to the terminal device. This invention focuses on determining the unloading decision for the task based on the load of the edge server and the link after the task arrives at the network; therefore, it does not focus on the transmission equipment from the terminal device to the network. Furthermore, in practical applications, taking face recognition as an example, the input data includes mobile system settings, program code, and input parameters, which is a large amount of data. The data volume of the face recognition result, i.e., the computation result, is much smaller than the input data volume. Therefore, we ignore the time for returning the computation result from the edge server to the terminal device. Thus, the transmission time of the task only includes the time to transmit the task from its access optical node to the target edge server.
[0175] In some embodiments, for a candidate offloading decision where the candidate edge server is j, the transmission time TD from the task to be offloaded r to the candidate edge server j has been obtained through the above method. r,j Next, we can calculate the waiting time (WD) of the task to be unloaded (r) on the candidate edge server (j). r,j .
[0176] In some embodiments, we can use ST respectively r,j and ET r,j This indicates the time when candidate edge server j starts processing task r and the time when it finishes processing it. Task r to be unloaded is at time AT. r,j Upon arrival at candidate edge server j, the waiting time WD for the unloading task r on candidate edge server j is... r,j It can be derived from the formula The calculation yielded that, For candidate edge server j at time AT r,j If the remaining computing resources meet the requirements for allocating resources to the unloaded task r, the unloaded task r does not need to wait. r,j =0; If the remaining computing resources do not meet the computing resource requirements to be allocated to the task, the task to be unloaded needs to wait until the remaining computing resources of the candidate edge server j meet the computing resource requirements of task r after the other tasks to be unloaded have been completed.
[0177] In some embodiments, it is assumed that when After the unloading task r' in the process is completed (i.e., at time ET), r',j If the remaining computing resources of candidate edge server j are sufficient to meet the computing resource requirements of task r to be unloaded, then the waiting time WD for task r to be unloaded is... r,j The time taken for the candidate edge server j to process the unloading task r' is: the completion time of the unloading task r' minus the time it takes for the unloading task r to reach the candidate edge server j. The processing time for the candidate edge server j to process the unloading task r is: PD. r,j =c / c r,j Therefore, the time ST when candidate edge server j begins processing the unloaded task r is... r,j and the time ET when processing is completed r,j It can be obtained from the formula ST. r,j =AT r,j +WD r,j and ET r,j =ST r,j +PD r,j The calculation yields the following result. Based on the above analysis, the execution time of the task to be unloaded, r, processed by the edge server j can be expressed as: CD r,j =TD r,j +WD r,j +PD r,j .
[0178] S309: In response to determining that the execution time of the candidate unloading decision is less than or equal to the second threshold, the candidate unloading decision is determined to be an unloading decision.
[0179] In some embodiments, we can also select the sorted J one by one. c For candidate edge servers j, calculate the completion time CD of the task r to be unloaded when taking the corresponding candidate unloading decision. r,j If the completion time is CD r,j The second execution threshold of task r is met, i.e., CD. r,j ≤T max If the loop ends, the corresponding uninstallation decision is the final uninstallation decision for the task r to be uninstalled; otherwise, continue selecting J. c The next candidate edge server is then used for computation. If no uninstallation decision that meets the second threshold for task execution is found after iterating through all uninstallation decisions, the task execution fails.
[0180] In summary, this disclosure first calculates the load on the transmission link and the edge server based on the weight of the transmission link and the resource processing capacity of the edge server. Then, the final offloading decision is determined based on the load on the transmission link and the edge server. Finally, the task to be offloaded is offloaded based on the final offloading decision.
[0181] Based on the same technical concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a task unloading device, which can realize the task unloading method described in any of the above embodiments.
[0182] Figure 3 This is a schematic diagram of the structure of a task unloading device provided in an embodiment of the present disclosure.
[0183] Figure 3 The task unloading device shown further includes:
[0184] Task acquisition module 100, load calculation module 200, unloading decision determination module 300, and task unloading module 400;
[0185] The task acquisition module is configured to acquire the task to be uninstalled and determine the transmission network of the task to be uninstalled.
[0186] The load calculation module is configured to: calculate the load of several transmission links in the transmission network and the load of edge servers in the transmission network; specifically, it performs the following steps:
[0187] Obtain the idle spectrum blocks in the plurality of transmission links, and calculate the weight of the idle spectrum blocks;
[0188] The weights of the plurality of transmission links are calculated based on the number of frequency slots in the idle spectrum block and the weight of the idle spectrum block;
[0189] Calculate the load variance of the several transmission links based on their weights;
[0190] The calculation of the load variance of the plurality of transmission links based on their weights is expressed as follows:
[0191]
[0192] in, This represents the load variance of several transmission links after selecting server j; Indicates at time AT r,j The spectrum occupancy of link (a,b) is determined based on the frequency of several transmission links at time AT. r,j The spectral state is obtained; Indicates at time AT r,j The average spectrum occupancy of link (a,b) is calculated by taking the arithmetic mean of the spectrum occupancy rates.
[0193] The step of obtaining the idle spectrum blocks in the plurality of transmission links and calculating the weight of the idle spectrum blocks is expressed as follows:
[0194]
[0195] Where δ(n) represents the weight of a spectrum block containing n consecutive available frequency slots, and n-u+1 represents the number of choices to occupy u consecutive frequency slots in the available spectrum block containing n frequency slots;
[0196] The calculation of the weights of the plurality of transmission links based on the number of frequency slots in the idle spectrum block and the weight of the idle spectrum block is expressed as follows:
[0197]
[0198] in, H and z represent the weights of the transmission link. h Let represent the number of available spectrum blocks in the transmission link (a,b) at time t and the number of frequency slots contained in the h-th available spectrum block, respectively. This represents the set of available spectrum blocks for link (a, b) at time t.
[0199] The resource processing capacity of the candidate edge server is obtained based on the offloading capacity of the candidate edge server and the offloading tasks received by the candidate edge server.
[0200] The arithmetic mean of the resource processing volume is calculated to obtain the average resource processing volume of the candidate edge server;
[0201] The load variance of the candidate edge servers is calculated based on the resource processing volume and the average resource processing volume.
[0202] The load variance of the candidate edge servers is calculated and expressed as:
[0203]
[0204] in, c represents the load variance of the candidate edge servers after selecting server j. r,j This represents the amount of computing resources allocated to candidate edge server j for task r to be unloaded. AT represents the average resource processing capacity of candidate edge servers. r,j The time it takes for task r to reach candidate edge server j. This represents the load of candidate edge server j at time t;
[0205] The unloading decision determination module is configured to: determine the unloading decision of the task to be unloaded based on the load of the plurality of transmission links and the load of the edge server; specifically, it executes the following steps:
[0206] Calculate the weight of the task to be unloaded through the several transmission links to each edge server in the transmission network, and set the path with the smallest weight as the candidate path;
[0207] The candidate paths are selected based on preset spectrum rules to obtain candidate paths that conform to the spectrum rules;
[0208] The candidate paths that conform to the aforementioned spectrum rules are modulated to obtain modulated candidate paths;
[0209] The edge servers located on the candidate paths of the modulation process are set as candidate edge servers;
[0210] Based on the candidate paths of the modulation processing and the candidate edge servers, candidate offload decisions are generated.
[0211] The bias of the plurality of transmission links is calculated based on the candidate paths of the modulation processing, and the matching degree of the candidate edge servers is calculated based on the load of the candidate edge servers.
[0212] The expected strength of the candidate unloading decision is calculated based on the bias and the matching degree.
[0213] Based on the expected intensity, calculate the execution time of the candidate unloading decision;
[0214] In response to determining that the execution time of the candidate unloading decision is less than or equal to a second threshold, the candidate unloading decision is determined to be an unloading decision;
[0215] The expected strength of the candidate unloading decision calculated based on the bias and the matching degree is expressed as:
[0216]
[0217] Among them, P r,j η represents the desired intensity. r,j τ represents the bias of the edge server. r,j The bias of several transmission links is represented by α and β, which represent the edge server matching factor and the routing and resource allocation scheme preference factor, respectively, both of which are greater than or equal to 0.
[0218] The task uninstallation module is configured to uninstall the task to be uninstalled based on the uninstallation decision.
[0219] Based on the same technical concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the task offloading method described in any of the above embodiments.
[0220] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0221] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0222] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0223] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0224] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0225] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0226] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0227] The electronic devices described above are used to implement the corresponding task unloading methods in any of the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0228] Based on the same technical concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the task unloading method as described in any of the above embodiments.
[0229] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0230] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the task unloading method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0231] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0232] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0233] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0234] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A task offloading method, characterized by, The method comprises: obtaining a to-be-unloaded task and determining a transmission network of the to-be-unloaded task; calculating load amounts of a plurality of transmission links in the transmission network and load amounts of edge servers in the transmission network; determining an unloading decision of the to-be-unloaded task based on the load amounts of the plurality of transmission links and the load amounts of the edge servers; unloading the to-be-unloaded task according to the unloading decision; the calculation of the load amounts of the plurality of transmission links comprises: obtaining idle spectrum blocks in the plurality of transmission links and calculating weights of the idle spectrum blocks; calculating weights of the plurality of transmission links according to the number of frequency slots of the idle spectrum blocks and the weights of the idle spectrum blocks; calculating load variances of the plurality of transmission links according to the weights of the plurality of transmission links; wherein the calculation of the load variances of the plurality of transmission links according to the weights of the plurality of transmission links is represented as: wherein, denotes the variance of the load of the several transmission links after the selection of the server j; denotes the spectrum state of the several transmission links at the time denotes the spectrum occupancy of the link (a, b) which is obtained from the spectrum states of the several transmission links at the time ; denotes the average spectrum occupancy of the link (a, b) which is obtained by an arithmetic mean calculation of the spectrum occupancies; denotes the average spectrum occupancy of the link (a, b) which is obtained by an arithmetic mean calculation of the spectrum occupancies; the calculation of the load amounts of the edge servers in the transmission network comprises: calculating resource processing amounts of candidate edge servers based on unloading capabilities of the candidate edge servers and the to-be-unloaded tasks received by the candidate edge servers; performing arithmetic mean value calculation on the resource processing amounts to obtain average resource processing amounts of the candidate edge servers; calculating load variances of the candidate edge servers based on the resource processing amounts and the average resource processing amounts; wherein the calculation of the load variances of the candidate edge servers is represented as: wherein, denotes the load variance of candidate edge server after selecting server j, denotes the amount of computing resources of candidate edge server j allocated to task to be offloaded r, denotes the average resource processing amount of candidate edge server, denotes the time of task r arriving at candidate edge server j, denotes the load of candidate edge server j at time t; the determination of the unloading decision of the to-be-unloaded task based on the load amounts of the plurality of transmission links and the load amounts of the edge servers comprises: calculating weights of paths of the to-be-unloaded task to each edge server in the transmission network through the plurality of transmission links, and setting a path with the smallest weight as a candidate path; selecting the candidate path based on a preset spectrum rule to obtain a candidate path meeting the spectrum rule; performing modulation processing on the candidate path meeting the spectrum rule to obtain a modulation-processed candidate path; setting edge servers located on the modulation-processed candidate path as the candidate edge servers; generating a candidate unloading decision based on the modulation-processed candidate path and the candidate edge servers; calculating a bias degree of the plurality of transmission links based on the modulation-processed candidate path and calculating a matching degree of the candidate edge servers based on the load amounts of the candidate edge servers; calculating an expected strength of the candidate unloading decision based on the bias degree and the matching degree; calculating an execution time of the candidate unloading decision based on the expected strength; in response to determining that the execution time of the candidate unloading decision is less than or equal to a second threshold value, determining that the candidate unloading decision is the unloading decision.
2. The method of claim 1, wherein, the obtaining of the idle spectrum blocks in the plurality of transmission links and the calculation of the weights of the idle spectrum blocks are represented as: wherein, represents a weight of a spectrum block containing n consecutive available frequency slots, represents the selectable number of occupying u consecutive frequency slots in the available spectrum block containing n frequency slots.
3. The method of claim 1, wherein, the calculation of the weights of the plurality of transmission links according to the number of frequency slots of the idle spectrum blocks and the weights of the idle spectrum blocks is represented as: in, Indicates the weight of the transmission link. and Let represent the number of available spectrum blocks in the transmission link (a,b) at time t and the number of frequency slots contained in the h-th available spectrum block, respectively. Indicates at time t link( a , b The available spectrum block set .
4. The method of claim 1, wherein, the calculation of the expected strength of the candidate unloading decision based on the bias degree and the matching degree is represented as: wherein, represents a desired intensity, represents a bias degree of the edge server, represents a bias degree of several transmission links, and respectively represent an edge server matching degree factor and a routing and resource allocation scheme preference degree factor, both of which are greater than or equal to 0.
5. A task offloading apparatus characterized by comprising: The method comprises: The task acquisition module acquires a task to be offloaded and determines a transmission network of the task to be offloaded. The load calculation module calculates load amounts of a plurality of transmission links in the transmission network and load amounts of edge servers in the transmission network. The offloading decision determination module determines an offloading decision of the task to be offloaded based on the load amounts of the plurality of transmission links and the load amounts of the edge servers. The task offloading module offloads the task to be offloaded according to the offloading decision. The task acquisition module includes: The idle spectrum blocks in the plurality of transmission links are acquired, and weights of the idle spectrum blocks are calculated. The weights of the plurality of transmission links are calculated according to the number of frequency slots of the idle spectrum blocks and the weights of the idle spectrum blocks. The load variances of the plurality of transmission links are calculated according to the weights of the plurality of transmission links. The load variances of the plurality of transmission links are calculated according to the weights of the plurality of transmission links, and are represented as follows: wherein, denotes the variance of the load of the several transmission links after the selection of the server j; denotes the spectrum state of the link (a, b) at the time instant denotes the spectrum occupancy of the link (a, b), which is obtained from the spectrum states of the several transmission links at the time instant denotes the average spectrum occupancy of the link (a, b), which is obtained by an arithmetic mean calculation of the spectrum occupancies; denotes the spectrum state of the link (a, b) at the time instant The load calculation module includes: The resource processing amounts of the candidate edge servers are calculated based on the offloading capabilities of the candidate edge servers and the tasks to be offloaded received by the candidate edge servers. The average resource processing amount of the candidate edge server is obtained by performing an arithmetic mean value calculation on the resource processing amounts. The load variance of the candidate edge server is calculated based on the resource processing amount and the average resource processing amount. The load variance of the candidate edge server is calculated, and is represented as follows: wherein, denotes the load variance of candidate edge servers after selecting server j, denotes the amount of computing resources of candidate edge server j allocated to task to-be-offloaded r, denotes the average resource processing amount of candidate edge servers, denotes the time of task r arriving at candidate edge server j, denotes the load of candidate edge server j at time t; The offloading decision determination module includes: The weights of paths of the task to be offloaded to each edge server in the transmission network through the plurality of transmission links are calculated, and the path with the smallest weight is set as a candidate path. The candidate path meeting the spectrum rule is obtained by selecting the candidate path based on a preset spectrum rule. The candidate path after modulation processing is obtained by performing modulation processing on the candidate path meeting the spectrum rule. The edge server located on the candidate path after modulation processing is set as the candidate edge server. The candidate offloading decision is generated based on the candidate path after modulation processing and the candidate edge server. The bias degree of the plurality of transmission links is calculated based on the candidate path after modulation processing, and the matching degree of the candidate edge server is calculated based on the load amount of the candidate edge server. The expected strength of the candidate offloading decision is calculated based on the bias degree and the matching degree. The execution time of the candidate offloading decision is calculated based on the expected strength. In response to determining that the execution time of the candidate offloading decision is less than or equal to a second threshold value, the candidate offloading decision is determined as the offloading decision.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method in any one of claims 1 to 4.