CN-122001757-A - Method and system for realizing engine OBD data stream configuration
Abstract
The invention discloses a method and a system for realizing the configuration of an OBD data stream of an engine, comprising the following steps of acquiring an ECU after configuration, wherein the ECU receives a configuration instruction and a data stream configuration table, takes the data stream configuration table as a first data stream configuration table, analyzes the first data stream configuration table, carries out security check and validity check on the first data stream configuration table, stores the first data stream configuration table into a first storage area in an NVM if the security check and the validity check are passed, and enables the first data stream configuration table to be effective to obtain a first effective data stream configuration table, carries out vehicle-mounted diagnosis by using the ECU after configuration, comprises the ECU after configuration to receive an OBD request message, generates response data according to the requirement of the OBD request message, and sends the response data to the OBD request message.
Inventors
- LI JUSHENG
- LIANG SIYU
- Lin Nancheng
- ZHOU JINGSONG
Assignees
- 广西玉柴机器股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260228
Claims (8)
- 1. A method for implementing engine OBD data flow configurability, comprising the steps of: The ECU analyzes the first data stream configuration table, carries out safety check and validity check on the first data stream configuration table, stores the first data stream configuration table into a first storage area in the NVM if the safety check and the validity check are passed, validates the first data stream configuration table to obtain a first validated data stream configuration table, and the ECU after configuration; The vehicle-mounted diagnosis is carried out by using the configured ECU, wherein the configured ECU receives an OBD request message, generates response data according to the demand of the OBD request message, and sends the response data to the OBD request message.
- 2. The method for implementing engine OBD data flow configurability according to claim 1, wherein the generating response data by the configured ECU according to the requirements of the OBD request message comprises: After configuration, the ECU reads a first effective data stream configuration table from the NVM; acquiring all enabled configuration items, including traversing each configuration item in the first effectable data flow configuration table, and acquiring all enabled configuration items in the configuration items as enabled configuration items; acquiring an original engineering value of each enabling configuration item, wherein the original engineering value comprises acquiring a data source address of each enabling configuration item, and reading the original engineering value from the configured ECU according to the data source address; obtaining a standard OBD value, which comprises obtaining a conversion formula corresponding to an original engineering value from a first effective data stream configuration table, and calculating the original engineering value according to the conversion formula to obtain the standard OBD value; And splicing all the standard OBD values according to the order of enabling the configuration items to form response data.
- 3. A method of implementing engine OBD data flow configurability as recited in claim 1, wherein the security check comprises: The method comprises the steps of carrying out CRC (cyclic redundancy check) on a data stream configuration table to ensure data integrity, carrying out PKI (public key infrastructure) -based digital signature verification on the data stream configuration table to ensure the authenticity and the non-tamper property of a data source, if the CRC and the digital signature verification are passed, carrying out security check, and if either one of the CRC and the digital signature verification is not passed, carrying out security check.
- 4. A method of implementing engine OBD data flow configurability as recited in claim 1, wherein said validity check comprises: and carrying out format check on the data stream configuration table, carrying out content check and logic check, if all three checks pass, passing the validity check, and if any check fails, failing the validity check.
- 5. The method of implementing engine OBD data stream configurability of claim 1, further comprising configuring the configured ECU with updates, obtaining updated ECU, comprising: The ECU acquires a configuration update request and a new data stream configuration table, and takes the new data stream configuration table as a second data stream configuration table, wherein the new data stream configuration table is communicated with the ECU after configuration through a Tester subjected to security verification; Performing security check and validity check on the second data stream configuration table; If the security check and the validity check are passed, storing the second data stream configuration table in a second storage area in the NVM; restarting the configured ECU, validating the second data stream configuration table to obtain a second validated data stream configuration table, and updating the configured ECU; and after updating, the ECU performs information interaction with the Tester, the correctness of the second effective data stream configuration table is verified, and if the second effective data stream configuration table has a problem, the ECU rolls back the first effective data stream configuration table in the first storage area.
- 6. A system for implementing engine OBD data flow configurability for implementing the method of any one of claims 1 to 5, comprising: The configuration management module is used for acquiring the configured ECU, and comprises an ECU receiving configuration instructions and a data stream configuration table, wherein the data stream configuration table is used as a first data stream configuration table; if the security check sum validity check is passed, the ECU stores the first data stream configuration table into a first storage area in the NVM, validates the first data stream configuration table to obtain a first validated data stream configuration table, and the configured ECU; The vehicle-mounted diagnosis module is used for performing vehicle-mounted diagnosis by using the configured ECU, and comprises the steps of receiving an OBD request message by using the configured ECU, generating response data by the configured ECU according to the requirement of the OBD request message, and sending the response data to the OBD request message by the configured ECU.
- 7. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any one of claims 1 to 5 when executing the computer program.
- 8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 5.
Description
Method and system for realizing engine OBD data stream configuration Technical Field The invention relates to the technical field of on-board diagnostics (OBD), in particular to a method and a system for realizing the configuration of an OBD data stream of an engine. Background Currently, mainstream on-board diagnostic (OBD) systems are typically consolidated in their function in processing OBD data streams and fault information. The method is characterized in that a Parameter Identification (PID) requested by the OBD acquisition equipment is pre-hard coded in an ECU program. Data parsing rules (e.g., formulas, byte offsets, scaling) are written in the code. The format and period of the messages reported to the cloud platform are also statically set. The system has the following defects of poor flexibility, and incapability of dynamically adjusting the collected parameter list according to different vehicle types, different engine ECU protocols or new requirements of users. Every time a parameter is added or an analysis rule is modified, the firmware needs to be redeveloped and burned, which is time-consuming and labor-consuming. The compatibility is low, the model and the ECU version which are layered in the market are faced, the solidified system needs to develop different versions of software for each variant, and the maintenance cost is extremely high. The development period is long, and if a certain data parameter is to be added, deleted or modified, even the arrangement sequence is only adjusted, a software engineer is required to modify the source code, recompile and brush the ECU and carry out full test verification. This process is cumbersome, time consuming and costly. And the resource waste is that in order to cover more vehicle types, the terminal CAN request a large number of parameters by default, but only a few of the parameters are actually used, so that the waste of CAN bus bandwidth and terminal processing resources is caused. The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person of ordinary skill in the art. Disclosure of Invention The invention aims to provide a method and a system for realizing the configuration of an OBD data stream of an engine, which can dynamically define and modify the content and the attribute of the data stream on the premise of not modifying the underlying software of an ECU. The invention provides a method for realizing the configuration of an OBD data stream of an engine, which comprises the following steps of obtaining a configured ECU, receiving a configuration instruction and a data stream configuration table by the ECU, taking the data stream configuration table as a first data stream configuration table, analyzing the first data stream configuration table by the ECU, carrying out safety check and validity check on the first data stream configuration table, storing the first data stream configuration table into a first storage area in an NVM by the ECU if the safety check and the validity check are passed, validating the first data stream configuration table to obtain a first validated data stream configuration table, and carrying out vehicle-mounted diagnosis by the ECU after configuration, wherein the ECU receives an OBD request message after configuration, generates response data according to the requirement of the OBD request message after configuration, and sends the response data to the OBD request message after configuration. In one embodiment of the invention, the ECU after configuration generates response data according to the demand of the OBD request message, wherein the ECU after configuration reads a first effective data stream configuration table from the NVM, acquires all enabled configuration items, including traversing each configuration item in the first effective data stream configuration table, acquiring all enabled configuration items in the configuration items as enabled configuration items, acquires an original engineering value of each enabled configuration item, including acquiring a data source address of each enabled configuration item, reading the original engineering value from the ECU after configuration according to the data source address, acquires a standard OBD value, including acquiring a conversion formula corresponding to the original engineering value from the first effective data stream configuration table, calculating the original engineering value according to the conversion formula to obtain the standard OBD value, and splicing all standard OBD values according to the order of the enabled configuration items to form the response data. In one embodiment of the invention, the security check comprises performing CRC check on the data stream configuration table to ensure data integrity, performing PK