CN113887691B - Whale evolution system and method for service composition problem - Google Patents

Whale evolution system and method for service composition problem Download PDF

Info

Publication number
CN113887691B
CN113887691B CN202110974119.9A CN202110974119A CN113887691B CN 113887691 B CN113887691 B CN 113887691B CN 202110974119 A CN202110974119 A CN 202110974119A CN 113887691 B CN113887691 B CN 113887691B
Authority
CN
China
Prior art keywords
value
search
service
algorithm
qos
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.)
Expired - Fee Related
Application number
CN202110974119.9A
Other languages
Chinese (zh)
Other versions
CN113887691A (en
Inventor
滕旭阳
郑涛
骆元昊
张旭光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202110974119.9A priority Critical patent/CN113887691B/en
Publication of CN113887691A publication Critical patent/CN113887691A/en
Application granted granted Critical
Publication of CN113887691B publication Critical patent/CN113887691B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了面向服务组合问题的鲸鱼进化方法及系统,本发明方法步骤如下:步骤1:将web服务组合问题转化为单目标优化问题,建立适应度函数;步骤2:对web服务组合问题进行整数型编码;步骤3:建立WOA算法模型;步骤4:对WOA算法进行整数型编码,转化为DWOA算法;步骤5:使用DWOA算法对问题模型开始迭代寻优;步骤6:结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值。当服务组合序列数量级达到一定规模时,采用本发明求解最优服务组合相较随机搜索方法的最优值将得到显著的提升,而相较遍历搜索方法则具有更高的寻优效率,从而契合于web服务组合优化问题中可靠性与实时性的特性要求,提供较优质的组合服务。

Figure 202110974119

The invention discloses a whale evolution method and system oriented to the service composition problem. The steps of the method of the present invention are as follows: Step 1: transform the web service composition problem into a single-objective optimization problem, and establish a fitness function; step 2: carry out the web service composition problem. Integer coding; Step 3: Build the WOA algorithm model; Step 4: Perform integer coding on the WOA algorithm and convert it into the DWOA algorithm; Step 5: Use the DWOA algorithm to start iterative optimization of the problem model; Step 6: End the search and output the search The optimal service combination coding sequence is combined with the QoS value of the optimal web service at this time. When the order of magnitude of the service combination sequence reaches a certain scale, the use of the present invention to solve the optimal service combination will significantly improve the optimal value of the random search method, and it will have higher optimization efficiency compared with the traversal search method. According to the characteristic requirements of reliability and real-time performance in the optimization problem of web service composition, it provides better composition services.

Figure 202110974119

Description

面向服务组合问题的鲸鱼进化系统及方法Whale evolution system and method for service composition problem

技术领域technical field

本发明涉及鲸鱼优化算法在Web服务组合问题中的应用,具体涉及一种面向服务组合问题的鲸鱼进化系统及方法。The invention relates to the application of a whale optimization algorithm in the Web service composition problem, in particular to a whale evolution system and method oriented to the service composition problem.

背景技术Background technique

在当前信息技术发展下,Web服务组合问题成为了当今信息技术应用的热点之一。Web服务是通过互联网实现的带有自描述和自包含功能的软件模块,它们可以使用一组标准(如SOAP、WSDL和UDDI)在互联网上发布、定位功能,并且被使用。此类软件模块代表用户或应用程序完成任务、解决问题和处理事务等。在大多数情况下,用户通常需要使用一系列的服务组合来实现自己的目标。当用户使用不同类别的Web子服务创建Web服务组合时,一个类别下通常会有多个具有相同功能的候选服务,而由于当前数量庞大的web服务,在能够实现相同功能的模块中,往往包含数以千计QoS(Quality-of-Service)不同的功能模块。因此,如何从数量众多的Web服务候选集中,选定质量最优的子服务组合是需要解决的问题。高质量的Web服务组合应该包含响应时间短、成本低、可靠性高、可用性好等特点,这些也就是Web服务常规的评估标准QoS。Under the current development of information technology, the problem of Web service composition has become one of the hotspots in today's information technology applications. Web services are software modules with self-describing and self-contained functions implemented over the Internet that can be published, located, and consumed on the Internet using a set of standards (such as SOAP, WSDL, and UDDI). Such software modules perform tasks, solve problems, and process transactions on behalf of users or applications. In most cases, users usually need to use a series of service combinations to achieve their goals. When a user creates a Web service composition using different categories of Web sub-services, there are usually multiple candidate services with the same function under one category. Due to the large number of current web services, modules that can implement the same function often include Thousands of QoS (Quality-of-Service) different functional modules. Therefore, how to select the optimal sub-service combination from a large number of Web service candidates is a problem that needs to be solved. A high-quality Web service composition should include the characteristics of short response time, low cost, high reliability, and good availability, which are the conventional evaluation criteria of Web services, QoS.

QoS是重要的用来评价网络功能服务的方法,包含各项不同的评判标准。从服务属性可将其基本分为积极属性与消极属性两大类,积极属性评分越高越好,消极属性反之。其中成功率,可靠性,吞吐率等归为积极属性,而响应时间,服务价格等归为消极属性。而对web服务的评价往往需要综合积极属性与消极属性,而非专注于单一某个方面。QoS is an important method used to evaluate network function services, including various evaluation criteria. From the service attributes, it can be basically divided into two categories: positive attributes and negative attributes. The higher the positive attribute score, the better, and the negative attribute on the contrary. Among them, success rate, reliability, throughput rate, etc. are classified as positive attributes, while response time, service price, etc. are classified as negative attributes. The evaluation of web services often requires a combination of positive and negative attributes, rather than focusing on a single aspect.

进一步说明web服务组合结构流程。根据实际场景划分,常见的web服务组合流程组合工作流可分为顺序,并发,选择以及循环结构,而根据不同的服务属性,在不同的工作流模式下数据处理模式将会有区别。Further explain the web service composition structure process. According to the actual scene division, the common web service composition process composition workflow can be divided into sequential, concurrent, selective and loop structure, and according to different service attributes, the data processing mode will be different in different workflow modes.

此为Web服务组合问题描述。对于规模庞大候选服务集,若每个目标组合有n类抽象服务类别,每类由m个具体的候选Web服务,那么所有可能的组合的数量为mn个。这是典型的NP难问题。群智能优化算法能够较好的解决该类问题,能够在不遍历所有可能的解决方案的情况下找接近最优方案的服务组合,在均衡算力与目标的前提下是对该问题的一种高效解决方案。本文针对这些目标和要求,将Web服务组合问题转化为Qos约束的多目标Web服务组合优化问题,并利用鲸鱼算法WOA(Whale optimization Algorithm)同时优化多个目标参数,最后动态选择一组Web服务组合的最优解。This is the Web Services Composition problem description. For a large-scale candidate service set, if each target combination has n types of abstract service categories, and each category consists of m specific candidate Web services, then the number of all possible combinations is m n . This is a typical NP-hard problem. The swarm intelligence optimization algorithm can better solve this kind of problem, and can find a service combination that is close to the optimal solution without traversing all possible solutions. Efficient solution. Aiming at these goals and requirements, this paper transforms the web service composition problem into a QoS-constrained multi-objective web service composition optimization problem, and uses the whale algorithm WOA (Whale optimization Algorithm) to optimize multiple target parameters at the same time, and finally dynamically selects a set of web service compositions. the optimal solution.

鲸鱼优化算法WOA是一种由Mirjalili与Lewis在2016年提出的新型群智能算法。该算法通过模拟鲸群在追捕猎物的过程中螺旋形运动与气泡网捕猎行为构建成群智能寻优算法。WOA的寻优原则分为以下三类:包围行为、狩猎行为、搜索行为。WOA作为一种新型的寻优算法,具有结构简单、调节参数少、易于实现、运算速度快等优点,经过实验证明,其能较好的应该用于该领域。Whale optimization algorithm WOA is a new swarm intelligence algorithm proposed by Mirjalili and Lewis in 2016. The algorithm constructs a swarm intelligent optimization algorithm by simulating the spiral motion of whales and the hunting behavior of bubble nets in the process of chasing their prey. The optimization principles of WOA are divided into the following three categories: encircling behavior, hunting behavior, and searching behavior. As a new type of optimization algorithm, WOA has the advantages of simple structure, few adjustment parameters, easy implementation, and fast operation speed. It has been proved by experiments that it can be better used in this field.

对于WOA算法来说,目前还没有产生应用于服务组合问题的模型。在使用群智能算法应用于服务组合问题的模型中,大多数很难均衡寻优速度与最优值二者:寻优速度快但搜索的最优值较差,反之亦然。For the WOA algorithm, there is currently no model applied to the service composition problem. In most models using swarm intelligence algorithms applied to service composition problems, it is difficult to balance the search speed and the optimal value: the search speed is fast but the search optimal value is poor, and vice versa.

发明内容SUMMARY OF THE INVENTION

针对现有技术存在的上述问题,本发明提供了一种面向服务组合问题的鲸鱼进化系统。本发明采用鲸鱼优化算法(WOA),该算法侧重考虑在较多目标干扰情况下的优化环境,且算法对容易陷入局部最优的情况比较敏感。因此具有良好的多峰环境下目标优化效率,适合应用于Web服务组合问题的优化。由于WOA算法中搜索代理的各维度坐标值是连续的,而构成服务组合的各具体候选服务的编号是离散的,在实际应用时需要使用模糊函数将搜索代理的各维坐标值转换为对应的整数编码进行求解。In view of the above problems existing in the prior art, the present invention provides a whale evolution system oriented to the service composition problem. The present invention adopts the Whale Optimization Algorithm (WOA), which focuses on the optimization environment under the condition of more target interference, and the algorithm is more sensitive to the situation that it is easy to fall into the local optimum. Therefore, it has a good target optimization efficiency in a multi-peak environment, and is suitable for the optimization of Web service composition problems. Since the coordinate values of each dimension of the search agent in the WOA algorithm are continuous, and the number of each specific candidate service that constitutes the service combination is discrete, it is necessary to use a fuzzy function to convert the coordinate value of each dimension of the search agent into the corresponding Integer encoding to solve.

为实现上述技术目的,本发明采取如下技术方案:For realizing the above-mentioned technical purpose, the present invention adopts following technical scheme:

面向服务组合问题的鲸鱼进化方法,具体步骤如下:Whale evolution method for service composition problem, the specific steps are as follows:

步骤1:将web服务组合问题转化为单目标优化问题,建立适应度函数;Step 1: Convert the web service composition problem into a single-objective optimization problem and establish a fitness function;

步骤2:对web服务组合问题进行整数型编码;Step 2: Integer encoding for the web service composition problem;

步骤3:建立WOA算法模型;Step 3: Establish the WOA algorithm model;

步骤4:对WOA算法进行整数型编码,转化为DWOA算法;Step 4: Perform integer coding on the WOA algorithm and convert it into the DWOA algorithm;

步骤5:使用DWOA算法对问题模型开始迭代寻优;Step 5: Use the DWOA algorithm to start iterative optimization of the problem model;

步骤6:结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值。Step 6: End the search, and output the searched optimal service combination coding sequence and the current optimal web service combination QoS value.

优选的,步骤1具体如下:先通过式(1)对不同web服务属性的QoS值进行归一化处理,再根据所需的优化约束条件设定各服务属性的权重值,通过式(2)分配各服务属性QoS值的权重,得到最终的适应度函数;Preferably, step 1 is as follows: first normalize the QoS values of different web service attributes by formula (1), then set the weight value of each service attribute according to the required optimization constraints, and use formula (2) Allocate the weight of each service attribute QoS value to get the final fitness function;

Figure BDA0003226703970000031
Figure BDA0003226703970000031

f(x)=F(minT(s),minA(s),minS(s),minR(s),...)(2)f(x)=F(minT(s), minA(s), minS(s), minR(s),...)(2)

其中,i为服务类型,j为第j种子服务QoSi,j(S)为归一化前属性值,QoS’i,j(S)为归一化后属性值,QoSj_max与QoSj_min分别为该类最大与最小的属性值;式(2)中,T为响应时间,A为有效性,S为成功率,R为稳定性,属于web各服务属性的归一化QoS值。Among them, i is the service type, j is the jth seed service QoS i,j (S) is the attribute value before normalization, QoS' i,j (S) is the attribute value after normalization, QoS j_max and QoS j_min respectively is the maximum and minimum attribute values of this class; in formula (2), T is the response time, A is the effectiveness, S is the success rate, R is the stability, and belongs to the normalized QoS value of each service attribute of the web.

优选的,步骤2具体如下:每一个web服务组合是从n类抽象服务中各选择出md个具体候选服务构成的,在顺序结构工作流下对各类抽象服务进行排列,最终得到一串编码组合;其中,单个码的变换范围由实际情况中每类抽象服务的候选服务个数所决定,数值由1至md且为整数,故各维度的搜索范围由实际编码范围决定:ub表示搜索上界,一般等同为md;lb表示搜索下界,一般为定值1。Preferably, step 2 is as follows: each web service combination is formed by selecting m d specific candidate services from n types of abstract services, arranging various abstract services under the sequential structure workflow, and finally obtaining a series of codes Combination; wherein, the transformation range of a single code is determined by the number of candidate services for each type of abstract service in the actual situation, and the value is from 1 to m d and is an integer, so the search range of each dimension is determined by the actual coding range: ub means search The upper bound is generally equivalent to m d ; lb represents the search lower bound, generally a fixed value of 1.

优选的,步骤3具体如下:设定最大迭代次数Tmax,迭代初值t=1;模型由三种行为计算原则组成:Preferably, step 3 is as follows: set the maximum number of iterations T max , and the initial iteration value t=1; the model consists of three behavior calculation principles:

包围行为:通过式(3)为个体位置更新公式,式(4)为剩余个体与目标位置的距离差,表达式如下:Surrounding behavior: Formula (3) is the update formula for the individual position, formula (4) is the distance difference between the remaining individuals and the target position, and the expression is as follows:

X(j+1)=X*(j)-A·D (3)X(j+1)=X * (j)-A·D (3)

D=|C·X*(j)-X(j)| (4)D=|C·X * (j)-X(j)| (4)

其中,X(j+1)是当前个体的下一个运动位置,j为迭代次数,X*(j)为每一代的最优个体位置;A与C的表达式如下:Among them, X(j+1) is the next movement position of the current individual, j is the number of iterations, and X * (j) is the optimal individual position of each generation; the expressions of A and C are as follows:

A=2a·ra-a (5)A=2a·r a -a (5)

C=2·rc (6)C=2·r c (6)

其中,ra与rc是两个取值为[0,1]的随机向量,收敛因子a的由2到0线性递减,表达式如下:Among them, ra and rc are two random vectors with the value [0, 1], the convergence factor a decreases linearly from 2 to 0, and the expression is as follows:

Figure BDA0003226703970000032
Figure BDA0003226703970000032

狩猎行为:式(8)为第i个体与最优个体之间的距离,式(9)为搜索代理的气泡网捕猎行为;Hunting behavior: Equation (8) is the distance between the i-th individual and the optimal individual, and Equation (9) is the bubble net hunting behavior of the search agent;

D=|C·X*(j)-X(j)| (8)D=|C·X * (j)-X(j)| (8)

X(j+1)=D·ebl·cos(2πl)+X*(j) (9)X(j+1)=D·e bl ·cos(2πl)+X * (j) (9)

其中,b为螺旋形线性参数,l为随机参数变量,取值在[-1,1]之间;Among them, b is a spiral linear parameter, l is a random parameter variable, and its value is between [-1, 1];

为保证搜索代理在该过程收缩包围与螺旋式逼近同步进行,通过随机数P来实现,表达式如下:In order to ensure that the search agent shrinks and surrounds and the spiral approximation is carried out synchronously in this process, it is realized by the random number P, and the expression is as follows:

Figure BDA0003226703970000041
Figure BDA0003226703970000041

搜索行为:此时|A|≥1,算法选取一个随机个体Xrand作为目标,其余搜索个体向其运动;式(11)为搜索代理的搜索行为,式(12)为第i个体与该代选择的随机个体之间的距离;Search behavior: At this time |A|≥1, the algorithm selects a random individual X rand as the target, and the rest of the search individuals move toward it; Equation (11) is the search behavior of the search agent, and Equation (12) is the relationship between the i-th individual and this generation. the distance between selected random individuals;

X(j+1)=Xrand(j)-A·D (11)X(j+1)=X rand (j)-A·D (11)

D=|C·Xrand(j)-X(j)| (12)。D=|C·X rand (j)-X(j)| (12).

优选的,步骤4具体如下:设定搜索代理数量为n,其中某一维度的坐标取值范围为1至md的整数;使用式(13)模糊函数fd将搜索代理的各维坐标值转换为对应的整数值,更新上一代坐标为整数型坐标,以此将每个搜索代理的各维度坐标按照web服务组合编码顺序转化为相应的整数型编码坐标;根据搜索代理的服务组合编码串,分别代入目标函数中计算每个搜索代理的当前适应度值,比较并更新当前适应度最好的搜索代理的位置坐标为X*Preferably, step 4 is as follows: the number of search agents is set to n, and the coordinate value range of a certain dimension is an integer from 1 to m d ; the fuzzy function fd of formula (13) is used to convert the coordinate values of each dimension of the search agent For the corresponding integer value, update the coordinates of the previous generation to integer coordinates, so as to convert the coordinates of each dimension of each search agent into the corresponding integer encoded coordinates according to the coding sequence of the web service combination; according to the service combination coding string of the search agent, Substitute into the objective function to calculate the current fitness value of each search agent, compare and update the position coordinates of the search agent with the best current fitness as X * ;

Figure BDA0003226703970000042
Figure BDA0003226703970000042

其中,xt i,d是搜索代理i第t代在第d维上坐标值,z是[1,md]上的整数;随机变量Y是做一次概率为0.5的伯努利的试验结果,iff(P,u,v)函数的取值取决于P命题是否为真,若是则为u,否则为v;引入iff(P,u,v)函数。Among them, x t i,d is the coordinate value of the t-th generation of search agent i on the d-th dimension, z is an integer on [1,m d ]; the random variable Y is the result of a Bernoulli experiment with a probability of 0.5 , the value of the iff(P,u,v) function depends on whether the P proposition is true, if so, it is u, otherwise it is v; the iff(P,u,v) function is introduced.

优选的,步骤5具体如下:更新随机参数变量l、P,其中l用于控制螺旋形运动幅度,取值在[-1,1]之间,P用于控制位置更新,为[0,1]之间的随机数;分别比较判断参数P、A的值,确定下一代搜索代理的位置更新表达式,通过式(14)更新搜索代理的位置。Preferably, step 5 is as follows: update the random parameter variables l and P, where l is used to control the amplitude of the spiral motion, and its value is between [-1, 1], and P is used to control the position update, which is [0, 1] ]; compare the values of the judgment parameters P and A respectively, determine the position update expression of the next generation search agent, and update the position of the search agent by formula (14).

