A batch log repair method based on text similarity-constrained trajectory clustering

By using a text similarity-based constrained trajectory clustering method, the trajectories in the event log are clustered and repaired, solving the problem of low repair efficiency in existing technologies with large amounts of data, and achieving efficient and accurate batch log repair.

CN115345145BActive Publication Date: 2026-07-03SHANDONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV OF SCI & TECH
Filing Date
2022-07-15
Publication Date
2026-07-03

Smart Images

  • Figure CN115345145B_ABST
    Figure CN115345145B_ABST
Patent Text Reader

Abstract

This invention discloses a batch log repair method based on text similarity-constrained trajectory clustering, comprising the following steps: converting activities in the original logs into trajectories, organizing the trajectories, performing constrained trajectory clustering on the organized trajectories to obtain several clusters, and repairing the obtained clusters. This invention applies constraints to each step of trajectory clustering, ensuring that each cluster contains a fitted trajectory as the cluster center and abnormal trajectories similar to the fitted trajectory, with the center trajectory being the repair result of the abnormal trajectory. This method not only directly obtains the repaired fitted trajectory without analyzing abnormal behavior but also achieves batch repair of abnormal trajectories. Experiments show that this method, while deviating from the process model and ensuring high repair accuracy, can effectively and efficiently perform batch repair of event logs after noise filtering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of log repair, and specifically to a batch log repair method based on constrained trajectory clustering with text similarity. Background Technology

[0002] With the rapid development of enterprise informatization, information systems generate and collect massive amounts of log data, and new technologies related to log processing are constantly emerging. Enterprises are increasingly reliant on business process technologies, and event logs are the starting point for most log processing technologies. Due to system problems or human factors, log data may exhibit redundancy, missing data, or out-of-order data, resulting in reduced log completeness and significantly hindering the advancement of log processing technologies. Therefore, log repair technologies have emerged. Existing repair methods have high accuracy and often offer different repair approaches for different types of anomalies, but their computational efficiency is low. Therefore, they are suitable for targeted, precise repairs, but often fall short when dealing with massive amounts of data.

[0003] Currently, Leoni et al. were the first to propose aligning the process model with the log for log repair. Since the alignment method calculates the minimum cost sequence of all possible sequences based on the log, process model, and synthesis model, it can basically guarantee optimal repair results; however, its computational efficiency is too low. Song et al. proposed a heuristic repair method called Effa, which improves computational efficiency but sacrifices accuracy to some extent. Tang proposed an anomaly repair method based on log automata, which uses log automata to detect abnormal behavior and then uses the probability of adjacent event sequences for repair, achieving high accuracy and improved efficiency. In addition, there are model-based repair methods and path probability-based alignment methods. Wang et al. proposed obtaining repair results by backtracking each branch and combining indexing techniques and branch bounds to prune unnecessary branches, further improving repair efficiency.

[0004] In summary, existing log repair methods can be categorized into alignment repair and branch repair. However, the former has been proven to be an NP-hard problem, with extremely low efficiency in calculating optimal alignment when the business process is large-scale. Branch repair only considers the case of missing events and is not applicable to other abnormal activity scenarios. Therefore, existing methods cannot guarantee high repair accuracy, high applicability, and high repair efficiency while remaining independent of the process model, making them unsuitable for handling the needs of large-scale batch data repair. Summary of the Invention

[0005] Existing log repair methods require checking each trajectory individually using a process model and employing different strategies to repair various abnormal behaviors, resulting in low repair efficiency and limited applicability. This invention provides a batch log repair method based on text similarity-constrained trajectory clustering.

[0006] The present invention adopts the following technical solution:

[0007] A batch log repair method based on text similarity-constrained trajectory clustering includes the following steps:

[0008] Step 1: Convert the activities in the original logs into tracks;

[0009] Step 2: Organize the trajectory from Step 1;

[0010] Step 3: Perform constrained trajectory clustering on the sorted trajectories to obtain several clusters;

[0011] Step 4: Repair the obtained clusters.

