A vehicle abnormal information query method and a vehicle abnormal information query system

By introducing chatbots, large language models, and script servers into the vehicle anomaly information query system, natural language queries and intelligent analysis for users are realized, solving the problems of high maintenance costs and poor user experience in existing technologies, and ensuring efficient and secure acquisition and analysis of anomaly information.

CN122137814APending Publication Date: 2026-06-02CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2025-12-08
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for acquiring and analyzing vehicle anomaly information are costly to maintain, have a poor user experience, lack intelligent interaction and in-depth analysis capabilities, and are prone to conflicts when multiple users access them concurrently.

Method used

By deploying chat software, chatbots, large language models, and script servers, and using chatbots as information processing and forwarding centers, intelligent acquisition and analysis of vehicle anomaly information can be achieved. Users only need to input query requests through natural language, and the system will perform intent recognition and comprehensive analysis, and manage the request order through task queues and access status identifiers to avoid conflicts.

Benefits of technology

It lowers the barrier to entry for users, simplifies the operation process, improves script management efficiency, avoids script version confusion and complex configuration issues, and achieves efficient and secure concurrent access and real-time anomaly information analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137814A_ABST
    Figure CN122137814A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent vehicle operation and maintenance management technology, and discloses a method and system for querying vehicle anomaly information. The method includes: a chatbot acting as an information processing and forwarding center interacting with chat software, a large language model, and a script server, including: obtaining chat messages from the chat software and sending them to the large language model; obtaining query commands from the large language model and sending them to the script server; obtaining anomaly information from the script server and sending it to the large language model; and obtaining anomaly analysis results from the large language model. This method enables intelligent acquisition and analysis of real-time vehicle anomaly information based on information interaction between various independent modules. Users do not need to focus on the scripts, lowering the user threshold and simplifying the user operation process. Furthermore, unified script management based on the server improves script management efficiency, reduces script maintenance costs, and avoids problems such as inconsistent script versions and complex configurations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent vehicle operation and maintenance management technology, specifically to a method and system for querying vehicle anomaly information. Background Technology

[0002] As automobiles become more intelligent, the complexity of automotive electronic and electrical systems increases, making abnormal vehicle operation information an important reference for locating the causes of vehicle malfunctions and preventing potential vehicle risks.

[0003] Existing methods for acquiring and analyzing anomaly information mainly include the following: developing corresponding scripts and distributing them to personal computers; developing dedicated apps or web systems; and simple server-side scripts with fixed interfaces (such as APIs). These existing technologies suffer from high maintenance costs, difficulties in upgrading and deployment, high user barriers, complex operations, poor accessibility, and a lack of intelligent interaction and in-depth analysis capabilities. Summary of the Invention

[0004] This invention provides a method and system for querying vehicle anomaly information to solve the problems of high maintenance costs and poor user experience in existing methods of obtaining anomaly information.

[0005] In a first aspect, the present invention provides a method for querying vehicle anomaly information, applied to a chatbot. The method includes: obtaining chat messages from a chatbot and sending the chat messages to a large language model; obtaining a query instruction sent by the large language model and sending the query instruction to a script server; obtaining anomaly information sent by the script server and sending the anomaly information to the large language model, wherein the script server calls a query script based on the query instruction to obtain the anomaly information from the target vehicle; and obtaining anomaly analysis results sent by the large language model and feeding back the anomaly information and anomaly analysis results to the chatbot.

[0006] The vehicle anomaly information query method provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center, interacting with the chat software, the large language model, and the script server. This includes: obtaining chat messages from the chat software and sending them to the large language model; obtaining query commands from the large language model and sending them to the script server; obtaining anomaly information from the script server and sending it to the large language model; and obtaining anomaly analysis results from the large language model. This method enables intelligent acquisition and analysis of real-time vehicle anomaly information based on information interaction between these independent modules. Users do not need to focus on the scripts, lowering the barrier to entry and simplifying the user operation process. Furthermore, unified script management via the server improves script management efficiency, reduces maintenance costs, and avoids issues such as inconsistent script versions and complex configurations.

[0007] In one alternative implementation, sending a chat message to a large language model includes: parsing the chat message to determine a user identifier and / or a query request; generating a first structured message based on the user identifier and the query request; and sending the first structured message to the large language model.

[0008] This invention analyzes chat messages sent by users through chat software to identify user identifiers representing user identity and query requests entered by users in natural language. This allows for the rapid identification of user identity and query targets, avoiding identity confusion or misinterpretation of requests, and providing basic information for targeted queries of abnormal information.

[0009] In one optional implementation, sending a query instruction to a script server includes: retrieving preset key fields from the query instruction to obtain the vehicle identification number (VIN) and anomaly code; in response to the retrieved preset keywords, generating a second structured message based on the user identifier, VIN, and anomaly code, and sending the second structured message to the script server, so that the script server performs permission verification based on the user identifier, and determines the query script based on the VIN and anomaly code after the permission verification is successful.

[0010] This invention, through keyword retrieval, can further confirm whether the conditions for abnormal information query are met when the large language model identifies the user's query intent based on the query request and generates a query instruction. That is, whether it contains the vehicle identification number of the target vehicle and the abnormal code for which abnormal information needs to be queried, thereby providing a basis for subsequent abnormal information query.

