CN113887691B - Whale evolution system and method for service combination problem - Google Patents
Whale evolution system and method for service combination problem Download PDFInfo
- 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 combination
- service
- algorithm
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 241000283153 Cetacea Species 0.000 title claims abstract description 18
- 238000005457 optimization Methods 0.000 claims abstract description 35
- 230000006399 behavior Effects 0.000 claims description 20
- 230000014509 gene expression Effects 0.000 claims description 20
- 108091026890 Coding region Proteins 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 235000006679 Mentha X verticillata Nutrition 0.000 claims description 4
- 235000002899 Mentha suaveolens Nutrition 0.000 claims description 4
- 235000001636 Mentha x rotundifolia Nutrition 0.000 claims description 4
- 230000009471 action Effects 0.000 claims description 4
- 230000003542 behavioural effect Effects 0.000 claims description 4
- 230000007423 decrease Effects 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 4
- 238000012360 testing method Methods 0.000 claims description 4
- 230000009466 transformation Effects 0.000 claims description 4
- 238000010606 normalization Methods 0.000 claims description 2
- 239000003795 chemical substances by application Substances 0.000 description 47
- 239000000203 mixture Substances 0.000 description 15
- 238000011156 evaluation Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000002131 composite material Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000000344 soap Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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
The invention discloses a whale evolution method and a whale evolution system for service combination problem, wherein the method comprises the following steps: step 1: converting a web service combination problem into a single-target optimization problem, and establishing a fitness function; and 2, step: 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; step 6: and finishing the search, and outputting the coded sequence of the optimal service combination searched and the QoS value of the optimal web service combination at the moment. When the order of magnitude of the service combination sequence reaches a certain scale, the optimal value of the optimal service combination compared with a random search method is obviously improved by adopting the method for solving the optimal service combination, and the optimal value is higher than that of a traversal search method, so that the method is in accordance with the characteristic requirements of reliability and instantaneity in the web service combination optimization problem, and provides high-quality combination service.
Description
Technical Field
The invention relates to application of a whale optimization algorithm in a Web service combination problem, in particular to a whale evolution system and method for the service combination problem.
Background
Under the current development of information technology, the Web service combination problem becomes one of the hot spots of the current information technology application. Web services are software modules with self-describing and self-contained functionality that are implemented over the internet, can publish, locate, and use functionality over the internet using a set of standards, such as SOAP, WSDL, and UDDI. Such software modules perform tasks, solve problems, process transactions, etc., on behalf of a user or application. In most cases, users often need to use a range of service combinations to achieve their own goals. When a user creates a Web Service combination using different types of Web sub-services, there are usually multiple candidate services with the same function under one category, and due to the current huge number of Web services, thousands of function modules with different QoS (Quality-of-Service) are often included in the modules capable of realizing the same function. Therefore, how to select the sub-service combination with the best quality from the numerous Web service candidate sets is a problem to be solved. The high-quality Web service combination should include features of short response time, low cost, high reliability, good availability, etc., which are conventional evaluation criteria QoS of Web services.
QoS is an important method for evaluating network function services, and includes various evaluation criteria. From the service attributes, the service attributes can be basically divided into two categories of positive attributes and negative attributes, wherein the positive attributes are better when the score is higher, and the negative attributes are opposite. Wherein success rate, reliability, throughput rate, etc. are assigned to positive attributes, while response time, service price, etc. are assigned to negative attributes. Rather than focusing on a single aspect, evaluation of web services often requires a combination of positive and negative attributes.
Further illustrating the web service composition structure flow. According to the actual scene division, the common web service combined flow combined workflow can be divided into a sequence, a concurrence, a selection and a cycle structure, and according to different service attributes, the data processing modes under different workflow modes can be distinguished.
This is a Web service composition problem description. For a large-scale candidate service set, if each target combination has n types of abstract service categories, and each type is composed of m concrete candidate Web services, the number of all possible combinations is m n And (4) respectively. This is a typical NP-hard problem. The group intelligent optimization algorithm can better solve the problems, can find the service combination close to the optimal scheme under the condition of not traversing all possible solutions, and is an efficient solution to the problems on the premise of balancing computing power and a target. Aiming at the targets and requirements, the Web service combination problem is converted into a Qos-constrained multi-target Web service combination optimization problem, a whale algorithm WOA (white optimization algorithm) is utilized to simultaneously optimize a plurality of target parameters, and finally, an optimal solution of a group of Web service combinations is dynamically selected.
Whale optimization algorithm WOA is a new group intelligence algorithm proposed by Mirjalili and Lewis in 2016. The algorithm constructs a group intelligent optimization algorithm by simulating spiral motion and bubble net hunting behaviors of whale groups in the process of hunting hunters. The WOA optimization principle is classified into the following three categories: surround behavior, hunting behavior, search behavior. As a novel optimization algorithm, the WOA has the advantages of simple structure, few adjusting parameters, easiness in realization, high operation speed and the like, and experiments prove that the WOA can be better applied to the field.
For the WOA algorithm, no model has been generated for application to the service composition problem at present. In the model applied to the service composition problem using the group intelligence algorithm, it is most difficult to balance both the optimization speed and the optimum value: the speed of the optimization is fast but the optimum value of the search is poor and vice versa.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a whale evolution system facing the service combination problem. The invention adopts a Whale Optimization Algorithm (WOA), the optimization environment under the condition of more target interference is considered, and the algorithm is sensitive to the condition that the algorithm is easy to fall into local optimum. Therefore, the method has good target optimization efficiency in a multimodal environment, and is suitable for optimization of Web service composition problems. Because the coordinate values of the dimensions of the search agent in the WOA algorithm are continuous, and the numbers of the specific candidate services constituting the service combination are discrete, in practical application, the coordinate values of the dimensions of the search agent need to be converted into corresponding integer codes by using a fuzzy function for solving.
In order to achieve the technical purpose, the invention adopts the following technical scheme:
the whale evolution method for the service combination problem comprises 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;
step 6: and finishing the search, and outputting the coded sequence of the optimal service combination searched and the QoS value of the optimal web service combination at the moment.
Preferably, step 1 is specifically 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;
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, and R is stability, and belongs to the normalized QoS value of each service attribute of the web.
Preferably, step 2 is specifically 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 abstract service type in practical 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 denotes the upper search bound, generally equal to m d (ii) a lb represents the lower search bound and is typically constant at 1.
Preferably, step 3 is specifically 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:
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:
and (3) searching action: at the moment | A | > 1, 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)。
preferably, step 4 is specifically 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); coordinate values of respective dimensions of the search agent are expressed using a fuzzy function fd of equation (13)Converting the coordinates into corresponding integer values, updating the coordinates of the previous generation into integer type coordinates, and converting the dimensional coordinates of each search agent into corresponding integer type coding coordinates according to the 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 * ;
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; introduce the iff (P, u, v) function.
Preferably, step 5 is specifically as follows: updating random parameter variables l and P, wherein l is used for controlling the amplitude of the spiral motion and takes values between [ -1,1], and P is used for controlling position updating and is a random number between [0,1 ]; the values of the judgment parameters P, A are compared respectively to determine a position updating expression of the next generation search agent, and the position of the search agent is updated by equation (14).
Preferably, 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.
The invention also discloses a whale evolution system for the service combination problem, which comprises the following modules:
the fitness function establishing module is used for converting the web service combination problem into a single-target optimization problem and establishing a fitness function;
the integer coding module is used for carrying out integer coding on the web service combination problem;
the WOA algorithm model building module is used for building a WOA algorithm model;
the conversion module is used for carrying out integer type coding on the WOA algorithm and converting the WOA algorithm into the DWOA algorithm;
the optimizing module starts iterative optimization on the problem model by using a DWOA algorithm;
and the output module is used for finishing the search and outputting the optimal service combination coding sequence and the current optimal web service combination QoS value.
Further explaining the correspondence between the DWOA algorithm and the web service combination problem. The optimization objective function of the algorithm is a fitness function of the web combined service; each search agent coordinate of the algorithm corresponds to an integer service combination code of the problem model; each dimension coordinate of the search agent corresponds to various abstract services in the problem model; each dimension coordinate value of the search agent corresponds to a plurality of sub-services in the abstract service; the optimal search agent corresponds to the current optimal web service combination; the optimal fitness value corresponds to an optimal composite attribute value for the combination of web services.
Since in the model applied to the service composition problem using the group intelligence algorithm, it is mostly difficult to balance both the optimization speed and the optimum value: the speed of the optimization is fast but the optimum value of the search is poor and vice versa. The WOA algorithm adopted by the invention can better balance the two targets.
When the order of magnitude of the service combination sequence reaches a certain scale, the optimal value of the optimal service combination compared with a random search method is obviously improved by adopting the method for solving the optimal service combination, and the optimal value is higher than that of a traversal search method, so that the method is in accordance with the characteristic requirements of reliability and instantaneity in the web service combination optimization problem, and provides high-quality combination service.
Drawings
Fig. 1 shows a method for mapping a service combination sequence from concrete candidate services of various types of abstract services, which corresponds to a coding sequence in an algorithm. Where n represents different abstract service classes, mRepresenting the number of concrete candidate services in the abstract service class. Note that m is described in step 1 for convenience of tabulation d And is uniformly represented by m.
Fig. 2 is an example of a web composition service, which is a sequential web service composition workflow diagram. Each circle represents a single service, working from Start into service workflow T 1 Access to various types of services according to a workflow setting sequence and at T n After which the service workflow End is ended. In practical application, the user can select the required control flow structure by himself.
FIG. 3 is a block diagram of the whale evolution system of the invention facing the service composition problem.
FIG. 4 is a flow chart of the whale evolution method facing the service composition problem of the invention.
FIG. 5 is a flow diagram of the preferred embodiment service-oriented combinational DWOA.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 4-5, the embodiment is a whale evolution method oriented to the service composition problem. Since each workflow structure of the service composition can be converted into a sequential structure, the model is implemented according to the sequential structure shown in fig. 2, which is performed as follows:
step 1: and converting the web service combination problem into a single-target optimization problem, and establishing a fitness function. Firstly, the QoS values of different web service attributes are normalized through an equation (1), the sum of all the attribute values is calculated according to a sequence structure of a table 1, finally, the weight value of each service attribute is set according to a required optimization constraint condition, and the weight of each service attribute QoS value is distributed through an equation (2) to obtain a final fitness function.
TABLE 1 calculation of aggregation of QoS values
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, respectively. In the formula (2), T is response time, A is effectiveness, S is success rate, and R is stability, and belongs to normalized QoS values of all service attributes of the web.
Step 2: the web service composition problem is integer coded. Each web service combination is m selected from n types of abstract services d And arranging various abstract services under the sequential structure working flow to finally obtain a string of coding combinations. Wherein the transformation range of a single code is determined by the number of candidate services of each class of abstract service in actual conditions, and the value is from 1 to m d And are integers. Therefore, the search range of each dimension of the algorithm is determined by the actual coding range: ub denotes the upper search bound, generally equal to m d (ii) a lb represents the lower search bound and is typically constant at 1.
And step 3: and establishing a WOA algorithm model. Setting maximum iteration number T of algorithm max The initial iteration 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)
where X (j +1) is the next motion position of the current individual, j is the number of iterations, X * (j) Is the 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 Is two values of [0,1]]The convergence factor a decreases linearly from 2 to 0, and the expression is as follows:
hunting behavior: equation (8) is the distance between the ith individual and the optimal individual, and equation (9) is the bubble trapping 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 algorithm is realized by a random number P, and the expression is as follows:
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 remaining search individuals move thereto. 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)
And 4, step 4: the WOA algorithm is integer-type coded and converted into DWOA (discrete white Optimization algorithm) algorithm. Setting the number of search agents as n, wherein the value range of the coordinate of a certain dimension is 1-m d Is an integer of (1). And (3) converting each dimension coordinate value of the search agent into a corresponding integer value by using a fuzzy function fd in the formula (13), and updating the previous generation coordinate into an integer type coordinate, so as to convert each dimension coordinate of each search agent into a corresponding integer type coding coordinate according to the web service combination coding sequence. Clothing based on search agentThe service combination coding string is respectively substituted into the objective function to calculate the current fitness value of each search agent, and the position coordinate of the search agent with the best current fitness is compared and updated to be X * 。
Wherein x 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 integer of (1) above. The random variable Y is the test result of Bernoulli with the probability of 0.5, and the value of the iff (P, u, v) function depends on whether the proposition of P is true, if yes, u, otherwise v. The iff (P, u, v) function is introduced, the main reason is that the WOA algorithm can cause the coordinate of the search agent to exceed the boundary when in practical application, and the introduction of the function avoids the coordinate of the search agent being coded into illegal codes after the coordinate exceeds the boundary.
And 5: and 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 ]. The values of the judgment parameters P, A are compared respectively to determine a position updating expression of the next generation search agent, and the position of the search agent is updated by equation (14).
Step 6: and updating the iteration times t. And 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.
Example 2
As shown in fig. 3, the whale evolution system facing the service composition problem of the embodiment includes the following modules:
a fitness function establishing module: and converting the web service combination problem into a single-target optimization problem, and establishing a fitness function. Firstly, the QoS values of different web service attributes are normalized through an equation (1), the sum of all the attribute values is calculated according to a sequence structure of a table 1, finally, the weight value of each service attribute is set according to a required optimization constraint condition, and the weight of each service attribute QoS value is distributed through an equation (2) to obtain a final fitness function.
TABLE 1 calculation of aggregation of QoS values
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, respectively. In the formula (2), T is response time, A is effectiveness, S is success rate, and R is stability, and belongs to the normalized QoS value of each service attribute of the web.
An integer type encoding module: the web service composition problem is integer coded. Each web service combination is m selected from n types of abstract services d And arranging various abstract services under the sequential structure working flow to finally obtain a string of coding combinations. Wherein the transformation range of a single code is determined by the number of candidate services of each class of abstract service in actual conditions, and the value is from 1 to m d And are integers. Therefore, the search range of each dimension of the algorithm is determined by the actual coding range: ub denotes the upper search bound, generally equal to m d (ii) a lb represents the lower search bound and is typically constant at 1.
A WOA algorithm model building module: and establishing a WOA algorithm model. Setting the maximum iteration number T of the algorithm max The initial iteration 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)
where X (j +1) is the next motion position of the current individual, j is the number of iterations, X * (j) Is the optimal individual position for each generation. The expressions of A and C are as follows:
A=2a·r a -a (5)
C=2vr c (6)
wherein r is a And r c Is two values of [0,1]]The convergence factor a decreases linearly from 2 to 0, and the expression is as follows:
hunting behaviors: equation (8) is the distance between the ith individual and the optimal individual, and equation (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 algorithm is realized by a random number P, and the expression is as follows:
and (3) searching action: at the moment | A | > 1, the algorithm selects a random individual X rand As a target, the remaining search individuals move thereto. Equation (11) is the search behavior of the search agent, and equation (12) is between the ith individual and the random individual selected by the agentDistance.
X(j+1)=X rand (j)-A·D (11)
D=|C·X rand (j)-X(j)| (12)
A conversion module: the WOA algorithm is integer-type coded and converted into DWOA (discrete white Optimization algorithm) algorithm. Setting the number of search agents as n, wherein the value range of the coordinate of a certain dimension is 1-m d Is an integer of (2). And (3) converting each dimension coordinate value of the search agent into a corresponding integer value by using a fuzzy function fd in the formula (13), and updating the previous generation coordinate into an integer type coordinate, so as to convert each dimension coordinate of each search agent into a corresponding integer type coding coordinate according to the web service combination coding sequence. According to the service combination coding string of the search agent, respectively substituting into the objective function to calculate the current fitness value of each search agent, comparing and updating the position coordinate of the search agent with the best current fitness as X * 。
Wherein x t i,d Is the coordinate value of the tth generation of the search agent i in the d-th dimension, z is [1, m ] d ]The integer of (1) above. The random variable Y is a Bernoulli test result with the probability of 0.5, and the value of the iff (P, u, v) function depends on whether the P proposition is true, if so, u, and if not, v. The iff (P, u, v) function is introduced, the main reason is that the WOA algorithm can cause the coordinate of the search agent to exceed the boundary when in practical application, and the introduction of the function avoids the coordinate of the search agent being coded into illegal codes after the coordinate exceeds the boundary.
An optimizing module: and 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 ]. The values of the judgment parameters P, A are compared respectively to determine a position updating expression of the next generation search agent, and the position of the search agent is updated by equation (14).
An output module: and 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 WOA algorithm model building module for processing; 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.
It should be noted that the present invention is not limited to the above-mentioned specific embodiments, such as the selection of the service evaluation criteria, the weight ratio setting of the fitness function, etc., and those skilled in the art can make various changes or modifications within the scope of the claims without affecting the essence 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;
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:
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:
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 * ;
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);
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.
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 combination 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 combination 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 combination problem |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113887691B (en) |
Citations (4)
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)
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 of the cloud manufacturing resource allocation based on modified whale algorithm |
CN111047040A (en) * | 2019-12-16 | 2020-04-21 | 南京航空航天大学 | Web service combination method based on IFPA algorithm |
CN112036296B (en) * | 2020-08-28 | 2022-08-05 | 合肥工业大学 | Motor bearing fault diagnosis method based on generalized S transformation and WOA-SVM |
AU2020103826A4 (en) * | 2020-12-01 | 2021-02-11 | Dalian University | Whale dna sequence optimization method based on harmony search (hs) |
-
2021
- 2021-08-24 CN CN202110974119.9A patent/CN113887691B/en not_active Expired - Fee Related
Patent Citations (4)
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 |
---|---|---|
CN109818775B (en) | Short-term network flow prediction method | |
CN114385376B (en) | Client selection method for federal learning of lower edge side of heterogeneous data | |
CN113778683B (en) | Handle identification system analysis load balancing method based on neural network | |
CN110120888B (en) | Cloud crowdsourcing platform mass service resource combination optimization method and system | |
CN107016077A (en) | A kind of optimization method of web oriented Services Composition | |
CN111047040A (en) | Web service combination method based on IFPA algorithm | |
CN103824127B (en) | Service self-adaptive combinatorial optimization method under cloud computing environment | |
CN114461368A (en) | Multi-target cloud workflow scheduling method based on cooperative fruit fly algorithm | |
CN110971683B (en) | Service combination method based on reinforcement learning | |
CN115879542A (en) | Federal learning method oriented to non-independent same-distribution heterogeneous data | |
CN112511346A (en) | Web service combination method based on credibility screening | |
Zhao et al. | Reinforcement learning for resource mapping in 5G network slicing | |
Li et al. | Application deployment in mobile edge computing environment based on microservice chain | |
CN113887691B (en) | Whale evolution system and method for service combination problem | |
CN111027665A (en) | Cloud manufacturing scheduling method based on improved chaotic bat swarm algorithm | |
CN114154685A (en) | Electric energy data scheduling method in smart power grid | |
CN106357437B (en) | A kind of Web Service QoS prediction technique based on multivariate time series | |
CN111258743A (en) | Cloud task scheduling method, device, equipment and storage medium based on discrete coding | |
CN109347900B (en) | Cloud service system self-adaptive evolution method based on improved wolf pack algorithm | |
Singhal et al. | Greedy Shapley Client Selection for Communication-Efficient Federated Learning | |
CN114980216A (en) | Dependent task unloading system and method based on mobile edge calculation | |
CN114327853A (en) | Low-cost user association and computation migration method facing complex tasks in cloud-side hybrid system | |
CN110163249B (en) | Base station classification identification method and system based on user parameter characteristics | |
CN113253229B (en) | Radar target recognition method and system | |
Huang et al. | Solving service selection problem based on a novel multi-objective artificial bees colony algorithm |
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 |
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 |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20220916 |
|
CF01 | Termination of patent right due to non-payment of annual fee |