Figure BDA0003226703970000043
Figure BDA0003226703970000043

优选的,步骤6具体如下:更新迭代次数t;与最大迭代次数Tmax进行比较,若t≤Tmax,则回到步骤3;若t>Tmax,则结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值,以供用户实际中服务组合的调用。Preferably, step 6 is specifically as follows: update the number of iterations t; compare with the maximum number of iterations T max , if t≤T max , go back to step 3; if t>T max , end the search, and output the optimal search service The combined coding sequence and the optimal web service at this time combine the QoS value for the user to call the actual service combination.

本发明还公开了一种面向服务组合问题的鲸鱼进化系统,包括如下模块:The invention also discloses a whale evolution system oriented to the service composition problem, including the following modules:

适应度函数建立模块,将web服务组合问题转化为单目标优化问题,建立适应度函数;The fitness function building module converts the web service composition problem into a single-objective optimization problem and establishes the fitness function;

整数型编码模块,对web服务组合问题进行整数型编码;Integer encoding module, which performs integer encoding for web service composition problems;

WOA算法模型建立模块,建立WOA算法模型;WOA algorithm model establishment module, establish WOA algorithm model;

转化模块,对WOA算法进行整数型编码,转化为DWOA算法;The conversion module performs integer coding on the WOA algorithm and converts it into the DWOA algorithm;