[0011] In one optional implementation, before sending the query instruction to the script server, the method further includes: obtaining the access status identifier corresponding to the vehicle identification number; if the access status identifier is in an accessed state, then placing the query instruction into a first task queue; if the access status identifier is in an unaccessed state, then adjusting the access status identifier to an accessed state.

[0012] This invention assigns an access status identifier to the VIN corresponding to each target vehicle and constructs a corresponding task queue. It uses a chatbot service as the core scheduling hub of the system to coordinate the execution order of requests, enabling orderly access to the same target vehicle, ensuring mutual exclusion of access to the same vehicle resources, avoiding multiple potentially conflicting data query requests to the same vehicle at the same time, and achieving efficient and secure concurrent access.

[0013] In one optional implementation, after obtaining the abnormal information, the method further includes: adjusting the access status flag to an inaccessible state and placing the query instruction into a second task queue.

[0014] This invention, by adjusting the access status flag of the target vehicle's VIN after obtaining the abnormal information corresponding to the current query request, can release the vehicle's "currently being accessed" flag to enable the next access, thus ensuring that query requests for the same vehicle are executed serially.

[0015] Secondly, the present invention provides a method for querying vehicle anomaly information, applied to a large language model. The method includes: obtaining chat messages sent by a chatbot; parsing instructions based on the chat messages to obtain query instructions, and sending the query instructions to the chatbot; obtaining anomaly information sent by the chatbot, generating anomaly analysis results based on the anomaly information, and sending the anomaly analysis results to the chatbot.

[0016] The vehicle anomaly information query method provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center. During the anomaly information query process, the large language model sequentially obtains chat messages sent by the chatbot, determines the query command based on the chat information and sends it to the chatbot, obtains the anomaly information sent by the chatbot, analyzes the anomaly information, and sends the anomaly analysis results back to the chatbot. It can recognize the user's query intent based on natural language understanding and perform comprehensive anomaly analysis. Users only need to input a natural language query request in the chat software without having to pay attention to the script, reducing the user's usage threshold and simplifying the user operation process.

[0017] In one optional implementation, the query instruction is obtained by parsing the chat message, including: determining the session identifier based on the user identifier in the first structured message corresponding to the chat message, and obtaining the current time; obtaining historical information within a preset time interval before the current time based on the session identifier, wherein the number of historical information entries does not exceed a preset number; performing intent parsing based on the query request and / or historical information in the first structured message to obtain query information; determining whether the query information conforms to a preset format, and if the query information conforms to the preset format, determining the query instruction, wherein the query instruction includes the vehicle identification number (VIN) and anomaly code.

[0018] This invention enables session management and context restrictions by setting session identifiers for users. It can maintain the contextual continuity of user interaction, allowing users to provide information step by step in multi-turn dialogues, while avoiding contextual confusion, incorrect associations, or performance degradation caused by excessively long or outdated historical information, thereby accurately identifying user intent.

[0019] In one optional implementation, the method further includes: if the query information does not conform to a preset format, determining whether the query information needs to be fed back to the chat software; if so, sending the query information to the chatbot, which then feeds the query information back to the chat software; if not, sending a preset prompt message to the chatbot, which then feeds the preset prompt message back to the chat software.

[0020] This invention determines whether a user's query request is an abnormal query request by judging whether the query information obtained after intent analysis is in a preset format corresponding to an abnormal query. If it is an abnormal query request, the subsequent abnormal query process continues. If it is not an abnormal query request, it further determines whether a reply is needed to the user. If a reply is needed, it is sent to the chatbot, thereby directly feeding the query information back to the chat software and avoiding unnecessary abnormal query or information reply processes.

[0021] Thirdly, the present invention provides a vehicle anomaly information query system, comprising: a chat software including a software client and a software server, wherein the software client is deployed on a user's terminal device and is used to obtain the user's chat messages, and the software server is deployed on a chat server and interacts with the software client; a chatbot that interacts with the software server and is used to execute the vehicle anomaly information query method of the first aspect or any corresponding embodiment thereof; a large language model that is deployed on a large model server and interacts with the chatbot and is used to execute the vehicle anomaly information query method of the second aspect or any corresponding embodiment thereof; and a script server that is deployed with query scripts and interacts with the chatbot and the target vehicle respectively, for calling the query scripts and obtaining anomaly information from the target vehicle based on the query scripts.

[0022] The vehicle anomaly information query system provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center, interacting with the chat software, the large language model, and the script server. Based on the information interaction between these independent modules, it can intelligently acquire and analyze real-time vehicle anomaly information. Users do not need to pay attention to the scripts, lowering the user threshold and simplifying the user operation process. At the same time, unified management of scripts based on the server can improve script management efficiency, reduce script maintenance costs, and avoid problems such as script version confusion and complex configuration.

[0023] In one optional implementation, the process of constructing a large language model includes: generating a dialogue dataset based on a preset exception code; and training a preset language model based on the dialogue dataset to obtain a large language model.

