MOM software general structure intelligent identification method based on flow chart and related product
By mapping the MOM flowchart to MOM-Petri network and combining frequent subgraph mining and semantic similarity analysis, the problem of dynamic behavior and complex structure recognition in MOM software development is solved, and efficient and accurate general structure recognition and reuse is achieved, reducing development and maintenance costs.
Patent Information
- Application Number
- CN202510443096.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art is difficult to accurately identify dynamic behaviors and complex structures in MOM software development, resulting in inaccuracy and inefficiency in identifying general structures, and relies on manual definition of template rules and large amounts of labeled data.
By drawing and mapping the MOM flowchart into MOM-Petri network, combining the Token flow mechanism of Petri network, identifying the common structure of MOM software, using frequent subgraph mining algorithms and semantic similarity analysis, high-frequency subgraphs are extracted and reusable components are formed.
It improves the accuracy and efficiency of common structure recognition of MOM software, reduces the cost of repeated development and maintenance, enhances the ability to capture dynamic behavior, and reduces the dependence on manually defining rules and labeling data.
Smart Images

Figure CN120448239A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workshop production management, and in particular to a flow chart-based MOM software universal structure intelligent recognition method and related products. Background Art
[0002] In MOM (Manufacturing Operations Management) software development, there are frequently occurring sub-processes. For example, the "material arrival inspection → process document instantiation" process, which recurs across multiple disciplines (parts, heat meters, and assembly), is repeated. Furthermore, dynamic behavioral abstractions, such as the closed-loop process management (start → execution → inspection → completion) within "execution management," share similar logic across parts processing, assembly, and testing. Therefore, identifying common structures in MOM software development is crucial to discover reusable modules, processes, or components, allowing for repeated use during development. This reduces the workload and costs for software developers and enterprises, while improving development efficiency and maintainability.
[0003] Existing techniques identify code structure by analyzing common design patterns within a code base. Dependency graphs are formed by analyzing code call relationships, such as function calls, class inheritance, and data flow, to identify common structures with high cohesion and low coupling. Alternatively, code similarity is clustered to identify potential common modules during system refactoring.
[0004] However, because traditional pattern matching relies on design patterns and cannot identify new architectural patterns, it struggles to analyze and identify implicit dependencies (such as reflection and dynamic loading) and circular dependencies. It only works for fixed-structure scenarios and struggles to capture dynamic behaviors during MOM software development, such as timing changes or business-to-business interactions. Furthermore, it lacks generalization capabilities for highly complex or non-standardized structures, requiring the manual definition of numerous template rules. Furthermore, cluster analysis lacks a semantic understanding of MOM business logic. When code for the same business logic is scattered across different clusters, it is unable to identify MOM functionality reuse points and cannot directly map to the reuse requirements of MOM business logic, making it equally difficult to capture dynamic behaviors during MOM software development. Summary of the Invention
[0005] This application provides a flowchart-based method and system for intelligently identifying the common structure of MOM software. This method aims to preserve the semantic accuracy of MOM business processes, capture dynamic behaviors such as concurrency, synchronization, and resource competition during MOM software development, and improve the accuracy and business value of identifying the common structure of MOM software. This is achieved through the following technical solutions:
[0006] In the first aspect, the present application provides a method for intelligently identifying the general structure of MOM software based on a flowchart, including: drawing a MOM flowchart of each business process; mapping the MOM flowchart into a MOM-Petri net by analyzing the topological structure of the MOM flowchart; and identifying the general structure of MOM software based on the MOM-Petri net.
[0007] In the second aspect, the present application provides a flowchart-based intelligent identification system for the general structure of MOM software, including: a flowchart drawing module for drawing the MOM flowchart of each business process; a topology analysis module for analyzing the topological structure of the MOM flowchart; a MOM-Petri net mapping module for mapping the MOM flowchart into a MOM-Petri net; and a general structure identification module for identifying the general structure of MOM software based on the MOM-Petri net.
[0008] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a flowchart-based method for intelligently identifying the general structure of MOM software are implemented as described in the first aspect above.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of a flowchart-based MOM software general structure intelligent identification method as described in the first aspect above.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a computer device, it is used to implement the steps of a flowchart-based MOM software general structure intelligent identification method as described in the first aspect above.
[0011] As can be seen from the above, compared with the prior art, this application has the following beneficial technical effects:
[0012] (1) This application combs through the entire MOM process and uses a unified standard to draw a MOM flowchart that includes core business processes such as planning, production, quality, logistics, and resources to ensure the semantic consistency of each node and connection line in the process; then analyzes the topological structure of the MOM flowchart and maps the MOM flowchart into a MOM-Petri net, which can retain the semantic accuracy of the MOM business process and, combined with the token flow mechanism of the Petri net, supports the modeling and optimization of dynamic behaviors such as concurrency, synchronization, and resource competition; finally, identifies the general structure of MOM software based on the MOM-Petri net. Therefore, the technical solution described in the present application does not require manual definition of a large number of template rules, and does not rely on design patterns. Even for implicit dependency patterns such as reflection, dynamic loading and circular dependencies, it can be quickly and accurately analyzed and identified, thereby enhancing the applicable scenarios and is no longer limited to manually defined fixed structure scenarios. At the same time, combined with the token flow mechanism of the Petri net, dynamic behaviors such as timing changes or interactive processes between businesses can also be easily and accurately captured. In addition, the semantic accuracy of the MOM business process and the modeling and optimization of dynamic behaviors are retained through the MOM-Petri net, which enhances the semantic understanding of the MOM business logic. Even if the code of the same business logic is scattered in different clusters, the MOM function reuse points can be quickly and accurately identified, which can be directly mapped to the reuse requirements of the MOM business logic, thereby significantly improving the reuse rate of the business logic. In summary, the technical solution described in the present application is conducive to improving the accuracy and business value of the identification of the general structure of MOM software, thereby realizing repeated calls in the MOM software development process, greatly reducing the workload and cost of software developers and enterprises, and significantly improving the development efficiency and maintainability.
[0013] (2) This application also does not require a large amount of labeled data like artificial intelligence-based machine learning to recognize the general structure of MOM software, which is conducive to saving labor costs and improving recognition efficiency. Traditional artificial intelligence-based machine learning to recognize the general structure of MOM software requires a large amount of labeled data for training the classifier. In actual application scenarios, not only is labeled data scarce, but it is also time-consuming and labor-intensive.
[0014] (3) This application utilizes MOM flowcharts to directly address business semantics, and systematically covers dynamic behaviors such as temporal changes in processes or interactions between businesses through standardized symbols, thereby achieving decoupling between business logic and code. Traditional image recognition focuses on static feature extraction, which makes it difficult to model the temporal dynamic processes of MOM, and the recognition results are mostly visual elements. An additional rule engine is required to map the structure to MOM business semantics, which also increases costs.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 A flowchart of a method for intelligently identifying a general structure of MOM software based on a flowchart provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of the MOM flow chart provided in an embodiment of the present application;
[0019] Figure 3 Schematic diagram of the MOM-Petri net model provided in the embodiment of the present application;
[0020] Figure 4 A schematic diagram of a process for identifying the general structure of MOM software based on a MOM-Petri net provided in an embodiment of the present application;
[0021] Figure 5 Another flowchart of identifying the general structure of MOM software based on MOM-Petri net provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of a general structure intelligent identification system of MOM software based on a flowchart provided in an embodiment of the present application;
[0023] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] The significance of the universal structure of MOM software described in this application in the development of workshop production management operation system: first, the universal structure is reusable. When the universal structure has an appropriate scale and size, it can be repeatedly called during the development process, reducing the workload and cost of software developers and enterprises. Secondly, the universal structure is convenient for business expansion, connection and integration. Many types of diagrams are involved in MOM software development, such as data flow diagrams, use case diagrams, flow charts, state diagrams, ER diagrams, etc. These graphical expression tools can intuitively display abstract constructions and the connection relationships between them, providing a good structural foundation for MOM software universal structure identification. Among them, the flow chart visually and intuitively describes the specific steps of the software development work process, and various operations are clear at a glance, avoiding "ambiguity", being easy to understand, and easy to find when the algorithm makes a mistake. In addition, the standardized symbols of the flow chart can reduce the errors caused by semantic ambiguity, making the identification and reuse of the universal structure more efficient. Another thing is that since the MOM system covers multiple modules such as planning, production, quality, and logistics, the flowchart not only horizontally connects the interaction logic of each module in series, making the general structure consistent between different modules, but also can capture the dynamic behavior of the process in complex manufacturing scenarios, such as parallel tasks, conditional branches, and exception handling. Therefore, compared with the traditional MOM software general structure recognition method, the MOM software general structure intelligent recognition method based on flowcharts described in this application can directly face the business semantics using MOM flowcharts, and systematically cover the dynamic behaviors such as the temporal changes of the process or the interaction between businesses through standardized symbols, thereby realizing the decoupling between business logic and code, and efficiently realizing general structure recognition through standardized symbolic expression of the process, significantly reducing repeated development, and adapting to complex manufacturing scenarios.
[0026] See also Figure 1 , Figure 1 A flowchart of a method for intelligently identifying a general structure of MOM software based on a flowchart provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes the following contents:
[0027] 101. Draw MOM flowcharts for each business process;
[0028] By combing through the entire MOM process, a unified standard is used to draw a MOM flowchart covering core business processes such as planning, production, quality, logistics, and resources to ensure the semantic consistency of each node and connection line in the process. Even in the face of cross-module business logic reuse and efficient development, the MOM flowchart can intuitively express the timing processing steps, branches, and exception handling logic; and achieve decoupling of business logic and code. In some feasible implementations, based on the MOM flowcharts of each core business process drawn based on a unified symbol standard, a standardized MOM flowchart library with unified semantics is established to combine the semantic accuracy of subsequent Petri nets and the characteristics of structured constraints, thereby achieving dynamic behavior modeling and improving the accuracy of general structure recognition of MOM software. Establishing a MOM flowchart library is conducive to forming reusable components that achieve the above-mentioned purpose of the invention and improve the integrability of the entire system.
[0029] Among them, BPMN (Business Process Model and Notation) can be selected as the standard for drawing flowcharts. Determine the node shape, connection line style and meaning. For example, use a rounded rectangle to represent the start or end of a process, a rectangle to represent an activity, and a diamond to represent a decision point; a solid arrow to represent the flow of the process, and a dotted line to represent information transmission. Through graphical symbols and intuitive layouts, the overall picture of the business process can be clearly displayed, so that non-technical personnel can easily understand the steps and logic of the process. Using a unified standard to describe and communicate business processes avoids misunderstandings caused by using different representation methods. In addition, BPMN provides a rich set of elements and extension mechanisms to meet the modeling needs of various complex business processes. Whether it is a simple linear process or a highly complex parallel or nested process, it can be accurately described.
[0030] 102. Analyze the topological structure of the MOM flow chart.
[0031] The topological structure of the MOM flowchart drawn above is analyzed to obtain the topological elements of each MOM flowchart; wherein the topological elements include a start node, an end node, an operation step, a conditional branch, a parallel branch and a loop branch.
[0032] 103. Map the MOM flow chart into a MOM-Petri net.
[0033] MOM-Petri net (Manufacturing Operations Management Petri Net, a Petri net model for manufacturing operations management software development). A Petri net is a triple (P, T, F), where P stands for place, representing a resource or state; T stands for transition, representing an event, activity, or behavior; and F stands for directed arc, used to connect places and transitions, representing control flow relationships. In addition, tokens are used in Petri nets as a control symbol to represent a certain condition or local state. For example, if a place represents a condition, the presence of a token indicates that the place (condition) holds, and the absence of a token indicates that the place (condition) does not hold. If a place represents a state, the number of tokens is used to quantify the number of resources and entities in the state, such as the number of artifacts in a MOM software production system.
[0034] Map the start node and end node of the MOM flowchart to the initial location P of the MOM-Petri net respectively. start and the termination place P end , n is a positive integer; the initial library P start Indicates the starting point of the process, used to place the initial token and terminate the library P end Indicates the end of the process and is used to receive the final token.
[0035] Map the operation steps of the MOM flowchart to the transitions of the MOM-Petri net i Since the input library needs to provide a token to trigger the transition, the previous node and the next node of the operation step are mapped to the transition T i Input place P i-1 and output place P i , and use directed arcs to connect the input library P i-1 and output place P i :P i-1 →T i →P i , where i is a positive integer.
[0036] Create two branch transitions T at the judgment node corresponding to the conditional branch ture and T false , create independent places and directed arcs for each branch transition.
[0037] Create branch libraries for parallel branching (e.g. multithreaded tasks) fork , connected to the concurrent transition T parallel , and create a synchronization library P join , to merge parallel branches.
[0038] Create a conditional transition T at the loop entry corresponding to the loop branch loop-check If the conditional transition is triggered, the token contained in the input library of the conditional transition returns to the loop body, otherwise exit.
[0039] See also Figure 2 , Figure 2 The MOM flow chart provided in the embodiment of the present application is as follows: Figure 2 As shown, the topological elements included in the MOM flowchart include a start node, operation step 1, operation step 2, operation step 3, operation step 4, operation step 5, operation step 6, operation step 7, operation step 8, operation step 9 and an end node, as well as a conditional branch (judgment condition 1), a loop branch (judgment condition 2) and a parallel branch (operation step 6).
[0040] See also Figure 3 , Figure 3 The MOM-Petri net model diagram provided in the embodiment of the present application is as follows: Figure 3 As shown, according to the above mapping rules, Figure 2 The MOM flow chart is mapped to a MOM-Petri net: (P start , P start →T 1parellel →P frok , P frok →T2→P2, P2→T3→P3, P3→T 5ture →P jion , P3→T 4false (T loop-check )→P4, P4→T 9ture →P end , P frok →T6→P8, P8→T7→P jion , P jion →T8→P end , P end ).
[0041] Based on the flowchart's topological structure, symbolic semantic mapping rules automatically generate reusable component code. This avoids the fragmentation inherent in traditional MOM dynamic behavior modeling. Through the combinatorial orchestration of MOM process nodes, the system rapidly adapts to complex manufacturing scenarios, significantly reducing module duplication. By mapping MOM flowchart elements to places, transitions, and arcs in the MOM-Petri net, the semantic accuracy of the MOM business process is preserved. Furthermore, incorporating the token flow mechanism of the Petri net, the system supports the modeling and optimization of dynamic behaviors such as concurrency, synchronization, and resource contention. This system also enables efficient recognition of common structures such as high-frequency sub-processes and dynamic behaviors.
[0042] MOM-Petri nets clearly distinguish between places (states) and transitions (actions), enabling precise expression of business process semantics and ensuring the model accurately describes tasks, resources, and state changes in intelligent manufacturing systems. The token flow mechanism of MOM-Petri nets enables simulation of dynamic behaviors such as resource allocation and task execution. The grammatical rules of Petri nets require alternating connections between places and transitions, reducing the generation of invalid structures, improving model accuracy and interpretability, and facilitating formal verification (e.g., reachability and deadlock detection). Petri nets support a variety of process structures, including sequential, branching, parallel, and looping, making them suitable for describing complex manufacturing operations management processes. The MOM flowchart-to-MOM-Petri net conversion technology enhances semantic accuracy, dynamic behavior modeling, structural constraints, flexibility and scalability, and toolchain support in manufacturing operations management systems. Ultimately, it achieves technical benefits such as process optimization, decision support, component reuse, formal verification, and visualization and interaction.
[0043] 104. Identify the general structure of MOM software based on the MOM-Petri net.
[0044] In some feasible implementations, a rich set of graph model algorithms suitable for large-scale data analysis is used to convert the MOM-Petri net into a MOM graph model, and the attributes of nodes and edges (such as type, label, and weight) are used to enrich the data structure, thereby achieving efficient recognition of common structures such as high-frequency sub-processes and dynamic behaviors. Flowcharts are fully utilized to intuitively express sequential processing steps, branches, and exception handling logic. Combining the precise semantics of the MOM-Petri net with the advantages of graph model algorithms, common structures are encapsulated as low-code components, significantly reducing the cost of repeated development (such as cross-module reuse of process lifecycle templates). Through parameterized configuration, complex manufacturing scenarios can be quickly adapted, effectively solving the pain points of traditional code analysis, which makes it difficult to capture dynamic processes, and machine learning models, which lack business semantic expression.
[0045] See also Figure 4 , Figure 4 The flow chart of identifying the general structure of MOM software based on MOM-Petri net provided in the embodiment of the present application is as follows: Figure 4 As shown, including the following:
[0046] 401. Convert MOM-Petri net to MOM graph model.
[0047] The places and transitions of the MOM-Petri net are mapped to P nodes and T nodes of the MOM graph model, respectively; wherein the node attributes of the P node include node type, number of tokens, and node label, and the node attributes of the T node include node label and trigger condition. Furthermore, the directed arcs of the MOM-Petri net are mapped to directed edges of the MOM graph model, wherein the edge attributes of the directed edges of the MOM graph model include weight (e.g., trigger probability) and direction (e.g., input / output). Finally, the MOM graph model is constructed based on the nodes and directed edges. That is, G.node(place.id, type="Place", label="place.label", tokens="place.tokens"); G.node(trans.id, type="Transition", label="trans.label"); G.edge(arc.source.id, arc.target.id, type="Arc", direction="arc.direction").
[0048] Converting a MOM-Petri net to a MOM graph model enables efficient data analysis and processing using a mature graph algorithm library. The conversion process preserves the semantic information of the Petri net, ensuring the semantic accuracy of the analysis results and supporting MOM business interpretation and decision-making. By leveraging the properties of the MOM graph model while retaining the dynamic behavior of the MOM-Petri net, it supports the modeling and analysis of complex behaviors such as concurrency, synchronization, and resource contention in MOM businesses. The MOM-Petri net to MOM graph model conversion technology facilitates data structure generalization, algorithm enrichment, semantic information preservation, and dynamic behavior modeling in manufacturing operations management systems. Ultimately, it achieves technical benefits such as high-frequency sub-process mining, dynamic behavior analysis, semantic consistency, visualization and interaction, and performance optimization. This approach significantly enhances the analytical capabilities and business value of MOM systems, supporting application scenarios such as process optimization, decision support, and component reuse.
[0049] 402. Use a frequent subgraph mining algorithm to extract high-frequency subgraphs that meet a first support threshold in the MOM graph model.
[0050] First, the MOM graph model needs to be converted into a format supported by the frequent subgraph mining algorithm gSpan. Secondly, the first support threshold is set. For example, it must appear at least 3 times to be identified as a high-frequency subgraph, then the first support threshold is set to 3. The specific value can be set according to the actual application scenario and is not limited. Finally, by using the networkx library to process the graph data and using the graph-tool library to implement the gSpan algorithm, the frequent subgraph mining algorithm gSpan is run and the high-frequency subgraph that meets the first support threshold is output. In some feasible implementations, the output high-frequency subgraph can be formed into a high-frequency subgraph set to facilitate subsequent operations and improve operational efficiency.
[0051] 403. Based on the node attributes of the nodes and the edge attributes of the directed edges, calculate the semantic similarity between the high-frequency subgraphs.
[0052] Flowcharts with structural similarity may actually have certain differences in business. To further accurately identify common structures, semantic similarity is used to perform secondary recognition on high-frequency subgraph sets. The subgraphs are semantically filtered and classified based on the semantic information of nodes and edges (such as node labels, types, and conditions).
[0053] First, semantic features are extracted from the node and edge attributes of the high-frequency subgraphs, such as Place, place.label, and place.tokens for nodes, and Arc and arc.direction for edges. Second, the semantic similarity between the high-frequency subgraphs is calculated based on the node attributes of the nodes and the edge attributes of the directed edges.
[0054] (1) If the node attributes and edge attributes are numeric:
[0055] Based on the node attributes of the nodes and the edge attributes of the directed edges, the Euclidean distances between the high-frequency subgraphs are calculated; for two nodes A (x1, x2, ..., x m ) and B(y1,y2,...,y m ), then the Euclidean distance d(A,B) between AB is calculated as follows:
[0056]
[0057] Then, in order to convert the Euclidean distance d(A, B) into a similarity score, a similarity conversion formula is used to convert the Euclidean distance into a corresponding first similarity score; wherein the first similarity score is used to evaluate the semantic similarity between each high-frequency subgraph. The similarity conversion formula is as follows:
[0058]
[0059] Wherein, s(A, B) represents the first similarity score between nodes A and B.
[0060] The smaller the Euclidean distance, the higher the similarity score. When the distance is 0, the similarity score reaches its maximum value of 1, indicating that the two nodes are exactly the same. Therefore, by setting a first similarity score threshold, high-frequency subgraphs that meet the preset semantic similarity requirements can be screened. In the embodiment of the present application, if the high-frequency subgraph data is relatively evenly distributed in space, calculating the semantic similarity between each high-frequency subgraph using the Euclidean distance can better reflect the similarity between nodes.
[0061] Or, in some possible implementations:
[0062] Based on the node attributes of the nodes and the edge attributes of the directed edges, the Manhattan distance between each high-frequency subgraph is calculated; for two nodes C (a1, a2, ..., a k ) and D(b1,b2,...,b k ), then the Manhattan distance d`(C,D) between CD is calculated as follows:
[0063]
[0064] Then, in order to convert the Manhattan distance d'(C, D) into a similarity score, a similarity conversion formula is used to convert d'(C, D) into a corresponding second similarity score; wherein, the second similarity score is used to evaluate the semantic similarity between each high-frequency subgraph. The similarity conversion formula is as follows:
[0065]
[0066] Wherein, s(C, D) represents the second similarity score between nodes C and D.
[0067] The smaller the Manhattan distance, the higher the similarity score. When the distance is 0, the similarity score reaches a maximum value of 1, indicating that the two nodes are exactly the same. Therefore, by setting a second similarity score threshold, high-frequency subgraphs that meet the preset semantic similarity requirements can be screened out. In the embodiment of the present application, since the Manhattan distance is relatively more robust to changes in high-frequency subgraph data, if the high-frequency subgraph data has more dimensions and changes in certain dimensions have a greater impact on similarity, calculating the semantic similarity between each high-frequency subgraph using the Manhattan distance can better reflect the similarity between nodes.
[0068] (2) If the node attributes and edge attributes are categorical:
[0069] Based on the node attributes of the nodes and the edge attributes of the directed edges, the Jaccard similarity coefficients between the high-frequency subgraphs are calculated:
[0070] For two nodes to be compared, their categorical attribute sets are determined respectively. For example, node E has an attribute set E = {e1, e2, e3}, and node F has an attribute set F = {e2, e3, e4}.
[0071] Calculate the intersection of the above two attribute sets E∩F={e2,e3}, whose size is |E∩F|=2.
[0072] Calculate the union of the above two attribute sets E∪F={e1,e2,e3,e4}, whose size is |E∪F|=4.
[0073] Calculate the Jaccard similarity coefficient between the above two nodes The Jaccard similarity coefficient ranges from 0 to 1, with higher values indicating more similarity between the categorical attributes of two nodes. A Jaccard similarity coefficient of 1 indicates that the attribute sets of the two nodes are exactly the same; a Jaccard similarity coefficient of 0 indicates that the attribute sets of the two nodes have no common elements.
[0074] It should be noted that the calculation method of edge attributes is the same as that of node attributes, and will not be repeated here. The semantic similarity between edge attributes and node attributes can be used to determine the semantic similarity between the high-frequency subgraphs involved.
[0075] 404. Cluster the high-frequency subgraphs based on semantic similarity to obtain at least one set of semantically similar target subgraphs.
[0076] 405. Determine the general structure of the MOM software according to the target subgraph set.
[0077] The semantic similarity between all high-frequency subgraphs is calculated in the above manner, taking into account the attribute similarity of nodes and edges, and outputting a similarity matrix. Each element in the similarity matrix represents the semantic similarity score between the corresponding two high-frequency subgraphs, with the higher the score, the more similar the two subgraphs are. The high-frequency subgraphs can be clustered or filtered according to the similarity score to find a target subgraph set with similar semantics. The MOM process corresponding to the target subgraph set is used as the high-frequency sub-process in the MOM business logic. The MOM software development code corresponding to the high-frequency sub-process is the general structure of the MOM software and can be reused during the MOM software development process.
[0078] In the embodiment of the present application, the processes in the MOM development process are mapped into MOM-Petri nets and MOM graph models, and the semantic accuracy of Petri nets and the algorithmic richness of graph models are comprehensively utilized to achieve efficient identification and dynamic behavior analysis of common structures. A three-layer architecture of standardized MOM flowchart library + MOM-Petri net modeling + MOM graph algorithm is proposed. A flowchart library with unified semantics is constructed based on the unified symbol standard of flowcharts. The timing and abnormal logic are accurately described through Petri net structured constraints. Combined with algorithms such as frequent subgraph mining, high-frequency reuse patterns are efficiently identified to form reusable components. This method greatly improves the reuse rate of business logic. At the same time, it quickly adapts to complex scenarios such as multi-variety mixed lines through process node combination and arrangement, and achieves dynamic consistency between business semantics and code, significantly reducing the cost of repeated development and maintenance of MOM software. At the same time, the recognition of common structures of MOM software at the two levels of structural similarity and semantic similarity can significantly improve the accuracy of recognition and business value; frequent subgraph mining is performed based on the MOM graph model to efficiently identify common structures in MOM software and ensure their consistency in topology and business meaning. Structural similarity recognition uses a graph matching algorithm to identify structurally similar subgraphs, ensuring topological consistency of the common structure and supporting MOM business process optimization and component reuse. Semantic similarity recognition combines the semantic information of nodes and edges to distinguish subgraphs with the same structure but different semantics, ensuring consistency in the business meaning of the common structure and improving the business relevance of the MOM common structure.
[0079] See also Figure 5 , Figure 5 Another flow chart of identifying the general structure of MOM software based on MOM-Petri net provided in the embodiment of the present application is as follows: Figure 5 As shown, when the process has few nested levels and a relatively simple structure, or when the data scale is small, in order to improve the recognition efficiency of the MOM general structure, the following contents can also be included:
[0080] 501. Use a depth-first search algorithm to traverse all possible paths of the MOM-Petri net and match a target subnet that meets the predefined subnet structure.
[0081] 502. Count the number of matches of the target subnet.
[0082] 503. Filter the target subnet that meets the second support threshold as the high-frequency subnet.
[0083] 504. Determine the general structure of the MOM software based on the high-frequency subnet.
[0084] A depth-first search algorithm is used to traverse all possible paths of the MOM-Petri net. During the traversal process, a check is made to see whether the current path matches a target subnet of a predefined subnet structure. During the matching process, a dictionary is used to record the number of occurrences of each target subnet. A second support threshold is set to filter target subnets whose number of occurrences is greater than the second support threshold, i.e., high-frequency subnets. The MOM process corresponding to the high-frequency subnet is used as a high-frequency sub-process in the MOM business logic. The MOM software development code corresponding to the high-frequency sub-process is the general structure of the MOM software and can be reused in the MOM software development process.
[0085] In the embodiment of the present application, the structure of a high-frequency subnet is defined according to business requirements. A matching algorithm is then used to traverse the Petri net to match target subnets that conform to the predefined subnet structure. Frequency statistics are then performed, and the number of occurrences of each target subnet is recorded to screen out the high-frequency subnets. The MOM flowchart is mapped to a Petri net, and high-frequency sub-processes are directly extracted from the Petri net. The Petri net clearly distinguishes between places (states) and transitions (actions), facilitating the identification of meaningful sub-processes. Compared to the above embodiment, this reduces the generation of invalid subgraphs, which helps improve mining efficiency.
[0086] Example 2
[0087] Combination of the above Figures 1 to 5 The embodiment of the present application provides a method for intelligently identifying the general structure of MOM software based on a flowchart. Figure 6 A flowchart-based MOM software general structure intelligent identification system is described in detail for executing a flowchart-based MOM software general structure intelligent identification method provided in an embodiment of the present application. Figure 6 A schematic diagram of a general structure intelligent identification system for MOM software based on a flowchart provided in an embodiment of the present application; Figure 6 , the system comprises:
[0088] Flowchart drawing module 601, used to draw MOM flow charts of various business processes;
[0089] A topology analysis module 602 is used to analyze the topology structure of the MOM flow chart;
[0090] A MOM-Petri net mapping module 603 is used to map the MOM flow chart into a MOM-Petri net;
[0091] The general structure identification module 604 is used to identify the general structure of MOM software according to the MOM-Petri net.
[0092] Preferably, the general structure identification module 604 is specifically used to: map the places and transitions of the MOM-Petri net into nodes of the MOM graph model; and map the directed arcs of the MOM-Petri net into directed edges of the MOM graph model; construct a MOM graph model based on the nodes and directed edges; extract high-frequency subgraphs that meet a first support threshold in the MOM graph model using a frequent subgraph mining algorithm; calculate the semantic similarity between each high-frequency subgraph based on the node attributes of the nodes and the edge attributes of the directed edges; cluster the high-frequency subgraphs based on the semantic similarity to obtain at least one semantically similar target subgraph set; and determine the general structure of the MOM software based on the target subgraph set.
[0093] Preferably, the general structure identification module 604 is further specifically used to: calculate the Euclidean distance between each high-frequency subgraph based on the node attributes of the node and the edge attributes of the directed edge; convert the Euclidean distance into a corresponding first similarity score using a similarity conversion formula; wherein the first similarity score is used to evaluate the semantic similarity between each high-frequency subgraph.
[0094] Preferably, the general structure identification module 604 is further specifically used to: calculate the Manhattan distance between each high-frequency subgraph based on the node attributes of the node and the edge attributes of the directed edge; convert the Manhattan distance into a corresponding second similarity score using a similarity conversion formula; wherein the second similarity score is used to evaluate the semantic similarity between each high-frequency subgraph.
[0095] Preferably, the general structure identification module 604 is further specifically used to: use a depth-first search algorithm to traverse all possible paths of the MOM-Petri net to match target subnets that conform to the predefined subnet structure; count the number of matches of the target subnet; screen the target subnets that meet the second support threshold as high-frequency subnets; and determine the general structure of the MOM software based on the high-frequency subnets.
[0096] Preferably, the topology analysis module 602 is specifically used to: analyze the topology structure of the MOM flowchart to obtain the topology elements of the MOM flowchart; wherein the topology elements include a start node, an end node, an operation step, a conditional branch, a parallel branch and a loop branch.
[0097] Preferably, the MOM-Petri net mapping module 603 is specifically used to: map the start node and the end node to the initial place and the terminal place of the MOM-Petri net respectively; map the operation steps to the transitions of the MOM-Petri net, wherein the previous node and the next node of the operation step are mapped to the input place and the output place of the transition respectively, and the input place and the output place are connected by directed arcs; create two branch transitions at the judgment node corresponding to the conditional branch, and create an independent place and directed arc for each branch transition; create branch places for parallel branches, connect them to concurrent transitions, and create synchronous places to merge parallel branches; create conditional transitions at the loop entrance corresponding to the loop branch, and if the conditional transition is triggered, the token contained in the input place of the conditional transition is returned to the loop body, otherwise exit.
[0098] The specific implementation manner and technical effects of the flowchart-based MOM software universal structure intelligent identification system can be referred to the aforementioned flowchart-based MOM software universal structure intelligent identification method, which will not be repeated here.
[0099] Example 3
[0100] The embodiment of the present application also provides an electronic device, Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the electronic device includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or programs loaded from a storage unit 708 into a random access memory (RAM) 703. RAM 703 also stores various programs and data required for system operation. CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to bus 704. The following components are connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as combinations of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0102] Example 4
[0103] The present application also provides a computer-readable storage medium. This computer-readable storage medium may be included in the flowchart-based intelligent recognition system for general MOM software structures described in the above embodiments, or may be a separate computer-readable storage medium not incorporated into an electronic device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the flowchart-based intelligent recognition method for general MOM software structures described in this application.
[0104] Example 5
[0105] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a computer device, it is used to implement a flowchart-based MOM software general structure intelligent identification method of the present application.
[0106] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also encompass other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. A flow chart-based intelligent identification method for general structure of MOM software, characterized in that: include: Draw MOM flowcharts for each business process; By analyzing the topological structure of the MOM flow chart, the MOM flow chart is mapped into a MOM-Petri net; The general structure of MOM software is identified based on the MOM-Petri net.
2. A method for intelligently identifying a general structure of MOM software based on a flow chart as claimed in claim 1, characterized in that: Identifying the general structure of MOM software based on the MOM-Petri net includes: The MOM-Petri net is mapped to nodes of a MOM graph model by mapping places and transitions; and the directed arcs of the MOM-Petri net are mapped to directed edges of a MOM graph model; a MOM graph model is constructed based on the nodes and directed edges; a frequent subgraph mining algorithm is used to extract high-frequency subgraphs that meet a first support threshold in the MOM graph model; based on the node attributes of the nodes and the edge attributes of the directed edges, the semantic similarity between the high-frequency subgraphs is calculated; the high-frequency subgraphs are clustered based on the semantic similarity to obtain at least one semantically similar target subgraph set; and a general structure of the MOM software is determined based on the target subgraph set.
3. A method for intelligently identifying a general structure of MOM software based on a flow chart as claimed in claim 2, characterized in that: Calculating semantic similarities between high-frequency subgraphs based on the node attributes of the nodes and the edge attributes of the directed edges, including: Calculating the Euclidean distances between the high-frequency subgraphs based on the node attributes of the nodes and the edge attributes of the directed edges; The Euclidean distance is converted into a corresponding first similarity score using a similarity conversion formula; wherein the first similarity score is used to evaluate the semantic similarity between the high-frequency subgraphs.
4. A method for intelligently identifying a general structure of MOM software based on a flow chart as claimed in claim 2, characterized in that: Calculating semantic similarities between high-frequency subgraphs based on the node attributes of the nodes and the edge attributes of the directed edges, including: Calculating the Manhattan distance between each high-frequency subgraph based on the node attributes of the nodes and the edge attributes of the directed edges; The Manhattan distance is converted into a corresponding second similarity score using a similarity conversion formula; wherein the second similarity score is used to evaluate the semantic similarity between each high-frequency subgraph.
5. A method for intelligently identifying a general structure of MOM software based on a flow chart as claimed in claim 1, characterized in that: Identifying the general structure of MOM software based on the MOM-Petri net includes: A depth-first search algorithm is used to traverse all possible paths of the MOM-Petri net to match a target subnet that meets a predefined subnet structure; the number of matches of the target subnet is counted; the target subnet that meets a second support threshold is selected as a high-frequency subnet; and a general structure of the MOM software is determined based on the high-frequency subnet.
6. A method for intelligently identifying the general structure of MOM software based on a flow chart as described in any one of claims 1 to 5, characterized in that, By analyzing the topological structure of the MOM flow chart, the MOM flow chart is mapped into a MOM-Petri net, including: The topological structure of the MOM flow chart is analyzed to obtain the topological elements of the MOM flow chart; wherein the topological elements include a start node, an end node, an operation step, a conditional branch, a parallel branch and a loop branch; The start node and the end node are mapped to the initial place and the terminal place of the MOM-Petri net respectively; the operation steps are mapped to the transitions of the MOM-Petri net, wherein the previous node and the next node of the operation step are mapped to the input place and the output place of the transition respectively, and the input places and the output places are connected by directed arcs; two branch transitions are created at the judgment node corresponding to the conditional branch, and an independent place and directed arc are created for each branch transition; branch places are created for parallel branches, connected to concurrent transitions, and synchronization places are created to merge parallel branches; a conditional transition is created at the loop entrance corresponding to the loop branch, and if the conditional transition is triggered, the token contained in the input place of the conditional transition is returned to the loop body, otherwise it exits.
7. A flow chart-based intelligent recognition system for general structure of MOM software, characterized by: include: Flowchart drawing module, used to draw MOM flowcharts for various business processes; A topology analysis module is used to analyze the topology structure of the MOM flow chart; A MOM-Petri net mapping module, for mapping the MOM flow chart into a MOM-Petri net; The general structure identification module is used to identify the general structure of MOM software according to the MOM-Petri net.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for intelligently identifying the general structure of MOM software based on a flowchart according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for intelligently identifying the general structure of MOM software based on a flowchart according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product includes a computer program, which, when executed by a computer device, is used to implement the flowchart-based MOM software general structure intelligent identification method according to any one of claims 1 to 6.