Real-Time Repair of Business Processes Based on Alternative Operations in Case of Uncertainty

Owing to the continual evolution of business processes, differences often occur between observable behavior in the event log and the actual operation of the given process model. Whether an iterative and observable deviation occurs between the event log and the process model is in general uncertain. Existing repair techniques add only observable deviations in a fixed manner, which makes it difficult to consider the fitness and the precision of the results simultaneously. To solve this limitation, this study proposes a method of repair that can improve precision as much as possible without affecting the fitness of the results as well as the number of repair-related activities. Patterns of behavior that cannot be replayed are determined by refined reachable activity structures and conformance checks of behavioral relationships. They are optimized by constructing repair or configuration operations. The two operations can be switched based on the identification of iterative observable deviation in the given pattern of behavior during repair. To assess this, datasets from simulated and empirically acquired business processes were used. The proposed method improved the precision of six datasets by 12% on average. Deviations were repeatedly generated by the cycle, because of which the average precision improved by 21% on three datasets with loops.


I. INTRODUCTION
A. RESEARCH BACKGROUND Process mining involves using knowledge extracted from event logs to formulate a process model, and improving its performance by using a variety of technologies and tools [1]. A business process can be analyzed through process mining from three perspectives: process discovery, conformance check, and process enhancement [2]. Process discovery and the conformance check are the most important parts of process mining [3], [4]. Model repair is a recently developed type of process mining between process discovery and the conformance check that considers behaviors that cannot be replayed on the process model, and forms a repaired process model that is as similar as possible to the original model [5].
The associate editor coordinating the review of this manuscript and approving it for publication was Emanuele Crisostomi .
Model repair is executed according to the differences detected by the conformance check [6]. The conformance check can be applied to a variety of settings, including compliance auditing, model maintenance, and automated process discovery. The scenario in which the event log cannot be replayed on the process model can be identified by a compliance audit, i.e., as non-replayable behavior [7]. Model maintenance can be used to diagnose not only non-replayable behaviors but also behaviors unique to the given model [8]. Automatic process discovery is the adjustment of the process model according to the output of the conformance check. The initial model is automatically adjusted by removing behaviors unique to the model or adding behaviors unique to the event log. To reduce the elements of deviation between the event log and the process model to as few as possible, the A * search method can be used to construct the optimal alignment [9]. The deviations with the same label and location are regarded as one repair activity. It is worth noting that in order to calculate the fitness and precision accurately, occurrence of each deviation needs to be calculated as an independent cost (this includes the iterative occurrence of deviation) [10].
The criteria used to assess model repair include fitness, precision, simplicity, and generalization, which are independent and affect each other. Fitness refers to the degree of replay of the event log in the process model, and precision is the accuracy of the replay. Simplicity determines the structural complexity of the repaired model while generalization represents the similarity between the repaired model and the initial model [11]. The fitness and precision are most important for assessing the performance of model repair. The event log should not only be completely replayed to the process model by repair but the accuracy of replay should be improved as much as possible (i.e., if an activity occurs independently or iteratively in the event log, the corresponding activity in the process model should also occur in a consistent manner). Model repair deals with deviation between the event log and process model during replay, which includes two types [12]: i) the observable deviation only occurred in the event log. The repair performance of this deviation involves fitness and precision. ii) The skip deviation produced by the process model only affects fitness [13]. The existing repair methods mainly include the following two in terms of precision: i) each observable deviation is inserted on the process model using self-loop, which repairs all iterative observable deviations accurately [14], [15]. This technology can easily lead to under-fitting when there are few iterative deviations in the event log, i.e., precision is too low [16]. Precision is improved to a certain extent by building into a concurrent substructure the observable deviations in the event log that follow directly 1 [17]. ii) The conflict substructure constructed by the invisible transition and the observable deviation is added to the process model. The precision after repair is one when the iterative activity is not contained in the initial process model [13]. However, this comes at the cost of fitness when iterative deviation is produced by the self-loop in the event log. Fig.1 (a) and (b) describe the two repairs of the process model w.r.t the event log L = ABBBCDE, respectively. B, B 1 , B 2 and D are only observed in the event log. B 1 and B 2 are produced by the iteration of B. All deviations are replayed, whereas B and D are not accurately replayed in Fig.1 (a). The fitness after repair is one, but precision is significantly affected in this case. As shown in Fig.1 (b), L needs to be preprocessed as L = ABCDE for measure of precision. The iterative activity produced by self-loop is not contained in initial process model in Fig.1 (b), so the precision after repair is one. B 1 and B 2 cannot be replayed, so the fitness after repair is less than one in Fig.1 (b). 1 The directly following observable deviations are adjacent deviations in the event log, which can be repaired at the same place of model.
The substructure is used here according to a single-in and single-out network structure, which is included in the process model.

B. SOLUTION AND CONTRIBUTIONS
With the aim of solving the above problems, the new repair method is proposed in this paper. The appropriate operation is chosen to repair the following two behavioral patterns that cannot be replayed [18]. 1) The behavioral pattern containing iterative observable deviation. Although the non-iterative observable deviation in this behavior pattern cannot be accurately repaired, all observable deviations can be repaired using the self-loop inserts. 2) The behavioral pattern without the iterative observable deviation. The principle of configuration optimization is introduced to the model repair technology in this case. The customized business process is initiated by a subset of the reference process model, and such processes are varied according to the requirements of stakeholders under the given constraints [19]. This paper proposes that common and variable parts in a configurable process are behaviors that can and cannot be replayed, respectively, between the event log and the process model. They are also respectively called fitted and unfitted behaviors. Configuration adds observable deviation on the process model by the conflict substructure that consists of the invisible transition and this deviation. All observable deviations in the behavioral pattern without iterative observable deviation can be accurately repaired by configuration. This paper focuses on improving precision as much as possible while ensuring that the fitness is 1 and without increasing the number of repair activities (the simplicity and generalization are not affected). Fig.2 is the improved repair of Fig.1 (a) and (b). The noise problem is beyond the scope of this article, and the event log is considered as a set of filtered sequences of execution [20]. VOLUME 9, 2021 The remainder of this article is structured as follows: The preliminaries required for real-time repair are described in Section 2. The differences between the event log and the process model are identified from two perspectives in Section 3, and real-time repairs to various unfitted behavioral patterns are introduced in Section 4. The feasibility and effectiveness of the proposed method are verified in Section 5 through experimental evaluation, and Sections 6 and 7 respectively describe related work in the area and the conclusions of this study.

