Automobile field question answering retrieval system based on big model and knowledge graph
By using the combination of large models and knowledge graphs in the automotive intelligent question-and-answer system, combined with LoRA fine-tuning technology and vector recall technology, a complete knowledge graph is built, and the existing system's insufficient accuracy and flexibility in complex query and contextual correlation processing is solved, achieving more efficient information retrieval and user experience.
Patent Information
- Application Number
- CN202411698692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The existing automotive intelligent question-and-answer knowledge base search system has poor accuracy and flexibility when dealing with complex queries, synonyms, polysynonyms and contextual relevance, and cannot meet the users' deep information needs.
The automotive field question-and-answer search system is adopted based on large models and knowledge graphs. Through data collection, entity extraction, graph construction and graph query modules, combined with LoRA fine-tuning technology and vector recall technology, a complete knowledge graph of structured and unstructured data is built to achieve efficient information retrieval and correlation reasoning.
It improves the recall accuracy and flexibility of the automotive Q&A business, can more accurately match the information in the user query and knowledge base, and improves the reply effect and user experience of smart Q&A.
Smart Images

Figure CN119202139B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to an automobile field question-answering retrieval system based on a large model and a knowledge graph. Background Art
[0002] With the rapid development of big model technology, the knowledge base and information requirements of automotive question-answering business are also growing rapidly. In addition, in the intelligent question-answering business in the automotive field, an efficient and accurate knowledge base retrieval system is also an important part of the question-answering business system. Therefore, there is an urgent need for a knowledge base retrieval system that can improve the recall accuracy and flexibility to help improve the response effect of intelligent question-answering. In the existing automotive intelligent question-answering knowledge base retrieval system: Type 1 mainly relies on keyword matching and Boolean retrieval. This method returns results by searching the database for documents that match the keywords that appear in the user's query. Its advantages are simple implementation and fast speed, but when dealing with complex queries, synonyms, polysemous words and contextual relevance, the accuracy and flexibility are poor, and it cannot meet the user's deep information needs; Type 2 The general vector recall method relies on natural language processing technology, converting text into vectors (embedding), and then using the similarity in the vector space for retrieval. This method can better capture the semantic similarity between texts and is suitable for processing complex and diverse queries. However, this method may recall the wrong component failure document when dealing with specific keyword content, such as component failure.
[0003] Chinese patent publication number CN113505209A discloses an intelligent question-answering system for the automotive field, including: a knowledge base module, a visualization interaction module, an intention recognition module, a graph matching module, a template matching module, a retrieval module and an end-to-end module; the knowledge base module stores a knowledge graph and a corpus in the automotive field; when a user inputs a question, the user input content is judged, and the corresponding module of the system is called to process according to the different user purposes judged to obtain the answer to the question. The user purpose is divided into two categories: automotive field questions and small talk. For automotive field questions, a question-answering method based on the automotive field knowledge graph is used to obtain the answer to the question; for small talk, an end-to-end module based on deep learning is used to generate the answer. The present invention can improve the classification accuracy and accurately identify the user's intention; it can be seen that the scheme relies on predefined templates and trigger words when performing template matching, which may cause the system to have a weak understanding of new questions, and the diversity of user questions may cause wrong matching, and there are problems such as low accuracy of automotive field user question-answering retrieval and poor user experience. Summary of the invention
[0004] The purpose of the present invention is to provide an automobile field question-answering retrieval system based on a large model and a knowledge graph to solve at least one of the problems existing in the prior art.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A question-answering retrieval system in the automotive field based on a large model and knowledge graph, including:
[0007] Data collection module, used to collect logarithmic data and text data;
[0008] A data segmentation module is used to clean the conversation data and extract paragraphs from the text data, and is also used to segment the cleaned conversation data and the text data after paragraph extraction into text blocks for storage;
[0009] The entity extraction module is used to perform NER task reasoning from text blocks based on the large model combined with LoRA fine-tuning technology to extract entity information;
[0010] Guide analysis module, which is used to standardize and rewrite user's first query and summarize the SOP process;
[0011] The graph construction module is used to construct the relationship between the first query and other nodes based on the standardized rewritten user's first query as the main node, and the extracted entity information, stored text blocks and SOP processes as other nodes to form a complete knowledge graph composed of structured and unstructured data;
[0012] The graph query module is used to extract entity information from new queries submitted by users, filter the extracted entity information to obtain candidate nodes, calculate the cosine similarity between the new queries submitted by users and the candidate nodes, and push search results to users based on the calculation results.
[0013] Furthermore, the data segmentation module includes a conversation data processing unit and a text data processing unit. The conversation data processing unit is used to remove HTML dirty data, emoticons, names, mobile phone numbers and keyword hits from the conversation data, and divide the processed conversation data into text blocks for storage.
[0014] Furthermore, the text data processing unit is used to extract paragraphs from the text data, and divide the text data after paragraph extraction into text blocks for storage.
[0015] Furthermore, the entity extraction module constructs the training data through the base model, sets the LoRA fine-tuning parameters, and fine-tunes the named entity recognition task through model inference loading to extract entity information.
[0016] Furthermore, the guided analysis module includes a query rewriting unit and a process summary unit. The query rewriting unit is used to perform standardized rewriting on the user's first query according to the big model, and the rewritten result will be used as the query main node in the knowledge graph.
[0017] Furthermore, the process summarizing unit summarizes the SOP process using a large model based on multiple rounds of dialogue data.
[0018] Furthermore, the graph construction module is used to use the standardized rewritten user's first query as the main node, use langchain and vector model Bge to convert the user's first query into vector form and store it in the Neo4j graph database, and use the extracted entity information, stored text blocks and SOP processes as other nodes to build the relationship between the first query and other nodes to form a complete knowledge graph composed of structured and unstructured data.
[0019] Furthermore, the graph query module includes a node filtering unit, a similarity calculation unit and a push unit. The node filtering unit is used to extract entity information for new queries submitted by users, and perform fuzzy matching on the extracted entity information through cypher statements to filter the extracted entity information, thereby filtering out relevant nodes in the constructed graph and using them as candidate nodes.
[0020] Furthermore, the similarity calculation unit calculates the cosine similarity between the new query submitted by the user and the candidate node to obtain similarity similarity(A, B).
[0021] Furthermore, the push unit is used to sort the similarities between each candidate node and the new query submitted by the user in descending order, and perform a relationship query on the top K candidate nodes with the highest similarity to query for the relationship nodes corresponding to the complete information, and push them to the user.
[0022] The beneficial effects of the present invention are as follows: by combining the graph and vector recall technology, the recall accuracy and flexibility of the automobile question-answering business are improved. At the same time, the construction of the graph can make full use of the information in the multi-round dialogue of users to form a rich knowledge base; and the hybrid retrieval vector recall technology can accurately match the user query with the information in the knowledge base to improve the recall accuracy; in addition, the present invention also adopts a large model and LoRA fine-tuning technology to further improve the accuracy and efficiency of the NER task. Therefore, the present invention has a wide range of application prospects and important practical value in the automobile intelligent question-answering business retrieval system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 This is a schematic diagram of the structure of the automobile field question-answering retrieval system based on a big model and a knowledge graph in this embodiment.
[0025] Figure 2 Schematic diagram of the structure of the data segmentation module in this embodiment.
[0026] Figure 3 This is a schematic diagram of the structure of the guidance analysis module of this embodiment.
[0027] Figure 4 Schematic diagram of the structure of the graph query module of this embodiment. DETAILED DESCRIPTION
[0028] In order to more clearly illustrate the present invention, the present invention is further described below in conjunction with preferred embodiments and accompanying drawings. Similar components in the accompanying drawings are represented by the same reference numerals. It should be understood by those skilled in the art that the content specifically described below is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.
[0029] It should be noted that, although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0030] See also Figure 1 As shown, it is a structural diagram of the automobile field question answering retrieval system based on a large model and a knowledge graph in this embodiment. The system includes:
[0031] The data collection module is used to collect conversation data and text data. The conversation data is real multi-round conversation data, and the text data is text data such as automotive knowledge manuals. This embodiment does not specifically limit the collection method of conversation data and text data. Those skilled in the art can freely set it as long as the collection requirements of conversation data and text data are met. The sources of conversation data are private data generated by company applications obtained from the log system and crawled from forum data related to the automotive industry. The sources of text data are obtained from the official website and purchased from third-party companies.
[0032] Please continue reading Figure 1As shown, the system includes a data segmentation module, which is used to clean the conversation data and extract paragraphs from the text data, and is also used to segment the cleaned conversation data and the text data after paragraph extraction into text blocks for storage. The data segmentation module is connected to the data acquisition module.
[0033] See also Figure 2 As shown, the data segmentation module includes:
[0034] The conversation data processing unit is used to remove HTML dirty data, emoticons, names, mobile phone numbers and keyword hit processing from the conversation data, and divide the processed conversation data into text blocks for storage; by removing useless data such as HTML and emoticons, the conversation content is made purer and more concise, while removing private information such as names and mobile phone numbers protects user privacy, and keyword hit processing enables key content (such as technician introduction, etc.) to be effectively removed, making the retrieval more accurate.
[0035] The text data processing unit is used to extract paragraphs from the text data and divide the text data after paragraph extraction into text blocks for storage. The text data processing unit is connected to the dialogue data processing unit. Through paragraph extraction, unstructured data such as automotive field knowledge manuals can be better structured (such as using OCR technology), thereby improving the availability of data, facilitating the system to accurately understand and retrieve the text in context, and then provide accurate and specific knowledge when answering questions.
[0036] It can be understood that the method of processing keyword hits is not specifically limited in the present embodiment, and those skilled in the art can set it freely, as long as the requirements for keyword hit processing are met, wherein the technician's self-introduction in the conversation can be used as a keyword to perform keyword hit processing on the conversation data; the method of extracting paragraphs from text data is not specifically limited in the present embodiment, and those skilled in the art can set it freely, as long as the requirements for extracting paragraphs from text data are met, wherein paragraph extraction can be performed by using layout analysis, OCR, etc.
[0037] Please continue reading Figure 1 As shown, the system includes an entity extraction module, which is used to perform NER task reasoning from text blocks based on a large model combined with LoRA fine-tuning technology to extract entity information. The entity extraction module is connected to the data segmentation module; by combining LoRA fine-tuning technology to perform NER task reasoning, key information in the automotive field (such as vehicle model, manufacturer, fault code, etc.) is accurately extracted from the text block. Compared with the unfine-tuned model, the fine-tuned large model has higher accuracy in semantic understanding and entity extraction, and can provide high-confidence data support for subsequent knowledge graph construction and retrieval.
[0038] It can be understood that the setting of the large model is not specifically limited in this embodiment, and those skilled in the art can set it freely as long as the setting requirements of the large model are met, wherein the large model can be set to Qwen1.5-14B-Chat.
[0039] Specifically, in this embodiment, the base model Qwen1.5-14B-Chat is constructed through training data, the LoRA fine-tuning parameters are set, and the model inference is loaded to fine-tune the named entity recognition task to extract entity information; when constructing the training data, the GPT-4 model is combined with manual annotation to generate 1500 training data, which is convenient for subsequent model fine-tuning and practical verification. When fine-tuning the model, the basic parameters are set as follows: the number of training rounds (epochs) is 5, and the learning rate (learning_rate) is set to 5e-05 to ensure the convergence and stability of the model during the training process; after completing the model fine-tuning, the trained model is loaded for reasoning to achieve the actual application effect of the named entity recognition (NER) task.
[0040] Specifically, the construction of training data in this implementation and the prompt used for reasoning can be set to "You are an expert in entity extraction and text summarization in the automotive field. Please extract the relevant entity information in the following text and summarize the content of the text. The extraction requirements and summary requirements are as follows:
[0041] Requirements: 1. Extract car manufacturers from the text, such as FAW-Volkswagen, SAIC Volkswagen; 2. Extract car brands from the text, such as Audi, Toyota; 3. Extract car models from the text, such as X3, Q5; 4. Extract car years from the text, such as 2022, 2015; 5. Extract car styles from the text, such as Audi Q5 2022 Premium Edition; 6. Extract car parts from the text, such as engine, electronic steering lock; 7. Extract car fault codes from the text, such as P0032, P0301; 8. Extract car fault phenomena from the text, such as not lighting up, stuck, locked; 9. Summarize the causes of car failures in the text; 10. Summarize the solutions to car problems in the text;
[0042] The final extraction result is returned in the form of a fixed dictionary. If there is no relevant content information in the text, fill in "None" in the corresponding result returned.
[0043] Specifically, the entity information described in this embodiment includes but is not limited to automobile brand, model, year, style, fault code, parts and fault phenomenon.
[0044] Please continue reading Figure 1As shown, the system includes a guidance analysis module, which is connected to the entity extraction module. The guidance analysis module is used to standardize the rewriting of the user's first query and summarize the SOP process. Through the standardized rewriting of the user's first query, the guidance analysis module can significantly improve the semantic accuracy and retrieval effect of the query, avoid information retrieval deviation caused by unclear or non-standard query problems expressed by the user, and at the same time, combined with the historical conversation content, ensure the consistency and coherence of multiple rounds of conversations, so that the system can more intelligently understand and respond to the user's complex needs.
[0045] See also Figure 3 As shown, the guidance analysis module includes:
[0046] The query rewriting unit is used to perform standardized rewriting of the user's first query based on the big model, and the rewritten result will be used as the query main node in the knowledge graph; the standardized rewriting follows specific rules to ensure that the rewritten query is correct, concise, and closely related to the historical conversation content.
[0047] Specifically, in this embodiment, the prompt used for standardized rewriting of the user's first query according to the large model is not specifically limited. Those skilled in the art can set it freely as long as the prompt setting requirements are met. Among them, the prompt used for standardized rewriting of the user's first query can be set to "Please rewrite it into a new query based on the original query and the historical conversation content. The rewritten query needs to meet the following conditions: 1. If there is content related to the original query in the historical conversation content, the original query is rewritten into a new query in combination with the historical conversation content; 2. If there is no content related to the original query in the historical conversation content, the rewritten query is consistent with the original query; 3. The rewritten query must be kept within 100 words; 4. Output plain text directly. The following is the question: Historical conversation content: {dialogs} Original query: {origin_query} Rewritten query:"
[0048] The process summary unit is used to summarize the SOP process based on the multi-round dialogue data using a large model. Through professional instructions and examples, the model is guided on how to generate corresponding solutions or suggestions based on the user's question type, thereby effectively helping users solve car-related problems. The process summary unit is connected to the query rewriting unit.
[0049] Please continue reading Figure 1As shown, the system includes a graph construction module, which is connected to the guidance analysis module. The graph construction module is used to use the standardized rewritten user's first query as the main node, use langchain and vector model Bge to convert the user's first query into a vector form and store it in the Neo4j graph database, and use the extracted entity information, stored text blocks and SOP processes as other nodes to build the relationship between the first query and other nodes to form a complete knowledge graph composed of structured and unstructured data;
[0050] Through the combination of langchain and vector model, vectorized storage and processing of query information is realized, and a Neo4j graph database with relatively complex relationships and rich information is constructed. By taking the user's standardized query as the main node, the extracted entities, text data blocks, SOP processes, etc. are organically combined to construct a complete knowledge graph that integrates structured and unstructured data. The result not only standardizes data relationships, but also promotes efficient information search and association reasoning, making the query results closer to the actual needs of users.
[0051] Specifically, except for the user's first query, other nodes are not stored in the form of vectors. The manufacturer, brand, model, year, style, component, fault code, fault phenomenon, etc. are used as keyword query filter conditions combined with vector query, and the SOP process and solution are returned as query results.
[0052] Please continue reading Figure 1 As shown, the system includes a graph query module, which is connected to the graph construction module. The graph query module is used to extract entity information from new queries submitted by users, filter the extracted entity information to obtain candidate nodes, calculate the cosine similarity between the new queries submitted by users and the candidate nodes, and push retrieval results to users based on the calculation results.
[0053] See also Figure 4 As shown, the graph query module includes:
[0054] The node filtering unit is used to extract entity information from new queries submitted by users, and perform fuzzy matching on the extracted entity information through cypher statements to filter the extracted entity information, thereby filtering out relevant nodes in the constructed graph and using them as candidate nodes; by performing entity filtering on the user's new query, candidate nodes that match the graph nodes are screened out, reducing the system's computational complexity, ensuring accurate retrieval in massive data, and improving the speed and accuracy of response.
[0055] The similarity calculation unit is used to calculate the cosine similarity (A, B) between the new query submitted by the user and the candidate node. The calculation formula is: , the similarity analysis unit is connected to the node filtering unit, wherein A, B represent the vector representation of the user query query and the vector representation of the candidate node query respectively, A·B represents the dot product of vector A and vector B, ||A|| X ||B||: represents the product of the modules of vector A and vector B.
[0056] The push unit is used to sort the similarity between each candidate node and the new query submitted by the user in descending order, and perform a relationship query on the top K candidate nodes with the highest similarity to find the relationship nodes corresponding to the complete information and push them to the user. The push unit is connected to the similarity calculation unit; the candidate nodes are sorted according to the similarity between each node, and the most relevant K nodes are pushed to the user. This process optimizes the accuracy and relevance of the information ultimately obtained by the user, selects the solution or information that best fits the user's problem from a large amount of candidate information, and significantly improves the user's query satisfaction.
[0057] Specifically, this embodiment does not impose any specific limitation on the value of K, and those skilled in the art can freely set it as long as the value requirements of K are met. Among them, the optimal value of K is 5.
[0058] Specifically, the candidate nodes described in this embodiment are generally fault symptoms, and the corresponding relationship nodes are fault causes, solutions, and SOP process nodes. Their relationship is fault symptoms->fault causes->solutions->SOP process. Through cypher statements, the relationship nodes of the top k candidate nodes in similarity are returned.
[0059] Specifically, the user's first query in this embodiment is a query request raised for the first time by the user during a multi-round dialogue process; the query newly submitted by the user is a query request raised again after the user interacts with the system, based on the information returned by the system or after further thinking by the user.
[0060] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the embodiments here. All obvious changes or modifications derived from the technical solution of the present invention are still within the protection scope of the present invention.
Claims
1. A question-answering retrieval system in the automotive field based on a large model and knowledge graph, characterized in that: include: Data collection module, used to collect logarithmic data and text data; A data segmentation module is used to clean the conversation data and extract paragraphs from the text data, and is also used to segment the cleaned conversation data and the text data after paragraph extraction into text blocks for storage; The entity extraction module is used to perform NER task reasoning from text blocks based on the large model combined with LoRA fine-tuning technology to extract entity information; Guide analysis module, which is used to standardize and rewrite user's first query and summarize the SOP process; The graph construction module is used to construct the relationship between the first query and other nodes based on the standardized rewritten user's first query as the main node, and the extracted entity information, stored text blocks and SOP processes as other nodes to form a complete knowledge graph composed of structured and unstructured data; The graph query module is used to extract entity information from new queries submitted by users, filter the extracted entity information to obtain candidate nodes, calculate the cosine similarity between the new queries submitted by users and the candidate nodes, and push the search results to users based on the calculation results; The graph construction module uses the standardized rewritten user's first query as the main node, uses langchain and the vector model Bge to convert the user's first query into vector form and store it in the Neo4j graph database, and uses the extracted entity information, stored text blocks and SOP processes as other nodes to build the relationship between the first query and other nodes to form a complete knowledge graph composed of structured and unstructured data.
2. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 1 is characterized in that: The data segmentation module includes a conversation data processing unit and a text data processing unit. The conversation data processing unit is used to remove HTML dirty data, remove emoticons, remove names, mobile phone numbers and keyword hits from the conversation data, and divide the processed conversation data into text blocks for storage.
3. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 2 is characterized in that: The text data processing unit is used to extract paragraphs from the text data, and divide the text data after paragraph extraction into text blocks for storage.
4. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 3 is characterized in that: The entity extraction module constructs the training data through the base model Qwen1.5-14B-Chat, sets the LoRA fine-tuning parameters, and fine-tunes the named entity recognition task through model inference loading to extract entity information.
5. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 4 is characterized in that: The guided analysis module includes a query rewriting unit and a process summary unit. The query rewriting unit is used to perform standardized rewriting on the user's first query according to the big model, and the rewritten result will be used as the query main node in the knowledge graph.
6. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 5 is characterized in that: The process summarizing unit summarizes the SOP process using a large model based on multiple rounds of dialogue data.
7. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 6 is characterized in that: The graph query module includes a node filtering unit, a similarity calculation unit and a push unit. The node filtering unit is used to extract entity information for new queries submitted by users, and to perform fuzzy matching on the extracted entity information through cypher statements to filter the extracted entity information, thereby filtering out relevant nodes in the constructed graph and using them as candidate nodes.
8. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 7 is characterized in that: The similarity calculation unit calculates the cosine similarity between the new query submitted by the user and the candidate node to obtain similarity similarity(A, B).
9. The automobile field question answering retrieval system based on a large model and knowledge graph according to claim 8, characterized in that: The push unit is used to sort the similarities between each candidate node and the new query submitted by the user in descending order, and perform a relationship query on the top K candidate nodes in terms of similarity to query the relationship nodes corresponding to the complete information, and push them to the user.
Citation Information
Patent Citations
Intelligent question answering system for automobile field
CN113505209A
Method and device for generating merger and acquisition knowledge graph
CN115905571A
RAG question and answer method and system based on knowledge graph and medium
CN118673126A