# QoS-Based Pattern Recognition Approach for Web Service Discovery: Ar_WSDS
## 5 Recognition Strategies  
The system uses two strategies for the recognition of the set of signals from the thresholds KS and PS, in which they are decomposed into atomic signals \(S()\) corresponding to the \(QoS_{i,j}\) constraints, formalized in the following definitions. **Definition 8**. : _Module recognition by key signals is a recognition process that is enabled when the \(\Gamma_{i,j}\) module analyzes \(\Delta KS\) for each \(WS_{g_{i}}\) and obtains \(\varphi_{i,j}\in\ \{1..n\}\). If \(\varphi_{i,j}=0\), the \(S()\) signal is not triggered, and the analyzed element of the \(WS_{g}\) set is discarded from \(WS_{c}\)._  
Equation (4) models the recognition of a \(WS_{g_{i}}\) pattern, when the sum of all its rankings generated from the \(\Gamma_{i,j}\) evaluation in its \(QoS_{i,j}\) is greater than or equal to its corresponding \(\Delta KS_{i,j}\). The numerator of the equation at summation determines the exact proportionality of QoS for the service to be recognized. The denominator determines the total contribution of that parameter to achieve the \(\Delta\)KS of the analyzed service. \[KS\_Recognizer\big{(}WS_{g_{i}}\big{)}=\sum_{j=1}^{|QoS_{i}|}\left(\frac{ \frac{100}{|QoS_{i}|}}{\varphi_{i,j}}\right)\geq\Delta KS_{i,j}\to WS_{g_{i}} \in WS_{c}. \tag{4}\]  
**Definition 9**. : _Module recognition by partial signals is a recognition process, which is enabled when the \(\Gamma_{i,j}\) module analyzes each \(WS_{g_{i}}\) and its \(\Delta\)PS (which is obtained as an average of the QoS of the service of the identical type), and obtains \(\varphi_{i,j}\in\ \{1..n\}\). If \(\varphi_{i,j}=0\), the \(S()\) signal is not triggered, and the analyzed element of the \(WS_{g}\) set is discarded from \(WS_{c}\)._  
\[PS\_Recognizer\big{(}WS_{g_{i}}\big{)}=\sum_{j=1}^{|QoS_{i}|}\left(\frac{\frac{ 100}{|QoS_{i}|}}{\beta\big{(}\varphi_{i,j}\big{)}}\right)\geq\Delta PS_{i,j} \to WS_{g_{i}}\in WS_{c}. \tag{5}\]  
A partial signal activates a partial signal recognition module when the sum of all its rankings generated from \(\Gamma_{i,j}\) in the \(\beta\) penalty function is greater than or equal to the \(\beta(\varphi)\) of the service to be recognized, as formalized in Equation (5). The penalty function allows us to find a value close to 1 when the QoS parameter of the \(WS_{g}\) is at the level of the average and substantial values for parameters far from the average. Thus, it offers the possibility for the system to rank the WSs from the most to the least appropriate, in terms of reaching the respective \(\Delta\)PS. The searching and selecting of the \(WS_{c}\) is performed through the recognition modules. The system begins when the \(S()\) signals containing the information of the atomic WSs are recognized by the \(M()\) function. Its objective is to syntactically verify whether the WS corresponds to the identification requested by the ACM. Then, the signals are analyzed according to their nature and their KS or PS recognition type, the rankings generated by the different recognition modules are calculated, and a list of the \(WS_{c}\) that guarantee \(\Delta\)WSC is generated. Figure 7 depicts the Ar_WSDS recognition system, which receives input from its composition model and the web services to be classified from a repository. The \(M()\)  
Figure 6: WS specification and recognition type. function chooses the primary candidates and sends them to the respective recognition module, which depends on the type of recognition and the QoS type. The system processes and generates the candidates to create the solution pathways that depend on \(\Delta\)WSC. Based on Figure 7, Algorithm 1 was developed, which specifies the Ar_WSDS procedure, as detailed below:  
1. Read data from the \(WS_{g}\) set. 2. Read data from the composition model. Using this procedure, it is possible to specify services and their QoS attributes for each atomic service and its composed service (\(\Delta\) specifications). Information is loaded into the \(WS_{T}\) array. 3. Creation of candidate matrix (\(MC[][]\)).