CN-117056475-B - Knowledge graph-based intelligent manufacturing question-answering method, device and storage medium
Abstract
The invention relates to an intelligent manufacturing question-answering method, device and storage medium based on a knowledge graph, which comprises the following steps of obtaining an intelligent manufacturing data set, extracting entities, constructing an intelligent manufacturing knowledge graph and a question-answering data set according to the extracted entities and the corresponding relation among the entities, performing embedding training on the knowledge graph by adopting a bilinear word embedding algorithm, constructing a knowledge graph entity embedding dictionary, constructing a question-answering model, converting key entities in input questions and questions into embedded vector representations, performing scoring calculation with the vectors of the knowledge graph entity embedding dictionary, selecting answers according to scoring results and outputting the answers, training the question-answering model, obtaining the questions input by a user, extracting the key entities in the questions by utilizing an entity extraction module, inputting the key entities and the questions into the question-answering model, obtaining a candidate answer scoring list, and selecting the answers according to answer scores and outputting the answers. Compared with the prior art, the invention has the advantages of high answer accuracy and the like.
Inventors
- LUO XIN
- HAN JINYU
- XU MENG
- TAO RAN
- SHI YOUQUN
Assignees
- 东华大学
Dates
- Publication Date
- 20260512
- Application Date
- 20230725
Claims (8)
- 1. The intelligent manufacturing question-answering method based on the knowledge graph is characterized by comprising the following steps of: Acquiring an intelligent manufacturing data set, and extracting an entity by utilizing an entity extraction module; according to the extracted entities and the corresponding relation among the entities, constructing an intelligent manufacturing knowledge graph and a question-answer data set; Embedding training is carried out on the knowledge graph by adopting a bilinear word embedding algorithm, and a knowledge graph entity embedding dictionary is constructed; A question-answer model is built, the question-answer model converts the input questions and key entities in the questions into embedded vector representations, score calculation is carried out on the embedded vector representations and the embedded vector representations of the knowledge graph entities in the dictionary, and answers are selected and output according to the scoring results; the method comprises the steps of taking questions of a knowledge graph entity embedded into a dictionary and a question-answer data set as model input, taking answers in the question-answer data set as model output, and training a question-answer model; Acquiring a problem input by a user; extracting key entities in the problem by using an entity extraction module; inputting the key entity and the questions into a question-answer model to obtain a candidate answer score list, selecting an answer according to the answer score, and outputting the answer; wherein, the scoring function adopted by the question-answering model for scoring calculation is as follows: wherein h represents a key entity, r represents a problem, t represents an entity in the knowledge graph, e represents an embedded vector, Representing the vector dot product, re (·) represents the real part of the calculation result in brackets; The specific method for selecting answers according to the scoring results comprises selecting corresponding answers to questions according to scoring characteristics of candidate answers, wherein the scoring characteristics refer to first-order difference result characteristics of a scoring list, and the specific description is that a scoring sequence of candidate entities is assumed to be Its first order differential sequence is Wherein Calculating the average value of the first-order differential sequence And standard deviation And define a threshold value Determining an outlier: wherein i * represents an outlier, argmin represents minimizing the expression in brackets; The candidate answer before the outlier position index is selected as the answer to the user question.
- 2. The intelligent manufacturing question-answering method based on the knowledge graph according to claim 1, wherein the specific method for constructing the intelligent manufacturing knowledge graph is that entities and relations are in one-to-one correspondence, knowledge triples are generated, duplication removal processing is carried out, and the knowledge graph is constructed according to the triples after duplication removal.
- 3. The intelligent manufacturing question-answering method based on the knowledge graph of claim 1 is characterized in that the method for constructing the question-answering data set is characterized by comprising the steps of creating a question template and a corresponding CQL statement, searching the created knowledge graph, placing an entity in a blank of the question template, searching an answer from the knowledge graph according to the CQL of the template to complete the manufacturing of the question-answer pair, repeating the steps until all the entities in the knowledge graph are placed in the corresponding question template to complete the manufacturing of the intelligent manufacturing question-answer data set, and automatically clearing the corresponding question when the condition that the answer does not exist in the knowledge graph for the question formed after the entity is placed in the question template occurs.
- 4. The knowledge-graph-based intelligent manufacturing question-answering method according to claim 1, wherein the knowledge graph is subjected to embedding training by adopting a bilinear word embedding algorithm, and a knowledge-graph entity embedding dictionary is constructed specifically by converting all entities in the knowledge graph into low-dimensional vectors by adopting the bilinear word embedding algorithm for representation, and the knowledge-graph entity embedding dictionary is constructed, wherein the dictionary is a key value pair list of the entities and the corresponding low-dimensional vectors.
- 5. The knowledge-graph-based intelligent manufacturing question-answering method according to claim 1, wherein the question-answering model converts input questions and key entities in the questions into an embedded vector representation, and the model adopted by the embedded vector representation is a Bi-LSTM neural network.
- 6. The knowledge graph-based intelligent manufacturing question-answering method according to claim 1, wherein a continuous identifier is added to a key entity in a question in advance before a question input by a user is input into the entity extraction module, wherein the continuous identifier refers to any identifier added to two sides of the key entity in the question.
- 7. An intelligent manufacturing question-answering device based on a knowledge graph, comprising a memory, a processor and a program stored in the memory, wherein the processor implements the method of any one of claims 1-6 when executing the program.
- 8. A storage medium having a program stored thereon, wherein the program, when executed, implements the method of any of claims 1-6.
Description
Knowledge graph-based intelligent manufacturing question-answering method, device and storage medium Technical Field The invention relates to the field of knowledge graphs, in particular to an intelligent manufacturing question-answering method and device based on knowledge graphs and a storage medium. Background The knowledge graph stores information in the form of triples of entities, relations and entities, can formally describe things and relations of the things in the real world, and improves knowledge expression capability. The question-answering system based on the knowledge graph utilizes natural language processing technology to automatically search, understand and integrate related information according to questions proposed by users, and generate and return accurate and brief answers. Therefore, knowledge-graph-based question-answering systems are widely used in the fields of medical treatment, security, manufacturing, and the like. At present, most knowledge graph question-answering systems are based on semantic analysis, identify entities and relations in user questions by using named entity identification, then link with the entities in the knowledge graph, convert the entities into formalized logic expressions such as SPARQL and CQL sentences according to a predefined rule template, and finally directly retrieve from a graph database, or process the user questions by using an encoding-decoding technology to obtain feature vectors, then remove knowledge graphs from the feature vectors of the questions to obtain candidate answer subgraphs, and finally filter and prune to obtain answers to the questions. The main defects are as follows: (1) Knowledge-graph-based question-answering systems are widely used in various fields, but large knowledge graphs and corresponding question-answering data sets are not disclosed in the field of intelligent manufacturing; (2) Ambiguity can occur when an entity obtained from a user problem is linked with a knowledge graph by using a named entity identification or coding mode, so that the link accuracy is low, and one predicate in natural language can have a plurality of different expression forms; (3) The above method has low accuracy for the problems involving multi-hop reasoning; (4) The current knowledge-graph question-answering algorithm is fixed for the choice of answers to questions, but the number of answers to actual questions is usually uncertain. Disclosure of Invention The invention aims to provide an intelligent manufacturing question-answering method, device and storage medium based on a knowledge graph, which avoid ambiguity of semantic information of a user problem by adding a continuous identifier for the problem, convert a question-answering task into similarity matching of a head entity vector, a question vector and all entity vectors in the knowledge graph, improve accuracy related to multi-hop reasoning problems, and flexibly select the number of answers by using a first-order difference mode. The aim of the invention can be achieved by the following technical scheme: An intelligent manufacturing question-answering method based on a knowledge graph comprises the following steps: Acquiring an intelligent manufacturing data set, and extracting an entity by utilizing an entity extraction module; according to the extracted entities and the corresponding relation among the entities, constructing an intelligent manufacturing knowledge graph and a question-answer data set; Embedding training is carried out on the knowledge graph by adopting a bilinear word embedding algorithm, and a knowledge graph entity embedding dictionary is constructed; A question-answer model is built, the question-answer model converts the input questions and key entities in the questions into embedded vector representations, score calculation is carried out on the embedded vector representations and the embedded vector representations of the knowledge graph entities in the dictionary, and answers are selected and output according to the scoring results; the method comprises the steps of taking questions of a knowledge graph entity embedded into a dictionary and a question-answer data set as model input, taking answers in the question-answer data set as model output, and training a question-answer model; Acquiring a problem input by a user; extracting key entities in the problem by using an entity extraction module; and inputting the key entity and the questions into a question-answer model to obtain a candidate answer score list, selecting an answer according to the answer score, and outputting the answer. The specific method for constructing the intelligent manufacturing knowledge graph comprises the steps of corresponding the entities and the relations one by one, generating a knowledge triplet, performing duplication removal treatment, and constructing the knowledge graph according to the duplication-removed triplet. The construction method of the question-answer data set