Product manufacturing method and device based on directed acyclic graph and template matching, equipment and medium
Patent Information
- Application Number
- CN202611351020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]然而,上述方式存在明显不足:一方面,人工编写效率低下,在面对工序繁多、依赖关系复杂的工艺路线时,编制周期往往长达数周甚至数月,且容易因主观疏忽而遗漏关键工序或错误设置工艺参数,准确性难以保证;另一方面,静态的操作规程与流程模型难以适应工艺路线的动态变更,工艺一经调整便需重新编制,灵活性较差;此外,不同人员编写风格各异,致使文件缺乏统一标准,且手动搭建的流程模型难以准确反映各工序的执行顺序与条件约束逻辑,规范性不足,制约了生产管理水平的进一步提升
[0016]可见,本申请中,获取目标产品的工艺路线数据,并对所述工艺路线数据进行解析,以将所述工艺路线数据中的多个工序节点及其依赖关系编码为有向无环图;基于拓扑排序算法对所述有向无环图中的工序节点进行优先级排序,得到结构化的目标节点序列;基于所述目标节点序列确定所述目标产品的工艺参数特征向量,并构建所述目标产品的流程模型;所述工艺参数特征向量包括工序序列特征、物料清单特征和条件约束特征;所述流程模型用于表征各工序节点的工序执行顺序及条件判断逻辑;基于预设模板匹配算法将所述工艺参数特征向量与预设文件模板库中各模板的特征向量进行匹配,以确定所述目标产品对应的目标模板;基于所述流程模型和所述目标模板,生成所述目标产品的生产制造操作规程,以便基于所述生产制造操作规程,对所述目标产品的生产制造过程进行控制。这样一来,将工序节点及其依赖关系编码为有向无环图并进行拓扑排序,得到结构化节点序列,从而准确表征复杂工艺路线的执行顺序与条件判断逻辑,克服人工梳理易疏漏的问题;再以工艺参数特征向量与模板库自动匹配生成操作规程,替代人工逐条编写与反复比对,缩短规程编制周期、降低人为错误率,并保证输出文件的标准化与规范性,实现生产制造过程高效、准确、规范的自动化控制。
Smart Images