[0012] Preferably, step 2 specifically includes:

[0013] Step 2.1: Consider the trajectory containing activities that are exactly the same as the sequence of activities as the repeated trajectories, and count the number of repeated trajectories, which is called the occurrence frequency of the trajectory;

[0014] Step 2.2: After counting the occurrence frequency of all trajectories, arrange them in descending order of occurrence frequency to obtain a log set. In the log set, the trajectory with the highest occurrence frequency is called the first type of trajectory, the trajectory with the second highest occurrence frequency is called the second type of trajectory, and so on.

[0015] Preferably, step 3 specifically includes:

[0016] Step 3.1: If there are S types of trajectories in the log set, then take the first 0.1S types of trajectories as the initial cluster center. If the first 0.1S types of trajectories are not integers, round them to the nearest integer. The initial cluster center should have at least one type of trajectory.

[0017] The occurrence frequency of the first type of trajectory is set to J, the minimum cluster center value is set to 0.2J, the similarity threshold is set to 0.5, and the similar trajectory splitting coefficient is set to 0.3.

[0018] Step 3.2: Calculate the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center. If the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center is less than the threshold of 0.5, determine whether the occurrence frequency of the class trajectory after the initial cluster center is greater than or equal to the minimum cluster center value of 0.2J. If it is greater than or equal to 0.2J, create a new cluster with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.2J, add the class trajectory after the initial cluster center to the noise set.

[0019] If the maximum similarity between a class trajectory after the initial cluster center and a class trajectory in the initial cluster center is greater than or equal to the threshold of 0.5, then the class trajectory corresponding to the maximum similarity of the class trajectory in the initial cluster center is taken as the maximum class trajectory. It is then determined whether the occurrence frequency of a class trajectory after the initial cluster center is greater than or equal to the product of the occurrence frequency of the maximum class trajectory and the splitting coefficient of the similar trajectory. If it is greater than or equal to 0.3 * the occurrence frequency of the maximum class trajectory, then a new cluster is created with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.3 * the occurrence frequency of the maximum class trajectory, then the class trajectory after the initial cluster center is added to the maximum class trajectory to become a new cluster.

[0020] Step 3.3: Use Step 3.2 to judge all class trajectories after the initial cluster center. When using Step 3.2 to judge, the newly selected class trajectory should be similar to the class trajectory in the initial cluster center and also similar to the class trajectory of the newly created cluster. The value with the highest similarity should be compared with the threshold of 0.5.

[0021] Step 3.4: Discard the noise set to obtain several clusters.

[0022] Preferably, step 4 specifically includes:

[0023] Each cluster is then repaired, and the specific repair process is as follows:

[0024] Repair the trajectory of other estimates in each cluster toward the cluster center.

[0025] The beneficial effects of this invention are:

[0026] This invention provides a batch log repair method based on text similarity-constrained trajectory clustering. By applying constraints to each step of trajectory clustering, each cluster contains a fitted trajectory as its center and abnormal trajectories similar to that fitted trajectory, with the center trajectory representing the repaired abnormal trajectory. This method not only obtains the repaired fitted trajectory directly without analyzing abnormal behavior but also achieves batch repair of abnormal trajectories. Experiments show that this method, while deviating from the process model and ensuring high repair accuracy, can effectively and efficiently perform batch repair of event logs after noise filtering.

[0027] The main contributions of this invention include the following aspects: ① Existing trajectory clustering technology is mainly applied to process mining algorithms. This invention improves trajectory clustering technology into constrained trajectory clustering technology and applies it to log repair, fundamentally expanding the application scope of trajectory clustering technology in the field of process mining; ② It uses the machine translation evaluation metric BLEu as a quantification metric for the similarity between trajectories, eliminating the need for discrimination based on different anomalies, and covering various anomaly situations, thus having wide applicability; moreover, the BLEu value can not only measure the anomaly of a single activity, but also judge the anomaly situation of an activity based on the context; ③ Previous log repair techniques are all performed on single trajectories, and the repair process requires sequential targeted repair of anomalous activities, resulting in low repair efficiency. For large event logs, the workload is enormous. The event log batch repair method proposed in this invention, without relying on the process model and without focusing on specific anomalous activities, can perform batch repair of trajectories in the event log. Although this log repair method slightly sacrifices the accuracy of the repair results, it greatly improves the repair efficiency and can filter noise in the event log. Attached Figure Description

