Construction method of service process overlap discrimination model and service process fusion method

By building a service process overlap discrimination model, using the process logical structure characteristics and object similarity characteristics, the problem of relying on manual evaluability judgment of service process in the existing technology is solved, and automatic judgment and integration between service processes is realized, and efficiency is improved.

CN114943505BActive Publication Date: 2025-04-22HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210374712.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2025-04-22
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

In the prior art, the judgment of convergence between service processes depends on manual labor, is inefficient and lacks practicality.

Method used

Build a service process overlap discrimination model, obtain and vectorize the process pairs in the training sample set, extract the process logical structure features and object similarity characteristics, and use the preset service process overlap discrimination model for training until the loss function converges.

Benefits of technology

It realizes automatic judgment of the convergence between service processes, improves the efficiency of convergence judgment, and can automatically identify and converge duplicate service process fragments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943505B_ABST
    Figure CN114943505B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a service process overlap discrimination model and a service process fusion method, the construction method comprising: obtaining a training sample set, wherein the positive sample set includes a plurality of process pairs with overlapped segments, and the negative sample set includes a plurality of process pairs without overlapped segments; after vectorizing the process pairs in the positive sample set, the overlapped segments of the process pairs in the positive sample set are retained, and all elements outside the overlapped segments are set to zero as labels; the all-zero vector is used as the label of the process pairs in the negative sample set; the process logical structure features and object similarity features of the process pairs in the training sample set are extracted, and the preset service process overlap discrimination model is input to obtain the predicted output of the service process overlap discrimination model, and the predicted output is an all-zero vector or a non-all-zero vector, and the non-all-zero vector includes overlapped segments; the result of calculating the loss function based on the predicted output and the label is trained until the loss function converges. The present invention can realize the automatic judgment of the fusionability between processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a method for constructing a service process overlap discrimination model and a service process fusion method. Background Art

[0002] With the development of computer information integration technology, all walks of life have begun to transfer offline services to online through information integration systems. For example, the OA approval system of enterprises, the e-government service system of the government, and the online customer service system of telecommunications companies. For example, the OA approval system of an enterprise can include the leave approval service process, the financial payment service process, and the business trip approval service process.

[0003] Service processes are often composed of multiple process fragments, and there may be duplicate process fragments between different service processes. When there is a need to perform multiple services at the same time, integrating multiple service processes can reduce duplicate work and improve the experience of service users. However, the judgment of whether service processes can be integrated is currently done manually, and the manual judgment method is inefficient and not practical. Summary of the invention

[0004] The present invention solves the problem that the existing service flow fusion judgment is all done manually, which is inefficient.

[0005] The present invention proposes a method for constructing a service process overlap discrimination model, comprising:

[0006] Acquire a training sample set; wherein the training sample set is divided into a positive sample set and a negative sample set, the positive sample set contains a plurality of process pairs with overlapping segments, and the negative sample set contains a plurality of process pairs without overlapping segments; vectorize the process pairs in the positive sample set, and after the vectorization, retain the overlapping segments of the process pairs in the positive sample set, and set all elements outside the overlapping segments to zero as labels of the process pairs in the positive sample set; use the all-zero vector as the label of the process pairs in the negative sample set;

[0007] Extracting process logic structure features and object similarity features of process pairs in the training sample set;

[0008] Inputting the process logic structure feature and the object similarity feature into a preset service process overlap discrimination model to obtain a prediction output of the service process overlap discrimination model, wherein the prediction output is an all-zero vector or a non-all-zero vector, and the non-all-zero vector contains the overlap segment;

[0009] Based on the predicted output and the label of the corresponding process pair, a result of a loss function is calculated, and based on the result of the loss function, the service process overlap discrimination model is trained until the loss function converges.

[0010] Optionally, the operation of extracting the process logic structure feature includes:

[0011] Split the two processes in the process pair into two sets of triples whose smallest elements are triples, respectively, wherein each triple corresponds to a line segment branch in the process, and the triple includes an identification code of a start object corresponding to the line segment branch, a branch logic code, and an identification code of an end object, and when the start object is or bifurcates, branches corresponding to the same start object use different branch logic codes, and when the start object is not or bifurcates, branches corresponding to the same start object use the same branch logic code;

[0012] Concatenate the triplets in each of the triple sets to generate a structural feature vector corresponding to each of the triple sets;

[0013] The structural feature vectors corresponding to the two triple sets are merged to generate the process logic structural feature.

[0014] Optionally, vectorizing the process pairs of the positive sample concentration includes:

[0015] The process logic structure features are extracted from the process pairs in the positive sample set as vectorized representations of the process pairs in the positive sample set.

[0016] Optionally, the object similarity feature extraction operation includes:

[0017] Traversing and calculating the similarity between each object in the corresponding object sets of the two processes in the process pair;

[0018] The maximum similarity corresponding to each object in the object set corresponding to each process is obtained respectively, and the maximum similarities corresponding to all objects in the object set corresponding to each process are concatenated respectively to obtain the primary similarity feature;

[0019] The primary similarity features corresponding to the two processes are concatenated to obtain the object similarity features.

