## 3 Chaotic Activity Filtering Approach Based on Direct Following Relationship
### Chaotic Activity Filtering Approach Based on Direct Following Relationship  
The traditional framework of chaotic activity filtering technology is divided into three stages. In the first stage, chaotic activity is identified from the original log by chaotic activity identification technology. In the second stage, the identified chaotic activities are deleted from the log to obtain the filtered event log. In the third stage, the process model is obtained from the filtered logs using the process discovery algorithm. This article proposes the chaotic activity filtering methods for business processes based on direct following relationships between activities. As shown in Figure 1, firstly, taking the event log with chaotic activities as input, extract the direct following relationship between activities in the event log and the activity set of the log. Then, based on the following relationship between each activity and other activities in the event log, determine which activities in the log are chaotic activities. Finally, remove the identified chaotic activities from the activity set of the original log. The delete method converts the new activity collection into the new event log by deleting activities that are not included in the new activity collection from the original log.  
**Definition 1 (event, trace, event log).** \(L=\) [_<a,b,c>\({}^{2}\)_, _<b,a,c>\({}^{3}\)_] is an example event log of the process activity set [a,b,c], which is composed of two traces <a,b,c> and three traces <b,a,c>. ActSet(L) represents the set of process activities that occur in \(L\), for example, ActSet(L) = [a,b,c]. #(a,L) represents the number of occurrences of activity a in log \(L\), for example, #(a,L) = 5._  
_Extend the function #(a,L) to #(\(\sigma\),L) to count the number of occurrences of a sequence in the log._  
\[\#(\sigma,L)=\sum_{\sigma^{\prime}\in L}\Big{|}\Big{\{}0\leq i\leq|\sigma^{ \prime}|-|\sigma|\big{|}\forall_{1\leq j\leq|\sigma|}\sigma^{\prime}(i+j)= \sigma(i)\Big{\}}\Big{|}, \tag{1}\]  
Figure 1: Chaotic activity filtering based on the direct following relationship.  
Definition 2 (multiple sets): \(X=\{a_{1},a_{2},...,a_{n}\}\) denotes a finite set. \(X\backslash Y\) represents a set of elements in set \(X\) but not in set \(Y\), for example, {a,b,c}\backslash\{a,c\} = {b}. \(X^{*}\) represents the set of all finite sequences on set \(X\). \(\sigma=\)\(a_{1}\),\(a_{2}\),...,\(a_{n}\) > denotes a sequence of length \(n\), where \(\sigma(i)=\)\(a_{i}\) and \(<\) > is an empty sequence. \(\sigma\uparrow X\) is the projection of \(\sigma\) on \(X\), such as <a,b,c,a,b,c> {i,c} = <a,c,a,c>. \(\sigma_{1}\cdot\sigma_{2}\) denotes the concatenation of \(\sigma_{1}\) and \(\sigma_{2}\), for example, <a,b,c> <d,e> = <a,b,c,d,e>.  
Definition 3 (relationship table): Let \(D\) be a relationship table, \(D_{ij}\) be the element in the \(i\) row and the \(j\) column in table \(D\), \(i\) and \(j\) be the activities contained in the log, and \(d_{\beta}=\)\(\#\)(i,j) be the direct following frequency between activities \(i\) and \(j\), that is, the number of occurrences of \(j\) directly following \(i\), and \(d_{ps}=\)\(\#\)(j,i) be the direct preceding frequency between activities \(i\) and \(j\), that is, the number of occurrences of \(i\) directly following \(j\). Take the event log \(L\) = [<a,b,c,d,x>\({}^{10}\), <a,b,x,c,d>\({}^{10}\), <a,x,b,c,d>\({}^{10}\), <a,x,b,c,d>\({}^{10}\)] as an example. Table 1 shows the relationship between activities in the log.