Welding process parameter recommendation method for enhancing large model by using knowledge graph retrieval
By constructing a welding process knowledge graph and using large models for search and enhancement, the problem that traditional welding process parameters are selected depends on expert experience, and effective management of welding knowledge and efficient parameter recommendation are achieved.
Patent Information
- Application Number
- CN202411649599.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The selection of traditional welding process parameters depends on the experience of experts and a large number of trial and error experiments, resulting in low design efficiency, low knowledge reuse rate and unreasonable process costs.
By constructing a welding process knowledge graph, multi-source heterogeneous welding knowledge is stored and knowledge extraction is used using a large model, and search and enhance it in combination with the parameter requirements input by users to generate welding process parameter recommendations.
It realizes effective management and reuse of welding knowledge, improves the efficiency of welding process parameter recommendation, reduces expert experience dependence and cost, and alleviates the problem of insufficient knowledge in large models.
Smart Images

Figure CN119578525A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a method for recommending welding process parameters using a knowledge graph retrieval-enhanced large model. Background Art
[0002] With the advent of the Industrial 4.0 era, the manufacturing industry is facing huge challenges of transformation and upgrading. As an indispensable process in the manufacturing industry, welding quality directly affects the performance and life of the product. However, the selection of traditional welding process parameters often relies on the experience of experts and a large number of trial and error experiments, resulting in low design efficiency, low knowledge reuse rate, unreasonable process costs, or even serious over-standard problems.
[0003] Knowledge graphs represent the relationships between entities in the form of nodes and edges, and can efficiently store and retrieve large amounts of knowledge information. In the field of welding technology, building a welding technology knowledge graph can store welding technology-related knowledge, such as welding examples, welding defects, welding rules, etc., in a structured manner, thereby achieving effective management and reuse of knowledge.
[0004] The big language model is an artificial intelligence model based on deep learning. It has strong context perception, deep semantic representation and few-sample learning capabilities. These features make it an ideal choice for processing complex information and making intelligent recommendations. Therefore, it can be applied to the intelligent recommendation system of welding process parameters to improve the quality and efficiency of welding process parameter recommendations.
[0005] However, although large language models perform well in understanding natural language and processing text data, they may lack in-depth knowledge and expertise in the field of welding processes. Using the welding process knowledge graph as an external knowledge base to retrieve and enhance the large model can provide it with accurate and comprehensive welding process-related knowledge and reasoning basis, thereby effectively alleviating the hallucination problem of the large model.
[0006] Based on the above reasons, the present invention proposes a welding process parameter recommendation method using knowledge graph retrieval to enhance the large model. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention provides a method for recommending welding process parameters using a knowledge graph retrieval enhanced large model.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] A welding process parameter recommendation method using knowledge graph retrieval to enhance large models, comprising:
[0010] Step 1: Knowledge collection: Acquire relevant knowledge of multi-source heterogeneous welding processes and build a welding process knowledge base;
[0011] Step 2: Knowledge graph construction: For the structured process parameters in the welding process knowledge base, they are directly stored in the graph database to construct the welding process parameter knowledge graph; for the unstructured data in the welding process knowledge base, a large model is used to extract knowledge, and the welding process entities and welding process relationships are obtained to form welding process knowledge triples, and the welding process knowledge graph is constructed based on the welding process knowledge triples;
[0012] Step 3: Retrieval enhancement: The user inputs the welding process parameter recommendation requirements, uses the big model to extract the entities in the requirements, and links the entities to the target entities in the welding process knowledge graph; queries the relevant welding process knowledge triples in the knowledge graph according to the target entity to obtain the retrieval subgraph;
[0013] Step 4: Generate a large model: Finally, all retrieved sub-graphs are converted into text and submitted to the large model as the context of the welding process parameter recommendation requirements. The process parameter recommendation answers are generated and returned to the user in combination with the input welding process parameter recommendation requirements.
[0014] Preferably, in step 1: data in the field of welding technology is collected, including structured data, semi-structured data and unstructured data, and the constructed welding technology knowledge base includes:
[0015] Basic processes, parameter rules, welding resources, process examples, and welding defects.
[0016] Preferably, in step 2, the operation of extracting knowledge from unstructured data in the welding process knowledge base is implemented based on the Langchain architecture, and a large model prompt is given to guide it to implement entity extraction and relationship extraction.
[0017] Preferably, in step 2, the triplet includes {head entity, relationship, tail entity} and {entity, attribute, attribute value}; a welding process entity and its corresponding entity description text are extracted from a welding process knowledge base; a triplet in the form of {head entity, relationship, tail entity} is constructed according to the relationship between the welding process entity and the entity; based on the welding process entity, a triplet in the form of {entity, attribute, attribute value} is constructed with the entity description text corresponding to the welding process entity as the attribute value.
[0018] Preferably, in step 2, the prompt for extracting welding process knowledge given a large model includes:
[0019] Entity extraction: Please identify and extract all entities related to the welding process from the text, including but not limited to welding methods (such as manual arc welding, gas shielded welding, etc.), material types (such as stainless steel, aluminum alloy, etc.), welding parameters (such as welding current, welding voltage, welding speed, etc.) and welding defects (such as pores, cracks, etc.).
[0020] Preferably, in step 2, the prompt for extracting welding process knowledge given a large model includes:
[0021] Relationship extraction: For the extracted entities, further identify and extract the relationships between them.
[0022] Preferably, in step 3, the process of linking the extracted entity with the target entity in the welding process knowledge base includes:
[0023] Step 31: Calculate the similarity between the user input entity mention and each welding process entity in the knowledge base;
[0024] Step 32: Select the welding process entity with the highest similarity to the entity mention as the target entity and link it.
[0025] The relevant welding process knowledge triples queried from the welding process knowledge base include the linked target entity and all its entities and relations within the k-hop range. The selection of the k-hop range depends on the depth and breadth of the required contextual information.
[0026] Preferably, in step 3, the method for calculating the similarity between the user input entity mention and each welding process entity in the knowledge base includes:
[0027] Step 31.1: Use the word embedding model to represent the entity in vector form;
[0028] Step 31.2: After obtaining the vector representation of the entity, use the cosine similarity or Euclidean distance measurement method to calculate the similarity between the vectors.
[0029] Preferably, in step 4, the process of converting all retrieved subgraphs into text includes:
[0030] Step 41: first convert the retrieval subgraph into an entity chain;
[0031] Step 42: Prompt the large model to use the template to convert each entity chain into a natural language description.
[0032] Furthermore, it also includes step 5, knowledge graph update: the user verifies and provides feedback based on the recommended process parameters, and combines the reasoning process to update the corresponding triples of the welding process knowledge graph.
[0033] The present invention has the following beneficial effects:
[0034] 1. The present invention constructs a welding process knowledge graph and stores multi-source heterogeneous welding knowledge in the graph, thereby realizing effective management and reuse of welding knowledge. At the same time, through user feedback and verification, the welding process knowledge graph can be continuously updated and improved to realize continuous accumulation and iterative optimization of knowledge.
[0035] 2. The present invention uses the welding process knowledge graph as an external knowledge base to search and enhance the large model, which can provide accurate and comprehensive welding process-related knowledge as a reasoning basis for the large model, thereby effectively alleviating the illusion problem of the large model;
[0036] 3. The present invention realizes the intelligent recommendation of welding process parameters, can perform personalized analysis according to the specific needs of users, and quickly generate welding process parameter recommendations that meet user expectations, effectively improving the efficiency of welding process parameter recommendations and solving the problems of strong dependence on expert experience and high cost in process parameter recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flowchart of a method for recommending welding process parameters using a knowledge graph retrieval enhanced large model in an embodiment of the present invention;
[0038] Figure 2 It is a diagram illustrating the interaction among the user, the knowledge graph and the big model in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0040] like Figure 1 As shown, the present invention provides a method for recommending welding process parameters using a knowledge graph retrieval enhanced large model, the method comprising the following steps:
[0041] Step 1: Knowledge collection: Acquire relevant knowledge of multi-source heterogeneous welding processes and build a welding process knowledge base;
[0042] Collect high-quality data in the field of welding technology, including structured data, semi-structured data and unstructured data. The acquisition channels include but are not limited to data from cooperative units, welding process manuals, welding process specifications, welding process procedures and expert experience knowledge. The constructed welding process knowledge base includes but is not limited to:
[0043] Basic technology: welding method, groove form, joint form, welding position;
[0044] Parameter rules: welding material rules, equipment rules, groove rules;
[0045] Welding resources: welding base materials, welding materials, welding equipment, personnel, and sites;
[0046] Process example: example number, welding process parameters, where welding process parameters include welding current, welding voltage, welding speed, wire elongation, wire speed, welding gun angle, distance between welding wire and workpiece, welding swing mode and parameters;
[0047] Welding defects: appearance defects, pores, slag inclusions, and cracks.
[0048] Step 2: Knowledge graph construction: For the structured process parameters in the welding process knowledge base, they are directly stored in the graph database to construct the welding process parameter knowledge graph; for the unstructured data, a large model is used to extract knowledge, and the welding process entities and welding process relationships are obtained to form welding process knowledge triples, and the welding process knowledge graph is constructed based on the welding process knowledge triples;
[0049] The operation of knowledge extraction from unstructured data in the welding process knowledge base is implemented based on the Langchain architecture. The zero-sample learning method is adopted to give a large model prompt to guide it to realize entity extraction and relationship extraction.
[0050] The Langchain architecture provides a set of efficient, flexible and powerful tools, components and interfaces that can simplify the process of knowledge extraction and improve the accuracy and efficiency of extraction.
[0051] Large models have strong generalization and transfer learning capabilities, so zero-shot learning methods can be used to extract knowledge.
[0052] The form of triples includes {head entity, relationship, tail entity} and {entity, attribute, attribute value}; extract welding process entities and their corresponding entity description texts from the welding process knowledge base; construct triples in the form of {head entity, relationship, tail entity} according to the relationship between the welding process entity and the entity; construct triples in the form of {entity, attribute, attribute value} based on the welding process entity and using the entity description text corresponding to the welding process entity as the attribute value. For example: a sample in the welding process knowledge base is the sentence "The welding wire used for CO2 gas shielded welding generally has a diameter in the range of 0.5 to 5.0 mm", and the extracted triple is {CO2 gas shielded welding, the welding wire diameter is, 0.5 to 5.0 mm}.
[0053] The prompt example for extracting welding process knowledge given a large model is as follows:
[0054] Entity extraction: Please identify and extract all entities related to the welding process from the text, including but not limited to welding methods (such as manual arc welding, gas shielded welding, etc.), material types (such as stainless steel, aluminum alloy, etc.), welding parameters (such as welding current, welding voltage, welding speed, etc.) and welding defects (such as pores, cracks, etc.).
[0055] Relationship extraction: For the extracted entities, further identify and extract the relationships between them. For example, which welding method is suitable for a certain material, what effect does a certain welding parameter have on welding quality, and what factors may cause a certain welding defect.
[0056] Step 3: Retrieval enhancement: The user inputs the welding process parameter recommendation requirements, uses the big model to extract the entities in the requirements, and links the entities to the target entities in the welding process knowledge graph; queries the relevant welding process knowledge triples in the knowledge graph according to the target entity to obtain the retrieval subgraph;
[0057] Recommended requirements for welding process parameters include but are not limited to:
[0058] Processing quality indicators: processing speed, dimensional accuracy including weld width, weld height and weld gap;
[0059] Processing workpiece data: workpiece thickness, workpiece material, groove and size;
[0060] Scene parameters: welding wire diameter, shielding gas, cooling form;
[0061] Processing restrictions: maximum welding speed, cutting-in and cutting-out offset.
[0062] The process of linking the extracted entities with the target entities in the welding process knowledge base includes:
[0063] Step 31: Calculate the similarity between the user input entity mention and each welding process entity in the knowledge base;
[0064] Furthermore, the similarity can be calculated based on the semantic similarity method, and the specific process includes:
[0065] Step 31.1: Use word vector models such as Word2Vec, BERT, etc. to represent entities in vector form. These models are trained on large-scale corpora and can capture rich semantic information.
[0066] Step 31.2: After obtaining the vector representation of the entity, use cosine similarity, Euclidean distance and other measurement methods to calculate the similarity between the vectors. Cosine similarity measures the similarity of two vectors in the direction, while Euclidean distance measures the straight-line distance between two vectors in space.
[0067] The calculation formula for cosine similarity is:
[0068]
[0069] Where A·B is the dot product of vectors A and B, and ||A|| and ||B|| are the moduli of vectors A and B, respectively.
[0070] The calculation formula of Euclidean distance is:
[0071]
[0072] Among them, A i and B i are the i-th elements of vectors A and B respectively, and n is the dimension of the vector.
[0073] Step 32: Select the welding process entity with the highest similarity to the entity mention as the target entity and link it.
[0074] The relevant welding process knowledge triples queried from the welding process knowledge base include the linked target entity and all its entities and relations within the k-hop range. The selection of the k-hop range depends on the depth and breadth of the required contextual information.
[0075] The knowledge graph is a typical graph structure that stores multi-hop paths of chain relationships. The welding process knowledge graph is used as an accurate knowledge source for external retrieval to enhance the generation of large models, which greatly improves the professionalism, credibility, authenticity and interpretability of large model reasoning.
[0076] Step 4: Generate a large model: Finally, all retrieved sub-graphs are converted into texts and submitted to the large model as the context of the welding process parameter recommendation requirements. The process parameter recommendation answers are generated and returned to the user in combination with the input welding process parameter recommendation requirements.
[0077] The process of converting all retrieved subgraphs into text includes:
[0078] Step 41: First convert the search subgraph into an entity chain, for example: "weld width - is - the distance between two weld toes on the weld surface";
[0079] Step 42: Prompt the large model to use the template to convert each entity chain into a natural language description.
[0080] This process leverages the natural language understanding and generation capabilities of the large model to simplify the retrieval subgraph into a unified format that can capture the retrieved enhanced information.
[0081] The process of generating the process parameter recommendation answers for the large model combines the welding process parameter recommendation requirements, the enhanced information of the knowledge graph and the generation template to obtain the final process parameter recommendation results, and returns the reasoning process of the large model at the same time, with the format of: ("entity"-"relationship"-"entity")->("entity"-"relationship"-"entity")->….
[0082] Based on the welding process knowledge graph, the source information and reasoning path of the large model for obtaining welding process knowledge and data are recorded, and a complete presentation is made when the process parameters are generated. The above knowledge traceability not only visualizes the reasoning process of the large model, but also facilitates users to evaluate the credibility of the recommended parameters and to provide feedback and updates to the knowledge graph.
[0083] Step 5: Knowledge graph update: Users verify and provide feedback based on the recommended process parameters, and combine the reasoning process to update the corresponding triples of the welding process knowledge graph.
[0084] After the user adopts the welding process parameters recommended by the large model and performs actual operations, feedback is provided based on the practice results, and the feedback includes but is not limited to the validity verification results of the parameters and improvement suggestions.
[0085] When the big model receives feedback from users that the recommended welding process parameters are incorrect, it traces back the entire reasoning path, which contains the logical chain from the initial conditions (such as welding materials, welding positions, etc.) to the final recommended parameters (such as welding current, welding voltage, etc.), locates the specific chain that leads to the wrong recommendation, modifies the related triples in the welding process knowledge graph, and updates the knowledge graph.
[0086] Example of updates to the knowledge graph:
[0087] Change material properties, such as "Material A - Melting point - X degrees";
[0088] Adjust the scope of application of welding rules, such as "MIG welding - applicable materials - including material A but excluding material B";
[0089] Adjust welding process parameters, such as "when the ambient humidity is greater than Y% - the welding speed - should be adjusted to Z cm / s".
[0090] In summary, the relationship between users, knowledge graphs and big models is as follows: Figure 2 As shown, the user inputs the welding process requirements into the big model, and the big model uses the knowledge graph to retrieve and enhance and output the recommended process parameters to the user based on the requirements. After verification, the user feeds back to the knowledge graph for knowledge update.
[0091] The present invention constructs a welding process knowledge graph and stores multi-source heterogeneous welding knowledge in the graph, thereby realizing effective management and reuse of welding knowledge; at the same time, through user feedback and verification, the welding process knowledge graph can be continuously updated and improved to realize continuous accumulation and iterative optimization of knowledge; the welding process knowledge graph is used as an external knowledge base to retrieve and enhance the large model, and accurate and comprehensive welding process-related knowledge is provided for the large model as a basis for reasoning, thereby effectively alleviating the hallucination problem of the large model; intelligent recommendation of welding process parameters is realized, and personalized analysis can be performed according to the specific needs of users, and welding process parameter recommendations that meet user expectations can be quickly generated, which effectively improves the efficiency of welding process parameter recommendation and solves the problems of strong dependence on expert experience and high cost in process parameter recommendation.
[0092] The above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A welding process parameter recommendation method using knowledge graph retrieval to enhance large models, characterized in that: include: Step 1: Knowledge collection: Acquire relevant knowledge of multi-source heterogeneous welding processes and build a welding process knowledge base; Step 2: Knowledge graph construction: For the structured process parameters in the welding process knowledge base, directly store them in the graph database to construct the welding process parameter knowledge graph; For the unstructured data in the welding process knowledge base, a large model is used to extract knowledge, and the welding process entities and welding process relationships are obtained to form welding process knowledge triples, and a welding process knowledge graph is constructed based on the welding process knowledge triples; Step 3: Retrieval enhancement: The user inputs the welding process parameter recommendation requirements, uses the big model to extract the entities in the requirements, and links the entities to the target entities in the welding process knowledge graph; queries the relevant welding process knowledge triples in the knowledge graph according to the target entity to obtain the retrieval subgraph; Step 4: Generate a large model: Finally, all retrieved sub-graphs are converted into text and submitted to the large model as the context of the welding process parameter recommendation requirements. The process parameter recommendation answers are generated and returned to the user in combination with the input welding process parameter recommendation requirements.
2. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In step 1: data in the field of welding technology is collected, including structured data, semi-structured data and unstructured data. The constructed welding technology knowledge base includes: Basic processes, parameter rules, welding resources, process examples, and welding defects.
3. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In the step 2, the operation of extracting knowledge from the unstructured data in the welding process knowledge base is implemented based on the Langchain architecture, and a large model prompt is given to guide it to implement entity extraction and relationship extraction.
4. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In the step 2, the triplet includes {head entity, relationship, tail entity} and {entity, attribute, attribute value}; a welding process entity and its corresponding entity description text are extracted from a welding process knowledge base; a triplet in the form of {head entity, relationship, tail entity} is constructed according to the relationship between the welding process entity and the entity; based on the welding process entity, a triplet in the form of {entity, attribute, attribute value} is constructed with the entity description text corresponding to the welding process entity as the attribute value.
5. The method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In step 2, the prompt for extracting welding process knowledge from a given large model includes: Entity extraction: Please identify and extract all entities related to the welding process from the text, including but not limited to welding methods (such as manual arc welding, gas shielded welding, etc.), material types (such as stainless steel, aluminum alloy, etc.), welding parameters (such as welding current, welding voltage, welding speed, etc.) and welding defects (such as pores, cracks, etc.).
6. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In step 2, the prompt for extracting welding process knowledge from a given large model includes: Relationship extraction: For the extracted entities, further identify and extract the relationships between them.
7. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In step 3, the process of linking the extracted entity with the target entity in the welding process knowledge base includes: Step 31: Calculate the similarity between the user input entity mention and each welding process entity in the knowledge base; Step 32: Select the welding process entity with the highest similarity to the entity mention as the target entity and link it. The relevant welding process knowledge triples queried from the welding process knowledge base include the linked target entity and all its entities and relations within the k-hop range. The selection of the k-hop range depends on the depth and breadth of the required contextual information.
8. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 7, characterized in that: In step 3, the method for calculating the similarity between the user input entity mention and each welding process entity in the knowledge base includes: Step 31.1: Use the word embedding model to represent the entity in vector form; Step 31.2: After obtaining the vector representation of the entity, use the cosine similarity or Euclidean distance measurement method to calculate the similarity between the vectors.
9. A method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: In step 4, the process of converting all retrieved subgraphs into text includes: Step 41: first convert the retrieval subgraph into an entity chain; Step 42: Prompt the large model to use the template to convert each entity chain into a natural language description.
10. The method for recommending welding process parameters using a knowledge graph retrieval enhanced large model as claimed in claim 1, characterized in that: It also includes step 5, knowledge graph update: the user verifies and provides feedback based on the recommended process parameters, and combines the reasoning process to update the corresponding triples of the welding process knowledge graph.
Citation Information
Patent Citations
Welding cost and process parameter comprehensive intelligent recommendation method based on knowledge graph
CN114969553A
Enterprise knowledge base question answering system based on large model and knowledge graph
CN116821310A
Large model knowledge updating method and device based on knowledge graph
CN116932776A
Knowledge graph generation type question answering method and system based on large language model
CN117033608A
Civil aircraft process parameter recommendation method and system
CN117874912A
Cited By
Method and equipment for intelligently generating welding process scheme based on vertical large model
CN120011526A
Hybrid retrieval method and equipment for intelligent recommendation of welding process scheme
CN120013209A
Hybrid Retrieval Method and Device for Intelligent Recommendation of Welding Process Plans
CN120013209B
Laser cladding knowledge base construction method based on large model
CN120373435A
Welding process tracing method based on multi-source data fusion
CN120725545A