Figure CN123015203A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to product manufacturing methods, apparatus, equipment and media based on directed acyclic graphs and template matching. Background Technology
[0002] In modern manufacturing, the development of operating procedures and the management of production processes are crucial for ensuring production efficiency and product quality. As the manufacturing industry moves towards intelligent and refined processes, flexible production models with multiple varieties and small batches are becoming increasingly common. Enterprises are placing higher demands on the efficiency, accuracy, and flexibility of operating procedure development and process management.
[0003] In existing technologies, the formulation of production operation procedures and the construction of process models mainly rely on manual writing and manual construction. Technical personnel need to write down the operation steps, precautions and related specifications one by one according to the production process requirements and their experience and knowledge, and manually draw flowcharts to present the logical relationships between each process. At the same time, the correlation between the operation procedures and the process model often relies on repeated manual comparison and adjustment to ensure that the two are consistent.
[0004] However, the above methods have obvious shortcomings: on the one hand, manual writing is inefficient. When faced with a process route with many procedures and complex dependencies, the writing cycle often takes several weeks or even months, and it is easy to miss key procedures or set incorrect process parameters due to subjective negligence, making it difficult to guarantee accuracy; on the other hand, static operating procedures and process models are difficult to adapt to dynamic changes in the process route. Once the process is adjusted, it needs to be rewritten, which is not flexible enough; in addition, different people have different writing styles, resulting in a lack of unified standards for documents, and manually built process models cannot accurately reflect the execution sequence and condition constraint logic of each procedure, which is not standardized enough and restricts the further improvement of production management level.
[0005] Therefore, improving production efficiency, operational accuracy, and process standardization in the product manufacturing process is a problem that needs to be solved. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a product manufacturing method, apparatus, equipment, and medium based on directed acyclic graphs and template matching, which can improve manufacturing efficiency. The specific solution is as follows: In a first aspect, this application discloses a product manufacturing method based on directed acyclic graphs and template matching, comprising: The process route data of the target product is obtained and parsed to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph. The process nodes in the directed acyclic graph are prioritized based on the topological sorting algorithm to obtain a structured sequence of target nodes. Based on the target node sequence, the process parameter feature vector of the target product is determined, and the process model of the target product is constructed; the process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node; The process parameter feature vector is matched with the feature vector of each template in the preset file template library based on the preset template matching algorithm to determine the target template corresponding to the target product; Based on the process model and the target template, a production and manufacturing operation procedure for the target product is generated, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
[0007] Optionally, the step of acquiring the process route data of the target product and parsing the process route data to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph includes: The process route data of the target product is obtained, and the process route data is preprocessed to obtain processed data. The data preprocessing operation includes cleaning and standardizing the process route data to remove redundant information and supplement missing fields in the process route data. Read the process sequence, bill of materials, and condition constraints from the processed data; Each process in the process sequence is identified as a process node, and the dependencies between each process node are determined based on the process sequence, the bill of materials, and the condition constraints. The process nodes and their dependencies are traversed using either a depth-first search algorithm or a breadth-first search algorithm. Each process node is treated as a node, and each dependency is treated as a directed edge, to obtain a directed acyclic graph.
[0008] Optionally, the step of prioritizing the process nodes in the directed acyclic graph based on the topological sorting algorithm to obtain a structured sequence of target nodes includes: Based on the topological sorting algorithm, the nodes are prioritized according to the dependencies between nodes in the directed acyclic graph to obtain the sorting result; The importance score of each process node in the directed acyclic graph is determined based on the preset path analysis formula, and the core process of the target product is determined from each process node according to the importance score. Based on the sorting results and the core procedures, a structured sequence of target nodes is obtained.
[0009] Optionally, determining the process parameter feature vector of the target product based on the target node sequence and constructing the process model of the target product includes: Extract process sequence features based on the process execution order of each process node in the target node sequence, and extract bill of materials features based on the bill of materials of the target product; Extract condition constraint features from the condition constraints in the process route data, and form a process parameter feature vector based on the process sequence features, the bill of materials features, and the condition constraint features; Based on the graphical modeling method and according to the process execution order of each process node in the target node sequence and the condition judgment logic between each process node, a flowchart of the target product is generated. The process execution sequence and condition judgments for each process node are marked in the flowchart to construct a process model.
[0010] Optionally, the step of matching the process parameter feature vector with the feature vectors of each template in a preset file template library based on a preset template matching algorithm to determine the target template corresponding to the target product includes: Keyword extraction is performed on the feature vector of the process parameters based on natural language processing technology to obtain a first target feature vector, and keyword extraction is performed on the feature vector of each template in the preset file template library to obtain a second target feature vector; Based on the cosine similarity formula, the similarity score between the first target feature vector and the second target feature vector is determined; The template with the highest similarity score is determined as the initial template corresponding to the target product, and the content of the initial template is adjusted according to the conditional constraint features in the process parameter feature vector to obtain the target template.
[0011] Optionally, generating the production and manufacturing operation procedures for the target product based on the process model and the target template includes: Based on the process execution sequence and condition judgment logic in the process model, fill the corresponding process step information and condition branch information into the target template; Based on the key processes and special procedures marked in the process route data, determine the corresponding inspection procedures; The corresponding process document template is automatically invoked based on the condition settings in the process route data, and the process step information, the condition branch information, the inspection procedure, and the process document template are aggregated into the production and manufacturing operation procedure for the target product.
[0012] Optionally, the method further includes: The document templates are classified according to product type or process stage to obtain several template categories. Class codes and content parameters are set for each template category to obtain configuration data for each type of template. Based on the configuration data, corresponding process document templates are pre-set for various templates, and the hierarchical relationship between different levels of templates is set to obtain a template library structure with hierarchical association. Based on the template library structure, version numbers are automatically generated for various templates, and clause codes are generated or filled in according to the built-in regulatory requirement clause code table to obtain the preset document template library.
[0013] Secondly, this application discloses a product manufacturing apparatus based on directed acyclic graphs and template matching, comprising: The route parsing module is used to acquire the process route data of the target product and parse the process route data to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph. The node sequence construction module is used to prioritize the process nodes in the directed acyclic graph based on the topological sorting algorithm to obtain a structured target node sequence. The model building module is used to determine the process parameter feature vector of the target product based on the target node sequence, and to construct the process model of the target product; the process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node; The template matching module is used to match the feature vector of the process parameters with the feature vector of each template in the preset file template library based on a preset template matching algorithm, so as to determine the target template corresponding to the target product; The procedure generation module is used to generate the production and manufacturing operation procedure for the target product based on the process model and the target template, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
[0014] Thirdly, this application discloses an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned product manufacturing method based on directed acyclic graphs and template matching.
[0015] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned product manufacturing method based on directed acyclic graphs and template matching.
[0016] As can be seen, in this application, the process route data of the target product is obtained and parsed to encode multiple process nodes and their dependencies into a directed acyclic graph (DAG). The process nodes in the DAG are prioritized using a topological sorting algorithm to obtain a structured target node sequence. Based on the target node sequence, the process parameter feature vector of the target product is determined, and a process model of the target product is constructed. The process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features. The process model is used to characterize the process execution order and condition judgment logic of each process node. Based on a preset template matching algorithm, the process parameter feature vector is matched with the feature vectors of each template in a preset file template library to determine the target template corresponding to the target product. Based on the process model and the target template, a production and manufacturing operation procedure for the target product is generated to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure. In this way, process nodes and their dependencies are encoded into a directed acyclic graph and topologically sorted to obtain a structured node sequence, which accurately represents the execution order and condition judgment logic of complex process routes, overcoming the problem of easy omissions in manual sorting. Then, the process parameter feature vectors are automatically matched with the template library to generate operating procedures, replacing manual writing and repeated comparison, shortening the procedure preparation cycle, reducing the human error rate, and ensuring the standardization and normalization of output documents, so as to realize efficient, accurate and standardized automated control of the production and manufacturing process. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This application discloses a product manufacturing method based on directed acyclic graphs and template matching. Figure 2 This is a schematic diagram of a product manufacturing apparatus based on directed acyclic graphs and template matching disclosed in this application; Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] In modern manufacturing, with increasing global competition and diversified market demands, enterprises are increasingly eager to improve production efficiency and standardization. Automatic generation of operating procedures and process model construction, as crucial components of production process management, directly impact enterprise production efficiency and product quality. Currently, many enterprises still rely on traditional methods of manually writing operating procedures and building static process models in production process management. These methods not only struggle to adapt to rapidly changing market demands but also easily lead to information silos, thus affecting overall operational efficiency. Therefore, this application will specifically introduce a product manufacturing method based on directed acyclic graphs and template matching, which can solve the above problems.
[0021] See Figure 1 As shown in the figure, this application discloses a product manufacturing method based on directed acyclic graphs and template matching, including: Step S11: Obtain the process route data of the target product and parse the process route data to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph.
[0022] In this embodiment, the step of acquiring the process route data of the target product and parsing the process route data to encode multiple process nodes and their dependencies into a directed acyclic graph includes: acquiring the process route data of the target product and performing data preprocessing operations on the process route data to obtain processed data; the data preprocessing operations include cleaning and standardizing the process route data to remove redundant information and supplementing missing fields; reading the process sequence, bill of materials, and condition constraints from the processed data; determining each process in the process sequence as a process node, and determining the dependencies between each process node according to the process sequence, the bill of materials, and the condition constraints; traversing each process node and its dependencies based on a depth-first search algorithm or a breadth-first search algorithm, using each process node as a node and each dependency as a directed edge to obtain a directed acyclic graph. It should be noted that the core of the process route parsing algorithm lies in the decomposition and reconstruction of complex production process paths. In this embodiment, graph theory algorithms such as Depth-First Search (DFS) or Breadth-First Search (BFS) are used to transform the process nodes and their dependencies in the process route into structured data. Specifically, the algorithm first reads the input information of the process route, such as the process sequence, Bill of Materials (BOM), and constraints, and encodes it into a Directed Acyclic Graph (DAG). Since DAGs do not contain cycles, they can naturally represent the sequential dependencies and prerequisite relationships between processes, thereby avoiding the problems of circular dependencies or logical conflicts in the process route. In the data preprocessing stage, the system cleans and standardizes the input process route data, removes redundant information, and fills in missing fields, laying the foundation for the accurate generation of the subsequent process node set.
[0023] Step S12: Prioritize the process nodes in the directed acyclic graph based on the topological sorting algorithm to obtain a structured target node sequence.
[0024] In this embodiment, the step of prioritizing the process nodes in the directed acyclic graph based on the topology sorting algorithm to obtain a structured target node sequence includes: prioritizing the nodes according to the dependencies between nodes in the directed acyclic graph based on the topology sorting algorithm to obtain a sorting result; determining the importance score of each process node in the directed acyclic graph based on a preset path analysis formula, and determining the core process of the target product from each process node according to the importance score; and obtaining a structured target node sequence based on the sorting result and the core process.
[0025] It should be noted that prioritizing process nodes based on the topological sorting algorithm in graph theory ensures that the generated process model conforms to actual production logic, meaning that any process node is arranged after all its preceding process nodes. Building upon this, this embodiment further introduces a preset path analysis formula to extract key nodes and their logical relationships from complex process route diagrams. Assume a process route contains... n If there are multiple process nodes, the path analysis formula can be expressed as: ; in, P i Indicates the first i The importance score of each process node w ij Indicate process i to process j The weighting coefficients, and d ij Indicate process i With process j The degree of correlation between them. Weighting coefficients. w ij It is usually determined by the historical execution data of the process route, while the correlation is... d ij The formula is calculated based on the input-output relationships between processes. By weighted summing of the importance scores of each process node using this formula, the system can effectively identify the core processes in the process route and combine them with the sorting results of topological sorting to obtain a structured target node sequence that satisfies dependency constraints and highlights key links, thus providing an important basis for the generation of subsequent operating procedures.
[0026] Step S13: Determine the process parameter feature vector of the target product based on the target node sequence, and construct the process model of the target product; the process parameter feature vector includes process sequence features, bill of materials features and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node.
[0027] In this embodiment, determining the process parameter feature vector of the target product based on the target node sequence and constructing the process model of the target product includes: extracting process sequence features according to the process execution order of each process node in the target node sequence, and extracting bill of materials features according to the bill of materials of the target product; extracting condition constraint features according to the condition constraints in the process route data, and forming a process parameter feature vector based on the process sequence features, the bill of materials features, and the condition constraint features; generating a flowchart of the target product based on a graphical modeling method and according to the process execution order of each process node in the target node sequence and the condition judgment logic between each process node; and marking the process execution order and condition judgment of each process node in the flowchart to construct the process model. It should be noted that, in the process of constructing the process model, to avoid a decrease in execution efficiency due to excessive complexity of the process model, this embodiment further introduces a process complexity evaluation formula to optimize the structural design of the process model. Assume a process model contains... p If there are multiple sub-processes, the process complexity evaluation formula can be expressed as: ; in, C This represents the complexity score of the entire process model. c q Indicates the first q The formula represents the number of nodes in each sub-process. Borrowing from the concept of entropy in information theory, it comprehensively reflects the overall complexity of the process model by weighted summation of the complexity of each sub-process. Based on this, the system can automatically adjust the structure when generating the process model, avoiding the problem of decreased execution efficiency due to excessive complexity, and ensuring that the constructed process model accurately represents the execution sequence and conditional judgment logic while maintaining good executability.
[0028] Step S14: Based on the preset template matching algorithm, match the feature vector of the process parameter with the feature vector of each template in the preset file template library to determine the target template corresponding to the target product.
[0029] In this embodiment, the step of matching the process parameter feature vector with the feature vectors of each template in the preset file template library based on the preset template matching algorithm to determine the target template corresponding to the target product includes: extracting keywords from the process parameter feature vector based on natural language processing technology to obtain a first target feature vector, and extracting keywords from the feature vectors of each template in the preset file template library to obtain a second target feature vector; determining the similarity score between the first target feature vector and the second target feature vector based on the cosine similarity formula; determining the template with the highest similarity score as the initial template corresponding to the target product, and adjusting the content of the initial template according to the conditional constraint features in the process parameter feature vector to obtain the target template.
[0030] It should be noted that the file template matching algorithm employs Natural Language Processing (NLP) technology. It calculates the similarity between process route data and preset content in the file template library, selects the most suitable template to generate the operating procedure document, and combines keyword extraction technology to optimize matching accuracy. In this embodiment, the similarity calculation formula is used to measure the degree of matching between the user-input process route information and the system's built-in file templates. Assuming the file template library contains... m There are 1 template, each containing a set of feature vectors. T k ={ t k1 , t k2 , ..., t kn}, then the similarity calculation formula can be defined as: ; in, S ik This represents the process route information input by the user. X ={ x 1, x 2, ..., x n} and the k The similarity score is calculated between file templates. This formula is based on the cosine similarity principle, evaluating the similarity by calculating the angle between two vectors: the smaller the angle, the closer the cosine value is to 1, indicating a better match between the process route information and the template. This matching method not only quickly locates the candidate template that best meets the user's needs from a large number of templates in a short time, but also, because the similarity calculation considers the multidimensional attributes of the template's feature vectors, its matching results have high accuracy and reliability, thus significantly improving the automation level of operating procedure generation.
[0031] This includes: classifying document templates according to product type or process stage to obtain several template categories, and setting class codes and content parameters for each template category to obtain configuration data for each type of template; pre-setting corresponding process document templates for each type of template according to the configuration data, and setting hierarchical relationships between templates at different levels to obtain a template library structure with hierarchical relationships; automatically generating version numbers for each type of template according to the template library structure, and generating or filling in clause codes according to the built-in regulatory requirement clause code table to obtain the preset document template library. It should be noted that the document template library is a core component of this application, and its design and construction method directly affects the efficiency and quality of automatic generation of operating procedures and construction of process models. In this embodiment, the design of the core document template is based on the standardization requirements of the production process. By setting data such as classification, class codes, and content parameters, it is ensured that the template can cover the requirements of different types of production processes. Among them, the classification can be divided according to product type or process stage, the class code is used to uniquely identify a certain type of template, and the content parameters include required fields, optional fields, and variable fields. The pre-built content of the process document templates covers typical document styles commonly used by enterprises, such as plans, reports, and contracts. This not only meets current regulatory requirements but also provides flexibility to adapt to potential future changes. Furthermore, the template library is designed with hierarchical relationships and logical connections between templates in mind. By setting different levels of templates, it provides layered support for complex operational processes. For example, when generating batch production records, the system can automatically call the corresponding process document template based on conditions in the process route and integrate it into the core document template, thereby improving template reusability and effectively reducing the risk of errors caused by manual intervention. Simultaneously, the template library supports preset and customized file name fields. Users can set file name suffix rules according to actual needs, further improving the applicability and scalability of the templates.
[0032] Step S15: Based on the process model and the target template, generate the production and manufacturing operation procedure for the target product, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
[0033] In this embodiment, generating the production operation procedure for the target product based on the process model and the target template includes: filling the target template with corresponding process step information and conditional branch information according to the process execution sequence and condition judgment logic in the process model; determining the corresponding inspection procedure according to the key processes and special processes marked in the process route data; automatically calling the corresponding process document template according to the condition settings in the process route data, and aggregating the process step information, the conditional branch information, the inspection procedure, and the process document template into the production operation procedure for the target product. It should be noted that this embodiment generates the operation procedure with the product and intermediate product as the core. First, the user selects the target product and its related materials (self-made attribute) from the product list provided by the system to ensure that the subsequently generated procedure matches the specific production object; second, the system filters out process documents suitable for the product according to preset conditions and uses them as the basic data for generating the process model. After generating the process model, the system automatically aggregates complete batch production records according to pre-defined rules in the file template library. This process depends on conditions set in the process route, such as inspection procedures, material grades, critical processes, and special processes. For example, when a process is marked as a critical process, the system automatically associates the corresponding inspection procedure and incorporates it into the batch production record. Furthermore, users can organize inspection, release, and other operational steps into a complete production process according to actual needs, and further optimize the standardization and controllability of the process by configuring handover and approval nodes. When images or other auxiliary materials need to be inserted, the system supports users to directly upload and embed them into the operation procedures through a graphical interface, thereby improving the readability and usability of the procedures. After completing the above operations, the system automatically generates batch production records containing all necessary information based on the configured process model and condition settings, significantly reducing the time cost of manual writing and lowering the error rate through standardized templates and automated logic.
[0034] Through practical application, this application has achieved significant technical results in improving production efficiency, enhancing operational accuracy, and strengthening process standardization. Regarding improved production efficiency, enterprises can quickly generate standardized operating procedures using the system's built-in document template library and automate process model construction using process route analysis algorithms. For example, in a pharmaceutical company's application, the time required to develop operating procedures was reduced to a very short time, significantly improving overall efficiency. Regarding improved operational accuracy, the system automatically generates precise operating steps based on process route data and combines standardized content parameters from the document template library to ensure the completeness and consistency of operating procedures. For example, in a machinery manufacturing company's application, the error rate in operating procedures decreased from a high level to an extremely low level after using the system, significantly improving operational accuracy. Regarding strengthened process standardization, enterprises can quickly generate compliant operating procedures using the system's built-in core document templates and process document templates, and manually fill in or have the system automatically generate corresponding clause codes as needed. For example, in a food processing company's application, the compliance level of its production processes was significantly improved after using the system, and product quality was also significantly enhanced.
[0035] As can be seen, in this embodiment, the process route data of the target product is acquired and parsed to encode multiple process nodes and their dependencies into a directed acyclic graph (DAG). The process nodes in the DAG are prioritized using a topological sorting algorithm to obtain a structured target node sequence. Based on the target node sequence, the process parameter feature vector of the target product is determined, and a process model of the target product is constructed. The process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features. The process model is used to characterize the process execution order and condition judgment logic of each process node. Based on a preset template matching algorithm, the process parameter feature vector is matched with the feature vectors of each template in a preset file template library to determine the target template corresponding to the target product. Based on the process model and the target template, a production and manufacturing operation procedure for the target product is generated to control the production and manufacturing process of the target product. In this way, process nodes and their dependencies are encoded into a directed acyclic graph and topologically sorted to obtain a structured node sequence, which accurately represents the execution order and condition judgment logic of complex process routes, overcoming the problem of easy omissions in manual sorting. Then, the process parameter feature vectors are automatically matched with the template library to generate operating procedures, replacing manual writing and repeated comparison, shortening the procedure preparation cycle, reducing the human error rate, and ensuring the standardization and normalization of output documents, so as to realize efficient, accurate and standardized automated control of the production and manufacturing process.
[0036] refer to Figure 2 As shown in the illustration, this application also discloses a product manufacturing apparatus based on directed acyclic graphs and template matching, comprising: The route parsing module 11 is used to acquire the process route data of the target product and parse the process route data to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph. The node sequence construction module 12 is used to prioritize the process nodes in the directed acyclic graph based on the topological sorting algorithm to obtain a structured target node sequence. The model building module 13 is used to determine the process parameter feature vector of the target product based on the target node sequence, and to build the process model of the target product; the process parameter feature vector includes process sequence features, bill of materials features and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node; The template matching module 14 is used to match the feature vector of the process parameter with the feature vector of each template in the preset file template library based on the preset template matching algorithm, so as to determine the target template corresponding to the target product; The procedure generation module 15 is used to generate a production and manufacturing operation procedure for the target product based on the process model and the target template, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
[0037] As can be seen, in this embodiment, the process nodes and their dependencies are encoded into a directed acyclic graph and topologically sorted to obtain a structured node sequence, thereby accurately representing the execution order and condition judgment logic of complex process routes and overcoming the problem of easy omissions in manual sorting. Then, the process parameter feature vectors are automatically matched with the template library to generate operation procedures, replacing manual writing and repeated comparison, shortening the procedure compilation cycle, reducing the human error rate, and ensuring the standardization and normalization of output files, so as to realize efficient, accurate and standardized automated control of the production and manufacturing process.
[0038] In some specific embodiments, the route parsing module 11 may specifically include: The data processing unit is used to acquire the process route data of the target product and perform data preprocessing operations on the process route data to obtain processed data. The data preprocessing operations include cleaning and standardizing the process route data to remove redundant information and supplementing missing fields in the process route data. The information reading unit is used to read the process sequence, bill of materials and condition constraints from the processed data; A node determination unit is used to determine each process in the process sequence as a process node, and to determine the dependency relationship between each process node according to the process sequence, the bill of materials and the condition constraints; The directed acyclic graph construction unit is used to traverse each process node and its dependencies based on a depth-first search algorithm or a breadth-first search algorithm, taking each process node as a node and each dependency as a directed edge to obtain a directed acyclic graph.
[0039] In some specific embodiments, the node sequence construction module 12 may specifically include: The priority sorting unit is used to sort the nodes according to the dependency relationship between the nodes in the directed acyclic graph based on the topological sorting algorithm, so as to obtain the sorting result. The core process determination unit is used to determine the importance score of each process node in the directed acyclic graph based on a preset path analysis formula, and to determine the core process of the target product from each process node according to the importance score. The node sequence generation unit is used to obtain a structured target node sequence based on the sorting result and the core process.
[0040] In some specific embodiments, the model building module 13 may specifically include: The feature extraction unit is used to extract process sequence features based on the process execution order of each process node in the target node sequence, and to extract bill of materials features based on the bill of materials of the target product. The feature vector determination unit is used to extract condition constraint features based on the condition constraints in the process route data, and to form a process parameter feature vector based on the process sequence features, the bill of materials features and the condition constraint features; The flowchart generation unit is used to generate a flowchart of the target product based on a graphical modeling method and according to the execution order of each process node in the target node sequence and the condition judgment logic between each process node. The model building unit is used to mark the execution order and condition judgment of each process node in the flowchart in order to build a process model.
[0041] In some specific embodiments, the template matching module 14 may specifically include: The keyword extraction unit is used to extract keywords from the feature vector of the process parameters based on natural language processing technology to obtain a first target feature vector, and to extract keywords from the feature vector of each template in the preset file template library to obtain a second target feature vector. The similarity determination unit is used to determine the similarity score between the first target feature vector and the second target feature vector based on the cosine similarity formula; The target template determination unit is used to determine the template with the highest similarity score as the initial template corresponding to the target product, and to adjust the content of the initial template according to the conditional constraint features in the process parameter feature vector to obtain the target template.
[0042] In some specific embodiments, the procedure generation module 15 may specifically include: The information filling unit is used to fill the corresponding process step information and condition branch information into the target template according to the process execution sequence and condition judgment logic in the process model. The inspection procedure determination unit is used to determine the corresponding inspection procedure based on the key processes and special processes marked in the process route data. The operation procedure aggregation unit is used to automatically call the corresponding process document template according to the condition settings in the process route data, and aggregate the process step information, the condition branch information, the inspection procedure and the process document template into the production operation procedure of the target product.
[0043] In some specific embodiments, the product manufacturing apparatus based on directed acyclic graphs and template matching may further include: The template classification module is used to classify document templates according to product type or process stage to obtain several template categories, and to set class codes and content parameters for each template category to obtain configuration data for each type of template; The template structure partitioning module is used to pre-set corresponding process document templates for various types of templates according to the configuration data, and to set the hierarchical relationship between different levels of templates to obtain a template library structure with hierarchical association. The template library construction module is used to automatically generate version numbers for various templates according to the template library structure, and generate or fill in clause codes according to the built-in regulatory requirement clause code table to obtain the preset file template library.
[0044] Furthermore, embodiments of this application also disclose an electronic device, Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0045] Figure 3This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the product manufacturing method based on directed acyclic graphs and template matching disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0046] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0047] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0048] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the product manufacturing method based on directed acyclic graphs and template matching, which is executed by the electronic device 20 according to any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0049] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned product manufacturing method based on directed acyclic graphs and template matching. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0050] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0051] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0052] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0053] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0054] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A product manufacturing method based on directed acyclic graphs and template matching, characterized in that, include: The process route data of the target product is obtained and parsed to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph. The process nodes in the directed acyclic graph are prioritized based on the topological sorting algorithm to obtain a structured sequence of target nodes. Based on the target node sequence, the process parameter feature vector of the target product is determined, and the process model of the target product is constructed; the process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node; The process parameter feature vector is matched with the feature vector of each template in the preset file template library based on the preset template matching algorithm to determine the target template corresponding to the target product; Based on the process model and the target template, a production and manufacturing operation procedure for the target product is generated, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
2. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, The step of acquiring the process route data of the target product and parsing the process route data to encode multiple process nodes and their dependencies into a directed acyclic graph includes: The process route data of the target product is obtained, and the process route data is preprocessed to obtain processed data. The data preprocessing operation includes cleaning and standardizing the process route data to remove redundant information and supplement missing fields in the process route data. Read the process sequence, bill of materials, and condition constraints from the processed data; Each process in the process sequence is identified as a process node, and the dependencies between each process node are determined based on the process sequence, the bill of materials, and the condition constraints. The process nodes and their dependencies are traversed using either a depth-first search algorithm or a breadth-first search algorithm. Each process node is treated as a node, and each dependency is treated as a directed edge, to obtain a directed acyclic graph.
3. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, The process nodes in the directed acyclic graph are prioritized using a topological sorting algorithm to obtain a structured target node sequence, including: Based on the topological sorting algorithm, the nodes are prioritized according to the dependencies between nodes in the directed acyclic graph to obtain the sorting result; The importance score of each process node in the directed acyclic graph is determined based on the preset path analysis formula, and the core process of the target product is determined from each process node according to the importance score. Based on the sorting results and the core procedures, a structured sequence of target nodes is obtained.
4. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, The step of determining the process parameter feature vector of the target product based on the target node sequence and constructing the process model of the target product includes: Extract process sequence features based on the process execution order of each process node in the target node sequence, and extract bill of materials features based on the bill of materials of the target product; Extract condition constraint features from the condition constraints in the process route data, and form a process parameter feature vector based on the process sequence features, the bill of materials features, and the condition constraint features; Based on the graphical modeling method and according to the process execution order of each process node in the target node sequence and the condition judgment logic between each process node, a flowchart of the target product is generated. The process execution sequence and condition judgments for each process node are marked in the flowchart to construct a process model.
5. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, The step of matching the process parameter feature vector with the feature vectors of each template in a preset file template library based on a preset template matching algorithm to determine the target template corresponding to the target product includes: Keyword extraction is performed on the feature vector of the process parameters based on natural language processing technology to obtain a first target feature vector, and keyword extraction is performed on the feature vector of each template in the preset file template library to obtain a second target feature vector; Based on the cosine similarity formula, the similarity score between the first target feature vector and the second target feature vector is determined; The template with the highest similarity score is determined as the initial template corresponding to the target product, and the content of the initial template is adjusted according to the conditional constraint features in the process parameter feature vector to obtain the target template.
6. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, The step of generating the production and manufacturing operation procedures for the target product based on the process model and the target template includes: Based on the process execution sequence and condition judgment logic in the process model, fill the corresponding process step information and condition branch information into the target template; Based on the key processes and special procedures marked in the process route data, determine the corresponding inspection procedures; The corresponding process document template is automatically invoked based on the condition settings in the process route data, and the process step information, the condition branch information, the inspection procedure, and the process document template are aggregated into the production and manufacturing operation procedure for the target product.
7. The product manufacturing method based on directed acyclic graphs and template matching according to claim 1, characterized in that, Also includes: The document templates are classified according to product type or process stage to obtain several template categories. Class codes and content parameters are set for each template category to obtain configuration data for each type of template. Based on the configuration data, corresponding process document templates are pre-set for various templates, and the hierarchical relationship between different levels of templates is set to obtain a template library structure with hierarchical association. Based on the template library structure, version numbers are automatically generated for various templates, and clause codes are generated or filled in according to the built-in regulatory requirement clause code table to obtain the preset document template library.
8. A product manufacturing apparatus based on directed acyclic graphs and template matching, characterized in that, include: The route parsing module is used to acquire the process route data of the target product and parse the process route data to encode multiple process nodes and their dependencies in the process route data into a directed acyclic graph. The node sequence construction module is used to prioritize the process nodes in the directed acyclic graph based on the topological sorting algorithm to obtain a structured target node sequence. The model building module is used to determine the process parameter feature vector of the target product based on the target node sequence, and to construct the process model of the target product; the process parameter feature vector includes process sequence features, bill of materials features, and condition constraint features; the process model is used to characterize the process execution order and condition judgment logic of each process node; The template matching module is used to match the feature vector of the process parameters with the feature vector of each template in the preset file template library based on a preset template matching algorithm, so as to determine the target template corresponding to the target product; The procedure generation module is used to generate the production and manufacturing operation procedure for the target product based on the process model and the target template, so as to control the production and manufacturing process of the target product based on the production and manufacturing operation procedure.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the product manufacturing method based on directed acyclic graphs and template matching as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the product manufacturing method based on directed acyclic graphs and template matching as described in any one of claims 1 to 7.