寻优模块,使用DWOA算法对问题模型开始迭代寻优;The optimization module uses the DWOA algorithm to start iterative optimization of the problem model;

输出模块,结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值。The output module ends the search, and outputs the searched optimal service combination coding sequence and the current optimal web service combination QoS value.

进一步说明DWOA算法与web服务组合问题对应关系。算法的优化目标函数为web组合服务的适应度函数;算法各搜索代理坐标对应问题模型的整数型服务组合编码;搜索代理各维度坐标对应问题模型中的各类抽象服务;搜索代理的各维度坐标值对应抽象服务中的第几个子服务;最优搜索代理对应当前最优的web服务组合;最优适应度值对应web服务组合的最优综合属性值。The corresponding relationship between DWOA algorithm and web service composition problem is further explained. The optimization objective function of the algorithm is the fitness function of the web composition service; the coordinates of each search agent of the algorithm correspond to the integer service composition code of the problem model; the coordinates of each dimension of the search agent correspond to various abstract services in the problem model; the coordinates of each dimension of the search agent The value corresponds to the number of sub-services in the abstract service; the optimal search agent corresponds to the current optimal web service composition; the optimal fitness value corresponds to the optimal comprehensive attribute value of the web service composition.

由于在使用群智能算法应用于服务组合问题的模型中,大多数很难均衡寻优速度与最优值二者:寻优速度快但搜索的最优值较差,反之亦然。而本发明采用的WOA算法能够较好的平衡这两项目标。Since most of the models that use swarm intelligence algorithms are applied to service composition problems, it is difficult to balance the search speed and the optimal value: the search speed is fast but the optimal value searched is poor, and vice versa. The WOA algorithm adopted in the present invention can better balance these two objectives.

