An ERP code generation method and system for business process analysis
Generating ERP code through business process modeling symbols and serialized representations solves the complex and time-consuming problem of traditional ERP system implementation, and realizes the automatic generation of ERP code and efficient processing of business flow analysis.
Patent Information
- Application Number
- CN202411576920.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The implementation process of traditional ERP systems is complex and time-consuming. Customized development needs increase the difficulty and cost of system implementation, and traditional business flow analysis methods are inefficient and error-prone.
Business process modeling symbols are used to formalize the enterprise business process, ERP code is generated through serialized representation and similarity metrics, and improved DTW algorithm and word vector sequence enhancement processing are used, and ERP code templates are used to match.
The automatic generation of ERP codes is realized, business execution efficiency is improved, manpower and material investment is reduced, and the efficiency and accuracy of ERP system implementation is improved.
Smart Images

Figure CN119512517B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ERP code generation, and particularly to an ERP code generation method and system for business process analysis. Background Art
[0002] In the current era of rapid informatization development, enterprise management faces unprecedented challenges and opportunities. Enterprise Resource Planning (ERP) systems, as important tools for integrating various internal resources of enterprises and improving management efficiency, have become an indispensable part of modern enterprises. ERP systems can integrate the business processes of various departments of an enterprise through a unified information platform, realize information sharing and collaboration, and thus enhance the competitiveness of the enterprise. However, the implementation process of traditional ERP systems is often complex and time-consuming. When deploying an ERP, an enterprise needs to conduct a detailed analysis and design for its own business processes, which usually requires a large amount of manpower and material resources. With the expansion of enterprise scale and the complexity of business, the demand for customized development is becoming more and more intense, but this further increases the difficulty and cost of system implementation. Business process analysis is the process of researching and modeling various business activities within an enterprise and their interrelationships, aiming to help an enterprise clarify the existing business logic, identify bottlenecks and optimization points through clear business process diagrams and models. However, traditional business process analysis methods often rely on manual modeling, with low efficiency and prone to errors. Summary of the Invention
[0003] In view of this, the present invention proposes an ERP code generation method for business process analysis, which realizes the automatic generation of ERP codes through intelligent business process analysis and improves business execution efficiency.
[0004] To achieve the above object, an ERP code generation method for business process analysis provided by the present invention includes the following steps:
[0005] S1: Formalize the enterprise business process using business process modeling notation to obtain a business process diagram;
[0006] S2: Serialize the business process diagram to obtain multiple groups of business process sequences, and screen the first business process sequence from the multiple groups of business process sequences;
[0007] S3: Perform similarity measurement on the first business process sequence to obtain the similarity between other business process sequences and the first business process sequence, where the improved DTW algorithm is the implementation method for business process sequence similarity measurement;
[0008] S4: Combine the similarity to enhance the business process sequence, and match the enhanced business process sequence with the ERP code template to obtain the business process ERP code, where code prediction based on the fusion of template code fragments and business functions is the implementation method for code enhancement.
[0009] As a further improvement method of the present invention:
[0010] Optionally, in the step S1, the business process modeling notation is used to formalize the enterprise business process, including:
[0011] The business process modeling notation is used to formalize the enterprise business process, where the business process modeling notation includes event symbols, activity symbols, gateway symbols, connection line symbols, and swimlane symbols. Event symbols represent the start, end, or intermediate state of the business process. Activity symbols represent tasks or sub-processes that need to be executed. Gateway symbols are used to control the branching and merging of the process. Connection line symbols represent the sequence between different tasks or sub-processes. Swimlane symbols are used to divide the responsible departments. The formalization result of the enterprise business process is:
[0012]
[0013] Wherein:
[0014] L n represents the modeling result of the nth enterprise business node, and N represents the total number of enterprise business nodes;
[0015] represents the connection number symbol between the nth enterprise business node and the (n - 1)th enterprise business node; represents that there is a unidirectional enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node; represents that there is a unidirectional enterprise business process connection between the nth enterprise business node and the (n - 1)th enterprise business node; represents that there is a bidirectional enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node;
[0016] If the (n - 1)th enterprise business node and the nth enterprise business node are of the gateway symbol type, it means that the (n - 1)th enterprise business node and the nth enterprise business node are parallel business nodes, then respectively represent the connection number symbols between the (n - 1)th enterprise business node and the nth enterprise business node and the upstream non-gateway symbol type enterprise business nodes;
[0017] represents the swimlane symbol of the nth enterprise business node, 1 - 4 indicates that the responsible department of this enterprise business node is the procurement department, production department, sales department, or finance department;
[0018] represents the modeling symbol type of the nth enterprise business node, It indicates that the modeling symbol type of the nth enterprise business node is an event symbol. It indicates that the modeling symbol type of the nth enterprise business node is an activity symbol. It indicates that the modeling symbol type of the nth enterprise business node is a gateway symbol.
[0019] It represents the business description text of the nth enterprise business node.
[0020] Based on the connection symbol, the modeling results of N enterprise business nodes are connected, and during the connection process, the modeling results of consecutive gateway symbol types are represented side by side to form a business process flowchart. In the embodiments of the present invention, the shapes of the modeling results of enterprise business checkpoints with modeling symbol types 1-3 are a square, a circle, and a triangle in sequence.
[0021] Optionally, in step S2, the business process flowchart is serially represented to obtain multiple groups of business process sequences, including:
[0022] S21: According to the position representation of different modeling results in the business process flowchart and the representation relationship of enterprise business process connections, calculate the central importance degree of different modeling results in the business process flowchart; among them, the central importance degree of modeling result L n is calculated as
[0023] S22: Calculate the type importance degree of different modeling results in the business process flowchart; among them, the type importance degree of modeling result L n is
[0024]
[0025] Among them:
[0026] represents the department weight of the responsible department of the nth enterprise business node; in the embodiments of the present invention, the department weights of the procurement department and the production department are 1, and the department weights of the sales department and the finance department are 2;
[0027] represents the modeling symbol type The frequency of occurrence in N enterprise business nodes, P(s) represents the frequency of occurrence of modeling symbol type s in N enterprise business nodes, s ∈ [1, 3];
[0028] S23: Combine the central importance degree and the type importance degree of the modeling results to calculate the importance degree of the modeling results, traverse the modeling results in the business process flowchart based on the importance degree, and obtain M groups of business process sequences, where the traversal process of the modeling results in the business process flowchart is:
[0029] S231: Calculate the importance of each modeling result in the business process diagram, where the importance of modeling result L n is E n :
[0030]
[0031] S232: Select from the business process diagram a set set of modeling results whose modeling symbol type is an event symbol and whose business description text is the start of the business process;
[0032] S233: Filter from the set set the modeling result that has not been used as the initial process and has the highest importance as the initial process of the business process sequence;
[0033] S234: Create a priority queue for the initial process, and store all modeling results that have a unidirectional enterprise business process connection or a bidirectional enterprise business process connection with the initial process into the priority queue. The modeling results with higher importance are dequeued first;
[0034] S235: Create a priority queue for the currently dequeued modeling result, and store all modeling results that have a unidirectional enterprise business process connection or a bidirectional enterprise business process connection with the currently dequeued modeling result into the priority queue. The modeling results with higher importance are dequeued first;
[0035] S236: If the currently dequeued result is a modeling result whose modeling symbol type is an event symbol and whose business description text is the end of the business process, then take the modeling result selected in step S233 and the results dequeued in sequence as a set of business process sequences, and return to step S234 to dequeue the next modeling result;
[0036] Otherwise, return to step S235;
[0037] S237: Repeat steps S234 to S236 until there are no un-dequeued modeling results in all the currently constructed priority queues, and return to step S233 to re-select the initial process and construct the priority queue until all the modeling results in the set set have been used as the initial process and there are no un-dequeued modeling results in all the constructed priority queues;
[0038] Summarize all the current business process sequences to form M groups of business process sequences, where the m-th group of business process sequences is represented in the form of:
[0039]
[0040] Where:
[0041] G mIndicates the m-th group of service flow sequences, Indicates the service flow sequence G m The i-th service flow node in, Sum m Indicates the service flow sequence G m The total number of service flow nodes in; each service flow node consists of a modeling result and the importance degree of the modeling result;
[0042] Indicates the service flow node The modeling result in, Is the modeling result Of the importance degree;
[0043] Calculate the comprehensive importance degree of each group of service flow sequences, and select the service flow sequence with the highest comprehensive importance degree as the first service flow sequence.
[0044] Optionally, the calculating the comprehensive importance degree of each group of service flow sequences includes:
[0045] The comprehensive importance degree of the m-th group of service flow sequences G m Is:
[0046]
[0047] Where:
[0048] g m Indicates the comprehensive importance degree of the m-th group of service flow sequences G m Of.
[0049] Optionally, the similarity measurement of the first service flow sequence in the S3 step includes:
[0050] Perform a similarity measurement on the first service flow sequence to obtain the similarity between other service flow sequences and the first service flow sequence, where the process of similarity measurement is:
[0051] S31: Obtain the first service flow sequence G * :
[0052]
[0053] Where:
[0054] G * ∈{G m |m∈[1,M]};
[0055] Indicates the i-th service flow node in the first service flow sequence G * Sum * Indicates the first service flow sequence G* The total number of business process nodes in, i ∈ [1, Sum * ;
[0056] represents the modeling result of the business process node in, is the importance degree of the modeling result ;
[0057] S32: Calculate the distance between the first business process sequence G * and the M groups of business process sequences, where the distance calculation process between the first business process sequence G * and the m-th group of business process sequences is as follows:
[0058] S321: Calculate the distance between each pair of business process nodes in the first business process sequence G * and the m-th group of business process sequences, where the distance between the business process node and the business process node is
[0059]
[0060] where:
[0061] ||·|| represents the L1 norm;
[0062] represents the vector composed of the connection symbol, lane symbol, and modeling symbol type of the modeling result in the business process node , i ∈ [1, Sum ; * ;
[0063] represents the vector composed of the connection symbol, lane symbol, and modeling symbol type of the modeling result in the business process node , j ∈ [1, Sum ; m ;
[0064] S322: Calculate the cost weight between each pair of business process nodes, where the cost weight between the business process node and the business process node is
[0065]
[0066] S323: Initialize the cumulative cost value D of the first business process sequence G * and the m-th group of business process sequences m(1,1):
[0067]
[0068] S324: Iterate over the cumulative cost value D m (1,1) until the iterated D m (Sum * , Sum m ), where the iteration formula is:
[0069]
[0070] S325: Use D m (Sum * , Sum m ) as the distance between business process nodes and business process nodes ;
[0071] S33: Normalize the distance to obtain the similarity between the first business process sequence G * and the M groups of business process sequences, where the similarity between the first business process sequence G * and the m-th group of business process sequences is Sim m :
[0072]
[0073] where:
[0074] max m∈[1,M] D m (Sum * , Sum m ) represents the maximum distance between the first business process sequence G * and the M groups of business process sequences;
[0075] min m∈[1,M] D m (Sum * , Sum m ) represents the minimum distance between the first business process sequence G * and the M groups of business process sequences.
[0076] Optionally, in the S4 step, the business process sequence is enhanced based on the similarity, and the enhanced business process sequence is matched with the ERP code template, including:
[0077] Extract the business description text of the modeling result in the business process sequence, perform word segmentation and word vector representation on the business description text to obtain the word vector sequence of the modeling result, where the modeling result in the m-th group of business process sequences The word vector sequence of
[0078]
[0079] where:
[0080] represents the modeling result is the word vector of the x-th phrase in the business description text in represents the modeling result is the total number of phrases in the business description text in
[0081] Using the similarity between the business process sequence and the first business process sequence G * and the importance degree of the modeling result, enhance the word vector sequences of different modeling results in the business process sequence to obtain the enhanced word vector sequence of the modeling result;
[0082] Match the business process sequence with the ERP code template to generate the ERP codes of different business process sequences. The ERP code generation process for the m-th group of business process sequences is as follows:
[0083] S41: Perform semantic parsing on the enhanced word vector sequence of the modeling result in the m-th group of business process sequences to obtain the semantic information of the modeling result, where the semantic information of the modeling result is
[0084]
[0085] where:
[0086] W represents the semantic extraction matrix;
[0087] * represents the convolution operator;
[0088] is the enhanced word vector sequence of the modeling result in the m-th group of business process sequences;
[0089] S42: Combine the semantic information to perform semantic information enhancement processing on the enhanced word vector sequence to obtain the semantically enhanced word vector sequence, where the semantically enhanced word vector sequence corresponding to the enhanced word vector sequence is
[0090]
[0091] S43: Parse the sequence of word vectors after semantic information enhancement to obtain the code attribute categories of each word vector after semantic information enhancement, where the code attribute categories include class name, class attribute, class operation, and class relationship. The sequence of word vectors after semantic information enhancement The x-th word vector after semantic information enhancement in The parsing formula is:
[0092]
[0093] Where:
[0094] Represents the sequence of word vectors after semantic information enhancement The x-th word vector after semantic information enhancement in Of the code attribute category;
[0095] W h Represents the category convolution matrix of the h-th code attribute category, h ∈ [1, 4]. The 1st - 4th code attribute categories correspond to class name, class attribute, class operation, and class relationship in sequence;
[0096] Represents the word vector after semantic information enhancement The probability that the code attribute category is the h-th code attribute category;
[0097] Represents the code attribute category with the highest selection probability;
[0098] S44: Map the code attribute categories of the word vectors after semantic information enhancement to the phrases in the corresponding business description text, where the x-th phrase in the business description text in the modeling result The code attribute category is
[0099] S45: According to the code attribute category, convert the business description text in the modeling result in the m-th group of business process sequences into JavaScript code of the corresponding attribute type. Phrases representing class operations are converted into function code, and phrases representing class relationships are converted into inheritance or reference relationship codes. Use the ERP code template of the corresponding attribute type to perform phrase matching to obtain the ERP code of each phrase, and construct the business code of the modeling result from the ERP codes of all phrases;
[0100] S46: Construct the ERP code of the m-th group of business process sequences from all the modeled business codes in the m-th group of business process sequences;
[0101] According to the position of the modeling results in the business process diagram, de-duplicate the ERP codes of the M groups of business process sequences in the business process diagram. For the modeling results with multiple groups of business codes, retain the business codes in the business process sequence with the highest comprehensive importance, and construct the ERP codes corresponding to the business processes.
[0102] Optionally, the enhanced representation formula of the word vector sequence is:
[0103]
[0104] Where:
[0105] is the enhanced word vector sequence of the modeling result in the m-th group of business process sequences ;
[0106] is the enhancement result of the word vector ,
[0107] represents the frequency of the x-th phrase in the business description text of the modeling result appearing in the business description texts of N enterprise business nodes.
[0108] Optionally, the calculation process of the central importance of the modeling result L n in the S21 step is as follows:
[0109] S211: Calculate the betweenness centrality α n of the n-th enterprise business node:
[0110]
[0111] Where:
[0112] exp(·) represents the exponential function with the natural constant as the base;
[0113] count(L1,L a ) represents the number of enterprise business processes starting from the 1st enterprise business node and ending at the a-th enterprise business node, a ∈ [1, N], a ≠ n;
[0114] represents the number of enterprise business processes passing through the n-th enterprise business node among the enterprise business processes starting from the 1st enterprise business node and ending at the a-th enterprise business node;
[0115] S212: Initialize the node weight sequence w0 of N enterprise business nodes:
[0116]
[0117] Wherein:
[0118] T represents transpose;
[0119] represents the node weight of the nth enterprise business node generated by initialization, where n ∈ [1, N];
[0120] S213: Construct an adjacency matrix A representing the enterprise business process connections between N enterprise business nodes:
[0121] A = (A(a, b)) N×N
[0122] Wherein:
[0123] A(a, b) represents the adjacency relationship between the a-th enterprise business node and the b-th enterprise business node. If there is a unidirectional enterprise business process connection or a bidirectional enterprise business process connection between the a-th enterprise business node and the b-th enterprise business node, then A(a, b) is 1; otherwise, A(a, b) is 0, where a, b ∈ [1, N];
[0124] S214: Set the current iteration number of the node weight sequence to t, the initial value of t is 0, and the maximum value is Max. Then the t-th iteration result of the node weight sequence w0 is w t , where t ∈ [1, Max];
[0125] S215: Iterate the node weight sequence based on the adjacency matrix A:
[0126]
[0127] Wherein:
[0128] ||·|| represents the L1 norm;
[0129] S216: Let t = t + 1, return to step S215 until the maximum number of iterations is reached, and extract as the node weight of the nth enterprise business node;
[0130] S217: Combine the node weight of the nth enterprise business node n and the betweenness centrality α n to calculate the modeling result L
[0131] To solve the above problems, the present invention provides an ERP code generation system for business process analysis, and the system includes:
[0132] A business process division module, which is used to formalize an enterprise business process by using business process modeling notations to obtain a business process diagram;
[0133] A business sequence representation module, which is used to serially represent the business process diagram to obtain multiple groups of business process sequences, screen the first business process sequence from the multiple groups of business process sequences, perform similarity measurement on the first business process sequence, and obtain the similarity between other business process sequences and the first business process sequence;
[0134] A code generation device, which is used to perform enhancement processing on the business process sequence in combination with the similarity, match the enhanced business process sequence with an ERP code template, and obtain a business process ERP code.
[0135] To solve the above problems, the present invention also provides an electronic device, which includes:
[0136] A memory, which stores at least one instruction;
[0137] A communication interface, which realizes the communication of the electronic device; and
[0138] A processor, which executes the instructions stored in the memory to implement the above-mentioned ERP code generation method for business process analysis.
[0139] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned ERP code generation method for business process analysis.
[0140] Compared with the prior art, the present invention proposes an ERP code generation method for business process analysis, and this technology has the following advantages:
[0141] First of all, this solution proposes a business flow sequence division method, which symbolically represents enterprise business nodes in an enterprise business process by using business process modeling notations, takes the representation results of multiple symbols as the modeling results of enterprise business nodes, and constructs a business process diagram according to the connection relationship and type relationship of different enterprise business nodes. According to the centrality relationship of enterprise business nodes in the business process diagram, calculate the importance degree of each modeling result in the business process diagram, perform traversal based on the importance degree, obtain multiple groups of business process sequences, and realize the serial representation of business flows.
[0142] Meanwhile, this solution proposes a method for generating ERP codes. It calculates the comprehensive importance of each group of business process sequences, selects the business process sequence with the highest comprehensive importance as the first business process sequence, calculates the similarity with the first business process sequence by combining the importance of the modeling results, represents the modeling results in the business process sequence as a word vector sequence, performs word vector enhancement, semantic information extraction, and enhancement processing based on the similarity, the importance of the modeling results, and the word frequency to obtain a word vector sequence with enhanced semantic information, parses the word vector sequence with enhanced semantic information to obtain the code attribute category of each word vector with enhanced semantic information, and performs ERP code matching to obtain the ERP code corresponding to the business process. Brief Description of the Drawings
[0143] Figure 1 It is a schematic flowchart of a method for generating ERP codes for business process analysis provided by an embodiment of the present invention;
[0144] Figure 2 It is a functional module diagram of a system for generating ERP codes for business process analysis provided by an embodiment of the present invention;
[0145] Figure 2 In the figure: 100 is a system for generating ERP codes for business process analysis, 101 is a business process division module, 102 is a business sequence representation module, and 103 is a code generation device;
[0146] The implementation, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0147] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0148] An embodiment of the present application provides a method for generating ERP codes for business process analysis. The execution subject of the method for generating ERP codes for business process analysis includes but is not limited to at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for generating ERP codes for business process analysis can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc.
[0149] Embodiment 1:
[0150] A method for generating ERP codes for business process analysis includes the following steps:
[0151] S1: Formalize the enterprise business process using Business Process Modeling Notation (BPMN) to obtain a business process diagram.
[0152] In step S1, formalizing the enterprise business process using BPMN includes:
[0153] Formalize the enterprise business process using BPMN. BPMN includes event symbols, activity symbols, gateway symbols, connection line symbols, and swimlane symbols. Event symbols represent the start, end, or intermediate state of the business process. Activity symbols represent tasks or subprocesses that need to be executed. Gateway symbols are used to control the branching and merging of the process. Connection line symbols represent the sequence between different tasks or subprocesses. Swimlane symbols are used to divide the responsible departments. The formalization result of the enterprise business process is:
[0154]
[0155] Where:
[0156] L n Represents the modeling result of the nth enterprise business node, and N represents the total number of enterprise business nodes;
[0157] Represents the connection symbol between the nth enterprise business node and the (n - 1)th enterprise business node; Indicates that there is a unidirectional enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node; Indicates that there is a unidirectional enterprise business process connection between the nth enterprise business node and the (n - 1)th enterprise business node; Indicates that there is a bidirectional enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node;
[0158] If the (n - 1)th and nth enterprise business nodes are of the gateway symbol type, it means they are parallel business nodes, then Respectively represent the connection symbols between the (n - 1)th and nth enterprise business nodes and the upstream non - gateway symbol type enterprise business nodes;
[0159] Represents the swimlane symbol of the nth enterprise business node, 1 - 4 indicates that the responsible department of this enterprise business node is the procurement department, production department, sales department, or finance department;
[0160] Represents the modeling symbol type of the nth enterprise business node, It is indicated that the modeling symbol type of the nth enterprise business node is an event symbol, It is indicated that the modeling symbol type of the nth enterprise business node is an activity symbol, It is indicated that the modeling symbol type of the nth enterprise business node is a gateway symbol;
[0161] It is indicated the business description text of the nth enterprise business node;
[0162] Based on the connection symbol, the modeling results of N enterprise business nodes are connected, and during the connection process, the modeling results of consecutive gateway symbol types are represented side by side to form a business flow diagram. In the embodiments of the present invention, the shapes of the modeling results of enterprise business checkpoints with modeling symbol types 1-3 are a square, a circle, and a triangle in sequence.
[0163] S2: Serialize the business flow diagram to obtain multiple groups of business flow sequences, and screen the first business flow sequence from the multiple groups of business flow sequences.
[0164] In the step S2 of serializing the business flow diagram to obtain multiple groups of business flow sequences, it includes:
[0165] S21: According to the position representation of different modeling results in the business flow diagram and the representation relationship of enterprise business process connections, calculate the central importance degree of different modeling results in the business flow diagram; among them, for the modeling result L n the calculation of the central importance degree is
[0166] S22: Calculate the type importance degree of different modeling results in the business flow diagram; among them, for the modeling result L n the type importance degree is
[0167]
[0168] Among them:
[0169] It represents the department weight of the responsible department of the nth enterprise business node;
[0170] It represents the modeling symbol type The frequency of occurrence in N enterprise business nodes, P(s) represents the frequency of occurrence of the modeling symbol type s in N enterprise business nodes, s ∈ [1, 3];
[0171] S23: Calculate the importance degree of the modeling results based on the central importance degree and type importance degree of the modeling results, traverse the modeling results in the business process diagram according to the importance degree, and obtain M groups of business process sequences. The traversal process of the modeling results in the business process diagram is as follows:
[0172] S231: Calculate the importance degree of each modeling result in the business process diagram. The importance degree of modeling result L n is E n :
[0173]
[0174] S232: Select from the business process diagram the set set of modeling results whose modeling symbol type is event symbol and business description text is the start of the business process;
[0175] S233: Screen out from the set set the modeling result that has not been used as the initial process and has the highest importance degree, and use it as the initial process of the business process sequence;
[0176] S234: Create a priority queue for the initial process, and store all modeling results that have a one-way enterprise business process connection or a two-way enterprise business process connection with the initial process into the priority queue. The modeling results with higher importance degrees are dequeued first;
[0177] S235: Create a priority queue for the currently dequeued modeling result, and store all modeling results that have a one-way enterprise business process connection or a two-way enterprise business process connection with the currently dequeued modeling result into the priority queue. The modeling results with higher importance degrees are dequeued first;
[0178] S236: If the currently dequeued result is a modeling result whose modeling symbol type is event symbol and business description text is the end of the business process, then use the modeling result selected in step S233 and the dequeued results in sequence as a set of business process sequences, and return to step S234 to dequeue the next modeling result;
[0179] Otherwise, return to step S235;
[0180] S237: Repeat steps S234 to S236 until there are no un-dequeued modeling results in all the currently constructed priority queues, and return to step S233 to re-select the initial process and construct the priority queue until all the modeling results in the set set have been used as the initial process and there are no un-dequeued modeling results in all the constructed priority queues;
[0181] Summarize all the current business process sequences to form M groups of business process sequences. The representation form of the m-th group of business process sequences is:
[0182]
[0183] Among them:
[0184] G m represents the m-th group of service flow sequences, represents the i-th service flow node in the service flow sequence G, and Sum m represents the total number of service flow nodes in the service flow sequence G m Each service flow node consists of a modeling result and the importance degree of the modeling result; m
[0185] represents the modeling result in the service flow node is the importance degree of the modeling result of;
[0186] Calculate the comprehensive importance degree of each group of service flow sequences, and select the service flow sequence with the highest comprehensive importance degree as the first service flow sequence.
[0187] The calculation of the comprehensive importance degree of each group of service flow sequences includes:
[0188] The comprehensive importance degree of the m-th group of service flow sequences G m is:
[0189]
[0190] Among them:
[0191] g m represents the comprehensive importance degree of the m-th group of service flow sequences G m
[0192]
[0192] S3: Perform similarity measurement on the first service flow sequence to obtain the similarity between other service flow sequences and the first service flow sequence.
[0193] The similarity measurement of the first service flow sequence in the S3 step includes:
[0194] Perform similarity measurement on the first service flow sequence to obtain the similarity between other service flow sequences and the first service flow sequence, where the process of similarity measurement is:
[0195] S31: Obtain the first service flow sequence G * :
[0196]
[0197] Among them:
[0198] G * ∈ {G m | m ∈ [1, M]};
[0199] represents the i-th business process node in the first business process sequence G * , and Sum * represents the total number of business process nodes in the first business process sequence G * , where i ∈ [1, Sum * ;
[0200] represents the modeling result of the business process node , and is the importance level of the modeling result;
[0201] S32: Calculate the distance between the first business process sequence G * and the M groups of business process sequences. The distance calculation process between the first business process sequence G * and the m-th group of business process sequences is as follows:
[0202] S321: Calculate the distance between each pair of business process nodes in the first business process sequence G * and the m-th group of business process sequences. The distance between the business process node and the business process node is
[0203]
[0204] where:
[0205] ||·|| represents the L1 norm;
[0206] represents the vector composed of the connection symbol, lane symbol, and modeling symbol type of the modeling result in the business process node , where i ∈ [1, Sum ; *
[0207] represents the vector composed of the connection symbol, lane symbol, and modeling symbol type of the modeling result in the business process node , where j ∈ [1, Sum ; m
[0208] S322: Calculate the cost weight between each pair of business process nodes. The cost weight between the business process node and the business process node The cost weight between
[0209]
[0210] S323: Initialize the first service flow program sequence G * and the cumulative cost value D of the m-th group of service flow program sequences m (1,1):
[0211]
[0212] S324: Iterate on the cumulative cost value D m (1,1) until D m (Sum * ,Sum m ) is obtained, where the iteration formula is:
[0213]
[0214] S325: Take D m (Sum * ,Sum m ) as the distance between the service process node and the service process node ;
[0215] S33: Standardize the distance to obtain the similarity between the first service flow program sequence G * and the M groups of service flow program sequences, where the similarity between the first service flow program sequence G * and the m-th group of service flow program sequences is Sim m :
[0216]
[0217] Where:
[0218] max m∈[1,M] D m (Sum * ,Sum m ) represents the maximum distance between the first service flow program sequence G * and the M groups of service flow program sequences;
[0219] min m∈[1,M] D m (Sum * ,Sum m ) represents the minimum distance between the first service flow program sequence G * and the M groups of service flow program sequences.
[0220] S4: Enhance the business process sequence based on the similarity, and match the enhanced business process sequence with the ERP code template to obtain the business process ERP code.
[0221] In the step S4, enhancing the business process sequence based on the similarity and matching the enhanced business process sequence with the ERP code template includes:
[0222] Extract the business description text of the modeling result in the business process sequence, perform word segmentation and word vector representation on the business description text to obtain the word vector sequence of the modeling result. Among them, for the modeling result in the m-th group of business process sequences the word vector sequence is
[0223]
[0224] where:
[0225] represents the modeling result the word vector of the x-th phrase in the business description text in represents the modeling result the total number of phrases in the business description text in;
[0226] Use the similarity between the business process sequence and the first business process sequence G * and the importance degree of the modeling result to perform enhanced representation on the word vector sequences of different modeling results in the business process sequence to obtain the enhanced word vector sequence of the modeling result;
[0227] Match the business process sequence with the ERP code template to generate the ERP code of different business process sequences. The ERP code generation process for the m-th group of business process sequences is as follows:
[0228] S41: Perform semantic parsing on the enhanced word vector sequence of the modeling result in the m-th group of business process sequences to obtain the semantic information of the modeling result. Among them, the semantic information of the modeling result is
[0229]
[0230] where:
[0231] W represents the semantic extraction matrix;
[0232] * represents the convolution operator;
[0233] is the enhanced word vector sequence of the modeling result in the m-th group of business process sequences;
[0234] S42: Perform semantic information enhancement processing on the enhanced word vector sequence in combination with semantic information to obtain a semantically enhanced word vector sequence, where the enhanced word vector sequence corresponding to the semantically enhanced word vector sequence is
[0235]
[0236] S43: Analyze the semantically enhanced word vector sequence to obtain the code attribute categories of each semantically enhanced word vector, where the code attribute categories include class name, class attribute, class operation, and class relationship, and the semantically enhanced word vector sequence the x-th semantically enhanced word vector in The parsing formula is:
[0237]
[0238] Where:
[0239] represents the semantically enhanced word vector sequence the x-th semantically enhanced word vector in of the code attribute category;
[0240] W h represents the category convolution matrix of the h-th code attribute category, h ∈ [1, 4], and the 1st - 4th code attribute categories correspond to class name, class attribute, class operation, and class relationship in sequence;
[0241] represents the probability that the code attribute category of the semantically enhanced word vector is the h-th code attribute category;
[0242] represents the code attribute category with the highest selection probability;
[0243] S44: Map the code attribute categories of the semantically enhanced word vectors to the phrases of the corresponding business description text, where the modeling result the code attribute category of the x-th phrase in the business description text in
[0244] S45: According to the code attribute category, convert the business description text of the modeling result in the m-th group of business process sequences into JavaScript code of the corresponding attribute type, where the phrase representing class operation is converted into function code, and the phrase representing class relationship is converted into inheritance or reference relationship code, and use the ERP code template of the corresponding attribute type to perform phrase matching to obtain the ERP code of each phrase, and construct the business code of the modeling result by the ERP codes of all phrases;
[0245] S46: Construct the ERP code of the m-th group of business process sequences from all the modeled business codes in the m-th group of business process sequences;
[0246] According to the position of the modeling result in the business process diagram, perform code deduplication on the ERP codes of the M groups of business process sequences in the business process diagram. For the modeling result with multiple groups of business codes, retain the business code in the business process sequence with the highest comprehensive importance, and construct the ERP code corresponding to the business process.
[0247] The enhanced representation formula of the word vector sequence is:
[0248]
[0249] Where:
[0250] is the enhanced word vector sequence of the modeling result in the m-th group of business process sequences ;
[0251] is the enhancement result of the word vector ;
[0252] represents the frequency of occurrence of the x-th phrase in the business description text of the modeling result in the business description texts of N enterprise business nodes.
[0253] Embodiment 2:
[0254] As Figure 2 shown, it is a functional module diagram of an ERP code generation system for business process analysis provided by an embodiment of the present invention, which can implement the ERP code generation method for business process analysis in Embodiment 1.
[0255] The ERP code generation system 100 for business process analysis according to the present invention can be installed in an electronic device. According to the functions implemented, the ERP code generation system for business process analysis can include a business process division module 101, a business sequence representation module 102, and a code generation device 103. The modules in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0256] The business process division module 101 is configured to formalize an enterprise business process by using business process modeling notations to obtain a business process diagram.
[0257] The business sequence representation module 102 is configured to serially represent the business process diagram to obtain multiple groups of business process sequences, screen a first business process sequence from the multiple groups of business process sequences, and perform similarity measurement on the first business process sequence to obtain the similarity between other business process sequences and the first business process sequence.
[0258] The code generation device 103 is configured to perform enhancement processing on the business process sequences in combination with the similarity, and match the enhanced business process sequences with an ERP code template to obtain business process ERP codes.
[0259] Specifically, each module in the ERP code generation system 100 for business process analysis in the embodiments of the present invention uses the same technical means as those in the Figure 1 business process analysis-based ERP code generation method described above, and can produce the same technical effects, which will not be elaborated here.
[0260] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0261] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the term "including" or "comprising" or any other variation thereof in this article is intended to cover a non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, device, article or method. Without more limitations, the element defined by the statement "including one..." does not exclude the existence of another identical element in the process, device, article or method including the element.
[0262] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0263] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. An ERP code generation method for business process analysis, characterized in that, The method includes: S1: Formalize the enterprise business process using Business Process Modeling Notation to obtain a business process diagram; S2: Serialize the business process diagram to obtain multiple groups of business process sequences, and select the first business process sequence from the multiple groups of business process sequences; S3: Perform similarity measurement on the first business process sequence to obtain the similarity between other business process sequences and the first business process sequence; S4: Enhance the business process sequences in combination with the similarity, and match the enhanced business process sequences with the ERP code template to obtain the business process ERP code; The S4 step includes: Extract the business description text of the modeling result in the business process sequence, perform word segmentation and word vector representation on the business description text to obtain the word vector sequence of the modeling result, Using the similarity between the business process sequence and the first business process sequence G * and the importance of the modeling result, enhance the representation of the word vector sequences of different modeling results in the business process sequence to obtain the enhanced word vector sequence of the modeling result; Match the business process sequence with the ERP code template to generate the ERP code of different business process sequences. The ERP code generation process for the m-th group of business process sequences is as follows: S41: Semantically parse the enhanced word vector sequence of the modeling result in the m-th group of business process sequences to obtain the semantic information of the modeling result; S42: Perform semantic information enhancement processing on the enhanced word vector sequence in combination with the semantic information to obtain the semantically enhanced word vector sequence; S43: Parse the semantically enhanced word vector sequence to obtain the code attribute categories of each semantically enhanced word vector, where the code attribute categories include class name, class attribute, class operation, and class relationship; S44: Map the code attribute categories of the semantically enhanced word vectors to the phrases of the corresponding business description text; S45: According to the code attribute categories, convert the business description text of the modeling result in the m-th group of business process sequences into JavaScript code of the corresponding attribute type. The phrases representing class operations are converted into function code, and the phrases representing class relationships are converted into inheritance or reference relationship code. Use the ERP code template of the corresponding attribute type to perform phrase matching to obtain the ERP code of each phrase, and construct the business code of the modeling result from the ERP codes of all phrases; S46: Construct the ERP code of the m-th group of business process sequences from all the business codes of the modeling in the m-th group of business process sequences; Deduplicate the ERP codes of the M groups of business process sequences in the business process diagram according to the positions of the modeling results in the business process diagram. For the modeling results with multiple groups of business codes, retain the business codes in the business process sequence with the highest comprehensive importance, and construct the ERP code corresponding to the business process.
2. The ERP code generation method for business process analysis according to claim 1, wherein The S1 step includes: Formalize the enterprise business process using Business Process Modeling Notation, where the Business Process Modeling Notation includes event symbols, activity symbols, gateway symbols, connection line symbols, and swimlane symbols. The formalization result of the enterprise business process is: Among them: L n represents the modeling result of the nth enterprise business node, and N represents the total number of enterprise business nodes; The symbol representing the connection number between the nth enterprise business node and the (n - 1)th enterprise business node; Indicating that there is a one-way enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node; Indicating that there is a one-way enterprise business process connection between the nth enterprise business node and the (n - 1)th enterprise business node; Indicating that there is a two-way enterprise business process connection between the (n - 1)th enterprise business node and the nth enterprise business node; The swimlane symbol representing the nth enterprise business node, 1 - 4 indicates that the responsible department of this enterprise business node is the procurement department, production department, sales department or finance department in sequence; Denotes the modeling symbol type of the nth enterprise business node, Indicates that the modeling symbol type of the nth enterprise business node is an event symbol, Indicates that the modeling symbol type of the nth enterprise business node is an activity symbol, Indicates that the modeling symbol type of the nth enterprise business node is a gateway symbol; The business description text representing the nth enterprise service node; Connect the modeling results of N enterprise business nodes based on the connection symbol, and represent the modeling results of consecutive gateway symbol types side by side during the connection process to form a business process diagram.
3. The ERP code generation method for business process analysis according to claim 2, characterized in that, The S2 step includes: S21: Calculate the central importance of different modeling results in the business process diagram based on the position representation of different modeling results in the business process diagram and the representation relationship of enterprise business process connections; among them, the central importance of modeling result L n is calculated as S22: Calculate the type importance of different modeling results in the business process diagram; among which, the type importance of modeling result L n is Among them: Indicates the department weight of the department responsible for the nth enterprise business node; Indicates the type of modeling symbol The frequency of occurrence in N enterprise business nodes, P((s) represents the frequency of occurrence of the modeling symbol type s in N enterprise business nodes, s ∈ [1, 3]; S23: Calculate the importance degree of the modeling results by combining the central importance degree and the type importance degree of the modeling results, and traverse the modeling results in the business process diagram based on the importance degree to obtain M groups of business process sequences. The traversal process of the modeling results in the business process diagram is as follows: S231: Calculate the importance of each modeling result in the business process diagram, where the importance of modeling result L n is E n : S232: Select from the business process diagram a set set of modeling results whose modeling symbol type is an event symbol and whose business description text is the start of the business process; S233: Screen from the set set the modeling result that has not been used as the initial process and has the highest importance degree as the initial process of the business process sequence; S234: Create a priority queue for the initial process, and store all modeling results that have a unidirectional enterprise business process connection or a bidirectional enterprise business process connection with the initial process into the priority queue. The modeling result with a higher importance degree dequeues first; S235: Create a priority queue for the currently dequeued modeling result, and store all modeling results that have a unidirectional enterprise business process connection or a bidirectional enterprise business process connection with the currently dequeued modeling result into the priority queue. The modeling result with a higher importance degree dequeues first; S236: If the currently dequeued result is a modeling result whose modeling symbol type is an event symbol and whose business description text is the end of the business process, then use the modeling result selected in step S233 and the dequeued results in sequence as a set of business process sequences, and return to step S234 to dequeue the next modeling result; Otherwise, return to step S235; S237: Repeat steps S234 to S236 until there are no un-dequeued modeling results in all the currently constructed priority queues, and return to step S233 to re-select the initial process and construct the priority queue until all the modeling results in the set set have been used as the initial process and there are no un-dequeued modeling results in all the constructed priority queues; Summarize all the current business process sequences to form M groups of business process sequences. The representation form of the m-th group of business process sequences is: Where: G m represents the m-th set of service process sequences, represents the service process sequence G m the i-th service process node in m Sum represents the service process sequence G m the total number of service process nodes in, and each service process node consists of a modeling result and the importance degree of the modeling result; Represents a business process node in the modeling result, is the importance level of the modeling result; Calculate the comprehensive importance degree of each group of business process sequences, and select the business process sequence with the highest comprehensive importance degree as the first business process sequence.
4. The ERP code generation method for business process analysis according to claim 3, wherein, The calculation of the comprehensive importance degree of each group of business process sequences includes: The comprehensive importance degree of the m-th group of service flow sequences G m is as follows: Where: g m represents the comprehensive importance degree of the m-th group of service flow sequences G m .
5. The ERP code generation method for business process analysis according to claim 4, characterized in that The S3 step includes: Perform similarity measurement on the first business process sequence to obtain the similarity between other business process sequences and the first business process sequence. The similarity measurement process is as follows: S31: Obtain the first service flow sequence G * : Where: G * ∈ {G m | m ∈ [1, M]}; Represents the i-th service process node in the first service process sequence G * , and Sum * Represents the total number of service process nodes in the first service process sequence G * , where i ∈ [1, Sum * ; Indicates the modeling result of the business process node in the is the modeling result importance level; S32: Calculate to obtain the first service flow program sequence G * The distance from the M groups of service flow program sequences, where the first service flow program sequence G * The distance calculation process from the m-th group of service flow program sequences is as follows: S321: Calculate the first business process sequence G * and the distances between each pair of business process nodes in the m-th group of business process sequences, where the business process node and the business process node The distance between them is Where: ||·|| represents the L1 norm; Represents a business process node in the modeling result The vector composed of the connection symbol, swimlane symbol, and modeling symbol type, i ∈ [[1, Sum * ; Indicates a business process node in the modeling result a vector composed of the connection number symbol, swimlane symbol, and modeling symbol type, where j ∈ [1, Sum m ; S322: Calculate the cost weights between each pair of business process nodes, where the business process node and the business process node the cost weight between them is S323: Initialize the first service flow program sequence G * and the cumulative cost value D of the m-th group of service flow program sequences m (1,1): S324: Iterate on the cumulative cost value D m (1, 1) until the iterated D m ((Sum * , Sum m ), where the iteration formula is: S325: Take D m (Sum * , Sum m ) as the distance between business process nodes and business process node ; S33: Standardize the distance to obtain the first service flow program sequence G * The similarity with the M groups of service flow program sequences, where the first service flow program sequence G * The similarity with the m-th group of service flow program sequences is Sim m : Where: max m∈[1,M] D m (Sum * ,Sum m ) represents the maximum distance between the first service flow sequence G * and M groups of service flow sequences; min m∈[1,M] D m ((Sum * ,Sum m ) represents the minimum distance between the first service flow sequence G * and the M groups of service flow sequences.
6. The method for generating ERP code for business process analysis according to claim 5, wherein The modeling result in the m-th group of service flow sequences The word vector sequence is Where: Represents the modeling result The word vector of the x-th phrase in the business description text, Represents the modeling result The total number of phrases in the business description text; T represents transpose; Modeling result The semantic information of Where: W represents the semantic extraction matrix; * represents the convolution operator; is the modeling result in the m-th group of service flow sequences of the enhanced word vector sequence; Enhanced word vector sequence The corresponding semantically enhanced word vector sequence is Semantically enhanced word vector sequence The x-th semantically enhanced word vector in has the following parsing formula: Where: Indicates the sequence of word vectors after semantic information enhancement The x-th word vector after semantic information enhancement in The code attribute category of; W h Indicates the category convolution matrix representing the h-th code attribute category, where h ∈ [1, 4], and the 1st - 4th code attribute categories correspond to class name, class attribute, class operation, and class relationship in sequence; The probability that the code attribute category of the word vector after semantic information enhancement is the h-th code attribute category; Indicates the code attribute category with the highest selection probability; Modeling result The code attribute category of the x-th phrase in the business description text is 7. The ERP code generation method for business process analysis according to claim 6, characterized in that, The enhanced representation formula of the word vector sequence is: Where: is the modeling result in the m-th group of service flow sequences of the enhanced word vector sequence; For the word vector Enhanced result of Indicates the modeling result The frequency at which the x-th phrase in the business description text appears in the business description texts of N enterprise business nodes.
8. The ERP code generation method for business process analysis according to claim 3, wherein The calculation process of the central importance of the modeling result L in step S21 n is as follows: S211: Calculate the betweenness centrality α of the nth enterprise service node n : Where: exp(·) represents the exponential function with the natural constant as the base; count(L1,L a ) represents the number of enterprise business processes starting from the first enterprise business node and ending at the a-th enterprise business node, where a ∈ [1, N] and a ≠ n; count Ln (L1,L a ) represents the number of enterprise business processes passing through the nth enterprise business node in the enterprise business process starting from the first enterprise business node and ending at the a-th enterprise business node; S212: Initialize the node weight sequence w0 of N enterprise business nodes: Where: T represents transpose; Indicates the node weight of the nth enterprise business node generated during initialization, where n ∈ [1, N]; S213: Construct an adjacency matrix A representing the enterprise business process connections between N enterprise business nodes: A = (A(a, b)) N×N Where: A(a, b) represents the adjacency relationship between the a-th enterprise business node and the b-th enterprise business node. If there is a unidirectional enterprise business process connection or a bidirectional enterprise business process connection between the a-th enterprise business node and the b-th enterprise business node, then A(a, b) is 1; otherwise, A(a, b) is 0, where a, b ∈ [1, N]. S214: Set the current iteration number of the node weight sequence to t. The initial value of t is 0, and the maximum value is Max. Then the t-th iteration result of the node weight sequence w0 is w t , where t ∈ [1, Max]; S215: Iterate the node weight sequence based on the adjacency matrix A: Where: ||·|| represents the L1 norm; S216: Let t = t + 1, return to step S215 until the maximum number of iterations is reached, and extract as the node weight of the nth enterprise service node; S217: Combine the node weight of the nth enterprise business node and the betweenness centrality α n , and calculate the modeling result L n of the central importance 9. An ERP code generation system for business process analysis, characterized in that, The system includes: A business process division module, which is used to formalize the enterprise business process by using business process modeling notations to obtain a business process diagram; A business sequence representation module, which is used to serialize the business process diagram to obtain multiple groups of business process sequences, screen the first business process sequence from the multiple groups of business process sequences, and perform similarity measurement on the first business process sequence to obtain the similarity between other business process sequences and the first business process sequence; A code generation device, which is used to perform enhancement processing on the business process sequences in combination with the similarity, and match the enhanced business process sequences with the ERP code template to obtain the business process ERP code; To implement an ERP code generation method for business flow analysis as described in any one of claims 1-8.
Citation Information
Patent Citations
Business system code automatic generation method and device
CN113590115A
Business process model expansion tree-oriented path sequence similarity calculation system and method
CN115629787A