Web服务组合使得开发人员可以快速地创建自己的应用程序.但是,随着Internet上可用的Web服务数目的增加,Web服务组合是一项高度复杂的任务.针对语义Web服务的自动组合问题,提出了一种既考虑服务输入腧出又考虑服务行为约束的自动组合方法.首先,注册服务被转化为一组Horn子句形规则,用户的输入和输出请求分别被转化为Horn子句中的事实和目标,从而将寻找满足用户输入/输出请求的合成服务问题转化为Horn子句的逻辑推理问题;然后,用Petri网来为该Horn子句集建模,T-不变量技术被用来判定是否存在满足用户输入/输出请求的合成服务:最后给出了两种算法来获取既满足用户输入/输出请求又满足用户行为约束的合成服务的Petri网模型.
Web service composition allows developers to create applications rapidly. But due to the tremendous growth in the number of Web services available, the Web service composition problem is still a challenging research issue. This paper introduces an automatic Web service composition method which considers both services' input/output type compatibility and behavioral constraint compatibility. The services available are translated into a set of Horn clause-like rules. User's input and output requirements are modeled as a set of facts and a goal statement in the Horn clauses respectively. Then Petri net is chosen to model the Horn clause set and T-invariant technique is used to determine the existence of composite services fulfilling the user's input/output requirements. Two algorithms are presented for obtaining the Petri net models of the composite Web services which satisfy not only the user's input/output requirements but also the user's behavioral constraints.