Method and equipment for intelligently generating welding process scheme based on vertical large model

Through the intelligent generation method of welding process scheme based on vertical large models, the problems of low efficiency and strong subjectivity of welding process scheme generation in the existing technology are solved, and personalized and accurate welding process scheme generation is realized, which improves welding quality and production efficiency.

CN120011526AInactive Publication Date: 2025-05-16XIANGJIANG LAB
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510490619.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to effectively generate personalized and accurate optimal welding process solutions, and traditional manual welding process is low efficiency, strong subjectivity and poor repeatability, making it difficult to meet the production requirements of efficient, accurate and automated.

Method used

The intelligent generation method of welding process scheme based on vertical large models is adopted. By obtaining the welding requirement information input by the user, the Embedding model is used for vectorization, keywords are identified, similar contexts are retrieved from the pre-constructed welding process knowledge base, and then input into the pre-trained large model to generate a welding process scheme that meets user needs.

Benefits of technology

The intelligent generation of welding process solutions is realized, efficiency and accuracy are improved, and personalized optimal solutions can be generated according to the welding needs input by different users, improving welding quality and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011526A_ABST
    Figure CN120011526A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent generation method and equipment for a welding process scheme based on a vertical large model, and the method comprises the steps: obtaining welding demand information inputted by a user, carrying out the vectorization processing of the welding demand information through employing an Embedding model, and generating a welding demand vector, and an encoder in the Embedding model comprises a multi-head attention mechanism layer and a KAN network layer; searching similar contexts from a welding process knowledge base according to the welding demand vector, wherein the welding process knowledge base comprises a welding process diagram database and a welding process vector database; and integrating the retrieved similar context and the welding demand vector into a welding process description, inputting the integrated welding process description into a pre-training large model through a Prompt template, and generating a welding process scheme output meeting the welding demand of the user. The method has the advantages of being simple in implementation method, high in intelligent degree and efficiency, high in flexibility and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-layer and multi-pass welding, and in particular to a method and device for intelligently generating a welding process plan based on a vertical large model. Background Art

[0002] As a key process in the manufacturing industry, welding technology is a process that achieves atomic bonding between two workpieces through heating and pressurization to achieve the connection of metal or non-metal materials. It is widely used in many fields such as automobiles, aerospace, shipbuilding, and construction. The use of multi-layer and multi-pass welding methods can achieve the welding of complex structural parts and thick materials, ensuring the strength and durability of the joints, and the complexity and technical requirements of the welding process will continue to increase. In the multi-layer and multi-pass welding manufacturing process, the choice of welding process has a crucial impact on welding quality, production cost and efficiency. However, traditional welding processes are usually manually formulated. For example, experienced welding engineers formulate welding plans one by one according to factors such as material properties, structural shape, and environmental conditions. This type of manual formulation of welding processes will have problems such as low efficiency, strong subjectivity, and poor repeatability, which is difficult to meet the current efficient, precise, and automated production requirements.

[0003] The big model (big language model) technology is based on the Transformer architecture and self-attention mechanism to achieve the understanding and generation of natural language and multimodal information. Some practitioners have proposed that the big model technology should be applied to achieve welding process optimization and welding process assessment, which can improve the intelligence and efficiency of welding process analysis and evaluation. However, when facing problems in professional fields, the results generated by the big language model may lack authenticity and accuracy, and may produce hallucinations. At present, most welding process systems built based on big model technology are based on fixed rules and parametric modeling. They lack sufficient flexibility and intelligence, and are difficult to adapt to complex and changing welding needs. They are also unable to provide personalized and accurate optimal welding solutions for different user input welding needs. Summary of the invention

[0004] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a method and device for intelligently generating welding process solutions based on a vertical large model, which has a simple implementation method, a high degree of intelligence, a high efficiency and strong flexibility, and can generate personalized and accurate optimal welding solutions according to different welding needs of users.