[0020] Optionally, the traversing and calculating the similarity between each object in the object sets corresponding to the two processes in the process pair includes:

[0021] For a first object and a second object belonging to two processes, the similarity between the first object and the second object is obtained through the following steps:

[0022] Traversing the attribute set of the first object, for the attribute of the first object, searching the attribute set of the second object for the attribute corresponding to the attribute of the first object; wherein the attribute set of the first object includes at least one of a numerical attribute, a category attribute, and a text attribute;

[0023] If there is no attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity between the first object and the second object is 0;

[0024] If there is an attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity of the corresponding attributes of the first object and the second object is calculated, and the similarity of the first object and the second object is calculated based on the similarities of all the corresponding attributes.

[0025] Optionally, the result of calculating the loss function based on the predicted output and the label of the corresponding process pair includes:

[0026] When the predicted output is equal to the label, and both the predicted output and the label are all zero vectors, the result of the loss function is m; when the predicted output is equal to the label, and both the predicted output and the label are not all zero vectors, the result of the loss function is n;

[0027] When the predicted output is not equal to the label, and both the predicted output and the label are not all-zero vectors, the result of the loss function is p; when the predicted output is not equal to the label, and one of the predicted output and the label is an all-zero vector, the result of the loss function is q;

[0028] Among them, q>p>m≥n.

[0029] Optionally, the service process overlap discrimination model is a Transformer model.

[0030] The present invention proposes a service process integration method, comprising:

[0031] Get two service processes to be merged;

[0032] Extracting process logic structure features and object similarity features of the two service processes to be merged;

[0033] Inputting the process logic structure feature and the object similarity feature into a trained service process overlap discrimination model to obtain a prediction output of the service process overlap discrimination model, wherein the service process overlap discrimination model is generated based on the construction method of the service process overlap discrimination model as described above;

[0034] Determining whether there are overlapping segments between the two service processes to be merged according to the prediction output;

[0035] If yes, merging the two service processes to be merged according to the prediction output;

[0036] If not, it is determined that the two service processes to be merged cannot be merged.

[0037] Optionally, judging whether there are overlapping segments between the two service processes to be merged according to the prediction output includes:

[0038] When the prediction output is an all-zero vector, there is no overlapping segment between the two service processes to be merged;

[0039] When the prediction output is a non-all-zero vector, the two service processes to be merged have the overlapping segment, and the non-all-zero vector includes the overlapping segment.

[0040] The present invention also proposes a service process fusion device, including a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the method for constructing a service process overlap discrimination model as described above is implemented, or the service process fusion method as described above is implemented.

[0041] The present invention constructs a training sample set including a positive sample set and a negative sample set, retains the vector with other elements set to zero in the overlapped fragments of the process pair as the label of the process pair in the positive sample set, and uses the all-zero vector as the label of the process pair in the negative sample set, and constructs a service process overlap discrimination model based on the process logical structure characteristics and the object similarity characteristics, and adopts a supervised learning method to enable the service process overlap discrimination model obtained by training to learn the judgment ability of the service process overlap fragments, realize the judgment of the fusionability between the two service processes, realize the automatic judgment of the fusionability between the service processes, and improve the efficiency of fusion judgment. Furthermore, the service process overlap discrimination model constructed based on the present invention can be used to fuse specific service processes, and can also be used to search for repeated fragments from the service process, providing a reference for service process optimization. For example, the government affairs system contains two service processes of "housing qualification application" and "housing loan application". Through the above service process overlap discrimination model, it can be automatically identified that both service processes contain the "personal credit assessment" process, and the above service process overlap discrimination model can output the "personal credit assessment" process for the fusion of "housing qualification application" and "housing loan application". BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a process of constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0043] Figure 2 This is a flow chart of a service flow fusion method according to an embodiment of the present invention;

[0044] Figure 3 This is a first schematic diagram of a fusion example in the service process fusion method according to an embodiment of the present invention;

[0045] Figure 4This is a second schematic diagram of a fusion example in the service process fusion method according to an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of the Petri net model language symbols in the method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of a sequential activity model in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0048] Figure 7 A schematic diagram of a bifurcation model in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0049] Figure 8 A schematic diagram of a merging model in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0050] Fig. 9 A schematic diagram of a bifurcation model in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0051] Fig.10 A schematic diagram of a service flow overlap discrimination model construction method or a combined model in an embodiment of the present invention;

[0052] Fig.11 A schematic diagram of a loop model in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0053] Fig.12 It is a first schematic diagram of overall modeling in a method for constructing a service process overlap discrimination model according to an embodiment of the present invention;

[0054] Fig.13 This is a second schematic diagram of overall modeling in the method for constructing a service process overlap discrimination model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0056] like Figure 1 In one embodiment of the present invention, the method for constructing the service process overlap discrimination model includes:

[0057] Step S1, obtaining a training sample set; wherein the training sample set is divided into a positive sample set and a negative sample set, the positive sample set contains multiple process pairs with overlapping fragments, and the negative sample set contains multiple process pairs without overlapping fragments; the process pairs in the positive sample set are vectorized, and after the vectorization, the overlapping fragments of the process pairs in the positive sample set are retained, and all elements outside the overlapping fragments are set to zero as labels of the process pairs in the positive sample set; the all-zero vector is used as the label of the process pairs in the negative sample set.