当服务组合序列数量级达到一定规模时,采用本发明求解最优服务组合相较随机搜索方法的最优值将得到显著的提升,而相较遍历搜索方法则具有更高的寻优效率,从而契合于web服务组合优化问题中可靠性与实时性的特性要求,提供较优质的组合服务。When the order of magnitude of the service combination sequence reaches a certain scale, the use of the present invention to solve the optimal service combination will significantly improve the optimal value of the random search method, and it will have higher optimization efficiency compared with the traversal search method. According to the characteristic requirements of reliability and real-time performance in the optimization problem of web service composition, it provides better composition services.

附图说明Description of drawings

图1为从各类抽象服务的具体候选服务中映射为服务组合序列的方法对应于算法中的编码序列。其中n表示不同的抽象服务类,m表示抽象服务类中具体候选服务的个数。需要说明的是,为制表方便,步骤1中所述的md统一用m表示。Figure 1 shows the method of mapping from concrete candidate services of various abstract services to service combination sequences, which corresponds to the coding sequence in the algorithm. Among them, n represents different abstract service classes, and m represents the number of specific candidate services in the abstract service class. It should be noted that, for the convenience of tabulation, m d described in step 1 is uniformly represented by m.

图2为web组合服务的一种示例,是顺序型web服务组合工作流图。每个圆框代表单种服务,从Start开始工作进入服务工作流T1,依照工作流设定顺序访问各项类型服务,并于Tn之后结束服务工作流End。在实际应用中使用者可以自行选取所需的控制流结构。FIG. 2 is an example of web composition service, which is a workflow diagram of sequential web service composition. Each circle represents a single service, starting work from Start and entering the service workflow T 1 , accessing various types of services according to the workflow setting sequence, and ending the service workflow End after T n . In practical applications, users can choose the required control flow structure by themselves.

图3是本发明面向服务组合问题的鲸鱼进化系统框图。Fig. 3 is a block diagram of the whale evolution system oriented to the service composition problem of the present invention.

图4是本发明面向服务组合问题的鲸鱼进化方法流程图。Fig. 4 is a flow chart of the whale evolution method oriented to the service composition problem of the present invention.

图5是一种优选实施例面向服务组合的DWOA流程图。Fig. 5 is a DWOA flow chart of service-oriented composition of a preferred embodiment.

具体实施方式Detailed ways

下面结合附图对本发明优选实施例作详细说明。The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

实施例1Example 1

如图4-5所示,本实施例面向服务组合问题的鲸鱼进化方法。由于服务组合的各工作流结构都可转化为顺序结构,故按图2所示顺序结构实施模型,其按如下步骤进行:As shown in Figure 4-5, this embodiment is a whale evolution method for the service composition problem. Since each workflow structure of the service composition can be transformed into a sequence structure, the model is implemented according to the sequence structure shown in Figure 2, and the steps are as follows:

步骤1:将web服务组合问题转化为单目标优化问题,建立适应度函数。首先通过式(1)对不同web服务属性的QoS值进行归一化处理,根据表1顺序结构计算各属性值总合,最终根据所需的优化约束条件设定各服务属性的权重值,通过式(2)分配各服务属性QoS值的权重,得到最终的适应度函数。Step 1: Convert the web service composition problem into a single-objective optimization problem and establish a fitness function. First, the QoS values of different web service attributes are normalized by formula (1), the sum of each attribute value is calculated according to the sequence structure in Table 1, and finally the weight value of each service attribute is set according to the required optimization constraints. Equation (2) assigns the weight of each service attribute QoS value to obtain the final fitness function.

表1 QoS值的聚合计算式Table 1 Aggregation calculation formula of QoS value

Figure BDA0003226703970000061
Figure BDA0003226703970000061

Figure BDA0003226703970000062
Figure BDA0003226703970000062

f(x)=F(minT(s),minA(s),minS(s),minR(s),...) (2)f(x)=F(minT(s), minA(s), minS(s), minR(s),...) (2)

其中i为服务类型,j为第j种子服务QoSi,j(S)为归一化前属性值,QoS’i,j(S)为归一化后属性值,QoSj_max与QoSj_min分别为该类最大与最小的属性值。式(2)中T为响应时间,A为有效性,S为成功率,R为稳定性,属于web各服务属性的归一化QoS值。where i is the service type, j is the jth seed service QoS i,j (S) is the attribute value before normalization, QoS' i,j (S) is the attribute value after normalization, QoS j_max and QoS j_min are respectively The maximum and minimum property values for this class. In formula (2), T is the response time, A is the effectiveness, S is the success rate, and R is the stability, which belongs to the normalized QoS value of each service attribute of the web.

步骤2:对web服务组合问题进行整数型编码。每一个web服务组合是从n类抽象服务中各选择出md个具体候选服务构成的,在顺序结构工作流下对各类抽象服务进行排列,最终得到一串编码组合。其中单个码的变换范围由实际情况中每类抽象服务的候选服务个数所决定,数值由1至md且为整数。故算法各维度的搜索范围由实际编码范围决定:ub表示搜索上界,一般等同为md;lb表示搜索下界,一般为定值1。Step 2: Integer encoding of the web service composition problem. Each web service combination is composed of m d specific candidate services selected from n types of abstract services, and the various abstract services are arranged under the sequential structure workflow, and finally a series of coding combinations are obtained. The transformation range of a single code is determined by the number of candidate services for each type of abstract service in the actual situation, and the value ranges from 1 to m d and is an integer. Therefore, the search range of each dimension of the algorithm is determined by the actual coding range: ub represents the upper bound of the search, which is generally equivalent to m d ; lb represents the lower bound of the search, which is generally a fixed value of 1.

步骤3:建立WOA算法模型。设定算法最大迭代次数Tmax,迭代初值t=1。模型由三种行为计算原则组成。Step 3: Establish the WOA algorithm model. The maximum number of iterations T max of the algorithm is set, and the initial iteration value t=1. The model consists of three behavioral calculation principles.

包围行为:通过式(3)为个体位置更新公式,式(4)为剩余个体与目标位置的距离差,表达式如下:Surrounding behavior: Formula (3) is the update formula for the individual position, formula (4) is the distance difference between the remaining individuals and the target position, and the expression is as follows:

X(j+1)=X*(j)-A·D (3)X(j+1)=X * (j)-A·D (3)

D=|C·X*(j)-X(j)| (4)D=|C·X * (j)-X(j)| (4)

其中X(j+1)是当前个体的下一个运动位置,j为迭代次数,X*(j)为每一代的最优个体位置。A与C的表达式如下:where X(j+1) is the next movement position of the current individual, j is the number of iterations, and X * (j) is the optimal individual position for each generation. The expressions for A and C are as follows:

A=2a·ra-a (5)A=2a·r a -a (5)

C=2·rc (6)C=2·r c (6)

其中ra与rc是两个取值为[0,1]的随机向量,收敛因子a的由2到0线性递减,其表达式如下:where r a and rc are two random vectors with values [0,1], the convergence factor a decreases linearly from 2 to 0, and its expression is as follows:

Figure BDA0003226703970000071
Figure BDA0003226703970000071

狩猎行为:式(8)为第i个体与最优个体之间的距离,式(9)为搜索代理的气泡网捕猎行为。Hunting behavior: Equation (8) is the distance between the ith individual and the optimal individual, and Equation (9) is the bubble net hunting behavior of the search agent.

D=|C·X*(j)-X(j)| (8)D=|C·X * (j)-X(j)| (8)

X(j+1)=D·ebl·cos(2πl)+X*(j) (9)X(j+1)=D·e bl ·cos(2πl)+X * (j) (9)

其中b为螺旋形线性参数,l为随机参数变量,取值在[-1,1]之间。where b is a spiral linear parameter, and l is a random parameter variable with a value between [-1, 1].

为保证搜索代理在该过程收缩包围与螺旋式逼近同步进行,算法通过随机数P来实现,表达式如下:In order to ensure that the search agent shrinks and surrounds and the spiral approximation is carried out synchronously in this process, the algorithm is realized by the random number P, and the expression is as follows:

Figure BDA0003226703970000072
Figure BDA0003226703970000072

搜索行为:此时|A|≥1,算法选取一个随机个体Xrand作为目标,其余搜索个体向其运动。式(11)为搜索代理的搜索行为,式(12)为第i个体与该代选择的随机个体之间的距离。Search behavior: At this time |A|≥1, the algorithm selects a random individual X rand as the target, and the rest of the search individuals move toward it. Equation (11) is the search behavior of the search agent, and Equation (12) is the distance between the i-th individual and the random individual selected by the generation.

X(j+1)=Xrand(j)-A·D (11)X(j+1)=X rand (j)-A·D (11)

D=|C·Xrand(j)-X(j)| (12)D=|C·X rand (j)-X(j)| (12)

步骤4:对WOA算法进行整数型编码,将其转化为DWOA(Discrete WhaleOptimization Algorithm)算法。设定搜索代理数量为n,其中某一维度的坐标取值范围为1至md的整数。使用式(13)模糊函数fd将搜索代理的各维坐标值转换为对应的整数值,更新上一代坐标为整数型坐标,以此将每个搜索代理的各维度坐标按照web服务组合编码顺序转化为相应的整数型编码坐标。根据搜索代理的服务组合编码串,分别带入目标函数中计算每个搜索代理的当前适应度值,比较并更新当前适应度最好的搜索代理的位置坐标为X*Step 4: Perform integer coding on the WOA algorithm and convert it into a DWOA (Discrete WhaleOptimization Algorithm) algorithm. The number of search agents is set to n, and the coordinates of one dimension range from an integer from 1 to m d . Use the fuzzy function fd of formula (13) to convert the coordinate values of each dimension of the search agent into corresponding integer values, and update the coordinates of the previous generation to integer coordinates, so as to convert the coordinates of each dimension of each search agent according to the coding sequence of the web service combination. Code the coordinates for the corresponding integer type. According to the service combination code string of the search agent, it is brought into the objective function to calculate the current fitness value of each search agent, and the position coordinates of the search agent with the best current fitness are compared and updated as X * .

Figure BDA0003226703970000081
Figure BDA0003226703970000081

其中xt i,d是搜索代理i第t代在第d维上坐标值,z是[1,md]上的整数。随机变量Y是做一次概率为0.5的伯努利的试验结果,iff(P,u,v)函数的取值取决于P命题是否为真,若是则为u,否则为v。引入iff(P,u,v)函数,主要原因是WOA系算法在实际应用时会出现搜索代理坐标超出边界的情况,该函数的引入避免超出边界后搜索代理的坐标被编为不合法的编码。where x t i,d is the coordinate value of the t-th generation of search agent i on the d-th dimension, and z is an integer in [1,m d ]. The random variable Y is the result of a Bernoulli experiment with a probability of 0.5. The value of the iff(P, u, v) function depends on whether the P proposition is true, if it is u, otherwise it is v. The iff(P,u,v) function is introduced. The main reason is that the coordinates of the search agent will exceed the boundary when the WOA algorithm is actually applied. The introduction of this function prevents the coordinates of the search agent from being encoded as illegal codes after the boundary is exceeded. .

步骤5:更新随机参数变量l、P,其中l用于控制螺旋形运动幅度,取值在[-1,1]之间,P用于控制位置更新,为[0,1]之间的随机数。分别比较判断参数P、A的值,确定下一代搜索代理的位置更新表达式,通过式(14)更新搜索代理的位置。Step 5: Update the random parameter variables l and P, where l is used to control the amplitude of the spiral motion, and its value is between [-1, 1], and P is used to control the position update, which is a random value between [0, 1]. number. Comparing the values of the judgment parameters P and A respectively, the position update expression of the next generation search agent is determined, and the position of the search agent is updated by formula (14).

Figure BDA0003226703970000082
Figure BDA0003226703970000082

步骤6:更新迭代次数t。与最大迭代次数Tmax进行比较,若t≤Tmax,则回到步骤3;若t>Tmax,则结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值,以供用户实际中服务组合的调用。Step 6: Update the number of iterations t. Compare with the maximum number of iterations T max , if t≤T max , go back to step 3; if t>T max , end the search, and output the searched optimal service combination code sequence and the optimal web service combination QoS at this time The value for the user to actually call the service composition.

实施例2Example 2

如图3所示,本实施例面向服务组合问题的鲸鱼进化系统,其包括如下模块:As shown in FIG. 3 , the whale evolution system for the service composition problem in this embodiment includes the following modules:

适应度函数建立模块:将web服务组合问题转化为单目标优化问题,建立适应度函数。首先通过式(1)对不同web服务属性的QoS值进行归一化处理,根据表1顺序结构计算各属性值总合,最终根据所需的优化约束条件设定各服务属性的权重值,通过式(2)分配各服务属性QoS值的权重,得到最终的适应度函数。Fitness function establishment module: Convert the web service composition problem into a single-objective optimization problem, and establish a fitness function. First, the QoS values of different web service attributes are normalized by formula (1), the sum of each attribute value is calculated according to the sequence structure in Table 1, and finally the weight value of each service attribute is set according to the required optimization constraints. Equation (2) assigns the weight of each service attribute QoS value to obtain the final fitness function.

表1 QoS值的聚合计算式Table 1 Aggregation calculation formula of QoS value

Figure BDA0003226703970000091
Figure BDA0003226703970000091

Figure BDA0003226703970000092
Figure BDA0003226703970000092

f(x)=F(minT(s),minA(s),minS(s),minR(s),...) (2)f(x)=F(minT(s), minA(s), minS(s), minR(s),...) (2)

其中i为服务类型,j为第j种子服务QoSi,j(S)为归一化前属性值,QoS’i,j(S)为归一化后属性值,QoSj_max与QoSj_min分别为该类最大与最小的属性值。式(2)中T为响应时间,A为有效性,S为成功率,R为稳定性,属于web各服务属性的归一化QoS值。where i is the service type, j is the jth seed service QoS i,j (S) is the attribute value before normalization, QoS' i,j (S) is the attribute value after normalization, QoS j_max and QoS j_min are respectively The maximum and minimum property values for this class. In formula (2), T is the response time, A is the effectiveness, S is the success rate, and R is the stability, which belongs to the normalized QoS value of each service attribute of the web.

整数型编码模块:对web服务组合问题进行整数型编码。每一个web服务组合是从n类抽象服务中各选择出md个具体候选服务构成的,在顺序结构工作流下对各类抽象服务进行排列,最终得到一串编码组合。其中单个码的变换范围由实际情况中每类抽象服务的候选服务个数所决定,数值由1至md且为整数。故算法各维度的搜索范围由实际编码范围决定:ub表示搜索上界,一般等同为md;lb表示搜索下界,一般为定值1。Integer encoding module: Integer encoding for web service composition problems. Each web service combination is composed of m d specific candidate services selected from n types of abstract services, and the various abstract services are arranged under the sequential structure workflow, and finally a series of coding combinations are obtained. The transformation range of a single code is determined by the number of candidate services for each type of abstract service in the actual situation, and the value ranges from 1 to m d and is an integer. Therefore, the search range of each dimension of the algorithm is determined by the actual coding range: ub represents the upper bound of the search, which is generally equivalent to m d ; lb represents the lower bound of the search, which is generally a fixed value of 1.

WOA算法模型建立模块:建立WOA算法模型。设定算法最大迭代次数Tmax,迭代初值t=1。模型由三种行为计算原则组成。WOA algorithm model building module: establish the WOA algorithm model. The maximum number of iterations T max of the algorithm is set, and the initial iteration value t=1. The model consists of three behavioral calculation principles.

包围行为:通过式(3)为个体位置更新公式,式(4)为剩余个体与目标位置的距离差,表达式如下:Surrounding behavior: Formula (3) is the update formula for the individual position, formula (4) is the distance difference between the remaining individuals and the target position, and the expression is as follows:

X(j+1)=X*(j)-A·D (3)X(j+1)=X * (j)-A·D (3)

D=|C·X*(j)-X(j)| (4)D=|C·X * (j)-X(j)| (4)

其中X(j+1)是当前个体的下一个运动位置,j为迭代次数,X*(j)为每一代的最优个体位置。A与C的表达式如下:where X(j+1) is the next movement position of the current individual, j is the number of iterations, and X * (j) is the optimal individual position for each generation. The expressions for A and C are as follows:

A=2a·ra-a (5)A=2a·r a -a (5)

C=2vrc (6)C=2vr c (6)

其中ra与rc是两个取值为[0,1]的随机向量,收敛因子a的由2到0线性递减,其表达式如下:where r a and rc are two random vectors with values [0,1], the convergence factor a decreases linearly from 2 to 0, and its expression is as follows:

Figure BDA0003226703970000101
Figure BDA0003226703970000101

狩猎行为:式(8)为第i个体与最优个体之间的距离,式(9)为搜索代理的气泡网捕猎行为。Hunting behavior: Equation (8) is the distance between the ith individual and the optimal individual, and Equation (9) is the bubble net hunting behavior of the search agent.

D=|C·X*(j)-X(j)| (8)D=|C·X * (j)-X(j)| (8)

X(j+1)=D·ebl·cos(2πl)+X*(j) (9)X(j+1)=D·e bl ·cos(2πl)+X * (j) (9)

其中b为螺旋形线性参数,l为随机参数变量,取值在[-1,1]之间。where b is a spiral linear parameter, and l is a random parameter variable with a value between [-1, 1].

为保证搜索代理在该过程收缩包围与螺旋式逼近同步进行,算法通过随机数P来实现,表达式如下:In order to ensure that the search agent shrinks and surrounds and the spiral approximation is carried out synchronously in this process, the algorithm is realized by the random number P, and the expression is as follows:

Figure BDA0003226703970000102
Figure BDA0003226703970000102

搜索行为:此时|A|≥1,算法选取一个随机个体Xrand作为目标,其余搜索个体向其运动。式(11)为搜索代理的搜索行为,式(12)为第i个体与该代选择的随机个体之间的距离。Search behavior: At this time |A|≥1, the algorithm selects a random individual X rand as the target, and the rest of the search individuals move toward it. Equation (11) is the search behavior of the search agent, and Equation (12) is the distance between the i-th individual and the random individual selected by the generation.

X(j+1)=Xrand(j)-A·D (11)X(j+1)=X rand (j)-A·D (11)

D=|C·Xrand(j)-X(j)| (12)D=|C·X rand (j)-X(j)| (12)

转化模块:对WOA算法进行整数型编码,将其转化为DWOA(Discrete WhaleOptimization Algorithm)算法。设定搜索代理数量为n,其中某一维度的坐标取值范围为1至md的整数。使用式(13)模糊函数fd将搜索代理的各维坐标值转换为对应的整数值,更新上一代坐标为整数型坐标,以此将每个搜索代理的各维度坐标按照web服务组合编码顺序转化为相应的整数型编码坐标。根据搜索代理的服务组合编码串,分别带入目标函数中计算每个搜索代理的当前适应度值,比较并更新当前适应度最好的搜索代理的位置坐标为X*Conversion module: Encode the WOA algorithm in integer type and convert it into DWOA (Discrete WhaleOptimization Algorithm) algorithm. The number of search agents is set to n, and the coordinates of one dimension range from an integer from 1 to m d . Use the fuzzy function fd of formula (13) to convert the coordinate values of each dimension of the search agent into corresponding integer values, and update the coordinates of the previous generation to integer coordinates, so as to convert the coordinates of each dimension of each search agent according to the coding sequence of the web service combination. Code the coordinates for the corresponding integer type. According to the service combination code string of the search agent, it is brought into the objective function to calculate the current fitness value of each search agent, and the position coordinates of the search agent with the best current fitness are compared and updated as X * .