[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is: A method for intelligently generating a welding process plan based on a vertical large model, comprising the following steps: Obtain welding requirement information input by a user, and use an Embedding model to vectorize the welding requirement information to generate a welding requirement vector, wherein the encoder in the Embedding model includes a multi-head attention mechanism layer and a KAN (Kolmogorov-Arnold Networks Layer) network layer, and the KAN network layer is used to extract features from the output of the multi-head attention mechanism layer to obtain the output of the encoder; Identify keywords from the welding requirement vector, and retrieve similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base according to the identified keywords, wherein the welding process knowledge base includes a welding process diagram database and a welding process vector database, wherein the welding process diagram database includes knowledge graphs of different welding processes, wherein nodes are used to represent entities and edges are used to represent relationships between entities, wherein the entities include welding methods, welding types, and welding parameters; and the welding process vector database includes text data of different welding processes; Integrate the retrieved similar context and the welding requirement vector into a welding process description, input the integrated welding process description into the pre-trained large model via a Prompt template, and generate a welding process solution output that meets the user's welding requirements; The welding process knowledge base is updated according to the welding process plan generated by the pre-trained large model.

[0006] Furthermore, the Embedding model includes an input layer, a word embedding layer, an encoder, and an output layer connected in sequence, and the vectorization processing of the welding requirement information using the Embedding model to generate a welding requirement vector includes: The input layer accesses the sliced ​​user welding demand data and tokenizes it, decomposes the user welding demand data into multiple tokens, arranges the tokens in sequence to form a sequence, and converts the tokens in the sequence into corresponding IDs using the vocabulary to form the corresponding ID serialization result and output it to the word embedding layer; The word embedding layer maps the words, segments and positions in the ID serialization result into a welding requirement word vector representation of a fixed dimension, and obtains a welding requirement vector after weighted fusion using the weights calculated according to the attention mechanism, and provides it to the encoder; The encoder projects the welding requirement vector output by the word embedding layer into a low-dimensional space based on the multi-head attention mechanism layer for multi-head attention processing, fuses the processing results to generate a welding requirement vector representation, and inputs the welding requirement vector representation output by the multi-head attention mechanism layer into the KAN network layer for feature mapping to obtain the output of the encoder; The output layer extracts the welding requirement vector representation output by the last encoder, and maps the extracted welding requirement vector representation to a welding requirement vector output of a fixed dimension after linear transformation.

[0007] Furthermore, the output layer extracts the welding requirement vector representation output by the last encoder, and maps the extracted welding requirement vector representation to a welding requirement vector output of a fixed dimension after linear transformation, including: the output layer inputs the welding requirement vector representation output by the encoder into a fully connected layer for linear transformation, and uses the Swish activation function to transform the welding requirement vector representation output by the encoder into a fully connected layer for linear transformation. Mapped to the final welding demand vector Output, the calculation expression is:

[0008]

[0009] in, represents the Swish activation function, represents the weight matrix of the output layer, represents the bias term, represents adaptive normalization processing, Embedding representation of user welding requirement vector.

[0010] Furthermore, the KAN network layer includes more than two KAN layers, and the output of the encoder obtained by performing feature mapping on the output of the multi-head attention mechanism layer using the KAN network layer includes: The output of the multi-head attention mechanism layer is input into each KAN layer in turn, and each KAN layer performs feature mapping. After each KAN layer is mapped, the adaptive normalization mechanism is used to normalize the mapping result. The calculation expression is:

[0011] in, represents the output of the kth KAN layer, represents the mean value of the output of the kth KAN layer, represents the variance of the output of the kth KAN layer, denotes the learnable scaling and offset parameters, is a constant; The output of the last KAN layer is input into the GELU activation function to obtain the output of the KAN network layer, which is the output of the encoder.

[0012] Furthermore, the method also includes constructing a welding process diagram database, the steps of which include: Obtain welding process plan sample data set and rule standard data set; Preprocessing each welding process plan data in the welding process plan sample data set to identify key information; After slicing the preprocessed welding process plan data, the data is input into the pre-trained large model to extract at least one round of entity information, and the relationship between the extracted entities is obtained; Construct a welding process knowledge graph based on the extracted entities and the relationships between them; Using an Embedding model to embed each entity node in the welding process knowledge graph; Perform feature extraction on the welding process knowledge graph after node embedding to obtain the corresponding welding process knowledge graph vector; The welding process map database is composed of the welding process knowledge map and the corresponding welding process knowledge map vector.

[0013] Furthermore, the welding process plan sample data set includes plan conditions and plan results of different welding process plans, the plan conditions include any one or more information of base material, base material thickness, joint thickness, joint form, and welding position, and the plan results include any one or more information of welding current, welding speed, welding voltage, welding material diameter, shielding gas composition, shielding gas flow rate, welding wire extension length, wire feeding speed, welding gun inclination angle, arc starting current, arc ending current, arc starting voltage, and arc ending voltage.

[0014] Furthermore, the retrieving similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base according to the identified keywords includes: Traversing each knowledge graph in the welding process diagram database according to the keyword, searching for a subgraph centered on the keyword, and calculating a first similarity value between the searched subgraph and the welding requirement vector; Querying each welding process text data in the welding process vector database according to the keyword, and calculating a second similarity value between each welding process text data and the keyword; Similar contexts of the welding requirement vector are screened out according to the first similarity value and the second similarity value.

[0015] Further, when a similar context cannot be retrieved from the welding process knowledge base, the reasoning engine is started to perform reasoning based on the welding process rule base, and finally the similar context obtained by reasoning is returned. The reasoning based on the welding process rule base includes: Identify key point information in the welding requirement vector and extract entity or attribute information therein, wherein the key point information includes any one or more information of welding parameters, welding materials and defect types; Based on the extracted information, the user's welding requirement category is classified to obtain various attribute modules, wherein if there is a corresponding rule in the welding process rule library or it needs to rely on a specified attribute, the user's welding requirement category is classified using the rule engine, otherwise the pre-built welding requirement classification model is used for classification, and the attribute modules include welding method, welding position, base material and joint form; According to the classification results of the welding requirement categories, the requirement parameters corresponding to each attribute module are extracted, and matching rules are searched from the welding process rule library according to the extracted requirement parameters. The inferred similar context is obtained according to the matched rules. The rules are the relationship between specific requirement parameters, specific values ​​of input condition variables and output variables of the rules.

[0016] Furthermore, the welding requirement classification model includes a feature extraction layer, a classification layer and an output layer connected in sequence. In the feature extraction layer, a pre-trained language model is used to process the welding requirement vector to obtain a welding requirement semantic representation. In the classification layer, a classifier is used to classify the user's welding requirements according to the welding requirement semantic representation, and the classification results are output through the output layer.

[0017] An electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0018] Compared with the prior art, the advantages of the present invention are: 1. The present invention obtains the welding demand information of the user, first uses the Embedding model to vectorize the user's welding demand information to form a welding demand vector, then identifies keywords, retrieves similar contexts from the welding process knowledge base according to the identified keywords, and then integrates the retrieved similar contexts with the user's welding demand vector and inputs them into the pre-trained large model through the Prompt template. The large model is used to generate a welding process plan that meets the user's welding needs. An intelligent interactive welding process expert system can be constructed based on the vertical large model. After the user inputs the welding requirements, the corresponding accurate welding process plan can be output according to the user's welding requirements, thereby realizing intelligent processing of the welding process plan from demand input to precise generation.

[0019] 2. In the process of vectorizing the user's welding demand information using the Embedding model, the present invention adopts a KAN-based welding process processing mechanism and uses the KAN network layer to perform feature mapping on the output of the multi-head attention mechanism layer in the encoder. It can effectively fit the complex relationship between complex material properties, process parameters and environmental factors, solve the nonlinear coupling problem, and improve the accuracy and interpretability of the model in the field of welding technology, thereby generating accurate welding process solutions for different users' welding needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the implementation process of the intelligent generation method of welding process plan based on the vertical large model in this embodiment.

[0021] Figure 2 It is a schematic diagram of the structural principle of the Embedding model adopted in this embodiment.

[0022] Figure 3 Schematic diagram of the structural principle of the welding demand classification model adopted in this embodiment. DETAILED DESCRIPTION

[0023] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0024] The multi-layer and multi-pass welding process is to improve the welding quality and efficiency by dividing the weld into multiple layers and multiple passes, and welding layer by layer. It can be applied to the welding of thick plates, large components and complex structures. The welding process of multi-layer and multi-pass welding is relatively complex, involving welding methods, welding positions, welding materials, joint forms and welding parameters, among which welding parameters include various types of parameters, such as welding current, welding voltage, welding speed, welding diameter and other parameters. Using large model technology to generate the optimal welding process for different welding requirements can not only effectively improve welding quality and efficiency, but also reduce welding costs. The vertical field large model is a large language model optimized for a specific professional field. On the basis of the large model, by using the welding process plan sample data and welding process related rules, a vertical field large model for the generation of welding process plans is constructed, which can generate welding process plans with stronger professionalism and higher output quality for the welding process field.

[0025] The present invention obtains the welding requirement information of the user, first uses the Embedding model to vectorize the user's welding requirement information to form a welding requirement vector, then identifies keywords, retrieves similar contexts from the welding process knowledge base according to the identified keywords, and then integrates the retrieved similar contexts with the user's welding requirement vector and inputs them into the pre-trained large model through the Prompt template. The large model is used to generate a welding process plan that meets the user's welding requirements. An intelligent interactive welding process expert system can be formed based on the vertical large model. After the user inputs the welding requirements, the corresponding accurate welding process plan can be output according to the user's welding requirements, realizing the welding process plan from demand input to accurate The generated intelligent processing is particularly suitable for intelligent recommendation of welding process solutions for multi-layer and multi-pass welding processes. At the same time, taking into account the nonlinear coupling between complex material properties, process parameters and environmental factors in the welding process, the KAN-based welding process processing mechanism is adopted in the process of vectorizing the user's welding demand information using the Embedding model. The KAN network layer is used to perform feature mapping on the output of the multi-head attention mechanism layer in the encoder, which can effectively fit the complex relationship between complex material properties, process parameters and environmental factors, solve the nonlinear coupling problem, and improve the accuracy and interpretability of the model in the field of welding process, thereby generating accurate welding process solutions for different users' welding needs.

[0026] like Figure 1 As shown, the steps of the intelligent generation method of welding process plan based on the vertical large model in this embodiment include: Step S01. Obtain welding requirement information input by the user, use the Embedding model to vectorize the welding requirement information to generate a welding requirement vector, the encoder in the Embedding model includes a multi-head attention mechanism layer and a KAN network layer, and the KAN network layer is used to perform feature mapping on the output of the multi-head attention mechanism layer to obtain the output of the encoder.

[0027] This embodiment constructs a user interaction subsystem to achieve intelligent interaction with the user. After receiving the welding requirement information input by the user, the user interaction subsystem first cleans and preprocesses it. For semantically ambiguous welding requirements, the query can also be rewritten according to preset rules to make the wording conform to the standard and the expression more detailed.

[0028] In order to optimize the welding requirements input by users and ensure the high accuracy of the welding process plan reasoning and generation process, this embodiment adopts a dynamic interactive confirmation mechanism. By relying on pre-trained models and user interactions, it dynamically identifies uncertain or ambiguous content in user input during the reasoning process, and guides users to complete information through intelligent supplementary prompts. It can generate, interactively confirm and supplement questions in real time according to the welding requirements provided by users, making the welding requirements input by users more complete and accurate.

[0029] Specifically, the welding requirements input by the user are first cleaned and preprocessed. Then, for the vaguely expressed welding requirements, the existing knowledge base is searched, and the query is rewritten according to the knowledge base rules based on the specific welding process involved, and the relevant context is automatically supplemented. Then, with the help of the pre-trained large model, according to the necessary conditions for generating the welding process plan, the user's welding requirements input is checked for missing information. If missing, the user is required to further supplement and confirm with the user that the welding requirements information is complete and correct. By utilizing the dynamic interaction mechanism, the feedback content can be adjusted according to the user's context and welding application scenario, so that the final reasoning and recommendation results are more in line with the complexity and sophistication of the actual welding requirements, effectively improving the professionalism and practicality of the system.

[0030] As an optional implementation, the process of processing the welding requirement information input by the user is as follows: Step S101: Perform data cleaning and preprocessing on the welding requirements input by the user.

[0031] Specifically, data cleaning can automatically remove redundant symbols, special characters, and noise data that are not related to the welding process in the user's welding requirements, and retain useful information. Preprocessing can include removing stop words, standardizing welding terms, word segmentation, synonym replacement, and removing stop words that are not related to the welding process, such as "of", "is", "how", and other words that do not affect the search results, to ensure that key information is retained. For example, "how to deal with defects in welding" can be rewritten as "dealing with welding defects". Welding terms in user input can also be standardized. For example, "welding cracks" may be standardized as "hot cracks" or "cold cracks" to meet the standard terms in the knowledge base in the system, thereby improving the matching degree; then the user input is segmented to identify key information units, such as "material selection", "welding method", "defect handling", etc.; for terms that are unclear or have multiple expressions, the system will automatically replace them with synonyms used in the knowledge base. For example, "welded joint" may be replaced with "weld joint" to match the relevant content in the database.

[0032] Furthermore, if the semantic ambiguity of welding requirements is identified, the query can be rewritten according to the specific welding process involved. If the system identifies that there are specified terms or expressions in the fuzzy requirements, it can use the existing knowledge base to expand them, automatically supplement the relevant context, and generate more precise questions.

[0033] Step S102: Based on the information required for generating a welding process plan, the pre-trained large model is used to improve the user's welding requirement information by interacting with the user.

[0034] Specifically, the welding requirements input by the user can be analyzed, and the necessary conditions for generating the welding process plan can be checked one by one, such as welding method, welding position, welding material, joint form, welding parameters, etc., to determine whether some key information is missing; prompts are generated for the missing information, requiring the user to further supplement it; after collecting the user's supplementary information, confirm with the user again whether the input welding requirements are complete and correct, so that complete welding requirement information can be obtained in the end.

[0035] After the user confirms that the input welding requirements are complete and correct, the pre-trained large model is guided by instructions to generate a specified description format to make the description more in line with the welding process retrieval requirements. For example, "I want to weld two pieces of carbon steel" is optimized to "This welding task requires the use of MIG welding carbon steel materials, welding parameters are current 200A, voltage 24V, horizontal welding, material thickness is 6mm". Specifically, before the user's welding requirements, the instructions are spliced ​​into the pre-trained large model, and then the optimization results generated by the large model replace the original user welding requirements.

[0036] Step S103: Use the Embedding model to convert the optimized user welding requirements into a high-dimensional vector representation to obtain a welding requirement vector.

[0037] This embodiment uses a sample data set containing different welding requirement data to train the Embedding model in advance, and inputs the confirmed user welding requirements into the trained Embedding model for vectorization processing to generate a requirement vector. In the Embedding model, this embodiment adopts a KAN-based welding process processing mechanism, and uses KAN to replace the traditional feedforward neural network (FFN) to further process the output of the multi-head attention mechanism. KAN can enhance the nonlinear expression ability of the model through a learnable activation function, so that it can accurately fit the high-dimensional complex relationship between welding material properties and process parameters, such as the nonlinear effect of the chemical composition of the parent material on the welding strength, thereby optimizing the output of the multi-head attention mechanism, solving the nonlinear coupling problem between complex material properties, process parameters and environmental factors in the welding process field, and improving the accuracy of welding process plan generation.

[0038] Specifically, Figure 2As shown in FIG. 1 , the Embedding model includes an input layer, a word embedding layer, an encoder, and an output layer connected in sequence. The encoder includes a multi-head attention mechanism layer and a KAN network layer. The process of using the Embedding model to vectorize the welding requirement information and generate a welding requirement vector includes: Step S111. The sliced ​​user welding requirement data is accessed by the input layer and tokenized, the user welding requirement data is decomposed into multiple tokens, each token is arranged in sequence to form a sequence, and each token in the sequence is converted into a corresponding ID using a vocabulary, forming a corresponding ID serialization result and outputting it to the word embedding layer.

[0039] Specifically, the user welding requirement data is sliced ​​and provided to the input layer. The input layer accesses the sliced ​​user welding requirement data and tokenizes the sliced ​​user welding requirement to decompose each small segment of welding requirement into smaller basic unit tokens. The tokens are arranged in sequence to form a sequence. Each token in the sequence is converted into a corresponding ID using a vocabulary. The ID is an integer, and finally the corresponding ID sequence is output.

[0040] Step S112. The word embedding layer maps the words, segments, and positions in the ID serialization result into a welding requirement word vector representation of a fixed dimension, and uses the weights calculated according to the attention mechanism to perform weighted fusion to obtain the welding requirement vector, and provides it to the encoder.

[0041] Specifically, the ID sequence word ,part ,Location Mapped into a fixed-dimensional welding requirement word vector representation; for each type of welding requirement embedding (Token, Segment, Position), a separate attention mechanism is used to generate attention weights respectively; the final output welding requirement vector can be expressed as: = + + (1) in, is the dynamic weight calculated according to the attention mechanism.

[0042] Step S113. The encoder projects the welding requirement vector output by the word embedding layer into a low-dimensional space based on the multi-head attention mechanism layer for multi-head attention processing, fuses the processing results to generate a welding requirement vector representation, and inputs the welding requirement vector representation output by the multi-head attention mechanism layer into the KAN network layer for feature mapping to obtain the output of the encoder.

