CN115604765A - Computing offload optimization method and device, electronic equipment and storage medium - Google Patents
Computing offload optimization method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115604765A CN115604765A CN202211026689.6A CN202211026689A CN115604765A CN 115604765 A CN115604765 A CN 115604765A CN 202211026689 A CN202211026689 A CN 202211026689A CN 115604765 A CN115604765 A CN 115604765A
- Authority
- CN
- China
- Prior art keywords
- target
- time delay
- edge server
- delay
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 94
- 238000005457 optimization Methods 0.000 title claims abstract description 51
- 238000004364 calculation method Methods 0.000 claims abstract description 66
- 238000005265 energy consumption Methods 0.000 claims abstract description 48
- 230000005540 biological transmission Effects 0.000 claims description 25
- 238000004891 communication Methods 0.000 claims description 16
- 238000012795 verification Methods 0.000 claims description 16
- 230000010365 information processing Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000012549 training Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 9
- 230000001186 cumulative effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000001934 delay Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000002035 prolonged effect Effects 0.000 description 4
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000002245 particle Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/08—Load balancing or load distribution
- H04W28/09—Management thereof
- H04W28/0958—Management thereof based on metrics or performance parameters
- H04W28/0967—Quality of Service [QoS] parameters
- H04W28/0975—Quality of Service [QoS] parameters for reducing delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/08—Load balancing or load distribution
- H04W28/09—Management thereof
- H04W28/0925—Management thereof using policies
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请提供了一种计算卸载优化方法和装置、电子设备和存储介质,其中,该方法包括:建立基于区块链的云原生网络系统;根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;根据信誉度生成区块链共识机制;获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。通过本申请,解决了相关技术中存在无法同时满足物联网设备的计算实时性和数据安全性需求的问题。
The present application provides a computing offloading optimization method and device, electronic equipment and storage media, wherein the method includes: establishing a blockchain-based cloud native network system; The task arrival rate determines the reputation of each pair of alliance nodes; generates a blockchain consensus mechanism based on the reputation; obtains the first time delay and the first energy consumption required by the alliance chain system in the calculation offloading process, and obtains the blockchain The second delay required by the consensus mechanism in the consensus process; establish the delay minimization target model based on the first delay, the first energy consumption and the second delay, and obtain the calculation unloading optimization scheme based on the delay minimization target model . Through this application, the problem in the related art that cannot simultaneously meet the computing real-time and data security requirements of the Internet of Things device is solved.
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种计算卸载优化方法和装置、电子设备和存储介质。The present invention relates to the field of computer technology, in particular to a computing offloading optimization method and device, electronic equipment and a storage medium.
背景技术Background technique
近年来,物联网设备的爆发式增长,促使计算密集型应用不断地出现,如:智能驾驶、虚拟/增强现实和在线游戏等,这类应用具有计算量大,实时性高等特点。然而物联网设备计算和存储资源有限,无法满足计算密集型应用超低时延的服务需求。利用云原生网络架构,以云作为网络的中心,将所有业务与云直接相连,使得网络从传统端到端的传输连接演变为云和端的高效协作。边缘云提供计算和存储资源,物联网设备可以将计算任务卸载到边缘云服务器执行,从而有效地降低任务的计算时延和物联网设备的能耗。但是由于边缘设备通常部署在无线基站等网络边缘,具有分布式和异构等特点,且处于开放和不安全的环境,导致物联网设备的计算卸载面临数据安全问题。In recent years, the explosive growth of IoT devices has prompted the continuous emergence of computing-intensive applications, such as: intelligent driving, virtual/augmented reality, and online games. These applications have the characteristics of large amount of calculation and high real-time performance. However, IoT devices have limited computing and storage resources, which cannot meet the ultra-low latency service requirements of computing-intensive applications. Using cloud-native network architecture, with the cloud as the center of the network, all services are directly connected to the cloud, making the network evolve from the traditional end-to-end transmission connection to the efficient collaboration between the cloud and the end. The edge cloud provides computing and storage resources, and IoT devices can offload computing tasks to edge cloud servers for execution, thereby effectively reducing the computing delay of tasks and the energy consumption of IoT devices. However, because edge devices are usually deployed at the edge of networks such as wireless base stations, they are distributed and heterogeneous, and they are in an open and insecure environment, which leads to data security issues in the computing offload of IoT devices.
相关技术通过引入区块链技术保障物联网设备在任务卸载过程中的数据安全,区块链作为一种多方共建、共享和共管的技术,可以通过共识机制保证计算卸载过程数据的安全可靠。但传统区块链共识机制存在交易吞吐量低、资源消耗大和交易认证时延长等问题,无法保障海量资源受限的物联网设备频繁执行计算卸载时的数据安全。且现有计算卸载方法的优化目标多数只考虑降低计算卸载任务产生的时延,而没有考虑区块链系统的交易认证时延。Related technologies introduce blockchain technology to ensure the data security of IoT devices during task offloading. As a multi-party co-construction, sharing and co-management technology, blockchain can ensure the safety and reliability of data during computing offloading through a consensus mechanism. However, the traditional blockchain consensus mechanism has problems such as low transaction throughput, large resource consumption, and prolonged transaction authentication time, which cannot guarantee data security when IoT devices with massive resource constraints frequently perform calculation offloading. Moreover, most of the optimization goals of existing computing offloading methods only consider reducing the delay caused by computing offloading tasks, without considering the transaction authentication delay of the blockchain system.
因此,现有技术存在无法同时满足物联网设备的计算实时性和数据安全性需求的问题。Therefore, the prior art has the problem of being unable to simultaneously meet the computing real-time and data security requirements of IoT devices.
发明内容Contents of the invention
本申请提供了一种计算卸载优化方法和装置、电子设备和存储介质,以至少解决相关技术中存在无法同时满足物联网设备对计算实时性和数据安全性的问题。The present application provides a calculation offloading optimization method and device, electronic equipment and storage media, so as to at least solve the problems in the related art that cannot satisfy both real-time calculation and data security of IoT devices.
根据本申请实施例的一个方面,提供了一种计算卸载优化方法,该方法包括:According to an aspect of an embodiment of the present application, a calculation offloading optimization method is provided, the method comprising:
建立基于区块链的云原生网络系统,其中,所述云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,所述联盟链系统包含多对联盟节点,每对所述联盟节点中包含目标物联网设备和目标边缘服务器,所述目标物联网设备为发送任务卸载信息的对象,所述目标边缘服务器为计算所述任务卸载信息和进行区块链共识的对象;Establish a blockchain-based cloud-native network system, wherein the cloud-native network system includes an alliance chain system for information processing in the calculation offloading process, and the alliance chain system includes multiple pairs of alliance nodes, and each pair of alliance nodes Including a target IoT device and a target edge server, the target IoT device is an object for sending task offloading information, and the target edge server is an object for calculating the task offloading information and performing block chain consensus;
根据所述目标边缘服务器的边缘计算结果和所述目标物联网设备的任务到达率确定每对所述联盟节点的信誉度;determining the credibility of each pair of federated nodes according to the edge computing results of the target edge server and the task arrival rate of the target IoT device;
根据所述信誉度生成区块链共识机制;Generate a blockchain consensus mechanism based on the reputation;
获取所述联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取所述区块链共识机制在共识过程中所需的第二时延;Obtain the first time delay and the first energy consumption required by the consortium chain system during the calculation offloading process, and obtain the second time delay required by the blockchain consensus mechanism during the consensus process;
根据所述第一时延、所述第一能耗以及所述第二时延建立时延最小化目标模型,并基于所述时延最小化目标模型得到计算卸载优化方案。A time delay minimization target model is established according to the first time delay, the first energy consumption, and the second time delay, and a computing offload optimization solution is obtained based on the time delay minimization target model.
根据本申请实施例的另一个方面,还提供了一种计算卸载优化装置,该装置包括:According to another aspect of the embodiments of the present application, there is also provided a computing offloading optimization device, which includes:
建立模块,用于建立基于区块链的云原生网络系统,其中,所述云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,所述联盟链系统包含多对联盟节点,每对所述联盟节点中包含目标物联网设备和目标边缘服务器,所述目标物联网设备为发送任务卸载信息的对象,所述目标边缘服务器为计算所述任务卸载信息和进行区块链共识的对象;Establishing a module for establishing a blockchain-based cloud-native network system, wherein the cloud-native network system includes an alliance chain system for information processing in the calculation offloading process, and the alliance chain system includes multiple pairs of alliance nodes, each pair The alliance node includes a target IoT device and a target edge server, the target IoT device is an object for sending task offload information, and the target edge server is an object for calculating the task offload information and performing block chain consensus;
确定模块,用于根据所述目标边缘服务器的边缘计算结果和所述目标物联网设备的任务到达率确定每对所述联盟节点的信誉度;A determination module, configured to determine the credibility of each pair of alliance nodes according to the edge computing results of the target edge server and the task arrival rate of the target IoT device;
生成模块,用于根据所述信誉度生成区块链共识机制;A generating module, configured to generate a block chain consensus mechanism according to the credibility;
获取模块,用于获取所述联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取所述区块链共识机制在共识过程中所需的第二时延;The obtaining module is used to obtain the first time delay and the first energy consumption required by the consortium chain system during the calculation offloading process, and obtain the second time delay required by the blockchain consensus mechanism during the consensus process ;
得到模块,用于根据所述第一时延、所述第一能耗以及所述第二时延建立时延最小化目标模型,并基于所述时延最小化目标模型得到计算卸载优化方案。The obtaining module is configured to establish a delay minimization target model according to the first time delay, the first energy consumption, and the second time delay, and obtain a calculation unloading optimization scheme based on the time delay minimization target model.
可选地,生成模块包括:Optionally, build modules include:
创建单元,用于利用所述目标边缘服务器创建一个初始单元,其中,所述初始单元用于存储所述边缘计算结果和所述联盟节点的信誉度;A creation unit is configured to use the target edge server to create an initial unit, wherein the initial unit is used to store the edge calculation result and the reputation of the alliance node;
选择单元,用于利用所述目标边缘服务器通过第一预设方法选择第一预设数量个边缘区块,将所述第一预设数量个边缘区块的哈希值存入所述初始单元,得到第一单元;A selection unit, configured to use the target edge server to select a first preset number of edge blocks through a first preset method, and store hash values of the first preset number of edge blocks into the initial unit , get the first unit;
计算单元,用于利用所述目标边缘服务器将一个随机数存入所述第一单元,计算此时所述第一单元的哈希值并将所述哈希值存入所述第一单元,得到第二单元;a calculation unit, configured to use the target edge server to store a random number into the first unit, calculate a hash value of the first unit at this time, and store the hash value into the first unit, get the second unit;
广播单元,用于利用所述目标边缘服务器将所述第二单元广播至其他边缘服务器;a broadcast unit, configured to use the target edge server to broadcast the second unit to other edge servers;
验证单元,用于利用所述其他边缘服务器验证所述第二单元是否合法,如果合法,则所述第二单元成为新的边缘区块;A verification unit, configured to use the other edge server to verify whether the second unit is legal, and if legal, the second unit becomes a new edge block;
判断单元,用于利用所述其他边缘服务器所产生的边缘区块,验证所述新的边缘区块,并利用所述其他边缘服务器判断验证次数是否达到认证阈值,如果达到所述认证阈值,则所述第二单元的数据被所述联盟链系统成功共识。The judging unit is configured to use the edge blocks generated by the other edge servers to verify the new edge blocks, and use the other edge servers to judge whether the number of verification times reaches the authentication threshold, and if it reaches the authentication threshold, then The data of the second unit is successfully consensused by the consortium chain system.
可选地,获取模块包括:Optionally, the acquisition module includes:
第一获取单元,用于获取所述任务卸载信息在传输过程中的传输时延以及所述第一能耗、所述任务卸载信息在边缘服务器排队的排队时延和所述边缘服务器执行所述任务卸载信息所需的执行时延;The first acquiring unit is configured to acquire the transmission delay during transmission of the task offloading information and the first energy consumption, the queuing delay of the task offloading information at the edge server and the edge server executing the Execution latency required for task offload information;
第一得到单元,用于根据所述传输时延、所述排队时延以及所述执行时延得到所述第一时延;a first obtaining unit, configured to obtain the first time delay according to the transmission time delay, the queuing time delay and the execution time delay;
第二获取单元,用于获取所述任务卸载信息在所述共识过程中的所述第二时延。A second acquiring unit, configured to acquire the second time delay of the task offloading information in the consensus process.
可选地,得到模块包括:Optionally, the resulting modules include:
生成单元,用于生成针对所述第一时延、所述第一能耗以及所述第二时延的约束条件;a generating unit, configured to generate constraint conditions for the first time delay, the first energy consumption, and the second time delay;
第一建立单元,用于基于所述约束条件,建立所述时延最小化目标模型。A first establishing unit, configured to establish the delay minimization target model based on the constraint conditions.
转化单元,用于通过第二预设方法将所述时延最小化目标模型转化为第二预设数量个局部模型;a conversion unit, configured to convert the time-delay minimization target model into a second preset number of local models by a second preset method;
第二得到单元,用于通过训练所述第二预设数量个局部模型的参数并行地优化所述局部模型,得到对应的局部变量;The second obtaining unit is configured to optimize the local models in parallel by training the parameters of the second preset number of local models to obtain corresponding local variables;
第三得到单元,用于合并所述局部变量,并对所述时延最小化目标模型的全局变量进行优化,得到所述计算卸载优化方案。The third obtaining unit is configured to combine the local variables and optimize the global variables of the time delay minimization objective model to obtain the calculation unloading optimization scheme.
可选地,确定模块包括:Optionally, the determination module includes:
第四得到单元,用于利用所述目标边缘服务器根据第三预设数量个所述目标物联网设备对所述目标边缘服务器的信誉度,得到所述目标边缘服务器的综合信誉度;The fourth obtaining unit is configured to use the target edge server to obtain the comprehensive reputation of the target edge server according to the reputation of a third preset number of the target IoT devices to the target edge server;
第五得到单元,用于利用所述目标边缘服务器根据所述目标物联网设备的任务到达率,得到所述目标物联网设备的信誉度;The fifth obtaining unit is configured to use the target edge server to obtain the reputation of the target IoT device according to the task arrival rate of the target IoT device;
确定单元,用于根据所述目标边缘服务器的综合信誉度和所述目标物联网设备的信誉度,确定每对所述联盟节点的信誉度。A determining unit, configured to determine the reputation of each pair of alliance nodes according to the comprehensive reputation of the target edge server and the reputation of the target IoT device.
可选地,建立模块包括:Optionally, building modules includes:
第二建立单元,用于建立区块链赋能的云原生网络系统,其中,所述云原生网络系统包含第二预设数量个物联网设备和第四预设数量个边缘服务器;The second establishment unit is used to establish a blockchain-powered cloud-native network system, wherein the cloud-native network system includes a second preset number of IoT devices and a fourth preset number of edge servers;
第三建立单元,用于基于所述云原生网络系统,建立计算卸载过程中的所述联盟链系统。The third establishing unit is configured to establish the alliance chain system in the calculation offloading process based on the cloud native network system.
根据本申请实施例的又一个方面,还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;其中,存储器,用于存储计算机程序;处理器,用于通过运行所述存储器上所存储的所述计算机程序来执行上述任一实施例中的方法步骤。According to yet another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein, the processor, the communication interface, and the memory complete mutual communication through the communication bus; wherein, The memory is used to store a computer program; the processor is used to execute the method steps in any one of the above embodiments by running the computer program stored in the memory.
根据本申请实施例的又一个方面,还提供了一种计算机可读的存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一实施例中的方法步骤。According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is set to execute the method in any of the above-mentioned embodiments when running step.
在本申请实施例中,通过建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象;根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;根据信誉度生成区块链共识机制;获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。由于本申请实施例一方面通过建立基于区块链的云原生网络系统,并基于联盟节点的信誉度生成共识机制,降低了交易认证时延,提高了区块链共识的安全性,另一方面,将计算卸载任务和区块链共识任务同时优化,实现了区块链赋能的云原生网络的系统时延最小化,解决了相关技术中存在无法同时满足物联网设备的计算实时性和数据安全性需求的问题。In the embodiment of this application, by establishing a blockchain-based cloud-native network system, the cloud-native network system includes an alliance chain system for information processing in the process of computing offload, and the alliance chain system includes multiple pairs of alliance nodes. The node includes the target IoT device and the target edge server. The target IoT device is the object that sends task offloading information, and the target edge server is the object that calculates task offloading information and performs blockchain consensus; according to the edge computing results of the target edge server and The task arrival rate of the target IoT device determines the reputation of each pair of alliance nodes; generates a blockchain consensus mechanism based on the reputation; obtains the first time delay and the first energy consumption required by the alliance chain system in the calculation offloading process 1. Obtain the second delay required by the blockchain consensus mechanism in the consensus process; establish a delay minimization target model based on the first delay, first energy consumption, and second delay, and based on the delay minimization target model Obtain the calculation offloading optimization scheme. Since the embodiment of this application, on the one hand, establishes a blockchain-based cloud-native network system and generates a consensus mechanism based on the credibility of alliance nodes, it reduces the transaction authentication delay and improves the security of the blockchain consensus. , optimize the calculation offloading task and the blockchain consensus task at the same time, realize the minimum system delay of the cloud-native network empowered by the blockchain, and solve the problems in related technologies that cannot satisfy the computing real-time and data requirements of IoT devices at the same time The question of security requirements.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1是根据本申请实施例的一种可选的计算卸载优化方法的流程示意图;FIG. 1 is a schematic flowchart of an optional computing offloading optimization method according to an embodiment of the present application;
图2是根据本申请实施例的一种可选的区块链赋能的云原生网络系统模型图;FIG. 2 is a model diagram of an optional blockchain-powered cloud-native network system according to an embodiment of the present application;
图3是根据本申请实施例的一种可选的计算卸载优化装置的结构框图;Fig. 3 is a structural block diagram of an optional computing offload optimization device according to an embodiment of the present application;
图4是根据本申请实施例的一种可选的电子设备的结构框图。Fig. 4 is a structural block diagram of an optional electronic device according to an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed Those steps or elements may instead include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
在云原生网络中,资源有限的物联网设备通过将计算任务卸载到边缘服务器来降低能耗和计算时延,区块链技术可以通过共识机制保证上述过程中的数据安全。但传统区块链共识机制存在交易吞吐量低、资源消耗大和交易认证时延长等问题,无法保障海量资源受限的物联网设备频繁执行计算卸载任务时的数据安全。另外,边缘服务器执行区块链共识机制和计算卸载任务都会产生时延,如果将这两个时延分别独立优化,无法同时满足物联网设备对计算实时性和数据安全性服务质量需求。为了解决上述问题,根据本申请实施例的一个方面,提供了一种计算卸载优化方法,如图1所示,该方法的流程可以包括以下步骤:In cloud-native networks, IoT devices with limited resources can reduce energy consumption and computing delay by offloading computing tasks to edge servers. Blockchain technology can ensure data security in the above process through a consensus mechanism. However, the traditional blockchain consensus mechanism has problems such as low transaction throughput, large resource consumption, and prolonged transaction authentication, which cannot guarantee data security when IoT devices with massive resource constraints frequently perform computing offloading tasks. In addition, the execution of the blockchain consensus mechanism and computing offloading tasks by the edge server will generate delays. If these two delays are optimized independently, it will not be able to meet the real-time calculation and data security service quality requirements of IoT devices at the same time. In order to solve the above problem, according to an aspect of the embodiment of the present application, a calculation offloading optimization method is provided, as shown in FIG. 1 , the process of the method may include the following steps:
步骤S101,建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象。Step S101, establish a blockchain-based cloud-native network system, wherein the cloud-native network system includes a consortium chain system for information processing in the process of computing offloading, and the consortium chain system includes multiple pairs of consortium nodes, each pair of consortium nodes contains target objects The networked device and the target edge server, the target IoT device is the object that sends task offloading information, and the target edge server is the object that calculates task offloading information and performs blockchain consensus.
可选地,建立区块链赋能的云原生网络系统,如图2所示,云原生网络中存在多个物联网设备和多个边缘服务器。在该云原生网络系统中构建由物联网设备和边缘服务器这两类利益团体共同维护的联盟链系统。在该联盟链系统中,由多个物联网设备和多个边缘服务器生成多个联盟节点,也可以选择一个物联网设备与其选择的一个边缘服务器作为一对联盟节点。其中,物联网设备作为区块链用户,发送计算卸载任务信息,边缘服务器除了执行计算卸载任务外,作为区块链共识节点,将边缘计算结果等相关信息打包成块,并执行共识算法来维护区块链账本,保证物联网设备低能耗、低时延和高可靠性的服务质量需求。Optionally, a blockchain-powered cloud-native network system is established. As shown in Figure 2, there are multiple IoT devices and multiple edge servers in the cloud-native network. In this cloud-native network system, an alliance chain system jointly maintained by two types of interest groups, IoT devices and edge servers, is built. In the consortium chain system, multiple consortium nodes are generated by multiple IoT devices and multiple edge servers, and an IoT device and an edge server selected by it can also be selected as a pair of consortium nodes. Among them, IoT devices, as blockchain users, send computing offloading task information. In addition to performing computing offloading tasks, edge servers, as blockchain consensus nodes, package edge computing results and other related information into blocks, and execute consensus algorithms to maintain The blockchain ledger ensures the service quality requirements of low energy consumption, low latency and high reliability of IoT devices.
步骤S102,根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度。Step S102, determine the credibility of each pair of alliance nodes according to the edge computing results of the target edge server and the task arrival rate of the target IoT device.
可选地,对于基于有向无环图(Directed Acyclic Graph,DAG)的区块链系统,交易到达率低或者不稳定时会降低区块链系统性能。任务到达率越高,边缘服务器需要执行的计算卸载任务越多,需要保护的用户数据信息越多,区块链的交易到达率越高。物联网设备根据边缘服务器的边缘计算结果,对边缘服务器进行满意度评价,物联网设备满意度越高,表明边缘服务器计算任务完成的越好,边缘服务器可靠性越高,物联网设备对边缘服务器的信誉度评分越高。物联网设备在线时长越长,活跃度越高,边缘服务器对物联网设备的信誉度评分越高。Optionally, for a blockchain system based on a directed acyclic graph (Directed Acyclic Graph, DAG), when the transaction arrival rate is low or unstable, the performance of the blockchain system will be reduced. The higher the task arrival rate, the more computing offloading tasks the edge server needs to perform, the more user data information needs to be protected, and the higher the transaction arrival rate of the blockchain. According to the edge computing results of the edge server, the IoT device evaluates the satisfaction of the edge server. The higher the satisfaction of the IoT device, the better the computing task of the edge server is completed, the higher the reliability of the edge server is, and the impact of the IoT device on the edge server is higher. The higher the credibility score. The longer the online time of the IoT device is, the higher the activity is, and the higher the credit score of the edge server is for the IoT device.
步骤S103,根据信誉度生成区块链共识机制。Step S103, generating a blockchain consensus mechanism according to the credibility.
可选地,基于DAG的区块链采用异步通信机制,允许区块链进行分叉验证,要求新区块进入网络后必须先随机选择网络中已有的两个区块进行验证。对于信誉度高的联盟节点,其发布的交易被选中验证的概率越高,交易验证速度越快,交易认证时延越短。对于信誉度低的联盟节点,其发布的交易被验证的概率低,交易验证速度慢,交易认证时延长。Optionally, the DAG-based blockchain adopts an asynchronous communication mechanism, allowing the blockchain to perform bifurcation verification, requiring that after a new block enters the network, two existing blocks in the network must be randomly selected for verification. For an alliance node with a high reputation, the higher the probability of its published transaction being selected for verification, the faster the transaction verification speed, and the shorter the transaction verification delay. For alliance nodes with low credibility, the probability of their issued transactions being verified is low, the transaction verification speed is slow, and the transaction verification time is prolonged.
步骤S104,获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延。Step S104, obtain the first time delay required by the consortium chain system in the calculation offloading process and the first energy consumption consumed, and obtain the second time delay required by the blockchain consensus mechanism in the consensus process.
可选地,假定每个任务di的平均数据大小和最大允许时延分别为Di和整个计算过程中的系统时延包括第一时延即任务卸载时延和第二时延即区块链交易认证时延任务卸载时延包括任务传输时延排队时延和边缘服务器的计算时延由于边缘计算结果的数据大小与计算任务的数据大小相比非常小,因而不考虑计算结果传输的时延。另外,由于物联网设备的能量有限,边缘服务器有持续供电的电源,因而只考虑物联网设备的能耗,不考虑边缘服务器产生的能耗,因此第一能耗等于传输阶段的能耗 Alternatively, assume that the average data size and maximum allowable delay of each task d i are D i and The system delay in the whole calculation process includes the first delay, which is the task offload delay and the second delay is the blockchain transaction authentication delay Task offload delay includes task transmission delay queuing delay and the computing delay of the edge server Since the data size of edge computing results is very small compared with the data size of computing tasks, the delay in the transmission of computing results is not considered. In addition, due to the limited energy of IoT devices, edge servers have continuous power supply, so only the energy consumption of IoT devices is considered, and the energy consumption generated by edge servers is not considered, so the first energy consumption is equal to the energy consumption in the transmission stage
步骤S105,根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。In step S105, a delay minimization target model is established according to the first time delay, the first energy consumption, and the second time delay, and an optimization solution for computing unloading is obtained based on the time delay minimization target model.
可选地,根据DAG区块链共识机制的特点,任务到达率λi越高,区块链交易认证时延越低,共识安全性越高,但此时任务卸载时延较高,不能满足物联网设备时延的服务质量要求。为了同时满足物联网设备计算实时性和数据安全性的服务质量需求,本申请实施例对计算卸载任务和区块共识任务同时进行优化,以最小化和的加权和为优化目标,建立一个数学优化模型作为时延最小化目标模型,并根据该数学优化模型得到计算卸载优化方案。Optionally, according to the characteristics of the DAG blockchain consensus mechanism, the higher the task arrival rate λ i , the longer the blockchain transaction authentication delay The lower the value, the higher the security of the consensus, but at this time the task unloading delay It is relatively high and cannot meet the quality of service requirements for the delay of IoT devices. In order to meet the real-time calculation and data security quality of service requirements of IoT devices, the embodiment of this application optimizes the calculation offloading task and the block consensus task at the same time to minimize and The weighted sum of is the optimization objective, and a mathematical optimization model is established as the delay minimization objective model, and the calculation unloading optimization scheme is obtained according to the mathematical optimization model.
在本申请实施例中,通过建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象;根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;根据信誉度生成区块链共识机制;获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。由于本申请实施例一方面通过建立基于区块链的云原生网络系统,并基于联盟节点的信誉度生成共识机制,降低了交易认证时延,提高了区块链共识的安全性,另一方面,将计算卸载任务和区块链共识任务同时优化,实现了区块链赋能的云原生网络的系统时延最小化,解决了相关技术中存在无法同时满足物联网设备的计算实时性和数据安全性需求的问题。In the embodiment of this application, by establishing a blockchain-based cloud-native network system, the cloud-native network system includes an alliance chain system for information processing in the process of computing offload, and the alliance chain system includes multiple pairs of alliance nodes. The node includes the target IoT device and the target edge server. The target IoT device is the object that sends task offloading information, and the target edge server is the object that calculates task offloading information and performs blockchain consensus; according to the edge computing results of the target edge server and The task arrival rate of the target IoT device determines the reputation of each pair of alliance nodes; generates a blockchain consensus mechanism based on the reputation; obtains the first time delay and the first energy consumption required by the alliance chain system in the calculation offloading process 1. Obtain the second delay required by the blockchain consensus mechanism in the consensus process; establish a delay minimization target model based on the first delay, first energy consumption, and second delay, and based on the delay minimization target model Obtain the calculation offloading optimization scheme. Since the embodiment of this application, on the one hand, establishes a blockchain-based cloud-native network system and generates a consensus mechanism based on the credibility of alliance nodes, it reduces the transaction authentication delay and improves the security of the blockchain consensus. , optimize the calculation offloading task and the blockchain consensus task at the same time, realize the minimum system delay of the cloud-native network empowered by the blockchain, and solve the problems in related technologies that cannot satisfy the computing real-time and data requirements of IoT devices at the same time The question of security requirements.
作为一种可选实施例,根据信誉度生成区块链共识机制包括:As an optional embodiment, generating a block chain consensus mechanism according to reputation includes:
利用目标边缘服务器创建一个初始单元,其中,初始单元用于存储边缘计算结果和联盟节点的信誉度;Use the target edge server to create an initial unit, where the initial unit is used to store the edge computing results and the reputation of the federation node;
利用目标边缘服务器通过第一预设方法选择第一预设数量个边缘区块,将第一预设数量个边缘区块的哈希值存入初始单元,得到第一单元;using the target edge server to select a first preset number of edge blocks through a first preset method, and storing the hash values of the first preset number of edge blocks into the initial unit to obtain the first unit;
利用目标边缘服务器将一个随机数存入第一单元,计算此时第一单元的哈希值并将哈希值存入第一单元,得到第二单元;Use the target edge server to store a random number into the first unit, calculate the hash value of the first unit at this time, and store the hash value into the first unit to obtain the second unit;
利用目标边缘服务器将第二单元广播至其他边缘服务器;using the target edge server to broadcast the second unit to other edge servers;
利用其他边缘服务器验证第二单元是否合法,如果合法,则第二单元成为新的边缘区块;Use other edge servers to verify whether the second unit is legal, and if it is legal, the second unit becomes a new edge block;
利用其他边缘服务器所产生的边缘区块,验证新的边缘区块,并利用其他目标边缘服务器判断验证次数是否达到认证阈值,如果达到认证阈值,则第二单元的数据被云原生网络系统成功共识。Use the edge blocks generated by other edge servers to verify new edge blocks, and use other target edge servers to judge whether the number of verifications reaches the authentication threshold. If the authentication threshold is reached, the data of the second unit is successfully consensused by the cloud-native network system .
可选地,边缘服务器m执行物联网设备i的计算卸载任务,并把此计算任务的结果作为区块链上的一个交易。此时,物联网设备i的交易到达率为λi,边缘服务器m记录的交易到达率为ρi,m为计算任务卸载策略,N为正整数。边缘服务器m为每个交易创建一个单元(Unit),用于存储交易信息和联盟节点的信誉度,并利用私钥对此交易进行数字签名。Optionally, the edge server m performs the calculation offload task of the IoT device i, and takes the result of this calculation task as a transaction on the blockchain. At this time, the transaction arrival rate of IoT device i is λ i , and the transaction arrival rate recorded by edge server m is ρ i,m is the computing task offloading strategy, and N is a positive integer. The edge server m creates a unit for each transaction, which is used to store the transaction information and the reputation of the alliance node, and uses the private key to digitally sign the transaction.
缠结(Tangle)是基于DAG区块链中最具有代表性的共识方法,在缠结共识过程中,每个Unit在加入DAG区块链账本前,需要先验证两个已经存在的边缘区块(Tips),第一预设数量可以是二,也可以是其他数值,本申请实施例不对具体数值做限定。当存在多个边缘区块(大于两个)时,Tangle采用基于信誉度的蒙特卡洛马尔可夫链(Markov Chain MonteCarlo,MCMC)边缘区块选择算法选择两个边缘区块,在选择上述两个边缘区块过程中,边缘服务器生成若干个游走粒子,并将上述游走粒子以概率 Tangle is the most representative consensus method based on the DAG blockchain. During the Tangle consensus process, each Unit needs to verify two existing edge blocks before joining the DAG blockchain ledger. (Tips), the first preset number can be two or other values, and the embodiment of the present application does not limit the specific values. When there are multiple edge blocks (more than two), the Tangle uses the Monte Carlo Markov chain (Markov Chain MonteCarlo, MCMC) edge block selection algorithm based on reputation to select two edge blocks. In the process of each edge block, the edge server generates several wandering particles, and
向边缘区块的方向各自独立游走,其中,和分别表示x,y和z的累计权重值。和分别表示发布x,y和z的节点的信誉值。z→x表示z直接引用x,α和β是非负可调参数。最先抵达边缘区块的两个粒子所停留的边缘区块即为被选中的区块。联盟节点的信誉度越高,其发布的边缘区块被选中验证的概率越高,交易验证速度越快,交易认证时延越短。当新到达的Unit选择两个边缘区块后,需检查这两个边缘区块是否冲突。如果不存在冲突,则将这两个边缘区块的哈希值存储到Unit中。Walk independently to the direction of the edge block, where, and denote the accumulated weight values for x, y, and z, respectively. and denote the reputation values of the nodes publishing x, y and z, respectively. z→x means that z directly refers to x, and α and β are non-negative adjustable parameters. The edge block where the two particles that first arrive at the edge block stay is the selected block. The higher the credibility of the alliance node, the higher the probability that the edge blocks it publishes will be selected for verification, the faster the transaction verification speed, and the shorter the transaction verification delay. When the newly arrived Unit selects two edge blocks, it needs to check whether the two edge blocks conflict. If there is no conflict, store the hash values of these two edge blocks into Unit.
为了防止DDoS(Distributed Denial of Service,分布式拒绝服务攻击)攻击,避免算力的浪费,在发布上述交易前边缘服务器还需要做一个轻量化的工作量证明(Proofof Work,PoW),即将交易的内容和已选两个边缘区块的哈希值打包,添加一个随机数Nonce,计算哈希值。并将此哈希值存储到Unit中,之后,将该Unit广播给网络中其它的边缘服务器。In order to prevent DDoS (Distributed Denial of Service) attacks and avoid waste of computing power, the edge server needs to do a lightweight Proof of Work (PoW) before publishing the above transactions. The content and the hash value of the selected two edge blocks are packaged, and a random number Nonce is added to calculate the hash value. And store this hash value in the Unit, and then broadcast the Unit to other edge servers in the network.
当其它边缘服务器收到该Unit后,依据数字签名和Nonce值,验证其是否合法。如果合法,则将这个Unit加入到其本地DAG账本中,此时这个合法的Unit成为边缘区块。When other edge servers receive the Unit, they verify whether it is legal based on the digital signature and the Nonce value. If it is legal, this Unit will be added to its local DAG ledger, and this legal Unit will become a marginal block.
其他边缘服务器产生边缘区块的步骤与上述步骤相同,其他边缘服务器产生的边缘区块有概率会直接或者间接验证上述Unit边缘区块。在DAG区块链中,每个区块都有一个累计权重值(初始值为1),每当该区块被直接或者间接验证一次,其累计权重值加1。当该区块的累计权重值达到认证阈值时,该区块中的交易被全网确认为是一笔成功的交易。The steps for other edge servers to generate edge blocks are the same as the above steps, and the edge blocks generated by other edge servers may directly or indirectly verify the above-mentioned Unit edge blocks. In the DAG blockchain, each block has a cumulative weight value (initial value is 1), and whenever the block is directly or indirectly verified, its cumulative weight value is increased by 1. When the cumulative weight value of the block reaches the authentication threshold, the transaction in the block is confirmed by the entire network as a successful transaction.
在本申请实施例中,通过设计基于信誉度的DAG区块链的共识机制,解决了传统DAG共识机制存在交易认证时延长,容易受到恶意节点攻击,共识安全性不足的问题。有效地降低交易认证时延,提高区块共识安全性,满足了物联网设备的数据安全性需求。In the embodiment of this application, by designing the consensus mechanism of the DAG blockchain based on reputation, the traditional DAG consensus mechanism has the problem of prolonged transaction authentication, vulnerable to malicious node attacks, and insufficient consensus security. It effectively reduces the transaction authentication delay, improves the security of block consensus, and meets the data security requirements of IoT devices.
作为一种可选实施例,获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延包括:As an optional embodiment, obtaining the first time delay required by the consortium chain system in the calculation offloading process and the first energy consumption consumed, and obtaining the second time delay required by the blockchain consensus mechanism in the consensus process include :
获取任务卸载信息在传输过程中的传输时延以及第一能耗、任务卸载信息在边缘服务器排队的排队时延和边缘服务器执行任务卸载信息所需的执行时延;Acquiring the transmission delay and first energy consumption of the task offloading information during transmission, the queuing delay of the task offloading information at the edge server, and the execution delay required by the edge server to execute the task offloading information;
根据传输时延、排队时延以及执行时延得到第一时延;Obtain the first delay according to the transmission delay, queuing delay and execution delay;
获取任务卸载信息在共识过程中的第二时延。The second delay in obtaining task offloading information during the consensus process.
可选地,在云原生网络中,物联网设备通过无线信道将计算任务卸载到边缘服务器执行,在此过程中,会产生传输时延和第一能耗即传输能耗。物联网设备di的计算任务卸载到边缘服务器Sm的上行链路数据传输速率和传输时延可以表示为:Optionally, in the cloud-native network, IoT devices offload computing tasks to edge servers for execution through wireless channels. During this process, transmission delay and the first energy consumption, that is, transmission energy consumption, will be generated. The uplink data transmission rate and transmission delay of the computing tasks offloaded from the IoT device d i to the edge server S m can be expressed as:
其中,B为信道带宽,采用正交频分复用技术(Orthogonal Frequency DivisionMultiplexing,OFDM),每个子载波带宽为B0=BN,Nm为将计算任务卸载到Sm的终端设备数量。pi,m和Hi,m分别为di到Sm的传输功率和信道增益,为其他物联网设备所产生的干扰功率,σ2为背景噪声功率。在传输阶段物联网设备di的能耗为由于物联网设备的能量有限,边缘服务器有持续供电的电源,因而只考虑物联网设备的能耗,不考虑边缘服务器产生的能耗。Wherein, B is the channel bandwidth, adopts Orthogonal Frequency Division Multiplexing (OFDM), the bandwidth of each subcarrier is B 0 =BN, and N m is the number of terminal devices that offload computing tasks to S m . p i,m and H i,m are the transmission power and channel gain from d i to S m respectively, is the interference power generated by other IoT devices, and σ 2 is the background noise power. The energy consumption of the IoT device d i in the transmission phase is Due to the limited energy of IoT devices, edge servers have continuous power supply, so only the energy consumption of IoT devices is considered, and the energy consumption generated by edge servers is not considered.
边缘服务器计算资源有限,不能同时执行多个物联网设备的计算卸载任务,当存在多个计算卸载任务时,会产生排队时延。本文采用排队理论,将边缘服务器处理任务缓冲区中等待执行的卸载任务的模型表示为D/M/1队列,按照物联网设备任务FCFS服务规则,Sm上的任务到达率为di在Sm上每个计算任务的平均排队时间为:The edge server has limited computing resources and cannot simultaneously perform computing offloading tasks for multiple IoT devices. When there are multiple computing offloading tasks, queuing delays will occur. This paper adopts the queuing theory, and expresses the model of the offloading tasks waiting to be executed in the edge server processing task buffer as a D/M/1 queue. According to the FCFS service rule of the IoT device task, the task arrival rate on S m is The average queuing time of each computing task of d i on S m is:
其中,绝对值非常小,μm为Sm的服务速率,λm<μm。in, The absolute value is very small, μ m is the service rate of S m , λ m < μ m .
每个计算任务di在Sm上的计算时延可以表示为:The computing delay of each computing task d i on S m can be expressed as:
其中,Ci表示处理1比特输入数据所需的CPU周期数,fm表示Sm的CPU周期频率。Among them, C i represents the number of CPU cycles required to process 1-bit input data, and f m represents the CPU cycle frequency of S m .
上述传输时延、排队时延和计算时延之和为第一时延,即任务卸载时延。The sum of the above transmission delay, queuing delay and calculation delay is the first delay, that is, the task unloading delay.
在无线传输环境非饱和的情况下,边缘服务器完成物联网设备的计算卸载任务后,将每个计算结果和相关信息打包成块,进行区块链共识,进而保护计算卸载的数据安全。对于区块链网络,交易到达率与边缘服务器的服务速率有关,其交易到达率服从均值为的泊松过程。在Sm上产生的区块的累计权重增长速率为当此区块的累计权重值达到认证权重阈值W时,其所消耗的区块链交易认证时延即第二时延可以表示为: In the case of an unsaturated wireless transmission environment, after the edge server completes the computing offloading task of the IoT device, it packs each computing result and related information into blocks, and performs blockchain consensus to protect the data security of computing offloading. For the blockchain network, the transaction arrival rate is related to the service rate of the edge server, and its transaction arrival rate obeys the mean value Poisson process. The cumulative weight growth rate of blocks generated on S m is When the cumulative weight value of this block reaches the authentication weight threshold W, the blockchain transaction authentication delay that it consumes, that is, the second delay, can be expressed as:
在本申请实施例中,通过计算任务传输时延、排队时延和计算时延得出任务卸载时延,并通过计算得出第一能耗以及区块链交易认证时延,综合考虑整个任务卸载过程中以及区块链交易认证过程中的所有时延,并以最小化任务卸载时延和区块链交易认证时延的加权和为优化目标,建立数学优化模型,满足了物联网设备的计算实时性需求。In the embodiment of this application, the task unloading delay is obtained by calculating the task transmission delay, queuing delay and calculation delay, and the first energy consumption and blockchain transaction authentication delay are obtained through calculation, and the entire task is considered All time delays in the unloading process and the blockchain transaction authentication process, and with the optimization goal of minimizing the weighted sum of the task unloading delay and the blockchain transaction authentication delay, a mathematical optimization model is established to meet the needs of IoT devices. Calculate real-time requirements.
作为一种可选实施例,根据第一时延、第一能耗以及第二时延建立时延最小化目标模型包括:As an optional embodiment, establishing a delay minimization target model according to the first delay, the first energy consumption, and the second delay includes:
生成针对第一时延、第一能耗以及第二时延的约束条件;generating constraint conditions for the first time delay, the first energy consumption and the second time delay;
基于约束条件,建立时延最小化目标模型。Based on the constraints, the delay minimization objective model is established.
可选地,本申请实施例对物联网设备任务卸载时延和区块链共识机制进行联合优化,生成的约束条件和建立的数学优化模型为:Optionally, this embodiment of the present application jointly optimizes the task offloading delay of IoT devices and the blockchain consensus mechanism, and the generated constraints and established mathematical optimization model are:
其中,ω1和ω2为加权系数,C1和C2分别是对物联网设备所能容忍的时延和能耗的约束条件。C3是保证Sm上任务到达率不超过其服务速率。C4和C5是对计算卸载决策的约束条件,保证每个边缘服务器可以服务多个物联网设备,但每个物联网设备只可以将计算任务卸载到一个边缘服务器执行。C6是对每个边缘服务器服务的物联网设备数量的约束条件。Among them, ω 1 and ω 2 are weighting coefficients, and C1 and C2 are constraints on the time delay and energy consumption that IoT devices can tolerate, respectively. C3 is to ensure that the task arrival rate on S m does not exceed its service rate. C4 and C5 are constraints on computing offloading decisions, ensuring that each edge server can serve multiple IoT devices, but each IoT device can only offload computing tasks to one edge server for execution. C6 is a constraint on the number of IoT devices served by each edge server.
在本申请实施例中,首先针对物联网设备计算卸载任务过程中的时延和能耗,生成约束条件。之后,以最小化任务卸载时延和区块链交易认证时延为目的,基于上述约束条件建立数学优化模型,通过该数学优化模型能够得到计算卸载优化方案,实现了区块链赋能的云原生网络的系统时延最小化,解决了相关技术存在的无法满足物联网设备计算实时性需求的问题。In the embodiment of the present application, firstly, constraint conditions are generated for the time delay and energy consumption during the offloading task calculation process of the IoT device. Afterwards, with the aim of minimizing task offloading delay and blockchain transaction authentication delay, a mathematical optimization model is established based on the above constraints. Through this mathematical optimization model, an optimization scheme for computing offloading can be obtained, and a blockchain-enabled cloud The system delay of the native network is minimized, which solves the problem that related technologies cannot meet the real-time computing requirements of IoT devices.
作为一种可选实施例,基于时延最小化目标模型得到计算卸载优化方案包括:As an optional embodiment, the calculation unloading optimization scheme obtained based on the delay minimization objective model includes:
通过第二预设方法将时延最小化目标模型转化为第二预设数量个局部模型;converting the time delay minimization target model into a second preset number of partial models by using a second preset method;
通过训练第二预设数量个局部模型的参数并行地优化局部模型,得到对应的局部变量;optimizing the local models in parallel by training parameters of a second preset number of local models to obtain corresponding local variables;
合并局部变量,并对时延最小化目标模型的全局变量进行优化,得到计算卸载优化方案。Merge the local variables and optimize the global variables of the delay minimization objective model to obtain the optimization scheme of computing offloading.
可选地,由于计算卸载优化问题不是一个凸问题,而且随着云原生网络中用户数量的增多,该问题的规模和复杂度将会迅速增加。本申请采用交替方向乘子法将原始复杂的计算卸载优化问题转变为第二预设数量个无约束的子问题进行求解,第二预设数量表示多个,本申请实施例不对具体数值做限定。之后,计算节点通过训练自己局部模型参数来并行地优化子问题。然后,将所有的局部变量合并起来对全局变量进行优化。最后,经过迭代得到全局解。Optionally, since the computation offloading optimization problem is not a convex problem, and with the increase of the number of users in the cloud native network, the scale and complexity of the problem will increase rapidly. This application uses the alternate direction multiplier method to transform the original complex calculation unloading optimization problem into a second preset number of unconstrained sub-problems for solution. The second preset number means multiple, and the embodiment of this application does not limit the specific value . Afterwards, computing nodes optimize subproblems in parallel by training their own local model parameters. Then, all the local variables are combined to optimize the global variables. Finally, the global solution is obtained through iteration.
在本申请实施例中,通过对计算卸载任务和区块共识任务同时进行优化,并采用交替方向乘子法简化该优化问题,最后得到计算卸载优化方案。本申请提高了优化效率,并且得出的计算卸载优化方案能够同时满足海量资源受限的物联网设备在频繁执行计算卸载任务时对计算实时性和数据安全性的服务质量需求。解决了相关技术中存在无法同时满足物联网设备对计算实时性和数据安全性的问题。In the embodiment of this application, by simultaneously optimizing the calculation offloading task and the block consensus task, and using the alternate direction multiplier method to simplify the optimization problem, the calculation offloading optimization scheme is finally obtained. The application improves the optimization efficiency, and the calculation offload optimization scheme obtained can simultaneously meet the quality of service requirements for real-time calculation and data security when IoT devices with limited massive resources frequently perform calculation offload tasks. It solves the problem that the real-time calculation and data security of the Internet of Things devices cannot be satisfied at the same time in the related technology.
作为一种可选实施例,根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率,确定每对联盟节点的信誉度包括:As an optional embodiment, according to the edge computing results of the target edge server and the task arrival rate of the target IoT device, determining the credibility of each pair of federation nodes includes:
利用目标边缘服务器根据第三预设数量个目标物联网设备对目标边缘服务器的信誉度,得到目标边缘服务器的综合信誉度;Using the target edge server to obtain the comprehensive reputation of the target edge server according to the credibility of the third preset number of target IoT devices to the target edge server;
利用目标边缘服务器根据目标物联网设备的任务到达率,得到目标物联网设备的信誉度;Use the target edge server to obtain the reputation of the target IoT device according to the task arrival rate of the target IoT device;
根据目标边缘服务器的综合信誉度和目标物联网设备的信誉度,确定每对联盟节点的信誉度。According to the comprehensive reputation of the target edge server and the reputation of the target IoT device, the reputation of each pair of federation nodes is determined.
可选地,由于边缘服务器m能够同时为多个物联网设备服务,因而,其信誉度应由多个物联网设备对自己的综合信誉度评分生成,综合信誉度为 Optionally, since the edge server m can serve multiple IoT devices at the same time, its reputation should be generated by the comprehensive reputation scores of multiple IoT devices, and the comprehensive reputation is
其中ρi,m为计算任务卸载策略,ri→m为物联网设备i收到边缘服务器m的计算结果后,根据自身对边缘计算结果的满意度对边缘服务器m的信誉度的评分,N为正整数,为第三预设数量。得到综合信誉度Si→m之后,该边缘服务器对综合信誉度进行存储。Among them, ρ i,m is the calculation task offloading strategy, r i→m is the score of the reputation of the edge server m according to the satisfaction of the edge server m after the IoT device i receives the calculation result of the edge server m, N is a positive integer, for the third preset quantity. After obtaining the comprehensive reputation S i→m , the edge server stores the comprehensive reputation.
由于物联网设备的任务到达率间接反映了区块链的交易到达率,因此,边缘服务器m根据物联网设备的任务到达率λi对物联网设备的信誉度进行评分Sm→i=g(λi),并对Sm→i进行存储。Since the task arrival rate of the IoT device indirectly reflects the transaction arrival rate of the blockchain, the edge server m scores the reputation of the IoT device according to the task arrival rate λ i of the IoT device S m→i = g( λ i ), and store S m→i .
将每个物联网设备和其选择的边缘服务器作为一对联盟节点,计算之后得到每一对联盟节点的信誉度Si,m=αSi→m+βSm→i (9)Taking each IoT device and its selected edge server as a pair of alliance nodes, after calculation, the reputation S i,m of each pair of alliance nodes is obtained =αS i→m +βS m→i (9)
其中,α和β分别为信誉度权重因子,物联网设备可以根据服务质量需求,调整信誉度的权重。Among them, α and β are reputation weighting factors respectively, and IoT devices can adjust the weight of reputation according to service quality requirements.
在本申请实施例中,通过将每个物联网设备和其选择的边缘服务器作为一对联盟节点,考虑其各自的信誉度对区块链性能的影响,计算每对联盟节点的信誉度,提高区块共识安全性,满足物联网设备对数据安全的服务质量需求。In the embodiment of this application, by taking each IoT device and its selected edge server as a pair of alliance nodes, and considering the impact of their respective reputations on the performance of the blockchain, the credibility of each pair of alliance nodes is calculated to improve Block consensus security meets the quality of service requirements of IoT devices for data security.
作为一种可选实施例,建立基于区块链的云原生网络系统包括:As an optional embodiment, establishing a blockchain-based cloud native network system includes:
建立区块链赋能的云原生网络系统,其中,云原生网络系统包含第二预设数量个物联网设备和第四预设数量个边缘服务器;Establishing a blockchain-powered cloud-native network system, wherein the cloud-native network system includes a second preset number of IoT devices and a fourth preset number of edge servers;
基于云原生网络系统,建立计算卸载过程中的联盟链系统。Based on the cloud-native network system, an alliance chain system in the process of computing offload is established.
可选地,区块链赋能的云原生网络系统模型如图2所示,系统中包含云原生网络和区块链网络。在云原生网络中存在N个物联网设备D={d1,...,di,...,dN}和M个边缘服务器第二预设数量为N,第四预设数量为M,N和M表示多个,本申请实施例不对具体数值做限定。物联网设备di在执行计算密集型应用时,生成一系列相同的计算任务,物联网设备直接将上述计算任务通过无线信道传输到边缘服务器执行。假定在一个时隙内,di到达的任务数量为ni=υ/θi,其中,υ是一个时隙的时间长度,θi是任务到达的时间间隔,则λi=1/θi为di的任务到达率。边缘服务器之间通过有线链路连接。区块链网络用于保证计算卸载数据的安全性。Optionally, the cloud-native network system model empowered by the blockchain is shown in Figure 2, and the system includes a cloud-native network and a blockchain network. There are N IoT devices D={d 1 ,...,d i ,...,d N } and M edge servers in the cloud-native network The second preset number is N, and the fourth preset number is M. N and M represent a plurality, and the embodiment of the present application does not limit the specific values. The IoT device d i generates a series of identical computing tasks when executing computationally intensive applications, and the IoT device directly transmits the above computing tasks to the edge server through a wireless channel for execution. Assume that within a time slot, the number of tasks arriving at d i is n i =υ/θ i , where υ is the time length of a time slot, and θ i is the time interval between task arrivals, then λ i =1/θ i is the task arrival rate of d i . The edge servers are connected through wired links. The blockchain network is used to ensure the security of computing offload data.
构建由物联网设备和边缘服务器这两类利益团体共同维护的联盟链。其中,物联网设备作为区块链用户发送任务卸载的信息,边缘服务器作为区块链共识节点,执行计算卸载任务和区块链共识任务。该联盟链的工作流程为:首先,物联网设备发送任务卸载的信息到边缘服务器,边缘服务器执行计算卸载任务,并在完成之后将计算结果返回给物联网设备。然后,边缘服务器将计算任务结果和相关信息打包成块,并根据基于DAG的区块链共识机制完成区块链共识,验证无误后将数据信息添加到区块链上,从而保证计算卸载过程用户隐私和数据安全。Build a consortium chain jointly maintained by two types of interest groups, IoT devices and edge servers. Among them, IoT devices serve as blockchain users to send task offloading information, and edge servers, as blockchain consensus nodes, perform computing offloading tasks and blockchain consensus tasks. The workflow of the consortium chain is as follows: first, the IoT device sends task offloading information to the edge server, and the edge server performs the calculation offloading task, and returns the calculation result to the IoT device after completion. Then, the edge server packs the calculation task results and related information into blocks, and completes the blockchain consensus according to the DAG-based blockchain consensus mechanism. Privacy and data security.
在本申请实施例中,建立基于区块链的云原生网络系统,然后根据云原生网络系统建立计算卸载过程中物联网设备和边缘服务器的联盟链模型,通过区块链共识机制,防止节点被恶意篡改以及防止伪造用户的数据信息数据,满足了物联网设备的安全性需求。In the embodiment of this application, a blockchain-based cloud-native network system is established, and then an alliance chain model of IoT devices and edge servers in the process of computing offload is established according to the cloud-native network system, and the blockchain consensus mechanism is used to prevent nodes from being Malicious tampering and preventing forgery of user data information meet the security requirements of IoT devices.
根据本申请实施例的另一个方面,还提供了一种用于实施上述计算卸载优化方法的计算卸载优化装置。图3是据本申请实施例的一种可选的计算卸载优化装置的结构框图,如图3所示,该装置可以包括:According to another aspect of the embodiments of the present application, a computing offloading optimization device for implementing the above computing offloading optimization method is also provided. Fig. 3 is a structural block diagram of an optional computing offload optimization device according to an embodiment of the present application. As shown in Fig. 3, the device may include:
建立模块301,用于建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象;The
确定模块302,用于根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;Determining
生成模块303,用于根据信誉度生成区块链共识机制;
获取模块304,用于获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;The obtaining
得到模块305,用于根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。The obtaining
作为一种可选实施例,生成模块包括:As an optional embodiment, the generation module includes:
创建单元,用于利用目标边缘服务器创建一个初始单元,其中,初始单元用于存储边缘计算结果和联盟节点的信誉度;Create a unit for creating an initial unit by using the target edge server, where the initial unit is used to store the edge computing result and the reputation of the federation node;
选择单元,用于利用目标边缘服务器通过第一预设方法选择第一预设数量个边缘区块,将第一预设数量个边缘区块的哈希值存入初始单元,得到第一单元;The selection unit is configured to use the target edge server to select a first preset number of edge blocks through a first preset method, and store the hash values of the first preset number of edge blocks into the initial unit to obtain the first unit;
计算单元,用于利用目标边缘服务器将一个随机数存入第一单元,计算此时第一单元的哈希值并将哈希值存入第一单元,得到第二单元;The computing unit is configured to use the target edge server to store a random number into the first unit, calculate the hash value of the first unit at this time and store the hash value into the first unit to obtain the second unit;
广播单元,用于利用目标边缘服务器将第二单元广播至其他边缘服务器;a broadcast unit, configured to use the target edge server to broadcast the second unit to other edge servers;
验证单元,用于利用其他边缘服务器验证第二单元是否合法,如果合法,则第二单元成为新的边缘区块;The verification unit is used to use other edge servers to verify whether the second unit is legal, and if it is legal, the second unit becomes a new edge block;
判断单元,用于利用其他边缘服务器所产生的边缘区块,验证新的边缘区块,并利用其他边缘服务器判断验证次数是否达到认证阈值,如果达到认证阈值,则第二单元的数据被云原生网络系统成功共识。The judging unit is used to use the edge blocks generated by other edge servers to verify new edge blocks, and use other edge servers to judge whether the number of verifications reaches the authentication threshold. Network system successful consensus.
作为一种可选实施例,获取模块包括:As an optional embodiment, the acquisition module includes:
第一获取单元,用于获取任务卸载信息在传输过程中的传输时延以及第一能耗、任务卸载信息在边缘服务器排队的排队时延和边缘服务器执行任务卸载信息所需的执行时延;The first acquisition unit is configured to acquire the transmission delay of the task offloading information during transmission and the first energy consumption, the queuing delay of the task offloading information at the edge server, and the execution delay required by the edge server to execute the task offloading information;
第一得到单元,用于根据传输时延、排队时延以及执行时延得到第一时延;The first obtaining unit is configured to obtain the first time delay according to the transmission time delay, queuing time delay and execution time delay;
第二获取单元,用于获取任务卸载信息在共识过程中的第二时延。The second acquiring unit is configured to acquire the second time delay of the task offloading information in the consensus process.
作为一种可选实施例,得到模块包括:As an optional embodiment, the obtaining module includes:
生成单元,用于生成针对第一时延、第一能耗以及第二时延的约束条件;A generating unit, configured to generate constraint conditions for the first time delay, the first energy consumption, and the second time delay;
第一建立单元,用于基于约束条件,建立时延最小化目标模型。The first establishing unit is configured to establish a time delay minimization target model based on constraint conditions.
转化单元,用于通过第二预设方法将时延最小化目标模型转化为第二预设数量个局部模型;A conversion unit, configured to convert the time-delay minimization target model into a second preset number of local models by a second preset method;
第二得到单元,用于通过训练第二预设数量个局部模型的参数并行地优化局部模型,得到对应的局部变量;The second obtaining unit is configured to optimize the local models in parallel by training the parameters of a second preset number of local models to obtain corresponding local variables;
第三得到单元,用于合并局部变量,并对时延最小化目标模型的全局变量进行优化,得到计算卸载优化方案。The third obtaining unit is used for merging local variables and optimizing the global variables of the time delay minimization objective model to obtain an optimization scheme of computation offloading.
作为一种可选实施例,确定模块包括:As an optional embodiment, the determining module includes:
第四得到单元,用于利用目标边缘服务器根据第三预设数量个目标物联网设备对目标边缘服务器的信誉度,得到目标边缘服务器的综合信誉度;The fourth obtaining unit is used to use the target edge server to obtain the comprehensive reputation of the target edge server according to the reputation of the third preset number of target IoT devices to the target edge server;
第五得到单元,用于利用目标边缘服务器根据目标物联网设备的任务到达率,得到目标物联网设备的信誉度;The fifth obtaining unit is used to use the target edge server to obtain the credibility of the target IoT device according to the task arrival rate of the target IoT device;
确定单元,用于根据目标边缘服务器的综合信誉度和目标物联网设备的信誉度,确定每对联盟节点的信誉度。The determining unit is configured to determine the reputation of each pair of federation nodes according to the comprehensive reputation of the target edge server and the reputation of the target IoT device.
作为一种可选实施例,建立模块包括:As an optional embodiment, the establishment module includes:
第二建立单元,用于建立区块链赋能的云原生网络系统,其中,云原生网络系统包含第四预设数量个物联网设备和第五预设数量个边缘服务器;The second establishment unit is used to establish a blockchain-powered cloud-native network system, wherein the cloud-native network system includes a fourth preset number of IoT devices and a fifth preset number of edge servers;
第三建立单元,用于基于云原生网络系统,建立计算卸载过程中的联盟链系统。The third establishment unit is used to establish the alliance chain system in the calculation offloading process based on the cloud-native network system.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.
图4是根据本申请实施例的一种可选的电子设备的结构框图,如图4所示,包括处理器401、通信接口402、存储器403和通信总线404,其中,处理器401、通信接口402和存储器403通过通信总线404完成相互间的通信,其中,Fig. 4 is a structural block diagram of an optional electronic device according to an embodiment of the present application, as shown in Fig. 402 and
存储器403,用于存储计算机程序;
处理器401,用于执行存储器403上所存放的计算机程序时,实现如下步骤:When the
建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象;Establish a blockchain-based cloud-native network system, in which the cloud-native network system includes a consortium chain system for information processing during computing offloading. The consortium chain system includes multiple pairs of consortium nodes, and each pair of consortium nodes includes target IoT devices and The target edge server, the target IoT device is the object that sends task offload information, and the target edge server is the object that calculates task offload information and performs blockchain consensus;
根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;Determine the credibility of each pair of federation nodes according to the edge computing results of the target edge server and the task arrival rate of the target IoT device;
根据信誉度生成区块链共识机制;Generate a blockchain consensus mechanism based on reputation;
获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;Obtain the first time delay and the first energy consumption required by the alliance chain system in the calculation offloading process, and obtain the second time delay required by the blockchain consensus mechanism in the consensus process;
根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。According to the first time delay, the first energy consumption and the second time delay, a time delay minimization target model is established, and a computation unloading optimization scheme is obtained based on the time delay minimization target model.
可选地,在本实施例中,上述的通信总线可以包括但不限于PCI(PeripheralComponent Interconnect,外设部件互连标准)总线、或EISA(Extended IndustryStandard Architecture,扩展工业标准结构)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Optionally, in this embodiment, the aforementioned communication bus may include but not limited to a PCI (Peripheral Component Interconnect, Peripheral Component Interconnect Standard) bus, or an EISA (Extended Industry Standard Architecture, Extended Industry Standard Architecture) bus, and the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 4 , but it does not mean that there is only one bus or one type of bus.
通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the electronic device and other devices.
存储器可以包括RAM,也可以包括但不限于非易失性存储器(non-volatilememory),例如,至少一个磁盘存储器。可选地,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include RAM, and may also include but not limited to non-volatile memory (non-volatile memory), for example, at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
作为一种示例,如图4所示,上述存储器403中可以但不限于包括上述计算卸载优化装置中的建立模块301、确定模块302、生成模块303、获取模块304、得到模块305。此外,还可以包括但不限于上述计算卸载优化装置中的其他模块单元,本示例中不再赘述。As an example, as shown in FIG. 4 , the
上述处理器可以是通用处理器,可以包含但不限于:CPU(Central ProcessingUnit,中央处理器)、NP(Network Processor,网络处理器)等;还可以是DSP(DigitalSignal Processing,数字信号处理器)、ASIC(Application Specific IntegratedCircuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。Above-mentioned processor can be general-purpose processor, can include but not limited to: CPU (Central Processing Unit, central processing unit), NP (Network Processor, network processor) etc.; Can also be DSP (DigitalSignal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit, Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not repeated in this embodiment.
本领域普通技术人员可以理解,图4所示的结构仅为示意。图4其并不对电子设备的结构造成限定。例如,终端设备还可以包括但不限于比图4中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图4所示的不同的配置。Those of ordinary skill in the art can understand that the structure shown in FIG. 4 is only schematic. FIG. 4 does not limit the structure of the electronic device. For example, the terminal device may also include, but not limited to, more or fewer components than those shown in FIG. 4 (such as a network interface, a display device, etc.), or have a configuration different from that shown in FIG. 4 .
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括但不限于:闪存盘、ROM、RAM、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can be Including but not limited to: flash disk, ROM, RAM, magnetic disk or optical disk, etc.
根据本申请实施例的又一个方面,还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于存储执行计算卸载优化方法的程序代码。According to still another aspect of the embodiments of the present application, a storage medium is also provided. Optionally, in this embodiment, the foregoing storage medium may be used to store program codes for executing the computing offload optimization method.
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the foregoing storage medium may be located on at least one network device among the plurality of network devices in the network shown in the foregoing embodiments.
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the storage medium is configured to store program codes for performing the following steps:
建立基于区块链的云原生网络系统,其中,云原生网络系统中包含计算卸载过程中信息处理的联盟链系统,联盟链系统包含多对联盟节点,每对联盟节点中包含目标物联网设备和目标边缘服务器,目标物联网设备为发送任务卸载信息的对象,目标边缘服务器为计算任务卸载信息和进行区块链共识的对象;Establish a blockchain-based cloud-native network system, in which the cloud-native network system includes a consortium chain system for information processing during computing offloading. The consortium chain system includes multiple pairs of consortium nodes, and each pair of consortium nodes includes target IoT devices and The target edge server, the target IoT device is the object that sends task offload information, and the target edge server is the object that calculates task offload information and performs blockchain consensus;
根据目标边缘服务器的边缘计算结果和目标物联网设备的任务到达率确定每对联盟节点的信誉度;Determine the credibility of each pair of federation nodes according to the edge computing results of the target edge server and the task arrival rate of the target IoT device;
根据信誉度生成区块链共识机制;Generate a blockchain consensus mechanism based on reputation;
获取联盟链系统在计算卸载过程中所需的第一时延和消耗的第一能耗、获取区块链共识机制在共识过程中所需的第二时延;Obtain the first time delay and the first energy consumption required by the alliance chain system in the calculation offloading process, and obtain the second time delay required by the blockchain consensus mechanism in the consensus process;
根据第一时延、第一能耗以及第二时延建立时延最小化目标模型,并基于时延最小化目标模型得到计算卸载优化方案。According to the first time delay, the first energy consumption and the second time delay, a time delay minimization target model is established, and a computation unloading optimization scheme is obtained based on the time delay minimization target model.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例中对此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, which will not be repeated in this embodiment.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、ROM、RAM、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include, but not limited to, various media capable of storing program codes such as a U disk, ROM, RAM, removable hard disk, magnetic disk, or optical disk.
在本说明书的描述中,参考术语“本实施例”、“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。在本公开的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In the description of this specification, descriptions referring to the terms "this embodiment", "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" mean that the embodiments are combined A specific feature, structure, material, or characteristic described by or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本发明创造的保护范围之中。Apparently, the above-mentioned embodiments are only examples for clear description, rather than limiting the implementation. For those of ordinary skill in the art, other changes or changes in different forms can be made on the basis of the above description. It is not necessary and impossible to exhaustively list all the implementation manners here. And the obvious changes or changes derived therefrom are still within the scope of protection of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211026689.6A CN115604765A (en) | 2022-08-25 | 2022-08-25 | Computing offload optimization method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211026689.6A CN115604765A (en) | 2022-08-25 | 2022-08-25 | Computing offload optimization method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115604765A true CN115604765A (en) | 2023-01-13 |
Family
ID=84842795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211026689.6A Pending CN115604765A (en) | 2022-08-25 | 2022-08-25 | Computing offload optimization method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115604765A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117042051A (en) * | 2023-08-29 | 2023-11-10 | 燕山大学 | Task unloading strategy generation method, system, equipment and medium in Internet of vehicles |
-
2022
- 2022-08-25 CN CN202211026689.6A patent/CN115604765A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117042051A (en) * | 2023-08-29 | 2023-11-10 | 燕山大学 | Task unloading strategy generation method, system, equipment and medium in Internet of vehicles |
CN117042051B (en) * | 2023-08-29 | 2024-03-08 | 燕山大学 | Task unloading strategy generation method, system, equipment and medium in Internet of vehicles |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Asheralieva et al. | Reputation-based coalition formation for secure self-organized and scalable sharding in IoT blockchains with mobile-edge computing | |
CN111800495B (en) | A task offloading method in vehicle fog computing | |
Lee et al. | An online secretary framework for fog network formation with minimal latency | |
Xiaoyong et al. | A novel security-driven scheduling algorithm for precedence-constrained tasks in heterogeneous distributed systems | |
CN112348204A (en) | A method for data security sharing of marine Internet of things under the framework of edge computing based on federated learning and blockchain technology | |
CN110460465B (en) | Service function chain deployment method facing mobile edge calculation | |
Wan et al. | Reinforcement learning based mobile offloading for cloud-based malware detection | |
CN112181655A (en) | Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation | |
Seng et al. | User matching on blockchain for computation offloading in ultra-dense wireless networks | |
CN113220356A (en) | User computing task unloading method in mobile edge computing | |
CN112119620B (en) | System and method for propagating data packets in a network of nodes | |
Chen et al. | On the latency performance in private blockchain networks | |
CN112288433B (en) | Block chain consensus task processing system and method supporting edge-side cooperation | |
Rochman et al. | Optimization of tips selection on the IOTA tangle for securing blockchain-based IoT transactions | |
KR20200081533A (en) | Blockchain Consensus Method based Improved Dynamic Blind Voting for Internet of Things Environment | |
Zhu et al. | ESFL: Efficient split federated learning over resource-constrained heterogeneous wireless devices | |
Fang et al. | Toward low-cost and stable blockchain networks | |
CN115499379A (en) | Information interaction method, device, equipment and medium based on block chain | |
CN115604765A (en) | Computing offload optimization method and device, electronic equipment and storage medium | |
CN117591886A (en) | Method and device for quickly aggregating heterogeneous data based on cluster federation learning | |
Wang et al. | Function virtualization can play a Great Role in Blockchain Consensus | |
Vairagade et al. | Secure Internet of Things network using light‐weighted trust and blockchain‐powered PoW framework | |
Mishra et al. | A task offloading and reallocation scheme for passenger assistance using fog computing | |
Consul et al. | Deep Reinforcement Learning Based Resource Allocation Method in Future Wireless Networks with Blockchain Assisted MEC Network | |
CN112217830B (en) | Method for identifying cloned blocks in edge computing system 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 |