Research Article

A Cluster and Process Collaboration-Aware Method to Achieve Service Substitution in Cloud Service Processes

Algorithm 2

ServiceVector_Generate (CSCP).
Input: services and service clusters in CSCP;
 Output: vectors for the services and service clusters
(1)Construct two corpus CP1 and CP2;
(2)CP1 = CP2 = Φ;
(3)For each cloud service S in CSCP
(4) Obtain the sentence send in S.D.Ft and CP1 = CP1 ∪ {Send};
(5)End for
(6)For each service net SN in SNP
(7) ps = PathString_Generate (SN);
(8) Delete the symbol || and ⊗ from ps
(9) CP2 = CP2∪{ps};
(10)End for
(11)For each cloud service S and service cluster SC in CSCP
(12) Train word vector S.WOp and S.WTh for the word in S.D.Op and S.D.Th by CP1;
(13) Train word vector SC.WOp and SC.WTh for the word in SC.D.Op and SC.D.Th by CP1;
(14) Train service vector PS for S by CP2;
(15)End for
(16)Return (S.WOp, S.WTh, SC.WOp, SC.WTh and PS);