A method and system for predicting the remaining time of business processes based on a hybrid architecture
By using a CNN-Transformer hybrid model, which combines a multi-scale convolutional neural network and a time-aware Transformer encoder, the problem of balancing local features and global dependencies in existing technologies is solved, achieving high-precision prediction of remaining time for business processes. This model is applicable to fields such as finance, healthcare, and government.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-06
AI Technical Summary
Existing methods struggle to balance local short-term features with global contextual dependencies in predicting the remaining time of business processes, resulting in insufficient prediction accuracy and robustness.
A CNN-Transformer hybrid model is adopted, which extracts local features through multi-scale convolutional neural networks and uses a time-aware Transformer encoder to model long-range dependencies. Event embedding and position encoding are combined to enhance the global dependency modeling capability.
It significantly improves the accuracy and robustness of remaining time prediction for business processes, reduces the mean absolute error, and is suitable for intelligent prediction scenarios of various business processes such as finance, healthcare, and government affairs.
Smart Images

Figure CN121390484B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and process mining technology, specifically relating to a method and system for predicting the remaining time of business processes based on a hybrid architecture. Background Technology
[0002] With the rapid development of process mining and predictive process monitoring, predicting the remaining time of business processes has become a key requirement in process management. In existing research, most methods are based on recurrent neural networks (such as LSTM and GRU) to model event sequences and predict remaining time. These methods can characterize certain temporal dependencies, but they still have shortcomings in balancing the modeling of local patterns and global features: for example, LSTM is advantageous in capturing long-range dependencies, but lacks sensitivity to local patterns between adjacent events; convolutional neural networks (CNNs) can efficiently extract local features, but lack the ability to model long-range dependencies. In recent years, Transformer-based models have significantly enhanced their ability to model global context through multi-head self-attention mechanisms; however, they remain limited in extracting short-term local patterns. In summary, existing methods are insufficient in balancing local short-term features and global contextual dependencies. Therefore, there is an urgent need to propose a novel method that can integrate local and global features to further improve the accuracy and robustness of business process remaining time prediction. Summary of the Invention
[0003] To address the aforementioned issues, this invention proposes a method and system for predicting the remaining time of business processes based on a hybrid architecture. Specifically, this hybrid architecture is a CNN-Transformer hybrid model (CNN-TF). This model employs a structure where a multi-scale convolutional neural network (CNN) first extracts local features, and then a time-aware Transformer encoder models long-range dependencies. This ensures that the local patterns of the sequence are sufficiently enhanced before entering the Transformer, thereby significantly improving the quality of global dependency modeling and temporal sensitivity. This invention uses a deep learning model to predict the remaining completion time of event sequences of ongoing business processes, thereby improving the accuracy and real-time performance of business process monitoring and management.
[0004] The technical solution of the present invention is as follows:
[0005] A method for predicting the remaining time of a business process based on a hybrid architecture, wherein the hybrid architecture includes an event embedding model, a multi-scale one-dimensional convolutional neural network, a time-aware Transformer encoder, and a fully connected output layer; the method specifically includes the following steps:
[0006] Step 1: Obtain the original event logs of the business process, extract the prefix of each trajectory in the original event logs, and generate a set of event sequence prefixes to be predicted;
[0007] Step 2: Based on the event embedding model, each event in the event sequence prefix set is vectorized and embedded, and a position encoding vector and a time difference vector are introduced to obtain a time-aware embedding representation sequence that integrates position and time information;
[0008] Step 3: Input the time-aware embedded representation sequence into a multi-scale one-dimensional convolutional neural network for convolution operations. Extract multi-level local features through convolution operations with different kernel sizes, and fuse them to obtain a multi-scale local feature representation sequence of the event sequence prefix set.
[0009] Step 4: Input the multi-scale local feature representation sequence into the time-aware Transformer encoder, and learn the global contextual dependencies in the event sequence prefix set through a multi-head self-attention mechanism; introduce a weight decay factor based on the time difference between events during the attention calculation process, and finally calculate the global feature representation sequence containing time dependency information.
[0010] Step 5: Aggregate the global feature representation sequence and calculate the remaining time prediction value of the business process through the fully connected output layer.
[0011] Furthermore, the specific process of step 1 is as follows:
[0012] Step 1.1: Obtain the raw event logs from the public dataset website. The raw event logs are in the format of a structured file conforming to the XES specification, containing the event activity name, timestamp, event ID, associated executor, organization role, resource type, event lifecycle identifier, and other optional business attributes.
[0013] The raw event log is a collection of several tracks, and a track is a sequence of several event activities;
[0014] Define the original event log as follows:
[0015] (1);
[0016] in, This is the original event log; The total number of trajectories; For the first The trajectory is as follows:
[0017] (2);
[0018] in, For the first The first of the trajectories One event;
[0019] Each event consists of an activity, a timestamp, and a set of contextual attributes. This set of contextual attributes is derived from the event contextual attributes recorded in the original event log, including the executor associated with the event, organizational role, resource type, event lifecycle identifier, and other optional business attributes. The set of contextual attributes consists of multiple contextual attributes associated with the current event from the event log, and a preset placeholder is used when a certain type of attribute is missing.
[0020] Step 1.2: For each track in the original event log, extract all tracks of length [length missing] in non-decreasing order of event timestamps. The trajectory prefix, where ; For the first The number of events contained in a trajectory;
[0021] The trajectory prefix is defined as:
[0022] (3);
[0023] in, Prefix for trajectory; For the first The first of the trajectories One event, Corresponding trajectory prefix length;
[0024] The event sequence prefix set is composed of all prefixes of all trajectories. :
[0025] (4).
[0026] Furthermore, the specific process of step 2 is as follows:
[0027] Step 2.1: Use an event embedding model to vectorize and embed each event in the trajectory prefix, obtaining the event embedding vector:
[0028] (5);
[0029] in, Embedded model for events; For the first The first of the trajectories The activities of this event; For the first The first of the trajectories The context attributes corresponding to the event are embedded in the collection of the first event. Embedded representation of class context attributes; For the first The first of the trajectories Embedding vectors of events, For dimensions; For the first The first of the trajectories The context attributes corresponding to each event are embedded in a collection;
[0030] Step 2.2: Introduce positional encoding to the event embedding vector to obtain the positional encoding vector. The positional encoding vector is... Dimensional components and the first The dimensional components are calculated using the following formulas:
[0031] (6);
[0032] (7);
[0033] in, For the first The first of the trajectories Location encoding vectors for each event; For location index, ;
[0034] Step 2.3: Calculate the time interval between adjacent events and map it into a time difference vector using a time embedding function:
[0035] (8);
[0036] (9);
[0037] in, For the first The first of the trajectories The time interval between adjacent events; , The first The first of the trajectories The first event, the The time when the event occurred; For the first The first of the trajectories The time difference vector between adjacent events; For time embedding functions;
[0038] Step 2.4: Add the embedding vector of each event to its corresponding location encoding vector and time difference vector element-wise to obtain the event embedding representation that fuses location and time information.
[0039] (10);
[0040] in, For the first The first of the trajectories Embedded representation of an event;
[0041] The embedded representations of all events form the time-aware embedded representations of the trajectory prefix sequence. , No. The embedded representation of the event corresponds to the first event placed in the time-aware embedding sequence. One position.
[0042] Furthermore, the specific process of step 3 is as follows:
[0043] Step 3.1: For the time-aware embedded representation sequence, perform parallel convolution operations using a one-dimensional convolutional neural network with multiple kernel sizes to extract multi-level local feature values; for the first... The convolution operation with one convolution kernel is calculated using the following formula:
[0044] (11);
[0045] in, For time-aware embedding representation of the sequence, the first... A vector representation of each event activity; For the first Each convolutional kernel is located at... Weight parameters at the location; For the first Local features generated by each convolutional kernel; It is a non-linear activation function; For the time-aware embedding representation of the input sequence, the first... The embedding vector of the i-th event, after the i-th Local features obtained after computation by each convolutional kernel; For the first The size of each convolutional kernel;
[0046] Step 3.2, place the first The local features generated by all convolutional kernels of each event are concatenated along the feature dimension to obtain the event sequence prefix set. Multi-scale local feature vectors of an event:
[0047] (12);
[0048] in, Indicates the number of multi-scale convolution kernels; For the time-aware embedding representation of the input sequence, the first... The embedding vector of the i-th event, after the i-th Local features obtained after computation by each convolutional kernel; For the first Multi-scale local feature vectors after the fusion of several events;
[0049] The multi-scale local feature vectors of all events constitute a multi-scale local feature representation sequence. ,in is the length of the feature sequence output by the convolution.
[0050] Furthermore, the specific process of step 4 is as follows:
[0051] Step 4.1: Represent the multi-scale local feature sequence As input to the Transformer encoder, the attention weights between positions in the sequence are calculated using a multi-head self-attention mechanism, and a weight decay factor for the time difference between events is introduced into the attention score. The calculation formula is as follows:
[0052] (13);
[0053] in, This is a multi-head self-attention mechanism; They represent sequences from multi-scale local feature representations through linear transformation. The resulting query matrix, key matrix, and value matrix; It is the transpose symbol; The key vector dimension for each attention head; This is the time difference matrix between events; This is the weight decay factor; This indicates that each row of the matrix is normalized.
[0054] Step 4.2: The feature representation output by the multi-head self-attention mechanism is processed through a feedforward neural network, residual connections, and layer normalization to obtain a global feature representation sequence containing the event sequence prefix set with time-dependent information. ; for The Middle The global feature vector corresponding to each position The total number of positions; the specific process is as follows:
[0055] The feature representations output by the multi-head self-attention mechanism constitute the multi-head self-attention output matrix. For the multi-head self-attention output matrix, the calculation formula via the feedforward neural network is:
[0056] (14);
[0057] in, It is a feedforward neural network; , This is the weight matrix of the feedforward neural network; , This is the bias term for the feedforward neural network;
[0058] The output of the feedforward neural network is then combined with Residual connections are performed, and after layer normalization, the global feature vector is obtained. :
[0059] (15);
[0060] in, This represents a layer normalization operation that normalizes each dimension of the vector.
[0061] Ultimately, the global feature vectors corresponding to all positions form a global feature representation sequence. .
[0062] Furthermore, the specific process of step 5 is as follows:
[0063] Step 5.1: Process the global feature representation sequence. Perform average pooling to obtain the aggregated global feature vector. The calculation formula is:
[0064] (16);
[0065] in, for The Middle The global feature vectors corresponding to each location, with the location index corresponding to the event index;
[0066] Step 5.2: Aggregate the global feature vector Input a fully connected layer and output a layer to calculate the predicted remaining time for the business process. The calculation formula is:
[0067] (17);
[0068] in, The weight vector of the fully connected output layer; This is a bias term.
[0069] A business process remaining time prediction system based on a hybrid architecture employs the aforementioned hybrid architecture-based business process remaining time prediction method. The system includes: an event prefix acquisition module, an embedding and position encoding module, a convolutional feature extraction module, a Transformer encoding module, and a remaining time prediction module. The event prefix acquisition module is used to obtain a set of event sequence prefixes to be predicted from the original event logs of the business process. The embedding and time-position encoding module is used to map each event activity and its associated context attributes in the event sequence prefix set to a corresponding embedding vector, and introduces position encoding and time-aware encoding based on the time interval between events into each embedding vector, generating a time-aware embedding representation sequence containing business context, position information, and time information. The system includes: a multi-scale convolutional feature extraction module, which performs one-dimensional convolution operations with different kernel sizes on the time-aware embedded representation sequence to extract multi-level local features and fuse them to obtain a multi-scale local feature representation sequence of the event sequence prefix set; a time-aware Transformer encoding module, which performs encoding operations based on a multi-head self-attention mechanism on the multi-scale local feature representation sequence and introduces a weight decay factor based on the time difference between events in the attention calculation to learn the global temporal dependencies in the event sequence prefix set and obtain a global feature representation sequence of the event sequence prefix set; and a remaining time prediction module, which calculates the predicted remaining time value of the business process corresponding to the event sequence prefix set based on the global feature representation sequence.
[0070] The beneficial technical effects of this invention are as follows: The proposed business process remaining time prediction method based on convolutional neural networks and Transformers integrates the advantages of local feature extraction and global dependency modeling, significantly improving prediction accuracy and model generalization ability. By using an event embedding model and positional encoding, a time-aware embedding representation sequence with temporal context is constructed, ensuring the complete preservation of event sequence information. A one-dimensional convolutional neural network is used to effectively capture local patterns in the prefix sequence, improving the model's ability to perceive short-term behavioral features. Furthermore, a time-aware Transformer encoder is introduced, utilizing a multi-head self-attention mechanism to learn long-range dependencies between events, achieving global feature representation. Simultaneously, a weight factor based on the time difference between events is introduced in the attention calculation to further improve the modeling effect of global temporal dependencies. Finally, the remaining time prediction value is output through average pooling and a fully connected regression layer, achieving end-to-end fine-grained prediction. This method has achieved excellent prediction performance on multiple public logs, possessing good robustness and adaptability, and is suitable for intelligent prediction scenarios in various business processes such as finance, healthcare, and government affairs, providing efficient and accurate technical means for process optimization and decision support. Attached Figure Description
[0071] Figure 1 This is a flowchart of the business process remaining time prediction method based on a hybrid architecture according to the present invention. Detailed Implementation
[0072] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0073] This invention first obtains a set of event sequence prefixes for instance trajectories from business process event logs, embedding the event activities and their associated contextual attributes (including executors, resources, timestamps, etc.) into a model to obtain an event embedding vector sequence. Simultaneously, positional encoding is introduced for each embedding vector, and time-aware encoding is generated by combining the time intervals between events to preserve sequence order and temporal differences. Second, a multi-scale one-dimensional convolutional neural network is used to perform convolution operations on the event embedding representation sequence, extracting multi-level local features through different convolutional kernel sizes, thereby enhancing the model's ability to represent short-term dependency patterns. Then, the fused local features are input into a time-aware Transformer encoder, capturing global contextual dependencies through a multi-head self-attention mechanism, and introducing a weight factor based on the time difference between events in the attention calculation to further improve the modeling effect of global temporal dependencies. Finally, the global feature sequence output by the Transformer encoder is aggregated, and regression calculation is performed through a fully connected layer to obtain the predicted remaining time value of the business process corresponding to the event sequence prefix.
[0074] This invention constructs a CNN-TF model by combining attribute embedding, time-aware mechanisms, and multi-scale convolutional feature extraction. This model can simultaneously consider local patterns and global dependencies, significantly improving the accuracy and robustness of remaining time prediction for business processes. In experimental evaluations, this model outperforms traditional CNN, Transformer, and Transformer-CNN (TF-CNN) models on multiple publicly available event logs, and reduces the mean absolute error (MAE) by 17.8% on some datasets. Furthermore, this invention provides a corresponding system, including an event prefix acquisition module, an embedding and position encoding module, a convolutional feature extraction module, a Transformer encoding module, and a remaining time prediction module, demonstrating good engineering feasibility and implementability.
[0075] This invention proposes a method for predicting the remaining time of a business process based on a hybrid architecture. The hybrid architecture includes an event embedding model, a multi-scale one-dimensional convolutional neural network, a time-aware Transformer encoder, and a fully connected output layer, such as... Figure 1 As shown, the method of the present invention specifically includes the following steps:
[0076] Step 1: Obtain the raw event logs of the business process, extract the prefix of each trajectory in the raw event logs, and generate a set of event sequence prefixes to be predicted; the specific process is as follows:
[0077] Step 1.1: Obtain the raw event logs from the public dataset website. The raw event logs are in the format of a structured file conforming to the XES specification, containing the event activity name, timestamp, event ID, associated executor, organization role, resource type, event lifecycle identifier, and other optional business attributes.
[0078] The raw event log is a collection of several tracks, and a track is a sequence of several event activities;
[0079] Define the original event log as follows:
[0080] (1);
[0081] in, This is the original event log; The total number of trajectories; For the first The trajectory is as follows:
[0082] (2);
[0083] in, For the first The first of the trajectories One event;
[0084] Each event is defined as consisting of an activity, a timestamp, and a set of contextual attribute embeddings. This set of contextual attribute embeddings is derived from the event contextual attributes recorded in the original event log, including the executor associated with the event, organizational role, resource type, event lifecycle identifier, and other optional business attributes. The set of contextual attribute embeddings consists of multiple contextual attributes associated with the current event from the event log. When a certain type of attribute is missing, it is represented by a preset placeholder to ensure the consistency of subsequent model inputs.
[0085] Step 1.2: For each track in the original event log, extract all tracks of length [length missing] in non-decreasing order of event timestamps. The trajectory prefix, where ; For the first The number of events contained in a trajectory, i.e., the actual length of the trajectory.
[0086] The trajectory prefix is defined as:
[0087] (3);
[0088] in, Prefix for trajectory; For the first The first of the trajectories One event, Corresponding trajectory prefix length;
[0089] The event sequence prefix set is composed of all prefixes of all trajectories. :
[0090] (4);
[0091] This prefix set serves as the basis for the subsequent model input sequence.
[0092] Step 2: Based on the event embedding model, each event in the event sequence prefix set is vectorized and embedded, and a position encoding vector and a time difference vector are introduced to obtain a time-aware embedding representation sequence that integrates position and time information; the specific process is as follows:
[0093] Step 2.1: Use an event embedding model to process the trajectory prefix. Each event in the vector is embedded into a vectorized representation, resulting in 3D event embedding vector:
[0094] (5);
[0095] in, Embedded model for events; For the first The first of the trajectories The activities of this event; For the first The first of the trajectories The context attributes corresponding to the event are embedded in the collection of the first event. Embedded representation of class context attributes; For the first The first of the trajectories Embedding vectors of events, For dimensions; For the first The first of the trajectories The context attributes corresponding to each event are embedded in a collection;
[0096] Step 2.2: Introduce positional encoding to the event embedding vector to obtain the positional encoding vector. The positional encoding vector is... Dimensional components and the first The dimensional components are calculated using the following formulas:
[0097] (6);
[0098] (7);
[0099] in, For the first The first of the trajectories Location encoding vectors for each event; For location index, ;
[0100] Step 2.3: Calculate the time interval between adjacent events and map it into a time difference vector using a time embedding function:
[0101] (8);
[0102] (9);
[0103] in, For the first The first of the trajectories The time interval between adjacent events; , The first The first of the trajectories The first event, the The time when the event occurred; For the first The first of the trajectories The time difference vector between adjacent events; For time embedding functions;
[0104] Step 2.4: Add or concatenate the embedding vector of each event with its corresponding location encoding vector and time difference vector element-wise to obtain the event embedding representation that integrates location and time information.
[0105] (10);
[0106] in, For the first The first of the trajectories Embedded representation of an event;
[0107] The embedded representations of all events form the time-aware embedded representations of the trajectory prefix sequence. As input for subsequent convolutional feature extraction and global modeling, the first... The embedded representation of the event corresponds to the first event placed in the time-aware embedding sequence. One position.
[0108] Step 3: Input the time-aware embedded representation sequence into a multi-scale one-dimensional convolutional neural network for convolution operations. Extract multi-level local features through convolution operations with different kernel sizes, and fuse them to obtain a multi-scale local feature representation sequence of the event sequence prefix set; the specific process is as follows:
[0109] Step 3.1: For the time-aware embedded representation sequence, a one-dimensional convolutional neural network with multiple kernel sizes is used to perform parallel convolution operations to extract multi-level local feature values. For the first... The convolutional kernel (the first one) The size of each convolutional kernel is The convolution operation of ) is calculated using the following formula:
[0110] (11);
[0111] in, For time-aware embedding representation of the sequence, the first... A vector representation of each event activity; For the first Each convolutional kernel is located at... Weight parameters at the location; For the first Local features generated by each convolutional kernel; It is a non-linear activation function; For the time-aware embedding representation of the input sequence, the first... The embedding vector of the i-th event, after the i-th Local features obtained after computation by each convolutional kernel;
[0112] Step 3.2, place the first Local features generated by all convolution kernels for a given event By concatenating along the feature dimension, the event sequence prefix set is obtained. Multi-scale local feature vectors of an event:
[0113] (12);
[0114] in, Indicates the number of multi-scale convolution kernels; For the time-aware embedding representation of the input sequence, the first... The embedding vector of the i-th event, after the i-th Local features obtained after computation by each convolutional kernel; For the first Multi-scale local feature vectors obtained by fusing multiple events.
[0115] The multi-scale local feature vectors of all events constitute a multi-scale local feature representation sequence. , as input for subsequent global feature modeling, where is the length of the feature sequence output by the convolution.
[0116] Step 4: Input the multi-scale local feature representation sequence output by the multi-scale one-dimensional convolutional neural network into the time-aware Transformer encoder. The global contextual dependencies in the event sequence prefix set are learned through a multi-head self-attention mechanism. A weight decay factor based on the time difference between events is introduced during the attention calculation process to enhance the modeling ability of global temporal dependencies, thereby obtaining a global feature representation sequence of the event sequence prefix set containing temporal dependency information. The specific process is as follows:
[0117] Step 4.1: Represent the multi-scale local feature sequence As input to the Transformer encoder, a multi-head self-attention mechanism is used to calculate the attention weights between positions in the sequence, and a weight decay factor for the time difference between events is introduced into the attention score to enhance the ability to model temporal dependencies. The calculation formula is as follows:
[0118] (13);
[0119] in, This is a multi-head self-attention mechanism; They represent sequences from multi-scale local feature representations through linear transformation. The resulting query matrix, key matrix, and value matrix; It is the transpose symbol; The key vector dimension for each attention head; This is the time difference matrix between events; This is the weight decay factor; This indicates that each row of the matrix is normalized.
[0120] Step 4.2: The feature representation output by the multi-head self-attention mechanism is processed through a feedforward neural network, residual connections, and layer normalization to obtain a global feature representation sequence containing the event sequence prefix set with time-dependent information. . for The Middle The global feature vector corresponding to each position This represents the total number of positions. The specific process is as follows:
[0121] The feature representations output by the multi-head self-attention mechanism constitute the multi-head self-attention output matrix. For the multi-head self-attention output matrix, its calculation formula via a feed-forward network is as follows:
[0122] (14);
[0123] in, It is a feedforward neural network; , This is the weight matrix of the feedforward neural network; , This is the bias term for the feedforward neural network;
[0124] The output of the feedforward neural network is then combined with Residual connections are performed, and after layer normalization, the global feature vector is obtained. :
[0125] (15);
[0126] in, This represents a layer normalization operation that normalizes each dimension of the vector.
[0127] Ultimately, the global feature vectors corresponding to all positions form a global feature representation sequence. .
[0128] Step 5: Aggregate the global feature representation sequence output by the time-aware Transformer encoder, and calculate the remaining time prediction value of the business process through the fully connected output layer. The specific process is as follows:
[0129] Step 5.1: Process the global feature representation sequence. Perform average pooling to obtain the aggregated global feature vector. The calculation formula is as follows:
[0130] (16);
[0131] in, for The Middle The global feature vectors corresponding to each location, with the location index corresponding to the event index;
[0132] Step 5.2: Aggregate the global feature vector Input a fully connected layer and output a layer to calculate the predicted remaining time for the business process. The calculation formula is as follows:
[0133] (17);
[0134] in, The weight vector of the fully connected output layer; This is a bias term.
[0135] A business process remaining time prediction system based on convolutional neural networks and Transformers, employing the aforementioned business process remaining time prediction method to predict the remaining time of business process event logs, comprises: an event prefix acquisition module, an embedding and location encoding module, a convolutional feature extraction module, a Transformer encoding module, and a remaining time prediction module. The event prefix acquisition module is used to obtain a set of event sequence prefixes to be predicted from the original event logs of the business process. The embedding and time-location encoding module is used to map each event activity and its associated context attributes (including executor, resource, timestamp, etc.) in the event sequence prefix set into a corresponding embedding vector, and introduces location encoding and time-aware encoding based on the time interval between events into each embedding vector, generating a vector containing business context and location information. The system comprises: a time-aware embedded representation sequence with time information; a multi-scale convolutional feature extraction module, used to perform one-dimensional convolution operations with different kernel sizes (or dilation rates) on the time-aware embedded representation sequence to extract multi-level local features and fuse them to obtain a multi-scale local feature representation sequence of the event sequence prefix set; a time-aware Transformer encoding module, used to perform encoding operations based on a multi-head self-attention mechanism on the multi-scale local feature representation sequence and introduce a weight decay factor based on the time difference between events in the attention calculation to learn the global temporal dependencies in the event sequence prefix set and obtain a global feature representation sequence of the event sequence prefix set; and a remaining time prediction module, used to calculate the predicted remaining time value of the business process corresponding to the event sequence prefix set based on the global feature representation sequence.
[0136] To demonstrate the feasibility and superiority of the present invention, the following embodiments are provided.
[0137] To verify the effectiveness of the CNN-TF model in predicting remaining time in real-world business processes, the following implementation example is provided using the publicly available dataset BPI_13_Incidents (i.e., the Volvo IT incident management logs from the BPI Challenge 2013). This example simulates the incident ticket processing workflow of a large IT operations department.
[0138] The hardware configuration for this embodiment is as follows:
[0139] Cluster environment: Intel i9-13900K CPU, NVIDIA RTX 4090 GPU;
[0140] The software tools used in this embodiment are as follows:
[0141] Process mining tool: ProM 6.11 (integrated with custom plugins, supporting clustering, sampling and visualization).
[0142] Embedded model training: Python 3.9 + PyTorch 2.2.2 deep learning framework.
[0143] The public dataset BPI_13_Incidents is in the format of a standard XES event log, namely BPI_13_Incidents.xes. Using the public dataset BPI_13_Incidents as an example event log, this log contains 7554 tracks, totaling 67433 event activities. The event activity types are divided into 7 categories, and the track lengths range from 3 to 19 steps.
[0144] The CNN-TF model described above was trained and evaluated on the BPI_13_Incidents dataset. Its MAE (Mean Absolute Error) and RMSE (Root Mean Square Error) metrics were recorded and compared with traditional models. Table 1 lists the MAE and RMSE values of different models on this dataset. CNN stands for Convolutional Neural Network; Transformer is a sequence model based on an attention mechanism; TF-CNN is a comparative model that first uses Transformer to capture global contextual dependencies and then uses Convolutional Neural Network to extract local features; CNN-TF is the hybrid prediction structure proposed in this invention, which first uses Convolutional Neural Network to extract local patterns and then uses Transformer to model long-range dependencies.
[0145] Table 1. Comparison of MAE and RMSE values for different models on the BPI_13_Incidents dataset.
[0146] .
[0147] As shown in Table 1, on the BPI_13_Incidents dataset, the CNN-TF model of this invention significantly outperforms the pure CNN, pure Transformer, and TF-CNN models in both MAE and RMSE, verifying the effectiveness of the hybrid architecture design of this invention. This method reduces the MAE by 17.8% compared to the suboptimal model, further demonstrating the effectiveness of CNN-TF in improving the accuracy of remaining time prediction.
[0148] In summary, the hybrid architecture of this invention effectively integrates local patterns and global contextual information of event sequences, achieving accurate prediction of the remaining time of business processes. Through the processing steps described above, the input event prefix is ultimately mapped to the predicted remaining time value. Experimental results verify the superior performance of the CNN-TF model on the BPI_13_Incidents dataset.
[0149] 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 hybrid architecture based business process remaining time prediction method, characterized in that, The mixed architecture comprises an event embedding model, a multi-scale one-dimensional convolutional neural network, a time-aware Transformer encoder, and a fully connected output layer. Step 1: Obtain the original event log of the business process, extract the prefix of each trace in the original event log, and generate a set of event sequence prefixes to be predicted. Step 2: Based on the event embedding model, each event in the event sequence prefix set is vectorized and embedded, and a position encoding vector and a time difference vector are introduced to obtain a time-aware embedding representation sequence that fuses position information and time information. Step 3: The time-aware embedding representation sequence is input into the multi-scale one-dimensional convolutional neural network for convolution operation, and multi-level local features are extracted through convolution operations with different kernel sizes, and then fused to obtain a multi-scale local feature representation sequence of the event sequence prefix set. Step 4: The multi-scale local feature representation sequence is input into the time-aware Transformer encoder to learn the global context dependency in the event sequence prefix set through the multi-head self-attention mechanism; a weight decay factor based on the time difference between events is introduced during attention calculation, and finally a global feature representation sequence containing time-dependent information is calculated. Step 5: Aggregate the global feature representation sequence and calculate the remaining time prediction value of the business process through the fully connected output layer.
2. The method of claim 1, wherein the remaining time of the business process is predicted based on the hybrid architecture. The specific process of step 1 is as follows: Step 1.1: Obtain the original event log from a public dataset website. The original event log is a structured file in XES format, containing event activity name, timestamp, event ID, event-associated performer, organizational role, resource type, event lifecycle identifier, and other optional business attributes. The original event log is a collection of several traces, and a trace is a sequence composed of several event activities. Define the original event log as: (1); wherein, is the original event log; is the total number of traces; is the i-th trace, in particular: (2); wherein, is the th event in the th trajectory; Each event is composed of an activity, a timestamp, and a set of context attribute embeddings, which are derived from the event context attributes recorded in the original event log, including event-associated performer, organizational role, resource type, event lifecycle identifier, and other optional business attributes. The context attribute embedding set is composed of multiple context attributes associated with the current event. When a certain type of attribute is missing, a default placeholder is used. Step 1.2, for each trajectory in the original event log, extract all prefixes of length of the trajectory in non-decreasing order of event timestamps, where ; is the number of events contained in the thtrajectory. The trace prefix is defined as: (3); wherein, is a track prefix; is a first of a first event in a track, corresponding track prefix length; The event sequence prefix set is constituted by all prefixes of all trajectories : (4)。 3.The hybrid-architecture-based business process remaining time prediction method according to claim 2, characterized in that, The specific process of step 2 is as follows: Step 2.1: Use the event embedding model to vectorize and embed each event in the trace prefix to obtain an event embedding vector: (5); wherein, is an embedding model for events; is an embedding model for events; is an activity of the event in the th trajectory, is an embedding model for events; is an embedding representation of the contextual attribute in the set of contextual attribute embeddings corresponding to the th event in the th trajectory, is an embedding vector for the th event in the th trajectory, is a set of contextual attribute embeddings corresponding to the th event in the th trajectory. Step 2.2, introduce position encoding for the event embedding vector, to obtain a position encoding vector, the first dimension and the second dimension of the position encoding vector are calculated as follows respectively: (6); (7); wherein, is the th event in the th track of the th position index, ; Step 2.3: Calculate the time interval between adjacent events and map it to a time difference vector through a time embedding function: (8); (9); wherein, is the th event in the th trajectory; , is the th event in the th trajectory; th event in the th trajectory; is the th event in the th trajectory; is a time embedding function; Step 2.4: Add the embedding vector of each event to its corresponding position encoding vector and time difference vector element by element to obtain an event embedding representation that fuses position information and time information: (10); wherein, is the th event in the th trajectory; The embedded representations of all events constitute a sequence of time-aware embedded representations of trajectory prefixes The embedded representation of the th event corresponds to the th position in the sequence of time-aware embeddings.
4. The method of claim 3, wherein the remaining time of the business process is predicted based on the hybrid architecture. The specific process of step 3 is as follows: Step 3.1, for the time-aware embedding representation sequence, a one-dimensional convolutional neural network with multiple different convolution kernel sizes is used for parallel convolution operation to extract multi-level local feature values; for the convolution operation of the first convolution kernel, the calculation formula is: (11); wherein, is a vector representation of a th event activity in the sequence of time-aware embedding representations; is a weight parameter of the th convolutional kernel at position ; is a local feature generated by the th convolutional kernel; is a non-linear activation function; is an embedding vector of a th event in the sequence of time-aware embedding representations based on the input, after being computed by the th convolutional kernel; is a local feature of the th convolutional kernel; Step 3.2, concatenate the local features generated by all convolution kernels of the first event to obtain a multi-scale local feature vector of the first event in the event sequence prefix set Step 3.2, concatenate the local features generated by all convolution kernels of the first event to obtain a multi-scale local feature vector of the first event in the event sequence prefix set Step 3.2, concatenate the local features generated by all convolution kernels of the first event to obtain a multi-scale local feature vector of the first event in the event sequence prefix set (12); wherein, denotes the number of multi-scale convolution kernels; is an embedding vector representing the th event in the input sequence based on the time-aware embedding representation, and is a local feature obtained after the th convolution kernel calculation; is a multi-scale local feature vector after fusion of the th event. The multi-scale local feature vector of all events constitutes a multi-scale local feature representation sequence wherein is the length of the feature sequence of the convolution output.
5. The method of claim 4, wherein the remaining time of the business process is predicted based on the hybrid architecture. The specific process of step 4 is as follows: Step 4.1, obtaining a sequence of multi-scale local feature representations As the input of the Transformer encoder, the attention weights between positions in the sequence are calculated using the multi-head self-attention mechanism, and a time difference weight decay factor between events is introduced into the attention score, and the calculation formula is: (13); wherein, is a multi-head self-attention mechanism; respectively represent the sequence of multi-scale local feature representations obtained query matrix, key matrix and value matrix; is a transpose symbol; is the dimension of the key vector for each attention head; is an inter-event time difference matrix; is a weight decay factor; denotes normalizing each row of the matrix; Step 4.2: The feature representation output by the multi-head self-attention mechanism is processed through a feedforward neural network, residual connections, and layer normalization to obtain a global feature representation sequence containing the event sequence prefix set with time-dependent information. ; for The Middle The global feature vector corresponding to each position The total number of positions; the specific process is as follows: The feature representation output by the multi-head self-attention mechanism constitutes a multi-head self-attention output matrix For the multi-head self-attention output matrix, the calculation formula through the feedforward neural network is: (14); wherein is a feedforward neural network; , is a weight matrix of the feedforward neural network; , is a bias term of the feedforward neural network; The output of the feedforward neural network is further connected with a residual connection and subjected to layer normalization to obtain a global feature vector : (15); wherein, denotes a layer normalization operation that normalizes each dimension of a vector; Finally, the global feature vectors corresponding to all positions form a global feature representation sequence .
6. The method of claim 5, wherein the remaining time of the business process is predicted based on the hybrid architecture. The specific process of step 5 is as follows: Step 5.1, computing global feature representation sequence performing an average pooling operation to obtain an aggregated global feature vector , and the calculation formula is: (16); wherein, is the first global feature vector corresponding to the position, the position number corresponding to the event number; Step 5.2, the aggregated global feature vector Input the full connection output layer to calculate the remaining time prediction value of the business process The calculation formula is: (17); wherein, is a weight vector for the fully connected output layer; is a bias term.
7. A hybrid architecture based business process remaining time prediction system, characterized in that, The method comprises the following steps: obtaining an event prefix set from an original event log of a business process; mapping each event activity in the event prefix set and its associated context attributes into a corresponding embedding vector, and introducing position encoding and time-aware encoding based on the time interval between events into each embedding vector to generate a time-aware embedding representation sequence containing business context, position information and time information; performing one-dimensional convolution operation with different convolution kernel sizes on the time-aware embedding representation sequence to extract multi-level local features, and fusing the multi-level local features to obtain a multi-scale local feature representation sequence of the event prefix set; performing encoding operation based on the multi-head self-attention mechanism on the multi-scale local feature representation sequence, and introducing a weight decay factor based on the time difference between events in the attention calculation to learn the global time sequence dependency in the event prefix set, thereby obtaining a global feature representation sequence of the event prefix set; and calculating the business process remaining time prediction value corresponding to the event prefix set according to the global feature representation sequence.
Citation Information
Patent Citations
Production business process remaining time prediction method based on multi-modal case knowledge graph
CN117455037A
Method for evaluating health state of cigarette comprehensive test board
CN120724087A