[0058] The process is modeled in advance to convert the service process into a computer-recognizable data structure, and the processing objects of steps S1-S4 are all modeled processes. The service process can be modeled using Petri nets or IDEF series modeling methods to build a service process model library.

[0059] Overlapping segments refer to overlapping process segments.

[0060] For label setting of process pairs in the positive sample set, the process pairs in the positive sample set can be converted into vectors. After vectorization, the overlapping segments are retained, and all elements outside the overlapping segments are set to zero as the labels of the process pairs in the positive sample set. For label setting of process pairs in the negative sample set, a full zero vector of a preset length can be directly used as its label, or the process pairs in the negative sample set can be converted into vectors, and all elements are set to zero as the labels of the process pairs in the negative sample set.

[0061] Step S2: extracting process logic structure features and object similarity features of process pairs in the training sample set.

[0062] Among them, the process logic structure feature is used to characterize the topological structure of the process to clarify the logical relationship between each process object and the direction of resource operation. The object similarity feature refers to the similarity between objects in the process pair.

[0063] Optionally, an adjacency matrix is ​​used to represent the logical structure features.

[0064] Optionally, the object similarity feature is obtained by first calculating the text attribute similarity, category attribute similarity and scalar attribute (numerical attribute) similarity between the objects of the process pair, and then determining the final object similarity feature based on the three similarities. Furthermore, because each process has multiple objects, it is necessary to traverse each object of a process in the process pair and calculate the similarity between it and the object of the other process respectively. In one embodiment, all the similarities obtained by calculation can be formed into a similarity matrix, and the feature vector, i.e., the final object similarity feature, can be obtained by directly expanding or convolving it. In another embodiment, for each object of a process in the process pair, the maximum value of the corresponding similarity is taken, and then the maximum similarity values ​​corresponding to all objects of a process in the process pair are concatenated to form a feature vector, i.e., the final object similarity feature.

[0065] Step S3, inputting the process logic structure features and the object similarity features into a preset service process overlap discrimination model to obtain a prediction output of the service process overlap discrimination model, wherein the prediction output is an all-zero vector or a non-all-zero vector, and the non-all-zero vector contains the overlap segment.

[0066] The process logic structure features and object similarity features are concatenated to obtain a final feature vector, which is then input into the service process overlap discrimination model to obtain a prediction output. The service process overlap discrimination model is a model based on a deep learning algorithm or a machine learning algorithm, which can be selected from: Transformer model, SVM model (support vector machine model) or ANN model (artificial neural network model), etc.

[0067] Step S4, based on the predicted output and the label of the corresponding process pair, calculate the result of the loss function, and train the service process overlap discrimination model based on the result of the loss function until the loss function converges.

[0068] Compare the predicted output with the label of the corresponding process pair and calculate the result of the loss function. The corresponding process pair here refers to the process pair corresponding to the process logical structure feature and object similarity feature of the input model.

[0069] By constructing a training sample set including a positive sample set and a negative sample set, the vector with the overlapping fragments of the process pair retained and other elements set to zero is used as the label of the process pair in the positive sample set, and the all-zero vector is used as the label of the process pair in the negative sample set. A service process overlap discrimination model is constructed based on the process logical structure characteristics and object similarity characteristics. A supervised learning method is used to enable the trained service process overlap discrimination model to acquire the judgment ability of service process overlapping fragments, realize the judgment of the fusionability of two service processes, realize the automatic judgment of the fusionability of service processes, and improve the efficiency of fusion judgment.

[0070] Optionally, the extraction operation of the process logic structure features includes:

[0071] Split the two processes in the process pair into two triple sets with the minimum element being a triple. Each triple corresponds to a line segment branch in the process. The triple includes the identification code of the start object, the branch logic code, and the identification code of the end object of the corresponding line segment branch. When the start object is an OR fork, different branch logic codes are used for the branches corresponding to the same start object. When the start object is not an OR fork, the same branch logic code is used for the branches corresponding to the same start object. Concatenate the triples in each triple set to generate a structure feature vector corresponding to each triple set. Fuse the structure feature vectors corresponding to the two triple sets to generate the process logic structure features.

[0072] For example, given the process models P A , P B of service processes A and B, taking A as an example, the method for extracting process logic structure features is described. Assume the object set of A is O A , which contains n objects. Denote the start object as o1, the end object as o2, and the remaining objects as o i i ∈ Z, 2 < i ≤ n. Use multiple triples to represent the logical structure of the process model P A . One triple describes a line segment in the process model P A . The triple contains three values, namely the identification code of the start object, the branch logic code, and the identification code of the end object. The branch logic code is a positive integer greater than or equal to 1 and is used to distinguish AND forks and OR forks.

