Diesel engine fault code filtering and storing method and system based on AUTOSAR architecture

By assigning severity level priority values ​​to AUTOSAR diesel engine fault codes and filtering them, the problem of frequent reporting of low severity level fault codes was solved, achieving efficient fault code storage and improved diagnostic efficiency.

CN121723316APending Publication Date: 2026-03-24GUANGXI YUCHAI MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The existing AUTOSAR diagnostic system lacks a fault code severity level screening mechanism, which leads to frequent reporting of low severity level fault codes, wasting storage resources and communication bandwidth, and reducing diagnostic efficiency.

Method used

During the AUTOSAR engineering configuration phase, a severity level priority value is assigned to each fault code. Low-priority fault codes are filtered out by fault level thresholds, and only high-priority fault codes are stored and reported. The fault information processing flow is optimized by using the level filtering module and the storage management module.

Benefits of technology

It improves diagnostic efficiency, saves storage space and communication bandwidth, extends the lifespan of non-volatile memory, and enhances response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723316A_ABST
    Figure CN121723316A_ABST
Patent Text Reader

Abstract

The invention discloses a diesel engine fault code filtering and storing method based on an AUTOSAR architecture, relates to the technical field of automobile electronic control, and solves the technical problem that a mechanism for effectively screening and filtering fault codes according to the internal severity levels of the fault codes before the fault codes are stored and reported does not exist in the prior art. The method comprises the following steps: in an AUTOSAR project configuration stage, allocating a severity level priority value for each diagnosis fault code in an AUTOSAR project; after the ECU is powered on, hardware, basic software and an application layer are initialized; all the diagnosis fault codes are filtered according to the severity level priority values, and target diagnosis fault codes are obtained; screening state information corresponding to the target diagnosis fault code and obtaining target state information; and reading the stored target state information and reporting the information to a diagnostic apparatus. The invention further discloses a diesel engine fault code filtering and storing system based on the AUTOSAR architecture. The diagnosis efficiency and the response efficiency are improved, and the storage space is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronic control technology, and more specifically, to a method and system for filtering and storing diesel engine fault codes based on the AUTOSAR architecture. Background Technology

[0002] In modern diesel engine control systems, the AUTOSAR-compliant diagnostic system is a core component ensuring the safe and reliable operation of the engine. This system monitors the operating status of each engine subsystem in real time. Upon detecting an anomaly, it generates a corresponding fault code (DTC) and typically stores the fault information (including status bits, freeze frame data, etc.) in non-volatile memory (NVM) for after-sales service personnel to read and analyze using diagnostic tools.

[0003] Current AUTOSAR diagnostic systems (such as DEM modules) typically report all detected fault codes to the diagnostic tool, regardless of their severity. In practice, a large number of low-severity fault codes exist (e.g., Class 0 fault codes, which are mostly intermittent, minor, or do not affect the vehicle's basic driving functions). The frequent reporting of these fault codes can lead to the following problems: Information redundancy interference judgment: Maintenance personnel need to sift through a large amount of fault information to find the serious faults that truly need attention, which reduces diagnostic efficiency.

[0004] Waste of storage resources: Non-volatile memory (such as EEPROM) has a limited number of erase and write cycles. Storing all fault codes (including unimportant Type 0 fault codes) will shorten the memory life and occupy valuable storage space.

[0005] Communication bandwidth usage: When transmitting data to the diagnostic instrument via buses such as CAN, transmitting unimportant fault codes wastes communication bandwidth and increases response time.

[0006] Existing technologies lack a mechanism for effectively screening and filtering fault codes based on their inherent severity levels before storage and reporting. Although the AUTOSAR standard provides filtering methods such as fault code status masks and function addressing, it does not address hardware resource optimization and diagnostic efficiency improvement strategies based on the severity level of the fault's root cause. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide a diesel engine fault code filtering and storage method and system based on the AUTOSAR architecture to address the shortcomings of the existing technology, and to solve the problem of the lack of an effective screening and filtering mechanism based on the inherent severity level of fault codes before storage and reporting.

[0008] The present invention discloses a method for filtering and storing diesel engine fault codes based on the AUTOSAR architecture, the method comprising: S11: During the AUTOSAR project configuration phase, assign a severity level priority value to each diagnostic fault code in the AUTOSAR project. S12: After the ECU is powered on, the hardware, basic software and application layer are initialized; S13: When the diagnostic system needs to obtain the fault list, it iterates through all the diagnostic fault codes, filters all the diagnostic fault codes according to the severity level priority value, and obtains the target diagnostic fault code. S14: Filter the status information corresponding to the target diagnostic fault code and obtain the target status information; S15: Store the target state information; S16: Read the stored target status information and report it to the diagnostic instrument.

[0009] To further improve the method, the method for filtering all diagnostic fault codes is as follows: when the severity priority value of the diagnostic fault code is less than or equal to a preset fault level threshold, the diagnostic fault code is determined to be a low-priority fault code; when the severity priority value of the diagnostic fault code is greater than the fault level threshold, the diagnostic fault code is determined to be a high-priority fault code, and the high-priority fault code is used as the target diagnostic fault code.

[0010] Furthermore, the method for filtering the status information corresponding to the target diagnostic fault code is as follows: obtain the current status mask corresponding to the target diagnostic fault code, compare the current status mask with a preset status filtering mask, and if the current status mask is not equal to the status filtering mask, then determine that the status information corresponding to the target diagnostic fault code does not meet the status filtering conditions; if the current status mask is equal to the status filtering mask, then determine that the status information corresponding to the target diagnostic fault code meets the status filtering conditions, and then use the status information corresponding to the target diagnostic fault code as the target status information.

[0011] A system for implementing the above-described diesel engine fault code filtering and storage method based on the AUTOSAR architecture, the system comprising: The fault detection module is used to traverse all diagnostic fault codes and assign a severity level priority value to each diagnostic fault code; The grade filtering module is used to filter the diagnostic fault codes and obtain target diagnostic fault codes, and to filter out target status information based on the target diagnostic fault codes. The storage management module is used to store the target status information; The communication reporting module is used to send the target status information to the diagnostic instrument through a preset diagnostic protocol.

[0012] As a further improvement, the storage management module includes a non-volatile storage block, which stores diagnostic fault codes and their related freeze frame data and environmental data information.

[0013] Furthermore, the diagnostic protocol is UDS.

[0014] Beneficial effects The advantages of this invention are: In the AUTOSAR engineering configuration phase, this invention assigns a severity priority value to each diagnostic fault code in the AUTOSAR project. After the ECU is powered on, the hardware, basic software, and application layer are initialized. When the diagnostic system needs to obtain the fault list, it iterates through all diagnostic fault codes and filters them according to the severity priority value to extract the target diagnostic fault code. The target status information corresponding to the target diagnostic fault code is stored. The stored target status information is read and reported to the diagnostic instrument, which improves diagnostic efficiency and response efficiency, saves storage space, effectively reduces the number of writes to non-volatile memory and the amount of data, and extends device life. Attached Figure Description

[0015] Figure 1 This is a flowchart of the diesel engine fault code filtering and storage method based on the AUTOSAR architecture of the present invention. Figure 2 This is a simplified structural diagram of the diesel engine fault code filtering and storage system based on the AUTOSAR architecture of the present invention. Figure 3 The diagram shows the program code for the diesel engine fault code filtering method based on the AUTOSAR architecture of this invention. Detailed Implementation

[0016] The present invention will be further described below with reference to embodiments, but this does not constitute any limitation on the present invention. Any limited modifications made by any person within the scope of the claims of the present invention are still within the scope of the claims of the present invention. See Figures 1-3 The present invention discloses a method for filtering and storing diesel engine fault codes based on the AUTOSAR architecture, the method comprising: Step 1, Fault Level Definition and Mapping: During the AUTOSAR engineering configuration phase, each Diagnostic Trouble Code (DTC) is assigned a severity priority value, DFES_xClsPrio_CA. For example, the severity value for Class 0 faults is defined as 3U, and the severity values ​​for Class 1 and above faults are defined as values ​​greater than 3U (such as 5U, 7U, etc.). This mapping relationship is embedded in the software through a configuration tool. Engineering-level severity mapping configuration: This maps the severity category of the fault (e.g., Class 0, Class 1) to a specific numerical priority (DFES_xClsPrio_CA) during the software engineering phase, providing a basis for numerical comparisons at runtime.

[0017] Step 2, System Initialization: After the ECU is powered on, hardware, basic software, and application layer initialization are performed. The AUTOSAR DEM module, DCM module, etc., are initialized according to standard procedures. The filtering logic of this invention does not require additional special initialization.

[0018] Step 3, Fault Code Filtering and Judgment: When the diagnostic system needs to retrieve a list of faults (e.g., in response to a diagnostic tool's request to read fault codes), it calls functions such as `Dem_SetDTCFilter`. Inside this function, a level determination step is added when iterating through all diagnostic fault codes (DTCs). The specific implementation is shown in the following code. Figure 3 As shown (based on the functions in the provided DcmTest.c, with improvements). In the fault handling process of the AUTOSAR DEM module, a fault level threshold (e.g., 3U) is pre-set, and when traversing fault codes, priority is given to filtering based on the level value corresponding to the fault code. Only fault codes with level values ​​higher than the fault level threshold are subject to subsequent status judgment and storage reporting operations.

[0019] In this embodiment, the fault level threshold can be set according to the actual situation of the vehicle.

[0020] When the diesel engine system is in the startup phase, the fault level threshold is set to 2U. This phase is designed to comprehensively detect potential problems, including intermittent faults and performance deviations.

[0021] When the vehicle performs safety-critical operations, such as activating autonomous driving mode or emergency braking, it is recommended to use a medium threshold, i.e., set the fault level threshold to 3U. This can balance the comprehensiveness of fault detection with the consumption of system resources and ensure the reliability of critical functions.

[0022] Before the system enters low-power mode or hibernation, the fault level threshold can be set to 4U to ensure that only critical faults are handled within a specific operating cycle, reducing unnecessary wake-ups.

[0023] Step 4, Fault Information Storage: After filtering, only high-priority valid fault codes trigger storage operations. The storage management module (interacting with the AUTOSAR NvM module) stores these fault codes and their associated freeze frame data, environmental data, and other information into designated non-volatile memory blocks. This strategy significantly reduces unnecessary storage operations. Based on the above filtering mechanism, the derived strategy of storing only high-priority fault codes effectively reduces the number of writes to non-volatile memory and the amount of data, extending device lifespan. Filtering reduces the amount of fault code data transmitted between the diagnostic tool and the ECU, improving the efficiency and response speed of diagnostic communication.

[0024] Step 5, Fault Information Reading and Reporting: When the diagnostic tool sends a fault code read request via the CAN bus, the communication reporting module (interacting with the AUTOSAR DCM module) retrieves a filtered fault list (i.e., the contents of dtc_buf) from the storage management module, instead of the complete full fault list. The filtered results are then sent to the diagnostic tool via a specific diagnostic protocol (such as UDS).

[0025] Seamless integration with the AUTOSAR standard architecture: This optimization method is embedded as the underlying logic in the AUTOSAR DEM / DCM process without changing the standard interface and module functions, and has good compatibility and portability.

[0026] This invention embeds a predefined fault level-based filtering layer into the traditional workflow of the AUTOSAR Diagnostic Event Management (DEM) module. This filtering layer determines the severity level of fault codes before they are stored or prepared for reporting to the diagnostic instrument. Through engineering configuration, low-priority faults that do not require attention (such as Category 0 faults) are defined with specific values ​​(e.g., 3U), while higher-priority faults are defined with larger values ​​(e.g., Category 1 faults are 5U, and so on). During system operation, by comparing the fault event severity values ​​with the set thresholds, efficient hardware-level filtering is achieved, allowing only high-priority fault codes to enter subsequent storage and communication processes.

[0027] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention, and these will not affect the effectiveness of the implementation of the present invention or the practicality of the patent.

Claims

1. A method for filtering and storing diesel engine fault codes based on AUTOSAR architecture, characterized in that, The method includes: S11: During the AUTOSAR project configuration phase, assign a severity level priority value to each diagnostic fault code in the AUTOSAR project. S12: After the ECU is powered on, the hardware, basic software and application layer are initialized; S13: When the diagnostic system needs to obtain the fault list, it iterates through all the diagnostic fault codes, filters all the diagnostic fault codes according to the severity level priority value, and obtains the target diagnostic fault code. S14: Filter the status information corresponding to the target diagnostic fault code and obtain the target status information; S15: Store the target state information; S16: Read the stored target status information and report it to the diagnostic instrument.

2. The method for filtering and storing diesel engine fault codes based on AUTOSAR architecture according to claim 1, characterized in that, The method for filtering all the diagnostic fault codes is as follows: when the severity priority value of the diagnostic fault code is less than or equal to a preset fault level threshold, the diagnostic fault code is determined to be a low-priority fault code; when the severity priority value of the diagnostic fault code is greater than the fault level threshold, the diagnostic fault code is determined to be a high-priority fault code, and the high-priority fault code is used as the target diagnostic fault code.

3. The method for filtering and storing diesel engine fault codes based on AUTOSAR architecture according to claim 1, characterized in that, The method for filtering the status information corresponding to the target diagnostic fault code is as follows: obtain the current status mask corresponding to the target diagnostic fault code, compare the current status mask with a preset status filtering mask, and if the current status mask is not equal to the status filtering mask, then it is determined that the status information corresponding to the target diagnostic fault code does not meet the status filtering conditions; if the current status mask is equal to the status filtering mask, then it is determined that the status information corresponding to the target diagnostic fault code meets the status filtering conditions, and then the status information corresponding to the target diagnostic fault code is taken as the target status information.

4. A system for implementing the diesel engine fault code filtering and storage method based on the AUTOSAR architecture as described in any one of claims 1-3, characterized in that, The system includes, The fault detection module is used to traverse all diagnostic fault codes and assign a severity level priority value to each diagnostic fault code; The grade filtering module is used to filter the diagnostic fault codes and obtain target diagnostic fault codes, and to filter out target status information based on the target diagnostic fault codes. The storage management module is used to store the target status information; The communication reporting module is used to send the target status information to the diagnostic instrument through a preset diagnostic protocol.

5. A diesel engine fault code filtering and storage system based on AUTOSAR architecture according to claim 4, characterized in that, The storage management module includes a non-volatile storage block, which stores diagnostic fault codes and their related freeze frame data and environmental data information.

6. A diesel engine fault code filtering and storage system based on AUTOSAR architecture according to claim 4, characterized in that, The diagnostic protocol is UDS.