[0028] Figure 1 This is a flowchart of a batch log repair method based on text similarity-based constrained trajectory clustering. Detailed Implementation

[0029] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and specific examples:

[0030] Information systems record numerous cases and store them in logs. Generally, each record represents an event that occurs in a process instance. An event contains several attributes, such as activity name, participants, and occurrence time. The sequence of these events arranged in the order they occur in their corresponding process instances is called a trace. The event log is a collection of traces, and the model used to represent the order, parallelism, and other relationships between activities is called a process model.

[0031] A fitted trace is a complete activity sequence that can be replayed on a process model without any abnormal activities such as missing, redundant, or out-of-order sequences. An unfitting trace, on the other hand, is a trace where abnormal activities occur during the replay process. Trajectories with an excessively high proportion of abnormal activities can have a significant negative impact on subsequent analysis and are generally referred to as noise.

[0032] Example 1

[0033] This invention leverages the efficiency of clustering algorithms in processing massive datasets, combining text similarity metrics from the field of natural language processing to group event logs. Because several constraints are incorporated, it is termed Restrictive Trace Clustering. Unlike trajectory clustering techniques used in process mining, Restrictive Trace Clustering for batch log repair does not simply group two trajectories based on high similarity; it also considers the number of similar trajectories, similarity thresholds, etc., thus avoiding classifying one fitted trajectory as an abnormal trajectory similar to another.

[0034] Combination Figure 1 A batch log repair method based on text similarity-constrained trajectory clustering includes the following steps:

[0035] Step 1: Convert the activities in the original logs into tracks.

[0036] The original log consists of activity records, each containing some information. Since log repair targets the trajectory, it is essential to convert activities into trajectories as the unit in the event log set.

[0037] Step 2: Organize the trajectory from Step 1.

[0038] Specifically, it includes:

[0039] Step 2.1: Consider the trajectory containing activities that are exactly the same as the sequence of activities as the repeated trajectories, and count the number of repeated trajectories, which is called the occurrence frequency of the trajectory.

[0040] This invention uses a text similarity index when considering the similarity between trajectories. Therefore, only the activity names are compared during the calculation. Thus, if the order of two activities is exactly the same, they can be regarded as the same type of trajectory during the clustering process, and the number of identical trajectories can be represented by the trajectory frequency.

[0041] Step 2.2: After counting the occurrence frequency of all trajectories, arrange them in descending order of occurrence frequency to obtain a log set. In the log set, the trajectory with the highest occurrence frequency is called the first type of trajectory, the trajectory with the second highest occurrence frequency is called the second type of trajectory, and so on.

[0042] The final sorting step is an optional step to improve cluster stability and reduce clustering time. Theoretically, trajectories with repair value will inevitably account for a higher proportion of fitted trajectories, that is, trajectories that occur more frequently are more likely to be fitted trajectories.

[0043] In this embodiment, a log set L is provided.

[0044] Log set L = {<a,b,c,d,e> 30 ,<p,q,m,n> 28 ,<a,b,c,h,e> 25 ,<x,y,z> 20 ,<a,b,c,d,f> 7 ,<a,b,c,h,i> 3 ,<x,b,c,d,m> 1}

[0045] Among them, the first type of trajectory is<a,b,c,d,e> 30 It was repeated 30 times, meaning its trajectory occurred 30 times.

[0046] The second type of trajectory is<p,q,m,n> 28 It was repeated 28 times, meaning its trajectory occurred at a frequency of 28.

[0047] The third type of trajectory is<a,b,c,h,e> 25 It was repeated 25 times, meaning its trajectory occurred at a frequency of 25.