Definition 1 (Event Log):
The event log is a six-tuple L = (E, C, µ, , o, ℵ, ∝), where E represents all events in the log, ∀e ∈ L. c is uniform identifier for a trace that occurs multiple times during system operation, ∀c ∈ C. µ associates each event in a trace to a case, µ(e i ) = c. assigns a label to corresponding an event, (e) = a, ∀a ∈ ℵ. o converts a label into an event, o(a) = (e). ℵ is the label set of all events, and (e) ∈ ℵ, ∀e ∈ L. ∝ represents the weak order relationships between adjacent events in the log, ∝⊆ E × E. Definition 2 (Labeled WF-Net System): A tuple N = (P, T , F, Z , λ, σ, M i ) is set as the labeled Petri net system, where P is a finite set of places, T is a finite set of transitions, F represents the flow relationships between adjacent places and transitions,F ⊆ (P ≺ T ) ∪ (T ≺ P). Z is a finite set of labels in the Petri net system,Z = Z ∪ {τ }. λ assigns labels to the corresponding transitions in the Petri net system, λ : T ← Z ∪{τ }, and ∀λ(t) ∈ Z ∪{τ }. σ converts a label into a transition, σ (a) = λ(t). M i is the initial marking in net system N . This paper restricts the Petri net system to a safe one, and thus M i (p) = 1. The labeled Petri net system can be regarded as a labeled WF-net system N = (P, T , F, Z , λ, σ, M i , p i , p f ) if and only if |p i | = 1 ∧ |p f | = 1, where p i ∈ P and p f ∈ P represent the initial and the final places in the net system, respectively.
Definition 3 (Unfitted Behavioral Pattern): Behavioral pattern consists of several activities in event log or process model and behavior relationship between them. Model repair exclusively considers differences produced when the event log cannot be replayed on the process model. The unfitted behavior is caused by the corresponding patterns between the event log and the process model during replay. Each pair of the corresponding patterns that causes unfitted behavior can be merged into an unfitted behavioral pattern based on the conformance check of behavioral relationships. B (L/N * )(+\×\≺) is the behavioral pattern produced by unfitted behavioral relationships (concurrency/causality/conflict). B (L/N * )⊆ represents the behavioral inclusion pattern, which contains behavior that occurs only in the event log or the process model. B (e) and B λ(t) represent an activity that can be observed in the event log but cannot be captured in the process model, and an activity in the process model that prevents the event log from being replayed, respectively.
Definition 4 (Optimal Alignment): Alignment is a set of comparisons between the executive sequences in the event log and the corresponding firing sequences in the process model, and is denoted by ξ * . Let M LN * and M L /M N * be sets of synchronous and asynchronous moves produced by the alignment, respectively. The deviation results from either M L or M N * ; thus, it is divided into the following two types: i) the insert deviation that can be observed on the event log but cannot be captured in the process model is denoted by Esert( (e)), ∀e ∈ L; ii) the skip deviation that belongs only to the process model and causes the event log to not be replayable on the process model, where this is denoted by Skip(λ(t)), ∀t ∈ T . The distance between the corresponding activities in the set of asynchronous moves is set to one, and otherwise to zero: Dis(M L ) = Dis(M N * ) = 1 and Dis(M LN * ) = 0. Optimal alignment minimizes the distance between the event log and the process model by comparing the corresponding sequences, Dis(ξ op ) ≤ Dis(ξ ), ξ op ∈ ξ * , and ∀ξ ∈ ξ * .
Definition 5 (Configured Replay Graph): The configured replay graph is a four-tuple C G = (C, T , Add , Hide ). C represents the set of execution configurations of reachable activities during replay. Because the execution configuration of any activity is the set of several sequences of reaching this activity from an initial activity, the set of execution configurations in the reachable activity structure is C(℘). Based on the nesting performance of the cycle, it can be inferred that there is no the maximized size of the set of execution configurations in the reachable activity structure in cycle.
is the set of labels that connect two adjacent execution configurations, Add is the label set of activities that can be observed on the event log but cannot be captured in the net system, ∀Add( (e)) ∈ Add . Hide is the label set of activities in the net system that prevent the event log from being replayed properly, ∀Hide(λ(t)) ∈ Hide .
Definition 6 (Iterative Insert Deviation): The iterative insert deviation is a special deviation produced by the selfloop in the event log. The iterative insert deviation includes the following two types: i) the insert deviation that is produced only by the self-loop, IEsert (e) n ; ii) the same insert deviation that is produced by the both the self-loop and the unfitted behavior, IEEsert (e) n . n denotes the number of iterations of the iterative insert deviation. The non-iterative deviation produced by unfitted behavior is included in IEEsert (e) n . Thus, the number of iterations of IEEsert (e) n is counted from the second occurrence, whereas IEsert (e) n needs to record all occurrences. The iterative insert deviation may occur once or multiple times in different cases of the event log and the cost per iteration is one.

Definition 7 (The Repair Operation of Unfitted Behavior):
The repair operation detects the complete information of deviation by the optimal alignment and repairs the process model using the self-loop insert or invisible transition skip, R O . According to the different types of deviations, the repair operation can be divided into the following two parts: i) the insert/skip deviation can be repaired by the self-loop or invisible transition, R O (a); ii) the directly following deviations that satisfy a certain behavioral relationship can be constructed    Configuration optimization analyzes all mismatched behaviors between business processes. However, this paper considers only the unfitted behavior in the replay, C(L♦N * ) uf . The configuration operation adds or removes the conflict substructure formed by the configurable behavior and invisible transition on the process model, C O [21]. Configuration operations can be divided into the following two types according to configurable behavior: i) the configurable activity is added or hided on process model by invisible transition, C O (a); ii) the configurable substructure is added or hided on process model by invisible transition, C O (s). Fig.4 describes the configuration operations of added activity and removed causal substructure (skip and remove are consistent).
Some of the symbols in this section and their usages are recorded in the table 1.

III. DIAGNOSIS OF THE PROBLEM
The event log and the process model may have exhibit unexpected and inconsistent behaviors during operation. The event log cannot be replayed on the process model, and leads to unfitted behavior. This problem needs to be solved by model repair. This section introduces two methods for the diagnosis of differences in unfitted behavioral patterns from different perspectives.

A. PARTITION OF BEHAVIORAL PATTERNS
The refined reachable activity structure is improved on the basis of the refined process tree [22]. Fragments of the reachable activity structure are divided layer by layer from whole to part according to different behavior relations. When the reachable activity structure is refined, all corresponding fragments that satisfy the shortest distance can be discovered under the given constraints.
Definition 9 (The Refined Reachable Activity Structure): R(℘) = (conc, seq, conf , C(R(℘))) refines the reachable activity structure into several fragments according to different behavioral relationships, i.e., concurrency, sequence, and conflict (a single activity that cannot be divided by these three behavioral relationships can be regarded as an independent behavioral pattern). conc represents the concurrency fragment, in which the activities occur simultaneously in any order, seq represents the sequence fragment, in which the behavioral relationship between the immediately following activities is causality, and conf represents the conflict fragment, where activities on different branches are mutually exclusive. The construction of the refined reachable activity structure during replay needs to satisfy certain constraints, that is, C(R(℘)). In order of priority, the rules are as follows: pre(seq) > pre(conc, conf ) represents the preferential division of the sequence fragment, and C(R(℘ N * )) ≈ C(R(℘ L )) shows that refining the reachable activity structure of the process model under this constraint must minimize the distances between its behavioral patterns and the corresponding behavioral patterns in the event log [23]. Fig. 5 (a) and (b) shows the refined reachable activity structures of the event log L 1 and the network system N * , respectively. The dashed orange, green, and blue lines are used to divide the concurrency fragment, sequence fragment, and conflict fragment, respectively, while the dashed purple line represents the initial activity and the final activity of the reachable activity structure.
According to the structures above, all corresponding fragments that satisfy the shortest distance can be obtained, and are recorded as follows: VOLUME 9, 2021 The resulting corresponding fitted and unfitted behavioral patterns are:

B. COLLECTING COMPLETE INFORMATION ON THE DEVIATION
This section describes the following: i) the identification of iterative insert deviation, ii) the detections of occurrence and location of non-iterative insert deviation, and iii) the observation of behavioral relationship between several non-iterative insert deviations. These three kinds of deviation information are served to the repair operation in definition 7.

1) IDENTIFYING ITERATIVE INSERT DEVIATION
The iterative insert deviation is a special type of deviation, meaning that it occurs if and only if the behavior in the event log passes through a self-path of the loop.
The corresponding behavioral patterns between the initial network system N * in Fig. 6 and the event log L 2 are merged based on the conformance check of the behavioral relationship. The consistent behaviors between the corresponding patterns are directly merged into the fitted behavioral patterns. The fitted and unfitted behavioral patterns are recorded as follows: The conformance check based on the behavioral relationship can detect the unique behavior on network system and the unfitted behaviors (the unique behavior on network system is B N * ≺ (EF)). B N * ≺ (EF) is directly retained without further analysis, and the behavioral patterns used for replay are recorded as: The event log is completely replayed on the process model based on above behavioral patterns, resulting in the following the optimal alignment [24]: The red letter in the optimal alignment above represents IEsert (e) 1 . Even if IEsert (e) 1 occurs only once, it is considered an iterative insert deviation: for example, IEsertC 1 , and IEsertD 1 in ξ op1 and IEsertB 1 and IEsertC 1 in ξ op2 . The purple dotted line and solid red line in Fig. 6 show the repair of these iterative insert deviations and SkipD, respectively. The consistency measurements between the repaired N * and L 2 are f = 0.91 and p = 0.85, respectively. The type of deviation of D in ξ op2 is IEEsertD 2 = EsertD∪IEsertD 1 . In terms of precision, the repair of the black solid line in Fig. 6 cannot accurately replay the non-iterative insert deviation EsertD in IEEsertD 2 . The consistency measurements between the repaired N * and L 2 are f = 1 and p = 0.90, respectively.

2) DETECTING NON-ITERATIVE INSERT DEVIATION
The occurrence and location of non-iterative insert deviation can be determined by optimal alignment. Because the optimal alignment is produced by fitted and unfitted behavioral patterns, the behavioral relationship between the directly following deviations can be discovered. Several directly following deviations are constructed into a substructure according to the detection-related information in order to reduce the size of the event log by as much as possible.
To detect complete information on non-iterative insert deviations, all corresponding behavioral patterns produced by the refined reachable activity structures are set as follows: The fitted and unfitted behavioral patterns between the event log and the net system are recorded as follows: The following optimal alignment can be obtained based on the behavior relation that cannot be replayed (the iterative insert deviations are contained in the event log L) [25]: The background colors are used above to distinguish between iterative insert deviations and non-iterative insert deviations produced by different unfitted behavioral patterns. Thus, the deviations detected by optimal alignment can be divided into the following five groups: IEsertB 2 , IEsertB 1 , EsertC, (IEEsertD 3 , EsertE, EsertF), and (SkipG, SkipH ). The following two methods are used to determine their repair locations: i) (e) ∈ M L . The location is the rear place of transition in the last synchronous movement before the asynchronous movement that causes this deviation, The pre and rear places of the transition in the asynchronous movement produced by this deviation are used as the start and the end of the invisible transition, respectively, that is, loc(Skipλ(t)) = • (σ (λ(t))) ∪ (σ (λ(t))) • . The two groups of directly following non-iterative insert deviations can be

C. DISCOVERING CONFIGURABLE BEHAVIOR
Configuration is an optimization technique that renders compatible mismatching behavior between the reference process model and the customized business process. The event log that does not contain the iterative insert deviation can be considered a reference process model during the discovery of configurable behavior [26]. This section introduces the configured replay graph based on the fitted and unfitted behavioral patterns produced by the event log replay on the process model. The configurable behavior between the event log and the process model can be discovered by the configured replay graph, and is served to the configuration operation in definition 8.

IV. REAL-TIME REPAIR
To improve the consistency of the business process as much as possible, the process model repair with respect to the event log needs to improve in precision and maintain its fitness. It is difficult to balance fitness and precision using the available methods. This problem is solved by the realtime repair proposed in this section.

A. PRINCIPLE AND EFFECT OF REAL-TIME REPAIR 1) LIMITATIONS OF REPAIR
The insert deviation produced by the self-loop in the event log occur an infinite number of times. Otherwise, it is occurred independently. All of deviations in a dataset can be replayed does F equal one, i.e., C cos t = 0. However, only if all of | (e)| and |λ(σ ( (e)))| are both 1 or ∞ does P equal one. The repair for the skip deviation does not affect precision. This deviation is removed by the invisible transition in any case. Therefore, existing methods can be divided into the following two types in terms of the repair of insert deviation: i) the insert deviation is repaired using the self-loop, i.e., R o (D). The corresponding activity of this deviation is iterative in the process model ( |λ(σ ( (e)))| = ∞). All insert deviations in a dataset can be replayed, but the noniterative insert deviation cannot be accurately replayed. That is, ii)The insert deviation is configured by adding conf c , i.e., C O (D). The corresponding activity of this deviation is non-iterative in the process model ( |λ(σ ( (e)))| = ∞). The iterative insert deviation cannot be replayed, because of which fitness is affected to a certain extent. That is, P(C O (D)) = 1 and F(C O (D)) ≤ 1 ( ) [13]. It's worth noting that the iterative activity produced by self-loop is not contained in the initial process model.

2) OPTIMIZATION OF REPAIR
The real-time repair proposed in this section can repair each unfitted behavioral pattern independently. The fitness and precision of a dataset depend on the total costs VOLUME 9, 2021 of repairable and accurately repairable deviations in all behavioral patterns, respectively. The method of detection described in Section III checks for the iterative insert deviation in the given unfitted behavioral pattern. The repair and configuration operations can be switched to optimize the behavioral patterns according to the different results [27].
The repair operation is executed to repair the specified behavioral pattern, i.e., R O (IBP). F(R O (IBP)) = 1 in any case, but P(R O (IBP)) < 1 is affected by . On the contrary, the configuration operation is executed to repair the other behavioral pattern, i.e., The improvements in real-time repair are as follows: i) all deviations can be replayed by ). Therefore, the proposed method can improve precision as much as possible under the premise of perfect fitness. Table 2 presents the measure formulas and symbols of various repair methods. Fig. 8 describes the basic principle of real-time repair. It checks the unfitted behavioral patterns using iterative insert deviations. The repair operation is executed if the result returns an affirmative (i.e., the pattern contains the iterative insert deviation). By contrast, the configuration operation is executed. As shown in Fig. 8, B r represents the fitted behavioral pattern, B +/≺ , B ≺/× , and B L⊆+ are the unfitted behavioral patterns with insert deviations, and B ×/+ and B N * ⊆≺ are unfitted behavioral patterns with skip deviations. Thus, no check is executed in B ×/+ and B N * ⊆≺ .

B. REAL-TIME REPAIR OF DIFFERENCES PRODUCED BY BEHAVIOR PROFILE
The behavior profile in the business process can be included in three behavioral relationships: concurrency, causality, and conflict. This section introduces real-time repair to the unfitted behavioral pattern produced by the behavioral relations above.

1) UNFITTED BEHAVIORAL PATTERN PRODUCED BY CONCURRENCY AND CAUSALITY
The concurrent/causal pattern refers to the concurrent behavioral relationship included in the pattern of the event log, whereas the causal behavioral relationship is included in the corresponding pattern of the process model [28]. Otherwise, no repair is needed. The following two operations can be interchangeably performed in the concurrent/causal pattern according to the results of checking for iterative insert deviation: i) the occurrence and location of iterative insert deviation are uncertain; therefore, the repair operation needs to be implemented according to the deviation-related information detected by the optimal alignment; ii) the configuration operation involves adding or hiding the configurable behavior to or from the process model by constructing a conflict substructure comprising configurable behavior and an invisible transition and through which each repaired deviation can occur once at most.
Example 1: The fitted and unfitted behavioral patterns between the event log L 3 and the initial net system N * in Fig. 9 are identified during replay as follows: B ≺+ doesn't need to be repaired, and the behavioral patterns used for repair are denoted by: According to the different results of checking for the iterative insert deviation in the unfitted behavioral pattern, two methods of repair are described in Fig. 9: i) the event log L 3 is changed into L 3 , whereas the fitted and unfitted behavioral patterns are unchanged. Iterative insert deviations and non-iterative insert deviation are produced by the unfitted patterns between N * and L 3 according to definition 5, that is, IEsertD 2 and EsertD. IEsertD 2 and EsertD at different places, and regarded as two repair activities [29]. The iterative insert deviations are included in B +/≺ (CD), so two repair activities are inserted into N * using two self-loops. The red dashed line and the solid green line represent the repair operations when the given pattern contains the iterative insert deviations. EsertD cannot be accurately repaired using selfloop insert. ii) The configuration operations are executed when L 3 = L 3 . Two constructed substructures are configured on the net system N * , as shown by the dashed black line and the solid green line shown in Fig. 9 [30]. The iterative insert deviation is not included in B +/≺ (CD), allowing all insert deviations to be accurately repaired by the configuration operations. The green places represent locations in common between the configuration operation and the repair operation.

2) UNFITTED BEHAVIORAL PATTERN PRODUCED BY CONCURRENCY AND CONFLICT
The pattern of concurrency/conflict refers to the behavioral relationship in the pattern of the event log as concurrency, while the behavioral relationship in the corresponding pattern of the process model is identified as conflict. Otherwise, it is a pattern of conflict/concurrency. As this pattern contains only the skip deviation, the improvements in precision and fitness are identical for both operations. The pattern of concurrency/conflict can switch between the operations depending on whether the unfitted behavioral pattern contains the iterative insert deviation. The deviation is diverse when the causality/conflict pattern contains an iterative insert deviation; thus, the repair operation should be performed based on the deviation-related information detected by the optimal alignment. Otherwise, the configuration operation is executed. Because the insert deviation is not included in the conflict/concurrency pattern, both operations can have the same effect on it in any case. This is denoted by R O ⇔ C O (B (a,a )×/+ ) = Skip/Hide(λ(t), λ(t )) (i.e., the behaviors on the two branches are skipped separately).
Example 2: The fitted and unfitted behavioral patterns between the initial net system N * in Fig. 10 and the event log L 4 are considered as follows: According to the different results from checking for the iterative insert deviation, two operations can be used to repair B +/× (BC): i) the event log L 4 is changed to L 4 . The iterative and non-iterative insert deviations are produced, i.e., IEEsertC 3 and EsertC. The iterative insert deviation is included in B +/× (BC), after which the two repair activities are inserted into N * using two self-loops. The dashed red line in Fig. 10 indicates repair operations of EsertC and IEEsertC 3 , respectively. EsertC cannot be accurately repaired using a self-loop insert. ii) The configuration operation is executed when L 4 = L 4 . The black dashed line shows the configuration of the conflict substructure in the configured replay graph. The iterative insert deviation is not included in B +/× (BC). Thus, all insert deviations can be accurately repaired by the configuration operation. The solid green line in Fig. 10 shows the repair made to B +/× (B ≺/≺ (B +/+ (BC)B L/N * (D)B ≺/≺ (EF)), and B +/≺ (BC) has been repaired as B +/+ (BC). The insert deviation is not present in this behavioral pattern, which allows all deviations to be accurately repaired by the repair or configuration operation. The black place represents the location of the configuration operation, and the blue and purple places connect configurable and common activities between repairable activities and configurable activities, respectively.

3) UNFITTED BEHAVIORAL PATTERN PRODUCED BY CAUSALITY AND CONFLICT
The pattern of causality/conflict refers to a behavioral relationship in the pattern of the event log characterized by causality, while the behavioral relationship in the corresponding pattern of the process model is conflict. Otherwise, it is a pattern of conflict/causality. The deviations or configurable behaviors produced by the causality/conflict pattern originate from the branch with the least number of activities in the conflict pattern. The repair operation is performed on the process model based on the deviation-related information detected by the optimal alignment when the pattern of concurrency/conflict includes the iterative insert deviation. Otherwise, the configuration operation is executed according to configurable behavior in the configured replay graph. Because the conflict/causality pattern does not contain insert deviation, the effect of both operations is the same (i.e., behaviors on the two branches of the conflict pattern are skipped separately).
Example 3: The fitted and unfitted behavioral patterns between the initial network system N * in Fig. 11 and the event log L 5 are recorded as follows: According to the results of checking for the iterative insert deviation, B ≺/× (BC) can be repaired in the following two ways: i) The event log L 5 is changed to L 5 . The iterative and non-iterative insert deviations are produced, i.e.,  Fig. 11 indicates repair operations. IEEsertD 3 and EsertD at the same places, which are regarded as a repair activity. IEsertC 2 and IEEsertD 2 can be accurately repaired, whereas EsertD cannot be accurately repaired. ii) The configuration operation is executed when L 5 = L 5 . The black dashed line represents Add(D) as a substructure to be configured in N * . The iterative insert deviation is not included in B ≺/× (B ≺/≺ (BC)D), which allows the insert deviation to be accurately repaired by the configuration operation. In Fig. 11,

4) REAL-TIME REPAIR TO DIFFERENCES PRODUCED BY BEHAVIOR INCLUSION
The behavior inclusion pattern refers to behavior included in a pattern that cannot be captured on the process model but can be exactly recorded in the event log. On the contrary, only behavior that disables the event log from being replayed is considered. All activities in the complete behavior inclusion pattern are constructed into a substructure according to behavior type for repair. The partial behavior inclusion in a conflict pattern means that the event log contains a conflict pattern and the process model can capture only behavior on one branch of this pattern. Otherwise, it does not need to be repaired. The resulting differences are a combination between common and specific behaviors in the event log. There can be uncertain occurrences of an iterative insert deviation in an unfitted behavioral pattern. The relevant operation is thus performed according to check result of iterative insert deviation. for each t j ∈ T do 4: for each a k ∈ ℵ ∪ Z do 5: if (e i ) = λ(t j ) = a k ∧ B +⊥ (a 1 , a 2 ) then 6: if ψ(I cos t) = 0 then 7: C O ← (Add(a 2 ) ∪ Hide(a 2 )) 8: else 9: Esert(a 2 ), sl− IEsert( (e i ))) 10: end 11: end 12: if (e i ) = λ(t j ) = a k ∪ a k ∧ B +/× /B ×/+ (a 1 , a 2 ) then 13: if ψ(I cos t) = 0 then 14: C o ← N A/H(a 1 ,a 2 ) , 15: else 16: 18: end 19: if (e i ) = λ(t j ) = a k ∧ B ⊥\× /B ×/⊥ (a 1 , a 2 ) then 20: if ψ(I cos t) = 0 then 21: C O ← (Add(a 1 /a 2 )/(Hide(a 1 ) ∪ Hide(a 2 ))) 22: Example 4: According to the different types of behavior inclusion patterns, the fitted and unfitted behavioral patterns between L 6 and the initial net system N * in Fig. 12 can be set as follows: Because B L 6 ⊆ • × ((C)B L 6⊆≺ (ED)) is the unfitted behavioral pattern caused by partially conflicting behavior inclusion, it contains both insert and skip deviations. According to the complete information on the deviation and the results of checking for the iterative insert deviation, two methods are used to repair the unfitted behavioral patterns in Fig. 12: i) L 6 is changed to L 6 . The iterative and non-iterative insert devi-ations are produced, i.e., (IEsertC 2 , IEEsertG 3 , IEEsertH 3 ) and (EsertD, EsertE, EsertF, EsertI ). Seven repair activities are inserted into N * using seven self-loops. The red dotted line and the solid green line in Fig. 12 describe the repair operations. In this case, all non-iterative insert deviations cannot be accurately repaired. ii) The configuration operations are executed when L 6 = L 6 . The black dashed line and the solid green line describe the configuration operations on N * . The iterative insert deviation is not included in the unfitted behavior pattern, so all insert deviations can be accurately repaired by the configuration operations. The solid green line in Fig. 12 shows the repair made to B N * ⊆≺ (JK ). No insert deviation is contained in B N * ⊆≺ (JK ). Thus, all deviations can be accurately repaired by the repair or the configuration.

C. SUBSTRUCTURE OF DEVIATIONS
Precision needs to be improved in the behavioral pattern containing an iterative insert deviation. The directly following non-iterative insert deviations detected by the optimal alignment can be constructed into a substructure, i.e. the several deviations are regarded as a substructure. Thus, the degree of accurate replay is improved in this case (i.e., the number of events in the event log that need to be accurately repaired are reduced, whereas the number of events that can be accurately repaired remains the same). Esert( (e 1 ), (e 2 ), . . . , (e n )) +/≺ represents the directly following non-iterative insert deviations that satisfy the concurrency/causality relationship. The size of the event log cannot be reduced by the conflict substructure; thus, the directly following non-iterative insert deviations are composed based only on concurrency and causality relationships.

A. EXPERIMENTAL SETUP
This section describes the results of a comparison between the method proposed in this article and the existing method 14 . An experiment was performed on a 64-bit Win10 computer with Inter(R) Core(TM) i5-2.11 GHz, with 8 GB of memory space and JDK1.7. The method proposed here involved the following two improvements: i) the two operations were switched according to whether there was an iterative insert deviation in the unfitted behavioral pattern; ii) in case of an iterative insert deviation in the pattern, the directly following non-iterative insert deviations were constructed into a substructure based on different behavioral relationships.

1) TOOL SUPPORT
The performance of the existing method was verified using the Prom framework. To ensure fairness of the experimental results, we wrote a plug-in called M-repair into JAVA to verify the fitness and precision of the repaired dataset according to the different functions implemented by the two methods. This plug-in is publicly available on Google Cloud, and a set of data have been attached for testing. 2 The experiment used JAVA to write a plug-in PSLG similar to CPN-Tools, which automatically generated event logs in txt format or xes format 2 https://drive.google.com/file/d/1iFsfW4XJJRrXPk8s7rw8xO8K 40OW0-LQ/view?usp=sharing. by taking advantage of the random triggering of activities in the business process.

2) DATASETS
The experiment used datasets from an artificial business process and a real-life business process for evaluation, denoted respectively by D a and D r . The real-life business process was from a life insurance company in China. It described processes from the application of the policy to the signing of the contract. The set of firing sequences consistent with these behaviors was obtained by simulating the business process. The unfitted behavioral patterns in the datasets were divided into the following three types: i) unfitted behavioral patterns caused by concurrency/causality/conflict/single activity, ii) behavior inclusion patterns, and iii) unfitted behavioral patterns caused by the cycle. To guide the normal conduct of the experiment, we changed the firing sequences and obtained the given process model according to the three unfitted behavioral patterns above. The three corresponding event logs were automatically extracted from each business process based on random self-loop insert activities using the PSLG plugin. Each business process was related to the three process models. An event log and a process model formed a dataset. The experiment consisted of three business processes, for a total of nine event logs and given processes. Therefore, the set of datasets of the experiment contained artificial datasets,   real-life datasets, and datasets with loops. The automatically generated event log contained 500 cases, for a total of 10 representative cases selected from the initial event log to ensure that all events and the behavior relations between them as recorded in the event log were observed. The 10 representative execution sequences were repeated 200 times based on the number of occurrences of each sequence, so that the event log for each dataset contained 2000-2800 traces. In this way, a business process yielded three sets of sequences of execution from different event logs. These sequences, along with the set of initial firing sequences of the business process, were optimally aligned to form three datasets. The information of nine datasets in experiment were recorded in table 3.
The real-life business process of the experiment was shown in Fig. 13. The red ellipses indicate seven observable activities randomly inserted into the business process using seven self-loops.

3) EXPERIMENTAL STEPS AND CRITERIA
The experimental steps consisted of the following three parts: i) the replay fragments in the dataset were divided according to the different behavioral relationships under the given constraints. Then, the unfitted behavioral patterns produced by them were accurately identified. ii) The plug-in M-repair determined whether the iterative insert deviation was present in the unfitted behavioral pattern and chose the appropriate operation for the repair process model accordingly. iii) The fitness and precision of the repaired datasets were automatically measured. Because real-time repair required switching operations, I cos t BP > 0 was used to identify the iterative insert deviation of the behavioral pattern in the plug-in.

4) PLUG-IN OPERATION INTERFACE
Fig. 14 shows the display interface of a dataset executed in the plugin M-repair. The input parameters include the input variables and invariables. The button (called ''calculation results'') was used to obtain the fitness and precision of the dataset repaired by the two methods. In Fig. 14, the upper-left corner shows the area of various input parameters required by the experiment, the left side of the lower-left corner contains detailed comments on the types of variables, and the right side shows the area of outputs of the values of fitness and precision obtained when the dataset was repaired by the two methods.

5) EXAMPLES OF THE PRE-AND POST-REPAIR PROCESS MODELSES
A real-life business process is used as an example and an observable activity is generated by the self-loop. The event logs were extracted from the business process using the PLSG plug-in. Unfitted behaviors were obtained between the given process model and the event log. The initial process model and that after real-time repair are shown in Figs. 15. It was mined by the Prom framework. The fitness and precision were 1 and 0.8 when the event logs were replayed, as shown in Fig. 15. Fig. 16 extracts the sub-model containing the repair operation for a behavioral pattern and the configuration operation for the other behavioral pattern (t 15 is the invisible transition). This sub-model is represented by the purple box.  The conflict substructure constructed by t 14 and t 15 is the execution of the configuration operation, whereas the selfloop insert transition t 25 represents the repair operation of the observable deviation. The repair and configuration operations are marked with blue and red dotted boxes in Fig. 16, respectively. The two operations can be alternatively performed according to whether there is iterative insert deviation in the unfitted behavioral pattern. The dataset contained only one unfitted behavioral pattern with an iterative insert deviation; there were thus seven configuration operations and a repair operation in the repaired process model. The behavioral patterns without an iterative insert deviation repaired by the configuration operations could entirely be accurately replayed. On the contrary, the non-iterative insert deviations could not be accurately replayed using the existing or the proposed method. Therefore, the loss of precision in the proposed method was dependent only on deviations that occurred once in the behavioral pattern containing an iterative insert deviation.

B. ANALYSIS OF RESULTS: FITNESS IS 1 AFTER REPAIR
To ensure that the fitness between the repaired model and the event log was always one, all observable deviations were inserted into the model using self-loops. M-Repair used different metrics to calculate the fitness and precision of the realtime repair and repair [17]. The formula for the behavioral pattern is shown in Table 4. R cos t BP , E cos t BP , I cos t BP , and N − I cos t BP represent the total cost of the deviations, cost of the insert deviations, cost of the iterative insert deviations, and the cost of the non-iterative insert deviations in the unfitted behavioral pattern, respectively.

