CN114281544A - Electric power task execution method and device based on edge calculation - Google Patents

Electric power task execution method and device based on edge calculation Download PDF

Info

Publication number
CN114281544A
CN114281544A CN202111617870.XA CN202111617870A CN114281544A CN 114281544 A CN114281544 A CN 114281544A CN 202111617870 A CN202111617870 A CN 202111617870A CN 114281544 A CN114281544 A CN 114281544A
Authority
CN
China
Prior art keywords
terminal device
resource allocation
power
power task
edge
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.)
Pending
Application number
CN202111617870.XA
Other languages
Chinese (zh)
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.)
State Grid Corp of China SGCC
Global Energy Interconnection Research Institute
Information and Telecommunication Branch of State Grid Jibei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Global Energy Interconnection Research Institute
Information and Telecommunication Branch of State Grid Jibei Electric Power 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 State Grid Corp of China SGCC, Global Energy Interconnection Research Institute, Information and Telecommunication Branch of State Grid Jibei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202111617870.XA priority Critical patent/CN114281544A/en
Publication of CN114281544A publication Critical patent/CN114281544A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a device for executing a power task based on edge computing, which are applied to an edge computing system, wherein the edge computing system comprises a base station, an edge server and a plurality of terminal devices, and the method comprises the following steps: according to the calculation time delay when each terminal device executes the power task respectively, the power task is unloaded to the edge server by the terminal device, and an optimization target is established through the total calculation time delay function when the edge server executes the power task; determining a resource allocation strategy and an unloading strategy according to the optimization target; and controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy. By executing the method and the device, the task time delay of the power terminal can be minimized under the condition of limited resources, and the service experience of a terminal user is improved.

Description