[0048] The fourth type of trajectory is<x,y,z> 20 It was repeated 20 times, meaning its trajectory occurred at a frequency of 20.

[0049] The fifth type of trajectory is<a,b,c,d,f> 7 It was repeated 7 times, meaning its trajectory occurred 7 times.

[0050] The sixth type of trajectory is<a,b,c,h,i> 3 It was repeated 3 times, meaning its trajectory occurred at a frequency of 3.

[0051] The seventh type of trajectory is<x,b,c,d,m> 1 It was repeated once, meaning its trajectory occurred at a frequency of 1.

[0052] Step 3: Perform constrained trajectory clustering on the sorted trajectories to obtain several clusters.

[0053] Step 3.1: Set the log set to have a total of S types of trajectories. Then take the first 0.1S types of trajectories as the initial cluster center. If the first 0.1S types of trajectories are not integers, round them to the nearest integer. The initial cluster center should have at least one type of trajectory.

[0054] In this embodiment, the log set L contains 7 types of trajectories. The first 0.7 types of trajectories are taken as the initial cluster center. Since 0.7 is not an integer, it is rounded to the nearest integer, meaning the first type of trajectory is taken as the initial cluster center.<a,b,c,d,e> 30 This is the initial cluster center.

[0055] In other embodiments, if there are 22 class trajectories, the first 2 class trajectories are taken as cluster centers; if there are 38 class trajectories, the first 4 class trajectories are taken as cluster centers.

[0056] The occurrence frequency of the first type of trajectory is set to J, the minimum cluster center value is set to 0.2J, the similarity threshold is set to 0.5, and the similar trajectory splitting coefficient is set to 0.3.

[0057] In this embodiment, the occurrence frequency of the first type of trajectory is 30, so the minimum cluster center value is 6.

[0058] The similarity between trajectories was calculated using the BLEU method.

[0059] Bleu is a metric used to evaluate the accuracy and fluency of machine-translated text.

[0060] The formula for calculating the similarity between trajectories using the Bleu method is as follows:

[0061]

[0062]

[0063] Where c is the number of unary activities for the candidate trajectory;

[0064] For example, for trajectory sequences<p,q,m,n> There are 4 one-yuan activities;

[0065] r is the unary activity number of the reference trajectory;

[0066] For example, for trajectory sequences<a,b,c,d,e> The number of one-yuan activities is 5;

[0067] BP is the trajectory length penalty function;

[0068] n represents an n-ary activity, with a value range of [1, N]. The Bleu method requires calculating p for each n-ary activity separately. n The values ​​are finally merged to obtain the BLEU value. When n=1, each activity is a unit, and the calculated value is used to measure the overlap (or accuracy) of activities in two tracks. When n=2, every two consecutive activities are a unit, and the calculated value is used to measure the continuity (or smoothness) of activities in two tracks. The same applies when n≥3.

[0069] An n-ary activity is a unit consisting of n consecutive activities in a trajectory. Several n-ary activities with the same name at different positions in the trajectory are considered as different n-ary activities.

[0070] N is the maximum value of n. In the field of machine translation, it is generally taken as 4. When calculating trajectory similarity, its value should not exceed the minimum value among all trajectory lengths. Considering that event logs often contain short trajectories, N is taken as 3.

[0071] w n This is the weighting coefficient, which is the reciprocal of N;

[0072] p n The ratio of the number of n-ary activities s that successfully match the candidate trajectory with the reference trajectory to the total number of n-ary activities t in the candidate trajectory;