[0043] Specifically, the encoder is composed of 24 encoding layers with the same structure but different parameters stacked in sequence. Each encoding layer contains a multi-head attention mechanism layer and a feedforward neural network layer. The parameter of the multi-head attention mechanism layer can be set to 12, and the intermediate dimension size of the feedforward neural network layer can be set to 3072; the multi-head attention mechanism layer projects the user welding requirement output vector of the word embedding layer into 12 low-dimensional spaces for multi-head attention processing. Each head maintains a separate Q / K / V weight matrix, and generates a welding requirement query vector, key vector and value vector through the corresponding weight matrix. The weight matrix is ​​implemented by the fully connected layer. The specific implementation formula is as follows: (2) (3) (4) in, , and They are the weight matrices of the query, key, and value of the user welding demand vector. After each head generates different Q / K / V matrices to capture different levels or types of user welding demand information, the results of the 12 heads are multi-head embedded and fused to generate a richer representation that captures multi-dimensional user welding demand information in complex welding scenarios. The specific implementation formula is as follows:

[0044] It is understandable that the number of coding layers in the encoder and the specific structural composition of each coding layer can be configured according to actual needs.

[0045] Since the welding process involves complex material properties, process parameters and environmental factors. This embodiment further processes the output of the multi-head attention mechanism by using KAN instead of the traditional feedforward neural network (FFN), and adopts the GELU activation function and adaptive normalization (adaLN) to significantly improve the accuracy and interpretability of the model in the field of welding process. Specifically, the KAN network layer includes more than two KAN layers, and the KAN network layer is used to perform feature mapping on the output of the multi-head attention mechanism layer to obtain the output of the encoder. An adaptive normalization (adaLN) layer is also provided after each KAN layer, and a nonlinear activation function GELU is also provided at the output end of the last KAN layer. The welding process is adaptively normalized (adaLN) after the output of the KAN layer and then input into the GELU activation function, and the GELU activation function is used to further capture the subtle relationship of the welding process.

[0046] In the welding process processing mechanism of the present invention, the output of the KAN network is added to the original user welding demand vector input through a residual connection to effectively reduce the loss of welding process feature information in multiple mappings. In addition, considering the complex and dynamically changing data distribution in the field of welding technology, the present invention adopts an adaptive normalization (adaLN) mechanism in the KAN network, which adjusts the normalization parameters in real time according to the input data distribution, so that the model can better adapt to the characteristic distribution of different process data. Combined with the above design, the KAN mechanism can not only improve the expression ability of nonlinear features, but also enhance the adaptability and interpretability of the model, providing a new solution for the accurate modeling of complex relationships in welding processes.

[0047] In a specific application embodiment, the process of using the KAN network layer to perform feature mapping on the output of the multi-head attention mechanism layer to obtain the encoder output is as follows: Similar to MLP, a K-layer KAN can be described as a nested set of multiple KAN layers: (5) in, represents the i-th layer of the entire KAN network, Represents the composite operation of the function. The input dimension of each layer of KAN is , the output dimension is , by nin nout learnable activation function ϕ composition: (6) Will Input to the first KAN layer ( ) for feature mapping: (7) Adaptive normalization (adaLN) mechanism is used to normalize the output of each layer The normalized processing can be expressed as: (8) in, is the mean of the outputs of the kth layer, is the variance of the k-th layer output, are learnable scaling and offset parameters, is a small constant used for numerical stability.

[0048] Then the output of the first layer The adaptive normalization (adaLN) process can be expressed as: (9) Then input to the second KAN layer ( ): (10) Output of the second layer Perform adaptive normalization (adaLN) processing: (11) The output of the two KAN layers is then input into the GELU activation function: (12) The output of the last KAN layer is input into the GELU activation function to obtain the output of the KAN network layer, which is the output of the encoder.

[0049] Compared with the traditional ReLU activation function, the present embodiment utilizes the smooth transition of the GELU activation function in the negative region to retain more low-amplitude signals, and can effectively avoid slight differences in welding materials or process parameters from being ignored, thereby significantly improving the performance of nonlinear mapping.

[0050] The KAN network layer of this embodiment further processes the output of the multi-head attention mechanism by introducing the B-spline function, which can enhance the nonlinear fitting ability of the input features. B-spline generates high-order smooth curves through control points. Its learnable characteristics enable the model to dynamically adjust the interpolation range and amplitude, especially in the case of extreme changes or discontinuous distribution of welding parameters, which can significantly improve the model's ability to express complex relationships. For example, when dealing with scenes where welding temperature and joint form change dramatically, the high flexibility of B-spline can capture more delicate feature changes, which is conducive to accurate modeling of welding processes.

[0051] This embodiment uses the adaptive normalization (adaLN) method in the KAN network layer to adjust the normalization parameters in real time according to the dynamic distribution of welding data, optimize the adaptability of the model in different environments and process scenarios, such as parameter changes caused by different batches of materials or temperature fluctuations, and significantly improve the generalization ability and accuracy of the model. On this basis, this embodiment introduces the GELU activation function after the KAN network layer, and uses its smooth transition characteristics to retain weak signals, which can further capture the subtle relationships in the welding process, so that the model can show stronger robustness when processing sparse or unbalanced welding data, such as the modeling requirements for the microstructure and process adaptability of the welded joint.

[0052] Step S114: The output layer extracts the welding requirement vector representation output by the last encoder, and maps the extracted welding requirement vector representation to a welding requirement vector output of a fixed dimension after linear transformation.

[0053] Specifically, the output layer can input the welding requirement vector representation output by the encoder into a fully connected layer for linear transformation to map the high-dimensional user welding requirement vector to a fixed-dimensional user welding requirement vector, and use the Swish activation function to represent the welding requirement vector output by the encoder. Mapped to the final welding demand vector Output, for example, the calculation expression can be expressed as: (13) (14) in, represents the Swish activation function, represents the weight matrix of the output layer, represents the bias term, represents adaptive normalization processing, Embedding representation of user welding requirement vector.

[0054] The Swish function has smooth characteristics and asymmetry, which can effectively retain negative information and introduce nonlinear response. The welding demand vector output by the encoder is represented by the Swish activation function. Mapping can make the model more sensitive to the complex feature relationships and data distribution of the welding process. At the same time, the Swish function is not completely saturated in the low-value area, which can capture the subtle features of different welding process schemes to meet the recognition needs of diverse features in the welding process field and enhance the model's expressiveness in fine-grained features.

[0055] Step S02. Identify keywords from the welding requirement vector, and retrieve similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base based on the identified keywords. The welding process knowledge base includes a welding process diagram database and a welding process vector database. The welding process diagram database includes knowledge graphs of different welding processes, in which nodes are used to represent entities and edges are used to represent the relationship between entities. Entities include welding methods, welding types, and welding parameters; the welding process vector database includes text data of different welding processes.

[0056] Specifically, a welding process knowledge base subsystem can be constructed, and contexts similar to the welding requirement vector can be retrieved by searching the welding process knowledge base in the welding process knowledge base subsystem. The welding process knowledge base includes two forms: a welding process diagram database and a welding process vector database. The welding process diagram database can collect and preprocess welding process history cases and rule base documents, slice them, and use the pre-trained large model to extract entities and relationships to obtain knowledge graphs of different welding process solutions, and represent them as knowledge graph vectors and save them to the welding process diagram database. In the vector database construction module, the Embedding model is used to generate vectors for the sliced ​​documents and store them in the welding process vector database to construct a welding process vector database. After obtaining the user's welding requirement vector and identifying the keywords, efficient information retrieval can be achieved by searching from the welding process diagram database and the welding process vector database.

[0057] In a specific application embodiment, the welding process diagram database can be constructed according to the following steps: Step S201. Acquire welding process plan sample data sets and rule standard data sets from different data sources, including welding case libraries, rule libraries, welding process standards, specifications and other files in various formats.

[0058] Specifically, the welding process case includes case conditions and case results, among which the case conditions include base material, base material thickness, joint thickness, joint form, welding position, etc., and the case results include welding current, welding speed, welding voltage, welding material diameter, shielding gas composition, shielding gas flow, wire extension length, wire feeding speed, welding gun inclination, arc starting current / arc ending current, arc starting voltage / arc ending voltage, etc. The welding process rule base includes welding method rule base, welding material rule base, welding wire diameter and extension length rule base, wire feeding speed rule base, welding gun inclination rule base, welding process parameter rule base, etc. The welding process standards and specifications include the basic knowledge of welding methods, welding material characteristics, welding defects and treatment methods, welding equipment use guide, welding process standards and specifications, welding safety requirements and precautions, welding quality inspection standards, welding environment requirements, welding process flow diagrams, and welding quality control measures. It can be understood that the specific file type of the sample file can be selected according to actual needs.

[0059] After obtaining the sample data set, you can also select the appropriate loader according to the source file type (such as pdf, md, word, and txt, etc.), load the collected sample files in various formats, convert the formatted text into an unformatted string, and uniformly convert the extracted text into the specified format to ensure the consistency of the text format.

[0060] Step S202: pre-process each welding process plan data in the welding process plan sample data set to identify key information.

[0061] Specifically, firstly, the text data is cleaned, such as automatically removing redundant symbols, special characters and noise data irrelevant to the welding process (such as headers, footers, picture descriptions, etc.) in the text to retain useful information; the text data is preprocessed, such as removing stop words, standardizing welding terms, word segmentation, removing stop words irrelevant to the welding process, etc. to ensure that key information is retained; the welding process document is word segmented to identify key information units, For example, words such as "of", "is", and "how" that do not affect the search results can be removed, and "how to deal with defects in welding" can be rewritten as "dealing with welding defects"; the welding terms in the welding process documents can be standardized, for example, "welding cracks" may be standardized as "hot cracks" or "cold cracks" to conform to the standard terms in the knowledge base in the system, thereby improving the matching degree; after word segmentation of the welding process documents, key information such as "material selection" and "welding method" can be identified.

[0062] Step S203: After slicing the preprocessed welding process plan data, the data is input into the pre-trained large model to perform at least one round of entity information extraction, and obtain the relationship between the extracted entities.

[0063] Specifically, the processed welding process text data is sliced. For example, a direct segmentation slicing strategy can be used to segment the text according to natural paragraphs to maintain the semantic coherence in the string. The principle of semantic integrity can be followed during the slicing process to avoid splitting closely related natural paragraphs. For example, natural paragraph information such as welding methods and welding parameters should be kept in the same segment. The welding process text data obtained by slicing is used as the input of the pre-trained large model to obtain the basic information of the entities implied in the text data, including welding methods, welding types, welding parameters, etc. Furthermore, to ensure that all entities are completely extracted, the original text segment and the extracted entities can be input into the pre-trained large model again for multiple rounds of entity extraction. After the entity extraction of all documents is completed, the relationship between the entities is extracted, including the ownership relationship and dependency relationship between two different entities.

[0064] Step S204: Construct a welding process knowledge graph based on the extracted entities and the relationships between the entities.

[0065] After the entities and their relationships of all welding process documents are extracted, a welding process knowledge graph is constructed based on the obtained triples, in which nodes represent entities and edges represent the relationships between them.

[0066] Step S205. Use the Embedding model to embed each entity node in the welding process knowledge graph.

[0067] Specifically, after the welding process knowledge graph is constructed, its node embedding is initialized, and the Embedding model is used to perform an initial vector representation on each entity node, where the Embedding model is composed of an input layer, a word embedding layer, an encoder, and an output layer cascaded in sequence.

[0068] Step S206. Perform feature extraction on the welding process knowledge graph after node embedding to obtain the corresponding welding process knowledge graph vector, and the welding process knowledge graph and the corresponding welding process knowledge graph vector constitute a welding process graph database.

[0069] For the welding process knowledge graph after node embedding, the GAT (Graph Attention Networks) network can be used to extract features to obtain the GAT feature graph, which is then represented to obtain the welding process knowledge graph vector. The obtained welding process knowledge graph and its corresponding knowledge graph vector are then saved in the welding process graph database. The GAT network is implemented by stacking graph attention layers by introducing a self-attention mechanism.

[0070] In a specific application embodiment, when constructing a welding process vector database, the sliced ​​welding process text data can be converted into a high-dimensional welding process vector representation using an Embedding model to obtain a knowledge base vector, and then the obtained welding process knowledge base vector and its corresponding text data are stored in the welding process vector database. The welding process knowledge base is obtained from the welding process diagram database and the welding process vector database, and after the keywords are identified from the user's welding demand vector, they are searched from the welding process knowledge base to retrieve similar contexts.

[0071] In a specific application embodiment, the following steps may be adopted to retrieve similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base according to the identified keywords: Step S211. Traverse each knowledge graph in the welding process diagram database according to the keyword, search for a subgraph centered on the keyword, and calculate a first similarity value between the searched subgraph and the welding requirement vector; Step S212. query each welding process text data in the welding process vector database according to the keyword, and calculate the second similarity value between each welding process text data and the keyword; Step S213: Filter out similar contexts of the welding requirement vector according to the first similarity value and the second similarity value.

[0072] In the process of calculating the first similarity, for the local subgraph S obtained, the graph embedding method (Node2Vec) can be used first and the vector dimension can be adjusted to be consistent with the user welding requirement vector, and then the similarity score can be calculated by Euclidean distance and inversion distance. For example, assuming that Node2Vec is used to generate the node embedding , the similarity calculation expression is: (15) (16) in, represents the i-th welding demand vector, represents the embedding vector of the i-th subgraph obtained by searching, represents the vector dimension, represents the welding demand vector With the subgraph embedding vector The Euclidean distance between represents the welding demand vector With the subgraph embedding vector The similarity between .

[0073] After searching the welding process knowledge base according to the keywords, similar contexts may not be retrieved from the welding process knowledge base, or the similarity between the retrieved result and the welding requirement vector does not reach a preset threshold. In this case, the present embodiment further starts the inference engine to perform rule inference based on the welding process rule base, and finally returns the similar contexts obtained by inference by using rule inference. The intelligent reasoning engine designed for the welding process field is started to perform reasoning based on rules to optimize the retrieval effect of low-correlation welding process requirements. When similar contexts cannot be retrieved from the welding process knowledge base, the reasoning engine is started to perform rule reasoning based on the welding process rule base, and finally the similar contexts obtained by reasoning are returned, so that similar contexts can still be accurately obtained when the retrieval results of the welding process knowledge base are unreliable.

[0074] In a specific application embodiment, the following steps may be used for reasoning based on the welding process rule library: Step S221. Identify key point information in the welding requirement vector and extract entity or attribute information therein, wherein the key point information includes welding parameters, welding materials, and defect types; Step S222. Based on the extracted information, the user's welding requirement category is classified to obtain various attribute modules. If there is a corresponding rule in the welding process rule library or it needs to rely on a specified attribute, the rule engine is used to classify the user's welding requirement category. Otherwise, a pre-built welding requirement classification model is used for classification. The attribute modules include welding method, welding position, base material, and joint form, etc.

[0075] For example, the rule engine and deep learning model can be used to classify the welding requirements input by users, and the user requirements can be split and classified and mapped to corresponding modules, such as welding method selection, welding position selection, parent material selection, and joint form selection. For requirements that have corresponding rules in the welding process rule library or need to rely on specified attributes, that is, requirements with clear rules and dependence on specific attributes (such as parent material thickness), the rule engine is used to directly classify them. For some complex and semantic-dependent requirements, the welding requirements input by users are classified using the welding requirement classification model to ensure that the information of each module of user welding requirements (welding method, welding position, parent material, joint form, etc.) can be accurately captured. During the training process of the welding requirement classification model, the welding process vectors in the welding process vector database can be annotated to produce a training set and its corresponding labels.

[0076] In a specific application embodiment, Figure 3 As shown in the figure, the welding requirement classification model includes a feature extraction layer, a classification layer and an output layer connected in sequence. In the feature extraction layer, the welding requirement vector is processed using a pre-trained language model to obtain a welding requirement semantic representation. In the classification layer, a classifier is used to classify the user's welding requirements according to the welding requirement semantic representation, and the classification results are output through the output layer. Specifically, they are: a. In the feature extraction layer, pre-trained language models such as BERT can be used to process user welding requirement vectors , to capture the contextual dependency of the demand vector, the specific formula is expressed as: (17) in, is the embedding matrix of the input word in the user demand vector, It is the user welding requirement word representation matrix output by the BERT layer. Each word vector contains rich context information.

[0077] b. At the classification layer, a welding requirement classification model based on SVM and multi-task learning is used for classification.

[0078] In welding process requirements, some welding defect samples are significantly scarce due to the difficulty in obtaining them. Traditional multi-layer perceptrons (MLPs) are difficult to converge quickly and ensure accuracy when there are few or unbalanced samples. SVM maps data to high-dimensional feature space through kernel functions, and can effectively process high-dimensional feature space to achieve accurate classification of each welding requirement module. SVM has strong generalization ability under small sample conditions, and is particularly suitable for complex and unbalanced classification tasks in the welding field. This embodiment uses SVM as a classifier based on a multi-task learning framework to construct a welding requirement classification model based on SVM and multi-task learning, and uses the multi-task learning framework to divide each category into related subtasks. The overall performance of the classification model is improved by shared feature learning, which can solve the problems of scarce and unbalanced data samples and complex and diverse requirements in the welding process field, so that the model can have efficient decision boundary optimization capabilities and ensure accurate classification of complex welding requirements.

[0079] Furthermore, in order to better adapt to the complexity and diversity of the welding process field, this embodiment sets different hyperparameters (such as penalty parameter C and kernel function type) for each welding requirement category, so that the model can independently analyze the semantic information of different welding requirement categories, which can better adapt to the complexity and diversity of the welding process field. These parameters are optimized through cross-validation, so that the model can independently analyze the semantic information of different welding requirement categories.

[0080] For example, for each welding requirement category, the following formula can be used for feature transformation and classification: (18) (19) (20) (twenty one) (twenty two) in, and Penalty coefficients are set for different welding requirement categories. and They are the kernel functions used by SVM classifiers for different welding requirements, such as linear kernel, polynomial kernel, radial basis function (RBF) kernel, etc., to adapt to the feature distribution of different categories.

[0081] In a specific application embodiment, the loss function of the welding requirement classifier may specifically adopt the weighted sum of the losses of each task (different types of welding requirement classifiers), that is: (twenty three) in, , The weight for each task (welding requirement category) is used to balance the losses of different tasks.

[0082] c. In the output layer, the welding requirements of each category in the classification layer are In the input and output layer, the SVM classification head will make predictions based on the classification threshold. If the prediction result exceeds the preset value, for example , then the category is judged to exist; otherwise, it is judged to not exist.

[0083] For example, the output results of different welding requirement classifiers can be expressed as:

[0084]

[0085]

[0086]

[0087] in, The classifier output results correspond to welding method, welding position, base material, and joint form respectively.

[0088] Step S223. Extract the requirement parameters corresponding to each attribute module according to the classification results of the welding requirement category, search for matching rules from the welding process rule library according to the extracted requirement parameters, and obtain the inferred similar context according to the matched rules, where the rules are the relationship between specific requirement parameters, specific values ​​of input condition variables and output variables of the rules.

[0089] Specifically, after the final classification of each task of user welding requirements, the corresponding specific requirement parameters are extracted for the existing welding requirement categories (welding method, welding position, parent material, joint form). The reasoning engine is used for rule-based reasoning. For example, the production rules of welding process knowledge can be expressed as:

[0090] in, Represents the input conditional variables, that is, the attribute modules classified according to the user's welding requirements, such as welding method, welding position, parent material, etc.; Represents the specific value of the input condition variable, that is, the specific demand parameter extracted; It is the output variable of the rule, indicating the result after reasoning; is the credibility factor, which indicates the credibility of the production rules of knowledge. The inference engine extracts the data of the module corresponding to the user's welding requirements from each module obtained by model classification, that is, extracts the specific information of the user's welding requirements from the classification results of the model. The specific information is the specific value obtained by the model in the classification stage according to the requirements provided by the user (such as welding method, welding position, parent material, etc.), and then matches the rules in the welding process rule library according to these module values. Based on the above rules, each module is matched in the welding process rule library, such as welding method, welding position, parent material, etc. The demand classification result corresponding to each module can be regarded as a part of the conditional variable, and finally the inference result is output to obtain the similar context based on rule reasoning. Each rule in the welding process rule library can be composed of a condition part and a conclusion part, wherein the condition part includes each module of the user's welding requirements (such as welding method, welding position, parent material, etc.), and the conclusion part is the welding process after reasoning and its credibility factor. The inference engine matches each rule in the rule library in turn according to the input demand module value (such as welding method, position, etc.), and the successfully matched rule will trigger the output result. The reasoning process may go through some optimization steps to optimize the rules, such as adjusting the credibility factor based on the historical effect of the rules, or giving priority to certain rules based on contextual information.

[0091] For example: Welding method (X_1): welding types such as "TIG welding" and "MIG welding"; welding position (X_2): "corner welding", "butt welding", etc.; parent material (X_3): for example, "stainless steel", "carbon steel", etc.; welding joint type (X_4): "V-joint", "T-joint", etc.; from the classification results output by the model, the inference engine will extract these required parameter values ​​(such as specific welding methods, material types, etc.) as input for subsequent reasoning. The module value is the specific value of each of the above modules (such as welding method, welding position, parent material, etc.), and these module values ​​correspond to the conditional part of each rule in the inference rule base. For example, a rule in the rule base may be: “if x 1=TIG welding x 2 = fillet welding and x 3 = Carbon steel then T = Applicable welding process A with CF (H, E)", where, x 1 represents the welding method, assuming its value is "TIG welding", x 2 represents the welding position, assuming its value is "fillet welding", x 3 represents the base material, assuming its value is "carbon steel", and CF(H,E) represents the credibility factor.

[0092] During the inference process, the inference engine will first extract the actual module values ​​from the model output (for example, the welding method is "TIG welding" and the welding position is "corner welding"); then use these values ​​to match all the rules in the rule base that meet the conditions. That is, the conditions in the rule must be consistent with the user's input requirements in order to match the rule. If the condition part of a rule is consistent with the user's input requirements, the rule will be triggered and the corresponding inference result will be output. Y (For example: "Applicable welding process A"). The specific process of rule matching may include the following steps: 1) Rule screening: Based on the user's welding requirements (i.e., the specific module values ​​output by the classification model), the inference engine first screens out the rules whose conditional part in the rule base matches the user's requirements. For example, if the user's requirements include "TIG welding" and the welding position is "corner welding", the rules whose conditional part in the rule base matches the user's requirements will be screened out. rules.

[0093] 2) Credibility calculation: Each rule may have a credibility factor CF(H,E) that indicates the reliability or applicability of the rule. The inference engine calculates the credibility of the rule and determines the credibility factor of the rule based on historical data, rule experience accumulation, or other factors.

[0094] 3) Reasoning result output: Generate reasoning results using the matched rules Y , and output the final reasoning result in combination with the credibility factor CF(H,E). For example, the reasoning result may be "applicable welding process A", and accompanied by its credibility factor CF(H,E), indicating the applicability or recommendation of the process.

[0095] We can further adopt a feedback loop approach to incorporate user feedback into model training and adjustment to form a closed-loop optimization to further improve reasoning accuracy.

[0096] Step S03. Integrate the retrieved similar contexts and welding requirement vectors into a welding process description, input the integrated welding process description into the pre-trained large model via a Prompt template, and generate a welding process solution output that meets the user's welding requirements.

[0097] In this embodiment, a welding process enhancement subsystem is constructed, and the welding process enhancement subsystem integrates the retrieved similar context and the welding requirement vector into a welding process description, and the integrated welding process description is input into the pre-trained large model through the Prompt template to enhance the welding process information and generate a welding process solution output that meets the user's welding requirements. Specifically, the retrieved / inferred similar context and user requirement information can be optimized by removing duplicate information, unifying the format and style, and then integrated into a welding process description to optimize and integrate the similar context and the initial user welding requirement, and then put them into the Prompt template together, construct the Prompt input information, and input it into the pre-trained large model, and then adjust the Prompt template according to the large model result.

[0098] In a specific application embodiment, the following steps can be used to integrate similar contexts with welding requirement vectors and optimize and adjust the Prompt template according to the large model results: Step S301: Optimize the similar contexts and the welding requirements initially input by the user.

[0099] Specifically, the optimization process can include removing duplicate information, correcting errors, and unifying formats and styles: removing duplicate information with similar contexts and user welding requirements, such as describing the welding method or process steps in the same way. During the optimization process, the system will automatically delete these redundant information to ensure that the output is more concise and clear. For example, if the user's requirements mention "the thickness of the parent material is 10mm", and the search text also contains similar descriptions, these duplicate parts will be removed; correcting errors in the context or user input, the system will automatically detect and correct these errors based on the professional knowledge base in the welding field. For example, if the welding parameters (such as current) in the search results do not match the parent material, the system will make adjustments by consulting the welding process rule library to ensure rationality; unifying formats and styles, during the optimization process, the system will unify texts from different sources into a standard format to ensure the standardization of the processing flow. For example, for welding parameters in different documents, different units or formats may be used, and the system will automatically convert and standardize them, such as using "mm" as the thickness unit to avoid confusion caused by different formats.

[0100] Step S302. Integrate the optimized user requirements and similar contexts into a welding process description, ensure the coherence and logic of each part of the information, and finally form a structured text suitable for prompt input.

[0101] For example, you can form structured text suitable for prompt input in the following form:

Known information

[0102] For example, the prompt optimization template is: prompt_template="[Instructions] Assuming that you are a senior expert in the field of welding, please provide professional welding process suggestions based on the following known information. Your answer must comply with the standards and specifications of the welding industry. If the known information cannot provide sufficient basis, please say "Based on the current information, no clear suggestions can be given" to avoid introducing uncertain or fabricated content. If welding suggestions can be provided based on the known information, please be sure to explain your suggestions in detail, including relevant welding parameters (such as current, voltage, welding speed, etc.) and the reasons for their selection. Please use Chinese for your answers.\n\n[Known information] {context}\n\n[User needs] {question}\n\n[Answer requirements] Please directly provide a detailed welding process plan for {question}, including but not limited to:\n1. The selection of welding methods and explanation of their applicability.\n2. Recommended values ​​and reasons for welding parameters (current, voltage, welding speed, etc.).\n3. Suggestions for adjustments to welding materials, gas composition or other process details.\n4. References to relevant welding standards or specifications. "context" is the similar context corresponding to the most relevant knowledge base vector returned by the search, and question is the welding requirement entered by the user.

[0103] Furthermore, the welding process knowledge base can be updated and the retrieval process can be dynamically adjusted according to the welding process plan generated by the pre-trained large model. Specifically, a welding process generation subsystem can be constructed, and the welding process generation subsystem uses an optimized prompt template to input the enhanced content into the pre-trained large model. The welding process plan can be generated by the large model to obtain a high-quality and specific welding process solution, forming a welding process expert system. After generating the welding process plan for a period of time, user feedback information is collected, and the weights of the welding process diagram database and the welding process vector database retrieval process in the welding process knowledge base retrieval process are adjusted according to the user feedback information to improve the retrieval effect. For example, the information that the user is satisfied with is used as a positive example, and the information that the user is not satisfied with is used as a negative example, and the weight of the retrieval method corresponding to the positive example is increased, and the weight of the retrieval method corresponding to the negative example is reduced.

[0104] This embodiment further provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0105] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.

[0106] Those skilled in the art should understand that the above-mentioned embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0107] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for intelligently generating a welding process plan based on a vertical large model, characterized in that the steps include: Obtain welding requirement information input by a user, and use an Embedding model to vectorize the welding requirement information to generate a welding requirement vector, wherein the encoder in the Embedding model includes a multi-head attention mechanism layer and a KAN network layer, and the KAN network layer is used to extract features from the output of the multi-head attention mechanism layer to obtain the output of the encoder; Identify keywords from the welding requirement vector, and retrieve similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base according to the identified keywords, wherein the welding process knowledge base includes a welding process diagram database and a welding process vector database, wherein the welding process diagram database includes knowledge graphs of different welding processes, wherein nodes are used to represent entities and edges are used to represent relationships between entities, wherein the entities include welding methods, welding types, and welding parameters; and the welding process vector database includes text data of different welding processes; The retrieved similar contexts are integrated with the welding requirement vector into a welding process description, and the integrated welding process description is input into the pre-trained large model via a Prompt template to generate a welding process plan output that meets the user's welding requirements.

2. The intelligent generation method of welding process plan based on vertical large model according to claim 1 is characterized in that: The Embedding model includes an input layer, a word embedding layer, an encoder, and an output layer connected in sequence. The process of using the Embedding model to vectorize the welding requirement information to generate a welding requirement vector includes: The input layer accesses the sliced ​​user welding demand data and tokenizes it, decomposes the user welding demand data into multiple tokens, arranges the tokens in sequence to form a sequence, and converts the tokens in the sequence into corresponding IDs using the vocabulary to form the corresponding ID serialization result and output it to the word embedding layer; The word embedding layer maps the words, segments and positions in the ID serialization result into a welding requirement word vector representation of a fixed dimension, and obtains a welding requirement vector after weighted fusion using the weights calculated according to the attention mechanism, and provides it to the encoder; The encoder projects the welding requirement vector output by the word embedding layer into a low-dimensional space based on the multi-head attention mechanism layer for multi-head attention processing, fuses the processing results to generate a welding requirement vector representation, and inputs the welding requirement vector representation output by the multi-head attention mechanism layer into the KAN network layer for feature extraction to obtain the output of the encoder; The output layer extracts the welding requirement vector representation output by the last encoder, and maps the extracted welding requirement vector representation to a welding requirement vector output of a fixed dimension after linear transformation.

3. The intelligent generation method of welding process plan based on vertical large model according to claim 2 is characterized in that: The output layer extracts the welding requirement vector representation output by the last encoder, and maps the extracted welding requirement vector representation to a welding requirement vector output of a fixed dimension after linear transformation, including: the output layer inputs the welding requirement vector representation output by the encoder into a fully connected layer for linear transformation, and uses the Swish activation function to convert the welding requirement vector representation output by the encoder into a fixed dimension. Mapped to the final welding demand vector Output, the calculation expression is: in, represents the Swish activation function, represents the weight matrix of the output layer, represents the bias term, represents adaptive normalization processing, Embedding representation of user welding requirement vector.

4. The method for intelligently generating a welding process plan based on a vertical large model according to claim 1 is characterized in that: The KAN network layer includes more than two KAN layers, and the output of the encoder obtained by extracting features from the output of the multi-head attention mechanism layer using the KAN network layer includes: The output of the multi-head attention mechanism layer is input into each KAN layer in turn, and each KAN layer performs feature mapping. After each KAN layer is mapped, the adaptive normalization mechanism is used to normalize the mapping result. The calculation expression is: in, represents the output of the kth KAN layer, represents the mean value of the output of the kth KAN layer, represents the variance of the output of the kth KAN layer, denotes the learnable scaling and offset parameters, is a constant; The output of the last KAN layer is input into the GELU activation function to obtain the output of the KAN network layer, which is the output of the encoder.

5. The method for intelligently generating a welding process plan based on a vertical large model according to claim 1 is characterized in that: It also includes the construction of a welding process diagram database, the steps include: Obtain welding process plan sample data set and rule standard data set; Preprocessing each welding process plan data in the welding process plan sample data set to identify key information; After slicing the preprocessed welding process plan data, the data is input into the pre-trained large model to extract at least one round of entity information, and the relationship between the extracted entities is obtained; Construct a welding process knowledge graph based on the extracted entities and the relationships between them; Using an Embedding model to embed each entity node in the welding process knowledge graph; Perform feature extraction on the welding process knowledge graph after node embedding to obtain the corresponding welding process knowledge graph vector; The welding process map database is composed of the welding process knowledge map and the corresponding welding process knowledge map vector.

6. The method for intelligently generating a welding process plan based on a vertical large model according to claim 5 is characterized in that: The welding process plan sample data set includes plan conditions and plan results of different welding process plans, wherein the plan conditions include any one or more information of base material, base material thickness, joint thickness, joint form, and welding position, and the plan results include any one or more information of welding current, welding speed, welding voltage, welding material diameter, shielding gas composition, shielding gas flow rate, welding wire extension length, wire feeding speed, welding gun inclination angle, arc starting current, arc ending current, arc starting voltage, and arc ending voltage.

7. The intelligent generation method of welding process plan based on vertical large model according to any one of claims 1 to 5, characterized in that: The retrieving similar contexts whose similarity meets preset requirements from a pre-built welding process knowledge base according to the identified keywords includes: Traversing each knowledge graph in the welding process diagram database according to the keyword, searching for a subgraph centered on the keyword, and calculating a first similarity value between the searched subgraph and the welding requirement vector; Querying each welding process text data in the welding process vector database according to the keyword, and calculating a second similarity value between each welding process text data and the keyword; Similar contexts of the welding requirement vector are screened out according to the first similarity value and the second similarity value.

8. The intelligent generation method of welding process plan based on vertical large model according to any one of claims 1 to 5, characterized in that: When a similar context cannot be retrieved from the welding process knowledge base or the similarity between the retrieved result and the welding requirement vector does not reach a preset threshold, the reasoning engine is started to perform rule reasoning based on the welding process rule base, and finally the similar context obtained by reasoning is returned. The base rule reasoning based on the welding process rule base includes: Identify key point information in the welding requirement vector and extract entity or attribute information therein, wherein the key point information includes any one or more information of welding parameters, welding materials and defect types; Based on the extracted information, the user's welding requirement category is classified to obtain various attribute modules, wherein if there is a corresponding rule in the welding process rule library or it needs to rely on a specified attribute, the user's welding requirement category is classified using the rule engine, otherwise the pre-built welding requirement classification model is used for classification, and the attribute modules include welding method, welding position, base material and joint form; According to the classification results of the welding requirement categories, the requirement parameters corresponding to each attribute module are extracted, and matching rules are searched from the welding process rule library according to the extracted requirement parameters. The inferred similar context is obtained according to the matched rules. The rule is the relationship between the specific requirement parameters, the specific values ​​of the input condition variables and the output variables of the rules. Each rule in the welding process rule library includes a condition part and a conclusion part, wherein the condition part includes each attribute module corresponding to the user's welding requirement, and the conclusion part includes the inferred welding process and credibility factor.

9. The method for intelligently generating a welding process plan based on a vertical large model according to claim 8, characterized in that: The welding requirement classification model includes a feature extraction layer, a classification layer and an output layer connected in sequence. In the feature extraction layer, a pre-trained language model is used to process the welding requirement vector to obtain a welding requirement semantic representation. In the classification layer, a classifier is used to classify the user's welding requirements according to the welding requirement semantic representation, and the classification result is output through the output layer.

10. An electronic device comprising a processor and a memory, wherein the memory is used to store a computer program, wherein: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Welding cost and process parameter comprehensive intelligent recommendation method based on knowledge graph

    CN114969553A

  • Distributed RDF data semantic retrieval method and system based on large model

    CN118364073A

  • Medical first-aid text classification method and device based on improved BERT model

    CN118626647A

  • Welding process parameter recommendation method for enhancing large model by using knowledge graph retrieval

    CN119578525A

  • Intelligent question and answer implementation method and system based on hybrid retrieval and deep sorting optimization

    CN119783811A