CN112104737B - Calculation migration method, mobile computing equipment and edge computing equipment - Google Patents
- ️Tue Aug 30 2022
Info
-
Publication number
- CN112104737B CN112104737B CN202010980258.8A CN202010980258A CN112104737B CN 112104737 B CN112104737 B CN 112104737B CN 202010980258 A CN202010980258 A CN 202010980258A CN 112104737 B CN112104737 B CN 112104737B Authority
- CN
- China Prior art keywords
- computing
- task
- computing node
- delay
- mobile computing Prior art date
- 2020-09-17 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
- G06F9/5088—Techniques for rebalancing the load in a distributed system involving task migration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/101—Server selection for load balancing based on network conditions
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明提供了一种计算迁移方法、移动计算设备及边缘计算设备,其中方法包括:移动计算节点接收计算任务并读取任务信息,当计算迁移延迟在任务可容忍的最大延迟内时,判断本地计算延迟是否在最大延迟内;若是,则进一步判断本地计算能耗是否不大于传输能耗,若本地计算能耗小于等于传输能耗,则移动计算节点在本地对任务进行计算处理;否则,移动计算节点将任务迁移至边缘计算节点,由边缘计算节点对任务进行计算处理。本发明考虑了计算任务可容忍的最大延迟,在满足其最大延迟的条件下,进一步减少移动计算节点的任务处理能耗,既对计算任务提供任务粒度的严格的延迟保障,又能减少移动计算节点的处理能耗,延长其生存期限。
The present invention provides a computing migration method, mobile computing device and edge computing device, wherein the method includes: a mobile computing node receives a computing task and reads task information, and when the computing migration delay is within the maximum tolerable delay of the task, judging the local Whether the calculation delay is within the maximum delay; if so, further judge whether the local computing energy consumption is not greater than the transmission energy consumption, if the local computing energy consumption is less than or equal to the transmission energy consumption, the mobile computing node calculates the task locally; otherwise, the mobile computing node calculates the task locally. The computing node migrates the task to the edge computing node, and the edge computing node performs computing processing on the task. The invention considers the maximum delay that can be tolerated by the computing task, and further reduces the task processing energy consumption of the mobile computing node under the condition of satisfying the maximum delay, which not only provides the computing task with strict delay guarantee of task granularity, but also reduces the mobile computing The processing energy consumption of the node extends its lifetime.
Description
技术领域technical field
本发明涉及通信技术领域,尤其是涉及一种计算迁移方法、移动计算设备及边缘计算设备。The present invention relates to the field of communication technologies, and in particular, to a computing migration method, a mobile computing device and an edge computing device.
背景技术Background technique
随着物联网在工业、农业、自动驾驶等领域的广泛应用,物联网终端、智能终端在网络边缘产生了巨量的数据。为了获取数据的最大价值,需要对它们进行快速计算、处理。尤其,许多物联网数据是来自虚拟现实、自动驾驶等对延迟要求非常严格的应用。尽管云计算技术在为物联网应用提供高性能计算服务方面取得了瞩目的成功,然而云计算却难以满足物联网应用的超低延迟要求。这是因为,云计算资源往往远离数据源,将巨量的数据通过网络传输给远程的云计算数据中心,不仅消耗大量的网络带宽资源和传输能量,还会使数据经历较长的网络延迟,无法满足应用的超低延迟要求。With the wide application of IoT in industry, agriculture, autonomous driving and other fields, IoT terminals and smart terminals generate huge amounts of data at the edge of the network. In order to obtain the maximum value of data, they need to be quickly calculated and processed. In particular, a lot of IoT data comes from applications such as virtual reality and autonomous driving that have very strict latency requirements. Although cloud computing technology has achieved remarkable success in providing high-performance computing services for IoT applications, cloud computing is difficult to meet the ultra-low latency requirements of IoT applications. This is because cloud computing resources are often far away from the data source, and transmitting huge amounts of data to remote cloud computing data centers through the network not only consumes a large amount of network bandwidth resources and transmission energy, but also causes the data to experience long network delays. Unable to meet the ultra-low latency requirements of the application.
近年来,边缘计算已被认为是减少延迟敏感型应用的网络传输延迟的有效计算范式。通过在网络边缘部署计算节点,将物联网终端、智能终端的计算任务迁移到网络边缘,可以减少网络传输延迟和网络设备能耗,大大提高物联网应用的用户体验。In recent years, edge computing has been recognized as an effective computing paradigm to reduce network transmission delay for delay-sensitive applications. By deploying computing nodes at the network edge and migrating the computing tasks of IoT terminals and smart terminals to the network edge, network transmission delay and network device energy consumption can be reduced, and the user experience of IoT applications can be greatly improved.
计算迁移是一种考虑何时、以何种方式将计算任务迁移到哪个计算节点的边缘计算关键技术。现有的计算迁移方法主要通过优化配置远程云计算服务器与网络边缘计算节点之间、分布式同构网络边缘节点之间的计算任务的方式来减少网络延迟,没有考虑同一接入网络下异构计算节点之间的计算迁移情况。边缘节点的计算能力异构性、移动计算节点的能耗受限性以及物联网应用的数据海量性、高动态性使得异构边缘计算节点合作的计算迁移面临严峻的技术挑战。Computing migration is a key edge computing technology that considers when and how to migrate computing tasks to which computing node. Existing computing migration methods mainly reduce network latency by optimizing the configuration of computing tasks between remote cloud computing servers and network edge computing nodes, and between edge nodes in distributed homogeneous networks, without considering heterogeneous access networks under the same access network. Compute migration between compute nodes. The heterogeneity of computing power of edge nodes, the limited energy consumption of mobile computing nodes, and the massive data and high dynamics of IoT applications make the computing migration of heterogeneous edge computing nodes face severe technical challenges.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种计算迁移方法、移动计算设备及边缘计算设备,以解决处理计算任务时延迟较大、移动计算节点能耗较高的技术问题。The purpose of the present invention is to provide a computing migration method, a mobile computing device and an edge computing device, so as to solve the technical problems of large delay and high energy consumption of mobile computing nodes when processing computing tasks.
本发明的目的,可以通过如下技术方案实现:The object of the present invention can be realized by the following technical solutions:
一种计算迁移方法,包括:A computational migration method comprising:
S1:移动计算节点接收用户提交的计算任务,读取所述任务的任务信息;其中,所述用户运行至少一个移动应用程序;所述任务信息包括任务类型、任务大小和任务可容忍的最大延迟;S1: The mobile computing node receives the computing task submitted by the user, and reads the task information of the task; wherein the user runs at least one mobile application; the task information includes the task type, the task size and the maximum delay that the task can tolerate ;
S2:所述移动计算节点判断计算迁移延迟是否超过所述最大延迟,若是,则执行S5,否则执行S3;其中,所述计算迁移延迟为所述任务的无线传输延迟与所述任务在边缘计算节点的计算延迟之和;S2: The mobile computing node judges whether the calculation migration delay exceeds the maximum delay, and if so, executes S5, otherwise, executes S3; wherein, the calculation migration delay is the wireless transmission delay of the task and the edge computing of the task The sum of the computation delays of the nodes;
S3:所述移动计算节点判断本地计算延迟是否超过所述最大延迟,若是,则执行S6,否则执行S4;S3: the mobile computing node judges whether the local computing delay exceeds the maximum delay, and if so, executes S6, otherwise executes S4;
S4:所述移动计算节点判断本地计算能耗是否不大于传输能耗,若是,则执行S5;否则,执行S6;S4: The mobile computing node judges whether the local computing energy consumption is not greater than the transmission energy consumption, and if so, executes S5; otherwise, executes S6;
S5:所述移动计算节点对所述任务进行计算处理并将处理结果返回给用户;S5: the mobile computing node performs computing processing on the task and returns the processing result to the user;
S6:所述移动计算节点将所述任务迁移至边缘计算节点,所述边缘计算节点对所述任务进行计算处理并将处理结果返回给用户。S6: The mobile computing node migrates the task to an edge computing node, and the edge computing node performs computing processing on the task and returns the processing result to the user.
可选地,本地计算延迟dl具体为:dl=(Q+S)/fl;Optionally, the local calculation delay d l is specifically: d l =(Q+S)/f l ;
其中,Q为移动计算节点缓存队列中等待计算的数据块大小,S为所述任务的数据块大小,fl为移动计算节点的计算速率。Wherein, Q is the size of the data block waiting to be calculated in the cache queue of the mobile computing node, S is the size of the data block of the task, and f1 is the calculation rate of the mobile computing node.
可选地,本地计算能耗El具体为:El=α×S×fl×fl;Optionally, the local computing energy consumption E l is specifically: E l =α×S×f l ×f l ;
其中,α是本地计算能耗因子。where α is the local computing energy consumption factor.
可选地,所述无线传输延迟dc为:dc=W/R;其中,W为所述任务的以比特为基本单位的数据大小,R为无线传输速率。Optionally, the wireless transmission delay d c is: d c =W/R; wherein, W is the data size of the task in bits, and R is the wireless transmission rate.
可选地,无线传输速率R具体为:
Optionally, the wireless transmission rate R is specifically:其中,B表示子载波带宽,N表示移动计算节点使用的无线传输子载波数量,Pn表示移动计算节点在子载波n(1≤n≤N)上的发射功率,gn表示移动计算节点在子载波n上的信道增益噪声比。Among them, B represents the sub-carrier bandwidth, N represents the number of wireless transmission sub-carriers used by the mobile computing node, P n represents the transmit power of the mobile computing node on sub-carrier n (1≤n≤N), and g n represents the mobile computing node in Channel gain-to-noise ratio on subcarrier n.
可选地,所述任务在边缘计算节点的计算延迟dr具体为:dr=S/fr;Optionally, the computing delay dr of the task at the edge computing node is specifically: d r = S/f r ;
其中,fr为边缘计算节点当前时刻可用的最大计算速率。Among them, fr is the maximum computing rate available to the edge computing node at the current moment.
可选地,所述传输能耗具体为:所述传输能耗Ec具体为:
Optionally, the transmission energy consumption is specifically: the transmission energy consumption Ec is specifically:可选地,获取所述边缘计算节点当前时刻可用的最大计算速率的具体过程为:Optionally, the specific process of obtaining the maximum computing rate available at the current moment of the edge computing node is:
移动计算节点向边缘计算节点发送消息,请求查询边缘计算节点当前时刻可用的最大计算速率;The mobile computing node sends a message to the edge computing node, requesting to query the current maximum computing rate available to the edge computing node;
边缘计算节点确定当前时刻可用的最大计算速率;The edge computing node determines the maximum computing rate available at the current moment;
边缘计算节点向移动计算节点返回当前时刻可用的最大计算速率;The edge computing node returns the maximum computing rate available at the current moment to the mobile computing node;
移动计算节点接收边缘计算节点返回的当前时刻可用的最大计算速率。The mobile computing node receives the maximum computing rate available at the current moment returned by the edge computing node.
本发明还提供了一种移动计算设备,包括:The present invention also provides a mobile computing device, comprising:
处理器,以及与所述处理器通信连接的存储器;a processor, and a memory communicatively coupled to the processor;
其中,所述存储器上存储有可在所述处理器上运行的指令,所述指令被所述处理器执行时实现所述的计算迁移方法中的移动计算节点所执行的步骤。The memory stores instructions that can be executed on the processor, and when the instructions are executed by the processor, implement the steps performed by the mobile computing node in the computing migration method.
本发明还提供了一种边缘计算设备,包括:The present invention also provides an edge computing device, comprising:
处理器,以及与所述处理器通信连接的存储器;a processor, and a memory communicatively coupled to the processor;
所述处理器和所述处理器通信连接的存储器能被虚拟化为一个及以上虚拟机,所述设备上同时运行的所有虚拟机的计算速率之和不超过所述处理器的最大速率;所述存储器上存储有可在所述处理器上运行的指令,所述指令被所述处理器执行时实现所述的计算迁移方法中的边缘计算节点所执行的步骤。The processor and the memory communicatively connected to the processor can be virtualized into one or more virtual machines, and the sum of the computing rates of all virtual machines running simultaneously on the device does not exceed the maximum rate of the processor; The memory stores instructions that can be run on the processor, and when the instructions are executed by the processor, implement the steps performed by the edge computing node in the computing migration method.
本发明提供了一种计算迁移方法、移动计算设备及边缘计算设备,其中,计算迁移方法包括:S1:移动计算节点接收用户提交的计算任务,读取所述任务的任务信息;其中,所述用户运行至少一个移动应用程序;所述任务信息包括任务类型、任务大小和任务可容忍的最大延迟;S2:所述移动计算节点判断计算迁移延迟是否超过所述最大延迟,若是,则执行S5,否则执行S3;其中,所述计算迁移延迟为所述任务的无线传输延迟与所述任务在边缘计算节点的计算延迟之和;S3:所述移动计算节点判断本地计算延迟是否超过所述最大延迟,若是,则执行S6,否则执行S4;S4:所述移动计算节点判断本地计算能耗是否不大于传输能耗,若是,则执行S5;否则,执行S6;S5:所述移动计算节点对所述任务进行计算处理并将处理结果返回给用户;S6:所述移动计算节点将所述任务迁移至边缘计算节点,所述边缘计算节点对所述任务进行计算处理并将处理结果返回给用户。The present invention provides a computing migration method, a mobile computing device and an edge computing device, wherein the computing migration method includes: S1: a mobile computing node receives a computing task submitted by a user, and reads the task information of the task; wherein, the The user runs at least one mobile application; the task information includes the task type, the task size and the maximum tolerable delay of the task; S2: the mobile computing node judges whether the computing migration delay exceeds the maximum delay, and if so, executes S5, Otherwise, perform S3; wherein, the computing migration delay is the sum of the wireless transmission delay of the task and the computing delay of the task at the edge computing node; S3: The mobile computing node judges whether the local computing delay exceeds the maximum delay , if yes, execute S6; otherwise, execute S4; S4: the mobile computing node judges whether the local computing energy consumption is not greater than the transmission energy consumption, if so, execute S5; otherwise, execute S6; S5: the mobile computing node Perform computing processing on the task and return the processing result to the user; S6: The mobile computing node migrates the task to an edge computing node, and the edge computing node performs computing processing on the task and returns the processing result to the user.
本发明提供的计算迁移方法、移动计算设备及边缘计算设备,本发明提供的计算迁移方法考虑了每一个请求的计算任务可容忍的最大延迟,在满足其最大可容忍的延迟的条件下,进一步减少移动计算节点的任务处理能耗,既对计算任务提供任务粒度的严格的延迟保障,又能减少移动计算节点的处理能耗,延长其生存期限。本发明通过移动计算节点向边缘计算节点请求可使用的最大计算速率的方式,既可准确获知迁移的任务在边缘计算节点的计算延迟,又简化了获取任务在边缘计算节点的计算延迟的方式,提高了计算迁移决策过程的速率和效率。In the calculation migration method, mobile computing device and edge computing device provided by the present invention, the calculation migration method provided by the present invention takes into account the maximum delay that can be tolerated by each requested computing task, and under the condition that the maximum tolerable delay is satisfied, further Reducing the task processing energy consumption of mobile computing nodes not only provides a strict delay guarantee of task granularity for computing tasks, but also reduces the processing energy consumption of mobile computing nodes and prolongs their lifetime. The present invention not only can accurately know the computing delay of the migrated task at the edge computing node, but also simplifies the method of obtaining the computing delay of the task at the edge computing node by means of the mobile computing node requesting the edge computing node for the maximum computing rate that can be used. Improves the speed and efficiency of the computational migration decision process.
附图说明Description of drawings
图1为本发明提供的计算迁移方法的流程示意图;1 is a schematic flowchart of a computational migration method provided by the present invention;
图2为本发明提供的计算迁移方法中边缘计算节点的最大计算速率的查询过程示意图;2 is a schematic diagram of a query process of the maximum computing rate of an edge computing node in the computing migration method provided by the present invention;
图3为应用了本发明提供的计算迁移方法的计算迁移系统的结构示意图;3 is a schematic structural diagram of a computing migration system to which the computing migration method provided by the present invention is applied;
图4是与本发明提供的计算迁移方法对应的计算迁移装置的第一示意图;4 is a first schematic diagram of a computing migration device corresponding to the computing migration method provided by the present invention;
图5是与本发明提供的计算迁移方法对应的计算迁移装置的第二示意图;5 is a second schematic diagram of a computing migration device corresponding to the computing migration method provided by the present invention;
图6是本发明提供的移动计算设备的结构示意图;6 is a schematic structural diagram of a mobile computing device provided by the present invention;
图7是本发明提供的边缘计算设备的结构示意图;7 is a schematic structural diagram of an edge computing device provided by the present invention;
图8是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的移动计算节点能耗对比图;8 is a comparison diagram of the energy consumption of a mobile computing node provided by the computing migration method provided by the present invention, and all local computing algorithms and all migration algorithms;
图9是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的平均延迟对比图;Fig. 9 is the average delay comparison diagram of the calculation migration method provided by the present invention and all local calculation algorithms and all migration algorithms;
图10是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的延迟保障率对比图。FIG. 10 is a comparison diagram of the delay guarantee rate of the calculation migration method provided by the present invention, and all local calculation algorithms and all migration algorithms.
具体实施方式Detailed ways
本发明实施例的目的是提供一种计算迁移方法、移动计算设备及边缘计算设备,以解决处理计算任务时延迟较大、移动计算节点能耗较高的技术问题。The purpose of the embodiments of the present invention is to provide a computing migration method, mobile computing device and edge computing device, so as to solve the technical problems of large delay and high energy consumption of mobile computing nodes when processing computing tasks.
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中给出了本发明的首选实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容更加透彻全面。In order to facilitate understanding of the present invention, the present invention will be described more fully hereinafter with reference to the related drawings. Preferred embodiments of the invention are shown in the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
计算迁移是一种考虑何时、以何种方式将计算任务迁移到哪个计算节点的边缘计算关键技术。现有的计算迁移方法主要通过优化配置远程云计算服务器与网络边缘计算节点之间、分布式同构网络边缘节点之间的计算任务的方式来减少网络延迟,没有考虑同一接入网络下异构计算节点之间的计算迁移情况。实际上,随着智能终端计算能力的提升,智能终端也可以作为一个移动计算节点来执行计算任务。因此,一个边缘计算系统可以由多个异构的移动计算节点和边缘计算服务器节点构成。Computing migration is a key edge computing technology that considers when and how to migrate computing tasks to which computing node. Existing computing migration methods mainly reduce network latency by optimizing the configuration of computing tasks between remote cloud computing servers and network edge computing nodes, and between edge nodes in distributed homogeneous networks, without considering heterogeneous access networks under the same access network. Compute migration between compute nodes. In fact, with the improvement of the computing capability of the intelligent terminal, the intelligent terminal can also be used as a mobile computing node to perform computing tasks. Therefore, an edge computing system can be composed of multiple heterogeneous mobile computing nodes and edge computing server nodes.
请参阅图1,以下为本发明提供的一种计算迁移方法的实施例,包括:Referring to FIG. 1, the following is an embodiment of a computing migration method provided by the present invention, including:
S101:移动计算节点接收用户提交的计算任务,读取所述任务的任务信息;其中,所述用户运行至少一个移动应用程序;所述任务信息包括任务类型、任务大小和任务可容忍的最大延迟;S101: The mobile computing node receives the computing task submitted by the user, and reads the task information of the task; wherein the user runs at least one mobile application; the task information includes the task type, the task size and the maximum delay that the task can tolerate ;
S102:所述移动计算节点判断计算迁移延迟是否超过所述最大延迟,若是,则执行S105,否则执行S103;其中,所述计算迁移延迟为所述任务的无线传输延迟与所述任务在边缘计算节点的计算延迟之和;S102: The mobile computing node judges whether the calculation migration delay exceeds the maximum delay, and if so, executes S105, otherwise, executes S103; wherein, the calculation migration delay is the wireless transmission delay of the task and the edge computing of the task The sum of the computation delays of the nodes;
S103:所述移动计算节点判断本地计算延迟是否超过所述最大延迟,若是,则执行S106,否则执行S104;S103: The mobile computing node judges whether the local computing delay exceeds the maximum delay, and if so, executes S106, otherwise executes S104;
S104:所述移动计算节点判断本地计算能耗是否不大于传输能耗,若是,则执行S105;否则,执行S106;S104: The mobile computing node determines whether the local computing energy consumption is not greater than the transmission energy consumption, and if so, execute S105; otherwise, execute S106;
S105:所述移动计算节点对所述任务进行计算处理并将处理结果返回给用户;S105: The mobile computing node performs computing processing on the task and returns the processing result to the user;
S106:所述移动计算节点将所述任务迁移至边缘计算节点,所述边缘计算节点对所述任务进行计算处理并将处理结果返回给用户。S106: The mobile computing node migrates the task to an edge computing node, and the edge computing node performs computing processing on the task and returns the processing result to the user.
在步骤S101中,移动计算节点接收到运行移动应用程序的用户提交的一个计算任务,读取任务信息,包括任务类型M、任务以数据块为基本单位的数据大小S、任务以比特为基本单位的数据大小W、以及任务可容忍的最大延迟D,前往步骤S102。In step S101, the mobile computing node receives a computing task submitted by a user running the mobile application program, and reads the task information, including the task type M, the data size S of the task taking data blocks as the basic unit, and the task taking bits as the basic unit The data size W and the maximum delay D that the task can tolerate, go to step S102.
在步骤S102中,移动计算节点判断计算迁移延迟是否超过所述任务可容忍的最大延迟。令df表示计算迁移延迟,则df通过公式df=dc+dr获取,式中dc是所述任务的无线传输延迟,通过公式dc=W/R确定。其中,W为所述任务的以比特为基本单位的数据大小,R为无线传输速率。In step S102, the mobile computing node determines whether the computing migration delay exceeds the maximum delay that can be tolerated by the task. Let df denote the calculated migration delay, then d f is obtained by the formula d f =d c +d r , where dc is the wireless transmission delay of the task, determined by the formula d c =W/R. Wherein, W is the data size of the task in bits, and R is the wireless transmission rate.
无线传输速率R表示为:The wireless transmission rate R is expressed as:
式中,B是子载波带宽,自然数N表示所所述移动计算节点使用的无线传输子载波数量,Pn表示所述移动计算节点在子载波n(1≤n≤N)上的发射功率,gn表示所述移动计算节点在子载波n上的信道增益噪声比。In the formula, B is the sub-carrier bandwidth, the natural number N represents the number of wireless transmission sub-carriers used by the mobile computing node, P n represents the transmit power of the mobile computing node on the sub-carrier n (1≤n≤N), g n represents the channel gain-to-noise ratio of the mobile computing node on subcarrier n.
值得说明的是,所述移动计算节点在使用的无线传输子载波上的发射功率需要同时满足以下两个条件:It is worth noting that the transmit power of the mobile computing node on the used wireless transmission sub-carrier needs to satisfy the following two conditions at the same time:
(1)所述移动计算节点在使用的无线传输子载波上的发射功率之和不超过其最大发射功率;(1) The sum of the transmit power of the mobile computing node on the used wireless transmission sub-carriers does not exceed its maximum transmit power;
(2)所述移动计算节点在使用的任一个无线传输子载波上的发射功率大于零,即,所述移动计算节点在使用的无线传输子载波上的发射功率需要满足以下式子:(2) The transmit power of the mobile computing node on any wireless transmission sub-carrier used is greater than zero, that is, the transmit power of the mobile computing node on the wireless transmission sub-carrier used needs to satisfy the following formula:
式中,P是所述移动节点的最大发射功率;dr是所述任务在边缘计算节点的计算延迟,dr的值由公式dr=S/fr确定。In the formula, P is the maximum transmit power of the mobile node; d r is the computing delay of the task at the edge computing node, and the value of d r is determined by the formula d r =S/f r .
公式dr=S/fr中,fr为边缘计算节点当前时刻可用的最大计算速率;所述边缘计算节点当前时刻可用的最大计算速率通过边缘计算节点最大计算速率查询过程获取。如果满足df≤D,则计算迁移延迟没有超过所述任务可容忍的最大延迟,执行步骤S103;否则,执行步骤S105。In the formula d r =S/f r , fr is the maximum computing rate available at the current moment of the edge computing node; the maximum computing rate available at the current moment of the edge computing node is obtained through the query process of the maximum computing rate of the edge computing node. If d f ≤ D is satisfied, then the calculation migration delay does not exceed the maximum delay that can be tolerated by the task, and step S103 is performed; otherwise, step S105 is performed.
在步骤S103中,移动计算节点判断本地计算延迟是否超过所述任务可容忍的最大延迟。令dl表示本地计算延迟,dl的值由公式dl=(Q+S)/fl确定;其中,Q为所述移动计算节点缓存队列中等待计算的数据块大小,fi为所述移动计算节点的计算速率。如果满足dl≤D,则本地计算延迟没有超过所述任务可容忍的最大延迟,前往步骤S104;否则,所述移动计算节点将所述任务迁移至边缘计算节点,执行步骤S106。In step S103, the mobile computing node determines whether the local computing delay exceeds the maximum delay that can be tolerated by the task. Let d l represent the local computing delay, and the value of d l is determined by the formula d l =(Q+S)/f l ; wherein, Q is the size of the data block waiting to be calculated in the cache queue of the mobile computing node, and f i is the The calculation rate of the mobile computing node. If d l ≤ D is satisfied, the local computing delay does not exceed the maximum delay that can be tolerated by the task, and the process goes to step S104; otherwise, the mobile computing node migrates the task to the edge computing node, and step S106 is performed.
可以理解的是,移动计算节点将所述任务迁移至边缘计算节点,即移动计算节点按步骤S102或步骤S104的发射功率将所述任务通过子载波1至N发送给边缘计算节点。It can be understood that the mobile computing node migrates the task to the edge computing node, that is, the mobile computing node sends the task to the edge computing node through subcarriers 1 to N according to the transmit power of step S102 or step S104.
步骤S104:移动计算节点判断本地计算能耗是否不大于传输能耗。令Ei表示本地计算能耗,其通过El=α×S×fl×fl确定,其中,α是本地计算能耗因子。Step S104: The mobile computing node determines whether the local computing energy consumption is not greater than the transmission energy consumption. Let E i denote the local computing energy consumption, which is determined by El = α × S × f l ×f l , where α is the local computing energy consumption factor.
令Eo表示传输能耗,传输能耗是所述移动计算节点为传输所述任务而使用的子载波的发射功率之和与所述任务的无线传输延迟之积,即,Let E denote the transmission energy consumption, which is the product of the sum of the transmit powers of the subcarriers used by the mobile computing node to transmit the task and the wireless transmission delay of the task, that is,
如果满足El≤Ec,则本地能耗不大于传输能耗,执行步骤S105;否,则跳往步骤S106。 If E l ≤ E c is satisfied, the local energy consumption is not greater than the transmission energy consumption, and step S105 is executed; otherwise, the process goes to step S106 .
在步骤S105中,移动计算节点对所述任务进行计算处理得到处理结果,执行计算处理的计算节点即移动计算节点向用户返回处理结果。In step S105, the mobile computing node performs computing processing on the task to obtain a processing result, and the computing node that performs the computing processing, that is, the mobile computing node, returns the processing result to the user.
在步骤S106中,所述移动计算节点将所述任务迁移至边缘计算节点,边缘计算节点对所述任务进行计算处理得到处理结果,执行计算处理的计算节点即边缘计算节点向用户返回处理结果。In step S106, the mobile computing node migrates the task to an edge computing node, the edge computing node performs computing processing on the task to obtain a processing result, and the computing node performing the computing processing, that is, the edge computing node, returns the processing result to the user.
请参阅图2,获取所述边缘计算节点当前时刻可用的最大计算速率的具体过程为:Referring to Figure 2, the specific process of obtaining the maximum computing rate available at the current moment of the edge computing node is as follows:
步骤S201:移动计算节点向边缘计算节点发送消息,请求查询边缘计算节点当前时刻可用的最大计算速率;Step S201: the mobile computing node sends a message to the edge computing node, requesting to query the current maximum computing rate available to the edge computing node;
步骤S202:边缘计算节点确定当前时刻可用的最大计算速率;Step S202: the edge computing node determines the maximum computing rate available at the current moment;
步骤S203:边缘计算节点向移动计算节点返回当前时刻可用的最大计算速率;Step S203: the edge computing node returns the maximum computing rate available at the current moment to the mobile computing node;
步骤S204:移动计算节点接收边缘计算节点返回的当前时刻可用的最大计算速率。Step S204: The mobile computing node receives the maximum computing rate available at the current moment returned by the edge computing node.
本实施例中,移动计算节点查询边缘计算节点的最大计算速率的具体过程为:移动计算节点向边缘计算节点发送请求(即发送<Request>信息),查询该该边缘计算节点可用的最大计算速率;边缘计算节点接收到移动计算节点的请求后,确定当前时刻可用的最大计算速率;边缘计算节点向所述移动计算节点作出响应(即发送<Response>消息),返回其当前时刻可用的最大计算速率fk;移动计算节点接收边缘计算节点返回的当前时刻可用的最大计算速率。In this embodiment, the specific process for the mobile computing node to query the maximum computing rate of the edge computing node is as follows: the mobile computing node sends a request to the edge computing node (ie, sends <Request> information), and queries the maximum computing rate available to the edge computing node. ; After the edge computing node receives the request of the mobile computing node, it determines the maximum computing rate available at the current moment; the edge computing node responds to the mobile computing node (that is, sends a <Response> message), and returns the maximum computing rate available at the current moment. Rate f k ; the mobile computing node receives the maximum computing rate available at the current moment returned by the edge computing node.
具体的,边缘计算节点确定当前时刻可用的最大计算速率的具体包括如下步骤:Specifically, determining the maximum computing rate available at the current moment by the edge computing node specifically includes the following steps:
首先,边缘计算节点确定当前时刻可运行的虚拟机集合VM={V1,V2,...,Vm,...,VM},设上述虚拟机集合对应的计算速率为f={f1,f2,...,fm,...,fM},其中,fm表示虚拟机Vm(1≤m≤M)的计算速率,则当前时刻可运行的虚拟机集合的计算速率之和满足:
其中,fCPU为所述边缘计算节点的CPU计算速率;First, the edge computing node determines the runable virtual machine set VM = {V 1 , V 2 , ..., V m , ..., VM } at the current moment, and the calculation rate corresponding to the above virtual machine set is set as f = { f 1 , f 2 , . The sum of the computation rates of the set satisfies: Wherein, f CPU is the CPU computing rate of the edge computing node;其次,从当前时刻可运行的虚拟机集合中选择满足fk=max f(1≤k≤M)的虚拟机Vk,其中max(·)表示最大值函数,则虚拟机Vk具有最大计算速率,将其计算速率fk作为所述边缘计算节点当前时刻可用的最大计算速率。Next, select a virtual machine Vk that satisfies f k =max f (1≤k≤M) from the set of runnable virtual machines at the current moment, where max(·) represents the maximum value function, then the virtual machine V k has the maximum computing rate , and take its computing rate f k as the maximum computing rate available to the edge computing node at the current moment.
请参阅图3,一般情况下,考虑特定无线网络中有若干个移动计算节点和一个边缘计算节点,移动计算节点随机地分布在无线网络覆盖范围内,边缘计算节点位于无线网络的核心,即边缘计算节点位于基站附近,移动计算节点和边缘计算节点都具有计算处理能力。一般地,边缘计算节点的计算处理能力高于移动计算节点的计算处理能力,移动计算节点在物理位置上距离运行移动应用程序的用户更近。Please refer to Figure 3. In general, consider that there are several mobile computing nodes and one edge computing node in a specific wireless network. The mobile computing nodes are randomly distributed in the coverage of the wireless network, and the edge computing nodes are located at the core of the wireless network, that is, the edge Computing nodes are located near the base station, and both mobile computing nodes and edge computing nodes have computing processing capabilities. Generally, the computing processing capability of the edge computing node is higher than that of the mobile computing node, and the mobile computing node is physically closer to the user running the mobile application program.
本实施例中,为了满足用户所请求的计算任务的延迟要求,移动计算节点根据自己的计算资源状态、无线网络状态和边缘计算节点的计算资源状态,在本地对所请求的计算任务进行处理,或者迁移到边缘计算节点进行计算处理。In this embodiment, in order to meet the delay requirement of the computing task requested by the user, the mobile computing node locally processes the requested computing task according to its own computing resource status, wireless network status and computing resource status of the edge computing node, Or migrate to edge computing nodes for computing processing.
请参阅图1至图3,当任意一个移动计算节点接收到运行移动应用程序的用户提交的一个计算任务请求时,移动计算节点执行计算迁移方法中的如下步骤:读取任务信息,当计算迁移延迟在任务可容忍的最大延迟范围内时,则进一步判断本地计算延迟是否在所述任务可容忍的最大延迟范围内,当本地计算延迟也在所述任务可容忍的最大延迟范围内时,则本地计算和迁移到边缘计算节点的计算都能满足所述任务的最大延迟需求。Please refer to FIG. 1 to FIG. 3, when any mobile computing node receives a computing task request submitted by a user running a mobile application, the mobile computing node performs the following steps in the computing migration method: read task information, when computing migration When the delay is within the maximum delay range that the task can tolerate, it is further judged whether the local computing delay is within the maximum delay range that the task can tolerate. When the local computing delay is also within the maximum delay range that the task can tolerate, then Both local computing and computing migrated to edge computing nodes can meet the maximum latency requirement of the task.
然后,进一步判断本地计算能耗是否不大于传输能耗,当本地计算能耗小于等于传输能耗时,则所述移动计算节点决定在本地对所述任务进行计算处理,所述移动计算节点将该任务放入本地CPU计算队列;否则,所述移动计算节点决定将所述任务迁移到边缘计算节点,所述移动计算节点通过无线基站将所述任务发送给边缘计算节点,边缘计算节点调度一个虚拟机来处理所述任务。Then, it is further judged whether the local computing energy consumption is not greater than the transmission energy consumption, and when the local computing energy consumption is less than or equal to the transmission energy consumption, the mobile computing node decides to perform computing processing on the task locally, and the mobile computing node will The task is put into the local CPU computing queue; otherwise, the mobile computing node decides to migrate the task to the edge computing node, the mobile computing node sends the task to the edge computing node through the wireless base station, and the edge computing node schedules a virtual machine to handle the task.
可以理解的是,当计算迁移延迟不能满足所述任务的延迟要求时,所述移动计算节点决定在本地对所述任务进行处理;当计算迁移延迟能满足所述任务的延迟要求而本地计算延迟不能满足所述任务的延迟要求时,所述移动计算节点将所述任务迁移到边缘计算节点进行处理。It can be understood that when the calculation migration delay cannot meet the delay requirement of the task, the mobile computing node decides to process the task locally; when the calculation migration delay can meet the delay requirement of the task and the local calculation delay When the delay requirement of the task cannot be met, the mobile computing node migrates the task to an edge computing node for processing.
本发明实施例提供的计算迁移方法,考虑了每一个请求的计算任务可容忍的最大延迟,在满足其最大可容忍的延迟的条件下,进一步减少移动计算节点的任务处理能耗,既对计算任务提供任务粒度的严格的延迟保障,又能减少移动计算节点的处理能耗,延长其生存期限。本发明通过移动计算节点向边缘计算节点请求可使用的最大计算速率的方式,既可准确获知迁移的任务在边缘计算节点的计算延迟,又简化了获取任务在边缘计算节点的计算延迟的方式,提高了计算迁移决策过程的速率和效率。The calculation migration method provided by the embodiment of the present invention considers the maximum delay that can be tolerated by each requested computing task, and further reduces the task processing energy consumption of the mobile computing node under the condition that the maximum tolerable delay is satisfied. Tasks provide a strict delay guarantee of task granularity, and can also reduce the processing energy consumption of mobile computing nodes and prolong their lifetime. The present invention not only can accurately know the computing delay of the migrated task at the edge computing node, but also simplifies the method of obtaining the computing delay of the task at the edge computing node by means of the mobile computing node requesting the edge computing node for the maximum computing rate that can be used. Improves the speed and efficiency of the computational migration decision process.
请参阅图4,本发明提供的计算迁移装置可以设置在移动计算节点上,所述装置包括:Referring to FIG. 4 , the computing migration device provided by the present invention can be set on a mobile computing node, and the device includes:
计算任务感知模块11,用于接收运行移动应用程序的用户提交的任务,获取任务信息;A computing task perception module 11, configured to receive tasks submitted by users running mobile applications, and obtain task information;
本地计算延迟、能耗感知模块12,用于计算所述任务在本地计算所经历的本地计算延迟和产生的本地计算能耗;A local computing delay and energy consumption perception module 12, configured to calculate the local computing delay experienced by the task in local computing and the generated local computing energy consumption;
无线传输速率和功率分配模块13,用于获取无线传输速率、所述装置在所使用的无线传输子载波上的发射功率、无线传输延迟和传输能耗;a wireless transmission rate and power allocation module 13, configured to acquire the wireless transmission rate, the transmit power of the device on the used wireless transmission sub-carrier, the wireless transmission delay and the transmission energy consumption;
迁移计算延迟感知模块14,用于发起边缘计算节点最大计算速率查询过程,获取边缘计算节点可用的最大计算速率,以及获取所述任务在边缘计算节点的计算延迟;The migration calculation delay perception module 14 is used to initiate a query process of the maximum calculation rate of the edge computing node, obtain the maximum calculation rate available to the edge computing node, and obtain the computing delay of the task at the edge computing node;
计算迁移决策模块15,用于决定是否在本地对所请求的计算任务进行处理,或者迁移到边缘计算节点进行计算处理;The computing migration decision module 15 is used to decide whether to process the requested computing task locally, or migrate to an edge computing node for computing processing;
本地计算调度模块16,在本地对计算任务进行处理,返回处理结果;The local computing scheduling module 16 processes the computing task locally and returns the processing result;
计算迁移执行模块17,将任务迁移至边缘计算节点。The calculation migration execution module 17 migrates the task to the edge computing node.
所述装置的工作过程如下:计算任务感知模块11收到用户提交的计算任务请求,读取任务信息,将所述信息传递给计算迁移决策模块15。计算迁移决策模块15分别从本地计算延迟、能耗感知模块12获取本地计算延迟和本地计算能耗,从无线传输速率和功率分配模块13获取传输延迟,从迁移计算延迟感知模块14获取所述任务在边缘计算节点的计算延迟;然后,决定是否在本地对所请求的计算任务进行处理,或者迁移到边缘计算节点进行计算处理。若在本地对计算任务进行处理,则将所述任务发送给本地计算调度模块16处理;若将任务迁移至边缘计算节点,则通过计算迁移执行模块17将所述任务发送给所述边缘计算节点。The working process of the device is as follows: the computing task perception module 11 receives the computing task request submitted by the user, reads the task information, and transmits the information to the computing migration decision module 15 . The calculation migration decision module 15 obtains the local calculation delay and local calculation energy consumption from the local calculation delay and energy consumption sensing module 12, respectively obtains the transmission delay from the wireless transmission rate and power allocation module 13, and obtains the task from the migration calculation delay sensing module 14. The computing delay at the edge computing node; then, it is decided whether to process the requested computing task locally, or migrate to the edge computing node for computing processing. If the computing task is processed locally, the task is sent to the local computing scheduling module 16 for processing; if the task is migrated to an edge computing node, the task is sent to the edge computing node through the computing migration execution module 17 .
具体的,计算迁移决策模块15向迁移计算延迟感知模块14发送消息以获取边缘计算节点的计算延迟,当迁移计算延迟感知模块14接收到计算迁移决策模块15所发送的消息后,发起边缘计算节点最大计算速率查询过程,获取边缘计算节点可用的最大计算速率,接着计算所述任务在边缘计算节点的计算延迟,并返回给计算迁移决策模块15。Specifically, the calculation migration decision module 15 sends a message to the migration calculation delay perception module 14 to obtain the calculation delay of the edge computing node. When the migration calculation delay perception module 14 receives the message sent by the calculation migration decision module 15, it initiates the edge computing node. The maximum computing rate query process obtains the maximum computing rate available to the edge computing node, then calculates the computing delay of the task at the edge computing node, and returns it to the computing migration decision module 15 .
请参阅图5,本发明提供的计算迁移装置可以设置在边缘计算节点上,所述装置包括:Referring to FIG. 5, the computing migration device provided by the present invention can be set on an edge computing node, and the device includes:
计算速率查询响应模块31,用于对移动计算节点请求的边缘计算节点可用最大计算速率查询作出响应,返回所述边缘计算节点当前时刻可用的最大计算速率;The computing rate query response module 31 is configured to respond to the query of the maximum computing rate available for the edge computing node requested by the mobile computing node, and return the maximum computing rate available at the current moment of the edge computing node;
资源管理模块32,用于监控所述边缘计算节点的计算资源使用情况,确定当前时刻可运行的虚拟机集合;A resource management module 32, configured to monitor the computing resource usage of the edge computing node, and determine a set of virtual machines that can be run at the current moment;
计算迁移任务感知模块33,用于感知从移动计算节点迁移过来的计算任务;The computing migration task perception module 33 is used to perceive computing tasks migrated from the mobile computing node;
计算迁移模块34,用于确定如何执行移动计算节点迁移过来的计算任务;The calculation migration module 34 is used for determining how to execute the calculation task migrated by the mobile computing node;
调度模块35,用于处理迁移过来的计算任务。The scheduling module 35 is used to process the migrated computing tasks.
所述装置的工作过程如下:当计算速率查询响应模块31接收到移动计算节点发送过来的边缘计算节点最大可用计算速率查询请求,所述计算速率查询响应模块31向资源管理模块32查询当前可运行的虚拟机集合,所述资源管理模块32向所述计算速率查询响应模块31返回当前时刻可运行的虚拟机集合和对应的计算速率,所述计算速率查询响应模块31从中选择具有最大计算速率的虚拟机,将其计算速率作为所述边缘计算节点当前时刻可用的最大计算速率,返回给所述移动计算节点。当计算迁移任务感知模块33接收到移动计算节点发送过来的计算任务,将所述任务信息发送给计算迁移模块34,计算迁移模块34从资源管理模块32中获取当前时刻可运行的虚拟机集合,然后从中选择一个虚拟机,将所述虚拟机的信息和所述任务的信息发送给调度模块35。调度模块35接收到计算迁移模块34的虚拟机信息和计算任务信息后,启用所述虚拟机执行所述计算任务,并返回处理结果。The working process of the device is as follows: when the computing rate query response module 31 receives the query request for the maximum available computing rate of the edge computing node sent by the mobile computing node, the computing rate query response module 31 queries the resource management module 32 for the currently available operation. set of virtual machines, the resource management module 32 returns the set of virtual machines that can be run at the current moment and the corresponding calculation rate to the calculation rate query response module 31, and the calculation rate query response module 31 selects the one with the maximum calculation rate. The virtual machine returns its computing rate to the mobile computing node as the maximum computing rate available to the edge computing node at the current moment. When the computing migration task perception module 33 receives the computing task sent by the mobile computing node, it sends the task information to the computing migration module 34, and the computing migration module 34 obtains the set of virtual machines that can be run at the current moment from the resource management module 32, Then, a virtual machine is selected among them, and the information of the virtual machine and the information of the task are sent to the scheduling module 35 . After receiving the virtual machine information and the computing task information from the computing migration module 34, the scheduling module 35 enables the virtual machine to execute the computing task, and returns the processing result.
请参阅图6,本发明还提供了一种移动计算设备,包括:Referring to FIG. 6, the present invention also provides a mobile computing device, including:
处理器,以及与所述处理器通信连接的存储器;a processor, and a memory communicatively coupled to the processor;
其中,所述存储器上存储有可在所述处理器上运行的指令,所述指令被所述处理器执行时实现所述的计算迁移方法中的移动计算节点所执行的步骤。The memory stores instructions that can be executed on the processor, and when the instructions are executed by the processor, implement the steps performed by the mobile computing node in the computing migration method.
具体的,所述设备可以设置在移动计算节点上,所述设备包括:处理器21,以及与所述处理器通信连接的存储器22;所述存储器22上存储有可在所述处理器21上运行的计算迁移程序,所述计算迁移程序被所述处理器21执行时实现计算迁移方法中的移动计算节点所执行的步骤。Specifically, the device can be set on a mobile computing node, and the device includes: a processor 21, and a memory 22 connected in communication with the processor; the memory 22 stores data that can be stored on the processor 21 The running computing migration program, when the computing migration program is executed by the processor 21, implements the steps performed by the mobile computing node in the computing migration method.
请参阅图7,本发明还提供了一种边缘计算设备,包括:Referring to FIG. 7, the present invention also provides an edge computing device, including:
处理器,以及与所述处理器通信连接的存储器;a processor, and a memory communicatively coupled to the processor;
所述处理器和所述处理器通信连接的存储器能被虚拟化为一个及以上虚拟机,所述设备上同时运行的所有虚拟机的计算速率之和不超过所述处理器的最大速率;所述存储器上存储有可在所述处理器上运行的指令,所述指令被所述处理器执行时实现所述的计算迁移方法中的边缘计算节点所执行的步骤。The processor and the memory communicatively connected to the processor can be virtualized into one or more virtual machines, and the sum of the computing rates of all virtual machines running simultaneously on the device does not exceed the maximum rate of the processor; The memory stores instructions that can be run on the processor, and when the instructions are executed by the processor, implement the steps performed by the edge computing node in the computing migration method.
具体的,所述设备可以设置在边缘计算节点上,所述设备包括:处理器41,以及与所述处理器耦接的存储器42;所述处理器41和所述处理器耦接的存储器42能被虚拟化为一个及以上虚拟机,所述设备上同时运行的所有虚拟机的计算速率之和不超过所述处理器41的最大速率;所述存储器42上存储有可在所述处理器41上运行的计算迁移程序;所述计算迁移程序被所述处理器41执行时将实现如上述实施例1和2的计算迁移方法中的边缘计算节点的步骤。Specifically, the device may be set on an edge computing node, and the device includes: a processor 41 and a memory 42 coupled to the processor; the processor 41 and the memory 42 coupled to the processor Can be virtualized into one or more virtual machines, and the sum of the computing rates of all virtual machines running on the device at the same time does not exceed the maximum rate of the processor 41; The computing migration program running on 41; when the computing migration program is executed by the processor 41, it will implement the steps of the edge computing node in the computing migration methods of the above-mentioned Embodiments 1 and 2.
本发明的效果可以通过以下仿真结果进一步说明:The effect of the present invention can be further illustrated by the following simulation results:
1、仿真条件1. Simulation conditions
采用Matlab评估本发明提供的计算迁移方法的延迟保障和移动计算节点能耗性能。采用如图3所示的计算迁移系统模型,所示系统设置4个本地计算节点和1个边缘计算节点,本地计算节点的计算速率均为fl=0.6GHz,边缘计算节点的CPU计算速率fcpu为2GHz;移动计算节点通过无线网络与边缘计算节点通信,每个移动计算节点的最大发射功率为0.1W,可用子载波数量为16,每个子载波的带宽为0.3125MHz;移动计算节点的本地计算能耗因子设置为10-28;所述移动计算节点中,有3个移动计算节点接收的任务以比特为基本单位的平均大小为250KB,平均数据块大小为475MHz,任务可容忍的最大延迟为1ms;另一个移动计算节点所接收的任务以比特为基本单位的的平均大小为420KB,平均数据块大小为798MHz,任务可容忍的最大延迟为10ms。Matlab is used to evaluate the delay guarantee and the energy consumption performance of the mobile computing node of the computing migration method provided by the present invention. Using the computing migration system model shown in Figure 3, the system is set with 4 local computing nodes and 1 edge computing node, the computing speed of the local computing nodes is fl=0.6GHz, and the CPU computing speed fcpu of the edge computing nodes is 2GHz; mobile computing nodes communicate with edge computing nodes through wireless networks, the maximum transmit power of each mobile computing node is 0.1W, the number of available subcarriers is 16, and the bandwidth of each subcarrier is 0.3125MHz; the local computing power of mobile computing nodes The consumption factor is set to 10-28; among the mobile computing nodes, the tasks received by 3 mobile computing nodes have an average size of 250KB in bits, an average data block size of 475MHz, and a maximum tolerable delay of 1ms. ; The average size of the task received by another mobile computing node in bits is 420KB, the average data block size is 798MHz, and the maximum delay that the task can tolerate is 10ms.
仿真效果图8-10中横坐标任务请求率是每个移动计算节点平均每毫秒所接收到的计算请求的任务数量;仿真效果图8-10中所述全部本地计算算法是在每个移动计算节点处理该节点所接收到的计算任务请求;所述全部迁移算法是所有移动计算节点都将其所接收到的计算任务迁移到边缘计算节点进行处理。The abscissa task request rate in the simulation effect Figure 8-10 is the number of tasks that each mobile computing node receives on average per millisecond; all local computing algorithms described in the simulation effect Figure 8-10 The node processes the computing task request received by the node; the all migration algorithm is that all mobile computing nodes migrate the computing tasks received by the node to edge computing nodes for processing.
2、仿真结果对比2. Comparison of simulation results
图8是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的移动节点能耗对比图,如图8所示,在各种任务请求率下,本发明提供的计算迁移方法的移动节点能耗均低于全部本地计算算法的能耗,但是高于全部迁移的能耗。FIG. 8 is a comparison diagram of the energy consumption of the mobile node provided by the calculation migration method provided by the present invention and all local calculation algorithms and all migration algorithms. As shown in FIG. 8 , under various task request rates, the mobile node of the calculation migration method provided by the present invention The energy consumption of nodes is lower than that of all local computing algorithms, but higher than that of all migrations.
图9是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的平均延迟对比图,如图9所示,在各种任务请求率下,本发明提供的计算迁移方法的平均延迟均低于全部本地计算算法的平均延迟;随着任务请求率的上升,采用全部迁移算法会使得边缘计算节点的可用资源越来越少,因此该算法的平均延迟随着任务请求率的上升快速上升;而本发明提供的计算迁移算法能在任务请求率上升的情况下,仍然保持较低的平均延迟,尤其,当任务请求率大于0.7tasks/ms时,本发明提供的计算迁移方法仍然能提供低于1.5ms的平均延迟,延迟保证效果非常显著。FIG. 9 is a comparison diagram of the average delay of the calculation migration method provided by the present invention and all local calculation algorithms and all migration algorithms. As shown in FIG. 9 , under various task request rates, the average delay of the calculation migration method provided by the present invention is It is lower than the average delay of all local computing algorithms; with the increase of task request rate, the use of all migration algorithms will make the available resources of edge computing nodes less and less, so the average delay of this algorithm increases rapidly with the increase of task request rate And the calculation migration algorithm provided by the present invention can still maintain a lower average delay when the task request rate rises, especially, when the task request rate is greater than 0.7tasks/ms, the calculation migration method provided by the present invention can still provide Below an average latency of 1.5ms, the latency guarantee is very effective.
图10是本发明提供的计算迁移方法与全部本地计算算法和全部迁移算法的延迟保障率对比图,延迟保障率是延迟得到保障的任务的数量与到达系统的总的任务的数量的比值。如图10所示,在各种任务请求率下,本发明提供的计算迁移方法的延迟保障率均高于全部本地计算算法的延迟保障率,因此明显优于全部本地计算算法;在较低的任务请求率下,边缘节点的计算资源充足,将全部计算任务迁移到边缘节点可以使所有请求的任务的延迟得到保障。10 is a comparison diagram of the delay guarantee ratio of the calculation migration method provided by the present invention and all local calculation algorithms and all migration algorithms. The delay guarantee ratio is the ratio of the number of tasks whose delay is guaranteed to the total number of tasks arriving in the system. As shown in Figure 10, under various task request rates, the delay guarantee rate of the calculation migration method provided by the present invention is higher than that of all local calculation algorithms, so it is obviously better than all local calculation algorithms; Under the task request rate, the computing resources of edge nodes are sufficient, and migrating all computing tasks to edge nodes can ensure the delay of all requested tasks.
可见,在较低的任务请求率下,采用全部迁移算法的延迟保障率高于本发明所提计算迁移方法的延迟保障率;随着任务请求率的上升,采用全部迁移算法,将会使得边缘节点可用资源越来越少,甚至造成边缘节点的拥塞,因此,随着任务请求率的上升,全部迁移算法的延迟保障率快速下降。It can be seen that at a lower task request rate, the delay guarantee rate using all migration algorithms is higher than the delay guarantee rate of the calculation migration method proposed in the present invention; as the task request rate increases, using all migration algorithms will make the edge The available resources of nodes are getting less and less, even causing congestion of edge nodes. Therefore, with the increase of task request rate, the delay guarantee rate of all migration algorithms decreases rapidly.
而本发明所提计算迁移方法的延迟保障率随着任务请求率的上升而下降缓慢,尤其,当任务请求率大于0.7tasks/ms时,本发明提供的计算迁移方法仍然能提供高于85%的延迟保障率,因此,本发明所提计算迁移方法在延迟保障稳定性、延迟保障率方面效果显著。However, the delay guarantee rate of the calculation migration method proposed in the present invention decreases slowly with the increase of the task request rate. In particular, when the task request rate is greater than 0.7 tasks/ms, the calculation migration method provided by the present invention can still provide more than 85% Therefore, the calculation migration method proposed in the present invention has remarkable effects in terms of delay guarantee stability and delay guarantee rate.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (4)
1. A method of computing migration, comprising:
s1: a mobile computing node receives a computing task submitted by a user and reads task information of the task; wherein the user runs at least one mobile application, and the task information comprises a task type, a task size and a maximum delay tolerable for the task;
s2: the mobile computing node judges whether the calculated migration delay exceeds the maximum delay, if so, the step S5 is executed, otherwise, the step S3 is executed; wherein the calculation migration delay is the sum of the wireless transmission delay of the task and the calculation delay of the task at the edge calculation node;
wireless transmission delay d of said task c Comprises the following steps: d c W/R; wherein W is data of the task with bit as basic unitThe size, R, is the wireless transmission rate,
b denotes the sub-carrier bandwidth, N denotes the number of radio transmission sub-carriers used by the mobile computing node, P n Representing the transmission power of the mobile computing node on subcarrier n, g n Representing the channel gain noise ratio of the mobile computing node on a subcarrier N, wherein N is more than or equal to 1 and less than or equal to N;
computing delay d of the task at the edge computing node r Comprises the following steps: d is a radical of r =S/f r (ii) a Wherein S is the data block size of the task, f r Calculating the maximum available calculation rate of the node at the current moment for the edge;
s3: the mobile computing node judges whether the local computing delay exceeds the maximum delay, if so, executes S6, otherwise executes S4;
the local computation delay d l Comprises the following steps: d l =(Q+S)/f l (ii) a Q is the size of a data block waiting for calculation in a cache queue of the mobile computing node, S is the size of the data block of the task, f l Computing a rate for the mobile computing node;
s4: the mobile computing node judges whether the local computing energy consumption is not greater than the transmission energy consumption, if so, S5 is executed; otherwise, go to S6;
said local computing energy consumption E l Comprises the following steps: e l =α×S×f l ×f l (ii) a Wherein α is a local computational energy consumption factor;
s5: the mobile computing node performs computing processing on the task and returns a processing result to the user;
s6: and the mobile computing node migrates the task to an edge computing node, and the edge computing node performs computing processing on the task and returns a processing result to the user.
2. The computation migration method according to claim 1, wherein the specific process of obtaining the maximum computation rate available at the current time of the edge computation node is:
the mobile computing node sends a message to the edge computing node to request to inquire the maximum computing rate available at the current moment of the edge computing node;
the edge computing node determines the maximum computing rate available at the current moment;
the edge computing node returns the maximum computing rate available at the current moment to the mobile computing node;
and the mobile computing node receives the maximum computing rate available at the current moment returned by the edge computing node.
3. A mobile computing device, comprising:
a processor, and a memory communicatively coupled to the processor;
wherein the memory has stored thereon instructions executable on the processor, the instructions when executed by the processor implementing the steps performed by the mobile computing node in the compute migration method of claim 1 or 2.
4. An edge computing device, comprising:
a processor, and a memory communicatively coupled to the processor;
the processor and the memory communicatively coupled to the processor can be virtualized into one or more virtual machines, the sum of the computational rates of all virtual machines running simultaneously on the device not exceeding the maximum rate of the processor; the memory has stored thereon instructions executable on the processor, the instructions when executed by the processor implementing the steps performed by the edge compute node in the compute migration method of claim 1 or 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010980258.8A CN112104737B (en) | 2020-09-17 | 2020-09-17 | Calculation migration method, mobile computing equipment and edge computing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010980258.8A CN112104737B (en) | 2020-09-17 | 2020-09-17 | Calculation migration method, mobile computing equipment and edge computing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112104737A CN112104737A (en) | 2020-12-18 |
CN112104737B true CN112104737B (en) | 2022-08-30 |
Family
ID=73760232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010980258.8A Active CN112104737B (en) | 2020-09-17 | 2020-09-17 | Calculation migration method, mobile computing equipment and edge computing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112104737B (en) |
Families Citing this family (1)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113241854B (en) * | 2021-06-10 | 2022-12-06 | 南方电网科学研究院有限责任公司 | Remote updating method and system for power utilization state of user |
Citations (4)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109413676A (en) * | 2018-12-11 | 2019-03-01 | 西北大学 | Combine the edge calculations moving method of lower uplink in a kind of ultra dense heterogeneous network |
WO2019204898A1 (en) * | 2018-04-26 | 2019-10-31 | 10518590 Canada Inc. | Workload scheduling in a distributed computing environment based on an applied computational value |
EP3605329A1 (en) * | 2018-07-31 | 2020-02-05 | Commissariat à l'énergie atomique et aux énergies alternatives | Connected cache empowered edge cloud computing offloading |
CN111491332A (en) * | 2020-04-20 | 2020-08-04 | 中国石油大学(北京) | Dynamic service migration method and device |
-
2020
- 2020-09-17 CN CN202010980258.8A patent/CN112104737B/en active Active
Patent Citations (4)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019204898A1 (en) * | 2018-04-26 | 2019-10-31 | 10518590 Canada Inc. | Workload scheduling in a distributed computing environment based on an applied computational value |
EP3605329A1 (en) * | 2018-07-31 | 2020-02-05 | Commissariat à l'énergie atomique et aux énergies alternatives | Connected cache empowered edge cloud computing offloading |
CN109413676A (en) * | 2018-12-11 | 2019-03-01 | 西北大学 | Combine the edge calculations moving method of lower uplink in a kind of ultra dense heterogeneous network |
CN111491332A (en) * | 2020-04-20 | 2020-08-04 | 中国石油大学(北京) | Dynamic service migration method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112104737A (en) | 2020-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108509276B (en) | 2021-11-30 | Video task dynamic migration method in edge computing environment |
CN109857546A (en) | 2019-06-07 | The mobile edge calculations discharging method of multiserver and device based on Lyapunov optimization |
Yu et al. | 2018 | Pre-migration of vehicle to network services based on priority in mobile edge computing |
KR101201904B1 (en) | 2012-11-16 | Apparatus and method for resource distribution in cloud computing |
CN114340016B (en) | 2022-07-26 | Power grid edge calculation unloading distribution method and system |
WO2019200716A1 (en) | 2019-10-24 | Fog computing-oriented node computing task scheduling method and device thereof |
CN111132235B (en) | 2023-04-07 | Mobile offload migration algorithm based on improved HRRN algorithm and multi-attribute decision |
CN111475274A (en) | 2020-07-31 | Cloud collaborative multi-task scheduling method and device |
CN110489176B (en) | 2022-05-10 | A multi-access edge computing task offloading method based on the packing problem |
CN112188551B (en) | 2023-04-07 | Computation migration method, computation terminal equipment and edge server equipment |
CN108495358A (en) | 2018-09-04 | A kind of network slice selection method based on NFV |
Rui et al. | 2019 | Computation offloading in a mobile edge communication network: A joint transmission delay and energy consumption dynamic awareness mechanism |
CN110096362A (en) | 2019-08-06 | A kind of multitask discharging method based on Edge Server cooperation |
CN108933815A (en) | 2018-12-04 | A kind of control method of the Edge Server of mobile edge calculations unloading |
CN111511028B (en) | 2023-04-07 | Multi-user resource allocation method, device, system and storage medium |
CN102426475A (en) | 2012-04-25 | Energy saving method, energy saving management server and system under desktop virtual environment |
CN110489233A (en) | 2019-11-22 | Equipment task unloading and cpu frequency modulation method and system based on mobile edge calculations |
CN110708708A (en) | 2020-01-17 | Wireless resource optimization method and device |
Qiao et al. | 2022 | Task migration computation offloading with low delay for mobile edge computing in vehicular networks |
CN110290539A (en) | 2019-09-27 | Resource allocation device and working method for mobile augmented reality application based on user movement perception and resource reservation |
CN112104737B (en) | 2022-08-30 | Calculation migration method, mobile computing equipment and edge computing equipment |
CN112788698A (en) | 2021-05-11 | Data processing method and device and terminal equipment |
Ali et al. | 2020 | A comprehensive utility function for resource allocation in mobile edge computing |
CN110780986A (en) | 2020-02-11 | Internet of things task scheduling method and system based on mobile edge computing |
Zhang et al. | 2016 | A Multi-Agent based load balancing framework in Cloud Environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2020-12-18 | PB01 | Publication | |
2020-12-18 | PB01 | Publication | |
2021-01-05 | SE01 | Entry into force of request for substantive examination | |
2021-01-05 | SE01 | Entry into force of request for substantive examination | |
2022-08-30 | GR01 | Patent grant | |
2022-08-30 | GR01 | Patent grant |