Electric power task execution method and device based on edge calculation
Technical Field
The invention relates to the technical field of edge computing, in particular to a method and a device for executing a power task based on edge computing.
Background
With the rapid development of mobile communications and the rapid spread of mobile terminals, a series of new computationally intensive and delay sensitive power applications and services are emerging. The power service and application which need to have the characteristics of low time delay and high reliability put higher requirements on the computing power of the power terminal. Because the power terminal with limited computing power will generate higher time delay when processing such applications, and further affect the timely feedback of the power terminal, how to reduce the application processing time delay is one of the key problems that needs to be solved urgently in the current power scenario.
Aiming at the problems, the traditional power cloud computing cannot meet the mass data of explosive growth. In 2014, the European Telecommunications Standardization Institute (ETSI) initiated the LTE-based Edge Computing standard project, Mobile Edge Computing (MEC), and developed standardization work, primarily aiming to reduce network delay and alleviate network congestion. With the continuous enrichment and research of services, the meaning of mobile Edge Computing is further expanded to Multi-access Edge Computing (Multi-access Edge Computing), the capability is further enhanced, and the access technology is not limited to LTE, and also includes various access technologies such as 5G, Wi-Fi and fixed network. 5G proposes three application scenarios: the method has the advantages that mobile broadband (eMBB), ultra-low time delay and high reliability (uRLLC) and large-scale MTC terminal connection (mMTC) are enhanced, the increasingly abundant business requirements of people are met, more importantly, digitization, networking and intelligent upgrading in the traditional field are driven, the society is enabled to operate in hundreds of businesses, edge computing becomes an important technical basis for power grid development in the 5G era, real-time response of complex requirements under mass data is realized, and the method is a necessary link for comprehensively promoting power grid intelligent construction.
In an edge computing system, a service node consisting of a base station and an edge server provides computing, communication and storage services for terminal equipment nearby. Although the service node has stronger computing power compared with the terminal device, the computing resources of the service node are limited, and excessive power tasks bring extra load to the service node, thereby affecting network delay.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect in the prior art that excessive power tasks will bring extra load to service nodes in an edge computing system, thereby affecting network delay, and thus provide a method and an apparatus for executing power tasks based on edge computing.
The invention provides a power task execution method based on edge computing, which is applied to an edge computing system, wherein the edge computing system comprises a base station, an edge server and a plurality of terminal devices, and the method comprises the following steps: according to the calculation time delay when each terminal device executes the power task respectively, the power task is unloaded to the edge server by the terminal device, and an optimization target is established through the total calculation time delay function when the edge server executes the power task; determining a resource allocation strategy and an unloading strategy according to the optimization target; and controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy.
Optionally, in the method for executing an electric power task based on edge computing provided by the present invention, the computing time delay when the terminal device executes the electric power task is determined by the following steps: and determining the calculation time delay when the terminal equipment executes the power task according to the total CPU periodicity required for completing the power task and the CPU frequency of the terminal equipment.
Optionally, in the method for executing an electric power task based on edge computing provided by the present invention, the total computation delay function is established according to the sum of a transmission delay function when the terminal device transmits data to the base station and a computation delay function when the electric power task is executed in the edge server; establishing a transmission delay function by combining with a frequency spectrum resource distributed by a base station for terminal equipment; and the calculation time delay function is established by combining the calculation resources distributed by the edge server for the terminal equipment.
Optionally, in the method for performing an electric power task based on edge computing provided by the present invention, the optimization objective is:
Figure BSA0000262081310000031
where N represents the number of terminal devices in the edge computing system, xiE {0, 1}, i e N, if xiWhen the power task in the ith terminal device is offloaded to the edge server for execution, x is equal to 1i0, indicating that the power task is performed in the ith terminal device, Ti lIndicating the calculation delay, T, of the ith terminal device when performing the power taski oRepresenting edge servers performing power tasks MiTotal calculated time delay of time, fmRepresenting the total computational resources of the edge servers, fi cIndicating the computing resources allocated by the edge server to the i-th terminal device, wiRepresenting the percentage of spectrum resources allocated by the base station to the ith terminal device.
Optionally, in the method for executing an electric power task based on edge computing provided by the present invention, the optimization objective includes a computing resource allocation constraint condition, the resource allocation policy includes a computing resource allocation policy in which the edge server allocates computing resources to the terminal device, and the determining the resource allocation policy according to the optimization objective includes: establishing a first Lagrange function for computing a resource allocation strategy by combining with a computing resource allocation constraint condition; and solving the first Lagrange function by using the Carlo-Cohen-Tack condition to obtain the computing resource corresponding to each terminal device.
Optionally, in the method for executing an electric power task based on edge computing provided by the present invention, the optimization objective includes a spectrum resource allocation constraint condition, the resource allocation policy includes a spectrum resource allocation policy in which the base station allocates spectrum resources to the terminal device, and the determining the resource allocation policy according to the optimization objective includes: establishing a second Lagrange function for calculating a spectrum allocation strategy by combining the spectrum resource allocation constraint condition; and solving the second Lagrange function by using the Carlo-Cohen-Tack condition to obtain the frequency spectrum resource occupation ratio corresponding to each terminal device.
Optionally, in the method for performing an electric power task based on edge computing provided by the present invention, the optimization objective includes an optimization function, and the determining the unloading policy according to the optimization objective includes: determining a resource allocation strategy according to the optimization target; determining an unloading strategy by adopting an adaptive genetic algorithm, wherein an adaptive function in the adaptive genetic algorithm is determined according to a resource allocation strategy and a target optimization function, and an ith chromosome in a chromosome population in the adaptive genetic algorithm is randomly generated by using N {0, 1} binary bits: xi={x1,x2,...,xn,...xNIs e.g.., N, where x is equal to 1, 2nWhen the number is 1, the power task in the nth terminal equipment is unloaded to the edge server for execution, xnWhen 0, it means that the power task in the nth terminal device is executed in the terminal device.
The invention provides a power task execution device based on edge computing, which is applied to an edge computing system, wherein the edge computing system comprises a base station, an edge server and a plurality of terminal devices, and the device comprises: the optimization target determining module is used for determining an optimization target according to the calculation time delay when each terminal device executes the power task respectively, the power task is unloaded to the edge server by the terminal device, and the total calculation time delay function when the edge server executes the power task; the strategy optimization module is used for determining a resource allocation strategy and an unloading strategy according to an optimization target; and the task execution module is used for controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy.
A third aspect of the present invention provides a computer apparatus comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to perform the method for performing an edge computing based power task as provided by the first aspect of the invention.
A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions for causing a computer to execute the method for performing an edge-computing-based power task according to the first aspect of the present invention.
The technical scheme of the invention has the following advantages:
the method for executing the power task based on the edge calculation establishes an optimization target according to the calculation time delay when each terminal device executes the power task respectively and the total calculation time delay function when the edge server executes the power task, and because the optimization target is established according to the calculation time delay of the terminal device and the total calculation time delay function of the edge server, the result obtained by solving the optimization target can minimize the time delay when the power task is executed under the condition of limited resources, thereby improving the service experience of terminal users, and in the method for executing the power task based on the edge calculation, when the optimization target is solved, an indirect optimization mode is adopted to decompose the optimization target into two problems of resource allocation and unloading decision, a resource allocation strategy and an unloading strategy are determined according to the optimization target, and different resource allocation strategies can lead the resources occupied by each terminal device to be different, different unloading strategies can lead the calculated amount of the edge server and each terminal device to be different, the resources occupied by each terminal device to be different, and the calculated amount of the edge server and each terminal device to be different, all the time delay in the execution process of all the power tasks in the edge computing system can be influenced, therefore, the optimization target is decomposed into two problems of resource allocation and unloading decision, and the obtained optimization strategy can lead to smaller time delay when all the power tasks in the edge computing system are executed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a topology diagram of an edge computing system in an embodiment of the invention;
FIG. 2 is a flowchart illustrating a specific example of a method for performing an electrical task based on edge calculation according to an embodiment of the present invention;
fig. 3 is a total delay variation graph when the number of power tasks is different and the power tasks are executed by different methods;
fig. 4 is a total delay variation graph when the input data size of the power task is different and the power task is executed by different methods;
FIG. 5 is a schematic block diagram of a specific example of an edge-computing-based power task performing device according to an embodiment of the present invention;
FIG. 6 is a functional block diagram of one specific example of a computer device provided in an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
An embodiment of the present invention provides an electric power task execution method based on edge computing, which is applied to an edge computing system shown in fig. 1, where the edge computing system includes a base station, an edge server, and a plurality of terminal devices, and as shown in fig. 2, the method includes:
step S11: and establishing an optimization target according to the calculation time delay when each terminal device executes the power task respectively, the power task unloaded to the edge server by the terminal device, and the total calculation time delay function when the edge server executes the power task.
In the embodiment of the invention, the optimization strategy obtained by analyzing the optimization target can make all the power tasks in the edge system have smaller time delay when being executed synchronously, and not only make one of the power tasks have smaller time delay when being executed.
In an optional embodiment, each terminal device has its own power task, and the power tasks may be calculated locally or offloaded to an edge server for calculation.
In an alternative embodiment, the power task in the ith terminal device may be Mi={di,λiDenotes wherein d isiIndicating completion of power task MiTotal number of CPU cycles required, λiRepresenting the amount of data for the power task.
Step S12: and determining a resource allocation strategy and an unloading strategy according to the optimization target.
In an optional embodiment, determining the resource allocation policy refers to determining the calculation resource amount and the spectrum resource ratio respectively allocated to each terminal device. If the amount of computing resources allocated by the edge server to the terminal device is different, the time delay of the edge server in executing the power task unloaded by the terminal device is also different; the base station allocates different spectrum resources to the terminal device, and the time delay of the terminal device when the terminal device offloads the power task to the edge server is also different.
In an alternative embodiment, determining the offloading policy refers to determining a terminal device that needs to offload a power task to an edge server and a terminal device that needs to perform the power task locally.
In an optional embodiment, optimizing the resource allocation policy and the offloading policy may reduce the time delay in the execution process of the power task to some extent.
Step S13: and controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy.
In an optional embodiment, when controlling the edge computing system to execute the power task according to the resource allocation policy and the offload policy, the base station and the edge server are controlled to allocate computing resources and spectrum resources to each terminal device according to the resource allocation policy, then part of the terminal devices are controlled to execute the power task according to the offload policy, and the control part of the terminal devices offload the power task to the edge server and control the edge server to execute the received power task.
The method for executing the power task based on the edge computing provided by the embodiment of the invention establishes the optimization target according to the computing time delay of each terminal device when the power task is executed respectively and the total computing time delay function of the edge server when the power task is executed, and because the optimization target is established according to the computing time delay of the terminal device and the total computing time delay function of the edge server, the time delay of the power task when being executed can be minimized under the condition of limited resources by solving the result of the optimization target, the service experience of terminal users is improved, and in the method for executing the power task based on the edge computing provided by the embodiment of the invention, the optimization target is decomposed into two problems of resource allocation and unloading decision by adopting an indirect optimization mode when the optimization target is solved, and a resource allocation strategy and an unloading strategy are determined according to the optimization target, different resource allocation strategies can lead to different resources occupied by each terminal device, different unloading strategies can lead to different calculation amounts of the edge server and each terminal device, different resources occupied by each terminal device and different calculation amounts of the edge server and each terminal device, and all the calculation amounts can affect the time delay in the execution process of all the power tasks in the edge computing system, so that the optimization target is decomposed into two problems of resource allocation and unloading decision, and the obtained optimization strategy can lead to smaller time delay when all the power tasks in the edge computing system are executed.
In an optional embodiment, the calculation delay of the terminal device when executing the power task is determined according to the total number of CPU cycles required to complete the power task and the CPU frequency of the terminal device:
Figure BSA0000262081310000091
wherein the content of the first and second substances,
Figure BSA0000262081310000092
indicating that the ith terminal device performs the power task MiTime of calculation delay, diIndicating completion of power task MiThe total number of CPU cycles required for the CPU,
Figure BSA0000262081310000093
indicates the CPU frequency of the i-th terminal device.
In an alternative embodiment, the total computation delay function in step S11 is established according to the sum of the transmission delay function when the terminal device transmits data to the base station and the computation delay function when the power task is executed in the edge server.
If the terminal device unloads the power task to the edge server for execution, the time delay of the power task comprises three parts: the delay generated when the terminal device offloads the power task to the edge server, the delay generated when the edge server executes the power task, and the delay generated when the edge server returns the execution result of the power task to the terminal device may be determined as a total calculation delay function in an optional embodiment.
Because the execution result data volume of the power task is small, and the time delay when the edge server sends the execution result to the terminal device is negligible, in an optional embodiment, the sum of the transmission delay function and the calculation delay function may be determined as a total calculation delay function: t isi o=Ti ir+Ti cWherein, Ti irRepresents a transmission delay function T when the ith terminal equipment sends a power task to the edge serveri cAnd the calculation time delay function of the power task in the ith terminal equipment when the power task is executed in the edge server is represented.
In an optional embodiment, the transmission delay function used when establishing the total delay function is established in combination with spectrum resources allocated by the base station to the terminal device.
In an optional embodiment, when the transmission function is established, the base station is first combined with the spectrum resources allocated to the terminal device to establish the transmission rate subfunction of the terminal device, and then the transmission function is established according to the transmission rate subfunction and the data volume of the power task in the terminal device.
In an alternative embodiment, the transmission rate subfunction of the ith terminal device is established according to shannon's formula:
Figure BSA0000262081310000101
wherein wiPercentage of occupied spectrum resource, P, for the i-th terminal device when unloading power taskiIs the transmission power of the ith terminal equipment, hiIs the channel fading coefficient between the ith terminal equipment and the base station, d is the distance between the ith terminal equipment and the base station, r is the path loss, sigma2Is the channel noise power.
The transfer function established according to the transfer rate subfunction and the data volume of the power task in the terminal equipment is as follows:
Figure BSA0000262081310000102
wherein λ isiData quantity, R, representing power missioniRepresenting the transfer rate sub-function.
In an optional embodiment, the calculation delay function used in establishing the total delay function is established by combining the calculation resources allocated to the terminal device by the edge server:
Figure BSA0000262081310000111
wherein f isi cIndicating the computing resources allocated by the edge server to the i-th terminal device, diIndicating completion of power task MiThe total number of CPU cycles required.
In an optional embodiment, in the method for performing an electric power task based on edge computing according to the embodiment of the present invention, an optimization objective is established as follows:
Figure BSA0000262081310000112
where N represents the number of terminal devices in the edge computing system, xiE {0, 1}, i e N, if xiWhen the power task in the ith terminal device is offloaded to the edge server for execution, x is equal to 1i0, indicating that the power task is performed in the ith terminal device, Ti lIndicating the calculation delay, T, of the ith terminal device when performing the power taski oRepresenting the total computational delay, f, of the edge server when performing the power taskmRepresenting the total computational resources of the edge servers, fi cIndicating the computing resources allocated by the edge server to the i-th terminal device, wiRepresenting the percentage of spectrum resources allocated by the base station to the ith terminal device.
Constraint C1Indicating that each power task can be performed locally or off-loaded to an edge server; constraint C2Indicating that the total computing resources allocated to all terminal devices must not exceed the total computing resources of the edge server; constraint C3Indicating that the edge server must allocate respective computing resources for each terminal device associated therewith; constraint C4Representing the sum of the percentages of the spectrum resources allocated to all terminal devices is less than 1.
Optimization function in the above optimization objective
Figure BSA0000262081310000121
The method is a mixed integer nonlinear function, and the optimization function and the constraint condition have obvious analytical expressions, so that an analytical solution can be deduced through an optimality condition, and the original problem is divided into two sub-problems to be solved by adopting an indirect method:
1) and (4) optimal resource allocation problem. When the calculation carrier of each power task is determined, the original problem is converted into a convex function related to the calculation capacity distribution proportion coefficient and the spectrum resource distribution proportion coefficient of the server, so that the optimal calculation capacity distribution and spectrum resource distribution strategies can be obtained by using a KKT (Karush-Kuhn-Tucher) condition, and the optimal objective function value is given.
2) And (4) an optimal power task unloading problem. And determining an unloading decision X of the power task based on the optimal computing resource allocation and spectrum resource allocation strategy. The subproblem is a 0-1 integer programming problem, and the unloading mode of each power task can be solved through a self-adaptive genetic algorithm.
The optimization problem is a mixed integer nonlinear programming problem, the solving requires exponential time complexity, the optimization problem is decomposed into the calculation of a resource allocation strategy and the calculation of a power task unloading problem, and the complexity of problem solving is reduced.
In an alternative embodiment, the optimization objective includes a constraint for computing resource allocation, and in the above embodiment, the constraint C is exemplary2、C3In step S12, determining a resource allocation policy according to the optimization target includes:
firstly, a first Lagrangian function for computing a resource allocation strategy is established by combining a computing resource allocation constraint condition:
Figure BSA0000262081310000131
wherein the content of the first and second substances,Ω (f) represents the offload user computing resource allocation function,
Figure BSA0000262081310000132
the unloading user refers to a terminal device which selects to unload the power task to the edge server, and lambda and mu are respectively corresponding to the constraint condition C2、C3Corresponding Lagrange multiplier with lambda, mu not less than 0, fi cIndicating the computing resources allocated by the edge server to the ith terminal device.
Then, solving a first Lagrange function by using a Karash-Kuhn-Tack condition (Karush-Kuhn-Tucher, KKT) to obtain computing resources corresponding to each terminal device:
Figure BSA0000262081310000133
wherein f ismRepresenting the total computational resources of the edge servers, diIndicating completion of power task MiThe total number of CPU cycles required, N representing the number of terminal devices.
In an optional embodiment, the optimization target includes a spectrum resource allocation constraint condition, in the optimization target in the above embodiment, the constraint condition C4 is a spectrum resource allocation constraint condition, the resource allocation policy includes a spectrum resource allocation policy in which the base station allocates a spectrum resource to the terminal device, and in the step S12, the determining the resource allocation policy according to the optimization target includes:
firstly, establishing a second Lagrangian function for calculating a spectrum allocation strategy by combining spectrum resource allocation constraint conditions:
Figure BSA0000262081310000141
wherein theta is a Lagrange multiplier corresponding to the constraint condition C4, and is more than or equal to 0, phi (w) represents the spectrum resource allocation function of the uninstalled user,
Figure BSA0000262081310000142
wirepresenting the percentage of spectrum resources allocated by the base station to the ith terminal device.
Then, solving a second Lagrange function by using a Carlo-Cohn-Tack condition to obtain the frequency spectrum resource ratio corresponding to each terminal device:
Figure BSA0000262081310000143
wherein the content of the first and second substances,
Figure BSA0000262081310000144
in an alternative embodiment, the optimization objective includes an optimization function, and in the optimization objective provided in the above embodiment, the optimization function is, for example, an optimization function
Figure BSA0000262081310000145
In step S12, determining an unloading policy according to the optimization objective includes:
first, a resource allocation policy is determined according to an optimization objective. For details of determining the resource allocation policy according to the optimization objective, refer to the description in the above embodiments, and are not repeated herein.
Then, an adaptive genetic algorithm is adopted to determine an unloading strategy, wherein an adaptive function in the adaptive genetic algorithm is determined according to a resource allocation strategy and an objective optimization function, and an ith chromosome in a chromosome population in the adaptive genetic algorithm is randomly generated by using N {0, 1} binary bits: xi={x1,x2,...,xn,...xNIs e.g.., N, where x is equal to 1, 2nWhen the number is 1, the power task in the nth terminal equipment is unloaded to the edge server for execution, xnWhen 0, it means that the power task in the nth terminal device is executed in the terminal device.
In an alternative embodiment, the conventional genetic algorithm selects the individuals with larger fitness value to be inherited to the next generation, and therefore selects U (x, w)*,f*) Reciprocal of (2) as evaluation dyeingThe fitness function F of the quality is as follows:
Figure BSA0000262081310000151
in an alternative embodiment, the step of determining the unloading strategy by using an adaptive genetic algorithm specifically comprises:
step one, encoding and initializing a population.
In the embodiment of the invention, a binary coding mode is used for coding the gene, and the population scale I is specified. Randomly generating the ith chromosome as X by using N {0, 1} binary bits (genes)i={x1,x2,...,xNAnd e, I belongs to {1, 2.,. N }, and obtaining an initial chromosome population I (0).
And step two, adopting an adaptive function to calculate the fitness of each chromosome in the chromosome population, and determining the maximum fitness and the average fitness in the chromosome population.
If the fitness of each chromosome is not calculated for the first time currently, if the current iteration times are larger than or equal to a second preset value, outputting the maximum fitness, and determining an unloading strategy according to the chromosome corresponding to the maximum fitness. In an optional embodiment, the second preset value may be set according to actual requirements, and may be set to 1000 times, for example.
If the current iteration times are smaller than a second preset value, executing the following steps:
and thirdly, selecting a part of excellent individuals from the father generation by adopting a roulette selection method based on fitness proportion selection.
And step four, carrying out single-point crossing and basic bit variation operation on the excellent individuals according to the crossing probability and the variation probability to generate the chromosome with the new gene. Cross probability P in which the change is dynamic according to the adaptation value of the individualcAnd the mutation probability PmExpressed as:
Figure BSA0000262081310000161
Figure BSA0000262081310000162
wherein, FmaxRepresenting the maximum fitness value in the population of individuals; favgRepresenting the average fitness value of the whole population; f represents the larger fitness value of two individuals in the population for selecting the cross operation; f' represents the adaptive value of the individual selected for variation operation in the population; beta is a1、β2、β3And beta4Is a constant.
And after the chromosome with the new gene is generated in the fourth step, the chromosome with the new gene and the excellent individuals form a new chromosome population, the second step is returned until the iteration number is greater than or equal to a second preset value, the maximum fitness is output, and the unloading strategy is determined according to the chromosome corresponding to the maximum fitness.
In order to verify that the power task execution method based on edge calculation provided by the embodiment of the invention can enable the time delay generated in the power task execution process to be smaller, simulation verification is performed in the embodiment.
Fig. 3 is a graph showing total delay variation when the number of power tasks is different and the power tasks are executed by different methods. The method provided by the embodiment of the invention is respectively compared and analyzed with a local offload algorithm (LOC), a random offload algorithm (ROC) and a joint computation offload and resource allocation method (JOR) based on dynamic search in the prior art.
As shown in fig. 3, the performance of the method provided by the embodiment of the present invention is better than that of the LOC, ROC, and JOR algorithms, and as the number of mobile terminals including power tasks increases, the advantage of the method provided by the embodiment of the present invention is more obvious, and when the number of tasks is 20, the time delay required by the method provided by the embodiment of the present invention is about 12.5 s. This is because under the condition that the computation and communication resources are limited, the method provided by the embodiment of the present invention can better allocate the optimal computation and communication resources to different terminal devices, and therefore the total time delay for executing the power tasks of all the terminal devices is the lowest.
As can be seen from fig. 3, when the power tasks of all the terminal devices are executed locally, the total delay of the LOC algorithm is increased linearly as the number of the terminals increases, because the size of the power task delay is only related to the self-computing power; when the random offloading strategy is adopted, since one part of the terminal devices will offload tasks to the edge server and another part of the terminal devices execute power tasks locally, the total time delay for executing all the power tasks is lower than the LOC algorithm and fluctuates. In addition, compared with the JOR algorithm which does not relate to the spectrum resource allocation problem of the offload service, the method provided by the embodiment of the invention comprehensively considers the spectrum resource allocation and the calculation resource allocation problem of the offload service, and performs effective power allocation and calculation resource allocation on the terminal equipment service under the condition of limited resources, so that the system performance is obviously improved.
Fig. 4 is a comparison of total time delay of different algorithms when the input data size of the power task is different. When the number of terminal devices, the computing power of the edge server, and the bandwidth are the same, the performance of different algorithms under different input data sizes is compared, and the simulation result is shown in fig. 4. As shown in fig. 4, the LOC algorithm has no significant change, perhaps around 20s, when the power task is executed locally, because the total latency of the LOC algorithm is related only to the computing resources required by the task. As the power mission input data increases, the total time delay of the method provided by the embodiment of the invention is lower than the LOC, ROC and JOR algorithms. The method provided by the embodiment of the invention can allocate the optimal spectrum resource and the optimal calculation resource according to the size of the input data of the power task, so that the total time delay when the power tasks in all the terminal devices are executed is the lowest.
An embodiment of the present invention provides an edge-computing-based power task execution device, which is applied to an edge computing system shown in fig. 1, where the edge computing system includes a base station, an edge server, and a plurality of terminal devices, and as shown in fig. 5, the device includes:
the optimization target determining module 21 is configured to determine the optimization target according to the calculation delay when each terminal device executes the power task, and the total calculation delay function when the terminal device unloads the power task to the edge server, and the total calculation delay function is used by the edge server to execute the power task, and details of the optimization target determining module are described in step S11 in the foregoing embodiment, and are not described herein again.
The policy optimization module 22 is configured to determine a resource allocation policy and an offloading policy according to the optimization target, and details of the foregoing step S12 in the embodiment are included, and are not described herein again.
The task execution module 23 is configured to control the edge computing system to execute the power task according to the resource allocation policy and the offloading policy, and details of the step S13 in the foregoing embodiment are included, and are not described herein again.
An embodiment of the present invention provides a computer device, as shown in fig. 6, the computer device mainly includes one or more processors 31 and a memory 32, and one processor 31 is taken as an example in fig. 6.
The computer device may further include: an input device 33 and an output device 34.
The processor 31, the memory 32, the input device 33 and the output device 34 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the power task performing device based on the edge calculation, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory remotely located from the processor 31, and these remote memories may be connected to the edge computing-based power task performing device over a network. The input device 33 may receive a calculation request (or other numerical or character information) input by a user and generate a key signal input related to the power task performing device based on the edge calculation. The output device 34 may include a display device such as a display screen for outputting the calculation result.
Embodiments of the present invention provide a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer-readable storage medium stores computer-executable instructions, where the computer-executable instructions may perform the method for performing an electrical power task based on edge computing in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. An electric power task execution method based on edge computing is applied to an edge computing system, wherein the edge computing system comprises a base station, an edge server and a plurality of terminal devices, and the method comprises the following steps:
according to the calculation time delay when each terminal device executes the power task respectively, the terminal device unloads the power task to the edge server, and an optimization target is established through a total calculation time delay function when the edge server executes the power task;
determining a resource allocation strategy and an unloading strategy according to the optimization target;
and controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy.
2. The method for performing power tasks based on edge computing according to claim 1, wherein the computing time delay of the terminal device in performing the power tasks is determined by the following steps:
and determining the calculation time delay when the terminal equipment executes the power task according to the total CPU periodicity required for completing the power task and the CPU frequency of the terminal equipment.
3. The method of claim 1,
the total calculation delay function is established according to the sum of a transmission delay function when the terminal equipment transmits data to the base station and a calculation delay function when the power task is executed in the edge server;
the transmission delay function is established by combining the frequency spectrum resource distributed by the base station for the terminal equipment;
and the calculation time delay function is established by combining the calculation resources distributed by the edge server for the terminal equipment.
4. The method according to any of claims 1-3, wherein the optimization objective is:
Figure FSA0000262081300000021
s.t.(C1)xi∈{0,1},i∈N
Figure FSA0000262081300000022
Figure FSA0000262081300000023
Figure FSA0000262081300000024
wherein N represents the number of terminal devices in the edge computing system, xiE {0, 1}, i e N, if xiWhen the power task in the ith terminal device is offloaded to the edge server for execution, x is equal to 1i0, indicating that the power task is performed in the ith terminal device, Ti lIndicating the calculation delay, T, of the ith terminal device when performing the power taski oRepresenting edge servers performing power tasks MiTotal calculated time delay of time, fmRepresenting the total computational resources of the edge servers, fi cIndicating the computing resources allocated by the edge server to the i-th terminal device, wiRepresenting the percentage of spectrum resources allocated by the base station to the ith terminal device.
5. The method according to any of claims 1-4, wherein the optimization objective includes a computing resource allocation constraint, the resource allocation policy includes a computing resource allocation policy for the edge server to allocate computing resources for the terminal device,
determining a resource allocation policy according to the optimization objective, comprising:
establishing a first Lagrangian function for calculating the resource allocation strategy by combining the calculation resource allocation constraint condition;
and solving the first Lagrange function by using a Carlo-Cohen-Tack condition to obtain the computing resource corresponding to each terminal device.
6. The method according to any one of claims 1-5, wherein the optimization objective includes a spectrum resource allocation constraint condition, the resource allocation policy includes a spectrum resource allocation policy that the base station allocates spectrum resources for the terminal device,
determining a resource allocation policy according to the optimization objective, comprising:
establishing a second Lagrangian function for calculating the spectrum allocation strategy by combining the spectrum resource allocation constraint condition;
and solving the second Lagrange function by using a Carlo-Cohen-Tack condition to obtain the frequency spectrum resource occupation ratio corresponding to each terminal device.
7. The method according to any one of claims 1 to 6, wherein the optimization objective comprises an optimization function, and wherein determining an offloading strategy according to the optimization objective comprises:
determining a resource allocation strategy according to the optimization target;
determining an unloading strategy by adopting an adaptive genetic algorithm, wherein an adaptive function in the adaptive genetic algorithm is determined according to the resource allocation strategy and the target optimization function, and an ith chromosome in a chromosome population in the adaptive genetic algorithm is randomly generated by using N {0, 1} binary bits: xi={x1,x2,...,xn,...xNIs e.g.., N, where x is equal to 1, 2nWhen the number is 1, the power task in the nth terminal equipment is unloaded to the edge server for execution, xnWhen 0, it means that the power task in the nth terminal device is executed in the terminal device.
8. An electric power task execution device based on edge computing is applied to an edge computing system, wherein the edge computing system comprises a base station, an edge server and a plurality of terminal devices, and the device comprises:
the optimization target determining module is used for determining an optimization target according to the calculation time delay when each terminal device executes the power task respectively, the power task is unloaded to the edge server by the terminal device, and the total calculation time delay function when the edge server executes the power task;
the strategy optimization module is used for determining a resource allocation strategy and an unloading strategy according to the optimization target;
and the task execution module is used for controlling the edge computing system to execute the power task according to the resource allocation strategy and the unloading strategy.
9. A computer device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to perform the method of performing an edge computing based power task according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the method for performing an edge-computing-based power task according to any one of claims 1 to 7.
CN202111617870.XA 2021-12-28 2021-12-28 Electric power task execution method and device based on edge calculation Pending CN114281544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111617870.XA CN114281544A (en) 2021-12-28 2021-12-28 Electric power task execution method and device based on edge calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111617870.XA CN114281544A (en) 2021-12-28 2021-12-28 Electric power task execution method and device based on edge calculation

Publications (1)

Publication Number Publication Date
CN114281544A true CN114281544A (en) 2022-04-05

Family

ID=80876526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111617870.XA Pending CN114281544A (en) 2021-12-28 2021-12-28 Electric power task execution method and device based on edge calculation

Country Status (1)

Country Link
CN (1) CN114281544A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895976A (en) * 2022-04-29 2022-08-12 国网智能电网研究院有限公司 Method and device for unloading service security calculation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895976A (en) * 2022-04-29 2022-08-12 国网智能电网研究院有限公司 Method and device for unloading service security calculation
CN114895976B (en) * 2022-04-29 2024-02-13 国网智能电网研究院有限公司 Service security calculation unloading method and device

Similar Documents

Publication Publication Date Title
CN113242568B (en) Task unloading and resource allocation method in uncertain network environment
Gao et al. PORA: Predictive offloading and resource allocation in dynamic fog computing systems
CN110928654B (en) Distributed online task unloading scheduling method in edge computing system
Lee et al. An online secretary framework for fog network formation with minimal latency
CN110543336B (en) Edge calculation task unloading method and device based on non-orthogonal multiple access technology
CN110941667A (en) Method and system for calculating and unloading in mobile edge calculation network
CN108901075B (en) GS algorithm-based resource allocation method
CN105471759A (en) Network traffic scheduling method and apparatus for data centers
CN110740473B (en) Management method for mobile edge calculation and edge server
CN110069341B (en) Method for scheduling tasks with dependency relationship configured according to needs by combining functions in edge computing
CN112181655A (en) Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation
US10901388B2 (en) Method and system for creating energy demand model
CN112579194A (en) Block chain consensus task unloading method and device based on time delay and transaction throughput
CN109144730B (en) Task unloading method and device under small cell
CN114595049A (en) Cloud-edge cooperative task scheduling method and device
CN113220356A (en) User computing task unloading method in mobile edge computing
CN112083967B (en) Cloud edge computing task unloading method, computer equipment and storage medium
Dou et al. Mobile edge computing based task offloading and resource allocation in smart grid
CN112860337A (en) Method and system for unloading dependent tasks in multi-access edge computing
CN114281544A (en) Electric power task execution method and device based on edge calculation
KR102350195B1 (en) Energy Optimization Scheme of Mobile Devices for Mobile Augmented Reality Applications in Mobile Edge Computing
CN116541106B (en) Computing task unloading method, computing device and storage medium
CN112817741A (en) DNN task control method for edge calculation
CN114615705B (en) Single-user resource allocation strategy method based on 5G network
CN116017570A (en) Edge computing system resource management method based on block chain

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