技术领域technical field
本发明涉及移动互联网领域,尤其涉及一种基于模糊逻辑的虚拟服务迁移方法。The invention relates to the field of mobile Internet, in particular to a virtual service migration method based on fuzzy logic.
背景技术Background technique
目前,移动互联网已经成为互联网发展的趋势,在2008年,全球以智能手机与平板电脑为代表的移动互联网用户已经超越固定互联网宽带接入用户数[Datafrom2008[R].InternationalTelecommunicationsUnion,2009.]。而在这之后的几年,移动互联网用户更呈现井喷的局面,具体到我国的情况,工业和信息化部数据显示,到2014年7月份,我国固定互联网宽带用户数为1.82亿户,而移动互联网用户则已达到8.2亿户[2014年7月份通信业经济运行情况[R].工业和信息化部,2014年7月.http://www.miit.gov.cn]。At present, the mobile Internet has become the trend of Internet development. In 2008, the number of mobile Internet users represented by smart phones and tablet computers in the world has surpassed the number of fixed Internet broadband access users [Data from 2008[R].InternationalTelecommunicationsUnion, 2009.]. In the next few years, mobile Internet users showed a blowout situation. Specific to the situation in my country, according to data from the Ministry of Industry and Information Technology, by July 2014, the number of fixed Internet broadband users in my country was 182 million, while mobile Internet users have reached 820 million [Economic Operations of Communications Industry in July 2014 [R]. Ministry of Industry and Information Technology, July 2014. http://www.miit.gov.cn].
互联网对移动性需求的增强,用户行为的改变,对网络的适应能力,对保障和提高用户的体验质量,提出了新的考验。具体地,可能会出现以下场景,在某些时刻,大量用户访问同一网络服务,或者在移动环境下,出现用户大规模迁移的场景。网络虚拟化技术的发展将协助这些问题的解决,网络虚拟化的目标就是在不用考虑底层物理网络属性的情况下实现虚拟服务的平滑移动,实现对网络资源的按需分配,提高用户的体验质量。The Internet's increased demand for mobility, changes in user behavior, and the ability to adapt to the network have put forward new challenges for ensuring and improving user experience quality. Specifically, the following scenarios may occur. At certain moments, a large number of users access the same network service, or in a mobile environment, a large-scale migration of users occurs. The development of network virtualization technology will help solve these problems. The goal of network virtualization is to realize the smooth movement of virtual services without considering the properties of the underlying physical network, realize the on-demand allocation of network resources, and improve the quality of user experience. .
而在网络虚拟化环境中,由于网络中用户数量、用户行为、用户偏好的变化,如何根据用户的行为,对服务进行迁移和调整,以节约网络的资源,提高使用者的用户体验,实现情景感知,也是一个挑战性的问题。为了直观的说明服务迁移的意义,首先列举服务迁移可能发生的场景,以下的几个典型的应用场景是虚拟服务迁移经常需要考虑的。In a network virtualization environment, due to changes in the number of users, user behavior, and user preferences in the network, how to migrate and adjust services according to user behavior to save network resources, improve user experience, and realize scenario Perception, too, is a challenging problem. In order to intuitively explain the significance of service migration, we first enumerate the possible scenarios of service migration. The following typical application scenarios are often considered for virtual service migration.
时区场景:时区场景针对跨越多个大洲的网络服务。这种场景下,多组用户分布于不同的时区位置,共同使用相同的服务,用户对网络应用具有低时延的需求,而不同地域的每组用户的使用时间都是在固定的时间段,比如都是在上班时间使用某种商业应用。一种解决方式是在每个时区均设置云数据中心,以满足用户的需求。这种方式能够解决诸如内容存放、下载等类型的服务,而不能满足那些对实时性、互通性要求较高的应用服务。另一种简单的想法是,将一个或多个装有应用的虚拟机和数据随时间进行迁移,比如将某些全球性商业金融服务,每天的日落时刻将数据迁移到即将日出的时区,如东京-伦敦-纽约。迁移的时机、代价、带来的收益是需要综合考虑的问题。Time Zone Scenario: The Time Zone Scenario targets web services that span multiple continents. In this scenario, multiple groups of users are distributed in different time zones and use the same service together. Users have low latency requirements for network applications, and the usage time of each group of users in different regions is in a fixed period of time. For example, they all use some kind of business application during working hours. One solution is to set up cloud data centers in each time zone to meet the needs of users. This method can solve services such as content storage and downloading, but cannot satisfy those application services that require high real-time performance and interoperability. Another simple idea is to migrate one or more virtual machines and data with applications over time. For example, some global commercial financial services migrate data to the time zone that is about to rise at sunset every day. Such as Tokyo-London-New York. The timing, cost, and benefits of migration are issues that need to be considered comprehensively.
上下班场景/用户移动性场景:这种场景指的是,服务的用户在一天中的不同时刻处于不同的位置,而用户的位置变化的统计特征则有规律可循。比如,在上下班时刻,用户服务的热点处于公交车站/地铁等位置,工作时间用户服务的热点则处于城市中心/商业区/工业区等位置,晚上网络服务的热点则集中于居民区/卫星城等区域。同时,在不同时刻,用户对应用的需求类型也是不同的,比如,在上下班时间,用户关注的应用服务主要集中在一些新闻、小游戏等内容,而在晚上,用户则更倾向于视频服务、大型游戏等内容。这些热点和资源分布是可以预测的。根据热点分布的不同,对网络中服务位置进行动态调整,能够有效的节约网络的资源。Commuting/User Mobility Scenario: This scenario refers to the scenario where the users of the service are in different locations at different times of the day, and the statistical characteristics of the user's location changes can be followed regularly. For example, during commuting hours, the hotspots of user services are located in bus stations/subway, etc.; during working hours, the hotspots of user services are located in the city center/commercial districts/industrial areas; at night, the hotspots of network services are concentrated in residential areas/ Satellite cities and other areas. At the same time, at different times, users have different types of needs for applications. For example, during commuting hours, users focus on application services such as news and small games, while at night, users are more inclined to video services. , large games, etc. These hotspots and distribution of resources are predictable. According to the distribution of hotspots, dynamically adjust the service location in the network, which can effectively save network resources.
从以上的应用场景可以看出,分析和利用用户行为、分布的变化,并以此来调整网络服务的位置,可以有效的节约网络的资源,降低服务的响应时间,改善用户的使用体验。图1展示了终端设备的移动可能导致的服务迁移。在终端设备发生迁移时,服务从一个节点迁移到另一个节点更能满足用户的需要。From the above application scenarios, it can be seen that analyzing and utilizing changes in user behavior and distribution, and adjusting the location of network services can effectively save network resources, reduce service response time, and improve user experience. Figure 1 shows the possible service migration caused by the movement of terminal equipment. When the terminal equipment is migrated, the service migration from one node to another node can better meet the needs of users.
基础设施提供商在对运行在其物理网络上的虚拟服务根据用户的情况进行自由迁移虽然有着广泛的应用场景,但同时也面临着很大的挑战。首先,服务迁移需要考虑迁移的各种代价的平衡,平衡主要包括两个方面。一方面,是迁移带来的好处,如服务延迟的减小、对链路占用的降低等。另一方面则是迁移带来的可能的坏处,如迁移时大数据传输对网络的压力、迁移导致的服务的中断和恢复对用户体验的影响等。Although infrastructure providers have a wide range of application scenarios for free migration of virtual services running on their physical networks according to user conditions, they also face great challenges. First of all, service migration needs to consider the balance of various costs of migration. The balance mainly includes two aspects. On the one hand, it is the benefits brought by migration, such as the reduction of service delay and the reduction of link occupation. On the other hand, there are possible disadvantages caused by migration, such as the pressure of large data transmission on the network during migration, the impact of service interruption and recovery caused by migration on user experience, and so on.
目前,对网络虚拟化环境下服务迁移的研究已经有一些想法被提出来。在移动互联网方面,文献[TalukderA,YavagalR.Mobilecomputing:technology,applications,andservicecreation[M].McGraw-Hill,2006.]展示了在移动互联网以Web浏览器为基础的服务迁移的相关研究工作。文献[WoodT,RamakrishnanK,ShenoyP,etal.CloudNet:dynamicpoolingofcloudresourcesbyliveWANmigrationofvirtualmachines[J].ACMSIGPLANNotices,2011,46(7):121-132.]提出了通过虚拟机的实时迁移来实现云计算资源动态池化的手段,提出了服务迁移需要考虑的一些问题。文献[WangY,KellerE,BiskebornB,etal.Virtualroutersonthemove:liveroutermigrationasanetwork-managementprimitive[J].ACMSIGCOMMComputerCommunicationsReview,2008,38(4):231-242.]提出了VROOM方案,来实现虚拟路由器的自由迁移问题。OpenFlow[McKeownN,AndersonT,BalakrishnanH,etal.OpenFlow:enablinginnovationincampusnetworks[J],ACMSIGCOMMComputerCommunicationsReview,2008,38(2):69-74.]利用对流表的控制,简化了虚拟路由器的控制设计,降低了虚拟路由器和逻辑路由器可能对商用路由器的冲击,成为当前的研究热点。而OpenFlow通过控制网络流的方式,减轻了虚拟节点迁移在技术上的困难,为服务迁移的实现提供了可能,目前很多考虑服务迁移的文章都以OpenFlow实现迁移为假设基础。文献[PisaP,FernandesN,CarvalhoH,etal.OpenFlowandXen-basedvirtualnetworkmigration[J].Communications:WirelessinDevelopingCountriesandnetworksoftheFuture,2010,170-181.]提出利用OpenFlow与XEN主机虚拟化进行结合,以实现虚拟网络迁移。以上几篇文章在技术上为实现虚拟网络/服务的迁移打下了基础。At present, some ideas have been put forward in the research of service migration under network virtualization environment. In terms of mobile Internet, the literature [TalukderA, YavagalR.Mobilecomputing: technology, applications, and service creation [M]. McGraw-Hill, 2006.] shows the related research work on Web browser-based service migration in mobile Internet. Literature [WoodT, RamakrishnanK, ShenoyP, etal. CloudNet: dynamic pooling of cloud resources by live WAN migration of virtual machines [J]. ACMSIGPLANNotices, 2011, 46 (7): 121-132.] proposes a means of realizing dynamic pooling of cloud computing resources through real-time migration of virtual machines, Some issues that need to be considered for service migration are presented. The document [WangY, KellerE, BiskebornB, etal.Virtualroutersonthemove:liveroutermigrationasanetwork-managementprimitive[J].ACMSIGCOMMComputerCommunicationsReview,2008,38(4):231-242.] proposed a VROOM scheme to realize the free migration of virtual routers. OpenFlow [McKeownN, AndersonT, BalakrishnanH, etal. OpenFlow: enabling innovation in campus networks [J], ACMSIGCOMM Computer Communications Review, 2008, 38 (2): 69-74.] utilizes the control of the flow table to simplify the control design of the virtual router, reducing the cost of the virtual router and The possible impact of logical routers on commercial routers has become a current research hotspot. By controlling the network flow, OpenFlow alleviates the technical difficulty of virtual node migration and provides the possibility for the realization of service migration. At present, many articles considering service migration are based on the assumption that OpenFlow realizes migration. The literature [PisaP, FernandesN, CarvalhoH, etal. OpenFlow and Xen-based virtual network migration [J]. Communications: Wireless in Developing Countries and network soft the Future, 2010, 170-181.] proposes to combine OpenFlow and XEN host virtualization to realize virtual network migration. The above articles have technically laid the foundation for the migration of virtual networks/services.
在利用服务迁移以实现网络的资源管理和降低能耗方面,文献[BienkowskiM,FeldmannA,JurcaD,etal.Competitiveanalysisforservicemigrationinvnets[C]//Proc.2ndACMSIGCOMMVISA,2010.]与文献[AroraD,BienkowskiM,FeldmannA,etal.Onlinestrategiesforintraandinterproviderservicemigrationinvirtualnetworks[C]//Proceedingsofthe5thInternationalConferenceonPrinciples,SystemsandApplicationsofIPTelecommunications,2011.]做了尝试,提出了管理服务迁移的初步方案。该方法通过对迁移的代价与收益各个参数进行量化,通过动态比较的方式,判断迁移的时机。这种方法的缺点包括:决定迁移的各个因素是相互作用影响的,简单量化不能反映各个因素之间的相互关系;各个因素简单量化过于死板,不利于迁移时机的动态调整;不易根据网络参数的变化,对模型进行扩展。In terms of using service migration to achieve network resource management and reduce energy consumption, literature [BienkowskiM, FeldmannA, JurcaD, et al. Competitive analysis for service migration invnets [C]//Proc.2ndACMSIGCOMMVISA, 2010. Online strategies for intra and interprovider service migration in virtual networks [C]//Proceeding of the 5th International Conference on Principles, Systems and Applications of IPTelecommunications, 2011.] made an attempt and proposed a preliminary plan for management service migration. This method quantifies the cost and benefit parameters of migration, and judges the timing of migration through dynamic comparison. The disadvantages of this method include: the factors that determine the migration are interactive, and the simple quantification cannot reflect the relationship between each factor; the simple quantification of each factor is too rigid, which is not conducive to the dynamic adjustment of the migration timing; Changes to extend the model.
发明内容Contents of the invention
针对上述问题,本发明的目的是提出一种基于模糊逻辑的虚拟服务迁移方法,能够有效综合各种因素对迁移的影响,通过模糊逻辑规则的建立和更新反映了不同参数对迁移的影响力的不同,并且通过对模糊逻辑规则库进行分析和判断,有效的验证网络行为的变化规律,对迁移进行预判和执行。In view of the above problems, the purpose of the present invention is to propose a virtual service migration method based on fuzzy logic, which can effectively integrate the influence of various factors on migration, and reflect the influence of different parameters on migration through the establishment and update of fuzzy logic rules It is different, and by analyzing and judging the fuzzy logic rule base, it can effectively verify the changing law of network behavior, and predict and execute the migration.
为达上述目的,本发明采取的具体技术方案是:For reaching above-mentioned purpose, the concrete technical scheme that the present invention takes is:
一种基于模糊逻辑的虚拟服务迁移方法,包括以下步骤:A virtual service migration method based on fuzzy logic, comprising the following steps:
1)服务迁移的参数采集:当需要将虚拟服务从一待迁移节点迁移至多个潜在节点之一时,以影响虚拟服务迁移的多个参数作为迁移代价参数组,并采集各潜在节点的该迁移代价参数组;1) Collection of parameters for service migration: when it is necessary to migrate a virtual service from a node to be migrated to one of multiple potential nodes, multiple parameters affecting virtual service migration are used as the migration cost parameter group, and the migration cost of each potential node is collected parameter group;
2)将采集到的迁移代价参数组中的各迁移代价参数映射至模糊集合中,并获取各迁移代价参数组在模糊集合中的隶属度函数;2) Map each migration cost parameter in the collected migration cost parameter group to the fuzzy set, and obtain the membership function of each migration cost parameter group in the fuzzy set;
3)通过模糊规则对各迁移代价参数组在模糊集合中的隶属度函数进行模糊推理,得到模糊输出;3) Carry out fuzzy inference on the membership function of each migration cost parameter group in the fuzzy set through fuzzy rules, and obtain fuzzy output;
4)对该模糊输出进行非模糊化处理,得到对应各潜在节点的迁移参考值;4) Defuzzify the fuzzy output to obtain the migration reference value corresponding to each potential node;
5)根据所述迁移参考值,对各潜在节点排序,选取迁移参考值最小的潜在节点作为迁移的目标节点。5) According to the migration reference value, the potential nodes are sorted, and the potential node with the smallest migration reference value is selected as the migration target node.
进一步地,步骤1)中所述影响虚拟服务迁移的多个参数包括服务的时延Cdela,服务器的可用负载CAload,迁移路径上带宽Cbandwidth,服务本身的大小Csize及服务中断及恢复的代价Cinterrupt。Further, the multiple parameters affecting virtual service migration in step 1) include service delay Cdela , available server load CAload , bandwidth Cbandwidth on the migration path, service size Csize and service interruption and recovery The cost of Cinterrupt .
进一步地,步骤2)中将采集到的迁移代价参数组中的各迁移代价参数映射至模糊集合中,并获取各迁移代价参数组在模糊集合中的隶属度函数包括:Further, in step 2), each migration cost parameter in the collected migration cost parameter group is mapped to a fuzzy set, and the membership function of each migration cost parameter group in the fuzzy set is obtained, including:
采用高斯函数作为各迁移代价参数的隶属度函数,其表达式为:The Gaussian function is used as the membership function of each migration cost parameter, and its expression is:
其中,函数的中心ci表示模糊集合i的中心,而函数的权重σi表示模糊集合i的半径;对于每个迁移代价参数,设定五个隶属度函数级别,对于每个迁移代价参数,区间被归一化到[0,1],每个迁移代价参数获得一个对应的隶属度函数。Among them, the center ci of the function represents the center of the fuzzy set i, and the weight σi of the function represents the radius of the fuzzy set i; for each migration cost parameter, five membership function levels are set, and for each migration cost parameter, The interval is normalized to [0,1], and each transfer cost parameter obtains a corresponding membership function.
进一步地,步骤3)中所述模糊规则包括:Further, the fuzzy rules described in step 3) include:
Rule1:IF<X1isF11>AND<X2isF21>AND…AND<XnisFn1>THEN<YisG1>Rule1 : IF<X1 isF11 >AND<X2 isF21 >AND…AND<Xn isFn1 >THEN<YisG1 >
Rule2:IF<X1isF12>AND<X2isF22>AND…AND<XnisFn2>THEN<YisG2>Rule2 : IF<X1 isF12 >AND<X2 isF22 >AND…AND<Xn isFn2 >THEN<YisG2 >
……...
Rulem:IF<X1isF1m>AND<X2isF2m>AND…AND<XnisFnm>THEN<YisGm>Rulem :IF<X1 isF1m >AND<X2 isF2m >AND…AND<Xn isFnm >THEN<YisGm >
其中,Xi,i=1,…,n为前件变量,Y则为后件变量;每个前件变量Xi需要覆盖迁移代价参数可能产生的空间。Among them, Xi , i=1, . . . , n are antecedent variables, and Y is a consequent variable; each antecedent variable Xi needs to cover the possible space generated by the migration cost parameter.
进一步地,步骤3)中模糊推理过程中,采用最大-最小推理方法进行推理。Further, in the process of fuzzy inference in step 3), a maximum-minimum inference method is used for inference.
进一步地,步骤4)中非模糊化处理采用重心法来得到清晰值:Further, the defuzzification process in step 4) adopts the center of gravity method to obtain clear values:
其中,z*即为输出的非模糊化值,μi(z)为隶属度函数,z为输出变量。Among them, z* is the output defuzzification value, μi (z) is the membership function, and z is the output variable.
通过采取上述技术方案,能够对虚拟网络服务迁移的时机进行及时有效的判断。仿真结果显示,该方法与以往算法相比,可以提高迁移的成功率,降低网络的运营开销。By adopting the above technical solution, timely and effective judgment can be made on the timing of virtual network service migration. Simulation results show that, compared with previous algorithms, this method can improve the success rate of migration and reduce network operating expenses.
附图说明Description of drawings
图1为背景技术中用户迁移和服务迁移的示意图。FIG. 1 is a schematic diagram of user migration and service migration in the background technology.
图2(a)、图2(b)为一示例中的隶属度函数示意图。Figure 2(a) and Figure 2(b) are schematic diagrams of the membership function in an example.
图3为一示例中的模糊逻辑控制系统的模块组成示意图。Fig. 3 is a schematic diagram of the module composition of the fuzzy logic control system in an example.
图4为一示例中的输入隶属度函数示意图。Fig. 4 is a schematic diagram of an input membership function in an example.
图5为实验过程中时区场景竞争比的变化曲线图。Fig. 5 is a graph showing the variation of the competition ratio of time zone scenarios during the experiment.
图6为实验过程中上下班场景下竞争比的变化曲线图。Figure 6 is a graph showing the variation of the competition ratio in the commuting scene during the experiment.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
首先介绍本申请的工作原理及技术构思:First introduce the working principle and technical conception of this application:
一、模糊逻辑理论简介1. Introduction to fuzzy logic theory
1965年,美国数学家L.Zadeh首先提出了模糊集合的概念,其反映的是建立在二值逻辑基础上的原有逻辑与数学难以描述和处理现实世界中的许多模糊性的对象。而模糊逻辑实际上是要对模糊性对象进行精确的描述和处理。L.Zadeh为了建立模糊性对象的数学模型,把只取0和1二值的普通集合概念推广到[0,1]区间上取无穷多值的模糊集合概念,并用“隶属度”这一概念来精确的刻画元素与模糊集合之间的关系。因为模糊集合是以连续的无穷多值为依据的,所以,模糊逻辑可看作是运用无穷连续值的模糊集合去研究模糊性对象的科学。模糊集合理论给出了表示不确定性的方法,为那些含糊、不精确或缺少必要资料的不确定性事物的建模提供了工具。In 1965, American mathematician L. Zadeh first proposed the concept of fuzzy sets, which reflected the original logic and mathematics based on binary logic, which was difficult to describe and deal with many fuzzy objects in the real world. Fuzzy logic is actually to describe and deal with fuzzy objects accurately. In order to establish a mathematical model of fuzzy objects, L. Zadeh extended the concept of ordinary sets that only take binary values of 0 and 1 to the concept of fuzzy sets that take infinitely many values on the [0, 1] interval, and used the concept of "membership degree" To accurately describe the relationship between elements and fuzzy sets. Because fuzzy sets are based on continuous infinite values, fuzzy logic can be regarded as a science that uses fuzzy sets of infinite continuous values to study fuzzy objects. Fuzzy set theory provides a way to express uncertainty, and provides tools for modeling uncertain things that are vague, imprecise, or lack necessary information.
二、模糊逻辑的基本概念2. Basic concepts of fuzzy logic
模糊集合:在经典或清晰的集合中,域内元素是否在给定集合中的变化是突变的和容易定义的,可明辨地分辨元素是否属于某一个集合,称之为明确集合。所谓明确就是指“属于”“不属于”之间可以做出明确的判断,一般以0与1两个数值来作为表示。例如男、女两个性别。然而在大多数事物、语义表达上通常难以做到明确的区分辨别,而是含有模糊、不明确的叙述,即含有模糊、不明确的外延。以天气温度为例,“寒冷”、“炎热”、“气候适宜”都没有明确的外延。因此,这些模糊的概念不能利用清晰集合加以描述,因为他们对于某个集合而言,不是简单的“属于”或者“不属于”。Fuzzy set: In a classic or clear set, the change of whether the elements in the domain are in a given set is sudden and easy to define, and it can be clearly distinguished whether an element belongs to a certain set, which is called a clear set. The so-called clarity means that a clear judgment can be made between "belongs" and "does not belong", and is generally represented by two values of 0 and 1. For example male and female. However, it is usually difficult to make a clear distinction in most things and semantic expressions, but contains vague and unclear descriptions, that is, vague and unclear extensions. Taking weather temperature as an example, there is no clear extension of "cold", "hot" and "suitable climate". Therefore, these vague concepts cannot be described using clear sets, because they are not simply "belonging to" or "not belonging to" a certain set.
而模糊集合,如同人们的思维方式,每一元素可以说是将二值逻辑扩展成多值逻辑,除了以0和1表示所属程度之外,并推广至介于0和1之间的数值来表示。以空调机为例,现在市场上已经有利用模糊控制方式的空调机,将每个温度给予某程度的值来形成某个模糊集合。例如温度20℃在温度“高”集合的程度为0,在“中”集合的程度为0.33,在“低”集合的程度为0.66。模糊控制的空调机会随温度的高低控制压缩机运转功率、出风量作些许的调整,改善了老式空调机不能维持温度平稳和浪费电能的缺点。And fuzzy sets, just like people's way of thinking, each element can be said to expand the binary logic into multi-valued logic, in addition to expressing the degree of belonging with 0 and 1, and extending it to a value between 0 and 1 express. Taking air conditioners as an example, there are already air conditioners using fuzzy control on the market, and each temperature is given a certain degree of value to form a certain fuzzy set. For example, at a temperature of 20° C., the degree of the “high” set is 0, the degree of the “medium” set is 0.33, and the degree of the “low” set is 0.66. The air conditioner with fuzzy control will control the operating power and air volume of the compressor to make some adjustments according to the temperature, which improves the shortcomings of the old air conditioners that cannot maintain a stable temperature and waste electric energy.
隶属度函数:集合隶属度概念的关键是用域上集合来表示域内对象。经典集合中的元素具有精确的隶属度,而模糊集合中的对象具有近似的隶属度。例如,“5英尺-7英尺高度”的集合是清晰的,“6英尺左右”的集合则是模糊的。为详尽起见,假设有一个单个元素x的穷举集,并构成论域X,再设该域上的这些元素的不同组合构成的集合为A。对明确集合来说,此X域上的元素x要么是某个明确集合A的元素,要么不是。该隶属度的二进制状态可用指标函数的数学形式来表示:Membership function: The key to the concept of set membership is to use the set on the domain to represent the objects in the domain. Elements in a classical set have an exact degree of membership, while objects in a fuzzy set have an approximate degree of membership. For example, the set of "height of 5 feet - 7 feet" is clear, and the set of "around 6 feet" is blurred. For the sake of elaboration, assume that there is an exhaustive set of a single element x, which constitutes the domain of discourse X, and let A be the set formed by different combinations of these elements on the domain. For definite sets, an element x on the field X is either an element of some definite set A, or it is not. The binary state of the membership degree can be expressed in the mathematical form of the index function:
这里的χA(x)给出了A集合中元素x的非模糊隶属度指标。以人的高度为例,设A集是所有5.0≤x≤7.0英尺的人的一个清晰集合,如图2(a)所示。某成员x1有6.0英尺,在清晰集合中其隶属度为1,或用全隶属度符号χA(x1)=1表示,另一成员x2有4.99英尺。他在A集中的隶属度等于0或者无隶属关系,所以χA(x2)=0。这种情况下的集合隶属度是二进制的,即一个元素或属于一个集合,或不属于一个集合。Here χA (x) gives the non-fuzzy membership index of element x in A set. Taking the height of people as an example, let set A be a clear set of all people with 5.0 ≤ x ≤ 7.0 feet, as shown in Figure 2(a). Some member x1 has 6.0 feet and has a membership of 1 in the clear set, or in full membership notation χA (x1 )=1, another member x2 has 4.99 feet. His membership degree in set A is equal to 0 or has no membership relationship, so χA (x2 )=0. The set membership in this case is binary, that is, an element either belongs to a set or does not belong to a set.
模糊集合发展了二进制隶属度的概念,以满足各种隶属度函数能落在实数连续区间[0,1]上,其端点0和1分别表示无隶属关系和有完全隶属关系,如同明确集合指标函数一样,端点间的任何一个值表示域上某集合元素x的各种隶属度。该域上能满足各种隶属度的集合,称之为模糊集合。仍然以人的身高为例,假设“大约6英尺高”组成的集合为H集,因“大约6英尺高”属于模糊性质,H集没有唯一的隶属度函数。然而,可以确定模糊的隶属度函数μH。这个函数的似然性表现为:(1)标准值μH(6)=1;(2)单调性(H值越接近6,μH值越接近1);(3)对称性(与6等距变化的数,具有相同的μH值)。该隶属度函数可见图2(b)。Fuzzy set develops the concept of binary membership degree to satisfy various membership degree functions that can fall on the real number continuous interval [0,1], and its endpoints 0 and 1 represent no membership relationship and complete membership relationship respectively, just like the clear set index Like a function, any value between the endpoints represents various degrees of membership of a set element x on the domain. The set that can satisfy various membership degrees in this field is called fuzzy set. Still taking the height of a person as an example, assuming that the set composed of "about 6 feet tall" is the H set, because "about 6 feet tall" is of fuzzy nature, and the H set does not have a unique membership function. However, a fuzzy membership function μH can be determined. The likelihood of this function is shown as: (1) standard value μH (6) = 1; (2) monotonicity (the H value is closer to 6, the μH value is closer to 1); (3) symmetry (with 6 equidistantly changing numbers with the sameμH value). The membership function can be seen in Figure 2(b).
不同隶属度之间的变化可认为遵循了模糊集合边界的不确定性和模糊性的事实。因此,集合中域内元素的隶属度可由描述不确定性和模糊性的函数来度量。模糊集合是一个有着不同隶属度的元素集合。The variation between different membership degrees can be considered to follow the fact that the boundaries of fuzzy sets are uncertain and fuzzy. Therefore, the degree of membership of an element in a domain in a set can be measured by a function that describes uncertainty and ambiguity. A fuzzy set is a set of elements with different degrees of membership.
三、模糊控制简介3. Introduction to fuzzy control
模糊控制指的是,在控制方法上应用模糊集合理论、模糊语言变量以及模糊逻辑推理的知识来模拟人的模糊思维方法,用计算机实现与操作者相同的控制。模糊控制用比较简单的数学形式直接将人的判断、思维过程表达出来。模糊逻辑控制的研究始于1970年代中期,目前模糊控制已经被广泛应用到图像识别、自动机理论、语言研究、控制论以及信号处理等方面。在自动控制领域,以模糊集理论为基础发展起来的模糊控制为将人的控制经验及推理过程纳入自动控制提供了一条便捷途径。一般来说,大多数的模糊控制都是依据伦敦大学Mamdani教授所提出的“IF-THEN”条件命题的语言控制[MadaniEH,AssilianS.Anexperimentinlinguisticsynthesiswithafuzzylogiccontroller[J].Internationaljournalofman-machinestudies,1975,7(1):1-13.]。Fuzzy control refers to the application of fuzzy set theory, fuzzy language variables and fuzzy logic reasoning knowledge in the control method to simulate the fuzzy thinking method of people, and use the computer to realize the same control as the operator. Fuzzy control directly expresses people's judgment and thinking process in a relatively simple mathematical form. The study of fuzzy logic control began in the mid-1970s, and fuzzy control has been widely used in image recognition, automata theory, language research, cybernetics, and signal processing. In the field of automatic control, fuzzy control developed on the basis of fuzzy set theory provides a convenient way to incorporate human control experience and reasoning process into automatic control. Generally speaking, most of the fuzzy control is based on the language control of the "IF-THEN" conditional proposition proposed by Professor Mamdani of the University of London [MadaniEH, AssilianS. 1-13.].
基于模糊逻辑的虚拟服务迁移的技术构思是:The technical idea of virtual service migration based on fuzzy logic is:
基础设施提供商根据需求创建虚拟网络以后,服务提供商在虚拟网上创建服务以提供给用户。用户和终端设备在不同的地理位置,通过接入节点向服务发起请求,而用户和终端设备的分布是不确定的和随时间变化的。一般情况下,服务提供商在描述虚拟资源请求时,就考虑了用户的初始分布、行为特性等,并根据此订制不同的资源数量在网络中的不同位置。然而,用户的需求不是一成不变的,随时间、用户行为变化等不断变化,一些新用户加入进来,一些老的用户移出,还有一些用户在网络中从一个接入点迁移到另外的接入点。将虚拟服务的单个节点或者部分节点根据用户的变化移动到新的位置是必要的,可以降低网络的开销。如果虚拟网络不能根据用户行为的变化而做出调整,势必不能满足用户的需要。而网络虚拟化的最大好处就是可以快速做出调整,而不用考虑底层网络的连接情况,所需要考虑的是何时做出调整以及调整的形式。本申请即基于模糊逻辑推理技术,提出了根据用户变化的场景进行虚拟服务迁移的方法。After the infrastructure provider creates a virtual network according to requirements, the service provider creates services on the virtual network to provide to users. Users and terminal devices in different geographical locations initiate requests to services through access nodes, and the distribution of users and terminal devices is uncertain and changes with time. Generally, when describing the virtual resource request, the service provider considers the user's initial distribution, behavioral characteristics, etc., and orders different resource quantities at different positions in the network according to this. However, the needs of users are not static. They change with time and user behavior changes. Some new users join in, some old users move out, and some users migrate from one access point to another in the network. . It is necessary to move a single node or some nodes of a virtual service to a new location according to user changes, which can reduce network overhead. If the virtual network cannot be adjusted according to changes in user behavior, it is bound to fail to meet the needs of users. The biggest advantage of network virtualization is that adjustments can be made quickly, regardless of the connection status of the underlying network. What needs to be considered is when to make adjustments and the form of adjustments. This application is based on fuzzy logic reasoning technology, and proposes a method for migrating virtual services according to user changing scenarios.
下面具体对本申请提供的基于模糊逻辑的虚拟服务迁移方法进行说明。The method for migrating virtual services based on fuzzy logic provided by the present application will be described in detail below.
模糊逻辑控制系统fuzzy logic control system
在本申请中,以迁移代价为参数,使用模糊逻辑来处理虚拟资源的迁移问题。模糊逻辑控制系统一般包括四个部分:模糊化模块(Fuzzification)、模糊规则库(FuzzyRuleBase)、模糊推理模块(FuzzyInference)、非模糊化模块(Defuzzification),如图3所示。下面讲述各个模块的功能。In this application, fuzzy logic is used to deal with the migration of virtual resources with the migration cost as a parameter. The fuzzy logic control system generally includes four parts: fuzzification module (Fuzzification), fuzzy rule base (FuzzyRuleBase), fuzzy reasoning module (FuzzyInference), non-fuzzification module (Defuzzification), as shown in Figure 3. The functions of each module are described below.
模糊化模块:模糊化是一个使清晰量模糊的过程。可以有这样一个简明的认识,许多认为是清晰的、确定的量,实际上根本不确定,它们带有相当大的不确定性。如果由于不精确、模棱两可而引起不确定的情况,则变量可能是模糊的,并可以用隶属度函数来表示。Blur Module: Blur is the process of blurring clear quantities. It can be seen simply that many quantities that are thought to be clear and certain are in fact uncertain at all, and they carry considerable uncertainty. If uncertainty arises due to imprecision, ambiguity, the variable may be ambiguous and can be represented by a membership function.
模糊化过程主要完成:测量输入变量的值,并将数字表示形式的输入量转化为通常用语言值表示的某一限定码的序数。每个限定码表示论域内的一个模糊子集,并由隶属度函数来定义。对于某一个输入值,它必定与某一个特定限定码的隶属程度相对应。一旦模糊集设计完成,则对于任意的物理输入x,需要将其映射到模糊集合系统中。映射的过程实际上是将当前的物理输入,根据模糊子集的分布情况确定出此时此刻输入值对这些模糊子集的隶属程度。因此,为了保证在所有论域内的输入量都能够与某一模糊子集相对应,模糊子集的数目和范围必须遍及整个论域。这样,对于每个物理输入量,至少有一个模糊子集的隶属度大于0。The fuzzification process is mainly completed: measure the value of the input variable, and convert the input quantity in the form of digital representation into an ordinal number of a certain limited code usually expressed in language value. Each finite code represents a fuzzy subset in the domain of discourse, and is defined by the membership function. For a certain input value, it must correspond to the degree of membership of a certain qualified code. Once the fuzzy set design is completed, for any physical input x, it needs to be mapped into the fuzzy set system. The process of mapping is actually to use the current physical input to determine the degree of membership of the input value to these fuzzy subsets at this moment according to the distribution of fuzzy subsets. Therefore, in order to ensure that the input quantities in all domains of discourse can correspond to a certain fuzzy subset, the number and range of fuzzy subsets must cover the entire domain of discourse. In this way, for each physical input quantity, there is at least one fuzzy subset whose membership degree is greater than 0.
模糊规则库包含着整个模糊逻辑控制系统的控制,其中所存储的控制规则,把受控目标的各种可能的状态,以“IF-THEN”的形式,表示成包含人类判断模糊性的控制演算法则。每条模糊逻辑规则由前件(Antecedent)和后件(Consequent)所组成,其形式为:The fuzzy rule base contains the control of the entire fuzzy logic control system. The control rules stored in it express the various possible states of the controlled target in the form of "IF-THEN" as a control calculus that includes the fuzziness of human judgment. law. Each fuzzy logic rule is composed of antecedent and consequent, and its form is:
规则1:如果x为A,那么y为B。Rule 1: If x is A, then y is B.
其中A和B都是模糊集合。一般来说,大多数的推理并非是一条规则,而是由多条规则组合而成。可以看出,规则的设计直接影响到模糊控制的效果。规则产生的方式一般有如下三种:(1)直接转换人的实践知识为模糊语言控制规则;(2)根据控制系统对系统输入与输出的反应去归纳受控行为,以试误法进行设计;(3)由控制系统本身进行学习或修正控制规则,这是最系统化的方法。Where A and B are both fuzzy sets. Generally speaking, most reasoning is not a rule, but a combination of multiple rules. It can be seen that the design of rules directly affects the effect of fuzzy control. There are generally three ways to generate rules: (1) direct conversion of human practical knowledge into fuzzy language control rules; (2) induction of controlled behaviors based on the response of the control system to system input and output, and design by trial and error ; (3) Learning or revising control rules by the control system itself is the most systematic method.
当控制系统的输入已经模糊化后,接着必须依据模糊规则进行合成推理,这种推理称为模糊推理。模糊逻辑推理借助模糊逻辑运算以模拟人类思考判断的方式,挑选模糊规则库中适用的语义化控制规则,用并行的方式对输入的模糊化变量作运算,求得模糊化输出。常见的模糊推理方法有最大最小推理和最大乘积推理两种,可视具体情况选择其一。以下以最大最小推理为例说明,考虑以下模糊推理形式,其中A、B和C都是模糊集合:When the input of the control system has been fuzzy, then synthetic reasoning must be carried out according to the fuzzy rules, which is called fuzzy reasoning. Fuzzy logic reasoning uses fuzzy logic operations to simulate the way of human thinking and judgment, selects the applicable semantic control rules in the fuzzy rule base, and operates on the input fuzzy variables in parallel to obtain the fuzzy output. There are two common fuzzy inference methods: maximum-minimum inference and maximum product inference, and one of them can be selected according to the specific situation. Taking the max-min reasoning as an example, consider the following form of fuzzy reasoning, where A, B and C are all fuzzy sets:
规则1:如果x为A1,y为B1,那么z为C1;Rule 1: If x is A1 and y is B1 , then z is C1 ;
规则2:如果x为A2,y为B2,那么z为C2;Rule 2: If x is A2 and y is B2 , then z is C2 ;
……...
规则n:如果x为An,y为Bn,那么z为Cn。Rule n: If x is An and y is Bn , then z is Cn .
假如:x为x0,y为y0If: x is x0 , y is y0
由“x为x0,y为y0”,以及各个模糊规则,通过取最小得出C'i为:From "x is x0 , y is y0 ", and various fuzzy rules, C'i is obtained by taking the minimum:
其中,∧表示取最小。Among them, ∧ means take the minimum.
最终结论C'由以上结果取最大得到,即:The final conclusion C' is obtained by taking the maximum of the above results, namely:
其中,∨表示取最大,A1-An代表模糊集合A中的取值,B1-Bn代表模糊集合B中的各个取值,C1-Cn代表模糊集合C中的取值。x0,y0表示某一次的特定取值。Among them, ∨ represents the maximum value, A1-An represents the value in fuzzy set A, B1-Bn represents each value in fuzzy set B, and C1-Cn represents the value in fuzzy set C. x0, y0 represent a specific value of a certain time.
通过模糊推理得到的结果是一个模糊集合。但在实际应用中,特别是在模糊控制中,必须要有一个确定的值才能去控制或驱动执行。在推理后得到的模糊集合中取一个能够代表这个模糊推理结果可能性的精确值的过程就称为非模糊化过程。在这里我们用重心法进行非模糊化,重心法相比最大隶属函数法等方法具有更平滑的输出推理控制。The result obtained by fuzzy reasoning is a fuzzy set. But in practical application, especially in fuzzy control, there must be a definite value to control or drive execution. The process of taking an accurate value that can represent the possibility of the fuzzy reasoning result in the fuzzy set obtained after reasoning is called the defuzzification process. Here we use the center of gravity method for defuzzification, which has a smoother output inference control than methods such as the maximum membership function method.
重心法是取模糊隶属度函数曲线与横坐标围成面积的重心为模糊推理最终输出值,即:The center of gravity method is to take the center of gravity of the area enclosed by the fuzzy membership function curve and the abscissa as the final output value of fuzzy inference, namely:
而对于具有m个输出量化级数的离散论域情况:And for the discrete domain case with m output quantization series:
服务迁移的参数采集:Parameter collection for service migration:
首先定义迁移代价的概念,考虑当需要进行虚拟服务迁移时,哪些因素可能影响迁移,哪些因素的变化导致迁移的发生,而迁移又会带来哪些问题,哪些因素阻碍迁移的发生。First, define the concept of migration cost, and consider which factors may affect the migration when virtual service migration is required, which factors change will lead to the migration, and what problems will the migration cause, and which factors will hinder the migration.
一个虚拟节点/虚拟服务器的代价可能包括多个方面的影响,例如物理服务器的负载,到终端设备的流量,到中间设备的时延等,另外还有一些其他参数。为了对问题进行简化,将只考虑物理网络上面只有一个虚拟网络的情况,同时在虚拟网络中,只有一个虚拟节点/服务器的情况。The cost of a virtual node/virtual server may include the influence of many aspects, such as the load of the physical server, the flow to the terminal device, the delay to the intermediate device, etc., and some other parameters. In order to simplify the problem, only the case where there is only one virtual network on the physical network and the case where there is only one virtual node/server in the virtual network will be considered.
参数选择:Preferences:
(1)首先,考虑会有哪些因素会导致迁移,即迁移可能带来的好处,或者说不迁移/保持现状会带来的代价:(1) First, consider what factors will lead to migration, that is, the possible benefits of migration, or the costs of not migrating/maintaining the status quo:
Cdelay,服务的时延。当用户的位置发生变化时,从虚拟服务器端到用户端的延迟将增大,这将影响一些服务的服务质量。在本申请中,简化此参数为虚拟节点到接入节点的路由器跳数。同时,此项因素受到用户数量分布的影响,决定于用户分布的重心。Cdelay , service delay. When the user's location changes, the delay from the virtual server end to the user end will increase, which will affect the service quality of some services. In this application, this parameter is simplified as the number of router hops from the virtual node to the access node. At the same time, this factor is affected by the distribution of the number of users and depends on the center of gravity of the user distribution.
CAload,服务器的可用负载。迁移能否实现的一个重要因素是潜在迁移节点的负载情况。如果潜在节点不能满足待迁移虚拟节点的需求,则迁移无法进行。服务器的负载由两部分构成,即物理服务器本身的容量和上面已经运行的服务需要的资源量,两者做差即为服务可用的负载量。而在进行迁移时,相同的条件下,应该选择服务器的可用负载较大的节点进行迁移。CAload , the available load of the server. An important factor in whether a migration is possible is the load on the potential migrating nodes. If the potential node cannot meet the requirements of the virtual node to be migrated, the migration cannot proceed. The load of the server consists of two parts, namely, the capacity of the physical server itself and the amount of resources required by the services already running on it. The difference between the two is the available load of the service. When migrating, under the same conditions, a node with a larger available server load should be selected for migration.
(2)接下来,考虑哪些因素对迁移有负面影响。由于这些因素的存在,服务迁移必须被慎重考虑:(2) Next, consider which factors negatively affect migration. Service migration must be carefully considered due to these factors:
Cbandwidth,迁移路径上带宽的影响。这里的带宽指的是潜在迁移路径上最大带宽,迁移路径一般选取从当前节点到迁移目的节点之间的最短路径。服务本身的大小与迁移路径的带宽,共同决定了迁移所需要的时间。Cbandwidth , the impact of bandwidth on the migration path. The bandwidth here refers to the maximum bandwidth on the potential migration path, and the migration path generally selects the shortest path from the current node to the migration destination node. The size of the service itself and the bandwidth of the migration path together determine the time required for migration.
Csize,服务本身的大小,直接影响服务迁移的快慢。Csize , the size of the service itself, directly affects the speed of service migration.
Cinterrupt,服务中断及恢复的代价,这里既包括时间的代价,也包括中断及恢复的复杂程度。如果迁移引起的服务中断的时间过长,或者中断会对服务的正常运行产生较大的风险,则应该慎重选择迁移。Cinterrupt , the cost of service interruption and recovery, which includes both the cost of time and the complexity of interruption and recovery. If the service interruption caused by the migration is too long, or the interruption will cause a greater risk to the normal operation of the service, you should choose the migration carefully.
Ctransit,转移代价,即虚拟服务需要穿过多个物理网络运营商(InfrastructureProvider)产生的代价,由服务所穿越的物理网络运营商的个数决定,本申请仅考虑单个物理网络运营商内的情况,所以忽略。Ctransit , the transfer cost, that is, the cost generated by the virtual service passing through multiple physical network operators (InfrastructureProvider), which is determined by the number of physical network operators traversed by the service. This application only considers the infrastructure within a single physical network operator case, so ignore it.
本申请初步选择了五种影响迁移的因素,而模糊逻辑的优势就是可以自定输入参数及规则,容易根据别的参数对问题进行扩展。在选择的5个因素中,有些因素的值越大则越好,有些服务的值则越小越好,前者称为正属性,后者则称为负属性。比如,服务器的可用负载越大越好,为正属性,而服务本身的大小则越小越好,为负属性。This application preliminarily selects five factors that affect migration, and the advantage of fuzzy logic is that the input parameters and rules can be customized, and it is easy to expand the problem according to other parameters. Among the selected five factors, the larger the value of some factors, the better, and the smaller the value of some services, the better. The former is called a positive attribute, and the latter is called a negative attribute. For example, the larger the available load of the server, the better, it is a positive attribute, while the smaller the size of the service itself, the better, it is a negative attribute.
对于具有N个虚拟节点的网络,服务迁移的代价可以组成5×N矩阵,矩阵中的Cij代表节点Nj的第i种代价的数值。For a network with N virtual nodes, the cost of service migration can form a 5×N matrix, and Cij in the matrix represents the value of the i-th cost of node Nj .
为了使这些因素能够相互比较,可将这些值进行归一化。为了确保99%的值能够归一化到[0,1]之间,采用高斯归一化的方法对各种代价进行归一化,公式如下:To make these factors comparable to each other, the values are normalized. In order to ensure that 99% of the values can be normalized to [0,1], the Gaussian normalization method is used to normalize various costs, the formula is as follows:
表示代价Cij的平均值,σ则是Cij的标准方差。而对于每个节点Nj,其迁移代价的参考值则为: Represents the average value of the cost Cij , and σ is the standard deviation of Cij . And for each node Nj , the reference value of its migration cost is:
其中,G(c)是所有正属性的集合,H(c)则是所有负属性的集合,max(C'i)表示代价归一化矩阵中第i行中最大的值,min(C'i)则代表矩阵中第i行中最小的值。Among them, G(c) is the set of all positive attributes, H(c) is the set of all negative attributes, max(C'i ) represents the largest value in row i in the cost normalization matrix, min(C'i ) represents the smallest value in the i-th row of the matrix.
本地监视器:对于底层InP网络的每个节点,将有一个监视器来采集节点上的状态信息。采集的状态信息包括节点的服务器负载,节点相邻的可用带宽情况,节点到各个接入节点的时延和到当前虚拟服务器所在位置的距离等。Local Monitor: For each node of the underlying InP network, there will be a monitor to collect status information on the node. The collected state information includes the server load of the node, the available bandwidth of the adjacent node, the delay from the node to each access node, and the distance to the current virtual server location, etc.
处理所有节点的状态一般最常用的方法有算数平均法和加权平均法,以对各个参数进行衡量。然而,在多参数的情况下,各个参数之间存在互相影响的情况。传统的算数平均法和加权平均法并没有考虑这种参数间的差异。从上面五种参数的自然属性也可以看出,简单的对五种因素进行算术平均难以反映各个因素之间的复杂的关系。为此,而采用模糊逻辑法,以能够有效地对问题进行分析。The most commonly used methods to deal with the state of all nodes are arithmetic average method and weighted average method to measure each parameter. However, in the case of multiple parameters, there are mutual influences among the various parameters. The traditional arithmetic average method and weighted average method do not consider the difference between such parameters. It can also be seen from the natural properties of the above five parameters that it is difficult to reflect the complex relationship between the various factors simply by arithmetically averaging the five factors. For this reason, the fuzzy logic method is adopted to analyze the problem effectively.
代价模型建立:Cost model establishment:
对于有N个节点的网络,某个节点m(1≤m≤N)来说,将其在某一个时刻t服务迁移的代价定义为:For a network with N nodes, for a certain node m (1≤m≤N), the cost of its service migration at a certain moment t is defined as:
Costm(t)=f(Cdelay,CAload,Cbandwidth,Csize,Cinterupt,…)Costm (t)=f(Cdelay ,CAload ,Cbandwidth ,Csize ,Cinterupt ,…)
f代表各种代价之间的关系,这里采用模糊逻辑推理,推理的目标则是寻找具有最小迁移代价的节点:f represents the relationship between various costs. Fuzzy logic reasoning is used here, and the goal of reasoning is to find the node with the minimum migration cost:
argmin(C1,C2,…,CN)argmin(C1 ,C2 ,…,CN )
然后虚拟服务将从当前节点迁移到具有最小迁移代价的节点。Then the virtual service will be migrated from the current node to the node with the minimum migration cost.
逻辑判断:Logical judgment:
服务迁移需要的参数通过本地监视器进行采集之后,就可以采用模糊逻辑推理来对迁移进行判断和选择。如上所论述,分为模糊化、规则建立及推理、非模糊化几个部分。After the parameters required for service migration are collected by the local monitor, fuzzy logic reasoning can be used to judge and select the migration. As discussed above, it is divided into several parts: fuzzification, rule establishment and reasoning, and defuzzification.
输入函数的隶属度函数:The membership function of the input function:
隶属度函数是将采集到的精确数值映射到模糊集合中,有多种表达方式。在这里,采用高斯函数作为输入的隶属度函数,其表达式为:The membership function is to map the collected precise values to the fuzzy set, and there are many expressions. Here, the Gaussian function is used as the input membership function, and its expression is:
其中,函数的中心ci表示模糊集合i的中心,而函数的权重σi表示模糊集合的半径。而对于每个参数,设定“VeryLow,Low,Medium,High,VeryHigh”五个隶属度函数,而对于每个参数,区间被归一化到[0,1],每个参数将有一个对应的隶属度函数。如图5所示,图中不同的颜色表示不同的隶属度函数。Among them, the center ci of the function represents the center of the fuzzy set i, and the weight σi of the function represents the radius of the fuzzy set. For each parameter, five membership functions of "VeryLow, Low, Medium, High, VeryHigh" are set, and for each parameter, the interval is normalized to [0,1], and each parameter will have a corresponding membership function. As shown in Figure 5, different colors in the figure represent different membership functions.
模糊规则和推理:Fuzzy rules and reasoning:
模糊逻辑的根本目标是借助模糊集合这个工具,为不确定问题提供近似推理的工具。基于模糊逻辑的系统模型是由以下形式的模糊规则组合形成的系统:The fundamental goal of fuzzy logic is to provide approximate reasoning tools for uncertain problems with the help of fuzzy sets. A system model based on fuzzy logic is a system formed by a combination of fuzzy rules of the form:
Rule1:IF<X1isF11>AND<X2isF21>AND…AND<XnisFn1>THEN<YisG1>Rule1 : IF<X1 isF11 >AND<X2 isF21 >AND…AND<Xn isFn1 >THEN<YisG1 >
Rule2:IF<X1isF12>AND<X2isF22>AND…AND<XnisFn2>THEN<YisG2>Rule2 : IF<X1 isF12 >AND<X2 isF22 >AND…AND<Xn isFn2 >THEN<YisG2 >
……...
Rulem:IF<X1isF1m>AND<X2isF2m>AND…AND<XnisFnm>THEN<YisGm>Rulem :IF<X1 isF1m >AND<X2 isF2m >AND…AND<Xn isFnm >THEN<YisGm >
其中,Xi,i=1,…,n为前件变量,Y则为后件变量。每个前件变量Xi需要覆盖参数可能产生的空间,在本例中为[0,1]。Among them, Xi , i=1, . . . , n are antecedent variables, and Y is a consequent variable. Each antecedent variable Xi needs to cover the space that the parameter may produce, in this case [0,1].
在模糊推理的过程中,采用最大-最小推理方法来进行推理,使用模糊逻辑进行推理的步骤如下:给定一个输入计算Xj与每条规则的匹配度(thedegreeofcompatibility)如下:In the process of fuzzy reasoning, the maximum-minimum reasoning method is used for reasoning, and the steps of using fuzzy logic for reasoning are as follows: Given an input The degree of compatibility between Xj and each rule is calculated as follows:
然后,所有规则的匹配度被结合以计算系统的输出:Then, the matching scores of all rules are combined to calculate the output of the system:
μ0v=maxφiμ0 v=maxφi
非模糊化:Unambiguous:
模糊规则的输出是模糊的,需要转化成为系统可以执行和识别的值。根据模糊集合和隶属度函数,非模糊化输出单一的可以计量的值。在这里,采用重心法来得到清晰值:The output of fuzzy rules is fuzzy and needs to be transformed into values that the system can execute and recognize. Defuzzification outputs a single quantifiable value based on fuzzy sets and membership functions. Here, the center of gravity method is used to obtain the sharp value:
其中,z*即为输出的非模糊化值,μi(z)为隶属度函数,z为输出变量。Among them, z* is the output defuzzification value, μi (z) is the membership function, and z is the output variable.
经过非模糊化之后,即输出了对应节点的迁移的参考值。以此来对节点进行排序,然后选择参考值最小的节点作为迁移的目标节点。After defuzzification, the reference value of the migration of the corresponding node is output. In this way, the nodes are sorted, and then the node with the smallest reference value is selected as the target node for migration.
通过对基于模糊推理的服务迁移方法的仿真实验,以考察本发明的运行效率。The operating efficiency of the present invention is investigated through the simulation experiment of the service migration method based on fuzzy reasoning.
实验设置experiment settings
采用Erdos-Renyi随机图模型来创建实验网络,对于实验网络设置100个节点,节点之间以1%的概率相连,对于每个节点的最初负载,则符合[50,100]的均匀分布,节点之间链路上的负载也符合[50,100]的均匀分布。服务迁移的中断时间符合[0,1]的均匀分布,虚拟节点的大小符合[0,20]的均匀分布。用户则可能出现在网络中所有的接入节点,在所有的接入节点上,用户通过发送对服务的请求以获取资源,而用户的行为,包括用户的位置、用户何时发送请求、用户发送请求的频率主要决定于应用场景。用户请求的时间长度一般来讲符合指数分布。The Erdos-Renyi random graph model is used to create the experimental network. For the experimental network, 100 nodes are set, and the nodes are connected with a probability of 1%. For the initial load of each node, it conforms to the uniform distribution of [50, 100]. The load on the links between also conforms to the uniform distribution of [50, 100]. The interruption time of service migration conforms to the uniform distribution of [0, 1], and the size of virtual nodes conforms to the uniform distribution of [0, 20]. Users may appear in all access nodes in the network. On all access nodes, users obtain resources by sending requests for services, and user behaviors include user locations, when users send requests, and when users send requests. The frequency of requests mainly depends on the application scenario. Generally speaking, the length of user requests follows an exponential distribution.
至于用户请求的分布,我们选择了两个场景作为我们的实验场景:时区场景和上下班场景。在时区场景中,我们将一天分为T个时间段,在时间t,p%的请求出现在网络中随机选择的接入节点。请求的持续时间符合指数分布,指数分布参数为λ。另外,剩余的请求作为背景流量则均匀随机的在所有节点产生。As for the distribution of user requests, we selected two scenarios as our experimental scenarios: time zone scenario and commuting scenario. In the time zone scenario, we divide a day into T time slots, and at time t, p% of requests appear at randomly selected access nodes in the network. The duration of the request follows an exponential distribution with parameter λ. In addition, the remaining requests are generated uniformly and randomly across all nodes as background traffic.
在上下班场景中,我们采用1天T作为1个周期,在一天中的上半个时间段[0,T/2],用户请求发生在距离网络中心较近的节点,而在下半个时间段,用户请求则发生在距离网络中心较远的节点。然后新的一天开始。每次请求总数为2T/2。在时间ti<T/2,请求发生在所有节点中的p个节点,每个接入节点收到2T/2/p次请求,然后外围接入节点请求逐渐减少,然后进行反过程。In the commuting scenario, we use 1 day T as a period. In the first half of the day [0, T/2], user requests occur at nodes closer to the network center, and in the second half of the time segments, user requests occur at nodes far from the network center. Then a new day begins. Each request totals 2T/2. At time ti<T/2, the request occurs on p nodes among all nodes, Each access node receives 2T/2/p requests, and then the peripheral access node requests gradually decrease, and then the reverse process is performed.
模糊推理的计算过程是在MATLAB中进行的,包括参数选择、隶属度函数及部分规则推理。所有代价在进行规则推理前要进行归一化,以满足[0,1]的规则空间,服务的时延则用最短路径上的节点跳数来表示。The calculation process of fuzzy reasoning is carried out in MATLAB, including parameter selection, membership function and partial rule reasoning. All costs must be normalized before rule reasoning to satisfy the [0, 1] rule space, and the service delay is represented by the number of node hops on the shortest path.
采用了竞争比(CompetitiveRatio)的概念来衡量算法的有效性,即假设存在算法(用Opt表示),提前知道算法过程中所有用户请求到达的位置和时刻,可以通过最优化算法确定网络中进行迁移的最优方案。ρ即是所提出算法(用Alg表示)与最优化算法的代价之比,新算法的目标则是最小化ρ:The concept of competitive ratio (CompetitiveRatio) is used to measure the effectiveness of the algorithm, that is, assuming that there is an algorithm (indicated by Opt), the location and time of all user requests arriving in the algorithm process are known in advance, and the migration in the network can be determined through the optimization algorithm optimal solution. ρ is the ratio of the cost of the proposed algorithm (expressed in Alg) to the optimization algorithm, and the goal of the new algorithm is to minimize ρ:
其中,σ代表所有用户请求到达的序列,包括时间和位置。where σ represents the sequence of all user request arrivals, including time and location.
规则表的建立Creation of the rule table
在对输入值按照高斯隶属度函数进行模糊化后,我们基于直观感受,使用了模糊规则进行了推理。在规则中,服务中断的代价最大,如果服务迁移产生较为严重的后果,则将总体代价表示为最高值,而不论其他代价的大小。其次则为时延的大小,这两项关系到服务提供商和终端用户对服务的使用体验。其余三项代价主要与底层物理网络的资源开销、运行效率有关,相互间重要程度相差不大。After fuzzifying the input value according to the Gaussian membership function, we used the fuzzy rules to infer based on the intuition. In the rule, the cost of service interruption is the largest, and if the service migration has more serious consequences, the overall cost is expressed as the highest value, regardless of the size of other costs. The second is the delay, which is related to the service experience of service providers and end users. The remaining three costs are mainly related to the resource overhead and operating efficiency of the underlying physical network, and their importance is not much different from each other.
基础设施提供商也可以根据自己所管理的网络的不同特点进行规则的设计,比如提高某种参数的重要程度,也可以根据自己的需要增减网络的参数,在这里我们只考虑一般的情况,对特殊的情况不予考虑。Infrastructure providers can also design rules according to the different characteristics of the network they manage, such as increasing the importance of certain parameters, or increasing or decreasing network parameters according to their own needs. Here we only consider the general situation. Special circumstances are not considered.
实验结果Experimental results
在对代价总和进行非模糊化后,我们即得到了所有节点的迁移参考代价值Cost(n),然后对所有节点的迁移参考代价值进行排序,选择最小的进行迁移。After unfuzzifying the sum of costs, we get the migration reference cost value Cost(n) of all nodes, and then sort the migration reference cost values of all nodes, and select the smallest one for migration.
我们将本机制与“不迁移”与“重心法”进行了比较,“不迁移”(Static,STAT)即在虚拟网络运行的过程中,虚拟节点的位置是静态的,对其不做出调整。重心法(Centroid,CEN)则是选择当前所有活跃节点的“中心”作为迁移的目标。We compared this mechanism with "non-migration" and "center of gravity method". "Non-migration" (Static, STAT) means that during the operation of the virtual network, the position of the virtual node is static and no adjustment is made . The center of gravity method (Centroid, CEN) is to select the "center" of all current active nodes as the migration target.
图5展示了在时区场景下不同方法的竞争比情况,在本试验中p取60%,实验进行的时间T=60,λ=5。从图中可以看出,两种基于迁移的算法的网络代价都要小于不迁移的静态算法,而我们提出的基于模糊逻辑推理的算法竞争比则在三种算法中最小。而不迁移的情况会导致大的而且波动的竞争比,说明随着场景的变化,其因为场景变化导致的网络的开销较大,而迁移则会降低竞争比的波动情况。这说明,在时区场景下,我们的算法在提高资源的利用率、降低网络的开销方面具有一定的优势。Figure 5 shows the competition ratio of different methods in the time zone scenario. In this experiment, p is 60%, and the experiment time is T=60, and λ=5. It can be seen from the figure that the network cost of the two algorithms based on migration is smaller than that of the static algorithm without migration, and the competition ratio of the algorithm based on fuzzy logic reasoning proposed by us is the smallest among the three algorithms. The case of not migrating will lead to a large and fluctuating competition ratio, indicating that as the scene changes, the network overhead caused by the scene change is large, and migration will reduce the fluctuation of the competition ratio. This shows that in the time zone scenario, our algorithm has certain advantages in improving resource utilization and reducing network overhead.
图6则展示了上下班场景下竞争比的变化,其中λ=10。与时区场景类似,可以看出,基于模糊逻辑的算法在提高网络资源的利用率,降低资源占用开销方面具有一定的优势。而不迁移算法则仍然具有最大的竞争比,说明其不能满足用户场景变化的需要。Figure 6 shows the change of competition ratio in commuting scenarios, where λ=10. Similar to the time zone scenario, it can be seen that the algorithm based on fuzzy logic has certain advantages in improving the utilization rate of network resources and reducing resource occupation overhead. The non-migration algorithm still has the largest competition ratio, indicating that it cannot meet the needs of changing user scenarios.
上面的结果展示了基于模糊逻辑推理的服务迁移机制具有一定适应能力,满足现实网络中场景的需要,具有良好的应用前景,对降低物理网络的资源开销、实现绿色节能与自治管理的网络虚拟化环境具有重要的作用。The above results show that the service migration mechanism based on fuzzy logic reasoning has certain adaptability, meets the needs of scenarios in real networks, and has good application prospects. Environment plays an important role.
综上,本申请提供了采用基于模糊推理的算法的虚拟网络服务迁移方法,能够对虚拟网络服务迁移的时机进行及时有效的判断。仿真结果显示,该方法与以往算法相比,可以提高迁移的成功率,降低网络的运营开销。To sum up, the present application provides a virtual network service migration method using an algorithm based on fuzzy reasoning, which can timely and effectively judge the timing of virtual network service migration. Simulation results show that, compared with previous algorithms, this method can improve the success rate of migration and reduce network operating expenses.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610173486.8ACN105743985A (en) | 2016-03-24 | 2016-03-24 | Virtual service migration method based on fuzzy logic |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610173486.8ACN105743985A (en) | 2016-03-24 | 2016-03-24 | Virtual service migration method based on fuzzy logic |
| Publication Number | Publication Date |
|---|---|
| CN105743985Atrue CN105743985A (en) | 2016-07-06 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610173486.8APendingCN105743985A (en) | 2016-03-24 | 2016-03-24 | Virtual service migration method based on fuzzy logic |
| Country | Link |
|---|---|
| CN (1) | CN105743985A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109995864A (en)* | 2018-12-18 | 2019-07-09 | 天津城建大学 | A kind of SDN load-balancing method based on fuzzy logic |
| CN111431743A (en)* | 2020-03-18 | 2020-07-17 | 中南大学 | Data analysis-based method and system for constructing edge resource pool in large-scale WiFi system |
| CN112052075A (en)* | 2020-09-30 | 2020-12-08 | 中移(杭州)信息技术有限公司 | Live migration method, server and storage medium of cloud desktop virtual machine |
| CN114598946A (en)* | 2022-01-24 | 2022-06-07 | 西安电子科技大学 | Fuzzy logic-based on-chip optical network self-adaptive routing planning method |
| CN115086323A (en)* | 2022-06-15 | 2022-09-20 | 之江实验室 | Cloud network service coordination system and method |
| CN115963723A (en)* | 2023-03-17 | 2023-04-14 | 深圳市鑫雅达机电工程有限公司 | Method for automatically adjusting and controlling operation of intelligent electromechanical system equipment |
| CN118364351A (en)* | 2024-04-15 | 2024-07-19 | 江苏全天软件有限公司 | A method and system for interactive data processing based on blockchain network |
| CN118740923A (en)* | 2024-06-28 | 2024-10-01 | 苏州元脑智能科技有限公司 | Resource migration method, device, equipment and medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6338051B1 (en)* | 1998-04-30 | 2002-01-08 | Samsung Electronics Co., Ltd. | User preference modeling method using fuzzy networks |
| CN203350635U (en)* | 2013-06-09 | 2013-12-18 | 苏州经贸职业技术学院 | Dynamic fuzzy control system |
| CN103825963A (en)* | 2014-03-18 | 2014-05-28 | 中国科学院声学研究所 | Virtual service transition method |
| CN104270371A (en)* | 2014-10-13 | 2015-01-07 | 无锡云捷科技有限公司 | CDN cache server selecting method based on fuzzy logic |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6338051B1 (en)* | 1998-04-30 | 2002-01-08 | Samsung Electronics Co., Ltd. | User preference modeling method using fuzzy networks |
| CN203350635U (en)* | 2013-06-09 | 2013-12-18 | 苏州经贸职业技术学院 | Dynamic fuzzy control system |
| CN103825963A (en)* | 2014-03-18 | 2014-05-28 | 中国科学院声学研究所 | Virtual service transition method |
| CN104270371A (en)* | 2014-10-13 | 2015-01-07 | 无锡云捷科技有限公司 | CDN cache server selecting method based on fuzzy logic |
| Title |
|---|
| YANJUN ZUO,UNIVERSITY OF NORTH DAKOTA,USA: "Fuzzy Inference for Service Migration Strategy", 《IEEE INTERNATIONAL CONFERENCE ON ELECTRO/INFOMATION TECHNOLOGY》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109995864A (en)* | 2018-12-18 | 2019-07-09 | 天津城建大学 | A kind of SDN load-balancing method based on fuzzy logic |
| CN111431743A (en)* | 2020-03-18 | 2020-07-17 | 中南大学 | Data analysis-based method and system for constructing edge resource pool in large-scale WiFi system |
| CN112052075A (en)* | 2020-09-30 | 2020-12-08 | 中移(杭州)信息技术有限公司 | Live migration method, server and storage medium of cloud desktop virtual machine |
| CN114598946A (en)* | 2022-01-24 | 2022-06-07 | 西安电子科技大学 | Fuzzy logic-based on-chip optical network self-adaptive routing planning method |
| CN114598946B (en)* | 2022-01-24 | 2023-02-10 | 西安电子科技大学 | Fuzzy logic-based on-chip optical network adaptive routing planning method |
| CN115086323A (en)* | 2022-06-15 | 2022-09-20 | 之江实验室 | Cloud network service coordination system and method |
| CN115963723A (en)* | 2023-03-17 | 2023-04-14 | 深圳市鑫雅达机电工程有限公司 | Method for automatically adjusting and controlling operation of intelligent electromechanical system equipment |
| CN118364351A (en)* | 2024-04-15 | 2024-07-19 | 江苏全天软件有限公司 | A method and system for interactive data processing based on blockchain network |
| CN118740923A (en)* | 2024-06-28 | 2024-10-01 | 苏州元脑智能科技有限公司 | Resource migration method, device, equipment and medium |
| CN118740923B (en)* | 2024-06-28 | 2025-09-05 | 苏州元脑智能科技有限公司 | Resource migration method, device, equipment and medium |
| Publication | Publication Date | Title |
|---|---|---|
| CN105743985A (en) | Virtual service migration method based on fuzzy logic | |
| Chen et al. | Deep reinforcement learning for computation offloading in mobile edge computing environment | |
| Yu et al. | Intelligent edge: Leveraging deep imitation learning for mobile edge computation offloading | |
| Chen et al. | Label-less learning for traffic control in an edge network | |
| Chen et al. | A reinforcement learning-empowered feedback control system for industrial internet of things | |
| CN104834967A (en) | User similarity-based business behavior prediction method under ubiquitous network | |
| Yi et al. | A DRL-driven intelligent joint optimization strategy for computation offloading and resource allocation in ubiquitous edge IoT systems | |
| Naderloo et al. | Fuzzy-based cluster routing in wireless sensor network: A. Naderloo et al. | |
| Zeng et al. | Trust-based multi-agent imitation learning for green edge computing in smart cities | |
| Wang et al. | Reinforcement learning-based optimization for mobile edge computing scheduling game | |
| CN114710439A (en) | Routing method for joint optimization of network energy consumption and throughput based on deep reinforcement learning | |
| Sigwele et al. | Fuzzy logic-based call admission control in 5G cloud radio access networks with preemption | |
| CN117156492A (en) | Deep reinforcement learning-based dual-time-scale resource allocation method for joint service caching, communication and calculation | |
| Kaur et al. | Machine learning empowered green task offloading for mobile edge computing in 5G networks | |
| CN116455768A (en) | Cloud-edge-device collaborative CNN reasoning method and system for global delay optimization | |
| Li et al. | Adaptive multi-agent deep mixed reinforcement learning for traffic light control | |
| Qin et al. | User‐Edge Collaborative Resource Allocation and Offloading Strategy in Edge Computing | |
| Moon et al. | Client selection for federated learning in vehicular edge computing: A deep reinforcement learning approach | |
| Chen et al. | Knowledge distillation for mobile edge computation offloading | |
| Yan et al. | Service caching for meteorological emergency decision-making in cloud-edge computing | |
| Xu et al. | Long-term energy management empowered hierarchical federated learning for smart consumer electronics | |
| CN114786129B (en) | Internet of vehicles computing resource allocation and optimization method based on deep learning | |
| Anoop et al. | Exploitation whale optimization based optimal offloading approach and topology optimization in a mobile ad hoc cloud environment | |
| CN114980127A (en) | A computational offloading method based on federated reinforcement learning in fog radio access networks | |
| Huang et al. | Network selection and QoS management algorithm for 5G converged shipbuilding network based on digital twin |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20160706 |