1) EVALUATION OF BUSINESS PROCESS WITHOUT LOOP
Six datasets without loops were derived from the artificial and real-life business processes. The numbers of iterative insert deviations in the datasets were different, because of which there was a difference in improvements in precision yielded by the proposed method and the self-loop insert/skip. The initial value of precision was the value that all insertion deviations cannot accurately repair and that can potentially be improved with the repair of each behavior pattern.
• Results on the artificial datasets Fig. 17 describes the results of implementation of the three datasets on the artificial business process. The squares and triangles represent the values of precision repaired by the existing method and the proposed method, which are denoted by P and M-p, respectively. The improvements effected by M-p in Figs. 17 (a) and 17 (c) were significantly lower than those in Fig. 17 (b), while those in Fig. 17 (a) were superior to those Fig. 17 (c). The former result obtained because the unfitted behavioral patterns with the iterative insert deviation only accounted for 20% of the total number of patterns in Fig. 17 (b). Thus, the precision of all other behavioral patterns were improved owing to the configuration operations in M-P. Fig. 17 (b) shows precision 21% higher than those of the existing method. The latter result obtained because n was three in the causal behavior inclusion pattern of the dataset as described in Fig. 17 (a). We constructed the three datasets directly following non-iterative insert deviations into the substructure. Precision improved by 6% (Fig. 17 (a)) relative to that of the existing method and was 2% higher than that in Fig. 17 (c). The costs of repair of the two methods were the same. i cos t + and r cos t + represent the increasing costs of the iterative insert deviations and the repairable deviations, respectively.
• Results on real-life datasets Fig. 18 depicts the experimental results of the three datasets applied to the business process considered. They differed in terms of improvements in precision after being repaired when the two methods were used. The improvements of P effected by M-p, shown in Figs. 18 (a) and (c), were significantly lower than that shown in Fig. 18(b). The improvement of P by M-p in Fig. 18 (a) was 3% lower than Fig. 18 (c). The reason for the former result is similar to those shown in Figs. 17 (a), (b), and (c). In Fig. 18 (b), the unfitted behavioral patterns with iterative insert deviations account for only 20% of the dataset. Precision was improved by 22% compared with the existing method. The ratio of the cost of iterative insert deviations in terms of total cost is denoted by Ic + /Rc + . The reason for the latter was Ic + /Rc + in Fig. 18 (a) slightly higher than Fig. 18 (c). Ic + /Rc + was inversely proportional to the improvement in precision in general. The costs of repair of the two methods were the same.
• Results on datasets with loops Fig. 19 describes the experimental results of the three datasets in case of loops. Differences were observed in terms of the improvement in precision. Compared with P, the value of M-P (Fig. 19 (c)) recorded the highest improvement. This is because unfitted behavioral patterns with iterative insert deviations accounted for only 10% of this dataset. The precision was 33% higher than that of the existing method. The unfitted behavioral pattern produced by the cycle had the following three different repair-related effects: i) the path of   the loop existed only in the event log. In this case, if there were deviations only generated by cycle, the improvement in precision of both repair methods was the same (i.e., they both used invisible transitions to connect the loop from start to end). ii) The acyclic part was unfitted and could be repaired directly according to the operation of the acyclic part. iii) Behavior on the return path could not be replayed. At this time, the behavioral patterns on the return path could be divided, and the unfitted behavioral patterns could be repaired using the repair method used on the acyclic part. Accordingly, the unfitted behavioral patterns with iterative insert deviations accounted for 20% (Figs. 19 (a) and (b)). The iterative insert deviations divided by the total cost were 7% higher than in Fig. 19 (a); however, the difference in precision led to only a 1% difference in terms of improvement, because Fig. 19 (a) used only invisible transitions to repair the cycle, and there was no deviation in the acyclic part and return path. Thus, the deviations produced by this loop could be accurately repaired by two methods. M-p improved by 21% compared with P, while the result was 1% higher than that in Fig. 19 (b). The costs of repairs incurred by the two methods were the same.
The experimental results on the nine datasets are shown in Table 5. Ic + /Rc + in D a1 was 9% higher than D a3 , whereas the improvement in precision in D a3 was 2% lower than that in D a1 , because there was a causal behavior-inclusion pattern in D a1 . The three non-iterative insertion deviations were constructed as a causal substructure. The value of Ic + /Rc + of D r2 was 5% lower than that of D | ← 3 , whereas improvement in its precision was 10% lower. This is because non-iterative insert deviations in the acyclic part were repeatedly produced by the cycle. The precision of the first six datasets without loops improved by an average of (6% + 21% + 4% + 7% + 22% + 10%)/6 ≈ 12%, whereas that of the last three datasets with loops was (21% + 20% + 23%)/3 ≈ 21%, according to Table 5.

C. ANALYSIS OF RESULTS: FITNESS IS UNCERTAIN AFTER DIFFERENT REPAIRS
The datasets were repaired using the proposed method and two existing methods. The two existing methods were as follows: i) the insert deviation was repaired by the self-loop described in Section V.B to ensure fitness in any case. The iterative insert deviation could be accurately repaired only by this method, so that precision was affected by the noniterative insert deviation. This is denoted by R O . ii) The configurable activity and invisible transition were combined into a conflict structure that was to the appropriate location in the process model. The iterative insert deviation could not be repaired, because of which the fitness of the dataset with iterative insert deviations could not be guaranteed by this method. This is denoted by C O . Fitness and precision formulae of C O were added to M-repair to implement by F(C O ) and P(C O ). The proposed method is denoted by M −R. The datasets in Fig. 18(a), Fig. 19(a), and Fig. 19(b) are used as examples to analyze the results below, and are denoted by D r1 , D | ← 1 , and D | ← 2 , respectively. It's worth noting that the iterative activity produced by self-loop was not contained in the initial process models of nine datasets. Fig. 20 shows the results of repairs of D r1 , D 1 , and D 2 using the above three methods. The main aim of model repair is to be able to completely replay the event log to the process model. Thus, fitness of 1 must first be guaranteed after repair. The results in D r1 , D 1 , and D 2 (Figs. 20 (a), (b) and (c)) show that the precision of M − R was higher than that of R O by P ↑ {7%, 21%, 20%}. The fitness of M − R and R O were both one in D r1 , D 1 , and D 2 . The iterative deviations in the event log were removed, so the precision of C O was one [13]. However, the fitness of C O was 86%, 92% and 89% in D r1 , D 1 , and D 2 , respectively. Although the precision of C O was higher than that of M − R, it needed to sacrifice the replay of iterative insert deviations. Therefore, M − R was the optimal solution to instances of unfitted behavior in terms of fitness and precision in D r1 , D 1 , and D 2 .