[0073] Regarding the value of the branch logic code, since in the process modeling process, only one of the OR relationship and the AND relationship will appear at each branch node. Therefore, for the start node S, if S is an OR fork, different branch logic codes are used for the branches with S as the start object. For example, the branch logic codes of the branches with S as the start object can be set to increase starting from 1. If S is not an OR fork, the same branch logic code is used for the branches with S as the start object. For example, they can all be set to 1.

[0074] For example:

[0075] OR fork situation: In the process model, node B has two forks and is an OR fork, B -> C and B -> M. Then the logic code of the B -> C node is 1, and the logic code of B -> M is 2. Assume there is another branch, then the logic code of this branch is 3, that is, the branch logic codes are set to increase starting from 1. Assume the identification codes of B, C, and M are 2, 3, and 14 respectively. Then this logical structure forms two triples, namely <2, 1, 3> and <2, 2, 14>.

[0076] AND bifurcation: In the process model, node D has two bifurcations, and they are AND bifurcations D->E and D->J. The logic code of the D->E node is 1, and the logic code of D->J is also 1, that is, the logic codes of each branch are the same. Assuming there is another branch, the logic code of the branch is also 1. Assuming that the identification codes of D, E, and J are 4, 5, and 10 respectively, this logical structure forms two triplets, respectively <4, 1, 5><4, 1, 10>.

[0077] Place bifurcation: In the process model, node A is a place, and there are two bifurcations, A->B and A->L. The logic code of the A->B node is 1, and the logic code of A->L is also 1, that is, the logic codes of each branch are the same. Assuming there is another branch, the logic code of the branch is also 1. Assuming that the identification codes of A, B, and L are 1, 2, and 13 respectively, this logical structure forms two triplets, respectively <1, 1, 2><1, 1, 13>.

[0078] Through the above steps, for the process model P of service process A A , which can be split into L triplets, and all triplets are horizontally spliced ​​to obtain a 1×3L feature vector F L The feature vector of service process B can be obtained in the same way. By fusing the two feature vectors, the process logic structure feature can be generated. Here, the two feature vectors can be fused by splicing.

[0079] Optionally, before concatenating the two feature vectors, the lengths of the two feature vectors are unified, that is, the concatenation is performed after the lengths of the two feature vectors are unified. Specifically, for service process A, after obtaining the 1×3L feature vector F L After that, use 0 to F L Fill it so that its length is fixed to 1×3L max , where L max is a preset fixed value, which is always greater than L. Thus, the final length is 2×3L max Logical structure characteristics of sample processes.

[0080] The process is vectorized by splitting the two processes in the process into two triple sets whose smallest elements are triples, and concatenating the triples in the triple sets into vectors. At the same time, branch logic codes are used to distinguish between fork and or fork structures, thereby realizing the characterization of the logical structure of the process, which facilitates the subsequent training of the corresponding model based on the logical structure characteristics, so as to realize the automatic judgment of the fusion between service processes.

[0081] Optionally, vectorizing the process pairs in the positive sample set includes: extracting the process logical structure features from the process pairs in the positive sample set as the vectorized representation of the process pairs in the positive sample set.

[0082] The process logic structure features are obtained in the manner described above, which can be represented by an adjacency matrix, or by the triple splicing method described above, or by other vector representations of process structure features, which will not be described here. In one embodiment, after extracting the process logic structure features of process pairs A and B using the triple splicing extraction operation described above, if the process pair is a positive sample, the triples corresponding to the logical structure of the fusion part of process A and process B are retained, and the remaining triples are all set to 0 as labels for process pairs A and B; if the process pair is a negative sample, the process logic structure features of process pairs A and B are all set to zero as labels for process pairs A and B.

[0083] Since the process logic structure features are the features of the input model that must be extracted, taking them as part of the label extraction can simplify the label construction process and improve the overall model construction efficiency.

[0084] Optionally, the object similarity feature extraction operation includes: traversing each object of a process in the process pair, respectively calculating the similarity between it and the object of the other process, for each object of a process in the process pair, taking the maximum value of the corresponding similarity, and then concatenating the maximum similarity values ​​corresponding to all objects of a process in the process pair to form a feature vector, that is, the final object similarity feature. Specifically including:

[0085] Traverse and calculate the similarity between each object in the object sets corresponding to the two processes in the process pair; obtain the maximum similarity corresponding to each object in the object set corresponding to each process respectively, and respectively concatenate the maximum similarities corresponding to all objects in the object set corresponding to each process to obtain a primary similarity feature; concatenate the primary similarity features corresponding to the two processes to obtain the object similarity feature.

[0086] Optionally, different objects in the process model have attributes and attribute values ​​to describe the object.

[0087] For example, given the process models of service processes A and B, the object similarity features are obtained in the following way:

[0088] Traverse the object set O corresponding to the A process model A , for each object o Ai , traverse the object set O corresponding to the B process model B , get o Ai and O B The similarity s of each object inaiBj , take the maximum similarity, recorded as s aiB . The corresponding object set O of process model A A Object o in Ai The corresponding maximum similarities are concatenated in the order of the subscripts, and finally an S is obtained. AB The vector of A, that is, the primary similarity feature of A, and the primary similarity feature of B can be obtained by the same logic: S BA , S AB and S BA The objects are concatenated to obtain the object similarity features.

