## 2 Materials and Methods
### Web Service Composition Reliability Model
If the currently selected web service corresponding to the task node is successfully invoked, the process continues to the next one, or it selects another task node, until it is successfully invoked. In this paper, the selection of a web service denotes the active state, and the currently selected web service depends on the current state and not on previous behavior. This successfully reflects the Markov behavior--the user invokes each subsequent web service based on the corresponding transition probability. Figure 4 depicts the Markov model of the web service composition illustrated in Figure 2. Assuming the failure state to be \(F\) in which case each web service probably fails, the web service with failure will enter in state \(F\). In addition, \(S\) denotes the final state and the specific web service  
Figure 3: Real-time data process system. Figure 2: Web service flow. denotes a basic logical unit. Therefore, a series of web service flows can be established according to the composition. Based on the information recorded by the data processing system, the transition probability \(p_{ij}\) of the transition from the web service \(i\) to the web service \(j\) can be calculated, which is expressed by the values over the arcs in Figure 4. The collection of \(p_{ij}\in[0,1]\) describes the state transition relations between web services. The transition probability is given by  
\[p_{ij}=\sum_{k=1}^{s}p_{sk}\times[\frac{\left|\textit{interact}\big{(}c_{i},c_ {j}\big{)}\right|}{\left|\textit{interact}\big{(}c_{i},c_{j}\big{)}\right|_{i=1,2,\ldots,N}}]_{c_{i},c_{j}\in S_{k}}\]  
where \(S\) denotes the number of web service composition flows, \(p_{S_{k}}\) denotes the transition probability of the web service flow \(S_{k}\) in the web service composition, \(N\) denotes the number of web services, and \(\textit{interact}\big{(}c_{i},c_{j}\big{)}\) denotes the number of interactions of web service \(i\) with web service \(j\) in the web service composition flow, \(S_{k}\). Therefore, in the case of a web service competition with \(n\) web services, the transition matrix of web service can be expressed as follows. \[p=\left[ \begin{array}{ccc}p_{11}&\cdots&p_{1n}\\ \vdots&\ddots&\vdots\\ p_{m1}&\cdots&p_{mm}\end{array} \right] \tag{1}\]  
Let us assume that the web service composition includes \(n\) web services and that web service \(i\) denotes the initial state. During successful operation of the web service composition, the web service \(i\) is transformed into its final state \(S\) with probability \(p_{is}\). The transition probability is given by the following equation:  
\[p_{is}+\sum\
olimits_{j=1}^{n}p_{ij}=1 \tag{2}\]  
Equation (2) is derived from the web service composition in the absence of any failures. However, in practice, failure of web service compositions is common. Let \(r_{i}\) denote the reliability of the web service. Thus, when the web service \(i\) is invoked, its probability of failure is \(1-r_{i}\). In the Markov model of web service composition with \(n+2\) states, the transition matrix in the existence of failures is given by  
\[\left\{ \begin{array}{lll}q_{ij}&=&r_{i}*p_{ij},i=1,2,\ldots,n;j=1,2,\ldots,n \\ q_{iF}&=&1-r_{i},i=1,2,\ldots,n\\ q_{SS}&=&q_{FF}=1\\ q_{ij}&=&0,\textit{others}\end{array} \right. \tag{3}\]  
The transition matrix of a web service composition with \(n\) web services can be expressed as follows. Figure 4: Web service composition Markov chain. \[Q=\left[ \begin{array}{cc}\hat{P}&C\\ 0&I\end{array} \right]_{(n+2)\times(n+2)} \tag{4}\]  
where \(\hat{P}\) is an \(n\times n\) matrix, \(\left[q_{ij}\right]_{n\times n^{\prime}}\) denoting the single-step control transition probability between \(n\) web services, and \(C\) is an \(n\times 2\) matrix denoting the control transition probability between the absorption states, \(S\) and \(F\). In the web service composition depicted in Figure 4, the control transition matrix is given by  
\[Q=\left[