[0073] For example, candidate trajectories<a,b,c,h,e> The reference trajectory is<a,b,c,d,e> Then p1 is the ratio of the number of unary activities that successfully match the candidate trajectory with the reference trajectory to the total number of unary activities in the candidate trajectory, where the candidate trajectory...<a,b,c,h,e> Compared with reference trajectory<a,b,c,d,e> The unary activity matching scenarios are: a matches a, b matches b, c matches c, e matches e. The number of matched activities s is 4, and the total number of unary activities t for the candidate trajectories is 5. p2 is the ratio of the number of binary activities that successfully matched the candidate trajectory with the reference trajectory to the total number of binary activities in the candidate trajectory, where the candidate trajectory...<a,b,c,h,e> Compared with reference trajectory<a,b,c,d,e> In the binary activity matching scenario, a,b matches with a,b, and b,c matches with b,c. The number of matched activities s is 2, and the total number of binary activities t in the candidate trajectory is 4. p3 represents the ratio of the number of ternary activities that successfully matched the candidate trajectory with the reference trajectory to the total number of ternary activities in the candidate trajectory.<a,b,c,h,e> Compared with reference trajectory<a,b,c,d,e> In the case of a ternary activity matching, a,b,c matches a,b,c, with a matching activity count s of 1. The total number of binary activities t in the candidate trajectory is 3.

[0074] The final Bleu is the similarity between the two class trajectories.

[0075] Step 3.2: Calculate the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center. If the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center is less than the threshold of 0.5, determine whether the occurrence frequency of the class trajectory after the initial cluster center is greater than or equal to the minimum cluster center value of 0.2J. If it is greater than or equal to 0.2J, create a new cluster with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.2J, add the class trajectory after the initial cluster center to the noise set.

[0076] If the maximum similarity between a class trajectory after the initial cluster center and a class trajectory in the initial cluster center is greater than or equal to a threshold of 0.5, then the class trajectory corresponding to the maximum similarity of the class trajectory in the initial cluster center is taken as the maximum class trajectory. It is then determined whether the occurrence frequency of a class trajectory after the initial cluster center is greater than or equal to the product of the occurrence frequency of the maximum class trajectory and the splitting coefficient of the similar trajectory. If it is greater than or equal to 0.3 * the occurrence frequency of the maximum class trajectory, then a new cluster is created with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.3 * the occurrence frequency of the maximum class trajectory, then the class trajectory after the initial cluster center is added to the maximum class trajectory to become a new cluster.

[0077] Step 3.3: Use Step 3.2 to determine all class trajectories after the initial cluster center.

[0078] When making a judgment using step 3.2, the newly selected class trajectory should be similar to the class trajectory in the initial cluster center, and also similar to the class trajectory of the newly created cluster. The value with the highest similarity should be compared with the threshold of 0.5.

[0079] Step 3.4: Discard the noise set to obtain several clusters.

[0080] Specifically in this embodiment, we take<p,q,m,n> 28 With cluster center<a,b,c,d,e> 30 Similarity calculation is performed, where,<p,q,m,n> For candidate trajectories,<a,b,c,d,e> Using the reference trajectory, the similarity S1 calculated by the Bleu method is 0, which is less than the threshold of 0.5, so it is judged that...<p,q,m,n> 28 Whether the frequency of occurrence is greater than or equal to the minimum cluster center value of 6, it is obvious.<p,q,m,n> 28 The occurrence frequency of 28 is greater than the minimum cluster center value of 6, which will...<p,q,m,n> 28 Create a new cluster as the cluster center.

[0081] At this point, the resulting cluster is {<a,b,c,d,e> 30}, {<p,q,m,n> 28}

[0082] Pick<a,b,c,h,e> 25 With cluster center<a,b,c,d,e> 30 Performing similarity calculations is also related to<p,q,m,n> 28 Perform similarity calculation and take the maximum value of the obtained similarity.<a,b,c,h,e> 25 With the initial cluster center<a,b,c,d,e> 30 The similarity S² = 0.51, which is greater than the threshold of 0.5. Therefore, the frequency of occurrence of the largest class trajectory is 30. The product of the frequency of occurrence of the largest class trajectory and the splitting coefficient of similar trajectories is 0.3 * 30 = 9. Obviously...<a,b,c,h,e> 25 If the frequency of occurrence is 25, which is greater than 9, then...<a,b,c,h,e> 25 Create a new cluster as the cluster center.

[0083] At this point, the resulting cluster is {<a,b,c,d,e> 30}, {<a,b,c,h,e> 25}, {<p,q,m,n> 28}

