CN114281426B - Task unloading method and device, electronic equipment and readable storage medium - Google Patents

Task unloading method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114281426B
CN114281426B CN202111574101.6A CN202111574101A CN114281426B CN 114281426 B CN114281426 B CN 114281426B CN 202111574101 A CN202111574101 A CN 202111574101A CN 114281426 B CN114281426 B CN 114281426B
Authority
CN
China
Prior art keywords
task
terminal device
server
terminal equipment
tasks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111574101.6A
Other languages
Chinese (zh)
Other versions
CN114281426A (en
Inventor
师宝康
张伟
刘甫琴
何舜杨
罗和云
叶海霞
刘辕
周镇辉
阳成彦
洪光
杜翠凤
刘汉艳
罗春艳
叶文初
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111574101.6A priority Critical patent/CN114281426B/en
Publication of CN114281426A publication Critical patent/CN114281426A/en
Application granted granted Critical
Publication of CN114281426B publication Critical patent/CN114281426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Warehouses Or Storage Devices (AREA)

Abstract

The application provides a task unloading method, a device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: according to the task quantity to be processed of each terminal device, constructing an energy consumption function and constraint conditions of the terminal device based on variables, wherein the variables comprise: the method comprises the steps of executing task quantity by a terminal device, unloading the task quantity to a server and transmitting time of transmitting the task to the server by the terminal device; solving the minimum sum of the energy consumption of at least one terminal device according to the constraint condition; the constraint is used to constrain: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device; and according to the solving result, determining the task quantity executed by the terminal equipment and the task quantity unloaded to the server, and selecting a corresponding sub-channel for the terminal equipment to unload the task. The energy consumption of the terminal equipment is saved, and the server utilization rate is improved.

Description

Task unloading method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of mobile communications technologies, and in particular, to a task offloading method, a task offloading device, an electronic device, and a readable storage medium.
Background
With the development of mobile communication technology, the mobile terminal can offload tasks to an edge server or a cloud data center for calculation, so that network time delay can be effectively reduced. Because of the problems of different distribution positions of the edge servers, different configuration of the edge servers, uneven arrival of network tasks and the like, the phenomenon of mismatching of the arrival quantity of the tasks and the computing capacity of the edge servers can occur. This situation may lead to unbalanced load on the network nodes, resulting in a phenomenon that the network resource utilization is not high. Therefore, the network load is balanced through the cooperative complementation of the edge server and the cloud, and the network energy efficiency and the load balance of the network nodes can be improved.
In the prior art, the position of each terminal device, the capacity condition of each edge server, the capacity condition of a cloud data center and the task to be executed by each terminal device are obtained through each time slot; further, for tasks to be executed of a certain terminal device, energy consumption, time delay and calculation data quantity which are needed to be consumed by executing and unloading the tasks locally to each edge node server or cloud data center are calculated, and the best execution scheme of the tasks with the highest cost efficiency under the condition of meeting the time delay requirement of the tasks is obtained through comparison, so that the best execution schemes of all the terminal devices are integrated, and the task unloading scheme of the system under the time slot is obtained.
However, in the method, task offloading only concerns the current situations of computing resources and storage resources of the edge server and the cloud data center, and the task offloading policy is formulated, and the energy consumption of the terminal equipment is not considered, so that the energy consumption of the terminal equipment is overlarge, and the utilization rate of the edge server and the cloud data center is low.
Disclosure of Invention
The application provides a task unloading method, a task unloading device, electronic equipment and a readable storage medium, which can save energy consumption of terminal equipment and improve the utilization rate of a server and the utilization rate of network resources.
In a first aspect, the present application provides a task offloading method, configured to offload a task of at least one terminal device to a server; the method comprises the following steps:
according to the task quantity to be processed of each terminal device, constructing an energy consumption function and a constraint condition of the terminal device based on variables, wherein the variables comprise: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server;
according to the constraint condition, solving the minimum value of the sum of the energy consumption of the at least one terminal device; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device;
And determining the task quantity executed by the terminal equipment and the task quantity unloaded to the server in the task to be processed according to the result obtained by solving, and selecting a corresponding sub-channel for the terminal equipment to unload the task.
Optionally, the constraint condition is further used for constraining: a relation between a user priority corresponding to the terminal device and the number of sub-channels for transmitting the task;
correspondingly, selecting a corresponding sub-channel for the terminal equipment to perform task unloading comprises the following steps:
and selecting a corresponding sub-channel for the terminal equipment to carry out task unloading based on the level of the user priority.
Optionally, constructing the energy consumption function of the terminal device based on the variable includes:
constructing the time delay of processing tasks by the server according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment;
constructing the power used by the terminal equipment for executing the task according to the task quantity executed by the terminal equipment, and constructing the running power of the terminal equipment in the time delay and the waiting power of the terminal equipment in the transmission time according to the task quantity unloaded to the server by the terminal equipment;
and constructing an energy consumption function of the terminal equipment by using the running time, the transmission time, the time delay, the waiting power, the used power and the running power of the terminal equipment.
Optionally, the constraint condition specifically includes at least one of the following:
the sum of the transmission time corresponding to the at least one terminal device and the transmission time corresponding to the single terminal device meet the corresponding requirements;
the amount of tasks executed by a single terminal device is smaller than the amount of tasks which can be processed by the single terminal device;
the length of a task queue of a single terminal device in a preset period is matched with the length of a task queue of the terminal device in a previous period;
the task queue length of the server for receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period;
the average processing rate of the task quantity corresponding to the single terminal equipment and unloaded to the server is smaller than or equal to the preset rate;
the total time for the single terminal device to process the task to be processed is less than or equal to the preset time delay.
Optionally, the method further comprises:
constructing the total time for the terminal equipment to process the task to be processed according to the time delay of the processing task of the server and the corresponding transmission time of the terminal equipment;
and constructing the average processing rate of the task amount unloaded to the server according to the data transmission rate and the transmission time corresponding to the terminal equipment and the total time used by the terminal equipment for processing the task to be processed.
Optionally, the task queue length of the single terminal device in the preset period is matched with the task queue length of the terminal device in the previous period, including:
calculating a difference value between the amount of tasks to be processed of a single terminal device in a preset period and the amount of tasks executed by the terminal device in the period, and ensuring that the difference value between the difference value and the amount of tasks unloaded to the server is smaller than or equal to 0;
correspondingly, the task queue length of the server receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period, and the method comprises the following steps:
ensuring that the difference between the amount of tasks offloaded to the server by the at least one terminal device in the last period and the amount of tasks processable by the server is less than or equal to 0.
Optionally, the constraint further includes:
the number of terminal devices with tasks to be offloaded to the server in the at least one terminal device is smaller than or equal to the number of sub-channels which can be allocated to the at least one terminal device.
Optionally, the user priority is determined by the following formula:
Figure BDA0003424188070000031
wherein P is i User priority, R, representing the ith terminal equipment agv (i) An average processing rate T representing the amount of tasks corresponding to the ith terminal equipment and offloaded to the server C (i) Represents the total time taken by the ith terminal equipment to process the task to be processed, R m Representing a preset rate, T m Representing the preset timeDelay vip (i) represents the user class of the ith terminal equipment, and α, β, γ are weight coefficients set based on service requirements, where α+β+γ=1.
Optionally, the transmission time satisfies the following constraint:
Figure BDA0003424188070000032
wherein τ i (T) represents the transmission time of the ith terminal equipment, L represents the number of sub-channels which can be allocated to at least one terminal equipment, and T represents the time corresponding to an arbitrary period.
In a second aspect, the present application further provides a task unloading device, including:
the construction module is used for constructing the energy consumption function and the constraint condition of the terminal equipment based on variables according to the task quantity to be processed of the terminal equipment, wherein the variables comprise: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server;
the solving module is used for solving the minimum value of the sum of the energy consumption of at least one terminal device according to the constraint condition; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device;
And the determining module is used for determining the task quantity executed by the terminal equipment in the task to be processed and the task quantity unloaded to the server according to the result obtained by solving, and selecting a corresponding sub-channel for the terminal equipment to unload the task.
In a third aspect, the present application further provides an electronic device, including: a processor, a memory and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the task offloading method of any one of the first aspects.
In a fourth aspect, the present application also provides a computer-readable storage medium storing computer-executable instructions for implementing the task offloading method of any one of the first aspects when executed by a processor.
In summary, the present application provides a task offloading method, apparatus, electronic device, and readable storage medium, which may further construct an energy consumption function and a constraint condition of a terminal device based on variables according to a task amount to be processed by each terminal device, where the variables include: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server; further, according to the constraint condition, solving the minimum value of the sum of the energy consumption of at least one terminal device; the method comprises the steps of realizing the requirements of different terminal devices on time delay and rate processing when processing tasks, wherein constraint conditions are used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device; further, according to the result obtained by solving, determining the task quantity executed by the terminal equipment in the task to be processed and the task quantity unloaded to the server, and selecting a corresponding sub-channel for the terminal equipment to unload the task. The energy consumption of the task unloading strategy from the terminal equipment to the server is minimized, the energy consumption of the terminal equipment can be greatly reduced, and the utilization rate of the server is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flow chart of a task offloading method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a task unloading device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first device and the second device are merely for distinguishing between different devices, and are not limited in their order of precedence. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In this application, the terms "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
Embodiments of the present application are described below with reference to the accompanying drawings. Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, and a task offloading method provided in the present application may be applied to the application scenario shown in fig. 1. The application scene comprises: base station 1, base station 2, base station 3, terminal equipment 101-terminal equipment 104 in the coverage area of base station 1, terminal equipment 105 and terminal equipment 106 in the coverage area of base station 2, terminal equipment 107-terminal equipment 109 in the coverage area of base station 3, wherein each base station has an edge server which belongs to, and the edge server is responsible for processing network access requests of all terminal equipment under the coverage area of the edge server.
When the amount of received tasks is large, the terminal device 101-104 is not suitable for processing task demands with huge calculation amount and low delay sensitivity, in order to accelerate the task processing rate and save the energy consumption of the terminal device, part of the tasks can be unloaded to the edge server of the base station 1 for processing, but because of the problems of different distribution positions of the edge servers, different configuration of the edge servers, uneven network task arrival and the like, the phenomenon that the arrival amount of the tasks is not matched with the calculation capacity of the edge server may occur, and at the moment, part of the tasks can also be unloaded to the edge servers of the base station 2 or the base station 3 for processing or unloaded to a cloud data center for processing, which is not particularly limited in the application.
It is to be understood that there may be a plurality of terminal devices in each base station coverage area, and in this embodiment of the present application, the number of terminal devices and the number of base stations in each base station coverage area are not specifically limited, and the number of terminal devices and the number of base stations are only illustrated.
Optionally, the base station may be a base station (Base Transceiver Station, BTS) and/or a base station controller in global mobile communications (Global System of Mobile communication, GSM) or code division multiple access (Code Division Multiple Access, CDMA), a base station (NodeB, NB) and/or a radio network controller (Radio Network Controller, RNC) in wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), an evolved base station (Evolutional Node B, eNB or eNodeB) in long term evolution (Long Term Evolution, LTE), a relay station or an access point, or a base station (gNB) in a future 5G network, etc., which is not limited herein.
The terminal device may be a wireless terminal or a wired terminal. A wireless terminal may be a device that provides voice and/or other traffic data connectivity to a user, a handheld device with wireless connectivity, or other processing device connected to a wireless modem. The wireless terminal may communicate with one or more core network devices via a radio access network (Radio Access Network, RAN for short), which may be mobile terminals such as mobile phones (or "cellular" phones) and computers with mobile terminals, for example, portable, pocket, hand-held, computer-built-in or vehicle-mounted mobile devices that exchange voice and/or data with the radio access network. For another example, the wireless terminal may be a personal communication service (Personal Communication Service, abbreviated PCS) phone, a cordless phone, a session initiation protocol (Session Initiation Protocol, abbreviated SIP) phone, a wireless local loop (Wireless Local Loop, abbreviated WLL) station, a personal digital assistant (Personal Digital Assistant, abbreviated PDA) or the like. A wireless Terminal may also be referred to as a system, subscriber Unit (Subscriber Unit), subscriber Station (Subscriber Station), mobile Station (Mobile Station), mobile Station (Mobile), remote Station (Remote Station), remote Terminal (Remote Terminal), access Terminal (Access Terminal), user Terminal (User Terminal), user Agent (User Agent), user equipment (User Device or User Equipment), without limitation. Optionally, the terminal device may also be a device such as a smart watch or a tablet computer.
In the prior art, the position of each terminal device, the capacity condition of each edge server, the capacity condition of a cloud data center and the task to be executed by each terminal device can be obtained through each time slot; further, for tasks to be executed of a certain terminal device, energy consumption, time delay and calculation data quantity which are needed to be consumed by executing and unloading the tasks locally to each edge node server or cloud data center are calculated, and the best execution scheme of the tasks with the highest cost efficiency under the condition of meeting the time delay requirement of the tasks is obtained through comparison, so that the best execution schemes of all the terminal devices are integrated, and the task unloading scheme of the system under the time slot is obtained.
However, in the method, task offloading only concerns the current situations of computing resources and storage resources of the edge server and the cloud data center, and the task offloading policy is formulated, and the energy consumption of the terminal equipment is not considered, so that the energy consumption of the terminal equipment is overlarge, and the utilization rate of the edge server and the cloud data center is low.
Therefore, the method adopts an edge cloud cooperative architecture, integrates the advantages of edge calculation and cloud calculation, meets the requirements of different terminal devices on time delay and rate processing, integrates various factors such as queue stability, service time delay, rate and the like of a network side (namely an edge server and a cloud server) and a user side (namely the terminal device), and provides a task unloading strategy for minimizing the energy consumption of the terminal device.
The technical scheme of the present application is described in detail below with specific examples. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flow chart of a task offloading method according to an embodiment of the present application; the method of the present embodiment is used for offloading tasks of at least one terminal device to a server. As shown in fig. 2, the method of the present embodiment may include:
s201, constructing an energy consumption function and constraint conditions of the terminal equipment based on variables according to the task quantity to be processed of the terminal equipment, wherein the variables comprise: the amount of tasks performed by the terminal device, the amount of tasks offloaded to the server, the transmission time of the transmission tasks between the terminal device and the server.
In the embodiment of the application, the energy consumption function may refer to an index reflecting the energy utilization degree of the terminal device, and the energy consumption function of the terminal device may be constructed by calculating the product of the running time and the running power of the task executed by the terminal device, the product of the transmission time and the transmission power of the task unloaded by the terminal device to the server, the product of the time delay of the processing of the task unloaded by the terminal device received by the server and the running power waited by the terminal device in the time delay, and then calculating the sum of the products of the three.
Constraints may refer to various constraints that limit the range of values of design variables, where each constraint may be written as a function containing the design variable, which is the variable in the objective function used to represent the decision scheme. For example, f i Constraint of (t) 0.ltoreq.f i (t)≤F i (t) wherein f i (t) represents the task execution amount of the ith terminal equipment in a certain time slot, F i (t) represents the amount of tasks that the ith terminal equipment can handle in a certain time slot.
In this step, the transmission time may refer to the total time from the transmission of the task from the terminal device to the complete acceptance of all the tasks by the server, including the transmission time, the store-and-forward time, and the propagation time. The server may be an edge cloud server and/or a cloud server.
For example, in the application scenario of fig. 1, the energy consumption function E of any one terminal device 101 may be constructed based on variables according to the task amount to be processed by each terminal device 1 For example, E 1 =P m ×T 1 (t)+P n ×τ 1 (t)+T j ×P w Wherein P is m Representing the operating power of the terminal device 101 to execute a task, T 1 (t) represents the run time of the execution of the task by the terminal device 101, P n Indicating that the terminal device 101 is off-loaded with transmission power from the task to the server, τ 1 (T) represents a transmission time of the terminal device 101 to offload tasks to the server, T j Representing the delay of the processing of the task offloaded by the receiving terminal device 101 of the server j, P w Representing the running power of the terminal device 101 waiting in the time delay, further, constraint conditions can be constructed by variables such as the amount of tasks executed by the terminal device 101, the amount of tasks offloaded to the server, the transmission time of the transmission tasks between the terminal device 101 and the server, and the like, for constraining the energy consumption function of the terminal device 101.
S202, solving the minimum value of the sum of the energy consumption of the at least one terminal device according to constraint conditions; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device.
In the embodiment of the present application, the time delay may refer to the time required for the task to be processed to be transferred from one end of a network to another end. It includes a transmission delay, a propagation delay, a processing delay, a queuing delay, i.e. delay = transmission delay + propagation delay + processing delay + queuing delay.
In this step, the task queue length may refer to the number of tasks to be processed in a certain period by the terminal device/server, where the period may include one time slot or multiple time slots, which is not specifically limited in this embodiment of the present application.
For example, in the application scenario of fig. 1, taking the terminal device 101-terminal device 104 within the coverage area of the base station 1 as an example, according to the constructed constraint condition, the minimum value of the sum of the energy consumption of the terminal device 101-terminal device 104, i.e., E 1 +E 2 +E 3 +E 4 Is the minimum of (2); wherein the energy consumption function E of the terminal device 101 1 =P m ×T 1 (t)+P n ×τ 1 (t)+T j ×P w Energy consumption function E of terminal 102 2 =P m ×T 2 (t)+P n ×τ 2 (t)+T j ×P w Energy consumption function E of terminal 103 3 =P m ×T 3 (t)+P n ×τ 3 (t)+T j ×P w Energy consumption function E of terminal 104 4 =P m ×T 4 (t)+P n ×τ 4 (t)+T j ×P w The meaning of each letter in the energy consumption function of the terminal device 102-the terminal device 104 is similar to the meaning of each letter in the energy consumption function of the terminal device 101, and will not be described herein.
It will be appreciated that the constraint conditions constructed above may be used to constrain the time delay corresponding to the amount of tasks offloaded to the server j, the average processing rate of the amount of tasks offloaded to the server j, the transmission time corresponding to the task offloaded to the server j by the terminal devices 101 to 104, the task queue length of the server j, the task queue length of the terminal devices 101 to 104, and the like, and further, the minimum value of the sum of the energy consumption of the terminal devices 101 to 104 may be solved.
The server j is not particularly limited, and may be an edge server of the base station 1, an edge server of the base station 2 or the base station 3, or a cloud server.
S203, determining the task quantity executed by the terminal equipment and the task quantity unloaded to the server in the task to be processed according to the result obtained by solving, and selecting a corresponding sub-channel for the terminal equipment to unload the task.
In this step, a channel may be divided into a plurality of sub-channels according to frequency, and each sub-channel transmits a signal, so that a task of a terminal device may be offloaded to a server corresponding to the minimum energy consumption through a sub-channel with good channel quality.
It will be appreciated that the sub-channels with good channel quality may be obtained through a large number of experiments, or may be obtained through information in the system, which is not specifically limited in the embodiments of the present application.
For example, in the application scenario of fig. 1, taking the terminal device 101-terminal device 104 within the coverage area of the base station 1 as an example, according to the minimum value of the sum of the energy consumption of the terminal device 101-terminal device 104, the task amount executed by the terminal device 101-104 and the task amount unloaded to the server j in the task to be processed are determined, and further, after the determination, a corresponding sub-channel with good quality may be selected for the terminal device 101-104 to perform task unloading.
Therefore, the task unloading method provided by the application can meet the rapidly-increased requirement of the terminal equipment on data processing, minimize the energy consumption of task unloading of the terminal equipment, greatly reduce the energy consumption of the terminal equipment and improve the utilization rate of the server.
It should be noted that the method provided in the embodiments of the present application may be applied to a Bian Yun collaborative architecture system, where the Bian Yun collaborative architecture system includes at least one terminal device, an edge server and/or a cloud server, where the server j may refer to any one edge server and/or cloud server.
Optionally, the constraint condition is further used for constraining: a relation between a user priority corresponding to the terminal device and the number of sub-channels for transmitting the task;
correspondingly, selecting a corresponding sub-channel for the terminal equipment to perform task unloading comprises the following steps:
and selecting a corresponding sub-channel for the terminal equipment to carry out task unloading based on the level of the user priority.
Exemplary, on the basis of the embodiment shown in fig. 2, terminal equipment 101-104 in the coverage area of base station 1 are taken as examples, andto construct user-related priority constraints of the terminal devices 101-104 based on variables, e.g. Rank (P i ) L is less than or equal to L, wherein P i Indicating the user priority, i=1, 2,3,4, l represents the number of sub-channels that can be allocated to the terminal device 101-104, rank indicates that the user priority is ordered according to the numerical value, further, the user priority corresponding to the terminal device 101-104 is ordered, the number of the user priority corresponding to the terminal device 101-104 should be smaller than the number of sub-channels that can be allocated to the terminal device 101-104, further, after determining the number of tasks executed by the terminal device 101-104 and the number of tasks offloaded to the corresponding server, the corresponding sub-channel can be selected for the terminal device 101-104 to perform task offloading based on the level of the user priority.
Therefore, when the task unloading strategy is considered, the factor of user priority is also considered, so that the terminal equipment corresponding to the user with high user priority accesses the sub-channel with good channel quality to perform task unloading, the transmission requirement of user service is ensured, and the high-level experience is improved to a great extent.
Optionally, constructing the energy consumption function of the terminal device based on the variable includes:
constructing the time delay of processing tasks by the server according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment;
Constructing the power used by the terminal equipment for executing the task according to the task quantity executed by the terminal equipment, and constructing the running power of the terminal equipment in the time delay and the waiting power of the terminal equipment in the transmission time according to the task quantity unloaded to the server by the terminal equipment;
and constructing an energy consumption function of the terminal equipment by using the running time, the transmission time, the time delay, the waiting power, the used power and the running power of the terminal equipment.
In this step, the energy consumption function of constructing the terminal device based on the variables can be expressed as the following function:
E i =P m ×T i (t)+P n ×τ i (t)+T j ×P w
wherein E is i Representing the energy consumption function of the ith terminal equipment, P m Representing the power used by the ith terminal equipment to perform tasks, T i (t) represents the execution time of the task of the ith terminal equipment, P n Representing the waiting power, τ, of the ith terminal equipment during the transmission time i (T) represents the corresponding transmission time of the ith terminal equipment, T j Representing the time delay of processing tasks by the server j, P w Indicating the operating power of the i-th terminal device within the delay.
Specifically, the time delay of the server processing task is constructed according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment, and the formula is as follows:
Figure BDA0003424188070000111
Wherein c i (T) represents the data transmission rate corresponding to the ith terminal equipment, T j Representing the time delay of the j-th server processing task, F j (t) represents the number of tasks that the j-th server can handle, i.e. the amount of tasks that i terminal devices offload to server j.
For example, in the application scenario of fig. 1, taking the terminal device 105 and the terminal device 106 within the coverage area of the base station 2 as an example, if the data transmission rate corresponding to the terminal device 105 is 10Mbps and the data transmission rate corresponding to the terminal device 106 is 20Mbps; the transmission time corresponding to the terminal device 105 is 0.1s, the transmission time corresponding to the terminal device 106 is 0.2s, the task amount of the terminal device 105 unloaded to the server is 2, and the task amount of the terminal device 106 unloaded to the server is 3, so that the time delay of processing the task by the server can be calculated to be (10×0.1+20×0.2)/(2+3) =1s; further, according to the task amount executed by the terminal device 105, for example, the task amount executed by the terminal device 105 is 10, the execution time is 6s, the power used by the terminal device 105 to execute the task is constructed, and according to the task amount unloaded by the terminal device 105 to the server 2, the power used by the terminal device 105 to execute the task is constructedThe operating power of the terminal device 105 within 1s and the waiting power of the terminal device 105 within 0.1s of the transmission time; further, the energy consumption function of the terminal device 105 is constructed as E 5 =P m ×T 5 (t)+P n ×τ 5 (t)+T j ×P w Wherein T is 5 (t),τ 5 (t),T j The energy consumption functions of the terminal device 106 constructed by using the operation time, the transmission time, the delay, the waiting power, the power used and the operation power of the terminal device 106 are respectively 6s,0.1s and 1s, which are similar to the process of constructing the energy consumption function of the terminal device 105, and are not described herein.
Therefore, the energy consumption function of the terminal equipment can be constructed through the variables, the real-time performance of task unloading is guaranteed, and the task unloading rate and the rationality of task unloading are improved.
Optionally, the constraint condition specifically includes at least one of the following:
the sum of the transmission time corresponding to the at least one terminal device and the transmission time corresponding to the single terminal device meet the corresponding requirements;
the amount of tasks executed by a single terminal device is smaller than the amount of tasks which can be processed by the single terminal device;
the length of a task queue of a single terminal device in a preset period is matched with the length of a task queue of the terminal device in a previous period;
the task queue length of the server for receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period;
the average processing rate of the task quantity corresponding to the single terminal equipment and unloaded to the server is smaller than or equal to the preset rate;
The total time for the single terminal device to process the task to be processed is less than or equal to the preset time delay.
In this embodiment of the present application, the preset period may refer to a period required for calculating the task queue length set by the system, where the preset period may include one time slot or multiple time slots, and this embodiment of the present application is not limited specifically.
The task queue length of the i-th terminal device in the t time slots of the preset period can be expressed as follows:
D i (t)=[D i (t-1)-c i (t-1)τ i (t-1)-f i (t-1)]+A i (t)
wherein D is i (t) represents the task queue length of the ith terminal equipment in t time slots, D i (t-1) represents a task queue length of the ith terminal equipment at t-1 slots (i.e., one slot before t slots); c i (t-1)τ i (t-1) represents the task amount of the i-th terminal device to offload the server at t-1 time slot, c i (t-1) represents a data transmission rate of the ith terminal equipment at t-1 time slot; τ i (t-1) represents a transmission time of a transmission task of the ith terminal equipment between t-1 time slots and the server, f i (t-1) represents the task execution amount of the ith terminal equipment at t-1 time slot; a is that i (t) represents the amount of tasks to be processed by the ith terminal equipment in t time slots, wherein the amount of tasks performed by the ith terminal equipment cannot be processed by the ith terminal equipment, and therefore f i Constraint of (t) 0.ltoreq.f i (t)≤F i (t),f i (t) represents the task execution amount of the ith terminal equipment in t time slots, F i (t) represents the amount of tasks that the ith terminal equipment can handle in t time slots.
It should be noted that, the terminal device may not only obtain the task queue length of the ith terminal device in t time slots in the data, but also obtain the rest of the data terminal devices.
It is assumed that the task queue length of the jth server in the t slots of the preset period can be expressed as:
Figure BDA0003424188070000131
wherein Q is j (t) represents the task queue length of the jth server at t slots; q (Q) j (t-1) represents a task queue length of the jth server at t-1 slots; f (F) j (t-1) represents the processable task amount of the jth server at t-1 time slots; c i (t-1)τ i (t-1) represents the task amount of the i-th terminal device to offload the server at t-1 time slots.
According to queuing theory, that is, in order to make the queue stable, in t time slots, the processing amount needed to be executed by the ith terminal equipment in the next time slot is smaller than the processing amount needed to be executed by the ith terminal equipment in the previous time slot, so that the stability of the queue can be ensured. Therefore, when the task queue length of a single terminal device in a preset period is matched with the task queue length of the terminal device in a previous period, and when the task queue length of a server receiving at least one terminal device for unloading tasks is matched with the task queue length of the server in the previous period, the queues at the terminal device side and the server side can be kept stable, so that the above formula for representing the task queue length of the terminal device and the formula for representing the task queue length of the server can be represented by the following formulas:
Figure BDA0003424188070000132
Wherein mean represents the task amount average value in one period.
In the embodiment of the present application, the sum of transmission times corresponding to at least one terminal device and the transmission time corresponding to a single terminal device all meet corresponding requirements, where the requirements may be that any one terminal device i can only access one subchannel at the same time, and in a preset period, the sum of transmission times corresponding to the terminal device i cannot exceed a total period, that is, a product of the time corresponding to the preset period and the number of subchannels that can be allocated to i terminal devices.
In this embodiment of the present application, the average processing rate of the task amount corresponding to the single terminal device and unloaded to the server is less than or equal to the preset rate, and the corresponding formula may be expressed as follows:
R agv (i)≤R m
wherein R is agv (i) Indicating corresponding offloading of the ith terminal equipmentAverage processing rate of task amount of server, R m Representing a preset rate, which may be the maximum processing rate of the amount of tasks corresponding to the terminal device to be offloaded to the server.
The total time for a single terminal device to process the task to be processed is less than or equal to the preset time delay, and the corresponding formula can be expressed as follows:
T C (i)≤T m
wherein T is C (i) Representing the total time taken by the ith terminal equipment to process the task to be processed, T m Representing a preset time delay, wherein the preset time delay can be the maximum time delay corresponding to the terminal equipment.
Therefore, the minimum value of the sum of the energy consumption of at least one terminal device can be solved through the constraint conditions, a task unloading method corresponding to the minimum energy consumption of the terminal device can be found, and the data processing rate is improved.
Optionally, the method further comprises:
constructing the total time for the terminal equipment to process the task to be processed according to the time delay of the processing task of the server and the corresponding transmission time of the terminal equipment;
and constructing the average processing rate of the task amount unloaded to the server according to the data transmission rate and the transmission time corresponding to the terminal equipment and the total time used by the terminal equipment for processing the task to be processed.
Specifically, the total time for the terminal device to process the task to be processed can be constructed by the following formula:
T C (i)=T j +2τ i (t)
wherein T is C (i) Representing the total time taken by the ith terminal equipment to process the task to be processed, T j Representing the delay of processing tasks by server j, τ i And (t) represents the transmission time of the ith terminal equipment.
The average processing rate of the amount of tasks offloaded to the server by the i-th terminal device may be constructed by the following formula:
Figure BDA0003424188070000141
Wherein R is agv (i) An average processing rate T representing the amount of tasks corresponding to the ith terminal equipment and offloaded to the server C (i) Representing the total time taken by the ith terminal equipment to complete the task to be processed, c i (t) represents the data transmission rate of the ith terminal equipment, τ i And (t) represents the transmission time of the ith terminal equipment.
In this step, the total time taken for the terminal device to process the task to be processed and the average processing rate of the amount of tasks offloaded to the server by the i-th terminal device may be constructed based on the above two formulas.
Therefore, the calculation rate can be improved by using the method, so that the calculation result is more reasonable.
Optionally, the task queue length of the single terminal device in the preset period is matched with the task queue length of the terminal device in the previous period, including:
calculating a difference value between the amount of tasks to be processed of a single terminal device in a preset period and the amount of tasks executed by the terminal device in the period, and ensuring that the difference value between the difference value and the amount of tasks unloaded to the server is smaller than or equal to 0;
correspondingly, the task queue length of the server receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period, and the method comprises the following steps:
Ensuring that the difference between the amount of tasks offloaded to the server by the at least one terminal device in the last period and the amount of tasks processable by the server is less than or equal to 0.
For example, in the application scenario of fig. 1, taking the terminal device 105 and the terminal device 106 within the coverage area of the base station 2 as an example, if the data transmission rate corresponding to the terminal device 105 in a certain time slot 0.5s is 10Mbps, the data transmission rate corresponding to the terminal device 105 in the last time slot 0.5s is 10Mbps; the data transmission rate corresponding to the terminal device 106 in the last time slot 0.5s is 15Mbps; the terminal equipment 105 pairs within a certain time slot of 0.5sThe corresponding transmission time is 0.1s, the corresponding transmission time of the terminal device 105 in the last time slot 0.5s is 0.2s, the corresponding transmission time of the terminal device 106 in the last time slot 0.5s is 0.2s, the task amount to be processed of the terminal device 105 in the certain time slot 0.5s is 3, the task execution amount of the terminal device 105 in the certain time slot 0.5s is 2, the task amount of the terminal device 105 to be unloaded to the server in the last time slot 0.5s is 10, the task amount of the terminal device 106 to be unloaded to the server in the last time slot 0.5s is 10, further, the difference between the task amount to be processed of the terminal device 105 in the certain time slot 0.5s and the task amount to be executed of the terminal device 105 in the certain time slot 0.5s is 3-2=1, further, the difference between the difference 1 and the task amount to be unloaded to the server is (1-10×0.1)/0.5=0, i.e., mean (a i (t)-c i (t)τ i (t)-f i (t))=mean (0). Ltoreq.0, satisfying the constraint condition that the task queue length of the terminal device 105 in a certain time slot of 0.5s matches the task queue length of the terminal device 105 in the last time slot of 0.5 s.
Further, the task amount offloaded to the server in the last time slot 0.5s by the computing terminal device 105 and the terminal device 106 is 10×0.2+15×0.2=5, and further, the computing [5- (10+10)]0.5 = -30, i.e
Figure BDA0003424188070000151
The condition that the task queue length of the server j receiving the off-load tasks of the terminal devices 105 and 106 matches the task queue length of the server j within 0.5s of the last slot is satisfied.
Therefore, the method provided by the embodiment of the application can ensure the stability of the terminal equipment and the server queue, and can ensure that the task can be stably processed and executed while balancing the network load.
Optionally, the constraint further includes:
the number of terminal devices with tasks to be offloaded to the server in the at least one terminal device is smaller than or equal to the number of sub-channels which can be allocated to the at least one terminal device.
By way of example, if the number of sub-channels that can be allocated to at least one terminal device is set to 10, the number of terminal devices that have tasks to be offloaded to the server must satisfy the condition of less than or equal to 10, and if the number of terminal devices that are offloaded to the server is greater than 10, the first 10 tasks that have priorities corresponding to the terminal devices can be preferentially processed based on the user priorities.
Therefore, the method and the device can preferentially serve the user with high priority based on the condition that the ranking of the user priority is smaller than or equal to the number of the sub-channels which can be allocated to at least one terminal device, and improve the user experience.
Optionally, the user priority is determined by the following formula:
Figure BDA0003424188070000161
wherein P is i User priority, R, representing the ith terminal equipment agv (i) An average processing rate T representing the amount of tasks corresponding to the ith terminal equipment and offloaded to the server C (i) Represents the total time taken by the ith terminal equipment to process the task to be processed, R m Representing a preset rate, T m Representing a preset time delay, vip (i) represents a user level of an ith terminal device, and alpha, beta and gamma are weight coefficients set based on service requirements, wherein alpha+beta+gamma=1.
In the application scenario of fig. 1, taking terminal equipment 107-terminal equipment 109 within the coverage area of base station 3 as an example, R corresponds to terminal equipment 107 agv (7)=0.5Mbps,T C (7)=1s,R m =2Mbps,T m =5s, vip (7) =2, α=0.1, β=0.2, γ=0.7, then P is calculated using the above formula 7 =1.465; r corresponding to terminal equipment 108 agv (8)=1.5Mbps,T C (8)=1.5s,R m =2Mbps,T m =5s, vip (8) =1, α=0.1, β=0.2, γ=0.7, then P is calculated using the above formula 8 =0.835; r corresponding to terminal equipment 109 agv (9)=1Mbps,T C (9)=2s,R m =2Mbps,T m =5s,vip(9) When =3, α=0.1, β=0.2, γ=0.7, P is calculated using the above formula 9 =2.23; further, P can also be 7 、P 8 、P 9 The priority is ordered according to the magnitude of the numerical value, and the corresponding sub-channels are selected for the terminal devices 107-109 to perform task unloading based on the magnitude of the user priority, which is not described herein in detail in the embodiment of the present application.
It should be noted that, the weight coefficients of α, β, γ may be manually set, or may be determined according to the actual situation in the service requirement, which is not specifically limited in this application.
Therefore, the user priority is calculated by the above formula, and the calculation rate is greatly improved in consideration of the user level.
Optionally, the transmission time satisfies the following constraint:
Figure BDA0003424188070000171
wherein τ i (T) represents the transmission time of the ith terminal equipment, L represents the number of sub-channels which can be allocated to at least one terminal equipment, and T represents the time corresponding to an arbitrary period.
For example, in the application scenario of fig. 1, taking terminal device 107-terminal device 109 within coverage of base station 3 as an example, l=10, t=3 s is set, and τ corresponding to terminal device 107 7 (t) =2s, τ corresponding to the terminal device 108 8 (t) =3s, τ corresponding to the terminal device 109 9 (t) =1s, it can be known that the transmission times corresponding to the terminal devices 107 and 109 satisfy the constraint condition, τ 7 (t)+τ 8 (t)+τ 9 (t) =3+2+1=6s.ltoreq.3.10 also satisfies the constraint.
Therefore, the transmission time of the terminal equipment is restrained by utilizing the restraint condition, so that the allocation mechanism can be optimized, the transmission time meets the service requirement of the user, and the user satisfaction is improved.
It should be noted that, the specific values appearing in the foregoing embodiments are all illustrated by way of example, and the present application is not limited to the specific values appearing in the foregoing embodiments, as the specific values should be determined according to practical situations.
In connection with the above embodiment, the task offloading method proposed in the present application may be expressed by the following formula:
Figure BDA0003424188070000172
/>
s.t.1
Figure BDA0003424188070000173
s.t.2
Figure BDA0003424188070000174
as can be seen from the above formula, the objective function is to minimize the energy consumption of all the terminal devices in the base station area, and constraint condition 1 represents the transmission time constraint and queue constraint of the terminal devices and the base station offloading; the first two formulas of constraint condition 2 show that the rate requirement and the time delay requirement based on the service are smaller than the maximum rate requirement and the maximum time delay requirement of an operator on the service; constraint 2 a third formula represents the number of subchannels that can be allocated to at least one terminal device in a ranking based on user priority of less than a preset period t.
Based on the result, the terminal equipment corresponding to the user with high priority is accessed to the sub-channel with good channel quality, so that the user experience with high VIP grade is considered, and the transmission requirement of the user service is ensured.
In the foregoing embodiments, the task offloading method provided in the embodiments of the present application is described, and in order to implement each function in the method provided in the embodiments of the present application, an electronic device as an execution body may include a hardware structure and/or a software module, and each function may be implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the functions described above are performed in a hardware configuration, a software module, or a combination of hardware and software modules, depending on the specific application of the solution and design constraints.
For example, fig. 3 is a schematic structural diagram of a task unloading device according to an embodiment of the present application, and as shown in fig. 3, the device includes: the system comprises a construction module 310, a solving module 320 and a determining module 330, wherein the construction module 310 is configured to construct an energy consumption function and a constraint condition of each terminal device based on variables according to the task amount to be processed of the terminal device, and the variables include: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server;
A solving module 320, configured to solve, according to the constraint condition, a minimum value of a sum of energy consumption of at least one terminal device; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device;
and the determining module 330 is configured to determine, according to the result obtained by the solution, an amount of tasks executed by the terminal device and an amount of tasks offloaded to the server in the tasks to be processed, and select a corresponding sub-channel for the terminal device to perform task offloading.
Optionally, the constraint condition is further used for constraining: a relation between a user priority corresponding to the terminal device and the number of sub-channels for transmitting the task;
correspondingly, selecting a corresponding sub-channel for the terminal equipment to perform task unloading comprises the following steps:
and selecting a corresponding sub-channel for the terminal equipment to carry out task unloading based on the level of the user priority.
Optionally, the construction module 320 is specifically configured to:
constructing the time delay of processing tasks by the server according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment;
Constructing the power used by the terminal equipment for executing the task according to the task quantity executed by the terminal equipment, and constructing the running power of the terminal equipment in the time delay and the waiting power of the terminal equipment in the transmission time according to the task quantity unloaded to the server by the terminal equipment;
and constructing an energy consumption function of the terminal equipment by using the running time, the transmission time, the time delay, the waiting power, the used power and the running power of the terminal equipment.
Optionally, the constraint condition specifically includes at least one of the following:
the sum of the transmission time corresponding to the at least one terminal device and the transmission time corresponding to the single terminal device meet the corresponding requirements;
the amount of tasks executed by a single terminal device is smaller than the amount of tasks which can be processed by the single terminal device;
the length of a task queue of a single terminal device in a preset period is matched with the length of a task queue of the terminal device in a previous period;
the task queue length of the server for receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period;
the average processing rate of the task quantity corresponding to the single terminal equipment and unloaded to the server is smaller than or equal to the preset rate;
The total time for the single terminal device to process the task to be processed is less than or equal to the preset time delay.
Optionally, the construction module 310 is further configured to:
constructing the total time for the terminal equipment to process the task to be processed according to the time delay of the processing task of the server and the corresponding transmission time of the terminal equipment;
and constructing the average processing rate of the task amount unloaded to the server according to the data transmission rate and the transmission time corresponding to the terminal equipment and the total time used by the terminal equipment for processing the task to be processed.
Optionally, the task queue length of the single terminal device in the preset period is matched with the task queue length of the terminal device in the previous period, including:
calculating a difference value between the amount of tasks to be processed of a single terminal device in a preset period and the amount of tasks executed by the terminal device in the period, and ensuring that the difference value between the difference value and the amount of tasks unloaded to the server is smaller than or equal to 0;
correspondingly, the task queue length of the server receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period, and the method comprises the following steps:
ensuring that the difference between the amount of tasks offloaded to the server by the at least one terminal device in the last period and the amount of tasks processable by the server is less than or equal to 0.
Optionally, the constraint further includes:
the number of terminal devices with tasks to be offloaded to the server in the at least one terminal device is smaller than or equal to the number of sub-channels which can be allocated to the at least one terminal device.
Optionally, the user priority is determined by the following formula:
Figure BDA0003424188070000201
wherein P is i User priority, R, representing the ith terminal equipment agv (i) An average processing rate T representing the amount of tasks corresponding to the ith terminal equipment and offloaded to the server C (i) Represents the total time taken by the ith terminal equipment to process the task to be processed, R m Representing a preset rate, T m Representing a preset time delay, vip (i) represents a user level of an ith terminal device, and alpha, beta and gamma are weight coefficients set based on service requirements, wherein alpha+beta+gamma=1.
Optionally, the transmission time satisfies the following constraint:
Figure BDA0003424188070000202
wherein τ i (T) represents the transmission time of the ith terminal equipment, L represents the number of sub-channels which can be allocated to at least one terminal equipment, and T represents the time corresponding to an arbitrary period.
The specific implementation principle and effect of the task unloading device provided in the embodiment of the present application may be referred to the relevant description and effect corresponding to the foregoing embodiment, which are not repeated herein.
The embodiment of the application also provides a schematic structural diagram of an electronic device, and fig. 4 is a schematic structural diagram of an electronic device provided in the embodiment of the application, as shown in fig. 4, the electronic device may include: a processor 402 and a memory 401 communicatively coupled to the processor; the memory 401 stores a computer program; the processor 402 executes the computer program stored in the memory 401, so that the processor 402 performs the method according to any of the above embodiments.
Wherein the memory 401 and the processor 402 may be connected by a bus 403.
Embodiments of the present application also provide a computer-readable storage medium storing computer program execution instructions that, when executed by a processor, are configured to implement a method as described in any of the foregoing embodiments of the present application.
The embodiment of the application also provides a chip for executing instructions, wherein the chip is used for executing the method in any of the previous embodiments executed by the electronic equipment in any of the previous embodiments of the application.
Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, performs a method as described in any of the preceding embodiments of the present application, as performed by an electronic device.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some of the steps of the methods described in various embodiments of the present application.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU for short), other general purpose processors, digital signal processor (Digital Signal Processor, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The Memory may include a high-speed random access Memory (Random Access Memory, abbreviated as RAM), and may further include a Non-volatile Memory (NVM), such as at least one magnetic disk Memory, and may also be a U-disk, a removable hard disk, a read-only Memory, a magnetic disk, or an optical disk.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
The foregoing is merely a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A task offloading method, characterized by being used for offloading tasks of at least one terminal device to a server; the method comprises the following steps:
according to the task quantity to be processed of each terminal device, constructing an energy consumption function and a constraint condition of the terminal device based on variables, wherein the variables comprise: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server;
according to the constraint condition, solving the minimum value of the sum of the energy consumption of the at least one terminal device; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device;
According to the result obtained by solving, determining the task quantity executed by the terminal equipment and the task quantity unloaded to the server in the task to be processed, and selecting a corresponding sub-channel for the terminal equipment to unload the task;
constructing an energy consumption function of the terminal equipment based on the variables, including:
constructing the time delay of processing tasks by the server according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment;
constructing the power used by the terminal equipment for executing the task according to the task quantity executed by the terminal equipment, and constructing the running power of the terminal equipment in the time delay and the waiting power of the terminal equipment in the transmission time according to the task quantity unloaded to the server by the terminal equipment;
constructing an energy consumption function of the terminal equipment by using the running time, the transmission time, the time delay, the waiting power, the used power and the running power of the terminal equipment;
the constraint condition specifically includes at least one of the following:
the sum of the transmission time corresponding to the at least one terminal device and the transmission time corresponding to the single terminal device meet the corresponding requirements;
the amount of tasks executed by a single terminal device is smaller than the amount of tasks which can be processed by the single terminal device;
The length of a task queue of a single terminal device in a preset period is matched with the length of a task queue of the terminal device in a previous period;
the task queue length of the server for receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period;
the average processing rate of the task quantity corresponding to the single terminal equipment and unloaded to the server is smaller than or equal to the preset rate;
the total time for the single terminal device to process the task to be processed is less than or equal to the preset time delay.
2. The method of claim 1, wherein the constraint is further used to constrain: a relation between a user priority corresponding to the terminal device and the number of sub-channels for transmitting the task;
correspondingly, selecting a corresponding sub-channel for the terminal equipment to perform task unloading comprises the following steps:
and selecting a corresponding sub-channel for the terminal equipment to carry out task unloading based on the level of the user priority.
3. The method as recited in claim 1, further comprising:
constructing the total time for the terminal equipment to process the task to be processed according to the time delay of the processing task of the server and the corresponding transmission time of the terminal equipment;
And constructing the average processing rate of the task amount unloaded to the server according to the data transmission rate and the transmission time corresponding to the terminal equipment and the total time used by the terminal equipment for processing the task to be processed.
4. The method of claim 1, wherein the matching of the task queue length of a single terminal device to the task queue length of the terminal device in a previous period within a predetermined period comprises:
calculating a difference value between the amount of tasks to be processed of a single terminal device in a preset period and the amount of tasks executed by the terminal device in the period, and ensuring that the difference value between the difference value and the amount of tasks unloaded to the server is smaller than or equal to 0;
correspondingly, the task queue length of the server receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period, and the method comprises the following steps:
ensuring that the difference between the amount of tasks offloaded to the server by the at least one terminal device in the last period and the amount of tasks processable by the server is less than or equal to 0.
5. The method of claim 2, wherein the constraints further comprise:
the number of terminal devices with tasks to be offloaded to the server in the at least one terminal device is smaller than or equal to the number of sub-channels which can be allocated to the at least one terminal device.
6. The method of claim 2, wherein the user priority is determined by the following formula:
Figure FDA0004132062770000021
wherein P is i User priority, R, representing the ith terminal equipment agv (i) An average processing rate T representing the amount of tasks corresponding to the ith terminal equipment and offloaded to the server C (i) Represents the total time taken by the ith terminal equipment to process the task to be processed, R m Representing a preset rate, T m Representing a preset time delay, vip (i) representing the user of the ith terminal equipmentThe levels, α, β, γ are weight coefficients set based on traffic demand, where α+β+γ=1.
7. The method according to any of claims 1-6, wherein the transmission time satisfies the following constraints:
Figure FDA0004132062770000031
wherein τ i (T) represents the transmission time of the ith terminal equipment, L represents the number of sub-channels which can be allocated to at least one terminal equipment, and T represents the time corresponding to an arbitrary period.
8. A task offloading apparatus, the apparatus comprising:
the construction module is used for constructing the energy consumption function and the constraint condition of the terminal equipment based on variables according to the task quantity to be processed of the terminal equipment, wherein the variables comprise: the method comprises the steps of executing task quantity by a terminal device, unloading task quantity to a server and transmitting time of transmitting tasks between the terminal device and the server;
The solving module is used for solving the minimum value of the sum of the energy consumption of at least one terminal device according to the constraint condition; wherein the constraint condition is used for constraining at least one of the following: the method comprises the steps of time delay corresponding to task amount unloaded to a server, average processing rate of task amount unloaded to the server, transmission time corresponding to task unloading to the server by a terminal device, task queue length of the server and task queue length of the terminal device;
the determining module is used for determining the task quantity executed by the terminal equipment in the task to be processed and the task quantity unloaded to the server according to the result obtained by solving, and selecting a corresponding sub-channel for the terminal equipment to unload the task;
the construction module is specifically configured to:
constructing the time delay of processing tasks by the server according to the data transmission rate, the transmission time and the task amount unloaded to the server corresponding to the terminal equipment;
constructing the power used by the terminal equipment for executing the task according to the task quantity executed by the terminal equipment, and constructing the running power of the terminal equipment in the time delay and the waiting power of the terminal equipment in the transmission time according to the task quantity unloaded to the server by the terminal equipment;
Constructing an energy consumption function of the terminal equipment by using the running time, the transmission time, the time delay, the waiting power, the used power and the running power of the terminal equipment;
the constraint condition specifically includes at least one of the following:
the sum of the transmission time corresponding to the at least one terminal device and the transmission time corresponding to the single terminal device meet the corresponding requirements;
the amount of tasks executed by a single terminal device is smaller than the amount of tasks which can be processed by the single terminal device;
the length of a task queue of a single terminal device in a preset period is matched with the length of a task queue of the terminal device in a previous period;
the task queue length of the server for receiving the task unloading of the at least one terminal device is matched with the task queue length of the server in the last period;
the average processing rate of the task quantity corresponding to the single terminal equipment and unloaded to the server is smaller than or equal to the preset rate;
the total time for the single terminal device to process the task to be processed is less than or equal to the preset time delay.
9. An electronic device, comprising: a processor, a memory and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the task offloading method of any one of claims 1-7.
10. A computer readable storage medium storing computer executable instructions which when executed by a processor are adapted to implement a task offloading method as claimed in any one of claims 1 to 7.
CN202111574101.6A 2021-12-21 2021-12-21 Task unloading method and device, electronic equipment and readable storage medium Active CN114281426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111574101.6A CN114281426B (en) 2021-12-21 2021-12-21 Task unloading method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111574101.6A CN114281426B (en) 2021-12-21 2021-12-21 Task unloading method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114281426A CN114281426A (en) 2022-04-05
CN114281426B true CN114281426B (en) 2023-05-16

Family

ID=80873787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111574101.6A Active CN114281426B (en) 2021-12-21 2021-12-21 Task unloading method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114281426B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2105821A1 (en) * 2008-03-25 2009-09-30 Giga-Byte Technology Co., Ltd. Power management method and system for mainboard
CN109240813A (en) * 2018-08-21 2019-01-18 广东工业大学 Task schedule and task immigration method in a kind of mobile cloud computing
CN109426549A (en) * 2017-09-01 2019-03-05 英特尔公司 Distribution is interconnected for the accelerator of virtual environment
CN109800072A (en) * 2019-01-22 2019-05-24 深圳市简智联信息科技有限公司 Task schedule optimization method and device based on edge calculations
CN110489233A (en) * 2019-08-15 2019-11-22 北京信息科技大学 Equipment task unloading and cpu frequency modulation method and system based on mobile edge calculations
CN110928654A (en) * 2019-11-02 2020-03-27 上海大学 Distributed online task unloading scheduling method in edge computing system
CN112104693A (en) * 2020-07-22 2020-12-18 北京邮电大学 Task unloading method and device for non-uniform mobile edge computing network
CN112416554A (en) * 2020-11-20 2021-02-26 北京邮电大学 Task migration method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2105821A1 (en) * 2008-03-25 2009-09-30 Giga-Byte Technology Co., Ltd. Power management method and system for mainboard
CN109426549A (en) * 2017-09-01 2019-03-05 英特尔公司 Distribution is interconnected for the accelerator of virtual environment
CN109240813A (en) * 2018-08-21 2019-01-18 广东工业大学 Task schedule and task immigration method in a kind of mobile cloud computing
CN109800072A (en) * 2019-01-22 2019-05-24 深圳市简智联信息科技有限公司 Task schedule optimization method and device based on edge calculations
CN110489233A (en) * 2019-08-15 2019-11-22 北京信息科技大学 Equipment task unloading and cpu frequency modulation method and system based on mobile edge calculations
CN110928654A (en) * 2019-11-02 2020-03-27 上海大学 Distributed online task unloading scheduling method in edge computing system
CN112104693A (en) * 2020-07-22 2020-12-18 北京邮电大学 Task unloading method and device for non-uniform mobile edge computing network
CN112416554A (en) * 2020-11-20 2021-02-26 北京邮电大学 Task migration method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114281426A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
Xia et al. Throughput maximization for online request admissions in mobile cloudlets
CN110474854B (en) Resource allocation method and device
JP2013537677A (en) Battery power management for mobile devices
CN112243298B (en) Scheduling method and device
WO2023005448A1 (en) Wireless resource utilization rate determination method and apparatus, electronic device and storage medium
CN110113140B (en) Calculation unloading method in fog calculation wireless network
Fang et al. Optimal scheduling for data transmission between mobile devices and cloud
CN110780986B (en) Internet of things task scheduling method and system based on mobile edge computing
CN111200821B (en) Capacity planning method and device
CN112788698B (en) Data processing method and device and terminal equipment
CN114286447A (en) Method, device and storage medium for adjusting scheduling priority
CN111669831B (en) Resource allocation method and device
CN114281426B (en) Task unloading method and device, electronic equipment and readable storage medium
US11099890B2 (en) Devices and methods for prioritized resource allocation based on communication channel conditions
CN112243255B (en) Determination method and device for scheduling priority
US20200404535A1 (en) Uplink bandwidth estimation over broadband cellular networks
CN111867111B (en) Method and device for scheduling equipment
Bhandari et al. An Optimal Cache Resource Allocation in Fog Radio Access Networks
CN113453145A (en) Method for predicting air interface state and wireless coverage equipment
CN107800648B (en) Data packet scheduling method and device
CN111683407A (en) Resource allocation method and device
CN112399611B (en) Access method and device of Internet of things service
CN111741534B (en) Resource scheduling method and device
CN116528281A (en) Network capacity assessment method, device and storage medium
CN112601252B (en) Energy-saving control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant