A manufacturing process template intelligent selection method based on field matching and directed graph determination
Patent Information
- Application Number
- CN202610667062.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]针对现有制造工艺模板选择过程中人工依赖程度高、多条件匹配精度不足以及判定规则固化更新困难的问题,本申请提供一种基于字段匹配与有向图判断的制造工艺模板智能选择方法,以期在复杂约束条件下实现唯一适配模板的自动精准辨识,提升工艺编制前置环节的效率与可靠性
第一,选择精度提高。通过先执行输入字段种类与数量的严格比对,再结合有向图进行多条件综合逻辑判定,形成双重筛选机制,有效避免因判定条件单一而造成的误选或漏选,确保最终选定模板与生产任务需求完全匹配。
Smart Images

Figure CN122595407A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of intelligent process generation technology, specifically involving an intelligent selection method for manufacturing process templates based on field matching and directed graph judgment. Background Technology
[0002] In the field of manufacturing process specification development, especially in the machining process design of aerospace tubular parts, the selection of process templates is the primary factor determining the quality and efficiency of subsequent process content generation. Due to the diverse attributes of parts and the complexity of machining requirements, manufacturing enterprises typically establish a process template library containing a large number of typical processes to cover different production task scenarios. When faced with a specific production task, how to quickly and accurately select the unique process template that best matches the task requirements from a vast template library is a fundamental problem that needs to be addressed first in the process of intelligent process generation.
[0003] Currently, the commonly used methods in engineering practice rely on the personal experience of process designers for manual judgment and selection, or on a few simple screening rules based on hard-coded logic preset in the system. Manual selection requires process engineers to compare part feature information with template applicability conditions one by one. As the template library expands and the complexity of judgment conditions increases, manual operation not only becomes significantly more time-consuming but also prone to errors and omissions due to cognitive oversights or subjective biases, thus affecting the accuracy of subsequent process documents. Hard-coded logic-based rule screening methods typically perform precise matching or simple classification screening based on only a few key fields (such as part type codes or model identifiers). When dealing with multi-dimensional and multi-level process constraints, such methods often fail to adequately granularize the rules, resulting in multiple candidate templates that are formally compliant but not entirely applicable, or they may miss actually usable templates due to overly strict rule settings. Furthermore, hard-coded judgment logic is tightly coupled with program code; once process specifications or template applicability conditions change, adjustments must be made by modifying the program source code, resulting in high system maintenance costs and hindering the dynamic updating and reuse of process knowledge.
[0004] In summary, existing process template selection methods suffer from problems such as strong reliance on manual intervention, limited matching accuracy, and insufficient flexibility in rule updates in complex manufacturing scenarios. Summary of the Invention
[0005] To address the problems of high reliance on manual labor, insufficient accuracy in multi-condition matching, and difficulty in updating and solidifying judgment rules in the existing manufacturing process template selection process, this application provides an intelligent selection method for manufacturing process templates based on field matching and directed graph judgment, aiming to achieve automatic and accurate identification of uniquely suitable templates under complex constraints, thereby improving the efficiency and reliability of the pre-process preparation stage.
[0006] To achieve the above technical objectives, this application specifically employs the following technical solution: In one aspect of this application, a method for intelligent selection of manufacturing process templates based on field matching and directed graph judgment is provided, comprising the following steps: S1. Obtain key attribute information of the task to be produced, wherein the key attribute information includes multiple input fields and corresponding field values; S2. Traverse the preset process template library, match the types and quantities of input fields provided by the production task with the types and quantities of required input fields predefined in each process template in the process template library, and filter out at least one process template that matches both the types and quantities of input fields to form a candidate template set. S3. When the candidate template set contains multiple candidate templates, obtain a preset directed graph corresponding to each candidate template; wherein, the directed graph includes at least one judgment node and a directed path terminating at a template node, the judgment node is used to perform logical judgment based on the input field value and output a true value or a false value; S4. For each candidate template, traverse the corresponding directed graph, solve the output value of each judgment node in the directed graph based on the key attribute information of the task to be produced, and determine the activation status of the candidate template based on the output value of all judgment nodes on the directed path. S5. Based on the activation status of each candidate template, determine and output the final selected unique process template from the candidate template set.
[0007] In one implementation, before obtaining the preset directed graph corresponding to each of the candidate templates in step S3, the method further includes: Determine the number of elements in the candidate template set; If the quantity is one, then the candidate template will be directly used as the only process template to be selected and output. If the number is greater than one, continue with the step of obtaining the directed graph.
[0008] In one implementation, step S4, which involves traversing the directed graph corresponding to each candidate template, includes: Perform topological sorting on the directed graph corresponding to the candidate template to obtain an ordered sequence of nodes in the directed graph; If a cycle exists in the directed graph that prevents topological sorting, the candidate template is discarded.
[0009] In one implementation, step S4, which involves solving for the output values of each decision node in the directed graph based on the key attribute information of the task to be produced, and determining the activation status of the candidate template based on the output values of all decision nodes on the directed path, includes: Create an intermediate process set and store the key attribute information of the task to be produced as initial data into the intermediate process set; According to the ordered sequence obtained by the topological sorting, each of the judgment nodes is called and executed in sequence, wherein the current data of the intermediate process set is used as input, the logical judgment of the judgment node is executed, and the output value of the judgment node is incorporated into the intermediate process set; After traversing a complete directed path pointing to the template node, check the output values of all decision nodes on that path; If the output values of all judgment nodes are true, then the activation status of the candidate template is determined to be enabled. If the output value of any judgment node is false, then the activation status of the candidate template is determined to be disabled.
[0010] In one implementation, step S5 includes: Add all candidate templates with an enabled status to a result set; Determine the number of templates in the result set; If the number of templates in the result set is one, then that template is output as the only process template to be selected in the end. If the number of templates in the result set is zero, a prompt indicating that there are no selectable templates will be issued; If the number of templates in the result set is greater than one, a prompt will be issued indicating that there are multiple selectable templates.
[0011] In one implementation, the directed graph is predefined and edited by the user, wherein the decision node encapsulates a conditional decision formula, which is used to calculate and output a true or false value based on field values obtained from the input data table.
[0012] In one implementation, the key attribute information of the task to be produced is derived from an input data table, and the directed graph includes a data table input node for reading corresponding field values from the input data table, and the data table input node is connected to the judgment node.
[0013] In another aspect of this application, a manufacturing process template intelligent selection device based on field matching and directed graph judgment is provided, including a processor and a memory. The memory stores a computer program, and when the processor executes the computer program, it implements the manufacturing process template intelligent selection method based on field matching and directed graph judgment.
[0014] In another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the intelligent selection method for manufacturing process templates based on field matching and directed graph judgment.
[0015] The beneficial effects of this application are as follows: First, the selection accuracy is improved. By first performing a strict comparison of the types and quantities of input fields, and then combining this with a directed graph to perform multi-condition comprehensive logical judgment, a dual screening mechanism is formed. This effectively avoids misselection or omission caused by a single judgment condition, ensuring that the final selected template is a perfect match with the production task requirements.
[0016] Second, efficiency is improved. The entire template matching process is executed automatically by the system, without the need for manual intervention by process engineers. Especially when the process template library is large and the judgment conditions are complex, the method can still complete the traversal and judgment in a short time, significantly reducing the preparation time before process specification compilation.
[0017] Third, the rules are flexible and scalable. A directed graph structure is used to visually model the template activation conditions, making the judgment logic clear and intuitive. Process engineers can update the applicable rules for the template simply by editing the nodes and conditional expressions in the graph. The new rules take effect immediately, enhancing the system's ability to adapt to changes in process knowledge without requiring modifications to the underlying program code.
[0018] Fourth, the results are highly deterministic. The method has a clear handling mechanism for the abnormal situation where the number of candidate templates is zero or greater than one, which can promptly issue prompts to avoid outputting erroneous process documents under uncertain conditions and ensure the reliability and consistency of subsequent process generation processes. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a method for intelligent selection of manufacturing process templates in one embodiment of this application; Figure 2 It is a directed graph of the color circle template in the embodiments of this application. Detailed Implementation
[0020] The technical solution of this application will be clearly and completely described below with reference to specific embodiments. However, those skilled in the art will understand that the embodiments described below are only some embodiments of this application, not all embodiments, and are only used to illustrate this application, and should not be regarded as limiting the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] To address the problems of low efficiency and error-proneness in manual selection, insufficient accuracy of simple field matching, and difficulty in updating hard-coded rules in existing technologies, this application proposes a two-layer screening and judgment mechanism. The first layer rapidly narrows down the candidate range from the template library through precise comparison of field types and quantities. The second layer introduces an editable directed graph model to dynamically solve the activation conditions of candidate templates. The directed graph uses judgment nodes to express the hierarchical relationship between process constraints, reasoning the truth value of each condition along the directed path and finally determining whether the template is activated. This integrates static rule matching with dynamic logical reasoning, ensuring the uniqueness and accuracy of the selection results while giving the judgment rules flexible configuration capabilities.
[0022] In one specific implementation, a method for intelligently selecting manufacturing process templates based on field matching and directed graph judgment is described, referring to... Figure 1 As shown, it includes the following steps: S1. Obtain the key attribute information of the task to be produced. The key attribute information includes multiple input fields and their corresponding field values.
[0023] Specifically, the system first receives or reads the digital description file of the production task to be processed. The digital description file of the production task contains multiple technical parameters and feature identifiers directly related to the part processing or assembly.
[0024] The system extracts key attribute information contained in the production task through a preset data interface or human-computer interaction interface. This key attribute information exists in the form of structured data, specifically a data set composed of input fields and their corresponding field values. Input fields refer to parameter names characterizing the physical properties, geometric dimensions, material type, process requirements, or inspection standards of a part. Field values refer to the specific numerical values, text descriptions, or enumerated options corresponding to the input field names. For example, when the production task involves the processing of aerospace tubing, the input fields may include parameter names such as "part type," "conduit material," "outer diameter," "wall thickness," "whether it includes a color-coating process," "test medium type," and "test pressure value." The corresponding field values are specific content such as "assembly," "stainless steel," "12 mm," "1 mm," "yes," "hydraulic oil," and "15 MPa." The types and number of input fields included in the key attribute information are determined by the technical requirements of the actual production task.
[0025] After extracting key attribute information, the system organizes the input fields and their values into a data format that can be used by subsequent processing modules. One possible form of this data format is an input data table. The input data table records the mapping relationship between each set of input field names and their values in rows or columns.
[0026] S2. Traverse the preset process template library, match the types and quantities of input fields provided by the production task with the types and quantities of required input fields predefined in each process template in the process template library, and filter out at least one process template that matches both the types and quantities of input fields to form a candidate template set.
[0027] Traversing the template library All elements in the input data are filtered to select all templates that meet the specified criteria, forming a set. .
[0028] The process template library The process template library is pre-stored in the data storage unit of the process design system. It contains multiple process templates, each corresponding to a structured description of a specific type of process procedure. (For the process template library...) Each process template in the system is pre-associated with a template definition file, which clearly records the types and quantities of input fields required to apply the corresponding process template. The required input field types refer to the list of basic parameter names that constitute the conditions for generating a complete process specification, and the required input field quantity refers to the total number of parameter items contained in the list of basic parameter names.
[0029] The system uses the process template library The system sequentially reads the template definition files of each process template, extracting the set of required input field types and the required number of input fields pre-declared for each process template. Simultaneously, the system obtains the key attribute information of the task to be produced, output from step S1. This key attribute information contains the actual set of input field types and the number of input fields provided by the task to be produced. The set of input field types consists of all input field names appearing in the key attribute information of the task to be produced, and the number of input fields is the total number of input fields included in the key attribute information of the task to be produced.
[0030] When the system performs matching judgment, it targets the process template library. For each process template being iterated, two comparison operations are performed sequentially. The first comparison operation is an equivalence check of the input field type set: the system checks whether the actual set of input field types provided by the production task is completely consistent with the set of required input field types declared in the process template being iterated, that is, the field name elements contained in the two sets are exactly the same, and there are no missing fields or redundant fields. The second comparison operation is an equivalence check of the input field quantity value: the system checks whether the actual quantity value of the input fields provided by the production task is equal to the quantity value of the required input fields declared in the process template being iterated.
[0031] The system confirms that the traversed process template meets the field matching condition only if, for a given traversed process template, both of the above comparison operations result in a positive judgment. The process template that meets the field matching condition is marked as a qualified template by the system and added to the candidate template set. If any comparison operation results in a negative decision, the system abandons the process template being traversed and continues with the process template library. The next process template in the process performs the same matching judgment process.
[0032] The system completes the process template library After traversing all process templates, a candidate template set is obtained. Candidate template set It contains all process templates that strictly match the production task in terms of the type and number of input fields. Candidate template set. As the output of the first-level screening, it is passed to the subsequent directed graph judgment steps for further precise selection.
[0033] It should be noted that if the candidate template set If the number of elements in the database is zero, meaning that no process template is found to meet the field matching conditions after the traversal, the system determines that the current production task is in the process template library. If no matching template is found, the system will output a message indicating that no template is available and terminate the template selection process. If the candidate template set... If the number of elements in the set is one, the system determines that a unique matching template has been determined, and the system will set the candidate template set accordingly. The only process template in the candidate template set is returned as the final selection result, and the template selection process is terminated. If the number of elements in the input field is greater than one, the system determines that there are multiple candidate process templates that match the input fields. The system will then initiate the subsequent directed graph judgment process to determine the best applicable template.
[0034] S3. When the candidate template set contains multiple candidate templates, obtain a preset directed graph corresponding to each candidate template.
[0035] Specifically, if the element count is greater than one, it indicates that after field matching and filtering, at least two process templates meet the basic matching conditions of the type and quantity of input fields. However, differences in the specific field values of the production task may lead to differences in the applicability of different process templates to deeper process constraints. In this case, the system initiates an activation condition determination mechanism based on a directed graph to further identify the process template that best matches the actual process requirements of the production task from multiple candidate templates.
[0036] The system targets the candidate template set For each candidate template, the directed graph structure data pre-associated with and stored with the candidate template is obtained. The directed graph structure data is stored in the extended configuration area of the process template library or in an independent directed graph model library, and a one-to-one mapping relationship is established between each directed graph and a specific process template.
[0037] A directed graph consists of several nodes and directed edges connecting the nodes. Node types include at least two categories: decision nodes and template nodes. Decision nodes are processing units with logical operation capabilities. Internally, each decision node encapsulates a decision expression or function that performs Boolean operations based on the input field values. The input data for decision nodes comes from the field values of the corresponding input fields in the key attribute information of the task to be produced. The decision node calculates and evaluates the field values according to preset decision logic and outputs a true or false value. A true value indicates that the field value of the task to be produced meets the process activation conditions represented by the decision node, while a false value indicates that the field value of the task to be produced does not meet the process activation conditions represented by the decision node.
[0038] A template node is a terminal node type in a directed graph, corresponding to the current candidate template itself. Starting from the initial input node of the directed graph, passing through one or more decision nodes, and finally reaching the template node, the sequence of nodes traversed and the directed edges form a complete directed path. The output of each decision node on the directed path collectively determines whether the template node can be triggered. Only when the outputs of all decision nodes on the directed path are true, is the template node connected to the end of the directed path deemed to meet the activation condition.
[0039] The directed graph structure also includes input data nodes. These input data nodes establish data reference relationships with the key attribute information of the task to be produced, providing the necessary field values to subsequent connected decision nodes. Input data nodes do not perform logical operations; they only serve as the starting point for data transfer.
[0040] S4. For each candidate template, traverse the corresponding directed graph, solve the output value of each judgment node in the directed graph based on the key attribute information of the task to be produced, and determine the activation status of the candidate template based on the output value of all judgment nodes on the directed path.
[0041] In some embodiments, the step of traversing the corresponding directed graph for each candidate template includes: performing a topological sort on the directed graph corresponding to the candidate template to obtain an ordered sequence of nodes in the directed graph; if there is a cycle in the directed graph that prevents topological sorting, then the candidate template is discarded.
[0042] In some embodiments, the step of solving for the output values of each decision node in the directed graph based on the key attribute information of the task to be produced, and determining the activation status of the candidate template based on the output values of all decision nodes on the directed path, includes: An intermediate process set is created, and the key attribute information of the task to be produced is stored in the intermediate process set as initial data. Following the ordered sequence obtained by the topological sorting, each judgment node is called and executed sequentially. The current data of the intermediate process set is used as input to execute the logical judgment of the judgment node, and the output value of the judgment node is incorporated into the intermediate process set. After traversing a complete directed path pointing to the template node, the output values of all judgment nodes on the path are checked. If the output values of all judgment nodes are true, the candidate template is determined to be enabled. If the output value of any judgment node is false, the candidate template is determined to be disabled.
[0043] Specifically, the system analyzes the candidate template set. Each candidate template in the algorithm undergoes a directed graph traversal and an activation status determination operation in sequence. The specific process is as follows: 1) Create a result set Simultaneously traverse the set For each element in the selection, Perform the following steps; 2) For elements Call the topological sorting function Determine element Does the corresponding directed graph structure contain cycles? If a cycle exists, topological sorting cannot be completed, and the system discards the element. And terminate targeting element The subsequent processing; if no cycle exists, the topological sorting is successfully executed, resulting in an ordered sequence of nodes. Continue with the subsequent steps; 3) Create an intermediate process set The key attribute information of the task to be produced is then used as initial data and assigned to the intermediate process set. At the same time, according to the ordered sequence The order of the elements in the sequence is determined by iterating through the sequence. For each element in the selection, Perform the following steps; 4) Using intermediate process sets The current data content is used as the input parameter to call the evaluation function. Selected elements Perform logical judgment operations; evaluate functions Based on elements The encapsulated decision expression calculates the input data and generates a Boolean output; the evaluation function... The generated output results are incorporated into the intermediate process set. To update the intermediate process set Data status; 5) In an ordered sequence After all elements have been traversed, the function to obtain the termination status is called. For the intermediate process set The system checks the output corresponding to the termination node; if the output of the termination node is the disabled flag "[D]", the system discards the element. If the output of the termination node is the enable flag "[E]", then the system will... Merge into result set middle.
[0044] The template selection algorithm based on field matching and directed graph judgment in this application is shown in Table 1.
[0045] Table 1. Template selection algorithm based on field matching and directed graph judgment.
[0046] S5. Based on the activation status of each candidate template, determine and output the final selected unique process template from the candidate template set.
[0047] Get the result set The number of elements contained in the result set. The element count reflects the total number of process templates that simultaneously satisfy both the field matching condition and the directed graph activation condition. The system executes the corresponding processing branch based on the different values of the element count.
[0048] Branch 1: Result Set The element count in the middle is equal to one.
[0049] Candidate template set There exists one and only one candidate template whose output value on all decision nodes along the directed path pointing to the template node in the associated directed graph is true. This indicates that among the multiple candidate templates initially selected through field matching, only one candidate template's deep-level process activation conditions perfectly match the specific field values of the task to be produced. The system will then compile the result set. The only process template included in the template is determined as the final selected process template. The system returns the template identifier, template name, template content, or the template's storage index in the process template library as the final output of the template selection process. The template selection process terminates normally, and the subsequent process specification generation module will perform process parameter filling and process document generation operations based on the final selected process template.
[0050] Branch 2: Result Set The element count in the middle is zero.
[0051] Candidate template set No candidate template can be verified by all decision nodes in the corresponding directed graph. A possible reason is: the candidate template set... In the directed graph solving process of step S4, if at least one decision node in the candidate template set outputs a false value, all candidate templates will be marked as disabled. Alternatively, the candidate template set... All candidate templates have directed graphs containing cycles, and are therefore discarded during the topological sorting stage. Regardless of the specific reason, the resulting set... The fact that it is an empty set indicates that in the existing process template library Although there are process templates with input field types and quantities that match the production task, the specific field values of the production task cannot meet the activation conditions of any of these process templates. The system determines that template selection has failed and sends a message to the user or the upper-level calling module indicating that no template is available. The message may include the identification information of the production task, a summary of the input fields and their values, and information about the judgment node indicating the matching failure, to assist process personnel in maintaining the template library or verifying the production task data. The template selection process terminates abnormally.
[0052] Branch 3: Result Set The element count is greater than one.
[0053] Candidate template set There are at least two candidate templates, both of which are determined to be enabled after the directed graph enable condition judgment. This indicates that the key attribute information of the task to be produced simultaneously meets all the enable conditions of multiple process templates, and there are multiple applicable process procedure templates at the logical level. This situation may be caused by overlapping process template enable condition definitions or the task data to be produced being in a boundary state.
[0054] Since the method in this application aims to achieve automatic and unique selection of process templates to ensure the determinism and executability of subsequent process specification generation, when multiple templates simultaneously meet the conditions, the system does not perform random selection or priority ranking, but instead classifies this situation as selection ambiguity. The system sends a prompt message to the user or the upper-level calling module indicating that multiple optional templates exist. The prompt message indicating that multiple optional templates exist can list a set of results. The system contains the names or identifiers of all templates, as well as the directed path information corresponding to each template, so that process engineers can make manual decisions based on actual working conditions or fine-tune the template activation conditions. The template selection process terminates abnormally.
[0055] In some embodiments, the directed graph is predefined and edited by the user, wherein the decision node encapsulates a conditional decision formula, which is used to calculate and output a true or false value based on field values obtained from the input data table.
[0056] The directed graph serves as a structured model for enabling process templates, and is pre-built and maintained by the user through the graphical interface provided by the system. When defining a directed graph, the user performs node creation, attribute configuration, and directed edge connection operations.
[0057] Node types include input data nodes, decision nodes, and template nodes. Input data nodes reference the input field names in the key attribute information of the task to be produced. Decision nodes encapsulate conditional judgment formulas, which consist of input field name references, comparison operators, logical operators, and constant values. These formulas are used to perform logical evaluation based on the input field values and output Boolean results. Template nodes correspond to specific process templates. Nodes are connected by directed edges to form directed paths from input data nodes through several decision nodes to template nodes. After the user completes the directed graph editing, the system performs legality verification on the structure and persists it, establishing a connection between the directed graph and the process template. During template selection, the system loads the directed graph structure data corresponding to the candidate templates for subsequent topology sorting and evaluation. Users can adjust the process template activation conditions by editing the directed graph without modifying the program code, thereby improving the flexibility and maintainability of rule configuration.
[0058] In some embodiments, the key attribute information of the task to be produced comes from an input data table, and the directed graph includes a data table input node for reading corresponding field values from the input data table, and the data table input node is connected to the judgment node.
[0059] The key attribute information of the task to be produced is organized in the form of an input data table, which stores the names of each input field and their corresponding values. The directed graph includes input nodes for this data table, each configured with a reference field name to read the field values of matching fields from the input data table. Input nodes do not perform logical judgments; they only serve as units for data reading and transmission. Input nodes are connected to one or more decision nodes via directed edges, providing field values to connected decision nodes as input parameters for conditional judgment formulas. This structure separates data acquisition from logical judgment, facilitating the reuse of the directed graph model in different data source scenarios.
[0060] Example This embodiment uses the aerospace pipe fitting processing technology as an example to illustrate the specific execution process of the intelligent selection method for process templates based on field matching and directed graph judgment. The key attribute information of the task to be produced is organized in the form of an input data table. The input fields and corresponding field values contained in the input data table are shown in Table 2 below: Table 2 Input Data Table for Aviation Pipe Fitting Processing Example
[0061] Based on the template selection algorithm that combines field matching and directed graph analysis, the execution process includes the following steps: Step S1: Traverse the process template library All process templates were compared with the 17 input fields and all input field names contained in the input data table against the types and quantities of input fields pre-declared in each process template. After matching and filtering, two process templates were found that met the condition of identical input field types and quantities, forming a candidate template set. .
[0062] Step S2: Determine the candidate template set If the length is 2, which is greater than 1, continue with the subsequent directed graph determination steps.
[0063] Step S3: Create a result set Simultaneously traverse the candidate template set The two candidate templates are used to iterate over each candidate template element. Perform the subsequent steps in sequence.
[0064] Step S4: Select candidate template elements The corresponding directed graph calls the topological sorting function. Perform topological sorting to obtain an ordered sequence of nodes corresponding to the directed paths from the judgment node to the template node. The directed graph involved in this example is as follows: Figure 2As shown, it includes a data table input node, a color circle process judgment node, and a template node. The data table input node provides the color circle (width) field value and the color circle (narrow) field value to the color circle process judgment node. After the color circle process judgment node is judged, it is connected to the template node.
[0065] Step S5: Create an intermediate process set And assign all input fields and their values from the input data table to the intermediate process set. Use this as initial data. Then, traverse the ordered sequence. The elements in the sequence, in this example, are ordered sequences. It includes a "color circle process judgment" node.
[0066] Step S6: Using the intermediate process set The evaluation function is called as an input parameter. Execute the "Coloring Ring Process Judgment" node. The evaluation function reads the field values corresponding to the coloring ring attribute column in the input data table, i.e., the coloring ring (width) field value is "sky blue" and the coloring ring (narrow) field value is "red". It performs logical evaluation based on the conditional judgment formula encapsulated in the coloring ring process judgment node, obtains the true value output result, and merges the true value output result into the intermediate process set. This step determines that one candidate template passes the node verification test using the color-coded circle process.
[0067] Step S7: Call the termination status acquisition function Check the intermediate process set The output of the termination node. Upon inspection, the termination node output shows the enable flag "[E]", indicating a candidate template element. Since the conditions for enabling all decision nodes in the directed graph are met, the candidate template element is selected. Merge into result set middle.
[0068] Step S8: Determine the result set The number of elements in the result set. After judgment, the result set... When the length of the result set is equal to 1, the system will... The only process template included in the template will be returned as the final selected process specification template. The final selected template is the assembly process specification template including the color-coated ring, and the process contents included in the template are shown in Table 3 below: Table 3 Results of Process Specification Template Selection
[0069] Although the embodiments of this application have been described above in conjunction with the accompanying drawings, this application is not limited to the specific embodiments and application fields described above. The specific embodiments described above are merely illustrative and instructive, not restrictive. Those skilled in the art can make many other forms based on the guidance of this specification and without departing from the scope of protection of the claims of this application, and these are all within the scope of protection of this application.
Claims
1. A method for intelligent selection of manufacturing process templates based on field matching and directed graph judgment, characterized in that, Includes the following steps: S1. Obtain key attribute information of the task to be produced, wherein the key attribute information includes multiple input fields and corresponding field values; S2. Traverse the preset process template library, match the types and quantities of input fields provided by the production task with the types and quantities of required input fields predefined in each process template in the process template library, and filter out at least one process template that matches both the types and quantities of input fields to form a candidate template set. S3. When the candidate template set contains multiple candidate templates, obtain a preset directed graph corresponding to each candidate template; wherein, the directed graph includes at least one judgment node and a directed path terminating at a template node, the judgment node is used to perform logical judgment based on the input field value and output a true value or a false value; S4. For each candidate template, traverse the corresponding directed graph, solve the output value of each judgment node in the directed graph based on the key attribute information of the task to be produced, and determine the activation status of the candidate template based on the output value of all judgment nodes on the directed path. S5. Based on the activation status of each candidate template, determine and output the final selected unique process template from the candidate template set.
2. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 1, characterized in that, Before obtaining the preset directed graph corresponding to each of the candidate templates in step S3, the method further includes: Determine the number of elements in the candidate template set; If the quantity is one, then the candidate template will be directly used as the only process template to be selected and output. If the number is greater than one, continue with the step of obtaining the directed graph.
3. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 1, characterized in that, Step S4, which involves traversing the directed graph corresponding to each candidate template, includes: Perform topological sorting on the directed graph corresponding to the candidate template to obtain an ordered sequence of nodes in the directed graph; If a cycle exists in the directed graph that prevents topological sorting, the candidate template is discarded.
4. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 3, characterized in that, Step S4, which involves calculating the output values of each decision node in the directed graph based on the key attribute information of the task to be produced, and determining the activation status of the candidate template based on the output values of all decision nodes on the directed path, includes: Create an intermediate process set and store the key attribute information of the task to be produced as initial data into the intermediate process set; According to the ordered sequence obtained by the topological sorting, each of the judgment nodes is called and executed in sequence, wherein the current data of the intermediate process set is used as input, the logical judgment of the judgment node is executed, and the output value of the judgment node is incorporated into the intermediate process set; After traversing a complete directed path pointing to the template node, check the output values of all decision nodes on that path; If the output values of all judgment nodes are true, then the activation status of the candidate template is determined to be enabled. If the output value of any judgment node is false, then the activation status of the candidate template is determined to be disabled.
5. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 1, characterized in that, Step S5 includes: Add all candidate templates with an enabled status to a result set; Determine the number of templates in the result set; If the number of templates in the result set is one, then that template is output as the only process template to be selected in the end. If the number of templates in the result set is zero, a prompt indicating that there are no selectable templates will be issued; If the number of templates in the result set is greater than one, a prompt will be issued indicating that there are multiple selectable templates.
6. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 1, characterized in that, The directed graph is predefined and edited by the user. The judgment node encapsulates a conditional judgment formula, which is used to calculate and output a true or false value based on the field values obtained from the input data table.
7. The intelligent selection method for manufacturing process templates based on field matching and directed graph judgment according to claim 1, characterized in that, The key attribute information of the task to be produced comes from the input data table. The directed graph includes a data table input node for reading the corresponding field values from the input data table. The data table input node is connected to the judgment node.
8. A manufacturing process template intelligent selection device based on field matching and directed graph judgment, comprising a processor and a memory, characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the intelligent selection method for manufacturing process templates based on field matching and directed graph judgment as described in claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the intelligent selection method for manufacturing process templates based on field matching and directed graph judgment as described in claims 1-7.