[0084] Pick<x,y,z> 20 With cluster center<a,b,c,d,e> 30 Performing similarity calculations is also related to<p,q,m,n> 28 Performing similarity calculations is also related to<a,b,c,h,e> 25 Similarity calculations were performed, and the similarity of all three was 0. The maximum similarity value S3 = 0, which is less than the threshold of 0.5. Therefore, the judgment is...<x,y,z> 20 Whether the frequency of occurrence is greater than or equal to the minimum cluster center value of 6, it is obvious.<x,y,z> 20 The occurrence frequency of 20 is greater than the minimum cluster center value of 6, which will...<x,y,z> 20 Create a new cluster as the cluster center.

[0085] At this point, the resulting cluster is {<a,b,c,d,e> 30}, {<a,b,c,h,e> 25}, {<p,q,m,n> 28}, {<x,y,z> 20}

[0086] Pick<a,b,c,d,f> 7With cluster center<a,b,c,d,e> 30 Performing similarity calculations is also related to<p,q,m,n> 28 Performing similarity calculations is also related to<a,b,c,h,e> 25 Performing similarity calculations is also related to<x,y,z> 20 Perform similarity calculation and take the maximum value of the obtained similarity.<a,b,c,d,f> 7 With the initial cluster center<a,b,c,d,e> 30 The similarity S4 = 0.74, which is greater than the threshold of 0.5. The occurrence frequency of the maximal class trajectory is 30. The product of the occurrence frequency of the maximal class trajectory and the splitting coefficient of the similar trajectory is 0.3 * 30 = 9. Obviously...<a,b,c,d,f> 7 If the frequency of occurrence is 7, which is less than 9, then...<a,b,c,d,f> 7 Join<a,b,c,d,e> 30 It becomes a new cluster.

[0087] At this point, the resulting cluster is {<a,b,c,d,e> 30 ,<a,b,c,d,f> 7}, {<a,b,c,h,e> 25}, {<p,q,m,n> 28}, {<x,y,z> 20}

[0088] Pick<a,b,c,h,i> 3 With cluster center<a,b,c,d,e> 30 Performing similarity calculations is also related to<p,q,m,n> 28 Performing similarity calculations is also related to<a,b,c,h,e> 25 Performing similarity calculations is also related to<x,y,z> 20 Perform similarity calculation and take the maximum value of the obtained similarity.<a,b,c,h,i> 3 and<a,b,c,h,e> 25 The similarity S5 = 0.74, which is greater than the threshold of 0.5. The occurrence frequency of the largest class trajectory is 25. The product of the occurrence frequency of the largest class trajectory and the splitting coefficient of the similar trajectory is 0.3 * 25 = 7.5. Obviously,<a,b,c,h,i> 3 If the frequency of occurrence is 3, which is less than 7.5, then...<a,b,c,h,i> 3 Join<a,b,c,h,e> 25 It becomes a new cluster.

[0089] At this point, the resulting cluster is {<a,b,c,d,e> 30,<a,b,c,d,f> 7}, {<a,b,c,h,e> 25 ,<a,b,c,h,i> 3}, {<p,q,m,n> 28}, {<x,y,z> 20}

[0090] Pick<x,b,c,d,m> 1 With cluster center<a,b,c,d,e> 30 Performing similarity calculations is also related to<p,q,m,n> 28 Performing similarity calculations is also related to<a,b,c,h,e> 25 Performing similarity calculations is also related to<x,y,z> 20 Perform similarity calculation and take the maximum value of the obtained similarity.<x,b,c,d,m> 1 and<a,b,c,d,e> 30 The similarity S6 = 0.49, which is less than the threshold of 0.5, so it is judged that...<x,b,c,d,m> 1 Whether the frequency of occurrence is greater than or equal to the minimum cluster center value of 6, it is obvious.<x,y,z> 20 The occurrence frequency of 1 is less than the minimum cluster center value of 6, so...<x,b,c,d,m> 1 Add a noise set.

