A workflow execution optimization method based on random time Petri net
By constructing a stochastic time Petri net model, the service time and waiting time of business processes are analyzed. Combined with load balancing and collaborative interactivity, the execution time of workflows is optimized, solving the optimization problem of detailed time nodes in business processes and improving process efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the detailed time nodes in business processes cannot be effectively analyzed and optimized, resulting in insufficient improvement in the time efficiency of business processes.
A workflow execution optimization method based on stochastic time Petri nets is adopted. By constructing service time models and waiting time models, the total average service time and waiting time of activities under different structures are calculated. Combined with load balancing and collaborative interactivity, the execution time of the workflow is optimized.
It optimizes the time of complex workflow structures, shortens the service time and execution time of business processes, and improves process efficiency.
Smart Images

Figure CN115239008B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of logistics services, specifically relating to a workflow execution optimization method based on stochastic time Petri nets. Background Technology
[0002] In June 2020, to accelerate logistics timeliness, Cainiao once again proposed to accelerate the expansion of its domestic and international logistics network, fully covering the global logistics network and rural capillary branches, thereby achieving "24-hour delivery nationwide and 72-hour delivery globally." With the continuous development of the internet, customers' demands for responsiveness are increasing. The new logistics models required in the current environment place high demands on their timeliness, completeness, and reliability. To meet customer requirements, enterprises need to optimize their business processes to improve efficiency and reduce processing time. Therefore, researching the time efficiency improvement of business processes has become a hot topic in workflow modeling.
[0003] Most existing time-based workflows focus on the overall execution time of business processes to reduce costs and improve efficiency, but they cannot effectively analyze and optimize the detailed time nodes within the business processes. Summary of the Invention
[0004] The purpose of this invention is to address the aforementioned shortcomings in the prior art by providing a workflow execution optimization method based on stochastic time Petri nets, thereby solving the problem that detailed time nodes in existing business processes cannot be effectively analyzed and optimized.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A workflow execution optimization method based on stochastic time Petri nets, comprising:
[0007] S1. Construct a service time model, calculate the total average service time of activities under different structures, and update the current load to calculate the objective function that minimizes the workflow service time.
[0008] S2. Based on the target model of minimizing load balancing service time, the executor's capacity and the number of actual tasks it has allocated are converted into executor load and iterated through to find the optimal candidate executor.
[0009] S3. Construct a waiting time model and, based on the objective function that minimizes workflow service time, calculate the objective function that minimizes workflow execution time.
[0010] S4. Optimize the execution time of the random-time Petri net based on the objective function of minimizing the workflow execution time.
[0011] Furthermore, step S1 specifically includes:
[0012] S1.1 Based on the model of stochastic time Petri net, the execution time generated by the multidimensional dynamic workflow is analyzed, the execution time is divided into service time and waiting time, and workflow time optimization models are constructed for each.
[0013] S1.2 Calculate the total average service time of activities under different structures;
[0014] S1.3 Update the executor load and calculate the objective function that minimizes the workflow service time.
[0015] Further, step S1.2 calculates the total average service time for activities under different structures, including:
[0016] Calculate the total average service time of sequential structure activities:
[0017]
[0018] Among them, S i For the event T i The average service time on the platform; n is the total number of workflow activities, e i The number of executors in each workflow activity, u ij For each activity in the workflow, a candidate executor; t ij For the executor u ij Complete Activity T i Required average service time; Q(u) ij ) for the activity T i Executor u ij Average queuing time for processing instances; the activity set of the workflow is {T} i (1≤i≤n);
[0019] Calculate the total average service time of parallel architecture activities:
[0020]
[0021] Where a is the start number of the parallel structure branch node and g is the end number of the parallel structure branch node;
[0022] Calculate the total average service time of the selected structure activities:
[0023]
[0024] Where v is the end sequence number of the branch node in the selection structure;
[0025] Calculate the total average service time of the cyclic structure activity:
[0026]
[0027] Where f is the end index of the N branch node of the loop set, and z is the end index of the loop structure.
[0028] Furthermore, S1.3 updates the executor load and calculates the objective function that minimizes the workflow service time, including:
[0029] New tasks are assigned to the service time model based on the minimum predicted load, where load updates include:
[0030] When the executor assigns new tasks, it updates the current load. The predicted load value and the updated current load are as follows:
[0031] L pred (u ij ) = L cur (u ij )+t ij , j∈(1,e i )
[0032] L cur (u ik ) = L pred (u ik )
[0033] Among them, u ik To predict the executor with the lowest load; L pred (u ij ) for the executor u ij Predicted load; L cur (u ij ) for the executor u ij When taking load; L cur (u ik ) for the executor u ik Current load; L pred (u ik ) for the executor u ik Predicted load;
[0034] The current load needs to be updated at each time step:
[0035] L cur (u ij ) = max(0,L cur (u ij )-Δt)
[0036] Where Δt is the time step;
[0037] In a dynamic workflow system, if each instance has the shortest service time across all activities, and the task assignment selects the executor with the least load, the objective function for minimizing workflow service time is:
[0038] min(L pred (u ij )), st A ki ≠0,1≤A ki ≤e i And it is an integer;
[0039] Among them, constraint A ki ≠0 means that all tasks generated by the instance in the activity should be assigned to the executor in the corresponding activity.
[0040] Further, step S2 includes:
[0041] Using time as the main thread, through a time variable t cur The loop accumulation simulates a real workflow environment, calculates the current load of the executors on the timeline, and determines the number of instances arriving at the current moment;
[0042] as well as,
[0043] Using single instance allocation as the main focus, determine the activities that can be allocated on a single instance at the current moment.
[0044] Furthermore, step S3 specifically includes:
[0045] S3.1 In the interaction process between two identical executors in different activities of a workflow, a learning effect exists due to the increase in the number of interactions. Executors accumulate experience by repeating interactive work, which reduces the workflow waiting time generated by subsequent interactions between the two parties. A two-stage interaction curve is used to represent the interaction learning effect, that is, at the x-th interaction, executor u i-1,k With the executor u iv The resulting waiting time is:
[0046]
[0047] Executor u i-1,k With the executor u iv The average waiting time generated between them is:
[0048]
[0049] Where M is the incompressible factor in the interaction process, i.e., the waiting time for repeated interactions cannot be reduced; B is the prior experience factor existing in the interaction process of the executor; b is the interaction learning index; X i-1,k ,u iv >For the executor u i-1,k With the executor uiv The number of interactions that reach a stable interaction time; For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The average waiting time generated between them; c i-1,k ,u iv >For the executor u i-1,k With the executor u iv Number of interactions; t x i-1,k ,u iv >For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The waiting time generated during the x-th interaction between them;
[0050] S3.2 Calculate the total average waiting time for activities under different structures;
[0051] S3.3. Based on the interaction waiting time between executors, update the new task according to the sum of the minimum predicted load and the predicted interaction time.
[0052] Further, step S3.2 calculates the total average waiting time for activities under different structures, including:
[0053] Calculate the total average wait time for sequential workflow activities:
[0054]
[0055] Calculate the total average latency of parallel workflow activities:
[0056]
[0057] Calculate the total average wait time for selected structure workflow activities:
[0058]
[0059] Calculate the total average wait time for activities in a cyclical workflow:
[0060]
[0061] Among them, W i The waiting time for activity i.
[0062] Furthermore, in step S3.3, based on the interaction waiting time between executors, the minimum predicted load and the sum of the predicted interaction time R are used as the basis for the calculation. pred (u ij To update new tasks, including:
[0063] When the executor assigns a new task, update the executor R. cur (u ij ):
[0064] R pred (u ij ) = L cur (u ij )+t ij +t x i-1,v ,u ij >,j∈(1,e i )
[0065] R cur (u ik ) = R pred (u ik )
[0066] Among them, R pred (u ik ) for the executor u ik The sum of the predicted load and interaction time;
[0067] Update the sum of the forecast load and forecast interaction time at each time step:
[0068] R cur (u ij ) = max(0,R cur (u ij )-Δt)
[0069] In dynamic workflows, the execution time of activities in stochastic Petri nets is affected by service time and waiting time. By allocating instance tasks, the workflow execution time can be shortened. The objective function for minimizing the workflow execution time is:
[0070] min(L pred (u ij )+t x i-1,v ,u ij >)
[0071] st A ki ≠0,1≤A ki ≤e i And it is an integer.
[0072] A k,i-1 =v
[0073] 1 <k≤m
[0074] 1 <i≤n
[0075] 1 <j≤e i
[0076] Among them, constraint A k,i-1 =v means that on the k-th instance T i-1 The person who carried out the activity chose u i-1,v .
[0077] Further, step S4 includes:
[0078] Calculate the interaction time after multiple interactions between each executor, the current load of each executor at each moment, and determine the number of instances arriving at the current moment;
[0079] as well as,
[0080] The task assignment function determines the activities that can be assigned on a single instance at the current moment and counts the number of interactions that will continue for the assigned executor.
[0081] The workflow execution optimization method based on stochastic time Petri nets provided in this invention has the following beneficial effects:
[0082] This invention addresses composite workflow networks by providing a workflow execution time optimization method based on stochastic time Petri nets. It decomposes time transitions into waiting time and service time, and proposes a method that combines load with service time and collaborative interactivity with waiting time. Considering the overall workflow activity optimization, it establishes a service time optimization algorithm and an execution time optimization algorithm for multi-instance, multi-executor composite workflows, and uses MATLAB to solve for the optimal instance allocation scheme.
[0083] This invention constructs a service time model and an execution time model based on stochastic time Petri nets. Through executor load and collaborative interaction analysis, it achieves reasonable allocation of workflow tasks, thereby shortening the service time and execution time of business processes and improving process efficiency. Attached Figure Description
[0084] Figure 1 This is a service time model diagram under different structures of the present invention;
[0085] Figure 2 This is a schematic diagram of the STO algorithm solution process of this invention;
[0086] Figure 3 This is a graph showing the effect of parameter interaction curve changes in this invention. Detailed Implementation
[0087] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0088] Example 1, Reference Figure 1 This solution employs a workflow execution optimization method based on stochastic-time Petri nets. It analyzes the workflow execution time, characterizing it as service time and waiting time, and further analyzes it in conjunction with different workflow task allocation patterns at different time nodes. To adapt to the needs of enterprise supply-side structural reform, and considering the impact of enterprise human resources on execution time and the need for rational utilization of business process resources, it establishes an optimal service time model considering load balancing and an optimal execution time model considering collaborative interaction. This describes the optimal task allocation process in dynamic workflows and has practical guiding significance for improving workflow efficiency. Specifically, it includes:
[0089] Step S1: Construct a service time model, calculate the total average service time of activities under different structures, and update the current load to calculate the objective function that minimizes the workflow service time.
[0090] In this embodiment, within a workflow using a random-time Petri net, instances arrive at the first activity following a Poisson distribution with parameter λ. The activity set of the workflow is {T}. i}(1≤i≤n), where n is the total number of workflow activities, e i The number of executors in each workflow activity, u ij Candidate executors for each activity in the workflow;
[0091] In this embodiment, the transition of random-time Petri net activities has an average implementation rate λ. i Convert it into an average execution time τ with a time unit. i This is then broken down into service time and waiting time. First, the formula for the total average service time of activities under different structures is derived. Then, two methods for updating executor load are proposed. Finally, based on the model method, an objective function is established to solve for the shortest service time of workflow instances. The average service time of activities in the stochastic time Petri net model will affect the average implementation rate and average execution time of activities. This step further includes the following steps:
[0092] Step S1.1: Based on the construction of the stochastic time Petri net model, analyze the execution time generated during the operation of the multidimensional dynamic workflow, divide the execution time into service time and waiting time, and construct workflow time optimization models for each.
[0093] S1.2 Formula for calculating the total average service time of activities under different structures S i Specifically, it includes:
[0094] (1) Sequential structure
[0095] Sequential workflow execution time model, such as Figure 1 As shown in (a), the total average service time for sequential structure activities is calculated as follows:
[0096]
[0097] (2) Parallel Structure
[0098] Parallel workflow execution time model, such as Figure 1 As shown in (b), the parallel structure can be divided into three parts: the sequential structure before parallelization, the parallel branches, and the sequential structure after parallelization.
[0099] The total average service time for the first part of the activity is calculated as follows:
[0100]
[0101] The total average service time for the second part of the activity is calculated as follows:
[0102]
[0103] The total average service time for the third part of the activity is calculated as follows:
[0104]
[0105] Therefore, the total average service time of the parallel structure activity is:
[0106]
[0107] (3) Select Structure
[0108] Select the structured workflow execution time model, such as... Figure 1 As shown in (c), there are a total of g selectable paths, and the probability of each path being selected is q. k For k∈(1,g), the selection structure can also be divided into three parts: the sequence structure before selection, the branches of selection, and the sequence structure after selection.
[0109] The total average service time for the first part of the activity is calculated as follows:
[0110]
[0111] The total average service time for the second part of the activity is calculated as follows:
[0112]
[0113] The total average service time for the third part of the activity is calculated as follows:
[0114]
[0115] Therefore, the total average service time for selected structural activities is:
[0116]
[0117] (4) Loop structure
[0118] Loop structures can also be transformed into corresponding sequential structures to calculate service time. In practical applications, the loop portion of a loop structure is executed repeatedly, leading to an uncertain execution path. The execution time model for a loop structure workflow is as follows: Figure 1 As shown in (d), let the activity set of the upper part be M, including activities (t) f+1 ,...,t v The lower part of the activity set is N, which includes activities (t). a+1 ,...,t f In this network, activity T z Before execution, activity set M and activity set N are executed w times and (w+1) times respectively, where w≥0, meaning that activity set N is executed one more time than activity set M.
[0119] The loop structure can be divided into four parts: the sequential structure before the loop, the sequential structure for repeatedly executing activity set N, the sequential structure for repeatedly executing activity set M, and the sequential structure after the loop ends.
[0120] The total average service time for the first part of the activity is calculated as follows:
[0121]
[0122] The total average service time for the second part of the activity is calculated as follows:
[0123]
[0124] The total average service time for the third part of the activity is calculated as follows:
[0125]
[0126] The total average service time for the activities in Part Four is calculated as follows:
[0127]
[0128] Therefore, the total average service time of the cyclic structure activity is:
[0129]
[0130] Among them, S i Activity T i Average service time on; t ij For the executor u ij Complete Activity T i The average service time required is the same for the same executor to complete the same activity in any instance of the workflow; Q(u ij ) for the activity T i Executor u ij Average queuing time for processing instances; e i For the event T i The number of executors on the list;
[0131] Step S1.3: Update the executor load and calculate the objective function that minimizes the workflow service time, which specifically includes:
[0132] Without considering waiting time, we first optimize the service time with the longer time interval to avoid local optima. New task allocation is based on the minimum predicted load, and there are two scenarios for updating the current load:
[0133] (1) When assigning a new task, the executor needs to update its current load. First, calculate the predicted load for each executor. At this point, the predicted load is equal to the current load of each executor plus the time required to execute the task. After calculating the predicted load, select the executor u with the lowest predicted load. ik This is used as the assignment object for this task. Finally, the current load of this executor is updated. The predicted load value and the updated current load are as follows:
[0134] L pred (u ij ) = L cur (u ij )+t ij , j∈(1,e i )
[0135] L cur (u ik ) = L pred (u ik )
[0136] Among them, u ik To predict the executor with the lowest load; L pred (u ij ) for the executor uij Predicted load; L cur (u ij ) for the executor u ij When taking load; L cur (u ik ) for the executor u ik Current load; L pred (u ik ) for the executor u ik Predicted load;
[0137] (2) The current load needs to be updated at each time step. The current updated load value for all executors is equal to the current load of each executor at the previous time step minus the load completion amount at the previous time step. The current updated load value for all executors is:
[0138] L cur (u ij ) = max(0,L cur (u ij )-Δt)
[0139] Where Δt is the time step;
[0140] In the specific process of task allocation, while specifying the allocation method based on the number of tasks in the executor's work list can achieve a balance in the number of tasks, the different processing times for different executors in the workflow mean that this allocation method cannot achieve load balancing among executors. Therefore, the processing time of tasks in the executor's work list is converted into workload. In a dynamic workflow system, to minimize the service time across all activities of each instance, the executor with the lowest load should be selected when allocating tasks. The objective function is:
[0141] min(L pred (u ij )), st A ki ≠0,1≤A ki ≤e i And it is an integer;
[0142] Constraint A ki ≠0 means that all tasks generated by the instance in the activity should be assigned to the executor in the corresponding activity.
[0143] Step S2: Based on the target model of minimizing load balancing service time, convert the executor's capacity and the actual number of tasks it has been allocated into executor load and iterate through the data to find the optimal candidate executor.
[0144] refer to Figure 2To address the objective function of minimizing load balancing service time, this embodiment employs the Service Time Optimization Algorithm (STO). This algorithm converts the executor's capacity and the actual number of tasks assigned to iteratively into an executor load, thereby identifying the most suitable candidate executor. This algorithm consists of a main function and a task allocation function. In the main function, time is the primary focus, using a time variable t... cur The loop accumulation simulates a real workflow environment, calculating the current load of executors on the timeline and determining the number of instances arriving at the current moment. In the task allocation function, focusing on individual instance allocation, it determines which activities can be assigned to a single instance at the current moment. Finally, the operational ideas and steps of the main function and the task allocation function are given respectively.
[0145] Step S3: Construct a waiting time model and, based on the objective function that minimizes workflow service time, calculate the objective function that minimizes workflow execution time;
[0146] In this embodiment, in the workflow of a random-time Petri net, instances arrive at the workflow following a Poisson distribution. As m instances arrive sequentially, each instance traverses the activities of the workflow to generate corresponding tasks. Different executors of the same task have different execution times. Executors of adjacent activities need to interact with new instance information, and the waiting time generated by interactions between different executors is different. The interaction time of the same executor will decrease with the number of interactions, and the interaction time will tend to a fixed value when both parties reach a certain number of interactions.
[0147] This paper analyzes the impact of parameters on the waiting time of executor interactions in a two-stage interaction model existing in a stochastic Petri net executor interaction process. Then, it calculates the waiting time for four basic workflow structures. Finally, based on the objective function of minimizing workflow service time, it calculates the objective function of minimizing workflow execution time. The specific steps include:
[0148] Step S3.1: During the interaction between two identical executors in different activities of the workflow, a learning effect will occur due to the increase in the number of interactions. The executors accumulate experience by repeating interactive work, which reduces the workflow waiting time generated by subsequent interactions between the two parties. The interaction learning effect can be represented by an interaction curve.
[0149] Based on the learning curve, a two-stage interaction curve is proposed, namely, the executor u at the xth interaction. i-1,k With the executor u iv The resulting waiting time can be expressed by the following formula:
[0150]
[0151] Among them, t x i-1,k ,u iv >For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The waiting time during the x-th interaction; M is the incompressible factor in the interaction process, i.e., the waiting time for repeated interactions cannot be reduced, where 0≤M≤1; B is the prior experience factor existing in the interaction process of the executor, where B>0; b is the interaction learning index, representing the learning ability of the executor in the interaction process, where 0≤b≤1; X i-1,k ,u iv >For the executor u i-1,k With the executor u iv The number of interactions that reach a stable interaction time;
[0152] Executor u i-1,k With the executor u iv The average waiting time generated between them can be expressed by the following formula:
[0153]
[0154] in, For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The average waiting time generated between them; c i-1,k ,u iv >For the executor u i-1,k With the executor u iv Number of interactions; t x i-1,k ,u iv >For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The waiting time generated during the x-th interaction between them;
[0155] The first stage of the two-stage interaction curve is a declining stage. As the number of interactions between two identical executors increases, their tacit understanding continuously improves, and the interaction waiting time gradually decreases. The second stage is a stable stage. When the number of interactions reaches a stable state, the waiting time generated by the interaction tends to stabilize. The values of prior experience factor B, interaction learning index b, and incompressibility factor M all affect the interaction waiting time. Specifically, the incompressibility factor M and prior experience factor B are negatively correlated with the interaction time; the interaction learning index b is positively correlated with the interaction time. The effect of the parameter interaction curve changes is as follows: Figure 3 As shown in (a), 3(b), and 3(c).
[0156] Step S3.2: Since time is required for activity handover between adjacent activities, and the first activity in the workflow system has no preceding activity, the first activity in the workflow only has service time and no waiting time. The total waiting time for the four basic structures is calculated below, including:
[0157] (1) Sequential structure
[0158] The total average wait time for workflow activities is calculated as follows:
[0159]
[0160] (2) Parallel Structure
[0161] The total average waiting time for the first part of the activity is calculated as follows:
[0162]
[0163] The total average waiting time for the second part of the activity is calculated as follows:
[0164]
[0165] The total average waiting time for the third part of the activity is calculated as follows:
[0166]
[0167] Therefore, the total average waiting time for parallel workflow activities is:
[0168]
[0169] (3) Select Structure
[0170] The total average waiting time for the first part of the activity is calculated as follows:
[0171]
[0172] The total average waiting time for the second part of the activity is calculated as follows:
[0173]
[0174] The total average waiting time for the third part of the activity is calculated as follows:
[0175]
[0176] Therefore, the total average waiting time for selected structured workflow activities is:
[0177]
[0178] (4) Loop structure
[0179] The total average waiting time for the first part of the activity is calculated as follows:
[0180]
[0181] The total average waiting time for the second part of the activity is calculated as follows:
[0182]
[0183] The total average waiting time for the third part of the activity is calculated as follows:
[0184]
[0185] The total average waiting time for the activities in Part 4 is calculated as follows:
[0186]
[0187] Therefore, the total average waiting time for a cyclical workflow activity is:
[0188]
[0189] Among them, c i-1,k ,u iv >For the executor u i-1,k With the executor u iv Number of interactions; t x i-1,k ,u iv >For the executor u i-1,k Execution Activity T i-1 With the executor u iv Execution Activity T i The waiting time generated during the xth interaction between them.
[0190] Step S3.3: Taking into account the interaction waiting time between executors, the new task allocation is based on the sum of the minimum predicted load and the predicted interaction time R.pred (u ij ), R cur (u ij The update of ) has the following two cases:
[0191] (1) When assigning new tasks, the executor needs to update R. cur (u ij ); Calculate R pred (u ij After that, select the executor u with the smallest value. ik This is used as the assignment object for this task, and finally the R of this executor is updated. cur (u ij The sum of the predicted load and predicted interaction time for each executor, and the updated executor R. cur (u ij It can be expressed by the following formula.
[0192] R pred (u ij ) = L cur (u ij )+t ij +t x i-1,v ,u ij >,j∈(1,e i )
[0193] R cur (u ik ) = R pred (u ik )
[0194] (2) At each time step, the sum of the predicted load and the predicted interaction time needs to be updated; the current R of all executors cur (u ij ) equals R of each executor at the previous moment. cur (u ij Subtracting the amount completed at the previous moment, it can be expressed by the following formula.
[0195] R cur (u ij ) = max(0,R cur (u ij )-Δt)
[0196] In dynamic workflows, the execution time of activities in a stochastic-time Petri net is affected by service time and waiting time. Based on the service time model described above, the workflow execution time can be shortened through the reasonable allocation of instance tasks. The objective function is:
[0197] min(L pred (u ij )+tx i-1,v ,u ij >)
[0198] st A ki ≠0,1≤A ki ≤e i And it is an integer.
[0199] A k,i-1 =v
[0200] 1 <k≤m
[0201] 1 <i≤n
[0202] 1 <j≤e i
[0203] Among them, constraint A k,i-1 =v means that on the k-th instance T i-1 The person who carried out the activity chose u i-1,v .
[0204] Step S4: Optimize the execution time of the random-time Petri net based on the objective function of minimizing the workflow execution time;
[0205] This embodiment aims to minimize the execution time of a stochastic-time Petri net workflow by employing the Execution Time Optimization Algorithm (ETO), which considers collaborative interaction. This algorithm also consists of a main function and a task allocation function. The main function calculates the interaction time after multiple interactions among the executors, the current load of each executor at each moment, and determines the number of instances arriving at the current moment. The task allocation function determines which activities can be allocated to a single instance at the current moment and counts the number of further interactions for already allocated executors.
[0206] Although specific embodiments of the invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of this patent. Various modifications and variations that can be made by a person skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of this patent.
Claims
1. A workflow execution optimization method based on stochastic time Petri nets, characterized in that, Includes the following steps: S1. Construct a service time model, calculate the total average service time of activities under different structures, and update the current load to calculate the objective function that minimizes the workflow service time. S2. Based on the target model of minimizing load balancing service time, the executor's capacity and the number of actual tasks it has allocated are converted into executor load and iterated through to find the optimal candidate executor. S3. Construct a waiting time model and, based on the objective function that minimizes workflow service time, calculate the objective function that minimizes workflow execution time. S4. Optimize the execution time of the random-time Petri net based on the objective function of minimizing the workflow execution time; Step S1 specifically includes: S1.1 Based on the model of stochastic time Petri net, the execution time generated by the multidimensional dynamic workflow is analyzed, the execution time is divided into service time and waiting time, and workflow time optimization models are constructed for each. S1.2 Calculate the total average service time of activities under different structures; S1.3 Update the executor load and calculate the objective function that minimizes the workflow service time; Step S1.2, which calculates the total average service time for activities under different structures, includes: Calculate the total average service time of sequential structure activities: in, For the event Average service time on the platform; The total number of workflow activities. The number of executors in each workflow activity. Candidate executors for each activity in the workflow; For the executor Complete the activity Average service time required; In the event Executor Average queuing time for processing instances; the activity set of the workflow is ; Calculate the total average service time of parallel architecture activities: in, This is the starting index of the branch node in the parallel structure. This refers to the end sequence number of the branch node in the parallel structure. Calculate the total average service time of the selected structure activities: in, v To select the end sequence number of the structural branch node; Calculate the total average service time of the cyclic structure activity: in, f Circular set Branch node end sequence number z This is the sequence number of the loop ending node in the loop structure; S1.3 involves updating the executor load and calculating the objective function that minimizes the workflow service time, including: New tasks are assigned to the service time model based on the minimum predicted load, where load updates include: When the executor assigns new tasks, it updates the current load. The predicted load value and the updated current load are as follows: in, To predict the executor with the lowest load; For the executor Predicted load; For the executor Current load; For the executor Current load; For the executor Predicted load; The current load needs to be updated at each time step: in, For time step; In a dynamic workflow system, if each instance has the shortest service time across all activities, and the task assignment selects the executor with the least load, the objective function for minimizing workflow service time is: , ; Among them, constraints This indicates that any tasks generated by an instance in an activity should be assigned to the executor on the corresponding activity.
2. The workflow execution optimization method based on stochastic time Petri nets according to claim 1, characterized in that, Step S2 includes: Using time as the main thread, through a time variable The loop accumulation simulates a real workflow environment, calculates the current load of the executors on the timeline, and determines the number of instances arriving at the current moment; as well as, Using single instance allocation as the main focus, determine the activities that can be allocated on a single instance at the current moment.
3. The workflow execution optimization method based on stochastic time Petri nets according to claim 2, characterized in that, Step S3 specifically includes: S3.1 In the interaction process between two identical executors in different activities of a workflow, a learning effect exists due to the increase in the number of interactions. Executors accumulate experience by repeating interactive work, which reduces the workflow waiting time generated by subsequent interactions between the two parties. A two-stage interaction curve is used to represent the interaction learning effect, i.e., the first stage... Executor during the next interaction With the executor The resulting waiting time is: executor With the executor The average waiting time generated between them is: in, M It is an incompressible factor in the interaction process, meaning that the waiting time for repeated interactions cannot be reduced; B Prior experience factors existing in the interaction process between the executors; For interactive learning index; For the executor With the executor The number of interactions that reach a stable interaction time; For the executor Execution activities With the executor Execution activities The average waiting time generated between them; For the executor With the executor The number of interactions; For the executor Execution activities With the executor Execution activities Between The waiting time generated during the first interaction; S3.2 Calculate the total average waiting time for activities under different structures; S3.
3. Based on the interaction waiting time between executors, update the new task according to the sum of the minimum predicted load and the predicted interaction time.
4. The workflow execution optimization method based on stochastic time Petri nets according to claim 3, characterized in that, Step S3.2, which calculates the total average waiting time for activities under different structures, includes: Calculate the total average wait time for sequential workflow activities: Calculate the total average latency of parallel workflow activities: Calculate the total average wait time for selected structure workflow activities: Calculate the total average wait time for activities in a cyclical workflow: in, The waiting time for activity i.
5. The workflow execution optimization method based on stochastic time Petri nets according to claim 4, characterized in that, In step S3.3, based on the interaction waiting time between executors, the minimum predicted load and the sum of the predicted interaction time are used. To update new tasks, including: Update the executor when assigning new tasks. : in, For the executor The sum of the predicted load and interaction time; Update the sum of the forecast load and forecast interaction time at each time step: In dynamic workflows, the execution time of activities in stochastic Petri nets is affected by service time and waiting time. By allocating instance tasks, the workflow execution time can be shortened. The objective function for minimizing the workflow execution time is: Among them, constraints Indicates the first On a single instance The person chosen by the person carrying out the activity is .
6. The workflow execution optimization method based on stochastic time Petri nets according to claim 1, characterized in that, Step S4 includes: Calculate the interaction time after multiple interactions between each executor, the current load of each executor at each moment, and determine the number of instances arriving at the current moment; as well as, The task assignment function determines the activities that can be assigned on a single instance at the current moment and counts the number of interactions that will continue for the assigned executor.
Citation Information
Patent Citations
Medical system simulation method based on random time Petri network
CN111177904A