Computing task unloading method and device, electronic equipment and storage medium
By comprehensively calculating delay and transmission delay, the optimal unload scheduling coefficient is determined, and the calculation task is allocated to the appropriate terminal, which solves the problem of ignoring transmission delay in the calculation delay in the prior art, and realizes the end-to-end total delay Minimize and improve user experience.
Patent Information
- Application Number
- CN202411187870.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
The existing computing unloading scheduling methods mainly consider calculation delay, which fails to effectively reduce transmission delay, resulting in poor user experience in application scenarios with high real-time requirements such as VR rendering.
By comprehensively calculating the delay and transmission delay, the optimal offload scheduling coefficient is determined, the calculation task is assigned to the appropriate terminal to minimize the end-to-end total delay, and a weighted sum function based on queue state information and system state distribution probability is used. The average total delay function is constructed and the solution is optimized to obtain the scheduling coefficient.
It realizes the end-to-end total delay minimization, improves the user experience, and significantly improves the execution efficiency of computing tasks in application scenarios with high real-time requirements.
Smart Images

Figure CN119172803A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for offloading computing tasks. Background Art
[0002] In AI application scenarios such as the Metaverse and autonomous driving, if all the data to be processed is uploaded to the cloud core network or central server for processing and then sent to the terminal device, it will often cause a large delay. At the same time, with the development of chip technology, terminal devices gradually have certain computing capabilities, so edge computing technologies such as computing offload have emerged.
[0003] Computational offloading means that the system allocates part of the computing tasks to the mobile edge computing nodes for calculation, and allocates the other part of the computing tasks to the local computing nodes for calculation. Through reasonable allocation, the total delay of executing all computing tasks is expected to be reduced.
[0004] At present, the computing offloading scheduling method adopted by the industry mainly considers the computing delay determined by the computing power of the computing node, and usually does not consider the transmission delay caused by the data generated after the transmission calculation. However, for many scenarios (such as VR (Virtual Reality) rendering, etc.), the amount of data to be transmitted increased by the advance computing processing will cause a large transmission delay. At this time, if the computing offloading scheduling scheme is designed only based on computing power, the multimedia presentation of the terminal device will be difficult to meet the real-time requirements, and the user experience will be poor.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a method, device, electronic device and storage medium for offloading computing tasks. The method can determine the optimal offloading scheduling coefficient by comprehensively calculating the delay and transmission delay, thereby minimizing the user's end-to-end total delay.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] The embodiment of the present disclosure provides a method for unloading a computing task, which is applied to a base station system, comprising: obtaining first terminal information, wherein the first terminal information comprises: computing task arrival information and first queue status information of the first terminal; determining an unloading scheduling coefficient based on the first terminal information and queue status information of the base station system; and according to the unloading scheduling coefficient, unloading the computing task to the base station system so that the base station system executes the computing task, or unloading the computing task to the first terminal so that the first terminal executes the computing task.
[0009] In some exemplary embodiments of the present disclosure, the base station system includes: a base station and a second terminal, and the queue state information of the base station system includes: second queue state information of the second terminal and third queue state information of the base station.
[0010] In some exemplary embodiments of the present disclosure, the first queue status information includes a first queue length of the first terminal, and the second queue status information includes a second queue length of the second terminal; the unloading scheduling coefficient is determined based on the first terminal information and the queue status information of the base station system, including: constructing an average total delay function based on the computing task arrival information and a weighted sum function of the first delay function and the second delay function, wherein the first delay function is constructed based on the system state distribution probability, the first queue status information and the third queue status information, the second delay function is constructed based on the system state distribution probability, the second queue status information and the third queue status information, and the sum of the first weight of the first delay function and the second weight of the second delay function is 1; the second weight that minimizes the function value of the average total delay function is determined as the unloading scheduling coefficient.
[0011] In some exemplary embodiments of the present disclosure, an unloading scheduling coefficient is determined based on the first terminal information and the queue status information of the base station system, including: determining a system state distribution probability, wherein the system state distribution probability characterizes the probability corresponding to each distribution state under which the data processing volume in the system is in a plurality of distribution states; constructing a data transmission delay function, a first delay function for characterizing the calculation delay of the first terminal, and a second delay function for characterizing the calculation delay of the second terminal based on the system state distribution probability, the computing task arrival information, the first queue status information, the second queue status information, and the third queue status information; taking the scheduling coefficient as a variable, constructing an average total delay function based on the scheduling coefficient, the data transmission delay function, the first delay function, and the second delay function; optimizing and solving the average total delay function with minimizing the average total delay function as the optimization goal to obtain a solution value of the scheduling coefficient, and determining the solution value as the unloading scheduling coefficient.
[0012] In some exemplary embodiments of the present disclosure, a data transmission delay function, a first delay function for characterizing the computing delay of a first terminal, and a second delay function for characterizing the computing delay of a second terminal are constructed based on the system state distribution probability, the computing task arrival information, the first queue state information, the second queue state information, and the third queue state information, including: constructing a data transmission delay function based on the system state distribution probability and the computing task arrival information; constructing a first delay function for characterizing the computing delay of the first terminal based on the system state distribution probability, the first queue state information, and the third queue state information; constructing a second delay function for characterizing the computing delay of the second terminal based on the system state distribution probability, the second queue state information, and the third queue state information.
[0013] In some exemplary embodiments of the present disclosure, the second weight that minimizes the function value of the average total delay function is determined as the unloading scheduling coefficient, including: in response to the function value of the first initial average total delay function being greater than the function value of the second initial average total delay function, updating the first preset value to the first initial weight, or, in response to the function value of the first initial average total delay function being not greater than the function value of the second initial average total delay function, updating the second preset value to the second initial weight, wherein the first initial average total delay function corresponds to the first initial weight, the second initial average total delay function corresponds to the second initial weight, and the first initial weight and the second initial weight are determined according to the first preset value and the second preset value in response to the difference between the second preset value and the first preset value being greater than a preset threshold; in response to the difference between the updated second preset value and the updated first preset value being not greater than the preset threshold, determining the updated second preset value as the unloading scheduling coefficient.
[0014] In some exemplary embodiments of the present disclosure, the optimizing and solving the average total delay function to obtain the solution value of the scheduling coefficient includes: optimizing and solving the average total delay function based on the trisection method to obtain the solution value of the scheduling coefficient, and determining the solution value as the unloading scheduling coefficient; it includes: dividing the variable value range of the scheduling coefficient into three equal parts to obtain the first coefficient and the second coefficient corresponding to the equal division points; determining the first function value corresponding to the average total delay function when the scheduling coefficient is the first coefficient, and determining the second function value corresponding to the average total delay function when the scheduling coefficient is the second coefficient. value; updating the variable value range of the scheduling coefficient according to the size relationship between the first function value and the second function value, and dividing the updated variable value range of the scheduling coefficient into three equal parts to obtain the updated first coefficient and the updated second coefficient corresponding to the updated equal division points; in response to the difference between the updated first coefficient and the updated second coefficient being greater than a preset threshold, continuing to update the variable value range of the scheduling coefficient; in response to the difference between the updated first coefficient and the updated second coefficient being less than or equal to the preset threshold, determining the updated first coefficient or the updated second coefficient as the solution value of the scheduling coefficient.
[0015] In some exemplary embodiments of the present disclosure, determining the unloading scheduling coefficient based on the first terminal information and the queue status information of the base station system includes: the base station sending the first terminal information and the third queue status information to the second terminal; the second terminal determining the unloading scheduling coefficient based on the first terminal information, the second queue status information and the third queue status information.
[0016] In some exemplary embodiments of the present disclosure, the computing task is unloaded to the base station system according to the unloading scheduling coefficient so that the base station system performs the computing task, or the computing task is unloaded to the first terminal so that the first terminal performs the computing task, including: the base station compares the unloading scheduling coefficient with a random number, wherein the random number is generated by the base station based on a preset distribution function in response to the arrival of the computing task; in response to the unloading scheduling coefficient being less than the random number, the base station unloads the computing task to the first terminal so that the first terminal performs the computing task, or, in response to the unloading scheduling coefficient being greater than the random number, the base station unloads the computing task to the second terminal so that the second terminal performs the computing task.
[0017] In some exemplary embodiments of the present disclosure, the method further includes: the base station acquiring an execution result of the computing task by the second terminal, and sending the execution result to the first terminal.
[0018] The embodiment of the present disclosure provides a computing task unloading device, which is applied to a base station system, including: an acquisition module, used to acquire first terminal information, wherein the first terminal information includes: computing task arrival information and first queue status information of the first terminal; a determination module, used to determine an unloading scheduling coefficient based on the first terminal information and queue status information of the base station system; an unloading module, used to unload the computing task to the base station system according to the unloading scheduling coefficient so that the base station system executes the computing task, or to unload the computing task to the first terminal so that the first terminal executes the computing task.
[0019] An embodiment of the present disclosure provides an electronic device, comprising: at least one processor; a storage terminal device, used to store at least one program, when the at least one program is executed by the at least one processor, the at least one processor implements any of the above-mentioned methods for unloading computing tasks.
[0020] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any of the above-mentioned methods for unloading computing tasks when executed by a processor.
[0021] The computing task offloading method provided by the embodiment of the present disclosure determines the offloading scheduling coefficient by comprehensively considering the computing delay determined by the computing power of each end and the transmission delay caused by transmitting the computing results between the ends, and allocates the computing tasks to the corresponding ends for execution accordingly, thereby minimizing the total end-to-end delay and improving the user experience.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0024] Figure 1 Shown is a flow chart of a method for offloading computing tasks provided by an embodiment of the present disclosure;
[0025] Figure 2 FIG. 1 is a schematic diagram of determining an unloading scheduling coefficient of a base station system provided by an embodiment of the present disclosure;
[0026] Figure 3 Shown is a schematic diagram of offloading computing tasks from a base station system provided by an embodiment of the present disclosure;
[0027] Figure 4 Shown is a flow chart of a method for offloading computing tasks provided by another embodiment of the present disclosure;
[0028] Figure 5 FIG. 1 is a schematic diagram of a base station system determining an unloading scheduling coefficient according to another embodiment of the present disclosure;
[0029] Figure 6 FIG. 1 is a flow chart of a method for offloading computing tasks provided by another embodiment of the present disclosure;
[0030] Figure 7 Shown is a schematic diagram of offloading computing tasks from a base station system provided by another embodiment of the present disclosure;
[0031] Figure 8 FIG. 1 is a flow chart of a method for offloading computing tasks provided by another embodiment of the present disclosure;
[0032] Fig. 9 FIG. 1 is a flow chart of a method for offloading computing tasks provided by another embodiment of the present disclosure;
[0033] Fig.10 is a block diagram of a computing task offloading device according to an exemplary embodiment;
[0034] Fig.11 is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0036] The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0037] The accompanying drawings are only schematic diagrams of the present disclosure, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some block diagrams shown in the accompanying drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in at least one hardware module or integrated circuit, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0038] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and steps, nor must they be executed in the order described. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0039] In addition, in the description of the present disclosure, the terms "a", "an", "the", "said" and "at least one" are used to indicate the presence of at least one element or component; the terms "comprising", "including" and "having" are used to express an open-ended inclusion and mean that additional elements or components may exist in addition to the listed elements or components; the terms "first", "second" and "third" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0040] Edge computing technologies such as computation offloading provide the possibility of reducing the total delay in executing all computing tasks by reasonably allocating computing tasks to edge computing nodes and local computing nodes for separate calculations. However, current computation offloading scheduling methods usually only consider computation delays without considering transmission delays. For terminal application scenarios with extremely high real-time requirements such as VR headsets, the increased amount of data to be transmitted due to advance computation processing will lead to larger transmission delays, resulting in poor user immersion and other experiences.
[0041] In order to solve the above technical problems, the computing task unloading method provided in the embodiment of the present disclosure proposes an improved unloading scheduling scheme. The computing task unloading method mentioned in the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0042] Figure 1 FIG. 1 is a flow chart of a method for offloading computing tasks provided by an embodiment of the present disclosure. Figure 1 As shown, the computing task unloading method provided by the embodiment of the present disclosure is applied to a base station system and may include the following steps.
[0043] In step S102, first terminal information is obtained.
[0044] The first terminal information may include: computing task arrival information of the first terminal and first queue status information. The first terminal is a user terminal, and may further include a receiver and a local computing unit. The receiver may be, for example, a wireless communication unit of a smart terminal device such as a smart phone, a tablet computer, a VR headset, etc., and the local computing unit may be, for example, a logical operation unit with computing capabilities such as a chip in the smart terminal device.
[0045] In some embodiments, the computing task arrival information may include: the timestamp of the task arriving at the base station system, the data volume of the computing task, the average arrival rate λ of the computing task, etc. The first queue status information may further include: the first queue length of the first terminal (i.e., the queue length in the local computing unit, indicating the amount of data to be processed) n, the maximum service rate of the local computing unit The probability that the local computing unit service rate is k is ξ k (i.e., the service rate probability distribution of the local computing unit) and other information.
[0046] The function of the base station system to obtain the first terminal information can be triggered periodically, that is, the function is triggered at regular time intervals, or it can be triggered by an event, such as when a historical computing task is completed or a new computing task arrives.
[0047] In step S104, an offloading scheduling coefficient is determined based on the first terminal information and the queue status information of the base station system.
[0048] In some embodiments, the base station system may further include: a base station and a second terminal. The second terminal may be, for example, an edge computing unit. The queue status information of the base station system may include: second queue status information of the second terminal and third queue status information of the base station. The second queue status information may further include: a second queue length of the second terminal (i.e., a queue length in the edge computing unit, indicating the amount of data to be processed); i, a maximum processing speed of the edge computing unit The probability that the edge computing unit has a processing speed of k is γ k (i.e., the probability distribution of the processing speed of the edge computing unit) and other information. The third queue status information of the base station may further include: the queue length j of the processed data to be sent by the base station, the queue length m of the unprocessed data to be sent by the base station and other information. The function of the base station system to obtain its queue status information may also be triggered periodically, that is, the function is triggered at regular time intervals, or it may be triggered by an event, such as when a historical computing task has been completed or a new computing task has arrived.
[0049] The offloading scheduling coefficient β is a value between 0 and 1, representing the proportion of all computing tasks distributed between the local computing unit of the first terminal and the base station system.
[0050] like Figure 2 As shown, in some embodiments, the base station system determines the unloading scheduling coefficient based on its queue status information and the acquired first terminal information. For example, in a centralized scenario where the base station is bound to the second terminal (edge computing unit), the base station system has computing power, and the base station system can be used as the execution subject to perform the process of determining the unloading scheduling coefficient: based on its queue status information (i, γ k , j, m) and the acquired first terminal information (λ, n, ξ k ), and determine the unloading scheduling coefficient β.
[0051] The function of determining the offloading scheduling coefficient of the base station system can be triggered by an event, such as when the arrival information of the computing task changes or the time-frequency resources and power resource limits of the base station change. Among them, the time-frequency resources of the base station may change under different weather conditions, and the transmission channel needs to be measured and determined. The measurement can be periodic or triggered by weather changes. The power resources of the base station may change in different time periods, such as different power configurations of base stations in peak and trough periods.
[0052] In step S106, according to the offloading scheduling coefficient, the computing task is offloaded to the base station system so that the base station system performs the computing task, or the computing task is offloaded to the first terminal so that the first terminal performs the computing task.
[0053] In some embodiments, the base station and the second terminal form a centralized base station system with computing capabilities, such as Figure 3 As shown, in response to the arrival of a computing task, the base station system can generate a random number α based on a preset distribution function (for example, a [0, 1] uniform distribution function), and compare the above-determined unloading scheduling coefficient β with the random number α: if the random number α is smaller than the unloading scheduling coefficient β, the base station system will unload and execute the computing task by itself, and then send the execution result to the receiver of the first terminal; if the random number α is larger than the unloading scheduling coefficient β, the base station system will unload the computing task to the local computing unit of the first terminal, and the computing task will be executed by the first terminal, and the execution result can be directly read by the user end.
[0054] The computing task offloading method provided by the embodiment of the present disclosure determines the offloading scheduling coefficient by comprehensively considering the computing delay determined by the computing power of each end and the transmission delay caused by transmitting the computing results between the ends, and allocates the computing tasks to the corresponding ends for execution accordingly, thereby minimizing the total end-to-end delay and improving the user experience.
[0055] Figure 4 Shown is a flow chart of a method for offloading computing tasks provided in another embodiment of the present disclosure.
[0056] like Figure 4 As shown, in the embodiment of the present disclosure, Figure 1 Step S102 in the embodiment may further include the following steps.
[0057] Step S402: The base station sends the first terminal information and the third queue state information to the second terminal.
[0058] Based on the above, in some embodiments, the base station system may further include: a base station without computing capability and a second terminal (edge computing unit) with computing capability. Figure 5 As shown, in a distributed scenario where the base station is separated from the second terminal, the base station needs to send its third queue status information and the acquired first terminal information to the second terminal, and the second terminal acts as the execution subject to perform the process of determining the unloading scheduling coefficient.
[0059] Step S404: The second terminal determines an unloading scheduling coefficient based on the first terminal information, the second queue status information, and the third queue status information.
[0060] The second terminal, as the execution subject of determining the offloading scheduling coefficient, can determine the offloading scheduling coefficient based on the second queue status information (i, γ k ) and the acquired first terminal information (λ, n, ξ k ), the third queue status information (j, m), and determine the unloading scheduling coefficient β.
[0061] Figure 6 Shown is a flowchart of a method for offloading computing tasks provided in yet another embodiment of the present disclosure.
[0062] like Figure 6 As shown, in the embodiment of the present disclosure, Figure 1 Step S106 in the illustrated embodiment may further include the following steps.
[0063] Step S602: The base station compares the offloading scheduling coefficient with the random number.
[0064] In the embodiment of the present disclosure, in a distributed scenario where the base station and the second terminal are separated, the second terminal determines the offloading scheduling coefficient β. Figure 7 As shown, the second terminal uploads the unloading scheduling coefficient β to the base station. In response to the arrival of the computing task, the base station can generate a random number α based on a preset distribution function (eg, a [0, 1] uniform distribution function) and compare the unloading scheduling coefficient β with the random number α.
[0065] Step S604, in response to the unloading scheduling coefficient being less than the random number, the base station unloads the computing task to the first terminal so that the first terminal performs the computing task, or, in response to the unloading scheduling coefficient being greater than the random number, the base station unloads the computing task to the second terminal so that the second terminal performs the computing task.
[0066] like Figure 7 As shown, if the random number α is less than the offloading scheduling coefficient β, the base station offloads the computing task to the second terminal, and the second terminal performs the computing task. The second terminal completes the computing task and obtains the execution result, and uploads the execution result to the base station. The base station obtains the execution result and then sends it to the receiver of the first terminal; if the random number α is greater than the offloading scheduling coefficient β, the base station offloads the computing task to the local computing unit of the first terminal, and the first terminal performs the computing task. The execution result can be directly read by the user end.
[0067] Figure 8 Shown is a flowchart of a method for offloading computing tasks provided in yet another embodiment of the present disclosure.
[0068] like Figure 8 As shown, in the embodiment of the present disclosure, Figure 1 Step S104 of the illustrated embodiment may further include the following steps.
[0069] Step S802: construct an average total delay function based on the computing task arrival information and a weighted sum function of the first delay function and the second delay function.
[0070] The first delay function is based on the system state distribution probability π i,j,m,n , first queue status information (n, ξ k ) and the third queue status information (j, m), as shown in the following formula:
[0071]
[0072] The second delay function is based on the system state distribution probability π i,j,m,n , the second queue status information (i, γ k ) and the third queue status information (j, m), as shown in the following formula:
[0073]
[0074] Where Q represents the size of the buffer, and ω represents the proportion of the data volume change after calculation. System state distribution probability π i,j,m,nThe steady-state probability representing the system state (the system is in the state of "the second queue length is i, the queue length of processed data to be sent by the base station is j, the queue length of unprocessed data to be sent by the base station is m, and the first queue length is n") is determined based on the system state transition probability.
[0075] System state transition probability f i′,j′,m′,n′|i,j,m,n Characterizes the probability of the system state transferring from the first state (i, j, m, n) to the second state (i', j', m', n'). The system state corresponds to the first queue length n, the second queue length i and the third queue state information j, m. At least one of the first queue length, the second queue length and the third queue state information corresponding to the first state and the second state is different.
[0076] System state distribution probability π i,j,m,n and the system state transition probability f i′,j′,m′,n′|i,j,m,n The following relationship is established: v = 1 (P-E + 1 T 1) -1 . Where 1 represents a full 1 row vector. E represents the identity matrix. P represents the system state transition probability matrix, where the elements are the system state transition probabilities f i′,j′,m′,n′|i,j,m,n The rth element in the vector v is the system state distribution probability π i,j,m,n , and r and (i, j, m, n) satisfy: r = iQ 3 +jQ 2 +mQ+n. T means the transpose of the vector, and -1 means the inverse of the matrix.
[0077] In some embodiments, the transition probability of each system state can be solved by a traversal algorithm. Specifically, a three-layer nested traversal algorithm can be used: the outermost traversal object is the flag of whether the calculation offloading is required. The traversal range is 0 and 1; the object of the middle layer traversal is the arrival rate a of the calculation task, and the traversal range is 0 to the maximum arrival rate A of the calculation task; the objects of the innermost layer traversal are the first queue length n, the second queue length i and the third queue status information j, m, and the traversal range of i, j, m, and n is 0 to Q-1. Among them, the innermost layer traversal can further adopt a three-layer nested traversal algorithm: the object of the outermost layer traversal is the second queue length i, and the assignment equation is where s m The traversal range is from 0 to the maximum processing speed of the edge computing unit min means taking the minimum value; the objects traversed by the middle layer are the third queue status information j and m, and the assignment equations are j′←min{(jc) + +ωmin(i,s m )}、m′←(m-(cj)+ ) + +(1-k)a, where the traversal range of c is from 0 to the air interface transmission capacity C of the base station; the innermost traversal object is the length of the first queue n, and the assignment equation is where s u The traversal range is from 0 to the maximum service rate of the local computing unit Thus, the system state transition probability can be traversed Among them, p a represents the probability of reaching a computing task, q c represents the probability that the base station can transmit c data packets, Indicates that the edge computing unit has completed s m The probability of a computational task, Indicates that the local computing unit has completed s u The probability of a computational task.
[0078] Based on the above, the base station system can construct an average total delay function based on the calculation task arrival information λ and the weighted sum function of the first delay function and the second delay function, as shown in the following formula:
[0079]
[0080] The sum of the first weight of the first delay function and the second weight of the second delay function is always equal to 1. Indicates the average end-to-end total delay of the user.
[0081] Step S804: determine the second weight that minimizes the function value of the average total delay function as the unloading scheduling coefficient.
[0082] The base station system searches for the average total delay function The combination of the first weight 1-β and the second weight β that minimizes the function value of , that is, β can be determined as the unloading scheduling coefficient.
[0083] The computing task unloading method provided by the embodiment of the present disclosure can obtain the unloading scheduling coefficient that minimizes the end-to-end total delay by constructing an end-to-end total delay function covering the computing delay and the transmission delay and solving the function optimization problem.
[0084] Fig. 9 Shown is a flowchart of a method for offloading computing tasks provided in yet another embodiment of the present disclosure.
[0085] like Fig. 9 As shown, in the embodiment of the present disclosure, Figure 8 Step S804 in the embodiment may further include the following steps.
[0086] Step S902, in response to the function value of the first initial average total delay function being greater than the function value of the second initial average total delay function, the first preset value is updated to the first initial weight, or, in response to the function value of the first initial average total delay function being not greater than the function value of the second initial average total delay function, the second preset value is updated to the second initial weight.
[0087] Among them, the first initial average total delay function corresponds to the first initial system state distribution probability. The first initial system state distribution probability is determined based on the first initial system state transition probability. The second initial average total delay function corresponds to the second initial system state distribution probability. The second initial system state distribution probability is determined based on the second initial system state transition probability. The method for determining the initial system state distribution probability based on the initial system state transition probability and constructing the initial average total delay function based on the initial system state distribution probability can refer to the corresponding implementation method in the above step S260.
[0088] The first initial system state transition probability is based on the first initial weight The second initial system state transition probability is based on the second initial weight The method for determining the initial system state transition probability based on the initial weights may refer to the traversal algorithm implementation in the above step S260.
[0089] First initial weight and the second initial weight In response to the difference between the second preset value β1 and the first preset value β0 being greater than the preset threshold Δβ, the first initial weight is determined according to the first preset value β0 and the second preset value β1. The assignment equation is Second initial weight The assignment equation is
[0090] For example, the first preset value β0 can be initialized to 0, and the second preset value β1 can be initialized to 1. If the difference between the second preset value β1 and the first preset value β0 is greater than the preset threshold Δβ, then according to the three-part method, the first initial weight is obtained. and the second initial weight Thus, the first initial system state transition probability and the second initial system state transition probability are obtained respectively, and then the first initial system state distribution probability and the second initial system state distribution probability are obtained respectively, and finally the first initial average total delay function and the second initial average total delay function are obtained respectively. If the function value of the first initial average total delay function is greater than the function value of the second initial average total delay function, the first preset value β0 is updated to the first initial weight Otherwise, the second preset value β1 is updated to the second initial weight
[0091] Step S904: in response to the difference between the updated second preset value and the updated first preset value being not greater than the preset threshold, determining the updated second preset value as the unloading scheduling coefficient.
[0092] With the first initial weight Update the first preset value β0 as one update, or use the second initial weight Updating the second preset value β1 is recorded as an update. After several updates, if the difference between the currently updated second preset value β1 and the updated first preset value β1 is not greater than the preset threshold Δβ, it indicates that the function value of the currently updated second initial average total delay function has converged to the minimum value, and the update is stopped. The currently updated second preset value β1 is determined as the unloading scheduling coefficient.
[0093] It should also be understood that the above is only to help those skilled in the art better understand the embodiments of the present disclosure, and is not intended to limit the scope of the embodiments of the present disclosure. Based on the above examples given, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in the above method may not be necessary, or some new steps may be added. Or a combination of any two or any multiple embodiments of the above. Such modifications, changes or combined solutions also fall within the scope of the embodiments of the present disclosure.
[0094] It should also be understood that the above description of the embodiments of the present disclosure focuses on emphasizing the differences between the various embodiments, and the same or similar points that are not mentioned can be referenced to each other. For the sake of brevity, they will not be repeated here.
[0095] It should also be understood that the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present disclosure.
[0096] It should also be understood that in the various embodiments of the present disclosure, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0097] The above text describes in detail the method examples provided by the present disclosure. It is understandable that, in order to implement the above functions, the computer device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0098] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0099] Fig.10 The invention is a block diagram showing a computing task offloading device according to an exemplary embodiment.
[0100] like Fig.10 As shown, the offloading 1000 of the computing task may include: an acquisition module 1002 , a determination module 1004 and an offloading module 1006 .
[0101] Among them, the acquisition module 1002 is used to obtain the first terminal information, wherein the first terminal information includes: the computing task arrival information and the first queue status information of the first terminal; the determination module 1004 is used to determine the unloading scheduling coefficient based on the first terminal information and the queue status information of the base station system; the unloading module 1006 is used to unload the computing task to the base station system according to the unloading scheduling coefficient so that the base station system performs the computing task, or unload the computing task to the first terminal so that the first terminal performs the computing task.
[0102] In some exemplary embodiments of the present disclosure, the base station system includes: a base station and a second terminal, and the queue state information of the base station system includes: second queue state information of the second terminal and third queue state information of the base station.
[0103] In some exemplary embodiments of the present disclosure, the first queue status information includes a first queue length of the first terminal, and the second queue status information includes a second queue length of the second terminal; the determination module is used to: construct an average total delay function based on the computing task arrival information and a weighted sum function of the first delay function and the second delay function, wherein the first delay function is constructed based on the system state distribution probability, the first queue status information and the third queue status information, the second delay function is constructed based on the system state distribution probability, the second queue status information and the third queue status information, and the sum of the first weight of the first delay function and the second weight of the second delay function is 1; the second weight that minimizes the function value of the average total delay function is determined as the unloading scheduling coefficient.
[0104] Among them, the system state distribution probability is determined based on the system state transition probability, the system state transition probability represents the probability of the system state transferring from a first state to a second state, the system state corresponds to the first queue length, the second queue length and the third queue state information, and at least one of the first queue length, the second queue length and the third queue state information corresponding to the first state and the second state respectively is different.
[0105] In some exemplary embodiments of the present disclosure, a determination module is used to: in response to a function value of a first initial average total delay function being greater than a function value of a second initial average total delay function, update a first preset value to a first initial weight; or, in response to a function value of the first initial average total delay function being not greater than a function value of the second initial average total delay function, update a second preset value to a second initial weight, wherein the first initial average total delay function corresponds to the first initial weight, the second initial average total delay function corresponds to the second initial weight rate, the second initial system state transition probability is determined based on the second initial weight, and the first initial weight and the second initial weight are determined according to the first preset value and the second preset value in response to a difference between the second preset value and the first preset value being greater than a preset threshold; in response to a difference between the updated second preset value and the updated first preset value being not greater than the preset threshold, determine the updated second preset value as the unloading scheduling coefficient.
[0106] In some exemplary embodiments of the present disclosure, the determination module is used for: the base station sends the first terminal information and the third queue status information to the second terminal; the second terminal determines the unloading scheduling coefficient based on the first terminal information, the second queue status information and the third queue status information.
[0107] In some exemplary embodiments of the present disclosure, the unloading module is used for: the base station compares the unloading scheduling coefficient with a random number, wherein the random number is generated by the base station based on a preset distribution function in response to the arrival of the computing task; in response to the unloading scheduling coefficient being smaller than the random number, the base station unloads the computing task to the first terminal so that the first terminal performs the computing task, or, in response to the unloading scheduling coefficient being greater than the random number, the base station unloads the computing task to the second terminal so that the second terminal performs the computing task.
[0108] In some exemplary embodiments of the present disclosure, the acquisition module is further used for: the base station acquires an execution result of the computing task by the second terminal, and sends the execution result to the first terminal.
[0109] It should be noted that the block diagrams shown in the above figures are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor terminal devices and / or microcontroller terminal devices.
[0110] Fig.11 is a schematic diagram of a structure of an electronic device according to an exemplary embodiment. It should be noted that: Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0111] like Fig.11 As shown, the electronic device 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0112] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present disclosure are executed.
[0114] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, terminal device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, a terminal device or a device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, a terminal device or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0115] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor includes a sending unit, an acquisition unit, a determination unit, and a first processing unit. Among them, the names of these units do not constitute a limitation on the units themselves in certain cases, for example, the sending unit may also be described as "a unit that sends a picture acquisition request to the connected server."
[0117] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments. For example, the electronic device may implement the following Figure 1 The steps shown.
[0118] According to one aspect of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned embodiments.
[0119] It should be understood that any number of elements in the drawings of the present disclosure is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0120] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0121] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for offloading a computing task, characterized in that: Applied to a base station system, the method comprises: Acquire first terminal information, wherein the first terminal information includes: computing task arrival information and first queue status information of the first terminal; Determining an offloading scheduling coefficient based on the first terminal information and the queue state information of the base station system; According to the offloading scheduling coefficient, the computing task is offloaded to the base station system so that the base station system performs the computing task, or the computing task is offloaded to the first terminal so that the first terminal performs the computing task.
2. The method according to claim 1, characterized in that The base station system comprises: a base station and a second terminal, and the queue state information of the base station system comprises: second queue state information of the second terminal and third queue state information of the base station.
3. The method according to claim 2, characterized in that Determining an offloading scheduling coefficient based on the first terminal information and the queue state information of the base station system includes: Determine a system state distribution probability, wherein the system state distribution probability represents a probability corresponding to each distribution state of the data processing amount in the system being in a plurality of distribution states; Based on the system state distribution probability, the computing task arrival information, the first queue state information, the second queue state information and the third queue state information, construct a data transmission delay function, a first delay function for characterizing the computing delay of the first terminal, and a second delay function for characterizing the computing delay of the second terminal; Taking a scheduling coefficient as a variable, constructing an average total delay function based on the scheduling coefficient, the data transmission delay function, the first delay function and the second delay function; Taking minimizing the average total delay function as an optimization goal, the average total delay function is optimized and solved to obtain a solution value of the scheduling coefficient, and the solution value is determined as the unloading scheduling coefficient.
4. The method according to claim 3, characterized in that: The optimizing and solving the average total delay function to obtain the solution value of the scheduling coefficient comprises: optimizing and solving the average total delay function based on the three-part method to obtain the solution value of the scheduling coefficient, and determining the solution value as the unloading scheduling coefficient; which comprises: Divide the variable value range of the scheduling coefficient into three equal parts to obtain the first coefficient and the second coefficient corresponding to the equal division points; Determine a first function value corresponding to the average total delay function when the scheduling coefficient is a first coefficient, and determine a second function value corresponding to the average total delay function when the scheduling coefficient is a second coefficient; updating the variable value range of the scheduling coefficient according to the magnitude relationship between the first function value and the second function value, and dividing the updated variable value range of the scheduling coefficient into three equal parts to obtain the updated first coefficient and the updated second coefficient corresponding to the updated equal division points; In response to a difference between the updated first coefficient and the updated second coefficient being greater than a preset threshold, continuing to update the variable value range of the scheduling coefficient; In response to a difference between the updated first coefficient and the updated second coefficient being less than or equal to a preset threshold, the updated first coefficient or the updated second coefficient is determined as a solution value of the scheduling coefficient.
5. The method according to claim 2, characterized in that: The determining the offloading scheduling coefficient based on the first terminal information and the queue state information of the base station system includes: The base station sends the first terminal information and the third queue state information to the second terminal; The second terminal determines the offloading scheduling coefficient based on the first terminal information, the second queue status information and the third queue status information.
6. The method according to claim 2, characterized in that The step of offloading the computing task to the base station system according to the offloading scheduling coefficient so that the base station system performs the computing task, or offloading the computing task to the first terminal so that the first terminal performs the computing task, includes: The base station compares the offloading scheduling coefficient with a random number, wherein the random number is generated by the base station based on a preset distribution function in response to the arrival of the computing task; In response to the offloading scheduling coefficient being less than the random number, the base station offloads the computing task to the first terminal so that the first terminal performs the computing task, or, in response to the offloading scheduling coefficient being greater than the random number, the base station offloads the computing task to the second terminal so that the second terminal performs the computing task.
7. The method according to claim 6, characterized in that The method further comprises: The base station obtains the execution result of the computing task by the second terminal, and sends the execution result to the first terminal.
8. A computing task unloading device, characterized in that: Applied to base station systems, including: An acquisition module, configured to acquire first terminal information, wherein the first terminal information includes: computing task arrival information of the first terminal and first queue status information; A determination module, configured to determine an unloading scheduling coefficient based on the first terminal information and the queue state information of the base station system; An unloading module is used to unload the computing task to the base station system according to the unloading scheduling coefficient so that the base station system performs the computing task, or to unload the computing task to the first terminal so that the first terminal performs the computing task.
9. An electronic device, characterized in that: include: at least one processor; A storage device, used to store at least one program, when the at least one program is executed by the at least one processor, enables the at least one processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
