## 3 Design and Methodology
### On/Off Attack
The third criterion, which is the collusion attack frequency (CAF) for each recommender that has feedback in the suspected set \(\mathrm{SS}=\{\mathrm{SF}_{1},\mathrm{SF}_{2},\ldots,\mathrm{SF}_{n}\}\), is determined to identify the malicious recommendations, also called the collusion feedback. Here, the strength of the attack is higher when the frequency of attacks is greater. \[\mathrm{CAF}(\mathrm{SR_{i}},\mathrm{CR})=\frac{\mathrm{FN}(\mathrm{SR_{i}}, \mathrm{CR})}{\mathrm{FN}(\mathrm{SS},\mathrm{CR})} \tag{5}\]  
\[\left\{ \begin{array}{ll}\mathbf{if}\,\mathrm{CAF}(\mathrm{SR_{i}},\mathrm{CR })\geq\mathrm{FL}&\mathbf{then}\,\,\mathbf{move}\,\mathrm{SF}(\mathrm{SR}, \mathrm{CR})\,\,\mathbf{to}\,\,\,\mathrm{CS}\\ \mathbf{else}&\mathbf{move}\,\mathrm{SF}(\mathrm{SR},\mathrm{CR})\,\,\mathbf{to} \,\,\,\mathrm{FS}\\ \mathbf{endif}&\end{array} \right.\]  
The trust model initially calculates the collusion attack frequency (CAF), where \(\mathrm{FN}(\mathrm{SR},\mathrm{CR})\) signifies the number of feedback items that are provided by a particular recommender to a particular user in the suspected set (SS). \(\mathrm{FN}(\mathrm{SS},\mathrm{CR})\) refers to the number of feedback items in the suspected set (SS) that are provided to the same consumer. When the collusion attack frequency (CAF) is more than the feedback limit (FL), the trust model shifts the suspected feedback to the collusion set (CS). However, if this is not the case, the suspected feedback \(\mathrm{SF}(\mathrm{SR},\mathrm{CR})\) is shifted by the trust model from a specific recommender to a particular consumer in the feedback set (FS). The trust model determines the size of the collusion set (CS) to determine the attack scale (AS) for a given consumer, where the malicious recommenders in a recommender's community account for a major percentage of all recommenders who attack the trust model and cause harm to it. The following Equation (6) is used to determine the collusion attack scale (AS):  
\[\mathrm{AS}(\mathrm{CR})=1-\frac{\mathrm{RN}(\mathrm{CS})}{\mathrm{FN}(\mathrm{ CS},\mathrm{CR})} \tag{6}\]  
Here, \(\mathrm{RN}(\mathrm{CS})\) refers to the number of malicious recommenders within the collusion community and \(\mathrm{FN}(\mathrm{CS},\mathrm{CR})\) refers to the number of malicious feedback items for all consumers within the collusion set (CS). The trust model then determines the attack target scale (ATS), which gives a malicious feedback rate for a particular user. The following Equation (7) is used to determine the attack target scale (ATS):  
\[\mathrm{ATS}(\mathrm{CR})=\frac{\mathrm{FN}(\mathrm{CS},\mathrm{CR})}{\mathrm{ FN}(\mathrm{AFS},\mathrm{CR})} \tag{7}\]  
Here, the \(\mathrm{FN}(\mathrm{CS},\mathrm{CR})\) refers to the feedback number obtained from malicious recommenders. \(\mathrm{FN}(\mathrm{AFS},\mathrm{CR})\) is the feedback number that all feedback sets have given, in which the set of malicious recommenders belongs to all recommenders who have evaluated a particular consumer. Finally, the strength of all collusions for a given user can be determined by calculating the collusion attack strength (CAS) using the trust model. For this, the value of all attack target scales (ATS) is considered, after which the collusion attack strength (CAS) is computed as follows (8):  
\[\mathrm{CAS}(\mathrm{CR})=\frac{\sum_{i=1}^{n}\mathrm{FN}(\mathrm{CS_{i}}, \mathrm{CR})}{\sum_{i=1}^{n}\mathrm{FN}(\mathrm{AFS_{i}},\mathrm{CR})} \tag{8}\]  
The collusion attack algorithm given below will be employed by the trust model to identify collusion groups (Algorithm 2).