Vehicle fault knowledge base matching diagnosis method and device based on intelligent dialogue model
Through the intelligent dialogue model and TF-IDF algorithm, quickly match and handle complex fault descriptions, generate personalized diagnosis answers, solve the problem of inadequate and dependent diagnosis in the existing system, and improve the efficiency and accuracy of fault diagnosis.
Patent Information
- Application Number
- CN202411884847.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing vehicle fault diagnosis systems rely on manual experience and simple keyword matching, making it difficult to quickly and accurately handle complex and semantic fuzzy fault descriptions.
The diagnostic method is used to match the vehicle failure knowledge base based on the intelligent dialogue model. Through the TF-IDF algorithm and the similarity of the string, quickly match the failure description and historical maintenance records of the user input, and use a large dialogue model to generate a personalized diagnosis answer.
It improves the accuracy and efficiency of fault diagnosis, reduces manual intervention, can handle complex and semantically ambiguous fault descriptions, and improves the user experience and the overall quality of fault diagnosis.
Smart Images

Figure CN119336888A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle fault diagnosis and intelligent after-sales service, and in particular to a vehicle fault knowledge base matching diagnosis method and device based on an intelligent dialogue model. Background Art
[0002] As the number of cars on the road continues to increase, vehicle maintenance needs are becoming increasingly large and complex. Traditional vehicle maintenance methods mainly rely on the experience of maintenance engineers and maintenance manuals. However, as the types of faults become more diverse and complex, it is often difficult to quickly find a suitable solution when facing new problems simply by relying on manual experience. This situation results in a long troubleshooting and repair process, affecting vehicle efficiency and user experience.
[0003] At present, intelligent knowledge base systems based on historical maintenance work order data are gradually gaining attention. Through the systematic organization and classification of historical vehicle maintenance data, a comprehensive vehicle fault knowledge base can be built to help maintenance personnel quickly query and refer to relevant solutions. However, most existing knowledge base systems rely on manual retrieval or simple keyword matching methods, which cannot accurately match complex fault descriptions, especially when faced with semantically ambiguous or unclear problems, and their effectiveness is greatly reduced.
[0004] Therefore, how to invent a vehicle fault knowledge base matching diagnosis method to improve the accuracy and efficiency of fault diagnosis and reduce the need for manual intervention has become an urgent problem to be solved. Summary of the invention
[0005] To this end, the present invention provides a vehicle fault knowledge base matching diagnosis method and device based on an intelligent dialogue model, which can receive a vehicle fault description input by a user, match similar fault cases in historical data, and automatically generate detailed maintenance suggestions, thereby improving the accuracy and efficiency of fault diagnosis and reducing the need for manual intervention.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model, comprising: By setting up a database, historical maintenance event work orders are obtained; the historical maintenance event work orders are classified to obtain classification results; according to the classification results, work orders with practical solutions are screened and obtained; Extracting business knowledge points from the work order with practical solutions; organizing the business knowledge points into a knowledge point set according to set rules; and building a vehicle failure professional knowledge base based on the knowledge point set; Obtain the user's vehicle problem description through the user terminal; The similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base is calculated by setting an algorithm to obtain the problem similarity; the most suitable knowledge points are selected according to the problem similarity; The most suitable knowledge point selected is combined with the user's vehicle question to generate a prompt text; The Prompt text is input into a large dialogue model and processed by the large dialogue model to generate a diagnostic answer.
[0007] As a preferred solution of the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model, in the process of extracting the business knowledge points from the work order with practical solutions and organizing and generating the knowledge point set according to the set rules, the work order content is divided into question-answer pair data sets according to the fixed format of the work order; useful question-answer pairs are extracted from the question-answer pair data sets; professional knowledge question-answer pairs are screened out from the useful question-answer pairs; and the professional knowledge question-answer pairs are organized to generate the knowledge point set.
[0008] As a preferred solution of the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model, in the process of calculating and obtaining the problem similarity through the set algorithm, the user's vehicle problem and each knowledge point are converted into a TF-IDF vector; according to the TF-IDF vector, the cosine similarity between the user's vehicle problem and each knowledge point is calculated through the cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
[0009] As a preferred solution of the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model, in the process of splicing the most suitable knowledge points screened out with the user's vehicle problem to generate the Prompt text, the most suitable knowledge points screened out are used as known information; the user's vehicle problem is used as the problem to be solved; the known information and the problem to be solved are spliced according to a preset template to generate a User Prompt text.
[0010] As a preferred solution of the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model, in the process of generating the diagnostic answer through the large dialogue model, the large dialogue model is personalized and tuned by setting optimization strategies; the setting optimization strategies include: defining System Prompt strategy, model role-playing strategy, delimiter marking different input part strategy, few sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
[0011] The present invention also provides a vehicle fault knowledge base matching diagnosis device based on an intelligent dialogue model, and the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model includes: The work order screening module is used to obtain historical maintenance event work orders by setting a database; classify the historical maintenance event work orders to obtain classification results; and screen and obtain work orders with practical solutions based on the classification results; A vehicle failure professional knowledge base construction module is used to extract business knowledge points from the work order with practical solutions; organize the business knowledge points into a knowledge point set according to set rules; and construct a vehicle failure professional knowledge base based on the knowledge point set; A user vehicle problem acquisition module is used to obtain a description of the user's vehicle problem through the user terminal; The most suitable knowledge point screening module is used to calculate the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base through a set algorithm to obtain the problem similarity; and screen the most suitable knowledge point according to the problem similarity; A prompt text generation module, used to generate prompt text by combining the most suitable knowledge points selected with the user's vehicle question; The diagnosis answer generation module is used to input the prompt text into the large dialogue model, and generate a diagnosis answer through processing by the large dialogue model.
[0012] As a preferred solution of the vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model, in the vehicle fault professional knowledge base construction module, in the process of extracting the business knowledge points from the work order with practical solutions and organizing and generating the knowledge point set according to the set rules, the work order content is divided into question and answer pair data sets according to the fixed format of the work order; useful question-answer pairs are extracted from the question and answer pair data sets; professional knowledge question and answer pairs are screened out from the useful question-answer pairs; and the professional knowledge question and answer pairs are organized to generate the knowledge point set.
[0013] As a preferred solution of the vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model, in the most suitable knowledge point screening module, in the process of calculating and obtaining the problem similarity through the set algorithm, the user's vehicle problem and each knowledge point are converted into TF-IDF vectors; according to the TF-IDF vector, the cosine similarity between the user's vehicle problem and each knowledge point is calculated by the cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
[0014] As a preferred solution of the vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model, in the Prompt text generation module, in the process of splicing the screened out most suitable knowledge points with the user's vehicle problem to generate the Prompt text, the screened out most suitable knowledge points are used as known information; the user's vehicle problem is used as the problem to be solved; the known information and the problem to be solved are spliced according to a preset template to generate a User Prompt text.
[0015] As a preferred solution for the vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model, in the diagnosis answer generation module, in the process of generating the diagnosis answer through the large dialogue model, the large dialogue model is personalized and tuned by setting optimization strategies; the setting optimization strategies include: defining System Prompt strategy, model role-playing strategy, delimiter marking different input part strategy, few sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
[0016] The present invention has the following advantages: by setting a database, obtaining historical maintenance event work orders; classifying the historical maintenance event work orders to obtain classification results; according to the classification results, screening to obtain work orders with practical solutions; extracting business knowledge points from the work orders with practical solutions; organizing the business knowledge points according to the set rules to generate a knowledge point set; building a vehicle fault professional knowledge base according to the knowledge point set; obtaining the user's vehicle problem description through the user end; calculating the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base through the set algorithm to obtain the problem similarity; screening to obtain the most suitable knowledge point according to the problem similarity; splicing the screened most suitable knowledge point with the user's vehicle problem to generate a prompt text; inputting the prompt text into a large dialogue model, and processing through the large dialogue model to generate a diagnostic answer. The present invention uses the TF-IDF algorithm, and the system can quickly match the most relevant historical maintenance records according to the fault description, rather than simple keyword matching. This not only improves the matching accuracy, but also can handle semantically complex fault descriptions. With the help of the GLM-4 autoregressive dialogue model, the system can generate personalized fault diagnosis and maintenance suggestions based on user input, avoiding the limitations of templated responses and improving user experience. Through the combination of the knowledge base and the intelligent model, the system can automatically learn and update new fault cases, adapt to complex and diverse vehicle problems, and reduce the frequency of manual maintenance and upgrades. The present invention can effectively solve the shortcomings of existing systems such as inaccurate matching, overly templated suggestions, and inability to handle complex problems, thereby improving the accuracy of fault diagnosis and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0018] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0019] Figure 1 This is a flow chart of a vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the architecture of a vehicle fault knowledge base matching diagnosis device based on an intelligent dialogue model provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0020] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Example 1 See also Figure 1 Embodiment 1 of the present invention provides a vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model, comprising the following steps: S1. Obtain historical maintenance event work orders by setting up a database; classify the historical maintenance event work orders to obtain classification results; and screen and obtain work orders with practical solutions based on the classification results; S2. Extracting business knowledge points from the work order with practical solutions; organizing the business knowledge points into a knowledge point set according to set rules; and building a vehicle failure professional knowledge base based on the knowledge point set; S3. Obtain the user's vehicle problem description through the user terminal; S4, calculating the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base by setting an algorithm to obtain the problem similarity; and filtering and obtaining the most suitable knowledge points according to the problem similarity; S5, combining the most suitable knowledge point selected with the user's vehicle question to generate a prompt text; S6. Input the Prompt text into a large dialogue model, and process it through the large dialogue model to generate a diagnostic answer.
[0022] In this embodiment, in step S1, historical maintenance event work orders are obtained by setting a database; the historical maintenance event work orders are classified to obtain classification results; and work orders with practical solutions are screened according to the classification results; Specifically, by setting up a database, historical maintenance event work orders are obtained, classified, and classification results are obtained, and work orders with practical solutions are screened out based on the classification.
[0023] In this embodiment, historical fault repair work orders are classified according to fault type, vehicle component, fault cause and other dimensions, and core knowledge points are extracted to form a special knowledge point set, which solves the problems of information redundancy and inaccurate classification in the prior art.
[0024] In this embodiment, in step S2, business knowledge points are extracted from the work order with practical solutions; the business knowledge points are sorted and generated into a knowledge point set according to the set rules; and a vehicle failure professional knowledge base is constructed according to the knowledge point set; Among them, in the process of extracting the business knowledge points from the work order with practical solutions and organizing and generating the knowledge point set according to the set rules, the work order content is divided into question-answer pair data sets according to the fixed format of the work order; useful question-answer pairs are extracted from the question-answer pair data sets; professional knowledge question-answer pairs are screened out from the useful question-answer pairs; and the professional knowledge question-answer pairs are organized to generate the knowledge point set.
[0025] In this embodiment, the management method of the knowledge base can be implemented in various forms such as NoSQL database, traditional relational database or document storage system, and the specific selection can be optimized and adjusted according to the storage requirements and access frequency of the system.
[0026] In this embodiment, in step S3, a description of the user's vehicle problem is obtained through the user terminal; Specifically, the user inputs the vehicle problem description through the user terminal, and the system receives the user's vehicle problem description through the user terminal.
[0027] In this embodiment, in step S4, the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base is calculated by setting an algorithm to obtain the problem similarity; the most suitable knowledge point is obtained according to the problem similarity; Specifically, in the process of calculating and obtaining the question similarity through the set algorithm, the user's vehicle question and each knowledge point are converted into a TF-IDF vector; according to the TF-IDF vector, the cosine similarity between the user's vehicle question and each knowledge point is calculated through a cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
[0028] In this embodiment, the user's description is matched with the knowledge points in the knowledge base through the TF-IDF vectorization model to ensure that the vehicle failure described by the user can be quickly located to the most relevant historical case, and the most practical solution is provided based on the similarity ranking.
[0029] In this embodiment, in addition to the TF-IDF algorithm, the system can use more advanced natural language processing models such as BERT and FastText to perform similarity calculations, thereby further improving the understanding and matching effects of fault descriptions.
[0030] In this embodiment, in step S5, the most suitable knowledge point selected is concatenated with the user's vehicle question to generate a prompt text; Specifically, the most suitable knowledge point selected is used as known information; the user's vehicle problem is used as the problem to be solved; the known information and the problem to be solved are spliced according to a preset template to generate a User Prompt text.
[0031] In this embodiment, the system automatically selects the most relevant knowledge points based on similarity without manual intervention, thereby improving efficiency and accuracy of recommendations.
[0032] In this embodiment, in step S6, the Prompt text is input into a large dialogue model, and processed by the large dialogue model to generate a diagnostic answer.
[0033] In the process of generating the diagnostic answer through the large-scale dialogue model, the large-scale dialogue model is personalized and tuned by setting optimization strategies; the setting optimization strategies include: defining System Prompt strategy, model role-playing strategy, delimiter marking different input part strategy, few sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
[0034] In this embodiment, compared with the traditional knowledge base system which can only provide preset answers based on matching algorithms, the present invention realizes the generation of personalized fault handling suggestions by accessing the GLM-4 pre-trained language model of Zhipu AI. Its technical implementation includes: Autoregressive filling-in-the-blank mechanism: GLM-4 generates logical natural language answers based on the prompts entered by the user and the system prompts set by the system through autoregressive filling-in-the-blank method, and can provide detailed maintenance suggestions. This technology improves the traditional template-based fixed response method and enhances the user experience.
[0035] Scalable model capabilities: By connecting to the SDK, the system can dynamically update the model, enabling it to improve its ability to handle complex faults as the knowledge base expands.
[0036] In this embodiment, GLM-4 can be replaced by other similar large language models (such as GPT-3, BERT-based generative models), which can also generate targeted maintenance suggestions. Such models can be flexibly selected according to specific business needs.
[0037] In a possible embodiment, the specific fault identification and matching implementation steps are as follows: T1. The user enters a brief description of the vehicle fault on the client, such as "the engine cannot start, and the instrument panel shows that the battery voltage is too low"; T2, the client sends the user's input data to the server via HTTP request; T3. After receiving the user input, the server first calls the text preprocessing module to perform word segmentation on the user's description; T4. The server uses the TF-IDF algorithm + cosine similarity algorithm to calculate the similarity between the fault description input by the user and each knowledge point in the knowledge base; The similarity calculation process includes the following steps: T41. Vectorize the text input by the user; T42, compare all knowledge point vectors in the knowledge base and calculate cosine similarity; T43. Select the top three knowledge points with the highest similarity as reference knowledge points; T5. The server concatenates similar knowledge points and the description entered by the user into a complete input prompt, which is then passed to the pre-trained language model. T6. Call the intelligent dialogue model and input the processed prompt into the intelligent dialogue through the connected SDK. The model will generate answers to the user's fault questions based on the autoregressive filling-in-the-blank method. T7. The server obtains the generated answer and returns it to the client for the user's reference; T8. The client receives the result returned by the server and displays it to the user; for example, the generated answer may include a detailed analysis of the cause of the failure and corresponding maintenance suggestions.
[0038] In summary, the present invention obtains historical maintenance event work orders by setting a database; classifies the historical maintenance event work orders to obtain classification results; based on the classification results, screens and obtains work orders with practical solutions; extracts business knowledge points from the work orders with practical solutions; organizes the business knowledge points according to the set rules to generate a knowledge point set; constructs a vehicle fault professional knowledge base based on the knowledge point set; obtains the user's vehicle problem description through the user end; calculates the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base through the set algorithm to obtain the problem similarity; screens and obtains the most suitable knowledge points according to the problem similarity; splices the screened most suitable knowledge points with the user's vehicle problem to generate a prompt text; inputs the prompt text into a large dialogue model, and generates a diagnostic answer through the large dialogue model processing. The present invention uses the TF-IDF algorithm, and the system can quickly match the most relevant historical maintenance records based on the fault description, rather than simple keyword matching. This not only improves the matching accuracy, but also can handle semantically complex fault descriptions. With the help of the GLM-4 autoregressive dialogue model, the system can generate personalized fault diagnosis and maintenance suggestions based on user input, avoiding the limitations of templated responses and improving user experience. Through the combination of the knowledge base and the intelligent model, the system can automatically learn and update new fault cases, adapt to complex and diverse vehicle problems, and reduce the frequency of manual maintenance and upgrades. The present invention can effectively solve the shortcomings of existing systems such as inaccurate matching, overly templated suggestions, and inability to handle complex problems, thereby improving the accuracy of fault diagnosis and user satisfaction.
[0039] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0040] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0041] Example 2 See also Figure 2 Embodiment 2 of the present invention also provides a vehicle fault knowledge base matching diagnosis device based on an intelligent dialogue model, including: The work order screening module 001 is used to obtain historical maintenance event work orders by setting a database; classify the historical maintenance event work orders to obtain classification results; and screen and obtain work orders with practical solutions based on the classification results; The vehicle failure professional knowledge base construction module 002 is used to extract business knowledge points from the work order with practical solutions; organize the business knowledge points into a knowledge point set according to the set rules; and construct a vehicle failure professional knowledge base based on the knowledge point set; The user vehicle problem acquisition module 003 is used to acquire the user vehicle problem description through the user terminal; The most suitable knowledge point screening module 004 is used to calculate the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base through a set algorithm to obtain the problem similarity; and screen and obtain the most suitable knowledge point according to the problem similarity; Prompt text generation module 005, used to generate prompt text by combining the most suitable knowledge points selected with the user's vehicle question; The diagnosis answer generation module 006 is used to input the prompt text into the large dialogue model, and generate a diagnosis answer through processing by the large dialogue model.
[0042] In this embodiment, in the vehicle failure professional knowledge base construction module 002, in the process of extracting the business knowledge points from the work order with practical solutions and organizing and generating the knowledge point set according to the set rules, the work order content is divided into question and answer pair data sets according to the fixed format of the work order; useful question-answer pairs are extracted from the question and answer pair data sets; professional knowledge question and answer pairs are screened out from the useful question-answer pairs; and the professional knowledge question and answer pairs are organized to generate the knowledge point set.
[0043] In this embodiment, in the most suitable knowledge point screening module 004, in the process of calculating and obtaining the question similarity through the set algorithm, the user's vehicle question and each knowledge point are converted into a TF-IDF vector; according to the TF-IDF vector, the cosine similarity between the user's vehicle question and each knowledge point is calculated through the cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
[0044] In this embodiment, in the Prompt text generation module 005, in the process of splicing the most suitable knowledge points screened out and the user's vehicle problem to generate the Prompt text, the most suitable knowledge points screened out are used as known information; the user's vehicle problem is used as the problem to be solved; the known information and the problem to be solved are spliced according to a preset template to generate a User Prompt text.
[0045] In this embodiment, in the diagnostic answer generation module 006, in the process of generating the diagnostic answer through the large-scale dialogue model, the large-scale dialogue model is personalized and tuned by setting optimization strategies; the setting optimization strategies include: defining System Prompt strategy, model role-playing strategy, delimiter marking different input part strategy, few sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
[0046] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0047] Example 3 Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which program code of a vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model is stored, and the program code includes instructions for executing embodiment 1 or any possible implementation method of the vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model.
[0048] Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0049] Example 4 Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor; The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model of Example 1 or any possible implementation thereof.
[0050] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0051] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0052] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0053] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model, characterized in that: include: Obtain historical maintenance event work orders by setting up a database; Classify the historical maintenance event work orders to obtain classification results; According to the classification results, screen and obtain work orders with practical solutions; Extracting business knowledge points from the work order with practical solutions; organizing the business knowledge points into a knowledge point set according to set rules; Building a vehicle failure professional knowledge base based on the knowledge point set; Obtain the user's vehicle problem description through the user terminal; The similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base is calculated by setting an algorithm to obtain the problem similarity; Filter and obtain the most appropriate knowledge points according to the similarity of the questions; The most suitable knowledge point selected is combined with the user's vehicle question to generate a prompt text; The Prompt text is input into a large dialogue model and processed by the large dialogue model to generate a diagnostic answer.
2. The vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model according to claim 1 is characterized in that: In the process of extracting the business knowledge points from the work order with practical solutions and arranging and generating the knowledge point set according to the set rules, the work order content is segmented into a question-answer pair data set according to a fixed format of the work order; and useful question-answer pairs are extracted from the question-answer pair data set; Filter out professional knowledge question-answer pairs from the useful question-answer pairs; The professional knowledge question and answer pairs are sorted to generate the knowledge point set.
3. The vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model according to claim 2 is characterized in that: In the process of calculating the problem similarity by the set algorithm, the user's vehicle problem and each knowledge point are converted into TF-IDF vectors; according to the TF-IDF vectors, the cosine similarity between the user's vehicle problem and each knowledge point is calculated by the cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
4. The vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model according to claim 3 is characterized in that: In the process of combining the most appropriate knowledge point selected and the user's vehicle question to generate the Prompt text, the most appropriate knowledge point selected is used as known information; The user's vehicle problem is regarded as an unresolved problem; the known information and the unresolved problem are spliced according to a preset template to generate a User Prompt text.
5. The vehicle fault knowledge base matching diagnosis method based on the intelligent dialogue model according to claim 4 is characterized in that: In the process of generating the diagnostic answer through the large-scale dialogue model, the large-scale dialogue model is personalized tuned by setting an optimization strategy; The setting optimization strategy includes: defining System Prompt strategy, model role-playing strategy, delimiter marking different input parts strategy, few-sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
6. A vehicle fault knowledge base matching diagnosis device based on an intelligent dialogue model, adopting a vehicle fault knowledge base matching diagnosis method based on an intelligent dialogue model according to any one of claims 1 to 5, characterized in that: include: The work order screening module is used to obtain the work orders of historical maintenance events by setting the database; Classify the historical maintenance event work orders to obtain classification results; According to the classification results, screen and obtain work orders with practical solutions; A vehicle failure professional knowledge base construction module is used to extract business knowledge points from the work order with practical solutions; organize the business knowledge points into a knowledge point set according to set rules; and construct a vehicle failure professional knowledge base based on the knowledge point set; A user vehicle problem acquisition module is used to obtain a description of the user's vehicle problem through the user terminal; The most suitable knowledge point screening module is used to calculate the similarity between the user's vehicle problem and the knowledge points in the vehicle fault professional knowledge base through a set algorithm to obtain the problem similarity; Filter and obtain the most appropriate knowledge points according to the similarity of the questions; A prompt text generation module, used to generate prompt text by combining the most suitable knowledge points selected with the user's vehicle question; The diagnosis answer generation module is used to input the prompt text into the large dialogue model, and generate a diagnosis answer through processing by the large dialogue model.
7. The vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model according to claim 6 is characterized in that: In the vehicle failure professional knowledge base construction module, in the process of extracting the business knowledge points from the work order with practical solutions and arranging and generating the knowledge point set according to the set rules, the work order content is divided into question-answer pair data sets according to the fixed format of the work order; useful question-answer pairs are extracted from the question-answer pair data sets; Filter out professional knowledge question-answer pairs from the useful question-answer pairs; The professional knowledge question and answer pairs are sorted to generate the knowledge point set.
8. The vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model according to claim 7 is characterized in that: In the most suitable knowledge point screening module, in the process of calculating the problem similarity by the set algorithm, the user's vehicle problem and each knowledge point are converted into a TF-IDF vector; according to the TF-IDF vector, the cosine similarity between the user's vehicle problem and each knowledge point is calculated by the cosine similarity calculation formula; The conversion formula of the TF-IDF vector is: ; In the formula, TF It means that the more a word appears in an article, the more important it is to the article. IDF The more unique a word is in the entire document collection, the more important the word is to a certain article; t express words; d Represents a document; D Represents a collection of documents; The cosine similarity calculation formula is: ; In the formula, Similarity is the cosine similarity between the user description vector and the knowledge point vector; A is the knowledge point vector; B Describe the vector for the user; is the modulus of the knowledge point vector; The magnitude of the user description vector.
9. The vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model according to claim 8 is characterized in that: In the Prompt text generation module, in the process of splicing the most suitable knowledge point selected and the user's vehicle question to generate the Prompt text, the most suitable knowledge point selected is used as known information; The user's vehicle problem is regarded as an unresolved problem; the known information and the unresolved problem are spliced according to a preset template to generate a User Prompt text.
10. The vehicle fault knowledge base matching diagnosis device based on the intelligent dialogue model according to claim 9, characterized in that: In the diagnosis answer generation module, in the process of generating the diagnosis answer through the large-scale dialogue model, the large-scale dialogue model is personalized tuned by setting an optimization strategy; The setting optimization strategy includes: defining System Prompt strategy, model role-playing strategy, delimiter marking different input parts strategy, few-sample learning strategy, specified output length strategy, complex problem decomposition strategy, fixed output format strategy, parameter order input strategy and special character separation strategy.
Citation Information
Patent Citations
Knowledge base text matching question and answer method, device and equipment based on dialogue model
CN118427326A
Cited By
Electric screw press fault diagnosis method and system based on multi-feature fusion
CN120087213A