[0024] This invention, by pre-constructing anomaly information query dialogue dataset, can train a preset language model to obtain a large language model that can recognize the intent of anomaly information query. Users can use natural language to make query requests on the chat software, simplifying the user operation process.

[0025] The beneficial effects of this invention are: 1. This invention deploys a query system consisting of chat software, chatbots, a large language model, and a script server. The chatbots serve as the information processing and forwarding center, enabling intelligent acquisition and analysis of real-time vehicle anomaly information based on information interaction between various independent modules. Users do not need to pay attention to the scripts, lowering the user threshold and simplifying the user operation process. At the same time, unified management of scripts based on the server can improve script management efficiency, reduce script maintenance costs, and avoid problems such as script version confusion and complex configuration. 2. By constructing a large language model, this invention can identify user query intent based on natural language understanding capabilities and perform comprehensive anomaly analysis. Users only need to input natural language query requests in chat software without having to pay attention to scripts, thus lowering the user threshold and simplifying the user operation process. 3. This invention assigns access status identifiers to the VINs of each target vehicle by a chatbot and constructs corresponding task queues. The chatbot service serves as the core scheduling hub of the system, responsible for coordinating the execution order of requests, enabling orderly access to the same target vehicle, ensuring mutual exclusion of access to the same vehicle resources, avoiding multiple potentially conflicting data query requests to the same vehicle at the same time, and achieving efficient and secure concurrent access. 4. By setting a session identifier for the user at the large language model end, this invention can achieve session management and context restrictions. It can maintain the contextual continuity of user interaction, allowing users to provide information step by step in multi-turn dialogues, while avoiding contextual confusion, incorrect association, or performance degradation caused by excessively long or outdated historical information, thereby accurately identifying user intent. Attached Figure Description

[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is a schematic diagram of the structure of a vehicle anomaly information query system according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first method for querying vehicle abnormality information according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the second process of the method for querying vehicle abnormality information according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the specific process of a method for querying vehicle anomaly information according to an embodiment of the present invention; Figure 5 This is a schematic diagram of concurrency control for a method of querying vehicle abnormality information according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the third process of querying vehicle abnormality information according to an embodiment of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0030] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0031] The main methods for obtaining and analyzing vehicle anomaly information in related technologies include the following: 1. Develop the corresponding scripts and distribute them to personal computers. The drawbacks of this method include: difficulty in upgrading, version inconsistencies, complex configuration, dependence on user environment, inability to resolve conflicts from concurrent access by multiple users, and the need for users to possess certain technical skills.

[0032] 2. Develop a dedicated app or web system. The drawbacks of this approach include: long development cycle, high cost, requirement for user installation or login, compatibility issues across different platforms, potentially complex user interface, and the need for user cooperation for maintenance and updates.

[0033] 3. Simple server-side scripts + fixed interfaces (such as APIs). The shortcomings of this method include: unfriendly interaction (requires specific command formats), lack of intelligent analysis capabilities, and an imperfect mechanism for resolving concurrency conflicts.

[0034] It is evident that most of the related technologies suffer from problems such as high maintenance costs, difficulty in upgrading and deployment, high user threshold, complex operation, easy conflicts when multiple people access vehicle resources concurrently, lack of intelligent interaction and in-depth analysis capabilities, and poor access convenience (requiring a specific environment or software installation). Furthermore, existing technologies generally lack the ability to effectively, conveniently, and intelligently acquire and analyze real-time vehicle operation data.

[0035] Therefore, this invention provides a vehicle anomaly information query system as an optional application scenario, such as... Figure 1 As shown, the constructed vehicle anomaly information query system includes: chat software 100, chatbot 200, large language model 300, and script server 400.

[0036] Chat software 100 is a user-oriented chat platform, such as an internal enterprise instant messaging tool, comprising a software client 101 and a software server 102. The software client 101 is deployed on the user's terminal device, such as a computer, to retrieve the user's chat messages. The user can input natural language queries on the software client 101. The software server 102 is deployed on a chat server and interacts with the software client 101 to retrieve user-input queries.

[0037] Chatbot 200 serves as the core entry point for user interaction, receiving and processing users' natural language query requests. Simultaneously, chatbot 200 acts as the information processing and forwarding center of the query system, deployed on the chat server or utilizing its provided API interfaces to develop message processing logic. During abnormal information queries, it interacts and communicates with the software server 102, the large language model 300, and the script server 400. The chatbot fully leverages the inherent functions of the chat software platform (such as message history and employee identity and permission information query interfaces), avoiding redundant development of related basic functions. Users interact with the robot through a familiar chat software interface, making the operation intuitive and requiring almost zero learning cost.

[0038] The large language model 300 is deployed on a large model server (in the cloud) and communicates with the chatbot 200 via HTTPS protocol. It provides intelligent capabilities such as Natural Language Understanding (NLU), task intent parsing, and information analysis to achieve query intent recognition and anomaly comprehensive analysis. This invention can be fine-tuned based on existing large language models (such as DeepSeek) to obtain the large language model 300 capable of recognizing user query intent and performing anomaly comprehensive analysis.

[0039] The script server 400 is used to invoke query scripts to retrieve anomaly information from the target vehicle 500. The script server 400 deploys and manages pre-developed query scripts, provides the script execution environment and invocation structure, and communicates with the chatbot 200 via HTTPS protocol. It receives and processes structured query requests (JSON format) from the chatbot and returns query results. Simultaneously, the script server 400 communicates with the target vehicle 500 via the TBox unit based on the MQTT protocol, actively reporting error codes when an anomaly occurs. The script server 400 can also proactively invoke scripts to query detailed information about specific anomalies (such as reset time, call stack, etc.). This embodiment of the invention, by centrally deploying the query scripts for retrieving anomaly information on the script server 400, effectively solves the version confusion problem caused by script distribution, prevents multiple different versions of scripts from running simultaneously, and provides a concurrent access control interface to avoid potential conflict risks.

[0040] According to an embodiment of the present invention, a method for querying vehicle abnormality information is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0041] This embodiment provides a method for querying vehicle anomaly information, which can be used in the aforementioned chatbot. Figure 2 This is a flowchart of a method for querying vehicle anomaly information according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain chat messages from the chat software and send the chat messages to the large language model.

[0042] Specifically, in this embodiment of the invention, when the query system starts, the chatbot connects to the chat software's server via the WebSocket protocol and establishes connections with the script server and the large language model via the HTTPS protocol. The vehicle-side communicates with the cloud via its TBox module based on the MQTT protocol. When a vehicle malfunctions, the vehicle-side will report the corresponding error code to the cloud and store detailed error information in local non-volatile memory (NVM).

[0043] In some optional implementations, when technicians need to query abnormal information about a specific target vehicle to pinpoint the cause of the malfunction, they can directly input the query request in natural language through the chat interface provided by the chat software client. The software client sends the query request to the software server, which then packages the user identifier and query request into a single chat message and sends it to the chatbot. The chatbot receives the user's chat message and sends it to the large language model via HTTPS.

[0044] Step S202: Obtain the query command sent by the large language model and send the query command to the script server.

[0045] Specifically, in this embodiment of the invention, after receiving a user's chat message, the large language model parses it to identify the user's intent, i.e., it determines whether the chat message contains a query request, to avoid invalid abnormal information queries caused by the user's chat message containing no query request or containing an incorrect query request. If a query request is included, a corresponding query instruction is generated based on the query request. The query instruction includes at least the vehicle identification number (VIN) and the abnormal code, and the query instruction is resent to the chatbot via the HTTPS protocol. The chatbot, as the information processing and forwarding center of the query system, forwards the query instruction generated by the large language model to the script server.

[0046] Step S203: Obtain the exception information sent by the script server and send the exception information to the large language model. The exception information is obtained by the script server calling the query script according to the query instruction and querying the target vehicle based on the query script.

[0047] Specifically, in this embodiment of the invention, the script server determines the target vehicle based on the VIN in the query command and determines the query script based on the exception code in the query command. It then calls the pre-deployed query script, which communicates with the specified target vehicle via the MQTT protocol to obtain detailed exception information (such as reset time, function call stack, etc.) and returns the obtained exception information to the chatbot. The chatbot receives the exception information sent by the script server and further sends it to the large language model.

[0048] Step S204: Obtain the anomaly analysis results sent by the large language model, and feed back the anomaly information and anomaly analysis results to the chat software.

[0049] Specifically, in this embodiment of the invention, after receiving detailed anomaly information, the large language model analyzes and processes the anomaly information to obtain a comprehensive anomaly analysis result, which is then sent to the chatbot. The chatbot then feeds back the detailed anomaly information and the comprehensive anomaly analysis result to the chat software. The software client then presents the anomaly information and the anomaly analysis result to the technical personnel. The technical personnel can conduct a detailed analysis based on the anomaly information or directly use the anomaly analysis result as a basis to locate the cause of the target vehicle's anomaly and conduct troubleshooting in advance to prevent potential risks to the vehicle.

[0050] The vehicle anomaly information query method provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center, interacting with the chat software, the large language model, and the script server. This includes: obtaining chat messages from the chat software and sending them to the large language model; obtaining query commands from the large language model and sending them to the script server; obtaining anomaly information from the script server and sending it to the large language model; and obtaining anomaly analysis results from the large language model. This method enables intelligent acquisition and analysis of real-time vehicle anomaly information based on information interaction between these independent modules. Users do not need to focus on the scripts, lowering the barrier to entry and simplifying the user operation process. Furthermore, unified script management via the server improves script management efficiency, reduces maintenance costs, and avoids issues such as inconsistent script versions and complex configurations.

[0051] This embodiment provides a method for querying vehicle anomaly information, which can be used in the aforementioned chatbot. Figure 3 This is a flowchart of a method for querying vehicle anomaly information according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain chat messages from the chat software and send the chat messages to the large language model.

[0052] Specifically, step S301 includes: Step S3011: Parse the chat messages to determine the user identifier and / or query request.

