CN103606042A - Service combination instance migration effectiveness judgment method based on dynamic dependency graph - Google Patents

Service combination instance migration effectiveness judgment method based on dynamic dependency graph Download PDF

Info

Publication number
CN103606042A
CN103606042A CN201310581404.XA CN201310581404A CN103606042A CN 103606042 A CN103606042 A CN 103606042A CN 201310581404 A CN201310581404 A CN 201310581404A CN 103606042 A CN103606042 A CN 103606042A
Authority
CN
China
Prior art keywords
movable
dependence
pddg
dynamic dependency
collection
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.)
Granted
Application number
CN201310581404.XA
Other languages
Chinese (zh)
Other versions
CN103606042B (en
Inventor
宋巍
陈先博
张功萱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201310581404.XA priority Critical patent/CN103606042B/en
Publication of CN103606042A publication Critical patent/CN103606042A/en
Application granted granted Critical
Publication of CN103606042B publication Critical patent/CN103606042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a service combination instance migration effectiveness judgment method based on an executed path dynamic dependency graph. A service combination before and after an evolution, and an executed path of an instance to be migrated act as input, and migration effectiveness judgment results act as output. Realization of the method comprises the following steps: dependency relationship among activities in the executed path of the instance to be migrated is analyzed, a dynamic dependency graph of the executed path is generated and a set of all reachable variable definitions reaching the end of the executed path is obtained; the dynamic dependency graph is reduced via a backward dynamic slicing method; a control flow graph of the service combination after the evolution is obtained; whether a topological ordering, which is an activity sequence of the service combination after the evolution, exists is judged on the basis of the control flow graph of the service combination after the evolution and the dynamic dependency graph after reduction, and if the topological ordering exists, migration effectiveness is met; or the migration effectiveness is not met. A false negative probably generated by utilizing a conventional method can be avoided by utilizing the method so that the dynamic evolution of the service combination is better supported.

Description

Services Composition instance migration availability deciding method based on dynamic dependency figure
Technical field
The present invention relates to service compute technical field, especially the judgement of Services Composition instance migration validity, in particular to a kind of Services Composition instance migration availability deciding method based on executed path dynamic dependency figure, be suitable for judging the example generating under the Services Composition procedure definition before evolution, not yet carry out end, can lower continuation of particular state definition that move to safely and effectively the Services Composition process after evolution carry out.
Background technology
Along with the development of distributed object technology and XML technology, Web service technology occurs thereupon and is tending towards ripe.Web service is the actual mechanism of the upper Data and Information integration of Web, and by adopting WSDL, standard and the agreement based on XML such as UDDI and SOAP, has solved the problems such as code reuse, heterogeneous distributed calculating, has that interoperability is strong, a loose coupling, the characteristic such as cross-platform.In order to guarantee the reusability of single service, single Web service granularity is unsuitable excessive, thereby when single simple services can not be met consumers' demand, will be by the service of plural function be effectively integrated by certain service describing and constraint, realize user-defined Services Composition, to provide value added service.Web service combination have level, extensibility, dynamically with the feature such as adaptivity, by reusing existing service, new service or the system of robotization ground generation, has greatly improved the production efficiency of software.
Because the market demand, technology innovation, rules change etc. reason causes the external environment condition of enterprise open changeable, business process model also will constantly develop thereupon.Based on respective service example combinations process model, that moving, can therefore be affected, need to be by stopping, restart and the means such as migration being carried out dynamic process.Method compared to the high consumption of other poor efficiencys, the dynamic migration of example has more dirigibility,, the service composition workflow example before a soon evolution is from original Work flow model current state, move under the Work flow model dbjective state after evolution, can guarantee the maximization of having worked.
For guaranteeing can to continue to carry out (its follow-up execution is consistent with an example behavior generating under Services Composition definition) according to the Services Composition process after developing after instance migration after evolution, we need to find a corresponding dbjective state consistent with example current state to be migrated in the Services Composition after evolution.If find so corresponding dbjective state, after instance migration, just can under this state, according to the Services Composition definition after developing, continue to carry out.Yet if will consider data mode (the current value of example correlated variables) in example state, the transportable property of example is undecidable.The undecidability of this problem makes us cannot find a computable sufficient and necessary condition to verify migration validity.Therefore, we can only find an adequate condition checking migration validity.
Existing method is fallen the data message of example is abstract mostly, thereby the control stream mode only based on example is carried out the judgement of instance migration validity.The transportable sex determination method of workflow instance based on process model behavior inheritance relation before and after developing that the representativeness work of these class methods has the people such as Aalst to propose, but the Work flow model that the method can not be processed before and after developing does not meet the situation of inheritance, so does not have generality.Aalst has also proposed a kind of workflow moving method that does not limit workflow Evolution type, the method is by the Work flow model before and after relatively changing, find out all regions that change that occurred in Work flow model, if workflow instance is not at region of variation, example allows to move under the corresponding states of the Work flow model after evolution.Therefore and be not suitable for the Services Composition dynamic evolution scene of data perception because these class methods are not considered the data mode of example.
Though have certain methods to consider data mode in example state, yet existing method is mostly too conservative, only has seldom instance migration to be regarded as effectively.Such as: the people such as Casati utilize " track reproduction " technology to judge the migration validity of Services Composition example, if the executed active sequences of an example can reappear under the process model developing, this instance migration is effective.The people such as Rinderle and Reichert has been incorporated into the concept of " track reproduction " in the method for ADEPT by name, the method has been done some processing to executed active sequences, delete the activity lacking in process after developing and only retained the performed activity of arriving of last circulation in loop structure, thereby obtain a track (being active sequences) after yojan, if the active sequences after this yojan can reappear under the Services Composition process after evolution, the migration of respective instance is effective.Although the method has been done some to initial " track reproduction " technology, loosen, the not data independence between consideration activity, so the method is still comparatively conservative.
Summary of the invention
The defect or the deficiency that for prior art, exist, the present invention aims to provide a kind of Services Composition instance migration availability deciding method based on dynamic dependency figure, be suitable for judging the example generating under the Services Composition procedure definition before evolution, not yet carry out end, can the lower continuation of particular state definition that move to safely and effectively the Services Composition process after evolution be carried out, can avoid more issuable false negatives of classic method (false negative), thereby can allow more example move, better support the dynamic evolution of Services Composition.
For reaching above-mentioned purpose, the technical solution adopted in the present invention is as follows:
A Services Composition instance migration availability deciding method based on dynamic dependency figure, take Services Composition before and after developing and the executed path of example to be migrated is input, the migration availability deciding result of example to be migrated of take is output, comprises the following steps:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate the dynamic dependency figure in this executed path, be the dynamic dependency figure of example to be migrated, and obtain all set that reach variable-definition (reaching definitions of variables) that arrive executed path end;
Step 2, yojan dynamic dependency figure: by the method for Dynamic Slicing backward, delete instance migration is not had to influential activity and corresponding dependence edge thereof;
Step 3, the Services Composition after developing is used to the controlled flow graph of control flow analysis method; And
The control flow graph of step 4, the Services Composition based on after developing and the dynamic dependency figure after example yojan to be migrated, whether judge under the dynamic dependency figure after yojan exists a topological sorting (being active sequences) under the Services Composition after evolution, to reappear, judging whether to exist a topological sorting is an active sequences of Services Composition after developing, if existed, the validity of migration is met, otherwise does not meet.
Further, in the specific implementation of described step 1, the executed path representation of example to be migrated is σ={ σ 1, σ 2..., σ 1, σ 2... expression activity, movable σ i'sall input variables are inPut (σ i), all output variables are outPut (σ i); Dependence between activity is expressed as R=(σ i, σ j), σ iand σ jrepresent the activity in aforementioned execution route, it comprises controls dependence, asynchronous call dependence and data dependence relation, and represents in dynamic dependency figure DDG by the form of directed edge; The dynamic dependency figure of example to be migrated is expressed as DDG=(N dDG, E dDG), N dDGrepresent the active junction point collection of dynamic dependency figure, in event log, all unduplicated activities form, E dDGrepresent the dependence edge collection between dynamic dependency figure node, by controlling dependence collection, asynchronous call Dependency Set and data dependence relation collection, form; The realization of this step 1 comprises the following steps:
1.1 initialization set ReachingDefs (P 1, with set Uses be σ)
Figure BDA0000416179700000031
the variables collection that set Uses representative is used, set ReachingDefs (P 1, σ) for dynamically reaching definition set, i.e. all defining variable set of execution route σ end, wherein P 1for the Services Composition before developing, all active junction points before traversal evolution in the execution route of example to be migrated, add the active junction point collection N of dynamic dependency figure to dDGin, the control dependence collection S of analysis between can all active junction points cDwith asynchronous call dependence collection S aD;
1.2 traversal active junction point collection N dDGif exist between movable i and movable j to control to rely on or asynchronous call dependence, also: the binary relation between movable i and movable j belongs to controls dependence collection S cDwith asynchronous call dependence collection S aD, will control accordingly dependence edge or asynchronous call dependence edge and add to the dependence edge set E of dynamic dependency figure dDGin;
1.3 adopt data-flow analysis method, all true data dependence edges are added in dynamic dependency figure DDG, particularly, all input variable var ∈ inPut (σ of movable j in traversal execution route σ j), if movable j has been used the variable of movable k definition, the variable of movable k belongs to described set ReachingDefs (P 1, σ), by take the true data dependence edge that movable j is terminal as starting point, the movable k of take, add in dynamic dependency figure DDG, the input variable of movable j is added in described set Uses simultaneously;
1.4 adopt data-flow analysis method, all anti-data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if movable j has defined the variable that movable k is used, the variable that is movable k belongs to described set Uses, by take movable k, as the anti-data dependence limit that starting point, the movable j of take are terminal, add in dynamic dependency figure DDG, the output variable of movable j is added in the set Def (σ [j]) of the defined all variablees of movable j simultaneously;
1.5 adopt data-flow analysis method, all output data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if this output variable is defined by movable i, the variable of movable i belongs to described set ReachingDefs (P 1σ), and movable j has redefined this output variable, by take movable i, as the output data dependence limit that starting point, the movable j of take are terminal, add in DDG, the output variable of movable j is added in described set Def (σ [j]) simultaneously, the defining variable of movable i adds set Kill (σ [j]) to, this set Kill (σ [j]) be example to be migrated while carrying out along execution route σ, all arrival activity j and redefined the set of the rear variable-definition formation being capped by movable j;
1.6 add all elements in described set Def (σ [j]) to described set ReachingDefs (P 1, σ) in, by all elements in described Kill (σ [j]) from described set ReachingDefs (P 1, σ) middle deletion;
1.7 repeat above-mentioned steps 1.2 to 1.6, until travel through all activities in complete execution route σ; And
1.8 according to the active junction point collection N of all active junction points in execution route and the establishment of the dependence between them dynamic dependency figure DDG dDGwith dependence edge collection E dDG.
Further, in described step 2, the dynamic dependency figure after yojan is expressed as PDDG=(N pDDG, E pDDG), N pDDGrepresent the active junction point collection of dynamic dependency figure, E pDDGrepresent the dependence edge collection between node; The realization of this step 2 comprises the following steps:
2.1 by Services Composition P before described evolution 1projection on the Services Composition of all variablees under current state after evolution, obtains the projection ReachingDefs (P of all variablees 1, σ) ∩ V (P 2), P 2for the Services Composition after developing, V (P 2) expression P 2in all activities;
2.2 traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, in described dynamic dependency figure DDG, find out the active junction point of defined variable;
2.3 active junction points that obtain based on step 2.2, take Dynamic Slicing method backward to obtain directly and the activity of remote effect variable-value section S; And
2.4 delete in dynamic dependency figure DDG, do not belong to the movable of any movable section S and with the corresponding dependence edge of this activity, thereby obtain the dynamic dependency figure PDDG after yojan.
Further, the realization of described step 2.4 comprises the following steps:
2.4.1 initialization active junction point collection N pDDGwith dependence edge collection E pDDGfor sky, traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, if exist variable by movable σ idefinition, and movable σ ithe active junction point collection N of dynamic dependency figure after yojan not pDDGin, by this activity σ iadd active junction point collection N to pDDGneutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, first activity in traversalQueue is popped, if take the dependence edge that this activity is terminal, belong to dependence edge collection E dDGbut do not belong to dependence edge collection E pDDG, add this dependence edge to dependence edge collection E pDDGin; If the starting point of this dependence edge is not at active junction point collection N pDDGin, add this node to active junction point collection N pDDGin, and add in storehouse traversalQueue;
2.4.3 repeat above-mentioned steps 2.4.1-2.4.2, until traveled through projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees; And
2.4.4 the active junction point collection N obtaining to 2.4.4 based on step 2.4.1 pDDGwith dependence edge collection E pDDG, build the dynamic dependency figure PDDG after yojan.
Further, in described step 4, the concrete judgement of migration validity comprises the following steps:
The active junction point collection N of dynamic dependency figure PDDG after 4.1 traversal yojan pDDGin all activities, if the dependence edge collection E of the dynamic dependency figure PDDG after yojan pDDGin, the dependence edge that node n is terminal, the in-degree indegree[n of node n are take in one of every existence] add 1, this indegree[n wherein] representing the in-degree of node n, initial value is 0;
If 4.2 node n in-degrees are 0, add in set zeroIndegreeNodeSet, this set zeroIndegreeNodeSet represents that in-degree is 0 node set, initial value is
Figure BDA0000416179700000051
4.3 repeat above-mentioned 4.1 and 4.2, until traveled through the active junction point collection N of dynamic dependency figure PDDG pDDGin all activities;
If 4.4 set zeroIndegreeNodeSet are not
Figure BDA0000416179700000052
detect and whether have an in-degree indegree[n i] be 0 movable n imeet (P 2, S c) [n i> (P 2, S c'), Services Composition P that can be after evolution 2current state (P 2, S c) lower generation, if there is no, the migration validity of Services Composition example does not meet, wherein (P 2, S c) [n i> (P 2, S c') expression n ican be at the S of process P2 cunder state, carry out and along with n iexecution P 2can be by state S center a new state S c';
If 4.5 existence activity n i, by node n ifrom set zeroIndegreeNodeSet, delete and add in topological sorting ρ, upgrading P simultaneously 2current state;
The dependence edge collection E of 4.6 traversal dynamic dependency figure PDDG pDDG, by all and node n ithe node in-degree of adjacency subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet is
Figure BDA0000416179700000053
if now there is the Services Composition process P that the topological sorting ρ of an active sequences can be after evolution 2middle playback, the migration validity of Services Composition example meets.
From the above technical solution of the present invention shows that, the method that the present invention proposes does not require that the executed active sequences of example to be migrated is according to both reappearing under the Services Composition definition of definite sequence after evolution, thereby compared to traditional track replay method, institute of the present invention extracting method has more flexibility, can avoid more issuable false negatives of traditional track replay method (false negative), thereby can allow more example move, better support the dynamic evolution of Services Composition.
By embodiments of the present invention being described in detail with way of example below in conjunction with accompanying drawing, other features of the present invention, feature and advantage will be more obvious.
Accompanying drawing explanation
Fig. 1 is the principle key diagram of Services Composition instance migration.
Fig. 2 is the exemplary overall realization flow figure of the Services Composition instance migration availability deciding method based on executed path dynamic dependency figure.
Fig. 3 is the process flow diagram of the migration availability deciding in Fig. 2 exemplary process diagram.
Fig. 4 is an example of the dynamic dependency figure DDG of Services Composition execution route before developing.
Fig. 5 is for carrying out an example of the dynamic dependency figure PDDG that obtains after yojan to the dynamic dependency figure of Fig. 4.
Fig. 6 a-6b is an example of the control flow graph of Services Composition after developing.
Fig. 7 a-7b is an example of the control flow graph of Services Composition before developing.
Embodiment
As shown in Figure 1 and Figure 2, according to preferred embodiment of the present invention, Services Composition instance migration availability deciding method based on dynamic dependency figure, take the executed path (being executed active sequences) of Services Composition before and after developing and example to be migrated for inputting, the migration availability deciding result of example to be migrated of take is output, as shown in Figure 2, its concrete realization comprises the following steps:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate the dynamic dependency figure in this executed path, be the dynamic dependency figure of example to be migrated, and obtain all set that reach variable-definition (reaching definitions of variables) that arrive executed path end;
Step 2, yojan dynamic dependency figure: by the method for Dynamic Slicing backward, delete instance migration is not had to influential activity and corresponding dependence edge thereof;
Step 3, the Services Composition after developing is used to the controlled flow graph of control flow analysis method; And
The control flow graph of step 4, the Services Composition based on after developing and the dynamic dependency figure after example yojan to be migrated, whether judge under the dynamic dependency figure after yojan exists a topological sorting (being active sequences) under the Services Composition after evolution, to reappear, judging whether to exist a topological sorting is an active sequences of Services Composition after developing, if existed, the validity of migration is met, otherwise does not meet.
Below with reference to Fig. 2 and in conjunction with shown in Fig. 3-6, describe the implementation procedure of the present embodiment in detail.
For convenience of description, in the present embodiment, as the Services Composition of input, take BPEL(Business Process Execution Language) process is example, certainly not as restriction, OWL-S(Ontology Web Language for Services) Services Composition of other data perception such as process is also applicable to the present embodiment.
For the BPEL process that meets WS-BPEL2.0 standard, after the present embodiment can be judged given evolution accurately and effectively, whether Services Composition example can replace example that generate, that not yet carry out end under the front procedure definition that develops, thereby the dbjective state of moving to, to continue to provide current service.
As shown in Figure 2, the Services Composition instance migration availability deciding method based on executed path dynamic dependency figure that the present embodiment provides, its concrete realization comprises the following steps:
Step 1, analyze the dependence R between activity in the executed path σ of example to be migrated, automatically generate the dynamic dependency figure DDG in executed path, be the dynamic dependency figure of example to be migrated, and obtain all set ReachingDefs (P that reach variable-definition (reaching definitions of variables) that arrive executed path σ end 1, σ).
Wherein: execution route σ={ σ 1, σ 2..., σ 1, σ 2... expression activity; Movable σ i'sall input variables are inPut (σ i), all output variables are outPut (σ i); Dependence R=(σ i, σ j), σ iand σ jrepresent the activity in aforementioned execution route, it comprises controls dependence, asynchronous call dependence and data dependence relation, and represents in dynamic dependency figure DDG by the form of directed edge; Dynamic dependency figure DDG=(N dDG, E dDG), N dDGrepresent the active junction point collection of dynamic dependency figure, in event log, all unduplicated activities form, E dDGrepresent the dependence edge collection between dynamic dependency figure node, by controlling dependence collection, asynchronous call Dependency Set and data dependence relation collection, form.As embodiment preferably, its specific implementation comprises the following steps:
1.1 initialization set ReachingDefs (P 1, with set Uses be σ)
Figure BDA0000416179700000071
the variables collection that set Uses representative is used, set ReachingDefs (P 1, σ) for dynamically reaching definition set, i.e. all defining variable set of execution route σ end, wherein P 1for the Services Composition before developing, all active junction points before traversal evolution in the execution route of example to be migrated, add the active junction point collection N of dynamic dependency figure to dDGin, the control dependence collection S of analysis between can all active junction points cDwith asynchronous call dependence collection S aD;
1.2 traversal active junction point collection N dDGif exist between movable i and movable j to control to rely on or asynchronous call dependence, also: the binary relation between movable i and movable j belongs to controls dependence collection S cDwith asynchronous call dependence collection S aD, will control accordingly dependence edge or asynchronous call dependence edge and add to the dependence edge set E of dynamic dependency figure dDGin;
1.3 adopt data-flow analysis method, all true data dependence edges are added in dynamic dependency figure DDG, particularly, all input variable var ∈ inPut (σ of movable j in traversal execution route σ j), if movable j has been used the variable of movable k definition, the variable of movable k belongs to described set ReachingDefs (P 1, σ), by take the true data dependence edge that movable j is terminal as starting point, the movable k of take, add in dynamic dependency figure DDG, the input variable of movable j is added in described set Uses simultaneously;
1.4 adopt data-flow analysis method, all anti-data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if movable j has defined the variable that movable k is used, the variable that is movable k belongs to described set Uses, by take movable k, as the anti-data dependence limit that starting point, the movable j of take are terminal, add in dynamic dependency figure DDG, the output variable of movable j is added in the set Def (σ [j]) of the defined all variablees of movable j simultaneously;
1.5 adopt data-flow analysis method, all output data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if this output variable is defined by movable i, the variable of movable i belongs to described set ReachingDefs (P 1σ), and movable j has redefined this output variable, by take movable i, as the output data dependence limit that starting point, the movable j of take are terminal, add in DDG, the output variable of movable j is added in described set Def (σ [j]) simultaneously, the defining variable of movable i adds set Kill (σ [j]) to, this set Kill (σ [j]) be example to be migrated while carrying out along execution route σ, all arrival activity j and redefined the set of the rear variable-definition formation being capped by movable j;
1.6 add all elements in described set Def (σ [j]) to described set ReachingDefs (P 1, σ) in, by all elements in described Kill (σ [j]) from described set ReachingDefs (P 1, σ) middle deletion (visible, set ReachingDefs (P 1, σ) be dynamic change);
1.7 repeat above-mentioned steps 1.2 to 1.6, until travel through all activities in complete execution route σ;
1.8 according to the active junction point collection N of all active junction points in execution route and the establishment of the dependence between them dynamic dependency figure DDG dDGwith dependence edge collection E dDG.
In the present embodiment, above-mentioned specific implementation step can adopt following algorithm 1 to realize, and certainly, those of ordinary skill in the art can adopt other mode to realize, and below is only an one exemplary embodiment.
Algorithm 1---build dynamic dependency figure:
1.begin
2.Defs←Ф
3.Uses←Ф
4.for?j←1to|σ|
5.N←N∪{σ[j]}
6.for?everyσ[i]∈N
7.if<σ[i],σ[j]>∈SCD?or?SAD
8.E←E∪{<σ[i],σ[j]>}
9.endif
10.endfor
11.for?every?var∈inPut(σ[j])
12.E←E∪{<σ[k],σ[j]>|varσ[k]∈Defs}
13.Uses←Uses∪{varσ[j]}
14.endfor
15.Def(σ[j])←Ф
16.Kill(σ[j])←Ф
17.for?every?var∈outPut(σ[j])
18.E←E∪{<σ[k],σ[j]>|varσ[k]∈Uses}
19.E←E∪{<σ[i],σ[j]>|varσ[i]∈Defs}
20.Def(σ[j])←Def(σ[j])∪{varσ[j]}
21.Kill(σ[j])←Kill(σ[j])∪{varσ[i]|varσ[i]∈Defs}
22.endfor
23.Defs←(Defs–Kill(σ[j]))∪Def(σ[j])
24.endfor
25.end
Shown in figure 2, next enter step 2 and operate, yojan dynamic dependency figure DDG.
Step 2, the method for Dynamic Slicing backward of passing through, deletion does not have influential activity and corresponding dependence edge thereof to instance migration, and wherein, the dynamic dependency figure after yojan is expressed as PDDG=(N pDDG, E pDDG), N pDDGrepresent the active junction point collection of dynamic dependency figure, E pDDGrepresent the dependence edge collection between node.As embodiment preferably, its specific implementation comprises the following steps:
2.1 by Services Composition P 1the Services Composition of all variablees under current state after evolution is projection on BPEL process model, obtains the projection ReachingDefs (P of all variablees 1, σ) ∩ V (P 2), P 2for the Services Composition after developing, V (P 2) expression P 2in all activities;
2.2 traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, in dynamic dependency figure DDG, find out the active junction point of defined variable;
2.3 active junction points that obtain based on step 2.2, take Dynamic Slicing method backward to obtain directly and the activity of remote effect variable-value section S;
The activity that does not belong to any movable section S in 2.4 deletion dynamic dependency figure DDG is (because they arrive V (P to migration example current state 2) not impact of projection) and with the corresponding dependence edge of this activity, thereby obtain the dynamic dependency figure PDDG after yojan.
Wherein, the realization of step 2.4 comprises the steps:
2.4.1 initialization active junction point collection N pDDGwith dependence edge collection E pDDGfor sky, traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, if exist variable by movable σ idefinition, and movable σ ithe active junction point collection N of dynamic dependency figure after yojan not pDDGin, by this activity σ iadd active junction point collection N to pDDGneutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, first activity in traversalQueue is popped, if take the dependence edge that this activity is terminal, belong to dependence edge collection E dDGbut do not belong to dependence edge collection E pDDG, add this dependence edge to dependence edge collection E pDDGin; If the starting point of this dependence edge is not at active junction point collection N pDDGin, add this node to active junction point collection N pDDGin, and add in storehouse traversalQueue;
2.4.3 repeat above-mentioned steps 2.4.1-2.4.2, until traveled through projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees;
2.4.4 the active junction point collection N obtaining to 2.4.4 based on step 2.4.1 pDDGwith dependence edge collection E pDDG, build the dynamic dependency figure PDDG after yojan.
In the present embodiment, above-mentioned specific implementation step can adopt following algorithm 2 to realize, and certainly, those of ordinary skill in the art can adopt other mode to realize, and below is only an one exemplary embodiment.
Algorithm 2---isolate the dynamic dependency figure after yojan:
1.begin
2.N'←Ф
3.E'←Ф
4.Defs←Defs∩V(P2)
5.for?each?varσ[i]∈Defs
6.N'←N'∪{σ[i]}
7.traversalQueue←{σ[i]}
8.while?traversalQueue≠Ф
9.σ[k]←traversalQueue.dequeue()
10.for?each<σ[j],σ[k]>∈E
11.if<σ[j],σ[k]> E'and<σ[j],σ[k]>
is?not?an?anti-or?output?dependence?edge
12.E'←E'∪{<σ[j],σ[k]>}
13.endif
14.ifσ[j]
Figure BDA0000416179700000092
N'
15.N'←N'∪{σ[j]}
16.traversalQueue.enqueue(σ[j])
17.endif
18.endfor
19.endwhile
20.endfor
21.PDDG(N',E')←DDG(N,E)↑N'
22.end
As shown in Figure 2, next, enter:
Step 3: the Services Composition after developing is used to the controlled flow graph of control flow analysis method.
In the present embodiment, the control flow graph of the Services Composition after being developed by conventional control flow analysis method.For example, " a kind of programmed control flow graph Layout Algorithm and the realization thereof " that the people such as Yuan Yuan, Jin Maozhong proposes; Constructing Control Flow Graph for Java by Decoupling Exception Flow from Normal Flow, Jang-Wu Jo, Byeong-Mo Chang in Computational Science and Its Applications – ICCSA2004 (2004), Volume3043,2004, pp106-113; Generation of Control and Data Flow Graphs from Scheduled and Pipelined Assembly Code, David C.Zaretsky, Gaurav Mittal ... in Languages and Compilers for Parallel Computing, Volume4339,2006, pp76-90 (2006), certainly as restriction.
As embodiment preferably, in the present embodiment, control obtaining of flow graph and comprise the following steps:
3.1 travel through given BPEL process according to the mode of depth-first, obtain all active junction points, and are set as territory <scope> activity to the root activity of BPEL process;
3.2 according to obtained movable type, select the corresponding analytical function of Activity Type therewith to analyze the attribute of each active junction point in BPEL process, the common activity attributes of all activities is extracted and deposited in internal memory, then according to Activity Type, store separately the peculiar attribute of activity of every type.
Analytical function can be divided into following 4 classes according to Activity Type:
The attribute of the basic activity that a) analytical function of basic activity reads from BPEL process, movable attribute mainly comprises title, type, the follow-up relation of forerunner, input/output variable, partner's link and port type, in block structure, only between the activity under order <sequence> activity, just there is the follow-up relation of forerunner, and block structure is comprised of structured activities and its subactivity, there is stereovision longitudinally;
B) for structured activities <if>, <switch>, <pick>, <while> and <repeatUtil>, their input variable can only be obtained out from conditional statement <condition>, but these conditional statements must meet bpel:getVariableProperty (' ', ' ') or bpws:getVariableData (' ', ' ') these two kinds of forms can be resolved, and output variable is all empty null in structured activities,
C) analytical function of selection and loop structure activity reads the attribute of this type activity from BPEL process, wherein input variable parses from condition <condition>, and the branch reading under respective conditions <conditon> is movable;
D) analytical function of concurrent structure and sequential organization activity reads the attribute of this type activity from BPEL process, and reads the activity under Qi Meitiao branch.
As shown in Figure 2, next enter step 4 and operate, the migration validity of respective service example combinations is judged.
The control flow graph of the Services Composition after step 4, the dynamic dependency figure PDDG based on after yojan and evolution, whether judge under this dynamic dependency figure PDDG and exist a topological sorting ρ (being active sequences) under the Services Composition after evolution, to reappear, judging whether to exist a topological sorting ρ is the Services Composition P after developing 2an active sequences, if existed, the validity of migration is met, otherwise does not meet.
Shown in figure 3-Fig. 4, as a kind of preferably embodiment, the specific implementation of migration availability deciding comprises the following steps:
The active junction point collection N of dynamic dependency figure PDDG after 4.1 traversal yojan pDDGin all activities, if the dependence edge collection E of the dynamic dependency figure PDDG after yojan pDDGin, the dependence edge that node n is terminal, the in-degree indegree[n of node n are take in one of every existence] add 1, this indegree[n wherein] representing the in-degree of node n, initial value is 0;
If 4.2 node n in-degrees are 0, add in set zeroIndegreeNodeSet, this set zeroIndegreeNodeSet represents that in-degree is 0 node set, initial value is
Figure BDA0000416179700000111
4.3 repeat above-mentioned 4.1 and 4.2, until traveled through the active junction point collection N of dynamic dependency figure PDDG pDDGin all activities;
If 4.4 set zeroIndegreeNodeSet are not
Figure BDA0000416179700000112
detect and whether have an in-degree indegree[n i] be 0 movable n imeet (P 2, S c) [n i> (P 2, S c'), Services Composition P that can be after evolution 2current state (P 2, S c) lower generation, if there is no, the migration validity of Services Composition example does not meet, wherein (P 2, S c) [n i> (P 2, S c') expression n ican be at the S of process P2 cunder state, carry out and along with n iexecution P 2can be by state S center a new state S c';
If 4.5 existence activity n i, by node n ifrom set zeroIndegreeNodeSet, delete and add in topological sorting ρ, upgrading P simultaneously 2current state;
The dependence edge collection E of 4.6 traversal dynamic dependency figure PDDG pDDG, by all and node n ithe node in-degree of adjacency subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet is
Figure BDA0000416179700000113
if now there is the Services Composition process P that the topological sorting ρ of an active sequences can be after evolution 2middle playback, the migration validity of Services Composition example meets.
In the present embodiment, above-mentioned specific implementation step can adopt following algorithm 3 to realize, and certainly, those of ordinary skill in the art can adopt other mode to realize, and below is only an one exemplary embodiment.
Algorithm 3---migration validation verification:
1.begin
2.zeroIndegreeNodeSet←Ф
3.(P2,Sc)←(P2,S0)
4.for?each?n∈N'
5.indegree[n]←0
6.for?each<n',n>∈E
7.indegree[n]←indegree[n]+1
8.endfor
9.if?indegree[n]=0
10.zeroIndegreeNodeSet←zeroIndegreeNodeSet∪{n}
11.endif
12.endfor
13.while?zeroIndegreeNodeSet.isEmpty()=false
14.if
Figure BDA0000416179700000121
ni∈zeroIndegreeNodeSet,satisfying(P2,Sc)[ni>(P2,Sc')
15.zeroIndegreeNodeSet←zeroIndegreeNodeSet-{ni}
16.(P2,Sc)←(P2,Sc')
17.for?each?n∈N?satisfying<ni,n>∈E
18.indegree[n]←indegree[n]-1
19.if?indegree[n]=0
20.zeroIndegreeNodeSet←zeroIndegreeNodeSet∪{n}
21.endif
22.endfor
23.else
24.validity←false
25.return
26.endif
27.endwhile
28.validity←true
29.end
Shown in Fig. 4-7, using the BPEL process model of travel agent as Services Composition example, specific description is done in migration availability deciding process and realization thereof that the present embodiment is proposed, the BPEL process model of travel agent comprises plane ticket booking, the services such as hotel reservation, the structures such as this model consists of 14 active junction points, comprises selection, concurrent.
In order to judge that can the example generating under the Services Composition procedure definition before evolution, not yet carry out to finish move under the particular state definition of the Services Composition process after evolution safely and effectively, continue to carry out, the enforcement of its decision process comprises:
1. analyze Services Composition example P to be migrated 1execution route σ=<A 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 6.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 6.2, A 7.2, A 8.2, A 9.2, A 10.1, A 12.1, A 11.1> carries out dependence R, obtains dynamic dependency figure DDG, and acquires the set ReachingDefs (P that can reach variable-definition 1, σ)={ queryInputA 1.2, airlineQueryA 2.2, hotelQueryA 2.2, airlineResultA 3.2, hotelResultA 4.2, queryOutputA 5.2, AcknowledgementA 8.2, airlineBookingA 10.1, hotelBookingA 10.1, hotelOfferA 12.1, airlineOfferA 11.1, A i.jexpression activity A ioccur for the j time, its detailed process is as follows:
1.1 initialization ReachingDefs and Uses are
Figure BDA0000416179700000122
travel through all active junction points of the execution route of the BPEL process instance before developing, add the active junction point collection N of dynamic dependency figure to dDGin, obtain N dDG={ A 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 6.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 6.2, A 7.2, A 8.2, A 9.2, A 10.1, A 12.1, A 11.1, analyze and obtain the control dependence collection S between all active junction points cD={ (A 9.1, A 1.2), (A 9.1, A 2.2), (A 9.1, A 3.2), (A 9.1, A 4.2), (A 9.1, A 5.2), (A 9.1, A 6.2), (A 9.1, A 7.2), (A 9.1, A 8.2), (A 9.2, A 10.1), (A 9.2, A 12.1), (A 9.2, A 11.1) and asynchronous call dependence collection S aD={ (A 7.1, A 8.1), (A 7.2, A 8.2);
1.2 traversal active junction point collection N dDGif, really between movable i and movable j, exist to control to rely on or asynchronous call dependence, its binary relation belongs to control dependence collection S cDwith asynchronous call dependence collection S aD, corresponding control dependence edge or asynchronous call dependence edge are added to the dependence edge set E of dynamic dependency figure dDGin;
1.3 adopt data-flow analysis method, by all true data dependence edge (A 1.1, A 2.1),(A 2。1,A 3。1),(A 3.1,A 5.1),(A 4.1,A 5.1),(A 5.1,A 6.1),(A 5.1,A 7.1),(A 7。1,A 8。1),(A 8.1,A 9.1),(A 2.1,A 1.2),(A 3.1,A 2.2),(A 4.1,A 2.2),(A 5.1,A 3.2),(A 5.1,A 4.2),(A 6.1,A 5.2),(A 7.1,A 5.2),(A 5.2,A 10.1),(A 1.2,A 2.2),(A 2.2,A 3.2),(A 2.2,A 4.2),(A 4.2,A 5.2),(A 5.2,A 6.2),(A 5.2,A 7.2),(A 7.2,A 8.2),(A 8.2,A 9.2),(A 10.1,A 12。1), (A 10.1, A 11.1) add in dynamic dependency figure DDG, that is: travel through movable A in execution route σ 1.2all input variables because at executed activity A 1.1time, by A 1.2input variable queryInput added in defined variable set ReachingDefs, so movable A 1.2used movable A 1.1the variable queryInput of definition, will be with movable A 1.1for starting point, movable A 1.2for the true data dependence edge of terminal adds in DDG, queryInput is added in used variables collection Uses simultaneously;
1.4 adopt data-flow analysis method, by anti-data dependence limit (A 9.1, A 8.2) add in dynamic dependency figure DDG, that is: travel through movable A in execution route σ 8.2all output variables.Because at executed activity A 9.1time, by A 8.2output variable acceptance added use variables collection Uses to, so movable A 8.2defined movable A 9.1the variable using, will be with movable A 9.1for starting point, movable A 8.2for the anti-data dependence limit of terminal, add in DDG, acceptance is added to Def (A simultaneously 8.2) in;
1.5 adopt data-flow analysis method, by all output data dependence limit (A 1.1, A 1.2), (A 2.1, A 2.2), (A 3.1, A 3.2), (A 4.1, A 4.2), (A 5.1, A 5.2), (A 8.1, A 8..2) add in dynamic dependency figure DDG, that is: travel through movable A in execution route σ 8.2all output variables because at executed activity A 8.1time, by movable A 8.2output variable acceptance added defined variable set ReachingDefs to, so movable A 8.2redefined movable A 8.1the variable acceptance of definition, will be with movable A 8.1for starting point, movable A 8.2for adding in DDG on the output data dependence limit of terminal, simultaneously by A 8.2the variable acceptance of output add Def (A to 8.2) in, by A 8.1the variable acceptance of output add Kill (A to 8.2) in;
1.6 by Def (A 8.2) in elements A 8.2the variable acceptance of output add in defined set ReachingDefs, by Kill (A 8.2) in elements A 8.1the variable acceptance of output add to from dynamically reaching definition set ReachingDefs and delete, use A 8.2the acceptance of definition overrides A 8.1the acceptance of definition;
1.7 repeat 1.2 to 1.6, until travel through all activities in complete execution route σ;
1.8 according to the active junction point collection N of all active junction points in execution route and the establishment of the dependence between them dynamic dependency figure DDG dDG={ A 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 6.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 6.2, A 7.2, A 8.2, A 9.2, A 10.1, A 12.1, A 11.1and dependence edge collection E dDG={ (A 9.1, A 1.2), (A 9.1, A 2.2), (A 9.1, A 3.2), (A 9.1, A 4.2), (A 9.1, A 5.2), (A 9.1, A 6.2), (A 9.1, A 7.2), (A 9.1, A 8.2), (A 9.2, A 10.1), (A 9.2, A 12.1), (A 9.2, A 11.1), (A 1.1, A 2.1),(A 2。1,A 3。 1),(A 3.1,A 5.1),(A 4.1,A 5.1),(A 5.1,A 6.1),(A 5.1,A 7.1),(A 7。1,A 8。1),(A 8.1,A 9.1),(A 1.1,A 1.2),(A 2.1,A 1.2),(A 2.1,A 2.2),(A 3.1,A 2.2),(A 3.1,A 3.2),(A 4.1,A 2.2),(A 4.1,A 4.2),(A 5.1,A 3.2),(A 5.1,A 4.2),(A 5.1,A 5.2),(A 6.1,A 5.2),(A 7.1,A 5.2),(A 8.1,A 8.2),(A 5.2,A 10.1),(A 1.2,A 2.2),(A 2.2,A 3.2),(A 2.2,A 4.2),(A 4.2,A 5.2),(A 5.2,A 6.2),(A 5.2,A 7.2),(A 7.2,A 8.2),(A 8.2,A 9.2),(A 10.1,A 12。1), (A 10.1, A 11.1), build dynamic dependency figure DDG, as shown in Figure 4, be the dynamic dependency figure DDG of Services Composition execution route before developing.
2. pass through the method for Dynamic Slicing backward, delete the Services Composition P after developing 2do not have influential movable A 6.1, A 6.2and corresponding dependence edge (A 5.1, A 6.1), (A 5.2, A 6.2), (A 6.1, A 5.2) (A 9.1, A 6.2) obtaining the dynamic dependency figure after yojan, its detailed process is as follows:
2.1 by Services Composition example P 1projection on the BPEL process model of all variablees under current state after evolution, obtains projection ReachingDefs (P1, σ) ∩ V (P2)={ queryInputA of all variablees 1.2, airlineQueryA 2.2, hotelQueryA 2.2, airlineResultA 3.2, hotelResultA 4.2, queryOutputA 5.2, AcknowledgementA 8.2, airlineBookingA 10.1, hotelBookingA 10.1, hotelOfferA 12.1, airlineOfferA 11.1;
2.2 travel through all variablees of ReachingDefs (P1, σ) ∩ V (P2), find out the active junction point A of defining variable in dynamic dependency figure DDG 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 8.2, A 10.1, A 11.1, A 12.1;
2.3 take Dynamic Slicing method backward to obtain the activity section S of direct or indirect variation value;
2.4 delete the movable A that does not belong to any section S in dynamic dependency figure 6.1, A 6.2and the limit (A relevant to this activity 5.1, A 6.1), (A 5.2, A 6.2), (A 6.1, A 5.2), (A 9.1, A 6.2), thereby obtain the dynamic dependency figure PDDG after yojan;
Wherein, step 2.4 is specific as follows:
2.4.1 initialization active junction point collection N pDDGwith dependence edge collection E pDDGfor sky, all variablees in traversal projection ReachingDefs (P1, σ) ∩ V (P2), variable queryInputA 1.2, the active junction point collection N of the dynamic dependency figure after yojan not pDDGin, by movable A 1.2add nodal set N to pDDGin and by movable A 1.2add in a storehouse traversalQueue;
2.4.2 with A 1.2limit (A for terminal 1.1, A 1.2), (A 2.1, A 1.2), (A 9.1, A 1.2) belong to dependence edge collection E dDGbut do not belong to E pDDG, add this dependence edge to E pDDGin;
2.4.3A 1.1, A 2.1, A 9.1not at N pDDGin, by A 2.1, A 9.1add N to pDDGin;
2.4.4 the analytical approach of repeating step 2.4.1-2.4.4, until traveled through projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees;
2.4.5 by the active junction point collection N obtaining dDG={ A 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 7.2, A 8.2, A 9.2, A 10.1, A 12.1, A 11.1and dependence edge collection E dDG={ (A 9.1, A 1.2), (A 9.1, A 2.2), (A 9.1, A 3.2), (A 9.1, A 4.2), (A 9.1, A 5.2), (A 9.1, A 7.2), (A 9.1, A 8.2), (A 9.2, A 10.1), (A 9.2, A 12.1), (A 9.2, A 11.1), (A 1.1, A 2.1),(A 2。 1,A 3。1),(A 3.1,A 5.1),(A 4.1,A 5.1),(A 5.1,A 7.1),(A 7。1,A 8。1),(A 8.1,A 9.1),(A 1.1,A 1.2),(A 2.1,A 1.2),(A 2.1,A 2.2),(A 3.1,A 2.2),(A 3.1,A 3.2),(A 4.1,A 2.2),(A 4.1,A 4.2),(A 5.1,A 3.2),(A 5.1,A 4.2),(A 5.1,A 5.2),(A 7.1,A 5.2),(A 8.1,A 8.2),(A 5.2,A 10.1),(A 1.2,A 2.2),(A 2.2,A 3.2),(A 2.2,A 4.2),(A 4.2,A 5.2),(A 5.2,A 7.2),(A 7.2,A 8.2),(A 8.2,A 9.2),(A 10.1,A 12。1), (A 10.1, A 11.1) build the dynamic dependency figure PDDG after yojan, as shown in Figure 5, be the dynamic dependency figure PDDG after yojan.
3. the Services Composition P after pair evolution 2using existing control flow analysis method to obtain its control flow graph CFG, as shown in Fig. 6 a-6b, is the example of the control flow graph of Services Composition after developing.For the purpose of contrast, in this example, provided the control flow graph of Services Composition before developing, as shown in Fig. 7 a-7b.
4. in the dynamic dependency figure PDDG from yojan, judge, if there is a topological sorting ρ=<A 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 7.2, A 8.2, A 9.2, A 10.1, A 11.1, A 12.1> can be at P 2upper reproduction of control flow graph CFG, judge that respective service example combinations meets migration validity, the concrete steps of its judgement are as follows:
The dependence edge collection E of dynamic dependency figure PDDG after 4.1 traversal yojan pDDGif, exist and take the limit that certain node is terminal, the in-degree indegree of this node adds 1, finally obtains indegree[A 1.1]=0, indegree[A 2.1]=1, indegree[A 3.1]=1, indegree[A 4.1]=0, indegree[A 5.1]=2, indegree[A 7.1]=1, indegree[A 8.1]=1, indegree[A 9.1]=1, indegree[A 1.2]=3, indegree[A 2.2]=5, indegree[A 3.2]=4, indegree[A 4.2]=4, indegree[A 5.2]=5, indegree[A 7.2]=2, indegree[A 8.2]=4, indegree[A 9.2]=1, indegree[A 10.1]=2, indegree[A 11.1]=2, indegree[A 12.1]=2;
4.2A 1.1in-degree is 0, adds in set zeroIndegreeNodeSet;
4.3 repeat above-mentioned 4.1 and 4.2, until traveled through the active junction point collection N of dynamic dependency figure PDDG pDDGin all activities;
4.4 there is a movable A that in-degree is 0 1.1meet (P 2, S c) [A 1.1> (P 2, S c');
4.5 by node A 1.1add in topological sorting ρ, from set zeroIndegreeNodeSet, delete and add in topological sorting ρ, upgrade P simultaneously 2current state;
The dependence edge collection E of 4.6 traversal dynamic dependency figure PDDG pDDG, by all and node n ithe node A of adjacency 1.2, A 2.1in-degree subtracts 1, i.e. indegree[A 1.2]=0, indegree[A 2.1]=0;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet is
Figure BDA0000416179700000151
if now there is the topological sorting ρ=<A of an active sequences 1.1, A 2.1, A 3.1, A 4.1, A 5.1, A 7.1, A 8.1, A 9.1, A 1.2, A 2.2, A 3.2, A 4.2, A 5.2, A 7.2, A 8.2, A 9.2, A 10.1, A 11.1, A 12.1> can be after evolution BPEL process P 2middle playback, can judge that the migration validity of this Services Composition example meets.
Although the present invention discloses as above with preferred embodiment, so it is not in order to limit the present invention.Persond having ordinary knowledge in the technical field of the present invention, without departing from the spirit and scope of the present invention, when being used for a variety of modifications and variations.Therefore, protection scope of the present invention is when being as the criterion depending on claims person of defining.

Claims (5)

1. the Services Composition instance migration availability deciding method based on dynamic dependency figure, it is characterized in that, take Services Composition before and after developing and the executed path of example to be migrated is input, and the migration availability deciding result of example to be migrated of take is output, and its realization comprises the following steps:
Step 1, analyze the dependence between activity in the executed path of example to be migrated, automatically generate the dynamic dependency figure in this executed path, be the dynamic dependency figure of example to be migrated, and obtain all set that reach variable-definition that arrive executed path end;
Step 2, yojan dynamic dependency figure: by the method for Dynamic Slicing backward, delete instance migration is not had to influential activity and corresponding dependence edge thereof;
Step 3, the Services Composition after developing is used to the controlled flow graph of control flow analysis method; And
The control flow graph of step 4, the Services Composition based on after developing and the dynamic dependency figure after example yojan to be migrated, whether judge under the dynamic dependency figure after yojan exists a topological sorting under the Services Composition after evolution, to reappear, judging whether to exist a topological sorting is an active sequences of Services Composition after developing, if existed, the validity of migration is met, otherwise does not meet.
2. the Services Composition instance migration availability deciding method based on dynamic dependency figure according to claim 1, is characterized in that, in the specific implementation of described step 1, the executed path representation of example to be migrated is σ={ σ 1, σ 2..., σ 1, σ 2... expression activity, movable σ i'sall input variables are inPut (σ i), all output variables are outPut (σ i); Dependence between activity is expressed as R=(σ i, σ j), σ iand σ jrepresent the activity in aforementioned execution route, it comprises controls dependence, asynchronous call dependence and data dependence relation, and represents in dynamic dependency figure DDG by the form of directed edge; The dynamic dependency figure of example to be migrated is expressed as DDG=(N dDG, E dDG), N dDGrepresent the active junction point collection of dynamic dependency figure, in event log, all unduplicated activities form, E dDGrepresent the dependence edge collection between dynamic dependency figure node, by controlling dependence collection, asynchronous call Dependency Set and data dependence relation collection, form; The realization of this step 1 comprises the following steps:
1.1 initialization set ReachingDefs (P 1, with set Uses be σ) the variables collection that set Uses representative is used, set ReachingDefs (P 1, σ) for dynamically reaching definition set, i.e. all defining variable set of execution route σ end, wherein P 1for the Services Composition before developing, all active junction points before traversal evolution in the execution route of example to be migrated, add the active junction point collection N of dynamic dependency figure to dDGin, the control dependence collection S of analysis between can all active junction points cDwith asynchronous call dependence collection S aD;
1.2 traversal active junction point collection N dDGif exist between movable i and movable j to control to rely on or asynchronous call dependence, also: the binary relation between movable i and movable j belongs to controls dependence collection S cDwith asynchronous call dependence collection S aD, will control accordingly dependence edge or asynchronous call dependence edge and add to the dependence edge set E of dynamic dependency figure dDGin;
1.3 adopt data-flow analysis method, all true data dependence edges are added in dynamic dependency figure DDG, particularly, all input variable var ∈ inPut (σ of movable j in traversal execution route σ j), if movable j has been used the variable of movable k definition, the variable of movable k belongs to described set ReachingDefs (P 1, σ), by take the true data dependence edge that movable j is terminal as starting point, the movable k of take, add in dynamic dependency figure DDG, the input variable of movable j is added in described set Uses simultaneously;
1.4 adopt data-flow analysis method, all anti-data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if movable j has defined the variable that movable k is used, the variable that is movable k belongs to described set Uses, by take movable k, as the anti-data dependence limit that starting point, the movable j of take are terminal, add in dynamic dependency figure DDG, the output variable of movable j is added in the set Def (σ [j]) of the defined all variablees of movable j simultaneously;
1.5 adopt data-flow analysis method, all output data dependences limit is joined in dynamic dependency figure DDG, particularly, all output variable var ∈ outPut (σ of movable j in traversal execution route σ j), if this output variable is defined by movable i, the variable of movable i belongs to described set ReachingDefs (P 1σ), and movable j has redefined this output variable, by take movable i, as the output data dependence limit that starting point, the movable j of take are terminal, add in DDG, the output variable of movable j is added in described set Def (σ [j]) simultaneously, the defining variable of movable i adds set Kill (σ [j]) to, this set Kill (σ [j]) be example to be migrated while carrying out along execution route σ, all arrival activity j and redefined the set of the rear variable-definition formation being capped by movable j;
1.6 add all elements in described set Def (σ [j]) to described set ReachingDefs (P 1, σ) in, by all elements in described Kill (σ [j]) from described set ReachingDefs (P 1, σ) middle deletion;
1.7 repeat above-mentioned steps 1.2 to 1.6, until travel through all activities in complete execution route σ; And
1.8 according to the active junction point collection N of all active junction points in execution route and the establishment of the dependence between them dynamic dependency figure DDG dDGwith dependence edge collection E dDG.
3. the Services Composition instance migration availability deciding method based on dynamic dependency figure according to claim 2, is characterized in that, in described step 2, the dynamic dependency figure after yojan is expressed as PDDG=(N pDDG, E pDDG), N pDDGrepresent the active junction point collection of dynamic dependency figure, E pDDGrepresent the dependence edge collection between node; The realization of this step 2 comprises the following steps:
2.1 by Services Composition P before described evolution 1projection on the Services Composition of all variablees under current state after evolution, obtains the projection ReachingDefs (P of all variablees 1, σ) ∩ V (P 2), P 2for the Services Composition after developing, V (P 2) expression P 2in all activities;
2.2 traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, in described dynamic dependency figure DDG, find out the active junction point of defined variable;
2.3 active junction points that obtain based on step 2.2, take Dynamic Slicing method backward to obtain directly and the activity of remote effect variable-value section S; And
2.4 delete in dynamic dependency figure DDG, do not belong to the movable of any movable section S and with the corresponding dependence edge of this activity, thereby obtain the dynamic dependency figure PDDG after yojan.
4. the Services Composition instance migration availability deciding method based on dynamic dependency figure according to claim 3, is characterized in that, the realization of described step 2.4 comprises the following steps:
2.4.1 initialization active junction point collection N pDDGwith dependence edge collection E pDDGfor sky, traversal projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees, if exist variable by movable σ idefinition, and movable σ ithe active junction point collection N of dynamic dependency figure after yojan not pDDGin, by this activity σ iadd active junction point collection N to pDDGneutralize in a storehouse traversalQueue;
If 2.4.2 storehouse traversalQueue is not empty, first activity in traversalQueue is popped, if take the dependence edge that this activity is terminal, belong to dependence edge collection E dDGbut do not belong to dependence edge collection E pDDG, add this dependence edge to dependence edge collection E pDDGin; If the starting point of this dependence edge is not at active junction point collection N pDDGin, add this node to active junction point collection N pDDGin, and add in storehouse traversalQueue;
2.4.3 repeat above-mentioned steps 2.4.1-2.4.2, until traveled through projection ReachingDefs (P 1, σ) ∩ V (P 2) in all variablees; And
2.4.4 the active junction point collection N obtaining to 2.4.4 based on step 2.4.1 pDDGwith dependence edge collection E pDDG, build the dynamic dependency figure PDDG after yojan.
5. according to the Services Composition instance migration availability deciding method based on dynamic dependency figure described in claim 3 or 4, it is characterized in that, in described step 4, the concrete judgement of migration validity comprises the following steps:
The active junction point collection N of dynamic dependency figure PDDG after 4.1 traversal yojan pDDGin all activities, if the dependence edge collection E of the dynamic dependency figure PDDG after yojan pDDGin, the dependence edge that node n is terminal, the in-degree indegree[n of node n are take in one of every existence] add 1, this indegree[n wherein] representing the in-degree of node n, initial value is 0;
If 4.2 node n in-degrees are 0, add in set zeroIndegreeNodeSet, this set zeroIndegreeNodeSet represents that in-degree is 0 node set, initial value is
Figure FDA0000416179690000031
4.3 repeat above-mentioned 4.1 and 4.2, until traveled through the active junction point collection N of dynamic dependency figure PDDG pDDGin all activities;
If 4.4 set zeroIndegreeNodeSet are not
Figure FDA0000416179690000032
detect and whether have an in-degree indegree[n i] be 0 movable n imeet (P 2, S c) [n i> (P 2, S c'), Services Composition P that can be after evolution 2current state (P 2, S c) lower generation, if there is no, the migration validity of Services Composition example does not meet, wherein (P 2, S c) [n i> (P 2, S c') expression n ican be at the S of process P2 cunder state, carry out and along with n iexecution P 2can be by state S center a new state S c';
If 4.5 existence activity n i, by node n ifrom set zeroIndegreeNodeSet, delete and add in topological sorting ρ, upgrading P simultaneously 2current state;
The dependence edge collection E of 4.6 traversal dynamic dependency figure PDDG pDDG, by all and node n ithe node in-degree of adjacency subtracts 1;
4.7 repeat above-mentioned 4.4 to 4.6, until set zeroIndegreeNodeSet is
Figure FDA0000416179690000033
if now there is the Services Composition process P that the topological sorting ρ of an active sequences can be after evolution 2middle playback, the migration validity of Services Composition example meets.
CN201310581404.XA 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph Active CN103606042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310581404.XA CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310581404.XA CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Publications (2)

Publication Number Publication Date
CN103606042A true CN103606042A (en) 2014-02-26
CN103606042B CN103606042B (en) 2016-08-17

Family

ID=50124262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310581404.XA Active CN103606042B (en) 2013-11-18 2013-11-18 Services Composition instance migration availability deciding method based on dynamic dependency graph

Country Status (1)

Country Link
CN (1) CN103606042B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038025A (en) * 2016-09-28 2017-08-11 阿里巴巴集团控股有限公司 System call method and device based on SOA framework
CN108780465A (en) * 2016-03-25 2018-11-09 微软技术许可有限责任公司 The dependence identification based on attribute for operation sequencing
CN115756929A (en) * 2022-11-23 2023-03-07 北京大学 Abnormal root cause positioning method and system based on dynamic service dependency graph

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325601B (en) * 2008-07-31 2011-05-04 南京大学 Method for choosing service based on quality dependency relationship under service composite surroundings
CN102255955B (en) * 2011-06-22 2014-01-29 浙江工商大学 Dynamic Web service combination method based on dependency relationship

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108780465A (en) * 2016-03-25 2018-11-09 微软技术许可有限责任公司 The dependence identification based on attribute for operation sequencing
CN108780465B (en) * 2016-03-25 2021-12-07 微软技术许可有限责任公司 Attribute-based dependency identification for operation ordering
CN107038025A (en) * 2016-09-28 2017-08-11 阿里巴巴集团控股有限公司 System call method and device based on SOA framework
CN107038025B (en) * 2016-09-28 2020-04-07 阿里巴巴集团控股有限公司 SOA architecture-based system calling method and device
CN115756929A (en) * 2022-11-23 2023-03-07 北京大学 Abnormal root cause positioning method and system based on dynamic service dependency graph

Also Published As

Publication number Publication date
CN103606042B (en) 2016-08-17

Similar Documents

Publication Publication Date Title
JP6253555B2 (en) System and method for a high performance graph analysis engine
Grumbach et al. Netlog, a rule-based language for distributed programming
Shimizu et al. Model driven development for rapid prototyping and optimization of wireless sensor network applications
US20130013534A1 (en) Hardware-assisted approach for local triangle counting in graphs
CN103065221A (en) Multidisciplinary collaborative optimization flow modeling and scheduling method and system based on business process execution language (BPEL)
KR20110057070A (en) Event processing networks
Bodei et al. Tracing where IoT data are collected and aggregated
CN111694555A (en) Business system construction method and device, electronic equipment and storage medium
CN103606042A (en) Service combination instance migration effectiveness judgment method based on dynamic dependency graph
CN110781180A (en) Data screening method and data screening device
CN112653749A (en) Edge computing-based complex event processing system and method for Internet of things
Grassi et al. A model-driven approach to performability analysis of dynamically reconfigurable component-based systems
CN111355696A (en) Message identification method and device, DPI (deep packet inspection) equipment and storage medium
CN112805984B (en) System for deploying incremental network updates
Song et al. Towards improving context interpretation in the iot paradigm: a solution to integrate context information in process models
Orsini et al. Cloudaware: Towards context-adaptive mobile cloud computing
Marin et al. Reaching for the clouds: contextually enhancing smartphones for energy efficiency
Schäfer et al. Increasing availability of workflows executing in a pervasive environment
Xu et al. Cina: Suppressing the detection of unstable context inconsistency
Wan et al. Commitments and causality for multiagent design
CN112953851A (en) Traffic classification method and traffic management equipment
CN111061763A (en) Method and device for generating rule execution plan of rule engine
Ortiz et al. Towards event-driven context-aware web services
US20200228391A1 (en) Dynamic statistics correlation for computing resources in a multi-tenant environment
CN118101427B (en) Node detection method, node detection device, computer, storage medium, and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant