Vehicle error information reporting method and related device
By converting vehicle error information into UART data frame format and reporting it using UART, the reliability problem caused by CAN bus failure was solved, achieving efficient error information reporting in complex operating environments and reducing R&D and production costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SAIC MOTOR
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, the reliability of reporting vehicle error information via CAN bus is low, especially under complex operating conditions, which may lead to communication failures and make it difficult to locate and resolve errors.
Error messages are converted into data frames conforming to the Universal Asynchronous Receiver/Transmitter (UART) format and reported via UART, reducing hardware improvements to the controller motherboard. Error trackers are used to collect error information from multiple functional modules, which is then stored and analyzed in conjunction with external monitoring devices.
It can still reliably report error information when the CAN bus fails, reducing hardware implementation complexity and cost, and improving the reliability and efficiency of error information reporting.
Smart Images

Figure CN122151799A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and in particular to a method and related apparatus for reporting vehicle error information. Background Technology
[0002] With the rapid development of automotive electronics technology, vehicles are becoming increasingly functional and their built-in modules are becoming more complex. When the vehicle is powered on, during the initialization or operation of the functional modules, the various software modules in the Electronic Control Unit (ECU) interact and coordinate control, which may lead to software errors. In such cases, the error information is usually reported so that error analysis software or R&D personnel can perform error analysis.
[0003] In related technologies, when a functional module generates an error, it is usually necessary to report the error information to the outside via the Controller Area Network (CAN) bus; however, this method has low reliability. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a vehicle error information reporting method and related apparatus to solve the problem of low reliability in error information reporting.
[0005] Based on this, the embodiments of this application disclose the following technical solutions:
[0006] In a first aspect, embodiments of this application provide a vehicle error information reporting method, applied to a vehicle control system, the vehicle control system including a universal asynchronous transceiver and an external monitoring device, the method comprising:
[0007] In response to an error occurring during vehicle operation, error information and data frame format are obtained. The error information is data describing a software error occurring during vehicle operation, and the data frame format is a data format conforming to the data transmission standard corresponding to the universal asynchronous transceiver.
[0008] The error information is encoded according to the data frame format to obtain an error information data frame that satisfies the data frame format;
[0009] The error information data frame is reported to the external monitoring device via the universal asynchronous transceiver, and the external monitoring device is used to store and analyze the error information data frame.
[0010] Optionally, if the error message comes from multiple functional modules, the method further includes:
[0011] Activate the error tracker, which is used to track and collect error information from multiple of the functional modules;
[0012] The response to an error occurring during vehicle operation, including obtaining error information, includes:
[0013] In response to an error occurring during vehicle operation, the error information is collected via the error tracker;
[0014] If the error tracker includes the error information, obtain the error information.
[0015] Optionally, the method further includes:
[0016] The Universal Asynchronous Receiver / Transmitter (UART) is activated using a standalone activation tool, which is developed specifically for activating the UART. This tool is then used to perform the subsequent steps of obtaining error information and data frame format.
[0017] Optionally, the external monitoring device is used for:
[0018] Obtain error information data frames from the general asynchronous transceiver;
[0019] Store the error information data frame;
[0020] In response to receiving the export instruction, the error information data frame is exported.
[0021] Optionally, the error information includes a relative timestamp corresponding to the occurrence of the error. If the controller area network CAN bus has not failed, the external monitoring device is further used for:
[0022] Obtain the bus data transmitted on the CAN bus, and the absolute timestamp corresponding to the bus data;
[0023] Based on the absolute timestamp and the relative timestamp, establish the association between the error information data frame and the bus data;
[0024] Based on the association relationship, the error information data frame and the bus data are stored together.
[0025] In response to receiving the export instruction, the error information data frame and the bus data are exported.
[0026] Optionally, the external monitoring device includes a circular buffer for storing the error information data frames according to a first-in, first-out (FIFO) principle. The external monitoring device is also used for:
[0027] If the buffer reaches its storage limit, the new error information data frame will overwrite the old error information data frame.
[0028] Optionally, the error information includes an error identifier, a relative timestamp corresponding to the error occurrence, and vehicle operating condition information.
[0029] Secondly, embodiments of this application provide a vehicle error information reporting device, the device comprising an acquisition unit, an encoding unit, and a reporting unit;
[0030] The acquisition unit is used to acquire error information and data frame format in response to an error occurring during vehicle operation. The error information is data describing a software error occurring during vehicle operation, and the data frame format is a data format that conforms to the data transmission standard corresponding to the universal asynchronous transceiver.
[0031] The encoding unit is used to encode the error information according to the data frame format to obtain an error information data frame that satisfies the data frame format;
[0032] The reporting unit is used to report the error information data frame to the external monitoring device through the universal asynchronous transceiver, and the external monitoring device is used to store and analyze the error information data frame.
[0033] Thirdly, embodiments of this application provide a computer device, characterized in that the computer device includes a processor and a memory:
[0034] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0035] The processor is configured to execute the method described in the first aspect above according to the computer program.
[0036] Fourthly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, the computer program being used to execute the method described in the first aspect above.
[0037] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the method described in the first aspect above.
[0038] As can be seen from the above technical solutions, this application has at least the following beneficial effects:
[0039] In response to vehicle errors during operation, the system acquires the error information and the corresponding data frame format from the Universal Asynchronous Receiver / Transmitter (UART). The error information is then encoded according to this format to obtain a valid error information data frame, enabling the error information to be converted into a data transmission format. This error information data frame is then reported to an external monitoring device for storage and analysis via the UART. Most mainstream controller motherboards include the corresponding hardware module for the UART. This error reporting process reduces the need for hardware modifications to the controller motherboard, thus ensuring that vehicle error information can be reported even in the event of CAN bus failure, while reducing hardware implementation complexity and lowering R&D and production costs. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating a vehicle error information reporting method provided in this application embodiment;
[0042] Figure 2 This is a schematic diagram of the structure of a vehicle error information reporting device provided in an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0044] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0045] CAN bus is a serial communication protocol based on message broadcasting. With the continuous development of vehicle technology, automobiles include more and more electronic control units, such as engine control units, brake control units, and body control units. These units need to transmit a large amount of data. CAN bus has become the standard protocol for internal communication in automobiles because of its fast transmission speed and many connection nodes.
[0046] In related technologies, error information from various vehicle software modules is typically reported via the CAN bus. However, vehicle operating conditions are complex and variable, including situations such as the vehicle being in sleep or wake-up mode, cable breakage, connector hardware errors, or electromagnetic interference. These conditions can cause the CAN bus data transmission method to fail, thus cutting off the error information reporting communication channel. This makes it impossible for external parties to perceive vehicle errors, hindering error localization and causing delays in error resolution. Therefore, reporting vehicle error information via the CAN bus is a method with low reliability.
[0047] In response to CAN bus failures, some data transmission methods require modifications to the existing controller motherboard. For example, the Serial Peripheral Interface (SPI) requires the additional integration of SPI hardware interface and signal conversion chip on the controller motherboard to resist electromagnetic interference, which significantly increases the complexity of reporting error information at the hardware level, thereby increasing R&D and production costs.
[0048] Based on this, this application provides a vehicle error information reporting method and related apparatus. By converting error information into error information data frames and reporting them via UART, the method ensures that vehicle error information can be reported when the CAN bus fails, while reducing hardware implementation complexity, lowering R&D and production costs, and improving the reliability of the vehicle error information reporting process.
[0049] The vehicle error information reporting method provided in this application can be applied to computer devices with information reporting capabilities, such as terminal devices and servers. Specifically, the terminal device can be a laptop computer, a desktop computer, etc.; the server can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed system. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions.
[0050] See Figure 1 This figure is a flowchart illustrating a vehicle error information reporting method provided in an embodiment of this application. For ease of description, the method will be described below using the vehicle control system as the executing entity. Figure 1As shown, the method includes S101-S103:
[0051] S101: In response to an error occurring during vehicle operation, obtain error information and data frame format.
[0052] The error message is data describing a software error that occurred during vehicle operation, and the data frame format conforms to the data transmission standard of the Universal Asynchronous Receiver / Transmitter.
[0053] During vehicle operation, the various functional modules in the vehicle control system process and exchange data. In this process, if hardware failure or software abnormality occurs, software errors may occur during vehicle operation.
[0054] For example, in electric vehicles, the vehicle control system is responsible for monitoring the Battery Management System (BMS), Motor Control System (MCS), and other functional modules, ensuring their coordinated operation. If the high-voltage main relay wears out and malfunctions, it can cause abnormalities in the BMS's high-voltage power-on and power-off processes, potentially leading to software errors in the BMS that manage high-voltage power-on and power-off. This is an error caused by a hardware failure. Similarly, if the MCS initialization process fails, the vehicle may become unresponsive to motor control, which is an error caused by a software anomaly.
[0055] Automotive Open System Architecture (AUTOSAR) is a standardized software architecture designed to provide an open and unified development framework for automotive control systems. AUTOSAR aims to promote software reusability, portability, and interoperability in the automotive industry, thereby reducing development costs and accelerating time-to-market for new models. In automotive control systems, especially those based on AUTOSAR, errors occurring during vehicle operation are primarily categorized into application software errors and foundational software errors.
[0056] Application software refers to applications that directly address specific vehicle functions. These applications are typically responsible for implementing specific functions or business logic and are closely related to the user's actual needs. They usually interact less directly with the vehicle's hardware system, instead relying more on middleware and basic software services. For example, infotainment system software provides functions such as navigation and music playback. If a user attempts to connect their phone to play music but fails to pair via Bluetooth, the infotainment system software may display a Bluetooth connection error.
[0057] Basic software refers to the software located below the application software in a multi-layered software architecture. It is responsible for providing standardized services and support to support the operation of the application software. Basic software is usually highly abstract and not directly related to vehicle functions. For example, in basic software, the communication management software is responsible for network communication, realizing data exchange between various Electronic Control Units (ECUs). If, during vehicle operation, electromagnetic interference or hardware failure causes unstable CAN bus communication, data exchange between ECUs is blocked, leading to errors in the CAN bus communication terminal of the communication management software.
[0058] When errors occur in basic software or application software, error information describing the software error that occurred during vehicle operation is obtained. Error information usually includes information such as the time, location, and type of the error. Based on the various types of information included in the error information, the error can be analyzed, located, and resolved.
[0059] In one possible implementation, the error information includes an error identifier, a relative timestamp corresponding to the error occurrence, and vehicle operating condition information. The error identifier is a code or label used to identify the characteristics of the error; it can be a number, string, or enumeration type. The relative timestamp records the specific time the error occurred, typically the time elapsed from when the vehicle control system started until the error occurred. The vehicle operating condition information is the vehicle's operating status data at the time the error occurred, including vehicle speed, engine speed, battery status, and ambient temperature.
[0060] Obtaining the error identifier and relative timestamp corresponding to the error enables rapid error location during error information analysis, thereby reducing problem-solving time and improving the reliability of the vehicle control system. By obtaining the vehicle operating condition information corresponding to the error occurrence, the data sources for error analysis are increased. Error analysis can be performed by combining the error identifier and vehicle operating condition information, thereby improving the comprehensiveness of error analysis.
[0061] As one implementation, an error identifier can include an error code and a module ID. The error code is a numeric or string identifier to identify the error type, and the module ID identifies the module corresponding to the error. See Table 1 for two examples of error identifiers:
[0062] Table 1 Examples of Error Identifiers
[0063]
[0064] A Universal Asynchronous Receiver / Transmitter (UART) is a hardware interface used to implement asynchronous serial communication. It is responsible for converting parallel data into serial data and then sending it out through a serial communication line. The data frame format that conforms to the corresponding UART data transmission standard usually includes start bits, data bits, stop bits, etc.
[0065] S102: Encode the error information according to the data frame format to obtain an error information data frame that meets the data frame format.
[0066] The following is a detailed explanation of the data frame format. A typical error message data frame that conforms to the data frame format includes the following parts:
[0067] (1) Start Bit: Indicates the start of the error information data frame. It is usually a logic 0 bit and is used to inform the receiver that a new error information data frame is about to begin.
[0068] (2) Data Bits: These carry the actual data that needs to be transmitted. The number of data bits can be configured according to application requirements. Common types include 5, 6, 7 or 8 bits.
[0069] (3) Stop Bit: The end of the error information data frame, usually one or more logic 1 bits, used to inform the external receiving device that the error information data frame has ended and the external receiving device can be ready to receive the next error information data frame.
[0070] Optionally, the error message data frame may also include a parity bit: used to detect errors during data transmission. The parity bit can be odd parity (the number of 1s transmitted each time is odd) or even parity (the number of 1s transmitted each time is even). For example, if even parity is configured and there are 3 1s in the data bits, a 1 needs to be added as a parity bit to make the total number of 1s even.
[0071] The error information is encoded according to the above data frame format to obtain an error information data frame that meets the data frame format. Correspondingly, the encoding process has at least the following three correspondences:
[0072] (1) An error message is encoded to obtain an error message data frame.
[0073] (2) One error message is encoded to obtain multiple error message data frames.
[0074] (3) Multiple error messages are encoded to obtain an error message data frame.
[0075] The error message data frame carries the error information data content in a data frame format. Therefore, in the event that the CAN bus communication transmission method fails, the error information is converted into a data format that conforms to the corresponding data transmission standard of UART, thus laying the data foundation for subsequent reporting of error message data frames.
[0076] S103: The error information data frame is reported to the external monitoring device through the universal asynchronous transceiver. The external monitoring device is used to store and analyze the error information data frame.
[0077] The standard activation tool is a utility function used to initiate data transmission from a Universal Asynchronous Receiver / Transmitter (UAWT). In vehicle control systems, the standard activation tool can be used to activate the UAWT, enabling the format conversion and data transmission functions of the corresponding communication module, encoding error messages into error information data frames, and reporting these frames to external monitoring devices. As one implementation method, the standard activation tool can be an enable function in AUTOSAR.
[0078] In one possible implementation, a standalone activation tool is a tool specifically designed to activate a Universal Asynchronous Receiver / Transmitter (UAS). It activates the AAS through a specific command sequence, such as setting parameters like baud rate, data bits, and stop bits, ensuring it functions correctly and can execute subsequent data transmission tasks. Compared to standard activation tools, standalone activation tools eliminate complex and redundant functions such as message queues, channel configuration checks, and global state machine switching.
[0079] Compared to standard activation tools, standalone activation tools have fewer judgment conditions, which greatly simplifies the activation process of general asynchronous transceivers, thereby improving activation efficiency, reducing system complexity, and speeding up the transmission of error information.
[0080] No additional hardware modules need to be added to the controller motherboard. The data transmission function of the universal asynchronous transceiver in the vehicle control system can be realized by simply adding pin interfaces corresponding to the universal asynchronous transceiver.
[0081] As can be seen from the above technical solution, in response to errors occurring during vehicle operation, the system acquires the error information and the corresponding data frame format of the Universal Asynchronous Receiver / Transmitter (UART). The error information is then encoded according to this data frame format to obtain an error information data frame that conforms to the data frame format, enabling the error information to be converted into a data transmission format. The error information data frame is then reported to an external monitoring device for storing and analyzing the error information data frame via the UART. Most mainstream controller motherboards include the corresponding hardware module for the UART. This error information reporting process reduces the need for hardware modifications to the controller motherboard, thereby ensuring that vehicle error information can be reported even when the CAN bus fails, while reducing hardware implementation complexity and lowering R&D and production costs.
[0082] If the error message comes from multiple functional modules, this application embodiment also provides a specific implementation method for obtaining the error message, see A1-A3:
[0083] A1: Activate the error tracker.
[0084] An error tracker is a centralized error information collection tool that can track errors generated by multiple functional modules and collect error information. Without an error tracker, each functional module may need a separate tracking mechanism to report error information, leading to increased system complexity.
[0085] The error tracker can be activated by configuring and initializing parameters, enabling its tracking and collection functions to begin monitoring for errors generated by various functional modules.
[0086] A2: In response to an error occurring during vehicle operation, the error information is collected via the error tracker.
[0087] A3: If the error tracker includes the error information, obtain the error information.
[0088] One implementation method is to periodically monitor each functional module, for example, every 100 milliseconds to determine if each functional module has generated an error. In response to an error generated by a functional module, the functional module sends an error message to the error tracker. The error tracker stores the received error message in a cached data segment. If the error tracker contains error information, it retrieves the error message stored in the error tracker and performs subsequent data processing and data transmission. This achieves timely acquisition of error information and improves the reporting efficiency of error information.
[0089] When errors occur in multiple functional modules, error information from multiple functional modules can be tracked and collected using only an error tracker. This avoids the need for multiple error tracking mechanisms for each functional module, reduces the complexity of system implementation, and improves the efficiency of error information acquisition.
[0090] In one possible implementation, the external monitoring device will process the error information data frame after it is reported, see B1-B3:
[0091] B1: Obtain error information data frames from the Universal Asynchronous Receiver / Transmitter.
[0092] B2: Stores error information data frames.
[0093] Error information data frames can be stored in a large-capacity FLASH memory built into an external monitoring device, thus enabling long-term storage of error information data frames and allowing for the export of more error information data frames.
[0094] B3: In response to receiving an export command, export the error information data frame.
[0095] The export command instructs the export of error information data frames stored on an external monitoring device. These data frames can be exported via the external monitoring device's data analysis interface for analysis. The data analysis interface supports various data formats such as CSV, JSON, and XML, and can be integrated with third-party analysis tools or applications. For example, the interface can transfer error information data frames to other storage devices, upload them to a cloud server, or synchronize them to data analysis software. After export, the error information data frames can be decoded to obtain the error information.
[0096] By receiving error information data frames from UART in real time, relevant information can be captured immediately when an error occurs, improving the system's response speed. By storing error information data frames, data persistence is ensured, and error information data frames will not be lost even if the system restarts or malfunctions, facilitating the query and analysis of historical data.
[0097] The above technical solution can be implemented in the event of CAN bus failure. While ensuring the reliability of error information reporting, it reduces the complexity of hardware implementation. If the controller area network CAN bus is not failed, the external monitoring device can also perform data processing based on the bus data transmitted via the CAN bus, see C1-C4:
[0098] C1: Obtain the bus data transmitted on the CAN bus, as well as the absolute timestamp corresponding to the bus data.
[0099] Bus data refers to data transmitted via the CAN bus to external monitoring devices, including sensor data, control signals, communication status data, and safety system data. An absolute timestamp is a precise time representation method based on a fixed reference point, obtainable through a precise clock module. An absolute timestamp records the specific moment corresponding to the bus data, for example, the time elapsed from the epoch time (January 1, 1970, 00:00:00 UTC) to the specific moment corresponding to the bus data, using the epoch time (January 1, 1970, 00:00:00 UTC) as a fixed reference point.
[0100] As an implementation method, bus data can be obtained through a Controller Area Network (CANFD) with a flexible data rate. CANFD is an extension of CAN, and its main advantages over the CAN bus are higher data transmission rates and greater data payload capacity, making it suitable for applications requiring high-speed transmission of large amounts of data. It also introduces a new frame format and enhanced error detection mechanisms, improving the flexibility and reliability of data transmission. During vehicle operation, various controllers continuously emit signals, generating multiple CANFD data frames. For example, a CANFD data frame may include an identifier (ID), data length, event type, and other data content. C2: Establish the association between error information data frames and bus data based on absolute and relative timestamps.
[0101] Based on absolute and relative timestamps, error message data frames and bus data are synchronized in time, and a correlation is established between them. Specifically, an error message data frame can be correlated with bus data within a preset time period before and after its occurrence. For example, an error message data frame can be correlated with bus data within one hour before and after its occurrence.
[0102] C3: Based on the association relationship, associate and store error information data frames and bus data.
[0103] C4: In response to receiving an export command, export error message data frames and bus data.
[0104] By receiving, storing, and exporting error information data frames and bus data, a more comprehensive understanding of the various status information of the vehicle operation during the time period corresponding to the error can be obtained. This helps to comprehensively analyze the cause of the error and improves the maintainability of the vehicle control system.
[0105] Due to hardware limitations, the storage speed of error information data frames may be slower than the reception speed. This speed discrepancy can lead to data storage congestion. In one possible implementation, the external monitoring device includes a circular buffer. This buffer stores error information data frames according to a first-in, first-out (FIFO) principle. When the external monitoring device is activated, a fixed-size circular buffer is initialized. When the external monitoring device receives a new error information data frame, it is stored sequentially in the circular buffer. If the circular buffer reaches its capacity, the new error information data frame overwrites the old one. The circular buffer offers faster storage speed and is used to temporarily store error information data frames before sequentially storing the information on the external storage device's disk.
[0106] During the storage process, the high-speed storage characteristics based on the circular buffer are matched with the transmission speed of error information data frames, which can efficiently process continuously input error information data frames, thereby improving the efficiency and real-time performance of the error information data frame storage process.
[0107] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a vehicle error information reporting device provided in an embodiment of this application. The vehicle error information reporting device 200 includes an acquisition unit 201, an encoding unit 202, and a reporting unit 203.
[0108] As can be seen from the above technical solution, in response to an error occurring during vehicle operation, the acquisition unit 201 acquires the error information and the data frame format corresponding to the Universal Asynchronous Receiver / Transmitter (UART). The encoding unit 202 encodes the error information according to the data frame format to obtain an error information data frame that meets the data frame format requirements, enabling the error information to be converted into a form suitable for data transmission. The reporting unit 203 reports the error information data frame to an external monitoring device for storing and analyzing the error information data frame via the UART. Most mainstream controller motherboards include hardware modules corresponding to the UART. This error information reporting process reduces hardware modifications to the controller motherboard, thereby ensuring that vehicle error information can be reported when the CAN bus fails, while reducing hardware implementation complexity and lowering R&D and production costs.
[0109] As one possible implementation, the device further includes an error tracking unit for:
[0110] Activate the error tracker, which is used to track and collect error information from multiple of the functional modules;
[0111] The acquisition unit is specifically used for:
[0112] In response to an error occurring during vehicle operation, the error information is collected via the error tracker;
[0113] If the error tracker includes the error information, obtain the error information.
[0114] As one possible implementation, the device further includes an independent activation unit for:
[0115] The Universal Asynchronous Receiver / Transmitter (UART) is activated using a standalone activation tool, which is developed specifically for activating the UART. This tool is then used to perform the subsequent steps of obtaining error information and data frame format.
[0116] As one possible implementation, the external monitoring device is used for:
[0117] Obtain error information data frames from the general asynchronous transceiver;
[0118] Store the error information data frame;
[0119] In response to receiving the export instruction, the error information data frame is exported.
[0120] As one possible implementation, the error information includes a relative timestamp corresponding to the error occurrence. If the controller area network (CAN) bus has not failed, the external monitoring device is further used for:
[0121] Obtain the bus data transmitted on the CAN bus, and the absolute timestamp corresponding to the bus data;
[0122] Based on the absolute timestamp and the relative timestamp, establish the association between the error information data frame and the bus data;
[0123] Based on the association relationship, the error information data frame and the bus data are stored together.
[0124] In response to receiving the export instruction, the error information data frame and the bus data are exported.
[0125] As one possible implementation, the external monitoring device includes a circular buffer for storing the error information data frames according to a first-in, first-out (FIFO) principle. The external monitoring device is also used for:
[0126] If the circular buffer reaches its storage limit, the new error message data frame will overwrite the old error message data frame.
[0127] As one possible implementation, the error information includes an error identifier, a relative timestamp corresponding to the error occurrence, and vehicle operating condition information.
[0128] See Figure 3 This application also provides a computer device, which includes a memory 301 and a processor 302.
[0129] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0130] The processor is used to execute the method of the above method embodiment according to the computer program.
[0131] This application also provides a computer-readable storage medium for storing a computer program for executing the methods described in the above-described method embodiments.
[0132] This application also provides a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the method described in the above method embodiments.
[0133] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0134] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0135] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0136] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0137] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for reporting vehicle error information, characterized in that, Applied to a vehicle control system, which includes a universal asynchronous transceiver and an external monitoring device, the method includes: In response to an error occurring during vehicle operation, error information and data frame format are obtained. The error information is data describing a software error occurring during vehicle operation, and the data frame format is a data format conforming to the data transmission standard corresponding to the universal asynchronous transceiver. The error information is encoded according to the data frame format to obtain an error information data frame that satisfies the data frame format; The error information data frame is reported to the external monitoring device via the universal asynchronous transceiver, and the external monitoring device is used to store and analyze the error information data frame.
2. The method according to claim 1, characterized in that, If the error message comes from multiple functional modules, the method further includes: Activate the error tracker, which is used to track and collect error information from multiple of the functional modules; The response to an error occurring during vehicle operation, including obtaining error information, includes: In response to an error occurring during vehicle operation, the error information is collected via the error tracker; If the error tracker includes the error information, obtain the error information.
3. The method according to claim 1, characterized in that, The method further includes: The Universal Asynchronous Receiver / Transmitter (UART) is activated using a standalone activation tool, which is developed specifically for activating the UART. This tool is then used to perform the subsequent steps of obtaining error information and data frame format.
4. The method according to claim 1, characterized in that, The external monitoring device is used for: Obtain error information data frames from the general asynchronous transceiver; Store the error information data frame; In response to receiving the export instruction, the error information data frame is exported.
5. The method according to claim 4, characterized in that, The error information includes a relative timestamp corresponding to the error occurrence. If the controller area network CAN bus is not faulty, the external monitoring device is also used for: Obtain the bus data transmitted on the CAN bus, and the absolute timestamp corresponding to the bus data; Based on the absolute timestamp and the relative timestamp, establish the association between the error information data frame and the bus data; Based on the association relationship, the error information data frame and the bus data are stored together. In response to receiving the export instruction, the error information data frame and the bus data are exported.
6. The method according to claim 4, characterized in that, The external monitoring device includes a circular buffer, which is used to store the error information data frames according to the first-in-first-out principle. The external monitoring device is also used for: If the circular buffer reaches its storage limit, the new error message data frame will overwrite the old error message data frame.
7. The method according to any one of claims 1 to 6, characterized in that, The error information includes an error identifier, a relative timestamp corresponding to the error occurrence, and vehicle operating information.
8. A vehicle error information reporting device, characterized in that, The device includes an acquisition unit, an encoding unit, and a reporting unit; The acquisition unit is used to acquire error information and data frame format in response to an error occurring during vehicle operation. The error information is data describing a software error occurring during vehicle operation, and the data frame format is a data format that conforms to the data transmission standard corresponding to the universal asynchronous transceiver. The encoding unit is used to encode the error information according to the data frame format to obtain an error information data frame that satisfies the data frame format; The reporting unit is used to report the error information data frame to the external monitoring device through the universal asynchronous transceiver, and the external monitoring device is used to store and analyze the error information data frame.
9. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs and to transfer the computer programs to the processor; The processor is configured to perform the method according to any one of claims 1-7 according to the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method according to any one of claims 1-7.