[0089] Optionally, before concatenating the primary similarity features corresponding to the two processes, the lengths of the primary similarity features corresponding to the two processes are unified. AB and S BA After that, for S AB and S BA Use 0 values ​​to fill them respectively to make their length fixed to C max , and then splice to get a length of 2×C max The object similarity feature.

[0090] By traversing and calculating the similarity between each object in the corresponding object sets of the two processes in the process pair, the maximum similarity corresponding to each object in the corresponding object set of each process is taken for splicing, and there is no need to match the objects of the two processes in advance and then calculate the similarity. The maximum similarity between the processes is directly determined based on the maximum similarity corresponding to each object as the object similarity feature, thereby simplifying the operation of obtaining the object similarity feature and improving efficiency. At the same time, this can remove a lot of noise and retain the most important similarity features.

[0091] Optionally, the traversing and calculating the similarity between each object in the object sets corresponding to the two processes in the process pair includes:

[0092] For a first object and a second object belonging to two processes, the similarity between the first object and the second object is obtained through the following steps:

[0093] Traversing the attribute set of the first object, for the attribute of the first object, searching the attribute set of the second object for the attribute corresponding to the attribute of the first object; wherein the attribute set of the first object includes at least one of a numerical attribute, a category attribute, and a text attribute;

[0094] If there is no attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity between the first object and the second object is 0;

[0095] If there is an attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity of the corresponding attributes of the first object and the second object is calculated, and the similarity of the first object and the second object is calculated based on the similarities of all the corresponding attributes.

[0096] Among them, different objects have attributes and attribute values ​​to describe the object. The attributes of the object include at least one of numerical attributes, category attributes and text attributes. When calculating the similarity between the first object and the second object, it is necessary to determine whether the two have the same attributes, for example, whether they both have numerical attributes, whether they both have category attributes, and whether they both have text attributes.

[0097] Specifically, the corresponding attribute, that is, the same attribute, is searched in the attribute set of the second object according to the attribute of the first object. For example, if the first object has a numerical attribute, then the attribute set of the second object is searched to see if there is a numerical attribute. If there is no attribute corresponding to the attribute of the first object in the attribute set of the second object, it means that the first object and the second object are quite different, and the similarity between the two is set to 0. If there is an attribute corresponding to the attribute of the first object in the attribute set of the second object, then the similarity of the corresponding attribute is further calculated. For example, if both the first object and the second object have numerical attributes and text attributes, then the similarity between the first object and the second object in the numerical attributes and text attributes is calculated respectively, and then the similarity between the first object and the second object is calculated based on the similarity of all attributes.

[0098] Optionally, the text attribute similarity can be calculated by word shift distance, N-gram similarity, Jaccard similarity, similarity calculation based on word2vec, etc. Since the relevant calculation methods are all existing technologies, they are not described here.

[0099] Optionally, the similarity of numerical attributes may be calculated by subtracting absolute values, taking the square of the difference, etc.

[0100] Optionally, for category attributes, two objects from two processes may be compared separately, or the objects from two processes may be compared jointly to calculate the overall similarity, that is, the number of identical category attributes / the number of all category attributes.

[0101] Optionally, attr ap Represents the attribute value of the first object, attr bq represents the attribute value of the second object. Then the similarity between the numerical attribute of the first object and the second object is calculated as follows:

[0102] sattr apbq =(attr ap -attr bq ) / C, sattrapbq Refers to the numerical attribute value between objects, and C is the maximum value of the numerical attribute.

[0103] The similarity between the category attributes of the first object and the second object is calculated as follows:

[0104] If attr ap Equal to attr bq , sattr apbq =1, otherwise, sattr apbq =0.

[0105] The similarity of the text attributes between the first object and the second object is calculated as follows:

[0106] Use the BERT pre-training model to obtain the vector V corresponding to the text ap and V bq , sattr apbq Take V ap and V bq The cosine similarity of ap A, V bq For B:

[0107]

[0108] Among them, i is the object number and n is the total number of objects.

[0109] Optionally, after obtaining the similarities of all corresponding attributes, a weighted average of the similarities of all corresponding attributes is calculated as the similarity of the first object and the second object, wherein the weight matrix K used for the weighted average operation is a hyperparameter.

[0110] By calculating the similarity of corresponding attributes between two objects from two processes, the overall similarity between the two objects is obtained, thereby ensuring the accuracy of the similarity calculation.

[0111] Optionally, the result of calculating the loss function based on the predicted output and the label of the corresponding process pair includes:

[0112] When the predicted output of the service process overlap discrimination model is equal to the label, if the predicted output of the service process overlap discrimination model and the label are all zero vectors, the result of the loss function is m; if the predicted output of the service process overlap discrimination model and the label are not all zero vectors, the result of the loss function is n;

[0113] When the prediction output of the service process overlap discrimination model is not equal to the label, if both the prediction output of the service process overlap discrimination model and the label are not all-zero vectors, the result of the loss function is p; if one of the prediction output of the service process overlap discrimination model and the label is an all-zero vector, the result of the loss function is q;