2) RECALL, ACCURACY, AND NUMBER OF REPAIR ACTIVITIES
The recall and accuracy of the three methods were compared using the same number of repair activities. The number of repair activities was divided into nine groups and increased continuously according to the unfitted behavioral pattern in each dataset.
The recall represents the ratio of the cost of replay deviations to the total cost of deviations, and is denoted by C cos t r /C cos t. The recall values of R O and M − R reached one while C O could not in D r1 , D 1 , and D 2 (Figs. 21 (a), (b) and (c)). The recall of C O in D r1 was 22%, 16% less than those shown in D 1 , and D 2 , respectively. This is because all iterative insert deviations could not be replayed by C O . Ic + /Rc + in D r1 was much higher than those in D 1 , and D 2 .
Accuracy refers to the ratio of the cost of insert deviations that can be accurately repaired to the total cost of insert deviations and is denoted by E cos t r /E cos t. The accurate repair of a deviation means that the similarity between the behavior following repaired and the original behavior is one. M − R recorded the accuracies as shown in D r1 , D 1 and D | ← 2 (Figs. 20 (a), (b) and (c)), of 62%, 90%, and 89%, respectively. The accuracies of R O were 19%, 53%, and 53% less than those of M − R shown inD r1 , D 1 , and D 2 , respectively. This is because Ic + /Rc + of D 1 and D 2 was significantly lower than D r1 . The insert deviations accurately repaired by M − R were divided into the following two types: i) iterative insert deviations; ii) all insert deviations of the unfitted behavioral pattern without iterative insert deviations (i.e., a part of noniterative insert deviations). However, only the iterative insert deviations could be accurately repaired by R O . The accuracy of C O was one in Fig. 21 (a), (b), and (c). All insert deviations in the preprocessed event log were accurately repaired by C O [13]. However, recall of C O could not be guaranteed. Therefore, M − R was the optimal solution to instances of unfitted behavior in terms of recall and accuracy, given  The experimental results on the three datasets show that the real-time repair proposed in this paper is feasible and effective. It can improve precision as much as possible while guaranteeing fitness. The improvements in precision varied on different datasets for the following reasons: i) the number of unfitted behavioral patterns without iterative insert deviation in different datasets is different, ii) the numbers of substructures combined by the directly following insert deviations in different datasets were different, and iii) the types of cycles that needed to be repaired were different.

VI. RELATED WORK
The method proposed in this paper is closely related to the following three technologies: i) conformance check of business processes, ii) configuration optimization, and iii) model repair [31].

A. CONFORMANCE CHECK
According to the different types of deviations, the prevalent conformance check technology can be divided into two categories: i) the occurrence and location of the deviation were detected based on the optimal alignment between the event log and the process model; ii) the mismatched behavioral pattern was found based on the behavioral relationships between the event log and the process model [26]. The first check method used a heuristic algorithm, and trace replays were used to obtain an effective optimal alignment [32]. The costs of synchronous and asynchronous moves were set to zero and one, respectively (the cost of asynchronous movement with invisible transition was zero). The second method of conformance check involved generating a partial synchronization product between the event log and the process model by constructing the event structure. Then, the execution configuration set was expanded to discover the elements of deviation and their potential behavioral relations. By introducing types of deviations to the nine mismatched  patterns, the hide operation was analyzed from different perspectives [33]. The two consistency checks were combined in this paper. We refined the reachable activity structure, and identified unfitted behavioral patterns and model-specific behavioral patterns through the conformance check of behavioral relationships. The optimal alignment and configured replay graph produced by the unfitted behavioral patterns were used to detect the complete information on deviation and configurable behavior, respectively. The optimal alignment was applied to the unfitted behavioral pattern with the iterative insert deviation to detect it. Otherwise, the unfitted behavioral pattern required the configured replay graph to observe the configurable behavior.

B. MODEL REPAIR
The goal of model repair is to enable the event log to replay on the repaired process model and maintain the unique behavior of the original model as much as possible. The pseudo-Boolean constraint was used to deal with multi-objective problems. The approach achieves the maximum replay of the model at the minimum cost [34]. Unnecessary redundant behaviors in the process model are avoided as much as possible by manual repair compared with automatic operations [35]. They improve fitness reasonably while reducing the cost of repair as much as possible. The defined extension alignment was added to the reachable marks of the process model, and deviations in the model were calculated and repaired [36]. The location of repair of the model was determined by Petri net and the transformation relationship between the alternative structures [37]. Various measure criteria were considered for the repair process model, but the above two methods were the only ones applied using the alternative structure. According to six algorithms, suggestions for repair were obtained under the given constraints, and a balance between fitness and computation was struck [38]. Each deviant element was repaired using a self-loop insert/skip according to the recommendations for repair, often at the expense of precision to improve fitness. The directly following non-iterative insert deviations in the concurrency behavior inclusion pattern were used to form a substructure to improve precision, but this is limited in terms of application [17]. In this paper, the directly following non-iterative insert deviations were reconstructed into a substructure according to the behavioral relationships detected by the optimal alignment applied to unfitted behavioral pattern with an iterative insert deviation.

C. CONFIGURATION OPTIMIZATION
Configuration optimization is compatible with the variables generated and used in the process of change based on the reference model, with common characteristics under the given constraints. It processes all configurable variables through adding or hiding the selection substructures of the control flow [39]. Configurable fragments are constructed from the empirical behavior recorded in the event log to produce a process model that can satisfy both the common behavior and the customized behavior [40]. In this paper, this configuration optimization technique was introduced to model repair. The fitted behavior between the event log and the process model was regarded as a common parameter while the configurable behavior caused by unfitted behavior was regarded as a variable [41]. All iterative insert deviations cannot be replayed by configuration, which affects the improvement of the fitness [42]. Configurable behavior in the replay was optimized through the configuration operation when no iterative insert deviation occurred in the unfitted behavioral pattern in this paper. Through the configuration operation, the non-iterative deviation in the event log could be accurately replayed. Thus, fitness and precision were completely improved when the unfitted behavioral pattern was configured without iterative insert deviation. The features of existing four model repair methods and the proposed method are summarized in table 6. The deviations are inserted on process model using selfloops or skipped from process model by invisible transitions, and used the fitness and precision repaired by this method as a reference value [36]. →, ↑, and ↓ represent unchanged, increase, and decrease after repair of the current method compared with the reference precision, respectively.

VII. CONCLUSION
This paper proposed a method to repair behavior that cannot be replayed in case of an uncertain insert deviation that answered the following two questions: i) how can precision be improved in cases of an unfitted behavioral pattern with an iterative insert deviation? ii) How can precision be improved when there is no iteration insert deviation in the unfitted behavioral pattern? The solution to the above problems was divided into the following parts: 1) The corresponding unfitted behavioral patterns were identified by refining the reachable activity structures of the event log and the process model. The optimal alignment and configured replay graph were produced to detect complete information on the deviation and the configurable behavior, respectively. 2) The process model was repaired by switching between operations based on the results of checking for iterative insert deviations in the given pattern. If they were present, the directly following non-iterative insert deviations were constructed into a substructure according to the behavioral relationship. The insert deviation or substructure was repaired using a self-loop insert. By contrast, the process was repaired using a conflict substructure combined with an invisible transition and configurable behavior. Therefore, the behavioral pattern with iterative insert deviation improves the precision by reducing the size of the event log and maintaining the cost of accurately repairable deviations. Otherwise, the fitness and precision can be completely repaired by configuration operation.