[0091] The final cluster is {<a,b,c,d,e> 30 ,<a,b,c,d,f> 7}, {<a,b,c,h,e> 25 ,<a,b,c,h,i> 3}, {<p,q,m,n> 28}, {<x,y,z> 20}

[0092] Step 4: Repair the obtained clusters.

[0093] Each cluster is then repaired, and the specific repair process is as follows:

[0094] Repair the trajectory of other estimates in each cluster toward the cluster center.

[0095] Specifically, in this embodiment:

[0096] Will{<a,b,c,d,e> 30 ,<a,b,c,d,f> 7 Trajectory in}<a,b,c,d,f> 7 trajectory towards the cluster center<a,b,c,d,e>30 Repairs will be carried out.

[0097] Will{<a,b,c,h,e> 25 ,<a,b,c,h,i> 3 Trajectory in}<a,b,c,h,i> 3 trajectory towards the cluster center<a,b,c,h,e> 25 Repairs will be carried out.

[0098] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A batch log repair method based on text similarity constraint trajectory clustering, characterized in that, Includes the following steps: Step 1: Convert the activities in the original logs into tracks; Step 2: Organize the trajectory from Step 1; Specifically, it includes: Step 2.1: Consider the trajectory containing activities that are exactly the same as the sequence of activities as the repeated trajectories, and count the number of repeated trajectories, which is called the occurrence frequency of the trajectory; Step 2.2: After counting the occurrence frequency of all trajectories, arrange them in descending order of occurrence frequency to obtain a log set. In the log set, the trajectory with the highest occurrence frequency is called the first type of trajectory, the trajectory with the second highest occurrence frequency is called the second type of trajectory, and so on. Step 3: Perform constrained trajectory clustering on the sorted trajectories to obtain several clusters; Specifically, it includes: Step 3.1: Set the total number of S types of trajectories in the log set, then take the first 0.1S types of trajectories as the initial cluster center. If the first 0.1S types of trajectories are not integers, round them to the nearest integer. The initial cluster center must have at least one type of trajectory. The occurrence frequency of the first type of trajectory is set to J, the minimum cluster center value is set to 0.2J, the similarity threshold is set to 0.5, and the similar trajectory splitting coefficient is set to 0.

3. Step 3.2: Calculate the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center. If the similarity between the class trajectory after the initial cluster center and the class trajectory in the initial cluster center is less than the threshold of 0.5, determine whether the occurrence frequency of the class trajectory after the initial cluster center is greater than or equal to the minimum cluster center value of 0.2J. If it is greater than or equal to 0.2J, create a new cluster with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.2J, add the class trajectory after the initial cluster center to the noise set. If the maximum similarity between a class trajectory after the initial cluster center and a class trajectory in the initial cluster center is greater than or equal to the threshold of 0.5, then the class trajectory corresponding to the maximum similarity of the class trajectory in the initial cluster center is taken as the maximum class trajectory. It is then determined whether the occurrence frequency of a class trajectory after the initial cluster center is greater than or equal to the product of the occurrence frequency of the maximum class trajectory and the splitting coefficient of the similar trajectory. If it is greater than or equal to 0.3 * the occurrence frequency of the maximum class trajectory, then a new cluster is created with the class trajectory after the initial cluster center as the cluster center. If it is less than 0.3 * the occurrence frequency of the maximum class trajectory, then the class trajectory after the initial cluster center is added to the maximum class trajectory to become a new cluster. Step 3.3: Use Step 3.2 to judge all class trajectories after the initial cluster center. When using Step 3.2 to judge, the newly selected class trajectory should be similar to the class trajectory in the initial cluster center and also similar to the class trajectory of the newly created cluster. The value with the highest similarity should be compared with the threshold of 0.

5. Step 3.4: Discard the noise set to obtain several clusters; Step 4: Repair the obtained clusters; Specifically, it includes: Each cluster is then repaired, and the specific repair process is as follows: Repair the other trajectories in each cluster towards the trajectory at the cluster center.