[0053] Specifically, in this embodiment of the invention, taking a vehicle with chassis number VIN123456 reporting watchdog reset error code A001 to the cloud as an example (the vehicle locally stores detailed information, such as reset time, function call stack, etc.), the cloud notifies technician A. Technician A sends a query request to the chatbot via chat software: "I want to query the watchdog reset error information for chassis number VIN123456." Figure 4 As shown, the chatbot receives chat messages from users and parses them to determine the user identifier and query request contained therein, for example, the user identifier is UUID789789.

[0054] Step S3012: Generate a first structured message based on the user identifier and query request, and send the first structured message to the large language model.

[0055] Specifically, in this embodiment of the invention, the user identifier and the query request are combined into a first structured message according to a preset format: {"userId": "XXX", "msg": "XXX"}, where userId is the unique ID of the technician, i.e., the user identifier, and msg is the query request sent by the technician to the chatbot. The first structured message is then sent to the large language model via HTTPS.

[0056] For example, based on the user identifier UUID789789 and the query request "I want to query the watchdog reset error information for VIN123456", a first structured message is generated: {"userId": "UUID789789", "msg": "I want to query the watchdog reset error information for VIN123456"}, and sent to the large language model server.

[0057] This invention utilizes a chatbot as an interaction entry point and combines it with the natural language understanding and structured output capabilities of a large language model, significantly reducing the user's operational threshold and enabling convenient expression and intelligent analysis of complex intentions. The entire system does not require users to install dedicated software and can be accessed anytime and anywhere through a general chat software platform, improving the convenience and efficiency of obtaining operation and maintenance information.

[0058] Step S302: Obtain the query command sent by the large language model and send the query command to the script server.

[0059] Specifically, step S302 includes: Step S3021: Obtain the access status identifier corresponding to the vehicle identification number. If the access status identifier is in the accessed state, the query instruction is placed in the first task queue. If the access status identifier is in the unaccessed state, the access status identifier is adjusted to the accessed state.

[0060] Specifically, in this embodiment of the invention, after the large language model server receives the first structured message {"userId": "XXX", "msg": "XXX"} corresponding to the chat message, it looks up or creates a session identifier based on the userId, and then inputs msg into the large language model for parsing. The large language model identifies the user's intent based on the query request corresponding to msg and obtains query information, including the vehicle identification number (VIN) and anomaly code. Then, it converts the query information into a query instruction in a preset format: {"vin": "XXX", "info": "XXX"}, where vin represents the VIN, the unique identifier of the vehicle, and info represents the query anomaly code. For example, when the large language model server creates a session for a new user UUID789789, it parses the message intent and returns a structured query instruction {"vin": "VIN123456", "info": "WD_RST"}, where WD_RST is the watchdog reset anomaly code.

[0061] In some optional implementations, to avoid multiple potentially conflicting data query requests being sent to the same vehicle simultaneously, the chatbot, as the core scheduling hub of the system, employs a scheduling strategy based on queues and resource locking to coordinate the execution order of requests. First, an access status identifier is created for each vehicle's VIN to represent its access status. For example, if the access status identifier is 1, it means the vehicle corresponding to the VIN is in an accessed state; if the identifier is 0, it means the vehicle is in an unaccessed state. If a vehicle is being accessed, further access is not allowed to ensure mutual exclusion of access to the same vehicle resource. Second, to allow simultaneous access to the same vehicle or multiple vehicles, this embodiment of the invention constructs a first task queue to hold unexecuted query instructions and a second task queue to hold executed query instructions, such as... Figure 5 As shown, the first task queue contains unexecuted query commands ti, and the second task queue contains executed query commands fti.

[0062] Therefore, when the chatbot receives a query command from the large language model server, it places the query command at the tail of the first task queue to await subsequent scheduling. For example... Figure 5As shown, the chatbot retrieves tasks from the first task queue in a first-in, first-out (FIFO) order, such as t1, for subsequent anomaly information queries. When the query command corresponding to the user UUID789789 is executed, the corresponding query command is retrieved, and the access status identifier corresponding to the VIN in the query command is obtained. It is then determined whether the target vehicle corresponding to this VIN has been accessed. If it has been accessed, the query command is placed back at the end of the first task queue (since there are no scenarios with excessive access volume, this is almost imperceptible to the user).

[0063] If the vehicle corresponding to the VIN is not accessed, the task parameters are parsed, and the access status is adjusted to the accessed status. Under the above settings, the query system is allowed to query different vehicles simultaneously (because their VINs are different, their access statuses do not affect each other), but it is ensured that query requests for the same vehicle are executed serially (only one request is processed at a time).

[0064] This invention effectively solves the problems of difficult script maintenance and version chaos by centrally deploying scripts on the server side and using an innovative task scheduling mechanism; it also solves the problem of vehicle resource access conflicts in high-concurrency scenarios by using task queues and concurrent scheduling based on VIN locking, and has the ability to acquire real-time information.

[0065] Step S3022: Search the query command for preset key fields to obtain the vehicle identification number (VIN) and the exception code.

[0066] Specifically, in this embodiment of the invention, the chatbot obtains the query instruction from the large language model server and uses "vin" and "info" as preset key fields (corresponding to the query script to be called). It performs preset key field retrieval on the query instruction. After identifying the key fields "vin" and "info", it extracts the information after the key fields to obtain the specific vehicle identification number and the exception code.