Figure BDA0003226703970000111
Figure BDA0003226703970000111

其中xt i,d是搜索代理i第t代在第d维上坐标值,z是[1,md]上的整数。随机变量Y是做一次概率为0.5的伯努利的试验结果,iff(P,u,v)函数的取值取决于P命题是否为真,若是则为u,否则为v。引入iff(P,u,v)函数,主要原因是WOA系算法在实际应用时会出现搜索代理坐标超出边界的情况,该函数的引入避免超出边界后搜索代理的坐标被编为不合法的编码。where x t i,d is the coordinate value of the t-th generation of search agent i on the d-th dimension, and z is an integer in [1,m d ]. The random variable Y is the result of a Bernoulli experiment with a probability of 0.5. The value of the iff(P, u, v) function depends on whether the P proposition is true, if it is u, otherwise it is v. The iff(P,u,v) function is introduced. The main reason is that the coordinates of the search agent will exceed the boundary when the WOA algorithm is actually applied. The introduction of this function prevents the coordinates of the search agent from being encoded as illegal codes after the boundary is exceeded. .

寻优模块:更新随机参数变量l、P,其中l用于控制螺旋形运动幅度,取值在[-1,1]之间,P用于控制位置更新,为[0,1]之间的随机数。分别比较判断参数P、A的值,确定下一代搜索代理的位置更新表达式,通过式(14)更新搜索代理的位置。Optimization module: update random parameter variables l, P, where l is used to control the amplitude of the spiral motion, the value is between [-1, 1], and P is used to control the position update, which is between [0, 1] random number. Comparing the values of the judgment parameters P and A respectively, the position update expression of the next generation search agent is determined, and the position of the search agent is updated by formula (14).

Figure BDA0003226703970000112
Figure BDA0003226703970000112

输出模块:更新迭代次数t。与最大迭代次数Tmax进行比较,若t≤Tmax,则返回WOA算法模型建立模块处理;若t>Tmax,则结束搜索,输出搜索最优的服务组合编码序列与此时的最优web服务组合QoS值,以供用户实际中服务组合的调用。Output module: update the number of iterations t. Compare with the maximum number of iterations T max , if t ≤ T max , return to the WOA algorithm model building module for processing; if t > T max , end the search, and output the search optimal service combination code sequence and the optimal web The service composition QoS value is used for the actual invocation of the service composition by the user.

需要指出的是,本发明并不局限于上述特定实施方式,例如服务评估标准的选定、适应度函数权重占比设定等,本领域技术人员可以在权利要求的范围内做出各种变化或修改,这并不影响本发明的实质内容。It should be pointed out that the present invention is not limited to the above-mentioned specific implementations, such as the selection of service evaluation criteria, the setting of the weight ratio of the fitness function, etc., and those skilled in the art can make various changes within the scope of the claims. or modification, which does not affect the essential content of the present invention.

Claims (1)

1. A whale evolution method for service combination problems is characterized by comprising the following specific steps:
step 1: converting a web service combination problem into a single-target optimization problem, and establishing a fitness function;
step 2: carrying out integer coding on the web service combination problem;
and step 3: establishing a WOA algorithm model;
and 4, step 4: carrying out integer coding on the WOA algorithm, and converting the WOA algorithm into a DWOA algorithm;
and 5: starting iterative optimization on the problem model by using a DWOA algorithm;
and 6: finishing the search, and outputting the optimal service combination coding sequence and the current optimal web service combination QoS value;
the step 1 is as follows: firstly, carrying out normalization processing on QoS values of different web service attributes through an equation (1), then setting a weight value of each service attribute according to a required optimization constraint condition, and distributing the weight of each service attribute QoS value through an equation (2) to obtain a final fitness function;
Figure FDA0003720220200000011
f(x)=F(minT(s),minA(s),minS(s),minR(s),...) (2)
wherein i is the service type, and j is the jth seed service QoS i,j (S) is normalized Pre-Attribute value, QoS' i,j (S) is normalized Attribute value, QoS j_max And QoS j_min The maximum and minimum attribute values of the class are respectively; in the formula (2), T is response time, A is effectiveness, S is success rate, R is stability, and the value belongs to the normalized QoS value of each service attribute of the web;
the step 2 is as follows: each web service combination is m selected from n types of abstract services d Each specific candidate service is formed, various abstract services are arranged under the sequential structure working flow, and a string of coding combinations is finally obtained; wherein, the transformation range of the single code is determined by the number of candidate services of each kind of abstract service in actual conditions, and the value is from 1 to m d And is an integer, so the search range of each dimension is determined by the actual coding range: ub denotes the upper search bound, which is equal to m d (ii) a lb represents the lower search bound and is constant 1;
the step 3 is as follows: setting a maximum number of iterations T max The iteration initial value t is 1; the model consists of three behavioral calculation principles:
bounding behavior: formula (3) is used to update the formula for the location of the individual, and formula (4) is used to update the distance difference between the remaining individual and the target location, and the expression is as follows:
X(j+1)=X * (j)-A·D (3)
D=|C·X * (j)-X(j)| (4)
wherein X (j +1) is the next motion position of the current individual, j is the number of iterations, X * (j) An optimal individual position for each generation; the expressions of A and C are as follows:
A=2a·r a -a (5)
C=2·r c (6)
wherein r is a And r c Are two values of [0,1]]The convergence factor a decreases linearly from 2 to 0, and the expression is as follows:
Figure FDA0003720220200000021
hunting behaviors: formula (8) is the distance between the ith individual and the optimal individual, and formula (9) is the bubble trap hunting behavior of the search agent;
D=|C·X * (j)-X(j)| (8)
X(j+1)=D·e bl ·cos(2πl)+X * (j) (9)
wherein, b is a spiral linear parameter, l is a random parameter variable, and the value is between [ -1,1 ];
in order to ensure that the search agent contracts and surrounds and is synchronously close to the spiral type in the process, the process is realized by a random number P, and the expression is as follows:
Figure FDA0003720220200000022
and (3) searching action: at the moment, the absolute value of A is more than or equal to 1, and the algorithm selects a random individual X rand As a target, the rest of the search individuals move towards it; equation (11) is the search behavior of the search agent, and equation (12) is the distance between the ith individual and the random individual selected by the agent;
X(j+1)=X rand (j)-A·D (11)
D=|C·X rand (j)-X(j)| (12);
the step 4 is as follows: setting the number of search agents as n, wherein the value range of the coordinate of a certain dimension is 1-m d An integer of (d); converting each dimension coordinate value of the search agent into a corresponding integer value by using a fuzzy function fd shown in a formula (13), updating the previous generation coordinate into an integer type coordinate, and converting each dimension coordinate of each search agent into a corresponding integer type coding coordinate according to a web service combination coding sequence; respectively substituting the service combination code strings of the search agents into a target function to calculate the current fitness value of each search agent, and comparing and updating the position coordinate of the search agent with the best current fitness as X *
Figure FDA0003720220200000023
Wherein x is t i,d Is the coordinate value of the search agent i in the d-dimension of the t-th generation, z is [1, m d ]The above integer; the random variable Y is a Bernoulli test result with the probability of 0.5 once, and the value of the iff (P, u, v) function depends on whether the P proposition is true, if so, u, otherwise, v; introducing an iff (P, u, v) function;
the step 5 is as follows: updating random parameter variables l and P, wherein l is used for controlling the amplitude of the spiral motion and takes a value between [ -1 and 1], and P is used for controlling the position update and is a random number between [0 and 1 ]; respectively comparing the values of the judgment parameters P, A, determining a position updating expression of a next generation search agent, and updating the position of the search agent by the formula (14);
Figure FDA0003720220200000031
the step 6 is specifically as follows: updating the iteration times t; with the maximum number of iterations T max Comparing if T is less than or equal to T max Returning to the step 3; if T > T max If so, ending the search, and outputting the optimal service combination coding sequence and the optimal web service combination QoS value at the moment for the user to call the actual service combination.
CN202110974119.9A 2021-08-24 2021-08-24 Whale evolution system and method for service composition problem Expired - Fee Related CN113887691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110974119.9A CN113887691B (en) 2021-08-24 2021-08-24 Whale evolution system and method for service composition problem

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110974119.9A CN113887691B (en) 2021-08-24 2021-08-24 Whale evolution system and method for service composition problem

