A vehicle fault analysis method, system and device
Patent Information
- Application Number
- CN202610781913.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]为了克服传统故障应对方式难以适应新型号车辆或复杂故障场景,导致故障分析的准确性较低的问题,本申请提供了一种车辆故障分析方法、系统及设备
[0009]本申请的有益效果是:基于用户输入的车辆故障问题在针对车辆的实时故障向量知识库中进行近似最近邻搜索,得到符合预设要求的故障知识信息,并利用预设的答案生成模型,基于车辆故障问题和故障知识信息进行约束分析,生成故障分析结果。这样,通过构建针对车辆的实时故障向量知识库,能够实时更新车辆的故障向量知识,以灵活应对新型号车辆或复合型故障场景,从而能够在结合更新的实时故障向量知识库与用户输入的车辆故障问题进行约束分析时,充分考虑到新型号车辆或复合型故障场景中的故障因素,进而能够提高故障分析的准确性。
Smart Images

Figure CN122838596A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault analysis technology, and in particular to a vehicle fault analysis method, system and equipment. Background Technology
[0002] With the development of technology, vehicles have become an indispensable means of transportation in people's lives. For example, fire trucks, as key equipment in emergency rescue systems, directly affect the success or failure of firefighting and rescue missions due to their operational reliability. In actual use, fire trucks often experience various malfunctions due to the complexity of their mechanical, hydraulic, electrical, or control systems. Traditional methods of handling vehicle malfunctions mainly rely on the accumulated experience of operators or consulting paper / electronic maintenance manuals, which suffers from slow response times, low knowledge acquisition efficiency, and difficulty for novice personnel to make accurate judgments. To improve the efficiency of malfunction handling, some organizations have tried to introduce expert systems or rule engines to solidify common malfunctions and solutions into an "if-then" rule base. However, such systems have limited knowledge coverage and are difficult to adapt to new vehicle models or complex malfunction scenarios, resulting in low accuracy in malfunction analysis. Summary of the Invention
[0003] To overcome the problem that traditional fault response methods are difficult to adapt to new vehicle models or complex fault scenarios, resulting in low accuracy of fault analysis, this application provides a vehicle fault analysis method, system, and device.
[0004] Firstly, in order to solve the aforementioned technical problems, this application provides a vehicle fault analysis method, including: Build a real-time fault vector knowledge base for vehicles; Receive vehicle malfunction information from the user; Based on vehicle fault problems, an approximate nearest neighbor search is performed in a real-time fault vector knowledge base to obtain fault knowledge information that meets preset requirements; Using a pre-defined answer generation model, constraint analysis is performed based on vehicle fault problems and fault knowledge information to generate fault analysis results.
[0005] Secondly, this application also provides a vehicle fault analysis system, including: The building module is used to build a real-time fault vector knowledge base for vehicles; The problem receiving module is used to receive vehicle malfunction problems input by the user; The search module is used to perform an approximate nearest neighbor search in a real-time fault vector knowledge base based on vehicle fault problems to obtain fault knowledge information that meets preset requirements. The fault analysis module is used to perform constraint analysis based on vehicle fault problems and fault knowledge information using a preset answer generation model, and generate fault analysis results.
[0006] Thirdly, this application also provides a computing device, including a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the vehicle fault analysis method described above.
[0007] Fourthly, this application also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the steps of the vehicle fault analysis method described above.
[0008] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle fault analysis method described above.
[0009] The beneficial effects of this application are as follows: Based on the vehicle fault problem input by the user, an approximate nearest neighbor search is performed in a real-time fault vector knowledge base for vehicles to obtain fault knowledge information that meets preset requirements. Then, using a preset answer generation model, constraint analysis is performed based on the vehicle fault problem and fault knowledge information to generate fault analysis results. In this way, by constructing a real-time fault vector knowledge base for vehicles, the vehicle's fault vector knowledge can be updated in real time to flexibly respond to new vehicle models or complex fault scenarios. Therefore, when combining the updated real-time fault vector knowledge base with the user-input vehicle fault problem for constraint analysis, fault factors in new vehicle models or complex fault scenarios can be fully considered, thereby improving the accuracy of fault analysis. Attached Figure Description
[0010] Figure 1 This is a schematic flowchart illustrating a vehicle fault analysis method as an exemplary embodiment of this application; Figure 2 This is a schematic diagram illustrating the construction process of a real-time fault vector knowledge base in an exemplary embodiment of this application; Figure 3 This is a flowchart illustrating the application of the provided vehicle fault analysis method in an exemplary embodiment of this application; Figure 4 This is a system architecture diagram of a vehicle fault analysis method in an exemplary embodiment of this application; Figure 5 This is a schematic diagram illustrating the structure of a vehicle fault analysis system as an exemplary embodiment of this application. Detailed Implementation
[0011] The following embodiments are further explanations and supplements to this application and do not constitute any limitation on this application.
[0012] Currently, troubleshooting vehicle malfunctions mainly relies on manual experience or consulting paper / electronic repair manuals, which is inefficient and requires a high level of expertise. Specifically, the manual experience and manual consultation method involves vehicle operators or repair personnel identifying and handling malfunctions based on their own experience, in conjunction with the vehicle's owner's manual, repair manual, and other relevant documents.
[0013] Some organizations have adopted rule-based expert systems, which solidify common faults and their handling solutions into logical rules. Specifically, the rule-based expert system approach uses a pre-built fault-handling rule base to match corresponding handling logic with the fault phenomena input by the user and outputs suggested solutions.
[0014] However, the knowledge coverage of human experience and manual review methods and rule-based expert system methods is limited, making it difficult to cope with new vehicle models or complex fault scenarios. Moreover, knowledge updates require manual intervention, resulting in high maintenance costs and poor flexibility.
[0015] To address the aforementioned problems, embodiments of this application provide a vehicle fault analysis method, system, and device, which will be described in detail below.
[0016] This application designs an intelligent question-and-answer method for vehicle fault handling based on a RAG-enhanced large model. This method is applicable to situations where equipment malfunctions occur during vehicle operation, training, or maintenance, providing operators or maintenance technicians with accurate, professional, efficient, and traceable fault handling suggestions. Specifically, it constructs a vehicle-specific knowledge base, combines a locally deployed large language model (Qwen3-30B-Instruct) and an embedding model (BGE-M3), and employs a Retrieval Enhanced Generative Architecture (RAG) to accurately map user natural language questions to authoritative handling methods. Furthermore, it introduces experimentally optimized prompts to guide the model in generating practical and standardized answers, effectively improving the accuracy, response efficiency, and professional credibility of fault consultations.
[0017] Unlike directly calling the Qwen3-30B-Instruct model for ordinary question answering, this application adds vehicle fault knowledge retrieval, source information binding, enhanced prompt construction, and structured output constraints before model invocation. This restricts the model output content to the retrieved knowledge fragments and generates results in the format of "possible causes, handling suggestions, cited sources, and extended questions," thereby improving the professionalism, executability, and traceability of the answers.
[0018] The vehicle fault analysis method provided in this application can be executed by a server. It should be noted that the server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. No limitation is imposed here.
[0019] Please see Figure 1 , Figure 1 A vehicle fault analysis method is illustrated in an exemplary embodiment of this application, such as... Figure 1 As shown, this application provides a vehicle fault analysis method, including: S101, Construct a real-time fault vector knowledge base for vehicles; S102, Receive vehicle malfunction information input by the user; S103, based on the vehicle fault problem, perform an approximate nearest neighbor search in the real-time fault vector knowledge base to obtain fault knowledge information that meets the preset requirements; S104 utilizes a preset answer generation model to perform constraint analysis based on vehicle fault problems and fault knowledge information, and generates fault analysis results.
[0020] The vehicle fault analysis method provided in this application performs an approximate nearest neighbor search on a real-time fault vector knowledge base for vehicles based on user-inputted vehicle fault questions. This yields fault knowledge information that meets preset requirements. A preset answer generation model is then used to perform constraint analysis based on the vehicle fault questions and fault knowledge information to generate fault analysis results. By constructing a real-time fault vector knowledge base for vehicles, the fault vector knowledge can be updated in real time to flexibly address new vehicle models or complex fault scenarios. This allows for the consideration of fault factors in new vehicle models or complex fault scenarios when combining the updated real-time fault vector knowledge base with user-inputted vehicle fault questions for constraint analysis, thereby improving the accuracy of fault analysis. The fault analysis results include possible causes, suggested solutions, cited sources, and extended questions. The answer generation model is Qwen3-30B-Instruct. The vehicles include cars, buses, trucks, tractors, special transport vehicles, and special vehicles. Cars include private cars and taxis, buses include public buses and tour buses, trucks include box trucks and flatbed trucks, special transport vehicles include refrigerated trucks, tankers, and concrete mixer trucks, and special vehicles include fire trucks, ambulances, and police cars.
[0021] Optionally, a real-time fault vector knowledge base for vehicles is constructed, including: Obtain original maintenance data for vehicles in real time; Based on the original maintenance data, multiple original fault knowledge fragments are obtained through fragment processing. Semantic vector encoding is performed on multiple original fault knowledge fragments to obtain the fault text vector corresponding to each original fault knowledge fragment. All fault text vectors, the original fault knowledge fragments corresponding to each fault text vector, and the source metadata corresponding to the fault text vectors in the original maintenance data are written into the preset FAISS local vector database to obtain a real-time fault vector knowledge base for the vehicle. In the real-time fault vector knowledge base, each fault text vector is used as an index item, and each fault text vector is associated and bound with its corresponding original fault knowledge fragments and source metadata.
[0022] In the embodiment provided in this application, firstly, fragment processing is performed on the original vehicle maintenance data acquired in real time to obtain multiple original fault knowledge fragments. Semantic vector encoding is then performed on these fragments to obtain a fault text vector corresponding to each original fault knowledge fragment. Secondly, all fault text vectors, the original fault knowledge fragments corresponding to each fault text vector, and the source metadata corresponding to the fault text vectors in the original maintenance data are written into a preset FAISS local vector database to obtain a real-time fault vector knowledge base for the vehicle. In this real-time fault vector knowledge base, each fault text vector serves as an index item, and each fault text vector is associated and bound to its corresponding original fault knowledge fragment and source metadata. Thus, by constructing a real-time fault vector knowledge base for the vehicle using real-time updated original maintenance data, the vehicle's fault vector knowledge can be updated in real time to flexibly respond to new vehicle models or complex fault scenarios, thereby improving the accuracy of fault analysis using the real-time fault vector knowledge base.
[0023] In this embodiment, the original maintenance data includes text data such as vehicle maintenance manuals, vehicle design documents, and historical fault case databases. Semantic vector encoding is implemented through a semantic vector encoding model, which can be an embedding model (BGE-M3). Source metadata includes one or more of the following: document name, chapter title, page number, vehicle model information, and fault case number.
[0024] Optionally, based on the original maintenance data, fragment processing is performed to obtain multiple original fault knowledge fragments, including: The original maintenance data is standardized and preprocessed to obtain multiple fault knowledge units; For each fault knowledge unit, the fault knowledge unit is divided into length segments to obtain at least one original fault knowledge segment. Each original fault knowledge segment corresponds to a complete fault handling content.
[0025] In the embodiment provided in this application, the original maintenance data is standardized and preprocessed to reduce interference data, thereby improving the accuracy of the obtained multiple fault knowledge units. For each fault knowledge unit, the length of the unit is divided to obtain at least one original fault knowledge segment. Each original fault knowledge segment corresponds to a complete fault handling content, enabling direct searching of complete fault handling content matching the vehicle fault problem in the real-time fault vector knowledge base. This improves the efficiency of fault analysis while ensuring accuracy. The length division refers to dividing the fault knowledge unit into text segments according to a preset text length and overlap length. The fault handling content includes fault phenomena, possible causes, and handling suggestions.
[0026] Optionally, standardized preprocessing includes text parsing, data cleaning, formatting, and knowledge unit construction.
[0027] In the embodiment provided in this application, text parsing can transform unstructured or semi-structured text into computer-recognizable elements (such as words, sentences, paragraphs, and fields), providing a foundation for subsequent natural language processing, machine learning, etc. Data cleaning can remove noise (such as garbled characters, irrelevant symbols, duplicate content, and incorrect formatting), avoiding interference with subsequent analysis. Formatting and organizing can unify heterogeneous raw text into a standardized structure (e.g., unified encoding, field alignment, standardized dates, etc.), ensuring data comparability and integrability. Knowledge unit construction can further abstract the facts, concepts, and relationships in the text into atomic, reusable knowledge components, facilitating intelligent applications such as reasoning, question answering, and recommendation. Thus, by performing text parsing, data cleaning, formatting and organizing, and knowledge unit construction on the original maintenance data, data quality and consistency can be improved, computational and storage costs can be reduced, automated and intelligent processing can be supported, and information retrieval and knowledge discovery capabilities can be enhanced. This significantly improves the data value and accuracy of the processed multiple fault knowledge units, thereby increasing the matching degree between the real-time fault vector knowledge base built based on multiple fault knowledge units and various vehicle faults, and ultimately improving the accuracy of fault analysis based on the real-time fault vector knowledge base.
[0028] In one exemplary embodiment provided in this application, vehicle fault-related text data such as vehicle maintenance manuals, vehicle design documents, and historical fault case libraries are obtained in real time through different official open-source channels to obtain original maintenance data for the vehicle, so as to construct a structured, high-quality real-time fault vector knowledge base.
[0029] Specifically, firstly, textual data such as vehicle repair manuals, vehicle design documents, and historical fault case databases undergo standardized preprocessing, including text parsing, data cleaning, formatting, and knowledge unit construction. This transforms the original repair data from plain text into fault knowledge units that are easy to retrieve and access. Secondly, each fault knowledge unit is bound to source information from the original repair data, such as document name, chapter title, page number, vehicle model information, or fault case number, to ensure the traceability of subsequent question-and-answer results. Then, the processed fault knowledge units are divided into multiple original fault knowledge fragments suitable for embedding model processing according to preset text length and overlap length. Each original fault knowledge fragment retains its corresponding source metadata, such as document name, chapter title, page number, vehicle model information, or fault case number. Subsequently, the locally deployed BGE-M3 embedding model is used to perform semantic vector encoding on each original fault knowledge fragment, generating a corresponding fault text vector. Finally, the fault text vector, the original fault knowledge fragments, and their source metadata are jointly written into the FAISS local vector database to obtain a real-time fault vector knowledge base for the vehicle. In this way, a structured domain knowledge base that covers mainstream vehicle types, focuses on typical fault scenarios, and is authoritative and traceable can be formed. This real-time fault vector knowledge base serves as a reliable data foundation for the RAG system to perform fault knowledge retrieval and answer generation.
[0030] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating the construction process of a real-time fault vector knowledge base in an exemplary embodiment of this application, as shown below. Figure 2 As shown, this clearly demonstrates how raw maintenance data (vehicle maintenance manuals, vehicle design documents, historical fault case databases, etc.) are transformed into a real-time fault vector knowledge base for the RAG question-and-answer system. The standardized preprocessing in this embodiment includes data cleaning and formatting. The specific steps for constructing the real-time fault vector knowledge base are as follows: First, collect raw data: collect original maintenance data such as vehicle fault data records and vehicle maintenance manuals; Second, data cleaning: remove low-quality data from the original maintenance data and filter the required data; Third, formatting: a vehicle fault handling knowledge base is built based on element tags such as fault vehicle model, fault case, fault cause, and handling method, resulting in multiple fault knowledge units; Fourth, text segmentation: the text material (multiple fault knowledge units) is segmented into multiple original fault knowledge fragments suitable for processing by the embedding model; Fourth, text vectorization: The BGE-M3 embedding model is used to vectorize each original fault knowledge fragment to generate the corresponding fault text vector; Sixth, store the vector results: store the vectorized fault text vectors, along with their corresponding original fault knowledge fragments and source metadata, into the FAISS (Fault Vector Knowledge Base) to obtain the real-time fault vector knowledge base.
[0031] Optionally, the real-time fault vector knowledge base includes multiple fault text vectors, as well as original fault knowledge fragments and source metadata associated with each fault text vector; Based on vehicle fault problems, an approximate nearest neighbor search is performed in a real-time fault vector knowledge base to obtain fault knowledge information that meets preset requirements, including: Semantic vector encoding is performed on vehicle malfunction issues to obtain query vectors; In the real-time fault vector knowledge base, an approximate nearest neighbor search is performed. If at least one target fault text vector that meets the similarity requirement with the query vector is found, the target original fault knowledge fragment and target source metadata associated with each target fault text vector are retrieved from the real-time fault vector knowledge base. Based on the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector, fault knowledge information for vehicle fault problems is formed.
[0032] In the embodiment provided in this application, the vehicle malfunction problem is semantically vectorized to obtain a query vector. An approximate nearest neighbor search is then performed in a real-time fault vector knowledge base. If at least one target fault text vector that meets the similarity requirement with the query vector is found, the target original fault knowledge fragment and target source metadata associated with each target fault text vector are retrieved from the real-time fault vector knowledge base, forming fault knowledge information specific to the vehicle malfunction problem. This allows for the comprehensive extraction of all fault knowledge information related to the vehicle malfunction problem from the real-time fault vector knowledge base, facilitating subsequent targeted and comprehensive constraint analysis based on the vehicle malfunction problem and fault knowledge information, thereby improving the accuracy of fault analysis.
[0033] In this embodiment, semantic vector encoding is implemented through a semantic vector encoding model, which can be an embedding model (BGE-M3). Approximate nearest neighbor search includes similarity retrieval methods such as Locality Sensitive Hash (LSH), Hierarchical Navigable Small World Graph (HNSW), Inverted File Index + Product Quantization (IVF-PQ), and tree-based algorithms (such as approximate variants of k-dtree). The similarity requirement is that the similarity or Euclidean distance value is greater than or equal to a corresponding preset threshold. When the number of at least one target fault text vector is greater than one, the at least one target original fault knowledge fragment corresponding to that at least one target fault text vector is sorted in descending order of similarity.
[0034] In this embodiment, an approximate nearest neighbor search is performed in the real-time fault vector knowledge base. If no target fault text vector that meets the similarity requirement with the query vector is found, or if at least one target fault text vector found does not have a clear fault semantic relationship with the vehicle fault problem (the relationship can be extracted through the association feature extraction model; if fault semantic relationship features are extracted between the two, it indicates that there is a clear fault semantic relationship between the two), a guiding question related to the current problem is generated based on a dedicated prompt word template (the preset second prompt word template is called to process the vehicle fault problem and generate a guiding question that matches the vehicle fault problem). The user's input of a new vehicle fault problem for the guiding question is then retrieved again. This process continues until at least one target fault text vector, a target original fault knowledge fragment, and a target source metadata corresponding to a new vehicle fault problem are found in the real-time fault vector knowledge base, and these three types of data have a clear fault semantic relationship with the vehicle fault problem. Then, fault knowledge information for the vehicle fault problem is formed based on these three types of data.
[0035] In an exemplary embodiment provided in this application, the BGE-M3 embedding model is deployed locally on the Xinference platform to achieve vector encoding of the original fault knowledge fragments and vehicle fault problems. The specific steps are as follows: ① Considering that fire protection applications often face environments with limited network coverage or high data security requirements, a fully localized deployment strategy is adopted. Specifically, the Qwen3-30B-Instruct large language model is selected as the answer generation model, and after quantization using the Ollam inference framework, it is deployed on a local server or edge computing device to reduce memory usage and inference latency. At the same time, the BGE-M3 embedding model is deployed locally using the Xinference platform as a semantic vector encoding model shared by the knowledge base construction stage and the user consultation stage.
[0036] ② During the knowledge base construction phase, the original maintenance data in the domain-specific knowledge base undergoes standardized preprocessing. The resulting multiple fault knowledge units are then divided into several original fault knowledge fragments suitable for embedding model processing, based on preset text lengths and overlap lengths. Each original fault knowledge fragment retains its corresponding document name, chapter title, page number, vehicle model information, or fault case number, among other source metadata. Subsequently, the locally deployed BGE-M3 embedding model is used to perform semantic vector encoding on each original fault knowledge fragment, generating a corresponding fault text vector. This fault text vector, the original fault knowledge fragment, and its source metadata are then written into the FAISS local vector database, resulting in a real-time fault vector knowledge base for the vehicle.
[0037] ③ During the user consultation phase, after receiving the vehicle fault question input by the user, the same BGE-M3 embedding model is called to perform semantic vector encoding on the vehicle fault question to generate a query vector. Then, based on the query vector, a similarity search is performed in the real-time fault vector knowledge base to obtain the target original fault knowledge fragments and target source metadata that are semantically closest to the vehicle fault question. These are used as the basis for constructing enhanced prompts and calling the answer generation model (Qwen3-30B-Instruct large language model) to generate answers (fault analysis results).
[0038] Through the above processing, localized vector encoding, storage, and retrieval of vehicle fault knowledge can be achieved without relying on external cloud services. This ensures that vehicle maintenance data does not leave the domain and improves the efficiency and traceability of fault knowledge retrieval in low-resource environments.
[0039] Optionally, a pre-defined answer generation model is used to perform constraint analysis based on vehicle fault problems and fault knowledge information to generate fault analysis results, including: Enhanced prompts are constructed based on vehicle malfunction issues and malfunction knowledge information; The enhanced prompts are used to perform constraint analysis on the preset answer generation model to generate fault analysis results.
[0040] In the embodiment provided in this application, prompts are constructed based on vehicle fault problems and fault knowledge information to obtain enhanced prompts that conform to the model analysis logic. The enhanced prompts are then input into a preset answer generation model for targeted and comprehensive constraint analysis, which can improve the matching degree between the generated fault analysis results and the vehicle fault problems, thereby improving the accuracy of fault analysis.
[0041] Optionally, the fault knowledge information includes at least one target fault text vector, as well as the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector; Enhanced prompts are constructed based on vehicle malfunction issues and malfunction knowledge information, including: Fill the vehicle malfunction problem, the target original malfunction knowledge fragment corresponding to each target malfunction text vector, and the target source metadata into the preset first prompt word template to generate role constraints, known information, user questions, answer rules, and output format requirements; Enhanced prompts are generated based on role constraints, known information, user questions, answer rules, and output format requirements.
[0042] In the embodiment provided in this application, the vehicle fault problem, the target original fault knowledge fragment corresponding to each target fault text vector, and the target source metadata are filled into a preset first prompt word template to generate role constraints, known information, user questions, answer rules, and output format requirements, forming an enhanced prompt that conforms to the model analysis logic. This improves the matching degree and efficiency of subsequent model analysis based on the enhanced prompt, thereby improving the accuracy and efficiency of fault analysis.
[0043] Optionally, enhanced prompts may include role constraints, known information, user questions, answer rules, and output format requirements; The enhanced prompts are used to perform constraint analysis on a pre-defined answer generation model to generate fault analysis results, including: The enhanced prompts are input into the preset answer generation model to extract the fault consultation object and fault phenomenon from the user's question; Extract the causes, detection methods, and handling steps of the fault that are related to the fault consultation object and fault phenomenon from the known information; Based on role constraints and answering rules, the causes of failures are organized into possible causes, the detection methods and handling steps are organized into handling suggestions, the source metadata corresponding to the causes of failures, detection methods and handling steps are organized into reference sources, and multiple extended questions are generated based on user questions, system components and failure phenomena of the failure consultation object; The possible causes, suggested solutions, cited sources, and multiple related questions should be formatted according to the output format requirements, and the fault analysis results should be output.
[0044] In the embodiment provided in this application, firstly, enhanced prompts are input into a preset answer generation model. The fault consultation object and fault phenomenon are extracted from the user's question, and the fault causes, detection methods, and handling steps related to the fault consultation object and fault phenomenon are extracted from known information. Secondly, according to role constraints and answer rules, the fault causes are organized into possible causes, the detection methods and handling steps into handling suggestions, and the source metadata corresponding to the fault causes, detection methods, and handling steps are organized into reference sources. Multiple extended questions are generated based on the user's question, the system components of the fault consultation object, and the fault phenomenon. Then, the possible causes, handling suggestions, reference sources, and multiple extended questions are formatted according to output format requirements, and the fault analysis results are output. In this way, enhanced prompts that conform to the model analysis logic can perform targeted and comprehensive constraint analysis in the answer generation model, thereby improving the matching degree between the generated fault analysis results and the vehicle fault problem, and thus improving the accuracy of fault analysis. The source metadata includes one or more of the following: document name, chapter title, page number, vehicle model information, fault case number, etc.
[0045] In this embodiment, based on the user's question, the system components of the fault consultation object, and the fault phenomenon, multiple extended questions are generated according to the preset third prompt word template.
[0046] In one exemplary embodiment provided in this application, to address the issue that generalized prompts in specialized fields can easily lead to overgeneralization or deviation in responses, a set of dedicated prompt templates for vehicle fault consultation was optimized through multiple rounds of experimental debugging and iteration, forming a dedicated first prompt template. This dedicated first prompt template clearly defines the model's role (e.g., "You are a vehicle repair engineer with 10 years of experience") and the output format (e.g., please answer in the following three parts: possible causes, suggested solutions, cited sources, and follow-up questions). Experiments show that this prompt template can effectively guide the model to focus on actionable and verifiable solutions, significantly reduce illusory content, and increase the trust and adoption rate of system suggestions by frontline personnel. This significantly improves the professionalism, practicality, and task focus of the model's output, suppressing irrelevant or fictitious information, ensuring that the output results are accurate, professional, efficient, and credible through this first prompt template.
[0047] Specifically, the content of the first prompt word template can be as follows: [Instruction] You are a vehicle repair engineer with 10 years of experience. Please answer the question concisely and professionally based on the information you have.
[0048]
Processing Rules
[0049] (b) If the answer can be found in the given information, provide a complete and accurate response. Fabricated information is not allowed. Please use Chinese characters for your answer. After completing your answer, output "---" on a new line. Then, based on the topic of the user's current question, provide three related guiding questions to help the user gain a deeper understanding of the topic. Requirements: The guiding questions must be relevant to the current question and help the user to understand the topic more thoroughly.
[0050] As can be seen, the first prompt word template has significant characteristics such as high structure, strong constraints, and strong scenario adaptability, fully reflecting the professional design concept of RAG systems for vertical domains. The first prompt word template can not only provide clear task instructions and improve the professionalism of the answer, but also balance accuracy and guidance through a dual-path response mechanism, and can also implement strict content security and factual constraints.
[0051] Providing clear task instructions enhances the professionalism of the answers by: giving a clear instruction at the outset, "Answer the question concisely and professionally based on the known information," directly limiting the boundaries of the model's behavior; preventing the model from acting freely or introducing external knowledge, and forcing it to rely on the retrieved context, effectively suppressing illusions.
[0052] The dual-path response mechanism balances accuracy and guidance in the following ways: The first prompt template automatically switches between two response modes based on whether it matches the knowledge base content: ① If the question matches the knowledge base content, the model provides a precise answer and extends the question with follow-up questions; it requires "completeness and accuracy" and "no fabrication" to ensure the credibility of the answer; after the answer, it provides three in-depth follow-up questions to help users explore the topic step by step, improving the depth of interaction and user experience. ② If the question does not match the knowledge base content, the model honestly refuses to answer and provides intelligent guidance; it clearly states that "it cannot be answered directly" to avoid misleading users; it generates three relevant and answerable guiding questions based on the actual content in the [known information]. The guiding questions are not fabricated out of thin air and do not deviate from the topic, guiding users to focus on the knowledge base coverage and improving the effective question rate.
[0053] Strict content security and factual constraints are reflected in: repeatedly emphasizing "no fabricated elements allowed" and "based on the actual content contained in known information"; and avoiding "illusory output" and "over-speculation" from a mechanism perspective, which is particularly suitable for high-risk decision-making scenarios such as vehicle malfunction handling.
[0054] Please see Figure 3 , Figure 3 This is a schematic flowchart illustrating the application of the provided vehicle fault analysis method in an exemplary embodiment of this application, as shown below. Figure 3 As shown, the application process of the vehicle fault analysis method is as follows: First, receive the processing text for vehicle malfunction issues input by the user; Second, the vehicle fault problem is vectorized by calling the BGE-M3 embedding model; Third, retrieve relevant fault knowledge information based on vehicle fault problems from the real-time fault vector knowledge base; Fourth, enhanced prompts are constructed by integrating vehicle malfunction issues, retrieved malfunction knowledge information, and dedicated first prompt word templates; Fifth, the Qwen3-30B-Instruct model is invoked to perform constraint analysis on the enhanced prompts and generate answers (fault analysis results). Sixth, output the fault analysis results: possible causes of the fault, handling suggestions, reference sources, and information on multiple related issues.
[0055] For example, a RAG intelligent question-answering system can be built based on the LangChain-Chatchat framework, completing the entire process of knowledge base management, vector index establishment, semantic retrieval, enhanced prompt construction, and large language model answer generation. The specific application steps of the vehicle fault analysis method are as follows: ① The overall system architecture is based on the open-source project LangChain-Chatchat with customized configuration, integrating a chat interface, the FAISS local vector knowledge base, the BGE-M3 embedding model interface, the Qwen3-30B-Instruct large language model interface, and dedicated prompt word templates. The chat interface receives user input of vehicle fault questions and displays the answers returned by fault analysis (fault analysis results); the FAISS local vector knowledge base stores vector indices of the original fault knowledge fragments of the vehicle; the BGE-M3 embedding model performs semantic vector encoding on the original fault knowledge fragments and vehicle fault questions; the Qwen3-30B-Instruct large language model generates fault handling answers based on enhanced prompts to obtain fault analysis results; and the dedicated prompt word templates limit the model's answer basis, answer rules, and output format.
[0056] ② In the knowledge index building phase, the BGE-M3 embedding model and FAISS vector database are invoked based on the knowledge base management function of LangChain-Chatchat to complete the index construction. Specifically, the vehicle's fault knowledge units are divided into original fault knowledge fragments suitable for retrieval. Each original fault knowledge fragment corresponds to a relatively complete fault handling content, such as fault phenomena, possible causes, and handling suggestions. Subsequently, the BGE-M3 embedding model is invoked to perform semantic vector encoding on each original fault knowledge fragment, generating a corresponding fault text vector, and this fault text vector is written into the FAISS local vector database as a FAISS vector index item. At the same time, each vector index item is bound to its original fault knowledge fragment and source metadata, including document name, chapter title, page number, vehicle model information, system component or fault case number, etc. Therefore, the index established in this embodiment has the characteristics of knowledge fragment-level semantic retrieval and source traceability. It can not only retrieve relevant fault handling content based on the semantic similarity of user questions, but also provide corresponding data sources when generating answers. For example, the troubleshooting content for "fire pump cannot draw water normally" in the maintenance manual can be divided into knowledge segments containing the fault phenomenon, possible causes, and handling methods, and linked to source information such as "fire pump system," "cannot draw water," and "maintenance manual page number." This original fault knowledge segment is then encoded using BGE-M3 and written into the FAISS index. When a user inputs a vehicle fault question as "What should I do if the vehicle's water pump cannot draw water?", this vehicle fault question is encoded into a query vector, and the target fault text vector with the closest semantics is retrieved from the FAISS index, thereby obtaining the handling content (original fault knowledge segment) and data source (source metadata) related to the fire pump's water intake fault.
[0057] ③ In the approximate nearest neighbor search stage, the system first receives the vehicle malfunction question input by the user and encodes it into a query vector using the locally deployed BGE-M3 embedding model. Then, the query vector is submitted to the FAISS local vector database (real-time fault vector knowledge base), where an approximate nearest neighbor search is performed on the established vehicle malfunction knowledge fragment vector index. FAISS filters out several target original fault knowledge fragments that are semantically closest to the vehicle malfunction question based on the similarity or distance between the query vector and each fault text vector, and sorts them according to similarity from high to low, returning the Top-K candidate search results. Then, it further reads each target original fault knowledge fragment and its corresponding target source metadata, including document name, chapter title, page number, vehicle model information, system component or fault case number, etc., as the basis for constructing subsequent enhanced prompts. When the highest similarity is below a preset threshold, or when the Top-K results do not have a clear semantic association with the vehicle malfunction question, it explicitly replies "This question cannot be answered directly based on the known information," and generates guiding questions related to the current vehicle malfunction question based on a dedicated second prompt word template. This processing method can avoid outputting unfounded maintenance suggestions when the knowledge base is not matched.
[0058] ④ In the enhanced prompt construction stage, the vehicle fault problem, the target original fault knowledge fragment corresponding to each target fault text vector, and the target source metadata are filled into the preset first prompt word template to construct the enhanced prompt. This enhanced prompt includes role constraints, known information, user questions, answer rules, and output format requirements. Among them, the role constraints are used to limit the large language model to answer questions as a vehicle repair engineer; the known information area is used to fill in the retrieved fault knowledge fragments and document names, chapter titles, page numbers, or fault case numbers; the user question area is used to fill in the original question input by the user; the answer rules area is used to limit the model to answer only based on known information and not to fabricate fault causes or handling steps that have not been retrieved; the output format area is used to limit the model to generate answers according to the structure of "possible causes, handling suggestions, cited sources, and extended questions". For example, when a user enters a vehicle malfunction question such as "What should I do if the vehicle's water pump can't draw water?", the system retrieves relevant target original fault knowledge fragments such as "check for air leaks in the water inlet pipe," "check for the working status of the vacuum pump," and "check for clogged water filters." These target original fault knowledge fragments and their target source metadata are then filled into the "Known Information" area, and the vehicle malfunction question is filled into the "User Question" area. At the same time, answer rules and output format requirements are added to form enhanced prompts, which are then input into the Qwen3-30B-Instruct large language model, enabling the model to generate a structured fault handling answer based on the retrieved content.
[0059] ⑤ In the large language model generation stage, instead of directly inputting the user's vehicle fault question into the Qwen3-30B-Instruct model for free question and answer, the vehicle fault question, the target original fault knowledge fragment corresponding to each target fault text vector retrieved, the target source metadata, and the dedicated second prompt word template are jointly constructed into an enhanced prompt, which is then input into the locally deployed Qwen3-30B-Instruct answer generation model. The enhanced prompts include role constraints, known information, user questions, answer rules, and output format requirements. The answer generation model generates results based on these enhanced prompts under constraints, yielding the following fault analysis results: First, the fault consultation object and fault phenomenon are determined based on the user question. Second, the known information in the enhanced prompts is read, and fault causes, detection methods, and handling steps that are related to the fault consultation object and fault phenomenon are extracted from the retrieved knowledge fragments of the known information. Third, the fault causes are organized into "possible causes," the detection methods and handling steps are organized into "handling suggestions," and the source metadata such as document names, chapter titles, page numbers, or fault case numbers bound to the knowledge fragments corresponding to the fault causes, detection methods, and handling steps are organized into "reference sources." Then, several "extended questions" are generated based on the vehicle model involved in the user question, the system components of the fault consultation object, and the fault phenomenon. Finally, the possible causes, handling suggestions, reference sources, and multiple extended questions are formatted according to the output format requirements, and the fault analysis results are output. When the retrieved knowledge fragment cannot support the user's vehicle malfunction problem, the model explains that it cannot answer the question according to the preset prompt word rules, and generates guiding questions related to the current vehicle malfunction problem, instead of outputting deterministic repair suggestions that lack knowledge base support.
[0060] Please see Figure 4 , Figure 4 This is a system architecture diagram of a vehicle fault analysis method in an exemplary embodiment of this application, such as... Figure 4As shown, the system architecture of the vehicle fault analysis method (Langchain-Chatchat software system) integrates a chat interface, a dedicated vector knowledge base, and dedicated prompt word templates, and provides interfaces for an embedded model (BGE-M3) and a large language model (Qwen3-30B-Instruct). In this system architecture, the chat interface is responsible for human-computer interaction; the dedicated vector knowledge base of this system is obtained by vectorizing the vehicle fault processing knowledge base after data processing through the embedded model, and the vector knowledge base is stored and indexed through the FAISS vector database; the embedded model BGE-M3 mainly vectorizes the vehicle fault knowledge base and user questions; the large language model Qwen3-30B-Instruct is enhanced by integrating the user's vehicle fault questions, search results, and dedicated prompt word templates; the large language model Qwen3-30B-Instruct outputs accurate, professional, efficient, and reliable results after being enhanced by RAG.
[0061] In summary, the vehicle fault analysis method of this application constructs a dedicated vector knowledge base for vehicle fault handling: the provided vehicle repair manuals, design documents, and historical fault cases are cleaned to remove invalid and low-quality data, and organized into a structured database according to elements such as fault vehicle model, fault case, fault cause, and handling method; in addition, semantic segmentation and title enhancement strategies are used to segment the above database to preserve contextual integrity and key identifiers, and the BGE-M3 embedding model is used to vectorize the text fragments and store them in the FAISS vector library to support high-precision semantic retrieval.
[0062] Meanwhile, the vehicle fault analysis method of this application designs a special prompt word template to constrain the output behavior of the large model: the prompt word template has been optimized through multiple rounds of experiments, constraining the model to output according to a fixed structure, and the output content includes: knowledge source, fault cause, fault handling method, etc. The specific content of the prompt word template has been mentioned above, and the prompt word template can be summarized as having the following characteristics: (1) Accuracy: forced to be based on search results, prohibiting fabrication; (2) Security: refuses to answer unknown questions, avoiding misleading; (3) Usability: provides guiding questions, reducing the threshold for users to ask questions; (4) Professionalism: concise language, clear structure, and standardized terminology; (5) Product friendliness: unified format, easy to integrate with the front end.
[0063] Furthermore, the vehicle fault analysis method in this application is designed with a collaborative deployment architecture for RAG-enhanced large models in resource-constrained and high-safety-requirement scenarios: To meet the dual requirements of data security and response efficiency for vehicle fault consultation under limited computing resources, the Qwen-30B-Instruct large language model is quantized through the Ollam platform and deployed on the enterprise intranet server. At the same time, the BGE-M3 embedded model is deployed using the Xinference platform, forming a lightweight, low-memory-occupancy collaborative inference system. Users can access this service through the company intranet via authorized terminals, effectively utilizing the intelligent question-answering capabilities of the large model while ensuring that sensitive maintenance data does not leave the domain. This solves the practical problems of unavailability of general cloud services or difficulty in supporting the operation of full-parameter models with local computing power.
[0064] As can be seen, the vehicle fault analysis method of this application not only constructs a dedicated vector knowledge base for vehicle fault handling, but also designs dedicated prompt word templates to constrain the output behavior of the large model. Furthermore, it designs a collaborative deployment architecture for the RAG-enhanced large model under resource-constrained and high-safety-requirement scenarios. Therefore, compared with existing technologies such as traditional methods relying on human experience and paper / electronic repair manuals, expert systems based on fixed rules, and question-and-answer methods that directly call general large language models, this technology, by constructing a vehicle-specific knowledge base and integrating a RAG-enhanced architecture, achieves localized deployment under limited computing power. This significantly improves the accuracy, professionalism, and interpretability of fault handling method queries, effectively avoiding problems such as insufficient coverage of the rule system, illusions generated by the general large model, or generalized answers.
[0065] Meanwhile, the vehicle fault analysis method of this application realizes the intelligentization and standardization of the vehicle fault consultation process. Even if front-line personnel lack extensive maintenance experience, they can quickly obtain clear, well-defined, and traceable handling suggestions in emergency situations, which can significantly shorten fault response time and improve the availability of emergency rescue equipment and mission support capabilities.
[0066] Furthermore, the vehicle fault analysis method of this application adopts a fully localized deployment mode, which does not rely on external networks or cloud services, ensuring that fire-sensitive data does not leave the domain and meeting the industry's strict requirements for information security and operational continuity. At the same time, the knowledge base supports incremental updates, enabling the system to have continuous evolution capabilities and continuously optimize the quality of question and answer as vehicle models are iterated and maintenance experience is accumulated.
[0067] Please see Figure 5 , Figure 5 A vehicle fault analysis system is illustrated in an exemplary embodiment of this application, such as... Figure 5 As shown, this application provides a vehicle fault analysis system 500, including: Module 501 is used to build a real-time fault vector knowledge base for vehicles; Problem receiving module 502 is used to receive vehicle malfunction problems input by the user; The search module 503 is used to perform an approximate nearest neighbor search in the real-time fault vector knowledge base based on vehicle fault problems to obtain fault knowledge information that meets preset requirements. The fault analysis module 504 is used to perform constraint analysis based on vehicle fault problems and fault knowledge information using a preset answer generation model, and generate fault analysis results.
[0068] The vehicle fault analysis system 500 of this application utilizes a search module 503 to perform an approximate nearest neighbor search on a real-time fault vector knowledge base for vehicles constructed by a construction module 501 based on the vehicle fault questions input by the user received by the question receiving module 502. This yields fault knowledge information that meets preset requirements. The fault analysis module 504 then uses a preset answer generation model to perform constraint analysis based on the vehicle fault questions and fault knowledge information, generating fault analysis results. By constructing a real-time fault vector knowledge base for vehicles, the system can update vehicle fault vector knowledge in real time to flexibly address new vehicle models or complex fault scenarios. This allows for constraint analysis that fully considers fault factors in new vehicle models or complex fault scenarios when combining the updated real-time fault vector knowledge base with the user-input vehicle fault questions, thereby improving the accuracy of fault analysis.
[0069] Optionally, module 501 is constructed specifically for: Obtain original maintenance data for vehicles in real time; Based on the original maintenance data, multiple original fault knowledge fragments are obtained through fragment processing. Semantic vector encoding is performed on multiple original fault knowledge fragments to obtain the fault text vector corresponding to each original fault knowledge fragment. All fault text vectors, the original fault knowledge fragments corresponding to each fault text vector, and the source metadata corresponding to the fault text vectors in the original maintenance data are written into the preset FAISS local vector database to obtain a real-time fault vector knowledge base for the vehicle. In the real-time fault vector knowledge base, each fault text vector is used as an index item, and each fault text vector is associated and bound with its corresponding original fault knowledge fragments and source metadata.
[0070] Optionally, module 501 is constructed specifically for: The original maintenance data is standardized and preprocessed to obtain multiple fault knowledge units; For each fault knowledge unit, the fault knowledge unit is divided into length segments to obtain at least one original fault knowledge segment. Each original fault knowledge segment corresponds to a complete fault handling content.
[0071] Optionally, module 501 is constructed, specifically for standardized preprocessing, which includes text parsing, data cleaning, formatting and organization, and knowledge unit construction.
[0072] Optionally, the real-time fault vector knowledge base includes multiple fault text vectors, as well as original fault knowledge fragments and source metadata associated with each fault text vector; Search module 503 is specifically used for: Semantic vector encoding is performed on vehicle malfunction issues to obtain query vectors; In the real-time fault vector knowledge base, an approximate nearest neighbor search is performed. If at least one target fault text vector that meets the similarity requirement with the query vector is found, the target original fault knowledge fragment and target source metadata associated with each target fault text vector are retrieved from the real-time fault vector knowledge base. Based on the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector, fault knowledge information for vehicle fault problems is formed.
[0073] Optionally, the fault analysis module 504 is specifically used for: Enhanced prompts are constructed based on vehicle malfunction issues and malfunction knowledge information; The enhanced prompts are used to perform constraint analysis on the preset answer generation model to generate fault analysis results.
[0074] Optionally, the fault knowledge information includes at least one target fault text vector, as well as the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector; Fault analysis module 504 is specifically used for: Fill the vehicle malfunction problem, the target original malfunction knowledge fragment corresponding to each target malfunction text vector, and the target source metadata into the preset first prompt word template to generate role constraints, known information, user questions, answer rules, and output format requirements; Enhanced prompts are generated based on role constraints, known information, user questions, answer rules, and output format requirements.
[0075] Optionally, enhanced prompts may include role constraints, known information, user questions, answer rules, and output format requirements; Fault analysis module 504 is specifically used for: The enhanced prompts are input into the preset answer generation model to extract the fault consultation object and fault phenomenon from the user's question; Extract the causes, detection methods, and handling steps of the fault that are related to the fault consultation object and fault phenomenon from the known information; Based on role constraints and answering rules, the causes of failures are organized into possible causes, the detection methods and handling steps are organized into handling suggestions, the source metadata corresponding to the causes of failures, detection methods and handling steps are organized into reference sources, and multiple extended questions are generated based on user questions, system components and failure phenomena of the failure consultation object; The possible causes, suggested solutions, cited sources, and multiple related questions should be formatted according to the output format requirements, and the fault analysis results should be output.
[0076] It should be noted that the vehicle fault analysis system and the vehicle fault analysis method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the vehicle fault analysis system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0077] A computing device according to an embodiment of this application includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements some or all of the steps of the above-described vehicle fault analysis method.
[0078] The computing device can be a computer, and the corresponding program is computer software. The parameters and steps in the computing device described above can be referred to the parameters and steps in the embodiments of the vehicle fault analysis method above, and will not be repeated here.
[0079] This application embodiment provides a computer-readable storage medium storing instructions that, when executed, perform the steps of the vehicle fault analysis method described above. The computer-readable storage medium can be a non-transitory computer-readable storage medium, including various media capable of storing program code such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks; it can also be a transient computer-readable storage medium.
[0080] One embodiment of this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle fault analysis method described above. The technical solution of this disclosure embodiment can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of this disclosure embodiment.
[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, devices, media, and products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0082] Those skilled in the art will recognize that this application can be implemented as a system, method, or computer program product. Therefore, this disclosure can be implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "module" or "system." Furthermore, in some embodiments, this application can also be implemented as a computer program product contained in one or more computer-readable media, which contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof.
[0083] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0084] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A vehicle fault analysis method, characterized in that, include: Build a real-time fault vector knowledge base for vehicles; Receive vehicle malfunction information from the user; Based on the vehicle fault problem, an approximate nearest neighbor search is performed in the real-time fault vector knowledge base to obtain fault knowledge information that meets preset requirements; Using a pre-defined answer generation model, constraint analysis is performed based on the vehicle fault problem and the fault knowledge information to generate fault analysis results.
2. The method according to claim 1, characterized in that, The construction of a real-time fault vector knowledge base for vehicles includes: Obtain original maintenance data for vehicles in real time; Based on the original maintenance data, fragment processing is performed to obtain multiple original fault knowledge fragments; Semantic vector encoding is performed on the multiple original fault knowledge fragments to obtain the fault text vector corresponding to each original fault knowledge fragment. All fault text vectors, the original fault knowledge fragments corresponding to each fault text vector, and the source metadata corresponding to the fault text vectors in the original maintenance data are written into a preset FAISS local vector database to obtain a real-time fault vector knowledge base for the vehicle; wherein, in the real-time fault vector knowledge base, each fault text vector is used as an index item, and each fault text vector is associated and bound with its corresponding original fault knowledge fragments and source metadata.
3. The method according to claim 2, characterized in that, The process of segmenting the original maintenance data yields multiple original fault knowledge segments, including: The original maintenance data is standardized and preprocessed to obtain multiple fault knowledge units; For each fault knowledge unit, the fault knowledge unit is divided into length segments to obtain at least one original fault knowledge segment, and each original fault knowledge segment corresponds to a complete fault handling content.
4. The method according to claim 3, characterized in that, The standardized preprocessing includes text parsing, data cleaning, formatting and organization, and knowledge unit construction.
5. The method according to claim 1, characterized in that, The real-time fault vector knowledge base includes multiple fault text vectors, as well as original fault knowledge fragments and source metadata associated with and bound to each fault text vector; The process involves performing an approximate nearest neighbor search on the real-time fault vector knowledge base based on the vehicle fault problem to obtain fault knowledge information that meets preset requirements, including: The vehicle malfunction problem is semantically vectorized to obtain a query vector; An approximate nearest neighbor search is performed in the real-time fault vector knowledge base. If at least one target fault text vector that meets the similarity requirement with the query vector is found, the target original fault knowledge fragment and target source metadata associated with each target fault text vector are retrieved from the real-time fault vector knowledge base. Based on the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector, fault knowledge information for the vehicle fault problem is formed.
6. The method according to any one of claims 1 to 5, characterized in that, The method utilizes a preset answer generation model to perform constraint analysis based on the vehicle fault problem and the fault knowledge information, generating fault analysis results, including: Based on the vehicle malfunction problem and the malfunction knowledge information, an enhanced prompt is constructed; The enhanced prompts are input into a preset answer generation model for constraint analysis to generate fault analysis results.
7. The method according to claim 6, characterized in that, The fault knowledge information includes at least one target fault text vector, as well as the target original fault knowledge fragment and target source metadata corresponding to each target fault text vector; The enhanced prompt is constructed based on the vehicle malfunction problem and the malfunction knowledge information, including: The vehicle malfunction problem, the target original malfunction knowledge fragment corresponding to each target malfunction text vector, and the target source metadata are filled into the preset first prompt word template to generate role constraints, known information, user questions, answer rules, and output format requirements. Enhanced prompts are generated based on the role constraints, the known information, the user question, the answer rules, and the output format requirements.
8. The method according to claim 6, characterized in that, The enhanced prompts include role constraints, known information, user questions, answer rules, and output format requirements; The step of inputting the enhanced prompts into a preset answer generation model for constraint analysis to generate fault analysis results includes: The enhanced prompts are input into a preset answer generation model to extract the fault consultation object and fault phenomenon from the user's question; Extract the causes, detection methods, and handling steps of the fault that are related to the fault consultation object and the fault phenomenon from the known information; According to the role constraints and the answer rules, the causes of the fault are organized into possible causes, the detection methods and the handling steps are organized into handling suggestions, and the source metadata corresponding to the causes of the fault, the detection methods and the handling steps are organized into reference sources. In addition, multiple extended questions are generated based on the user questions, the system components of the fault consultation object and the fault phenomena. The possible causes, suggested solutions, cited sources, and multiple related questions are formatted according to the output format requirements, and the fault analysis results are output.
9. A vehicle fault analysis system, characterized in that, include: The building module is used to build a real-time fault vector knowledge base for vehicles; The problem receiving module is used to receive vehicle malfunction problems input by the user; The search module is used to perform an approximate nearest neighbor search in the real-time fault vector knowledge base based on the vehicle fault problem to obtain fault knowledge information that meets preset requirements. The fault analysis module is used to perform constraint analysis based on the vehicle fault problem and the fault knowledge information using a preset answer generation model, and generate fault analysis results.
10. A computing device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of the vehicle fault analysis method as described in any one of claims 1 to 8.