Machining process information query method and equipment and storage medium
By combining large language models and knowledge graphs in the field of machining process technology, we build a machining process knowledge graph, which solves the problem of lack of authenticity and accuracy of generated results, achieves instant and accurate problem response results, and improves work efficiency and User experience.
Patent Information
- Application Number
- CN202410614719.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-10-11
AI Technical Summary
It is difficult for existing technology to effectively combine large language models and knowledge graphs in the field of machining technology, resulting in a lack of authenticity and accuracy in generated results.
By obtaining the input question text, convert it into a query statement using a large language model, and retrieve the corresponding process knowledge in the constructed machining process knowledge graph to generate question response results. The method includes entity recognition and relationship extraction, using Electra and CNN-BiLSTM-CRF models to build a knowledge graph, and combining it with the Vicuna model for natural language parsing.
It achieves instant, accurate, and easy-to-understand problem response results, improves work efficiency, reduces repetitive tasks, and improves user experience, helping enterprises solve practical problems and meet specific needs.
Smart Images

Figure CN118760734A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the fields of mechanical engineering, artificial intelligence and intelligent manufacturing technology, and specifically relates to a machining process information query method, a machining process information query device and a computer-readable storage medium. Background Art
[0002] In recent years, with the continuous development of knowledge engineering, more and more manufacturing companies are seeking to integrate knowledge engineering into this field. Knowledge graphs have powerful knowledge representation and reasoning capabilities in the process field. They can automatically and intelligently discover and reason about implicit knowledge from multiple perspectives from existing knowledge, providing strong support for innovation and development in the process field. Many studies have shown that knowledge graphs are of great significance in product design and development, improving product quality, optimizing process flow, and reducing production costs. Therefore, the application background of knowledge graphs in the process field is extensive and far-reaching. It can not only improve the innovation ability and competitiveness of the process field, but also bring practical benefits and value to enterprises.
[0003] However, with the continuous development and improvement of technology, the construction of knowledge graphs in the process field faces some challenges. Due to the professionalism and complexity of the process field, it is difficult to obtain a large amount of professional field data and knowledge from the Internet. Therefore, it is necessary to explore the automatic construction method of process field knowledge graphs based on the characteristics of manufacturing enterprises and the data and knowledge accumulated by the enterprises themselves, so as to realize the automatic construction of knowledge graphs in the machining process field.
[0004] In addition, large language models (LLMs) have achieved remarkable results in a variety of natural language processing tasks. However, when faced with problems in professional fields, the results generated by large language models may lack authenticity and accuracy. Therefore, how to effectively combine large language models with knowledge graphs is also a topic worth studying. Summary of the invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a machining process information query method, a machining process information query device and a computer-readable storage medium, so as to solve the problem that the prior art cannot effectively combine large language models with knowledge graphs in the field of machining process technology.
[0006] According to a first aspect of the present disclosure, a method for querying machining process information is provided, comprising:
[0007] Obtain input question text for asking questions about machining process;
[0008] Parsing the question text using a large language model to convert the question text described in natural language into a query statement;
[0009] Using the query statement, the corresponding process knowledge is retrieved in the machining process knowledge graph to obtain machining process knowledge data; the machining process knowledge graph is a graph constructed to organize and represent knowledge data in the machining process;
[0010] The machining process knowledge data and the question text are input into a large language model to generate a question response result.
[0011] Optionally, the process of constructing the machining process knowledge graph includes:
[0012] Obtain the original data of machining process, define the entities of machining process and the relationship between entities, and build the knowledge ontology model of machining process;
[0013] An entity recognition model is used to extract entities from the machining process knowledge data;
[0014] An entity relationship recognition model is used to extract the relationship in the machining process knowledge data;
[0015] The extracted entities and relationships are converted into graph structures and stored in a graph database to generate a machining process knowledge graph.
[0016] Optionally, the extracting entities from the machining process knowledge data using an entity recognition model includes:
[0017] Preprocessing the machining process knowledge data, generating annotated files using the BIO three-dimensional annotation method, and using the annotated files as a data set, dividing the data set into a training set and a test set, and segmenting the text into equal lengths;
[0018] Use the Electra pre-trained model to obtain the word embedding of process text and complete the vectorization representation of input data;
[0019] The word vectors are passed to the CNN-BiLSTM-CRF deep learning model for training, and the trained entity recognition model is used to extract entities in the corpus.
[0020] Optionally, the extracting the relationship in the machining process knowledge data by using an entity relationship recognition model includes:
[0021] The Electra model is used to obtain the word embedding vector of the machining process knowledge data; the relative position vector is obtained according to the position information of the two entities, the word embedding vector and the relative position vector are vector spliced, the spliced vector representation is passed to the segmented convolutional neural network model for training, and the trained entity relationship recognition model is used to extract the relationship in the machining process knowledge data.
[0022] Optionally, the entities defining the machining process and the relationships between the entities include:
[0023] Based on the characteristics of machining process knowledge structure, the entities of machining process and the relationships between entities are defined; the types of entities include part information ontology, technical requirements, process resources and process information; the relationships between entities include: inclusion relationship, association relationship, temporal relationship and application relationship;
[0024] Among them, the part information body is used to describe the basic information of the parts, including the part ID and name; the technical requirements include processing accuracy requirements, surface treatment requirements, and heat treatment requirements; the process resources include the machine tools and equipment resources involved in the machining process; the machining process information body includes the process name and process steps.
[0025] Optionally, after obtaining the machining process knowledge data, the following steps are also included:
[0026] Data preprocessing of machining process knowledge data: structured and semi-structured data from relational databases or table files are processed using a template mapping-based approach; after data cleaning of unstructured data, the data is processed into text format for storage.
[0027] Optionally, the step of converting the extracted entities and relationships into a graph structure and storing it in a graph database to generate a machining process knowledge graph includes:
[0028] The extracted entities and relationships are converted into graph structures and stored in the Neo4j graph database to generate a machining process knowledge graph.
[0029] Optionally, the step of parsing the question text using a large language model to convert the question text described in a natural language into a query statement includes:
[0030] The Vicuna model is used to extract the sentence trunk of the question text described in natural language, taking the question text described in natural language as input and outputting the parsing result of the original question;
[0031] The parsing results are converted into query statements using a rule-based statement parsing method;
[0032] Among them, the Vicuna model is pre-trained using the ShareGPT dataset, uses SwiGLU as the activation function, and adopts rotational position encoding instead of absolute position encoding.
[0033] According to a second aspect of the present disclosure, a machining process information query device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, any one of the machining process information query methods described above is implemented.
[0034] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned machining process information query methods is implemented.
[0035] The machining process information query method provided in the present application obtains the input question text asking questions about the machining process; uses a large language model to parse the question text and converts the question text described in natural language into a query statement; uses the query statement to retrieve the corresponding process knowledge in the machining process knowledge graph to obtain the machining process knowledge data; inputs the machining process knowledge data and the question text into the large language model to generate a question response result. Among them, the machining process knowledge graph can automatically generate structured process knowledge from complex process information through computer processing, and further effectively integrates the knowledge graph with the large language model, which can provide instant, accurate, and easy-to-understand question response results, helping enterprises solve practical problems and meet specific needs, improving work efficiency, reducing repetitive tasks, and improving the user experience. In addition, the present application also provides a machining process information query device and a computer-readable storage medium with the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0037] Figure 1 A flowchart of a specific implementation method of the machining process information query method provided in this application;
[0038] Figure 2 A flowchart for constructing the machining process knowledge graph;
[0039] Figure 3 This is a schematic diagram of the automatic construction of the machining process knowledge graph and the knowledge question-answering process;
[0040] Figure 4 Flow chart of intelligent question and answer for machining process provided for this application;
[0041] Figure 5 It is a schematic diagram of the machining process model;
[0042] Figure 6 Mark process diagrams for machining process entities;
[0043] Figure 7 A schematic diagram of the process entity extraction model;
[0044] Figure 8 It is a schematic diagram of the process relationship extraction model;
[0045] Fig. 9 To realize the partial display effect diagram of the graph database;
[0046] Fig.10 This is a schematic diagram of a natural sentence parsing model based on a large language model;
[0047] Fig.11 This is a schematic diagram of question answering with a large language model fused with process knowledge graph;
[0048] Fig.12 This is a structural block diagram of the machining process information query device provided in this application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that, in the absence of conflict, the embodiments in the present disclosure and the features in the embodiments can be combined, separated, interchanged and / or rearranged with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0050] The terms used here are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used here, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used here, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0051] A flowchart of a specific implementation method of the machining process information query method provided in this application is as follows Figure 1 As shown, the method specifically includes:
[0052] S101: Obtain input question text regarding machining process.
[0053] Specifically, the question text input by the user can be obtained from the user interface, and the user question text can be obtained by form submission, API call or direct input.
[0054] S102: Analyze the question text using a large language model, and convert the question text described in natural language into a query statement.
[0055] Large Language Models (LLMs) are a powerful class of models in the field of Natural Language Processing (NLP) that use deep learning techniques, especially the Transformer architecture, to understand and generate human language.
[0056] After receiving the question text, the question text can be preprocessed. Specifically, it can include but is not limited to: cleaning the question text. For example, remove irrelevant symbols, stop words and noise information in the text, such as extra spaces, punctuation, etc. Use regular expressions and natural language processing libraries (such as NLTK, spaCy) to clean the text. The question text can also be standardized to convert the text into a standard format, including unified terminology, expanded abbreviations, and corrected spelling errors.
[0057] The Vicuna model is used to extract the sentence trunk of the question text described in natural language, taking the question text described in natural language as input and outputting the parsing result of the original question. The parsing result is converted into a query statement using a rule-based sentence parsing method; the Vicuna model is pre-trained using the ShareGPT dataset, using SwiGLU as the activation function, and using rotation position encoding instead of absolute position encoding.
[0058] It is understandable that natural language is a language used in daily life, such as Chinese or English.
[0059] S103: Using the query statement, retrieve corresponding process knowledge in the machining process knowledge graph.
[0060] It can be understood that the machining process knowledge graph is a graph constructed to organize and represent knowledge data in the machining process. By combining the characteristics of the machining process knowledge structure, a process knowledge ontology model is constructed, and a machining process knowledge acquisition method for multi-source heterogeneous data is established based on a deep learning model, and the entity relationship is stored in a graph database.
[0061] The query statement is used to query in the machining process knowledge graph, obtain the corresponding process knowledge, and obtain the machining process knowledge data.
[0062] S104: Inputting the machining process knowledge data and the question text into a large language model to generate a question response result.
[0063] The retrieved machining process knowledge data is input into the large language model in the form of prompts together with the question text. The large model generates and outputs question response results with professional knowledge through reasoning, and obtains easy-to-read natural language explanations.
[0064] The machining process information query method and machining process knowledge graph provided in this application can automatically generate structured representation of process knowledge from complex process information through computer processing, and further effectively integrate the knowledge graph with the large language model, so as to provide instant, accurate and easy-to-understand response results to questions, help enterprises solve practical problems and meet specific needs, improve work efficiency, reduce repetitive tasks, and improve the user experience.
[0065] Based on the above embodiments, Figure 2 , the process of constructing the machining process knowledge graph may specifically include the following steps:
[0066] S201: Acquire the original data of machining process, define the entities of machining process and the relationship between the entities, and construct the knowledge ontology model of machining process.
[0067] Collect and organize relevant machining process raw data, including manufacturing enterprise databases, processing technology manuals in the manufacturing industry, and expert experience, and conduct systematized and multi-granular analysis of process knowledge. Classify process knowledge according to its characteristics to form a structured machining process knowledge system.
[0068] Based on the characteristics of machining process knowledge structure, the entities of machining process and the relationships between entities are defined. The types of entities include part information ontology, technical requirements, process resources and process information; the relationships between entities include: inclusion relationship, association relationship, timing relationship and application relationship.
[0069] Among them, the part information body is used to describe the basic information of the parts, including the part ID and name; the technical requirements include processing accuracy requirements, surface treatment requirements, and heat treatment requirements; the process resources include the machine tools and equipment resources involved in the machining process; the machining process information body includes the process name and process steps.
[0070] S202: extracting entities from the machining process knowledge data using an entity recognition model.
[0071] The Electra+CNN+BiLSTM+CRF algorithm is used to train the labeled process entity dataset to obtain the entity recognition model.
[0072] Specifically, the machining process knowledge data is preprocessed, and the BIO three-dimensional annotation method is used to generate annotated files. The annotated files are used as data sets, and the data sets are divided into training sets and test sets, and the text is segmented into equal lengths. The Electra pre-trained model is used to obtain the word embedding of the process text to complete the vectorized representation of the input data. The word vector is passed to the CNN-BiLSTM-CRF deep learning model for training, and the trained entity recognition model is used to extract entities in the corpus.
[0073] S203: extracting the relationships in the machining process knowledge data using an entity relationship recognition model.
[0074] The Electra+PCNN algorithm is used to train the labeled process entity relationship dataset to obtain the entity relationship recognition model.
[0075] Specifically, the Electra model is used to obtain the word embedding vector of the machining process knowledge data; the relative position vector is obtained according to the position information of the two entities, the word embedding vector and the relative position vector are concatenated, and the concatenated vector representation is passed to the segmented convolutional neural network model for training, and the trained entity relationship recognition model is used to extract the relationship in the machining process knowledge data.
[0076] S204: Convert the extracted entities and relationships into a graph structure and store it in a graph database to generate a machining process knowledge graph.
[0077] The extracted entities and relationships are converted into graph structures and stored in the Neo4j graph database to generate a machining process knowledge graph.
[0078] Neo4j is a high-performance NOSQL graph database that uses a graph structure to store, retrieve, and manage data. It can intuitively represent the relationship between entities and support complex queries and analysis.
[0079] The method provided in this embodiment can realize the rapid construction of a machining process knowledge graph and provide accurate and comprehensive process knowledge to process personnel.
[0080] After obtaining the machining process knowledge data, it also includes: data preprocessing of the machining process knowledge data: for structured and semi-structured data from relational databases or table files, a template-based mapping method is used for processing; after data cleaning of unstructured data, the data is processed into text form for storage.
[0081] It is understandable that the machining process information query method can be implemented as an intelligent question and answer application for machining process knowledge. The intelligent question and answer receives questions raised by users in natural language, understands these questions through the machining process information query method provided by this application, and provides question response results as answer outputs, which are presented to users.
[0082] Reference Figure 3 The schematic diagram of the automatic construction of the machining process knowledge graph and the knowledge question answering process is shown in FIG. The following is a specific example to further elaborate on the machining process intelligent question answering provided by this application. The process flow chart is as follows Figure 4 As shown, it specifically includes:
[0083] S401: Construct a machining process ontology model.
[0084] Taking the machining process of typical parts of aircraft engines as an example, the OWL ontology language is used to construct a structured standard knowledge description model. On this basis, the knowledge modeling of the machining process of typical parts of aircraft engines is realized. Among them, the model layer design is designed based on the experience of domain experts, defining the relevant concepts such as typical parts process and components of aircraft engines and the relationship between concepts. In processing unstructured data, entity types mainly include parts, technical requirements, process resources and process information; the relationships between entities include: inclusion relationship, association relationship, temporal relationship, application relationship, etc.
[0085] The part information ontology mainly describes the basic information of typical parts, including part ID, name, etc. The process resources mainly describe the machine tools and equipment resources involved in the machining process. The technical requirements mainly include machining accuracy requirements, surface treatment requirements, heat treatment requirements, etc. The machining process information ontology mainly includes process name, process steps and other information.
[0086] In this embodiment, the protege ontology editing software can be used to describe and model the machining process information model. The specific machining process ontology model is as follows: Figure 5 shown.
[0087] S402: Preprocessing the machining process knowledge data.
[0088] Machining process knowledge data can be divided into structured, semi-structured and unstructured data. For structured and semi-structured data from relational databases or table files, a template-based mapping method is used for processing. This processing process is relatively easy. For knowledge acquisition of text unstructured data, it comes from process manuals, literature reports, etc. The knowledge expression is complex and diverse, and knowledge extraction is required from sentences. Data preprocessing is performed on the unstructured data of process texts. The process texts contain a large amount of unstructured data, and data cleaning is required to remove irrelevant characters, special symbols, HTML tags, URLs, etc. in the text. After data cleaning of the unstructured data, the tables and formulas are processed into text form, and the processed process text data is saved in the form of txt files.
[0089] S403: Process entity recognition and relationship extraction.
[0090] like Figure 6 Schematic diagram of the machining process entity annotation process. The process text is manually annotated using brat, and the process text data is annotated using the BIO annotation method. The first character of the named entity is represented by "B", the last character is represented by "I", and the non-named entity is represented by "O". The label name corresponds to the machining process ontology; the entity relationship annotation uses the predefined concept relationship to convert the annotated text into txt format. Figure 6 As shown, for example: "There are many methods for processing gears, the main methods are gear hobbing, gear shaping, gear milling and gear grinding. Gear hobbing is the process of processing gears with a hob on a gear hobbing machine", where the gear is a component entity, gear hobbing, gear shaping, gear milling and gear grinding are process entities, and the gear hobbing machine is a process resource entity.
[0091] Then, the relationship between entities in the process text is annotated, and the file is converted into txt format after the annotation is completed. According to the relationship between the concepts in the ontology model, the relationship between process text entities is defined as shown in Table 1:
[0092] Table 1
[0093] Serial number Relationship Type Examples 1 Inclusion Process-step and other inclusion relationships 2 Association of The relationship between parts and related processes 3 Timing relationship (After) Sequential relationship between processes and steps 4 Application relationship (Call for) Relationship between process entities and related resource entities
[0094] like Figure 7 As shown in the schematic diagram of the process entity extraction model, this application adopts a deep learning method based on the Electra-CNN-BiLSTM-CRF model to realize the entity recognition task in the machining process text.
[0095] The first layer is the Electra encoding layer. The Electra model has made some improvements and innovations based on the BERT model, effectively reducing the model size and improving the model operation efficiency. It converts the machining process text into the corresponding dense vector representation by fully learning the relationship between text characters and context.
[0096] The second layer is a convolutional neural network (CNN) layer. CNN is an effective method for extracting local feature information of sentences. In the embodiment of the present application, the pre-identified entity features form local features that guide annotation, and CNN is used to extract the local feature information.
[0097] The third layer is the bidirectional neural network BILSTM layer. The input of BiLSTM is the word vector output by the Electra encoding layer. By superimposing two positive and negative recurrent neural networks (RNN), the sequence output tensor is calculated. The BILSTM layer can automatically extract the features of the sentence and obtain more comprehensive semantic information by capturing the character information and order information of the text sequence.
[0098] The fourth layer is the conditional random field (CRF) layer. CRF is a discriminative undirected graph model. During the training process, the model parameters are learned using maximum likelihood estimation, and the Viterbi algorithm is used to further decode to obtain the label sequence with the largest probability model. This embodiment uses batch-based gradient descent to optimize hyperparameters, where the batch size is 64, the Adam optimizer is used, the learning rate is set to 0.001, and the number of hidden nodes for LSTM forward propagation and back propagation is 200. The CNN layer sets the convolution kernel size to 2, the number of convolution kernels to 200, the number of convolution layers to 1, and uses the ReLU() activation function. The specific implementation principle is as follows: Figure 7 shown.
[0099] like Figure 8 Schematic diagram of the process relationship extraction model. This embodiment adopts the relationship extraction method based on the Electra-PCNN model to realize the task of extracting the relationship between entities in the machining process text. In the construction of the process ontology in the previous article, the model layer defines four major relationships: "inclusion relationship", "association relationship", "sequential relationship" and "application relationship".
[0100] The Electra-PCNN model mainly includes input layer, embedding layer, convolution layer, segmented maximum pooling layer and classification layer. The embedding layer uses the Electra model to obtain the word embedding vector of the process text; secondly, the relative position vector is obtained according to the position information of the two entities; finally, the word embedding vector and the position vector are concatenated to obtain the final vector representation and passed to the PCNN model for subsequent processing. The relationship extraction task is a multi-classification problem, and the Adam algorithm is used to optimize the model loss.
[0101] S404: Knowledge storage based on Neo4j.
[0102] The embodiment of this application uses Neo4j graph database to store machining process knowledge graph. Some data are shown as follows: Fig. 9 The following figure shows the partial display effect of implementing the graph database. Neo4j is a high-performance NOSQL graph database that uses a graph structure to store, retrieve, and manage data. It can intuitively represent the relationship between entities and support complex queries and analysis. It has the following advantages:
[0103] (1) Intuitive representation of relationships: Neo4j uses nodes and edges to represent entities and their relationships, which makes complex relationship networks easy to understand and query.
[0104] (2) High performance: Neo4j uses native graph storage and retrieval technology, which can quickly process large amounts of data and support real-time analysis.
[0105] (3) Flexible queries: Neo4j’s Cypher query language allows users to write complex graph queries in an intuitive way.
[0106] (4) Scalability: Neo4j supports distributed deployment and horizontal expansion and can handle large-scale knowledge bases.
[0107] S405: Natural question parsing based on large language model.
[0108] like Fig.10 Schematic diagram of natural sentence parsing model based on large language model. The embodiment of the present application uses Vicuna model to parse natural questions. Vicuna model is pre-trained using ShareGPT dataset, uses SwiGLU as activation function, and adopts rotation position encoding instead of absolute position encoding. The pre-trained Vicuna model cannot obtain more accurate results for natural language processing in the field of machining technology. It is necessary to provide a dataset in the field of machining technology for the model to further learn and fine-tune the model to solve natural language processing problems in professional fields.
[0109] First, the Vicuna model is used to extract the main sentence of natural questions, taking the natural language question as input and outputting the parsing result of the original question. For example, the question "Aerospace typical spiral bevel gear processing technology z" is input into the Vicuna training model, and the corresponding parsing result is "["Part Name": Aviation Typical Spiral Bevel Gear]-(Processing Technology)->["Process": Answer]".
[0110] Then, the question parsing results are converted into Cypher statements using a rule-based statement parsing method. For example, "["Part name": Aviation typical spiral bevel gear]-(Processing technology)->["Process": Answer]" is parsed as "MATCH(a:Part{name":Aviation typical spiral bevel gear"})-[:]->(b:process)".
[0111] S406: Intelligent question and answer on process knowledge.
[0112] like Fig.11 As shown in the schematic diagram of question and answer combining a large language model with a process knowledge graph, for the field of machining technology, the embodiment of the present application combines the process knowledge graph with a large language model to generate answers with professional knowledge.
[0113] The embodiment of the present application retrieves professional knowledge related to process problems based on the constructed machining process knowledge graph, and inputs it into the large model together with the question in a prompting manner to obtain comprehensive and accurate answers. The input text format is "In {vertical field}, please refer to the following data: {professional knowledge}, answer the question: {the question entered by the user}." The content in "{}" is changeable content. For example: "In the field of machining technology, please refer to the following data: blank-ordinary turning-ordinary turning-quenching and tempering-CNC turning-CNC turning-rough milling-fine milling-copper plating-quenching and tempering-CNC turning-CNC turning-end face grinding-inner hole grinding-spline key insertion-tooth grinding-gear chamfering-magnetic particle detection-inspection, answer the question: typical aviation spiral bevel gear processing technology z".
[0114] As a specific example, this embodiment adopts the Wenxinyiyan large language model. Of course, other large language models can also be used, which is not limited here.
[0115] This application aims to solve the problem of information islands in machining processes and proposes a knowledge graph construction technology and intelligent question and answer technology for machining processes. In view of the large amount of unstructured text data generated during the process, a large language model and knowledge graph technology are used to extract knowledge from the above unstructured text, realizing the automatic acquisition of process knowledge. At the same time, based on the constructed process knowledge graph, the large language model is integrated to realize the question and answer of machining process knowledge and intelligent application, thereby improving production efficiency and quality.
[0116] At present, process text files mainly rely on semi-manual and semi-automatic knowledge extraction, and the efficiency of knowledge acquisition is low. By studying the automatic construction method of process knowledge graph, complex process information can be automatically generated into structured process knowledge through computer processing. Knowledge Q&A that integrates large language models and knowledge graphs can help companies solve problems and meet needs by providing instant, accurate, and easy-to-understand answers, improve work efficiency, reduce repetitive tasks, and improve user experience. Through automated response and continuous learning, knowledge Q&A can continuously optimize and adapt to corporate needs and promote the smooth digital transformation of related companies.
[0117] In addition, the present application also provides a machining process information query device, such as Fig.12 As shown, the device includes a memory 11 and a processor 12, wherein the memory 11 stores a computer program, and when the computer program is executed by the processor 12, any one of the above-mentioned machining process information query methods is implemented.
[0118] In addition, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned machining process information query methods.
[0119] Computer readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0120] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0121] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0122] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for querying machining process information, characterized in that: include: Obtain input question text for asking questions about machining process; Parsing the question text using a large language model to convert the question text described in natural language into a query statement; Using the query statement, the corresponding process knowledge is retrieved in the machining process knowledge graph to obtain machining process knowledge data; The machining process knowledge graph is a graph constructed to organize and represent knowledge data in the machining process; The machining process knowledge data and the question text are input into a large language model to generate a question response result.
2. The machining process information query method according to claim 1, characterized in that: The process of constructing the machining process knowledge graph includes: Obtain the original data of machining process, define the entities of machining process and the relationship between entities, and build the knowledge ontology model of machining process; An entity recognition model is used to extract entities from the machining process knowledge data; An entity relationship recognition model is used to extract the relationship in the machining process knowledge data; The extracted entities and relationships are converted into graph structures and stored in a graph database to generate a machining process knowledge graph.
3. The machining process information query method according to claim 2, characterized in that: The extracting of entities from the machining process knowledge data by using an entity recognition model includes: Preprocessing the machining process knowledge data, generating annotated files using the BIO three-dimensional annotation method, and using the annotated files as a data set, dividing the data set into a training set and a test set, and segmenting the text into equal lengths; Use the Electra pre-trained model to obtain the word embedding of process text and complete the vectorization representation of input data; The word vectors are passed to the CNN-BiLSTM-CRF deep learning model for training, and the trained entity recognition model is used to extract entities in the corpus.
4. The machining process information query method according to claim 2, characterized in that: The extracting of the relationship in the machining process knowledge data by using the entity relationship recognition model includes: The Electra model is used to obtain the word embedding vector of the machining process knowledge data; the relative position vector is obtained according to the position information of the two entities, the word embedding vector and the relative position vector are vector spliced, the spliced vector representation is passed to the segmented convolutional neural network model for training, and the trained entity relationship recognition model is used to extract the relationship in the machining process knowledge data.
5. The machining process information query method according to any one of claims 2 to 4, characterized in that: The entities defining the machining process and the relationships between the entities include: Based on the characteristics of machining process knowledge structure, the entities of machining process and the relationships between entities are defined; the types of entities include part information ontology, technical requirements, process resources and process information; the relationships between entities include: inclusion relationship, association relationship, temporal relationship and application relationship; Among them, the part information body is used to describe the basic information of the parts, including the part ID and name; the technical requirements include processing accuracy requirements, surface treatment requirements, and heat treatment requirements; the process resources include the machine tools and equipment resources involved in the machining process; the machining process information body includes the process name and process steps.
6. The machining process information query method according to claim 5, characterized in that: After obtaining the machining process knowledge data, it also includes: Data preprocessing of machining process knowledge data: structured and semi-structured data from relational databases or table files are processed using a template mapping-based approach; after data cleaning of unstructured data, the data is processed into text format for storage.
7. The machining process information query method according to any one of claims 2 to 4, characterized in that: The extracted entities and relationships are converted into a graph structure and stored in a graph database to generate a machining process knowledge graph, including: The extracted entities and relationships are converted into graph structures and stored in the Neo4j graph database to generate a machining process knowledge graph.
8. The machining process information query method according to any one of claims 1 to 4, characterized in that: The using of the large language model to parse the question text and convert the question text described in natural language into a query statement comprises: The Vicuna model is used to extract the sentence trunk of the question text described in natural language, taking the question text described in natural language as input and outputting the parsing result of the original question; The parsing results are converted into query statements using a rule-based statement parsing method; Among them, the Vicuna model is pre-trained using the ShareGPT dataset, uses SwiGLU as the activation function, and adopts rotational position encoding instead of absolute position encoding.
9. A machining process information query device, characterized in that: It comprises a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the machining process information query method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the machining process information query method according to any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Knowledge graph construction method for process data in numerical control machining field
CN113987212A
Auxiliary retrieval method fusing knowledge graph and large language model
CN117633252A
E-commerce customer service question answering method and device, equipment and medium
CN117910580A
Cited By
Numerical control file analysis method and equipment for deep sea connector and medium
CN119576875A
Multi-format document intelligent audio content generation system and method
CN119724153A
Process intelligent question-answering method and system based on process model
CN122507818A
