Immune algorithm for selecting optimum services in Web services composition

5
WUJNS Wuhan University Journal of Natural Sciences Vo1.11 No. 1 2006 221-225 Article ID: 1007-1202(2006)01-0221-05 Immune Algorithm for Selecting Optimum Services in Web Services Composition [] GAO Yan, NA Jun, ZHANG Bint, YANG Lei, GONG Qiang, DAI Yu College of Information Science and Engineering, Northeastern University, Shenyang, 110004, l.iaoning, China Abstract : For the problem of dynamic optimization in Web services composition, this paper presents a novel approach for selecting optimum Web services, which is based on the ion gest path method of weighted multistage graph. We propose and implement an Immune Algorithm for global optimization to construct composed Web services. Results of the experi- mentation illustrates that the algorithm in this paper has a powerful capability and can greatly improve the efficiency and veracity in service selection. Key words: Web services composition; optimum selection; Immune Algorithm CLC number: TP 393 Received date: 2005-04-09 Foundation item: Supported by the National Key Technologies Re search and Development Program in the 10th Five-Year Plan of China (2004BA721A05) Biography: GAO Yan (I970--), male, l.ecturer, Ph. D. candidate, research direction : Web services, semantic Web. E-math gaoyan(~ necmail, neu. edu. cn 1"To whom correspondence should be addressed. E-mail: zhangbin(~ mail. neu. edu. cn 0 Introduction I n recent years, a growing number of Web Services (WSs) have emerged as the Internet develops at a fast rate. The Web is now evolving into a distributed device of computation from a collection of information resources ES. But individual Web services usually cannot satisfy some customers' require- ments, so we always need to integrate existing services to cre- ate new value-added composed services. The process model underlying a composite identifies the functionalities required by the services to be composed (i. e. , the tasks of the composite service) and their interactions (e. g., control-flow, data-flow, and transactional dependen- cies). Web services that are able to provide the required func- tionalities are then associated to the individual tasks of the composite services and invoked during each execution of the composite service. The number of services providing a given functionality may be large and constantly changing. Conse- quently, approaches where the development of composite serv- ices requires the identification at design-time of the exact serv- ices to be composed are inappropriate Eq. The runtime selec- tion of Web services during the execution of a composite serv- ice has been put forward as an approach to address this issue. Some researchers modeled this problem as a knapsack prob- lem E:q , and used linear programming ce3 , dynamic program- ruingE~'8 and integer programming E*2 to solve the problem. Also genetic algorithm was even chosen to optimize the process FS. However the character of "prematurity" obstructs the genetic algorithm from further improving, and it also makes us incapable of getting the best composite services. Therefore in this paper we propose an Immune Algorithm for global optimization to construct composed Web services. It 221

Transcript of Immune algorithm for selecting optimum services in Web services composition

WUJNS Wuhan University Journal of Natural Sciences

Vo1.11 No. 1 2006 221-225

Article ID: 1007-1202(2006)01-0221-05

Immune Algorithm for Selecting Optimum Services in Web Services Composition

[ ] GAO Yan, NA Jun, ZHANG Bin t, YANG Lei, GONG Qiang, DAI Yu College of Information Science and Engineering,

Northeastern University, Shenyang, 110004, l.iaoning, China

Abstract : For the problem of dynamic optimization in Web services composition, this paper presents a novel approach for selecting optimum Web services, which is based on the ion gest path method of weighted multistage graph. We propose and implement an Immune Algorithm for global optimization to construct composed Web services. Results of the experi- mentation illustrates that the algorithm in this paper has a powerful capability and can greatly improve the efficiency and veracity in service selection.

Key words: Web services composition; optimum selection; Immune Algorithm

CLC number: TP 393

Received date: 2005-04-09 Foundation item: Supported by the National Key Technologies Re search and Development Program in the 10th Five-Year Plan of China (2004BA721A05) Biography: GAO Yan (I970--), male, l.ecturer, Ph. D. candidate, research direction : Web services, semantic Web. E-math gaoyan(~ necmail, neu. edu. cn 1" To whom correspondence should be addressed. E-mail: zhangbin(~ mail. neu. edu. cn

0 Introduction

I n recent years, a growing number of Web Services (WSs) have emerged as the Internet develops at a fast rate. The

Web is now evolving into a distributed device of computation from a collection of information resources ES. But individual Web services usually cannot satisfy some customers' require- ments, so we always need to integrate existing services to cre- ate new value-added composed services.

The process model underlying a composite identifies the functionalities required by the services to be composed (i. e. , the tasks of the composite service) and their interactions (e. g. , control-flow, data-flow, and transactional dependen- cies). Web services that are able to provide the required func- tionalities are then associated to the individual tasks of the composite services and invoked during each execution of the composite service. The number of services providing a given functionality may be large and constantly changing. Conse- quently, approaches where the development of composite serv- ices requires the identification at design-time of the exact serv- ices to be composed are inappropriate Eq. The runtime selec- tion of Web services during the execution of a composite serv- ice has been put forward as an approach to address this issue. Some researchers modeled this problem as a knapsack prob- lem E:q , and used linear programming ce3 , dynamic program- ruing E~'8 and integer programming E*2 to solve the problem. Also genetic algorithm was even chosen to optimize the process FS. However the character of "prematurity" obstructs the genetic algorithm from further improving, and it also makes us incapable of getting the best composite services. Therefore in this paper we propose an Immune Algorithm for global optimization to construct composed Web services. It

221

overcomes the shortcomings of Genetic Algorithm, and achieves better converging speed and better searching ability.

Remainder of the paper is organized as follows: Sec- tion 1 introduces the problems of global optimization in Web services ~ composition. Section 2 describes the Im- mune Algorithm for global optimization to construct com- posite Web services. And experimental results are docu- mented in Section 3, Section 4 concludes the paper.

1 Problem of Global Optimization for Web Services Composition

In this paper, a composed Web service is a series of tasks that are tied together for accomplishing some specific tasks. These tasks just describe abstract services, i. e. they do not specify any concrete web services, in fact that they only describe the requirements for executing these Web services. Thus each abstract service must have several alternative Web services satisfying the requirements. There are two types of composite services depending on how many execution paths involved, they are: simple pipeline composition and complex composition. Simple pipeline is the simplest composite service structured with only one ex- ecution path. Complex composition has several execution paths and each path can be considered as a simple pipeline. A travel plan is shown in Fig. 1. The folk streaming from task al represents a condition choice.

Train booking

Legend: O start O task O end ~ join arc

Fig. 1 An example of a Web services eomlmsition

Based on the methods mentioned in Ref. E2-4~, we can divide a complex composition into several single pipe- lines, which makes optimization much easier. Figure 2 shows a pipeline path divided from Fig. 1. We first get the optimum execution plans for these single pipelines, then we aggregate these plans into an overall composition execu- tion plan, and this is the right optimum execution plan. In this paper we will especially discuss how to get the opti- mum execution plan of a single pipeline path.

Since the composite Web services are not related to any concrete Web service, we must make instantiation

222

before the composite services execution. Namely, we as- sign concrete Web services to the corresponding tasks, thus an execution plan is constructed. Since each task may have several candidate services and customers always expect to select best ones to perform the composite serv- ices following the constraints over them (such as the total cost should be less than 300 Yuan(RMB)). This raises the problem of using global optimization to select the best execution plan, i.e. how to select the most appropriate Web services dynamically to get the optimal execution plan satisfying customers ~ requirements.

al a2 a4 a5 Q

Calculate Flight Hotel Restaurant distance booking booking booking

Fig. 2 The pipeline path

In Fig. 2, each task has several alternative Web services belonging to it, which we replace each task with, and then we get a weighted multistage graph shown in Fig. 3.

Except start-point and end-point in the weighted multistage graph, each node refers to a candidate service and each edge has its weight. In this paper, we use QoS to evaluate Web services and the execution plan of com- posite services. The QoS of a Web service is computed using the following fomula.

O(s) = ~ W l " Scorei(s) (1) lEA

where: �9 Q(s) stands for the QoS value of service s com-

puting with the quality function Q; �9 Scorei (s) is an attribute scoring function Score

that, given the value of an attribute i of the service s, re- turns a positive number. A is the set of selection attrib- utes, such as execution time, execution price, reliability, availability and so on;

�9 w~ is the weight vo according to attribute i, which can be given by customers.

We use formula (1) to calculate QoS value for each web service, the higher OoS value it gets the better it is. We use the QoS value of target node to label each edge, which forms a weighted multistage graph. In such weighted multistage graph, each path represents an exe- cution plan of composite Web services. The overall QoS of execution plan Pj can be calculated by the following formula:

k

Qczt,(p2) = ~ Q ( & ) , l ~ j ~ r n (2) i - i

Fig. 3 Weighted multistage graph composed by all candidate services

where Q (si) is the quality value of web service i which selected by execution plan Pj , and m stands for the total number of the execution plans. Thus in this paper, we transform the problem of selecting optimal execution plan for composite Web services into the one of selecting the longest path in weighted multistage graphs. For the characteristics of Web services composition, the object function and the constraint condition of the problem for finding the longest path in weighted multistage graphs are defined as following:

k

Qcw(O) = maxQ:w(pj) = max~-~Q(si) l ~ j ~ m i 1

k

Value(a1 ) ~ D1 i--1

s.t. : al ,a2 ,a,, ~ SA k

Value(a,, ) ~ D,, i 1

(3) where Value(a,,) stands for the attribute value of at-

tribute a,,, such as the price attribute, whose attribute value is 100 Yuan, D,, stands for the global constraint ac- cording to attribute a,,, such as the global constraint is that the total price must less than 300 Yuan.

In order to accelerate the computing speed of selec- ting the longest path of a weighted multistage graph, we present an Immune Algorithm by which we can pick out the optimal execution plan with better speed.

2 The Immune Algorithm for Services Optimal Selection in Web Services Composition

2.1 The Execution Process of Immune Algorithm The Immune Algorithm (IA) overcomes classical

GA's shortcomings, succeeds in applying to optimization of combination, and gets better speed of converging and

more powerful searching ability than that of GA [6"73. The Immune Algorithm consists of several main

steps, the flow chart of Immune Algorithm is shown in Fig. 4 [83 .

Inputing antigen

Generating original antibody population

1. Calculating antibody affinity

Promoting or restraining antibody generation based on concentration

Use crossover and mutation operations to generate new antibody

[ Outputting result I

Fig. 4 The main steps of lrmnune Algorithm

2.2 Description of Immune Algorithm for Services optimal selection

In order to solve the problem of Web services' opti- mal selection in Web services composition, we propose an Immune Algorithm described as follows:

�9 Inputting antigen. We use formula (3) as anti- gen.

�9 Generating the original antibody population. The antibodies that represent the execution plans are defined

as : Antibody= { SII S12 ~176 Sli I ~176 ] Snl Sn2 ~176 Sn, n }, where n

represents the total stages except the start-point and the end-point in the weight multistage graph, i and m refer to the respective number of the nodes (i. e. Web service) at each stage. S .... represents node m at stage n and its value set only includes 0 and 1, in which 0 represents the

223

service is not selected and 1 represents the service is se- lected. Note that there is no symbol " l " between two digits during the execution. Among S,1 S,z "'" S,~, there must be a S,a whose value is 1 and the rest values are 0. For Fig. 3, antibody {1000 001 10 010} represents the path { B, S11, $23, $41, $52, F}. We set the population size as N and generate the population at random.

�9 Calculating antibody's affinity. The affinity be-

tween antibody and antigen is evaluated by the fitness value. Formula (3) is a maximization problem with con- straints, and in order to apply it to the Immune Algo- rithm we must transform it first. Lets:

k

~1 (X) = D1 - ~ Value(a1) ,P1 (X) i = 1

1

1.1 *, (x~

k

~,(X)= D , - ~ V a l u e ( a , ) ,Pn (X) i = 1

1 1.1 ~.~x~

2 G ( X ) = (4) 1 + ( 0 .9 ) 0. l f ( X )

Then we can use formula (4) to transform formula (3) into a maximization problem with no constraints.

max F ( X ) = G ( X ) �9 P I ( X ) . . . . . P , ( X ) (5) where, P ( X ) is the punishment function, G(X) is the e- valuation function for quality of the solution. We define F ( X ) as the fitness function.

The affinity between antibodies shows the degree of their diversity by which we can get the multiformity of the population. We use Hamming Distance to calculate the affinity between two antibodies v, w. ayv,w =

I H~,~ I, where H~,w represents the Hamming Distance between antibody v and w. If ay~.~ = 1, it denotes that the two antibodies v and w are the same.

�9 Calculating antibodies' concentration. The con- centration of antibody v is defined as the proportion of the antibodies that are as same as v or similar to v. Concen- tration of antibody v is.

N 1

C ~ = ~ w ~ _ ac .... (6)

=~1,~ ay .... >~Tac where aCv

' [0 , otherwise Tac is a given threshold value. The antibody with

higher concentration will be selected in a lower probability.

�9 Crossover and mutation. Crossover and mutation are two methods of generating new antibodies. Due to the coding limitations, it needs some special treatments when doing crossover and mutation. Fig. 5 shows the methods of crossover and mutation.

I At={ looo olo o~ ool } A2:{ 0010': 100 l0 010 }

Crossover

AI'={ 1000 100 10 010 } A2'={ 0010 010 01 001 }

A3={ 1000 010 01 001 }

Mutation

A3'={ 0100 010 01 001 }

Fig. 5 Example of crossover and mutation

3 Experimentation

Generally, Cost and Time are two primary factors

that customers are concerned about ES?. In this paper we

will find out the execution plan with optimum time under

a given cost constraint. In this experimentation SA has

two attributes: cost and execution time. According to the

execution time attribute, let Scorer (S) = 1/execution- time. So the optimal execution plan must be satisfied the

following expressions: k

I Qcw(O) = m a x E 1/executiontimel k i=1 (7)

[ s.t. E cost ~ D i = 1

We consider a composed Web service with 10 tasks

and each task has 30 candidate services. The cost and ex-

ecution time of each Web service are generated at ran- dom. We calculate the minimum and maximum cost of each task, and then get the minimum cost Dmi. and the maximum cost Dm~x Of the composite services. Let D--

Dminq-~(D .... -Dmi, ) , where 2 is constraint factor and 0~<~<1, and apparently there are execution plans satis- fying the constraint. The closer ~ to 0, the stricter the constraint is E97. The result of comparing our algorithm

IA proposed in this paper with GA given by Ref. 1-51 is

shown in Fig. 6. We set 50 to antibody population, 0.01 to mutation probability, 1 to crossover probability, and

get average value by running 50 times. From Fig. 6 we

can get the conclusion that the algorithm IA proposed in

this paper has better speed of converging and searching than GA given by Ref. f-5], and it can get the global op-

timal execution plan in higher probability than that GA.

224

---I--- get optimal rcsuh probability of( iA

- - O - - get optimal result probabilily of IA

.= e..,

1200

1000

800

600

400

200

0 I I I I I

0.1 0.2 0.3 0.4 0.5

average ineration times' ofGA IA

---<>-- average incration limes of IA

I00 1 (a)

98

i 94

92

I

90 0.1 0.2 0.4 0.5 0.6 0.3

(b)

I

0.6

Fig. 6 Comparison between the two algorithms (a) Comparison of get optima[ result probability; (b) Comparison of average iteration times

4 Conclusion

For the problem of dynamic optimization in Web serv- ices composition, this paper presents a novel approach for selecting optimum Web services based on the longest path method of weighted multistage graph. And we propose and implement an Immune Algorithm for global optimization to construct composite Web services. Results of the experi- mentation illustrates that the algorithm in this paper has a powerful capability and can greatly improve the efficiency and veracity in service selection. It will accelerate the speed of service selection, and bring great benefit to the applica- tion of Web service composition.

There are two directions in our future work: one is to search for the method to improve the efficiency of crea- ting weighted multistage graph, and the other one is to establish a more reasonable and extensible model to eval- uate individual Web services and composite Web services.

References

[1] Arpinar I B, Aleman-Meza B, Zhang R, et al. ()nto[ogy- Driven Web Services Composition Platform. IEEE lnterna

tional Conference on E Commerce Technology (( 'EC'04),

San Diego, California, 2004.

E2~ Zeng I., Benatallah B, Dumas M, et al. Quality Driven Web

Services Composition. Proc 12th I n t ' l Conf World Wide

Web (WWW), New York:ACM Press, 2003.

[31 Yu T, I.in K. Service .Selection Algorithms for Web Services

with End-to-End QoS Constraints. IEEE International Con-

Jerence on E ( "1,ram,., ~ e Technology (CEC' 04 ), San Diego, California, 20()1. I2!) 136

[41 Zeng I., Benalallah IL Ngu A H H, etal. Qo~Aware Mid- dleware for Web Services Composition. IEEE Transactions

on So/Izcure Engineering, 2004,30(5) : 311-327. [51 Zhang I.. 15 IL Chao T, et al. Requirements Driven l)ynam-

ic Busim,~s Process Composition for Web Services Solutions.

Journal oj Grid Computing, 2004,2(2) :121-140.

[61 King R I., Russ S H , l.ambert A B, et al. Artificial lm-

mune System Model for Intelligent Agents. MSU/ N S F En-

gineering Research Cent J))r Computational Field Simula-

tion Source: Future Generation Computer Systems. San Die- go: Elsevier Science, 2001. 335-343.

[7] Jiao L, Du H. Development and Prospect of the Artificial Immune System. Acta Electronica Sinica, 2003,31 (10) : 1540-1549 (Ch).

[8~ Meshref H, Van I.andingham H. Artificial Immune Sys7 terns: Application to Autonomous Agents, Systems, Man,

and Cybernetics, 2000 IEEE International t;on[erence,

2000,1.-61 66. ~9~ Gao Jian. Study of QoS Routing Algorithms Based on Im-

mune Mechanism and Genetic Algorithms. Microelectronics

& Computer, 2003,8:20-21 (Ch).

[]

225