[0114] Among them, q>p>m≥n, and m, n, p, q are hyperparameters obtained through training.

[0115] For ease of description, the prediction output of the service process overlap discrimination model is recorded as The label is recorded as y, and the loss of a single output is recorded as Then we have:

[0116] Scenario 1: is equal to y, and Both y and y are all zero vectors, indicating that the label is a negative sample and the prediction is also a negative sample.

[0117] Scenario 2: is equal to y, and Both y and y are not all zero vectors, indicating that the label is a positive sample and the prediction is also a positive sample.

[0118] Scenario 3: is not equal to y, and Both y and y are not all zero vectors, indicating that the predicted output and the label belong to the same category, but are not equal. The predicted output category is correct but the value is incorrect.

[0119] Scenario 4: is not equal to y, and One of the vectors in y is all zero, indicating that the predicted output and the label are of different types, and the predicted output category is wrong.

[0120] m, n, p, and q are hyperparameters, and their settings affect the direction of model optimization. During the model training process, different models are obtained by continuously adjusting the hyperparameters, and then the best model is selected from these models. The m, n, p, and q used by the best model are the final hyperparameter values.

[0121] Assuming the sum of m, n, p, and q is z, then m / z, n / z, p / z, and q / z represent the loss quantification of the four prediction outputs. Model optimization is to minimize the total loss. Therefore, for the more expected prediction output, the smaller the loss value is set, and for the less expected result, the larger the loss value is set. Therefore, by limiting q>p>m≥n, the model can be optimized in the direction of minimizing the loss.

[0122] For the learning task of judging overlapping fragments of service processes, due to the particularity of the labels and the particularity of the tasks, ordinary loss functions cannot achieve learning. Therefore, a unique loss function is set. By setting corresponding loss function values ​​for different prediction outputs and limiting the size relationship between them, the model is optimized in the direction of minimizing the loss, so that the model can successfully learn the ability to judge overlapping fragments of service processes.

[0123] Optionally, the service process overlap discrimination model is a Transformer model. The Transformer model is a model for processing sequence-to-sequence problems. The model adopts an encoder-decoder structure and fully uses a self-attention mechanism. Compared with network structures such as RNN and CNN, the Transformer model has lower computational complexity and higher efficiency.

[0124] like Figure 2 In one embodiment of the present invention, the service process integration method includes:

[0125] Step S100: obtaining two service processes to be merged, that is, two service processes for performing overlap determination and merging.

[0126] Step S200: extracting the process logic structure features and object similarity features of the two service processes to be merged. The extraction operation and related explanation of the process logic structure features and object similarity features have been described above and will not be repeated here.

[0127] Step S300, input the process logic structure features and the object similarity features into the trained service process overlap discrimination model to obtain the prediction output of the service process overlap discrimination model, wherein the service process overlap discrimination model is generated based on the construction method of the service process overlap discrimination model as described above; the relevant features of the service process overlap discrimination model are as described above and will not be repeated here.

[0128] Step S400, judging whether there are overlapping segments between the two service processes to be merged according to the predicted output. Optionally, step S400 includes: when the predicted output is an all-zero vector, there are no overlapping segments between the two service processes to be merged; when the predicted output is a non-all-zero vector, there are overlapping segments between the two service processes to be merged, and the non-all-zero vector contains the overlapping segments. Thus, it is possible to directly judge whether there are overlapping segments between the two service processes to be merged by the predicted output of the service process overlap discrimination model, and it is also possible to directly obtain overlapping segments for fusion based on the predicted output.

[0129] Step S500: If yes, then merge the two service processes to be merged according to the predicted output. That is, directly determine the overlapping segments from the predicted output, and merge the overlapping segments of the two service processes to be merged. Optionally, a Petri net model is used to model the service process. When merging the two service processes to be merged, the start and end locations of the two service processes to be merged are merged while merging the overlapping segments. For example, Figure 3 Two service flows to be merged are shown. Assuming that the overlapping segments of the two service flows to be merged are H->I->J and M->N->O, the merged network is as follows: Figure 4 shown.

[0130] Step S600: If not, it is determined that the two service processes to be merged cannot be merged, and the determination result that the two service processes cannot be merged can be directly output.

[0131] The present invention uses the service process overlap judgment model obtained by the above-mentioned construction method to perform overlap judgment and fusion of two service processes to be merged, which can realize automatic judgment and automatic fusion of the fusionability between service processes and improve fusion efficiency.

[0132] The modeling of service flow is the premise for carrying out relevant calculations of service flow. The present invention can use Petri net to model service flow. One of the basic elements of service flow is activity, and other elements such as input and output are dependent on the establishment of activities. Therefore, the first step of service flow modeling is to model activities. On the basis of activity modeling, the relationship between activities, the input and output of each activity and the various rules for controlling the activities are described. The following introduces the specific Petri net modeling rules for service flow modeling, as well as the specific steps of service flow modeling using the rules.

[0133] Petri net modeling rules description:

[0134] When using Petri nets to model service processes, place is used to represent the status of each stage of the process, which can also be understood as the status of each resource in the process. The token in place represents a specific resource object, or condition. Transaction is used to represent various activities. Figure 5The figure is a symbolic diagram of the Petri net model language. The logical transition is a special form of transition, which is divided into logical and transition and logical or transition, including four forms of transition: and fork, and merge, or fork, and or merge. The and fork transition indicates that after the transition is completed, two or more transition activities will be triggered at the same time. The and merge transition indicates that the triggering of the transition is based on the completion of two or more transitions. The or fork transition indicates that after the transition is completed, two or more transition activities may be triggered, but only one will be selected in the end. The or merge transition corresponds to it, indicating that the transition is triggered by one transition in a set of two or more transitions. In real-world process instances, logical transitions often exist in pairs.

[0135] When using Petri nets for modeling, the definition is: the objects of Petri nets include transitions and places, tokens are considered as components of places, and different objects have attributes and attribute values ​​to describe the object.

[0136] Based on the Petri net modeling rules, the following analysis is given for modeling various activities in the service process:

[0137] 1. Sequential activities: An activity T is triggered after a previous activity A (or start node), and a subsequent activity B (or end node) is triggered when the activity ends. Such activities are called sequential activities. Figure 6 The typical sequential activity model is shown in Figure 1. In sequential activities, transitions and common places form a sequential structure of A→T→B.

[0138] 2. Concurrent activities: refers to the situation where two or more tasks occur at the same time, and there is a logical and relationship between the tasks. Use the following two models to describe concurrent activities.

[0139] ① and bifurcation model: one condition triggers two or more transitions, such as Figure 7 shown.

[0140] ② and the combined model: the occurrence of a transition requires the completion of two or more transitions, such as Figure 8 shown.

[0141] 3. Selection activity: refers to selecting one of two or more tasks. The tasks are in a logical or relationship. Similar to concurrent activities, two models or fork model and / or merge model are also used to describe selection activities. Fig. 9 , Fig.10 The or bifurcation model and or merging model are shown respectively.

[0142] 4. Cyclic activities: refers to activities that need to be performed repeatedly in the process. For example, the approval of various materials often involves cyclic activities. Unqualified materials need to be returned for modification and re-examination. Cyclic activities can actually be regarded as a modified selection activity. There is a logical or relationship between entering the cycle and taking the next step. Fig.11 A cycle model is shown.

[0143] Based on the above analysis, the following modeling steps are given:

[0144] (1) Service process activity division. Divide the service process into activity levels. The division standard is that the activity cannot be further divided. For example, a service process contains a process segment for document approval. However, the document approval includes two steps. After approval by department A, it is handed over to department B for further approval. Then, this segment should be divided into two activities.

[0145] (2) Service process activity modeling. Based on (1), each activity is modeled separately to obtain the Petri net fragment corresponding to each activity. Each fragment contains multiple resource tokens and a transition. The resource token represents the input and output of the activity, and the transition represents the subject of the activity. Fill in the attribute values ​​of each Petri net object according to the definition of the activity.

[0146] (3) Determine the logical structure and overall modeling. Determine the logical relationship between each activity based on the definition of the service process and connect each Petri net fragment. In this process, establish a resource library to accommodate resource tokens and determine whether the transition has a logical structure. Figure 12 to Figure 13Explain the process of connecting Petri net fragments. After the execution of activity 1, activities 2 and 3 need to be executed in parallel. The transition in the Petri net fragment corresponding to activity 1 is recorded as transition 1, which contains an input resource token and two output resource tokens, recorded as A, B, and C respectively. The transition in activity 2 is recorded as transition 2, which contains an input token and an output token, recorded as B' and D respectively. The transition in activity 3 is recorded as transition 3, which contains an input token and an output token, recorded as C' and E respectively. Since the output TokenB of activity 1 corresponds to the input TokenB' of activity 2, a resource library is created to connect transition 1 and transition 2, and the library contains resource TokenB. Since TokenC corresponds to TokenC', a resource library is created to connect transition 1 and transition 3, and the library contains resource TokenC. At this point, a new Petri net fragment is obtained. All transitions and intermediate resource tokens in the Petri net are regarded as a new transition, recorded as transition 4. Then the Petri net fragment can be regarded as a Petri net fragment consisting of transition 4, input resource token A, and output resource token D and E. The next step of merging can be performed. After all Petri net fragments are merged, a Petri net fragment containing all activities is obtained, recorded as F. Add the start resource library and the end resource library at both ends of F, respectively, and place the input resource token and output resource token of F respectively, to obtain a complete Petri net model.

[0147] In one embodiment of the present invention, the service process fusion device includes a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the method for constructing the service process overlap discrimination model as described above is implemented, or the service process fusion method as described above is implemented. The beneficial effects of the service process fusion device of the present invention relative to the prior art are consistent with those of the service process fusion method as described above, and are not described in detail here.

