Background technology: Web service finds it is that (Service-Oriented Computing, one of key issue in SOC) has two types of main method: based on the traditional grammar level with based on semantic reasoning to service-oriented computing at present.The former is representative with UDDI, but owing to only support the keyword coupling, the service matching precision is often not high.The latter then is that Web service combines with semantic net to produce; It can extract and utilize the semantic information of description Web service and mate according to the services request contract that the user provides; And then find satisfactory service, improved precision ratio, recall ratio and the automaticity of service discovery to a certain extent.At present, people have proposed many service discovery methods based on semanteme
[1-8], but not enough below the ubiquity:
(1) existing method is followed the service matching principle in the document [1] mostly, and promptly a service describing P and a user ask to describe the R successful match, and and if only if satisfies: 1. P can provide all outputs of R; 2. R can provide all inputs of P.But because this principle is too strict, the many services that cause satisfying customer requirements are eliminated.Although document [9] has proposed expansion WSDL and solved this problem with the supporting interface dependence, the precision of service matching is still not high in some cases, and algorithm still has bigger room for improvement.
(2) mainly comprise the function match and the quality matches of service based on the Web service matching process of semanteme; And the matching degree of the research of service function matching algorithm mainly to be matching degree between the notion of the domain body through calculate describing service judge service, thereby the service matching problem converted into the computational problem of similarity computational problem between the Ontological concept or Ontological concept matching degree.These class methods often provide the matching degree between single atomic service and the simple services request, often can't accurately mate for the services request of complicacy.
(3) existing method is treated the input and output parameter of service by the principle of par; Do not consider service requester; Service output has prior meaning; Service requester has the control of different weights to the import of services parameter, and this causes the service matching precision not high to a certain extent.
[1]Pathak?J,Koulr?N,Garagea?D,et?al.A?framework?for?semantic?web?service?discovery[C]//Proc?of?the?7th?Annual?ACM?International?Workshop?on?Web?Information?and?Data?management.2005.45-50.
[2]Garofalakis?J,Panagis?Y,Sakkopoulos,et?al.Web?service?discovery?mechanisms:looking?for?a?needle?in?a?Haystack.http://www.ht04.org/workshops/WebEngineering/HT04WE-Garofalakis.pdf,2007.
[3]Xu?Z,Martin?P,Powley?W,Zulkernine?F.Reputation-enhanced?QoS-based?web?services?discovery[C]//Proc.of?the?International?Conference?on?Web?Service.Salt?Lake?City,Utah,USA,2007:249-25.
[4]Wang?X,Vitvar?T,Kerrigan?M,Toma?I.A?QoS-aware?selection?model?for?semantic?Web?services[C]//Proc.ofthe?4th?International?Conference?on?Service-Oriented?Computing.Chicago,USA,2006:12-24.
[5]Paliwal?A,Adam?N,Bornh?C.Web?service?discovery:adding?semantics?through?service?request?expansion?and?latent?semantic?indexing[C]//Proc.of?the?International?Conference?on?Services?Computing.Vienna,Austria,2007:106-113.
[6] Wan Changlin, Shi Zhongzhi, Hu Hong magnifies roc. and the Semantic Web Services QoS based on body describes and finds. computer research and development, 2011,48 (6): 1059-1066.
[7] Ye Lei opens refined. based on the Web service discover method of functional semantics. and computer research and development, 2007,44 (8): 1357-1364.
[8] Liu Zhizhong, Wang Huaimin, week is refined. and a kind of semantic service of double-deck P2P structure is found model. software journal, 2007,18 (8): 1922-1932.
[9] Deng Shuiguang, Yin Jianwei, Li Ying, Wu Jian, Wu Chaohui. based on the semantic Web service finding method of bipartite graph matching. Chinese journal of computers, 2008,31 (8): 1364-1375.
Summary of the invention: innovative point of the present invention is to allow the user service output parameter to be set to the dependence of input parameter and coupling weight that input interface and output interface are set in services request in the service matching degree calculates; The services request of a complicacy is decomposed into the sub-services request sequence of simple single output, many inputs; Be then each sub-services request search can with the advertising service combination chain of its coupling; Thereby service matching is generalized to the situation that the complex services request needs a plurality of advertising service cooperations to accomplish; Overcome above deficiency, enlarged the service scope of application.
Technical scheme of the present invention is described below:
The interface dependence is meant the dependence of output interface to input interface.An output of given operation can obtain the input set that this output relies on through the interface dependence.For an operation,, when then this service is called in explanation,, must comprise i in the input set that the user provides in order to obtain this output of o if an input i is relied on by an output o.
An advertising service P is a five-tuple P={n, d, I
p, O
p, F
p.Wherein, n is the title of this service; D is the textual description information of this service; I
pBe to call the input parameter collection that this service must be satisfied; O
pIt is the output parameter collection of this service;
The interface of representing this service relies on function, promptly for
Represent the input collection that this output relies on.
A services request R is a five-tuple
Wherein, I
rIt is the input parameter collection that the user provides; O
rIt is the output parameter collection that user expectation obtains;
Be that the interface that this request is described relies on function, promptly for
Represent the input collection that this output relies on; W is the weighing factor collection of input parameter to output parameter, satisfies | W|=|O
r|, and for
Be the service matching threshold value, and
Can be described as sim:C * C → [0,1] on the notion semantic similarity functional form.Wherein, C representes the set of all notions in the domain body; Promptly for any concept set C ' in this field; There is
notion semantic similarity big more, similar more between the expression notion.
Given advertising service P={n, d, I
p, O
p, F
pAnd services request
If the similarity (matching degree) between P and the R
Claim that then but P is the match service of R.
Be provided with two Ontological concept collection C={c
1, c
2..., c
nAnd C '=c '
1, c '
2..., c '
m, n≤m wherein.If there be the injection f of C, make to C '
Maximum claims that then this group injection collection is the optimum matching collection, and note is made BM, and
<c
t, f (c
t)>∈ BM.
Provide the calculating formula of output interface optimum matching degree and input interface optimum matching degree below respectively.
The calculating formula of output interface optimum matching degree is:
1≤j in the following formula≤| O
p|, | O
r|≤| O
p|.
If
With O
pIn
There is maximum notion semantic similarity, and
Then the calculating formula of input interface optimum matching degree is:
In the following formula
| I
r' |<| I
pAlthough ' | the output of expression services request
Output with advertising service
There is maximum semantic similarity, but
The number of the input collection that is relied on is less than
The number of the input collection that is relied on, be not regarded as 0 with its matching degree this moment.
Provide service matching degree sim (P, calculating formula R) below.
In the following formula;
x and y are respectively the weights of input interface matching degree and output interface matching degree; Because it is more meaningful than input that the user it is generally acknowledged output; So y>=x, and x+y=1.
Sub-services request R ' is a tlv triple R '={ o
r', I
r', W ' }.Wherein, o
r' be a certain output parameter that user expectation obtains, i.e. o
r' ∈ O
rI
r' be o
r' input parameter the collection that relied on, i.e. I
r'=F
r(o
r'); W ' is o
r' dependence I
r' weight sets, promptly
For the notion in the domain body to c
iAnd c
j, if c
iAnd c
jBetween be " equivalenceClass " or " sameAsOf " relation, then claim c
iAnd c
jEquate, be designated as c
i=c
jIf c
iAnd c
jBetween be " subClassOf " relation, then claim c
iComprise c
j, be designated as
For concept set C
1And C
2, if for
Make c
i=c
jOr
Then claim C
2Semanteme comprises C
1, be designated as
If
And
Then claim C
1And C
2Semantic equating, be designated as C
1=C
2
For sub-services request R ' and service advertisement P; Then claim to have the inlet semantic matches if satisfy
and
, be designated as R ' ← P from sub-services request R ' to advertising service P; If
and
then claims the outlet semantic matches from advertising service P to sub-services request R ' existence, be designated as P ← R '.
For advertising service P
iAnd P
j, if satisfy
Then claim P
iAnd P
jBe capable of being combined, note is made P
i← P
j, P wherein
iBe P
jThe forerunner, P
jBe P
iFollow-up.
Be provided with sub-services request R ' and advertising service sequence P
1..., P
n, if satisfy condition: 1. R ' ← P
1, any two adjacent advertising service P in the 2. advertising service sequence
iAnd P
I+1All satisfy P
i← P
I+1(1≤i<n), 3. P
n← R ' claims that then this advertising service sequence is the service chaining of sub-services request R '.
If certain services request R can be decomposed into R '
1..., R '
nN sub-service request altogether is if exist corresponding service chaining sequence L
1..., L
n, make L={L
1..., L
n, the matching degree of services request R and service chaining collection L can be calculated as follows so:
Given advertising service chain collection L and services request R are if the similarity (matching degree)
between L and the R claims that then service chaining collection L and R can mate.
If sub-services request R '
iService chaining L
iHead note make L
i.head, the afterbody note is made L
i.tail, can get L according to above definition
i.head be and sub-services request R '
iThe advertising service of outlet semantic matches, L
i.tail be and sub-services request R '
iThe advertising service of inlet semantic matches, then sub-services request R '
iWith service chaining L
iMatching degree can be calculated as follows:
sim(R′
i,L
i)=y×S
output(R′
i.output,L
i.head.O
p)+x×S
input(L
i.tail.I
p,R′
i.I
r′)(5)
Based on above theoretical analysis, given advertising service sequence PS={P
1...., P
n, the request service
The weight of input interface matching degree and output interface matching degree is respectively x and y, and the inventive method may further comprise the steps:
Step 1 adds the DependOn attribute in the Process.owl of OWL-S module, make the statement of its supporting interface dependence;
Step 2 is provided with L
0Be sky;
It is 0 that step 3 is provided with sumfitvalue;
Step 4 is called following services request decomposition algorithm RequestResolving (R), and all sub-services are added to L
0
Step 5 is for L
0In each sub-services R '
i, call following sub-services request and service chaining matching algorithm ServiceListMatching (PS, R '
i), and with return results and sumfitvalue addition, compose again and give sumfitvalue;
Step 6 if
Advertising service chain collection L then
0Can mate with R.
Services request decomposition algorithm RequestResolving is described below:
(1) input: services request
(2) output: the sub-services collection after the decomposition;
(3) set R '=null; // initialization sub-services
(4) set L=null; // initialization sub-services collection
(5)
(6)
// output parameter of sub-services is set
(7)
// the input parameter collection of sub-services is set
(8) set R ' .W '=R.W
i// weight sets of the output of sub-services to input dependence be set
(9) L.add (R '); // add sub-services to concentrate to sub-services
(10)end?for
(11)return?L;
Sub-services request and service chaining matching algorithm ServiceListMatching are described below:
(1) input: PS={P
1..., P
n, R '={ o
r', I
r', W ' }, x and y;
// input advertising service collection, sub-services request, input interface weight and output interface weight
(2) output: the matching degree of sub-services request and service chaining;
(3) setL
1, L
2=null; // initialization service chaining
(4)set?P′=null;
(5) set maxfitvalue=0; // initialization matching degree
(6)for?all?P
i?in?PS?do
(7) if (P
i← R ') then//judgement advertising service P
iTo sub-services request R ' to whether there being the outlet semantic matches
(8) set P '=P
i// preservation advertising service
(9) L
1.add (P
i); // with adding in the service chaining with the advertising service of sub-services request outlet semantic matches
(10)for?all?P
j?in?PS?do
(11) if (R ' ← P
j) then//judgement sub-services request R ' is to advertising service P
jExistence inlet semantic matches whether
(12) L
1.add (P
j); // with adding in the service chaining with the advertising service of sub-services request inlet semantic matches
(13)break;
(14)end?if
(15) if
(P j ← P i )Then // judgement P
iWhether be P
iThe forerunner
(16) L
1.add (P
j); // forerunner is added advertising service in service chaining
(17)end?if
(18)end?for
(19)if(maxfitvalue>(y×S
output(R′
.output,L
1.head.O
p)+x×S
input(L
1.tail.I
p,R′.I
r′)))then
(20) set maxfitvalue=y * S
Output(R '
.output, L
1.head.O
p)+x * S
Input(L
1.tail.I
p, R ' .I
r'); // preservation maximum match degree
(21) setL
2=L
1// preservation has the service chaining of maximum match degree
(22)end?if
(23)end?if
(24)end?for
(25) return maxfitvalue; // return the maximum match degree