[0067] In step S3023, in response to the retrieval of the preset keyword, a second structured message is generated based on the user identifier, vehicle identification number, and exception code, and the second structured message is sent to the script server so that the script server can perform permission verification based on the user identifier, and determine the query script based on the vehicle identification number and exception code after the permission verification is successful.

[0068] Specifically, in this embodiment of the invention, after the chatbot retrieves "vin" and "info", it constructs a second structured message corresponding to the query command based on the user identifier userId, the extracted vehicle identification number vin, and the exception code info: {"userId":"UUID789789","args":{"vin": "VIN123456","info": "WD_RST"}}, and sends the second structured message to the script server.

[0069] In some optional implementations, after receiving the second structured message, the script server first verifies the call permissions based on the user identifier userId. If the permission verification fails, it returns an error message, such as: {"code":"403", "msg":"access denied"}. If the permission verification passes, it calls the corresponding query script based on the vin and info parameters.

[0070] For example, after the script server verifies that UUID789789 has the required permissions, it calls the query script. The query script retrieves detailed watchdog reset information from vehicle VIN123456 via the MQTT protocol, specifically the exception information "time:2025 / 01 / 01 / 16 / 00 / 26,reason:WD_RST,stack:main1 / func2 / ...;time:2024 / 12 / 12...", and returns it to the chatbot. At this point, the query command {"vin": "VIN123456", "info": "WD_RST"} completes execution, adjusts the access status of VIN123456 to inaccessible, and places the query command {"vin": "VIN123456", "info": "WD_RST"} into the second task queue.

[0071] Step S303: Obtain the exception information sent by the script server and send the exception information to the large language model. The script server then calls the query script based on the query command and retrieves the data from the target vehicle based on the query script. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.

[0072] Step S304: Obtain the anomaly analysis results sent by the large language model, and send the anomaly information and anomaly analysis results back to the chat software. For details, please refer to [link to relevant documentation]. Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0073] The vehicle anomaly information query method provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center, interacting with the chat software, the large language model, and the script server. This includes: obtaining chat messages from the chat software and sending them to the large language model; obtaining query commands from the large language model and sending them to the script server; obtaining anomaly information from the script server and sending it to the large language model; and obtaining anomaly analysis results from the large language model. This method enables intelligent acquisition and analysis of real-time vehicle anomaly information based on information interaction between these independent modules. Users do not need to focus on the scripts, lowering the user threshold and simplifying the user operation process. Furthermore, unified script management via the server improves script management efficiency, reduces script maintenance costs, and avoids issues such as script version confusion and complex configuration. The query system is also easily integrated with new vehicle types and new analysis functions, exhibiting good scalability.

[0074] This embodiment provides a method for querying vehicle anomaly information, which can be used in the aforementioned large language model server. Figure 6 This is a flowchart of a method for querying vehicle anomaly information according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps: Step S601: Obtain the chat messages sent by the chatbot. For details, please refer to [link / reference]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.

[0075] Step S602: Parse the chat message to obtain the query command, and send the query command to the chatbot.

[0076] Specifically, step S602 includes: Step S6021: Determine the session identifier based on the user identifier in the first structured message corresponding to the chat message, and obtain the current time.

[0077] Specifically, in this embodiment of the invention, after receiving the first structured message corresponding to the chat message sent by the chatbot, the large language model server, if it is the user's first query, will create a session identifier based on the user identifier in the first structured message; if it is not the first query, it will determine the pre-built session identifier based on the user identifier, thereby managing each user's session based on the session identifier to maintain the contextual continuity of user interaction. Under this setting, users can be allowed to provide information step by step in multi-turn dialogues. For example, the first query request may only contain the exception code to be queried, while the second query request after being reminded may contain the vehicle identification number, thus obtaining complete query information.

[0078] Meanwhile, when performing intent analysis on the current session, the current time is obtained and contextual constraints are applied based on the current time to avoid the influence of historical information on the current session.

[0079] Step S6022: Based on the session identifier, obtain historical information within a preset time interval before the current time, wherein the number of historical information entries does not exceed the preset number of entries.

[0080] Specifically, in this embodiment of the invention, to avoid contextual confusion, incorrect associations, or performance degradation due to excessively long or outdated historical information, the large language model imposes strict limitations on the input contextual information, including a time window and the number of messages. The message window is historical information that only includes user-bot interaction messages within a preset time interval prior to the current time as valid context, such as within 15 minutes (this is just an example and not a limitation). The number of messages is the maximum number of the most recent preset number of interaction messages retained as historical context input within the time window, such as 10 messages (this is just an example and not a limitation).

[0081] Therefore, based on the determined session identifier, historical information within a preset time interval (15 minutes) prior to the current time is retrieved, with the number of historical information entries not exceeding a preset number (10). For example, at 10:00 AM, user A sends a query request, "I want to query information about vehicle VIN45678," and the large language model returns "Please specify the query type." At 10:05 AM, user A sends "Query type is WD_RST." At this time, the large language model will remember all the user's previous dialogues and generate {"vin":"VIN45678", "info": "WD_RST"}, thus completing one dialogue. However, if the user sends "I want to query information about vehicle VIN77777" at 10:40 AM, if the large language model still remembers the previous information, it may assume that the user wants to query the WD_RST information for VIN77777, causing confusion. After setting time window and message quantity limits, the large language model will delete user A's historical conversations at 10:15. At 10:40, when user A sends "I want to query VIN55555 information", the large language model server finds that there are no saved conversations, so it creates a new conversation identifier.

[0082] Step S6023: Perform intent parsing based on the query request and / or historical information in the first structured message to obtain query information.

[0083] Specifically, in this embodiment of the invention, the large language model, after session management and context constraints, performs intent parsing based on the currently received query request to obtain query information. However, if the user's current query request only contains partial information, it is impossible to determine the complete query information based on a single query request. Therefore, it is necessary to perform comprehensive intent parsing based on the current query request and historical information to obtain the complete query information.

[0084] For example, if a user initially sends a query for vehicle information (VIN456456) but does not specify the information type (e.g., reset information, CAN error information), the large language model can return a prompt message, such as {"toUserId": "Please specify the type of information to query (e.g., reset information RST, CAN error information)"}. When the user subsequently sends a "reset information" query, the large model will combine the valid context (i.e., the previous query and the current request) to perform intent parsing and output a structured instruction (e.g., {"vin": "VIN456456", "info": "RST"}).

[0085] Step S6024: Determine whether the query information conforms to the preset format. If the query information conforms to the preset format, determine the query instruction. The query instruction includes the vehicle identification number (VIN) and the exception code.

[0086] Specifically, in this embodiment of the invention, the user may not have sent a query request for abnormal information during the conversation with the chatbot. In this case, such as Figure 4 As shown, after the large language model performs intent analysis based on the query request and obtains the corresponding query information, it needs to determine whether the query information is in a preset format, such as the standard JSON format called by the aforementioned script. If the query information conforms to the preset format, the query instruction is determined and then sent to the chatbot, which in turn sends it to the script server to query for abnormal information.

[0087] Step S6025: If the query information does not conform to the preset format, determine whether the query information needs to be fed back to the chat software. If so, send the query information to the chat robot, and the chat robot will feed back the query information to the chat software.

[0088] Specifically, in this embodiment of the invention, if the query information does not conform to the standard JSON format of the aforementioned script call, it proves that the user is not querying abnormal information and does not need to execute the subsequent script call process, or that the user's expression may not conform to the regulations. Therefore, the intent recognition is first used to determine whether the query information obtained at this time is a message that needs to be returned to the user. If so, the query information is sent to the chatbot, and the chatbot presents the query information to the user, such as... Figure 4 As shown.

[0089] Step S6026: If not needed, send the preset prompt message to the chatbot, and the chatbot will then send the preset prompt message back to the chat software.

[0090] Specifically, in this embodiment of the invention, if a message does not need to be returned to the user, it is determined that the user's expression does not conform to the regulations. Therefore, a preset prompt message is sent to the chatbot, such as a pre-set message format error prompt word, which is then sent to the chatbot as a preset prompt message. The chatbot then feeds back the preset prompt message to the chat software. The user can then adjust their language description according to the prompt message and continue to send query requests.

[0091] The system sets preset prompts based on a pre-built prompt engineering framework for the large language model. This guides the model to understand domain-specific tasks and strictly constrains its output to a predefined structured format. For example, a prompt might be set as follows: "You must strictly output the following JSON code: {vin: "VIN code", info: "error code"}. No other output is allowed. The VIN code must begin with VIN followed by 5 digits; the user may only send 5 digits. The error code must be one of ECU_RST, SW_RST, or WD_RST. ECU_RST indicates ECU reset, SW_RST indicates software reset, and WD_RST indicates watchdog reset. If the VIN or error code is missing, fill in NULL in the output VIN or error code." Examples are provided.

[0092] Large language models, pre-tuned based on existing large language models (such as DeepSeek), can accurately recognize the aforementioned JSON-formatted chat messages. For example, the queryable reset types (WD_RST, SW_RST, ECU_RST) and VIN format (VINXXXXX) are pre-determined. Then, a series of combinations are randomly generated based on the format and VIN: {"vin": "VIN12345", "info": "WD_RST"}, {"vin": "VIN56789", "info": "SW_RST"}. Then, using tools like large language models, a dialogue dataset is generated for fine-tuning the large language model: I want to query the watchdog reset for VIN12345---{"vin": "VIN12345", "info": "WD_RST"}; Please check the reset information for SW, the VIN is VIN56789---{"vin": "VIN56789", "info": "SW_RST"}). Finally, the aforementioned dialogue dataset is used as training data to train the existing large-scale language model, resulting in a large language model.

[0093] The LLM session management based on user ID and strict context restrictions of this invention ensure the continuity of interaction while avoiding performance degradation and incorrect associations caused by information overload. Furthermore, operations based on chat identity facilitate tracking and control, enhancing security and auditing.

[0094] Step S603: Obtain the abnormal information sent by the chatbot, generate an anomaly analysis result based on the abnormal information, and send the anomaly analysis result to the chatbot.