[0148] The reader should understand that in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0149] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for constructing a service process overlap discrimination model, characterized in that: include: Acquire a training sample set; wherein the training sample set is divided into a positive sample set and a negative sample set, the positive sample set contains a plurality of process pairs with overlapping segments, and the negative sample set contains a plurality of process pairs without overlapping segments; vectorize the process pairs in the positive sample set, and after the vectorization, retain the overlapping segments of the process pairs in the positive sample set, and set all elements outside the overlapping segments to zero as labels of the process pairs in the positive sample set; use the all-zero vector as the label of the process pairs in the negative sample set; Extracting process logic structure features and object similarity features of process pairs in the training sample set; The operation of extracting the process logic structure features includes: Split the two processes in the process pair into two sets of triples whose smallest elements are triples, respectively, wherein each triple corresponds to a line segment branch in the process, and the triple includes an identification code of a start object corresponding to the line segment branch, a branch logic code, and an identification code of an end object, and when the start object is or bifurcates, branches corresponding to the same start object use different branch logic codes, and when the start object is not or bifurcates, branches corresponding to the same start object use the same branch logic code; Concatenate the triplets in each of the triple sets to generate a structural feature vector corresponding to each of the triple sets; Merging the structural feature vectors corresponding to the two triple sets to generate the process logic structural features; The object similarity feature extraction operation includes: Traversing and calculating the similarity between each object in the corresponding object sets of the two processes in the process pair; The maximum similarity corresponding to each object in the object set corresponding to each process is obtained respectively, and the maximum similarities corresponding to all objects in the object set corresponding to each process are concatenated respectively to obtain the primary similarity feature; The primary similarity features corresponding to the two processes are concatenated to obtain the object similarity features; Inputting the process logic structure feature and the object similarity feature into a preset service process overlap discrimination model to obtain a prediction output of the service process overlap discrimination model, wherein the prediction output is an all-zero vector or a non-all-zero vector, and the non-all-zero vector contains the overlap segment; Based on the predicted output and the label of the corresponding process pair, a result of a loss function is calculated, and based on the result of the loss function, the service process overlap discrimination model is trained until the loss function converges.

2. The method for constructing a service process overlap discrimination model according to claim 1, characterized in that: The process of concentrating the positive samples into vector representation comprises: The process logic structure features are extracted from the process pairs in the positive sample set as vectorized representations of the process pairs in the positive sample set.

3. The method for constructing a service process overlap discrimination model according to claim 1, characterized in that: The traversing and calculating the similarity between each object in the object set corresponding to the two processes in the process pair comprises: For a first object and a second object belonging to two processes, the similarity between the first object and the second object is obtained through the following steps: Traversing the attribute set of the first object, for the attribute of the first object, searching the attribute set of the second object for the attribute corresponding to the attribute of the first object; wherein the attribute set of the first object includes at least one of a numerical attribute, a category attribute, and a text attribute; If there is no attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity between the first object and the second object is 0; If there is an attribute corresponding to the attribute of the first object in the attribute set of the second object, the similarity of the corresponding attributes of the first object and the second object is calculated, and the similarity of the first object and the second object is calculated based on the similarities of all the corresponding attributes.

4. The method for constructing a service process overlap discrimination model according to any one of claims 1 to 2, characterized in that: The result of calculating the loss function based on the predicted output and the label of the corresponding process pair includes: When the predicted output is equal to the label, and both the predicted output and the label are all zero vectors, the result of the loss function is m; when the predicted output is equal to the label, and both the predicted output and the label are not all zero vectors, the result of the loss function is n; When the predicted output is not equal to the label, and both the predicted output and the label are not all-zero vectors, the result of the loss function is p; when the predicted output is not equal to the label, and one of the predicted output and the label is an all-zero vector, the result of the loss function is q; Among them, q>p>m≥n.

5. The method for constructing a service process overlap discrimination model according to any one of claims 1 to 2, characterized in that: The service process overlap discrimination model is a Transformer model.

6. A service process integration method, characterized in that: include: Get two service processes to be merged; Extracting process logic structure features and object similarity features of the two service processes to be merged; Inputting the process logic structure feature and the object similarity feature into a trained service process overlap discrimination model to obtain a prediction output of the service process overlap discrimination model, wherein the service process overlap discrimination model is generated based on the construction method of the service process overlap discrimination model according to any one of claims 1 to 5; Determining whether there are overlapping segments between the two service processes to be merged according to the prediction output; If yes, merging the two service processes to be merged according to the prediction output; If not, it is determined that the two service processes to be merged cannot be merged.

7. The service process integration method according to claim 6, characterized in that: The step of judging whether there are overlapping segments between the two service processes to be merged according to the prediction output comprises: When the prediction output is an all-zero vector, there is no overlapping segment between the two service processes to be merged; When the prediction output is a non-all-zero vector, the two service processes to be merged have the overlapping segment, and the non-all-zero vector includes the overlapping segment.

8. A service process fusion device, characterized in that: It includes a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, it implements the method for constructing a service process overlap discrimination model as described in any one of claims 1 to 5, or implements the service process fusion method as described in claim 6 or 7.

Citation Information

Patent Citations

  • Method and device for judging business process correlation

    CN106651317A

  • Global social service network oriented Web service clustering method

    CN107135092A