Publications (2)

Publication Number Publication Date
CN113887691A CN113887691A (en) 2022-01-04
CN113887691B true CN113887691B (en) 2022-09-16

Family

ID=79011341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110974119.9A Expired - Fee Related CN113887691B (en) 2021-08-24 2021-08-24 Whale evolution system and method for service composition problem

Country Status (1)

Country Link
CN (1) CN113887691B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021658A (en) * 2017-12-01 2018-05-11 湖北工业大学 A kind of big data intelligent search method and system based on whale optimization algorithm
CN110989342A (en) * 2019-11-19 2020-04-10 华北电力大学 Real-time T-S fuzzy modeling method for combined cycle unit heavy-duty gas turbine
CN111523749A (en) * 2020-02-28 2020-08-11 华中科技大学 Intelligent identification method for hydroelectric generating set model
CN113034554A (en) * 2021-02-27 2021-06-25 西北大学 Chaotic reverse learning-based whale optimized broken warrior body fragment registration method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282229B (en) * 2015-09-11 2018-04-20 南京邮电大学 The web service composition method for the particle swarm optimization algorithm for being based on improvement sub-line
CN106682682A (en) * 2016-10-20 2017-05-17 北京工业大学 Method for optimizing support vector machine based on Particle Swarm Optimization
CN107070704A (en) * 2017-03-22 2017-08-18 东南大学 A kind of Trusted Web services combined optimization method based on QoS
CN107016077B (en) * 2017-03-28 2020-05-29 南京邮电大学 Optimization method for Web service combination
CN109902873A (en) * 2019-02-28 2019-06-18 长安大学 A method for cloud manufacturing resource allocation based on improved whale algorithm
CN111047040A (en) * 2019-12-16 2020-04-21 南京航空航天大学 Web Service Composition Method Based on IFPA Algorithm
CN112036296B (en) * 2020-08-28 2022-08-05 合肥工业大学 A fault diagnosis method for motor bearings based on generalized S transform and WOA-SVM
AU2020103826A4 (en) * 2020-12-01 2021-02-11 Dalian University Whale dna sequence optimization method based on harmony search (hs)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021658A (en) * 2017-12-01 2018-05-11 湖北工业大学 A kind of big data intelligent search method and system based on whale optimization algorithm
CN110989342A (en) * 2019-11-19 2020-04-10 华北电力大学 Real-time T-S fuzzy modeling method for combined cycle unit heavy-duty gas turbine
CN111523749A (en) * 2020-02-28 2020-08-11 华中科技大学 Intelligent identification method for hydroelectric generating set model
CN113034554A (en) * 2021-02-27 2021-06-25 西北大学 Chaotic reverse learning-based whale optimized broken warrior body fragment registration method

Also Published As

Publication number Publication date
CN113887691A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN112969144B (en) A microservice pre-deployment method and system for mobile edge computing
Supraja et al. Optimized neural network for spectrum prediction using genetic algorithm in cognitive radio networks
CN114741955B (en) A multi-objective optimization task scheduling method based on secure cloud
CN109818786A (en) An application-aware distributed multi-resource combination path optimal selection method in cloud data center
CN118095445B (en) Knowledge-graph-based few-sample multi-hop reasoning optimization method
CN113778683B (en) Handle identification system analysis load balancing method based on neural network
CN113613332B (en) Spectrum resource allocation method and system based on cooperative distributed DQN (differential signal quality network) joint simulated annealing algorithm
CN114528987A (en) Neural network edge-cloud collaborative computing segmentation deployment method
CN106230827B (en) A kind of multiple target service combining method based on cost-effectiveness optimization
CN113992677A (en) A MEC calculation offloading method for joint optimization of delay and energy consumption
Aguilar-Fuster et al. A novel evaluation function for higher acceptance rates and more profitable metaheuristic-based online virtual network embedding
CN118521139A (en) System resource demand planning method and system based on artificial intelligence
CN112256422B (en) Heterogeneous platform task scheduling method and system based on Q-learning
Wang et al. DeepNetQoE: Self-adaptive QoE optimization framework of deep networks
CN113747500B (en) Energy-efficient and low-latency workflow application migration method based on generative adversarial network in complex heterogeneous mobile edge computing
Zhao et al. Reinforcement learning for resource mapping in 5G network slicing
CN112231117A (en) Cloud robot service selection method and system based on dynamic vector hybrid genetic algorithm
CN113887691B (en) Whale evolution system and method for service composition problem
Zhao et al. Energy-efficient partial offloading in mobile edge computing under a deadline constraint
CN119005293A (en) Knowledge distillation optimization method for self-adaptive noise sample guidance in end cloud collaborative environment
CN113221051A (en) Web service combination optimization method based on improved crow search algorithm
CN114860428B (en) A multi-cloud application deployment method based on Seq2Seq model
CN116405385A (en) Multi-thread virtual network mapping and performance adjusting method based on entropy weight method
CN109347900A (en) Adaptive evolution method of cloud service system based on improved wolf pack algorithm
CN115756646A (en) An optimization method for edge computing task offloading based on industrial internet

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Teng Xuyang

Inventor after: Zheng Tao

Inventor after: Luo Yuanhao

Inventor after: Zhang Xuguang

Inventor before: Luo Yuanhao

Inventor before: Teng Xuyang

Inventor before: Zheng Tao

Inventor before: Zhang Xuguang

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220916