[0095] Specifically, in this embodiment of the invention, the chatbot obtains detailed exception information from the script server, encapsulates the exception information, and sends it to the large language model server. The large language model then performs comprehensive data analysis based on the exception information and generates an analysis report. For example, the detailed exception information is: {"data": "time:2025 / 01 / 01 / 16 / 00 / 26,reason:WD_RST,stack:main1 / func2 / ...;time:2024 / 12 / 12..."}. The resulting exception analysis is: "There were 10 resets, three of which were due to WD_RST, and all occurred when calling task web, suggesting a high probability of task execution timeout." The analysis report is then sent to the chatbot as the exception analysis result. The chatbot then returns the original reset information and the exception analysis result to technician A, completing the query task.

[0096] The vehicle anomaly information query method provided by this invention deploys chat software, a chatbot, a large language model, and a script server. The chatbot acts as the information processing and forwarding center. During the anomaly information query process, the large language model sequentially obtains chat messages sent by the chatbot, determines the query command based on the chat information and sends it to the chatbot, obtains the anomaly information sent by the chatbot, analyzes the anomaly information, and sends the anomaly analysis results back to the chatbot. It can recognize the user's query intent based on natural language understanding and perform comprehensive anomaly analysis. Users only need to input a natural language query request in the chat software without having to pay attention to the script, reducing the user's usage threshold and simplifying the user operation process.

[0097] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for querying vehicle anomaly information, characterized in that, Applied to chatbots, the method includes: Obtain chat messages from the chat software and send the chat messages to the large language model; Obtain the query command sent by the large language model and send the query command to the script server; The script server obtains the exception information sent by the script server and sends the exception information to the large language model. The exception information is obtained by the script server calling the query script according to the query instruction and querying the target vehicle based on the query script. Obtain the anomaly analysis results sent by the large language model, and feed back the anomaly information and the anomaly analysis results to the chat software.

2. The method according to claim 1, characterized in that, Sending the chat message to the large language model includes: The chat messages are parsed to determine the user identifier and / or query request; A first structured message is generated based on the user identifier and the query request, and the first structured message is sent to the large language model.

3. The method according to claim 2, characterized in that, Sending the query command to the script server includes: The query command is used to retrieve preset key fields to obtain the vehicle identification number (VIN) and the exception code. In response to the retrieval of the preset keyword, a second structured message is generated based on the user identifier, the vehicle identification number (VIN), and the exception code. The second structured message is then sent to the script server, enabling the script server to perform permission verification based on the user identifier. After successful permission verification, the script server determines the query script based on the VIN and the exception code.

4. The method according to claim 3, characterized in that, Before sending the query command to the script server, the method further includes: Obtain the access status identifier corresponding to the vehicle identification number. If the access status identifier is in an accessed state, place the query instruction into the first task queue. If the access status identifier is in an unaccessed state, adjust the access status identifier to an accessed state.

5. The method according to claim 4, characterized in that, After obtaining the anomaly information, the method further includes: The access status flag is adjusted to an inaccessible state, and the query command is placed in the second task queue.

6. A method for querying vehicle anomaly information, characterized in that, Applied to a large language model server, wherein a large language model is deployed on the server, the method includes: Retrieve chat messages sent by the chatbot; The chat message is parsed to obtain a query command, which is then sent to the chatbot. Obtain the abnormal information sent by the chatbot, generate an anomaly analysis result based on the abnormal information, and send the anomaly analysis result to the chatbot.

7. The method according to claim 6, characterized in that, The step of parsing the chat message to obtain the query command includes: The session identifier is determined based on the user identifier in the first structured message corresponding to the chat message, and the current time is obtained; Based on the session identifier, historical information within a preset time interval prior to the current time is obtained, and the number of historical information entries does not exceed a preset number. The intent is parsed based on the query request and / or the historical information in the first structured message to obtain query information; Determine whether the query information conforms to a preset format. If the query information conforms to the preset format, then determine the query instruction, which includes the vehicle identification number (VIN) and anomaly code.

8. The method according to claim 7, characterized in that, The method further includes: If the query information does not conform to the preset format, it is determined whether the query information needs to be fed back to the chat software. If so, the query information is sent to the chat robot, and the chat robot feeds back the query information to the chat software. If not needed, a preset prompt message will be sent to the chatbot, which will then relay the preset prompt message back to the chat software.

9. A system for querying vehicle anomaly information, characterized in that, The system includes: The chat software includes a software client and a software server. The software client is deployed on the user's terminal device and is used to obtain the user's chat messages. The software server is deployed on a chat server and interacts and communicates with the software client. A chatbot, deployed on the chat server and communicating with the software server, is used to execute the vehicle anomaly information query method according to any one of claims 1 to 5; A large language model, deployed on a large model server, interacts and communicates with the chatbot to execute the vehicle anomaly information query method as described in any one of claims 6 to 8; A script server, which is deployed with query scripts, interacts and communicates with the chatbot and the target vehicle respectively, and is used to call the query scripts to obtain abnormal information from the target vehicle based on the query scripts.

10. The query system according to claim 9, characterized in that, The construction process of the large language model includes: Generate a dialogue dataset based on preset exception codes; The large language model is obtained by training a preset language model based on the dialogue dataset.