Automatic test method and system for UDS diagnostic service

By designing an automated test system, using the identifier read and write data module and the CAN message data generation module, the problem of low testing efficiency of UDS diagnostic service is solved, efficient and accurate fault detection and diagnosis is achieved, cost is reduced, and automobiles are met Production demand.

CN119002459APending Publication Date: 2024-11-22FAW CAR CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411104590.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, UDS diagnostic services use identifier reading and writing data to test inefficiently and lack automated solutions, resulting in increased difficulty in detecting automobile failures and high testing costs.

Method used

An automated testing system for UDS diagnostic service was designed, including a data reading module through identifiers, a data writing module through identifiers, a CAN message data module for generating UDS diagnostic read and write data services, a power control module, a message analysis module and The automated test module is connected to the controller through the CAN bus to realize automated test and report generation.

Benefits of technology

It improves the efficiency and accuracy of UDS diagnostic tests, reduces testing costs, and achieves fast and reliable fault location and diagnosis, meeting the needs of modern automobile production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002459A_ABST
    Figure CN119002459A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic test method and system for UDS diagnosis service. The system comprises a module for reading data through an identifier, wherein the module is connected with a controller through a CAN bus and is mainly responsible for simulating and sending an operation message for reading the data through the identifier and recording reply message data of the controller; the identifier data writing module is connected with the controller through a CAN bus and is mainly responsible for simulating and sending an identifier data writing operation message and recording controller reply message data; the CAN message data module for generating the UDS diagnosis read-write data service is used for generating CAN message data of the UDS diagnosis read-write data service according to the UDS protocol and the identifier list; each generated service request message only contains one data identifier; according to the invention, a test engineer can conveniently and rapidly position an error occurrence position and a time node; automatic test execution is realized, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automobile fault detection, and relates to an automatic testing method and system for a UDS diagnostic service, and in particular to an automatic testing method and system for a UDS diagnostic service to read and write data through an identifier. Background Art

[0002] At present, with the development of the automobile industry, the level of vehicle electrification is getting higher and higher, and the difficulty of automobile fault detection is also increasing. In order to better perform fault detection, the automobile industry has proposed a standardized protocol. This diagnostic communication protocol is called the Unified Diagnostic Service (UDS), which can coordinate ECU diagnosis in the global automotive electronics field. UDS (Unified Diagnostic Services) is a unified and standard automotive diagnostic protocol. Its core is the standardization of message formats. In order to ensure the normal operation of automotive electronic systems, it is necessary to test the UDS diagnostic service's read data operation through identifiers and write data operation through identifiers. At present, there are many methods and systems for testing the read data operation through identifiers and the write data operation through identifiers, but generally they are manually simulated to send instructions, and then the controller read and write operation results are analyzed, and the test efficiency is not high. Therefore, an efficient and low-cost UDS diagnostic service read and write data test method through identifiers is needed to better meet the needs of modern automobile production.

[0003] Patent document CN202410207769.4 discloses an automated testing method for UDS diagnostic services, including the following steps: S1, start the UDS diagnostic service test system; S2, select the service item to be tested and the test item to be tested under the service item; S3, test the selected test items in turn and generate test results; S4, generate a test report and end the test. The present invention only needs to select the items to be tested and click start to complete the automated test, and a test report can be generated as needed; there is no need to import test cases, and the functional services to be tested can be flexibly selected according to the requirements table for testing, and there is no need to traverse all sub-functions to find the sub-functions that are actually supported, saving resources; this test system has strong versatility, does not require the writing of test cases, and is easy to operate; the hardware and software costs involved are lower than those of other test systems.

[0004] Patent document CN202410138453.4 relates to the field of CAN bus testing technology, and specifically to a UDS-based CAN bus security testing method and system, including establishing a communication connection between a test computer and a CAN bus interface of a vehicle to be tested through connecting hardware; the test computer sends a standard UDS diagnostic request, and identifies the ECU that supports the UDS communication protocol through the standard UDS diagnostic request; executes a UDS sub-service discovery request on each ECU, and identifies the sub-service list supported by each ECU; according to the UDS sub-services corresponding to each ECU, analyzes the functions and potential risks corresponding to each UDS sub-service, and identifies high-risk UDS sub-services; based on the high-risk UDS sub-services, the test computer automatically generates simulation request information, and sends the simulation request information to the ECU corresponding to the UDS sub-service, verifies whether the response of the corresponding ECU complies with the predefined security policy, and if not, determines that the UDS sub-service has potential security vulnerabilities.

[0005] Patent document CN202410121697.1 relates to a vehicle fault code analysis method and system based on CANoe, the method includes building a whole vehicle test environment, connecting the CANoe monitoring tool with the whole vehicle and the host computer; opening the CANoe project, selecting the tool to be executed, and running the CANoe project; after running, the user enters the name of the configuration file in the pop-up; the system automatically obtains all the information in the configuration file; runs the selected functions; after the operation, the system automatically saves all the bus data and generates a report. The analysis method and system of the present invention can read various vehicle information, clear fault codes, and analyze fault codes with one click, improve vehicle diagnosis efficiency and accuracy, and reduce vehicle development and maintenance costs; distinguish different models according to the configuration file, write the controllers contained in the vehicle and the fault codes supported by different controllers and other information into the configuration file, so that different models can share the source code, and ensure the reliability and stability of the system.

[0006] The above patent documents have low relevance to the present application. Summary of the invention

[0007] The technical problem to be solved by the present invention is to overcome the above-mentioned problems existing in the prior art and provide an automatic testing method and system for a UDS diagnostic service to read and write data through an identifier.

[0008] In order to solve the shortcomings of the traditional manual UDS diagnostic service test solution of reading and writing data through identifiers, the present invention proposes an automated method and system for testing UDS diagnostic services reading and writing data through identifiers. The method can automatically simulate the UDS diagnostic service diagnostic instrument to read the data recorded in the controller through the data identifier, and write the data record corresponding to the identifier into the controller through the data identifier to achieve rapid UDS diagnostic testing. It can meet the testing requirements for UDS diagnostic services during automobile development and manufacturing, and has the advantages of accuracy, reliability and repeatability.

[0009] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0010] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions:

[0011] An automated testing system for UDS diagnostic services, comprising:

[0012] Read data module through identifier: This module is connected to the controller through the CAN bus, and is mainly responsible for simulating the sending of read data operation messages through identifiers and recording the controller's reply message data;

[0013] Write data module through identifier: This module is connected to the controller through the CAN bus, and is mainly responsible for simulating the sending of write data operation messages through identifiers and recording the controller's reply message data;

[0014] Generate CAN message data module for UDS diagnostic read and write data service: Generate CAN message data for UDS diagnostic read and write data service according to UDS protocol and identifier list; each generated service request message contains only one data identifier.

[0015] Furthermore, when generating a CAN message for a write data service, the CAN message information includes writing vehicle information into the controller to be tested, clearing ROM, resetting the controller self-learning value, and setting the function option operation in the controller; the generated message includes a data record corresponding to the identifier, and when the controller to be tested receives the simulated send message, the data corresponding to the identifier is written into the position corresponding to the data identifier.

[0016] Furthermore, an automated testing system for UDS diagnostic services also includes a power control module: by controlling the programmable power supply, power-on and power-off operations on the controller are implemented to ensure the normal operation of the controller under test during the test process.

[0017] Furthermore, an automated testing system for UDS diagnostic services also includes a message parsing module: by parsing the controller reply message data, it is determined whether the controller's response is correct.

[0018] Furthermore, an automated testing system for UDS diagnostic services also includes an automated testing module: the automated testing module calls the above-mentioned related devices to implement automated testing execution, and based on the results of error detection and analysis, the module can generate a detailed test report.

[0019] Furthermore, the test report contains information about the discovery and location of the error, which helps the test engineer locate the fault and determine the error type.

[0020] An automated testing method for a UDS diagnostic service comprises the following steps:

[0021] Step 1. Determine the test requirements: clarify the test objectives and requirements, and determine the list of identifiers required by the UDS diagnostic service of the vehicle to be tested to read and write data through identifiers;

[0022] Step 2. Build the test environment: connect the host computer equipped with the test system, the CAN bus device and the controller under test at the physical layer;

[0023] Step 3. Test of reading data through identifier: the automated test module calls the module for reading data through identifier, and according to the UDS protocol and the identifier list, calls the module for generating CAN message data of UDS diagnostic read and write data service, and generates CAN message data of UDS diagnostic read data service; simulates sending the service message of reading data through identifier, and records the reply message data of the controller, and sends the message data to the message parsing module;

[0024] Step 4. Test of writing data through identifier: The automated test module calls the module that writes data through identifier, and according to the UDS protocol and the identifier list, calls the module that generates the CAN message data of the UDS diagnostic read and write data service, and generates the CAN message data of the UDS diagnostic write data service; simulates sending the service message of writing data through identifier, and records the reply message data of the controller, and sends the message data to the message parsing module.

[0025] Furthermore, an automated testing method for a UDS diagnostic service further includes:

[0026] Step 5. Data analysis: Call the message parsing module to parse the controller reply message data to determine whether the controller's response is correct, and feed the result back to the automated test module;

[0027] Step 6. Test report generation: The automated test module obtains the controller's response to the read and write data through the identifier fed back by the message parsing module, and generates a detailed test report; the report contains error discovery and location information.

[0028] An apparatus comprising one or more processors;

[0029] A memory for storing one or more programs;

[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0031] A computer-readable storage medium stores a computer program, which implements the method described above when executed by a processor.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] Compared with the traditional alternative solution, which is to manually simulate sending instructions and then analyze the results of the controller read and write operations, the solution of the present invention has the following advantages:

[0034] 1. Convenience: By automatically generating test reports, test engineers can quickly locate the location and time of error occurrence.

[0035] 2. High efficiency: Through the automated test module, the CAN message data module that generates the UDS diagnostic read and write data service, the data reading module through the identifier, and the data writing module through the identifier are called to realize automated test execution and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The present invention will be further described below in conjunction with the accompanying drawings:

[0037] Figure 1 A block diagram of the automated test system for the UDS diagnostic service described in the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical scheme and advantages of the implementation of the present invention clearer, the technical scheme in the embodiment of the present invention will be described in more detail below in conjunction with the drawings in the embodiment of the present invention. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present invention, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limitations on the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. The embodiments of the present invention are described in detail below in conjunction with the drawings.

[0039] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the scope of protection of the present invention.

[0040] The present invention is described in detail below in conjunction with the accompanying drawings:

[0041] See also Figure 1 The automated test system for the UDS diagnostic service of the present invention is composed of the following electrical components:

[0042] 1. Power control module: It controls the programmable power supply to realize the power-on and power-off operation of the controller to ensure the normal operation of the controller under test during the test process;

[0043] 2. Module for reading data through identifier: This module is connected to the controller through the CAN bus. It is mainly responsible for simulating the sending of operation messages for reading data through identifiers and recording the controller's reply message data.

[0044] 3. Module for writing data through identifier: This module is connected to the controller through the CAN bus. It is mainly responsible for simulating the sending of operation messages for writing data through identifiers and recording the controller's reply message data.

[0045] 4. Generate CAN message data module for UDS diagnostic read and write data service: Generate CAN message data for UDS diagnostic read and write data service according to UDS protocol and identifier list. Each service request message generated contains only one data identifier. When generating CAN message for write data service, it includes CAN message information for operations such as writing vehicle information to the controller under test, clearing ROM, resetting controller self-learning value, and setting function options in the controller. The generated message includes data records corresponding to the identifier. When the controller under test receives the simulated send message, it writes this data to the position corresponding to the data identifier.

[0046] 5. Message parsing module: parses the controller reply message data to determine whether the controller's response is correct

[0047] 6. Automated test module: The automated test module calls the above related equipment to implement automated test execution, and based on the results of error detection and analysis, the module can generate a detailed test report. The test report contains error discovery and location information, which is convenient for test engineers to locate faults and determine error types.

[0048] The specific embodiment of the automatic test method for reading and writing data through identifiers for UDS diagnostic services includes the following steps:

[0049] 1. Determine the test requirements: First, clarify the test objectives and requirements. Determine the list of identifiers required by the vehicle UDS diagnostic service to read and write data through identifiers.

[0050] 2. Build the test environment: connect the host computer equipped with the test system, the CAN bus device and the controller under test at the physical layer;

[0051] 3. Test of reading data by identifier: The automated test module calls the module for reading data by identifier, and according to the UDS protocol and the identifier list, calls the module for generating CAN message data for UDS diagnostic read and write data service, and generates CAN message data for UDS diagnostic read data service. Simulates sending service messages for reading data by identifier, records the controller reply message data, and sends the message data to the message parsing module.

[0052] 4. Test of writing data by identifier: The automated test module calls the module of writing data by identifier, and according to the UDS protocol and the identifier list, calls the module of generating CAN message data of UDS diagnostic read and write data service, and generates CAN message data of UDS diagnostic write data service. Simulate sending service message of writing data by identifier, record the reply message data of controller, and send the message data to the message parsing module.

[0053] 5. Data analysis: Call the message parsing module to parse the controller reply message data to determine whether the controller's response is correct, and feed the result back to the automated testing module.

[0054] 6. Test report generation: The automated test module obtains the controller's response to the read and write data through the identifier fed back by the message parsing module and generates a detailed test report. The report contains error discovery and location information.

[0055] The system of the present invention includes a module for reading data through an identifier, which is connected to a controller through a CAN bus and is mainly responsible for simulating the sending of a data reading operation message through an identifier and recording the controller reply message data; the present invention also includes a module for writing data through an identifier, which is connected to a controller through a CAN bus and is mainly responsible for simulating the sending of a data writing operation message through an identifier and recording the controller reply message data; the present invention also includes a CAN message data module for generating a UDS diagnostic read and write data service, which generates CAN message data of the UDS diagnostic read and write data service according to the UDS protocol and the identifier list. Each service request message generated contains only one data identifier. When generating a CAN message for a write data service, it includes CAN message information for operations such as writing vehicle information into the controller to be tested, clearing ROM, resetting the controller self-learning value, and setting the function options in the controller. The generated message includes a data record corresponding to the identifier, and when the controller to be tested receives the simulated sending message, the data is written into the position corresponding to the data identifier.

[0056] Based on the above automatic testing method of UDS diagnostic service, the present invention provides another device, which includes but is not limited to: one or more processors and memories.

[0057] The memory, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions corresponding to the automated testing method for the UDS diagnostic service in the embodiment of the present invention. The processor executes various functional applications and data processing of the vehicle by running the software programs, instructions and modules stored in the memory, that is, implementing the automated testing method for the UDS diagnostic service described above.

[0058] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0059] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, an automated testing method for a UDS diagnostic service is implemented. The automated testing method for the UDS diagnostic service comprises the following steps:

[0060] Step 1. Determine the test requirements: clarify the test objectives and requirements, and determine the list of identifiers required by the vehicle UDS diagnostic service to read and write data through identifiers;

[0061] Step 2. Build the test environment: connect the host computer equipped with the test system, the CAN bus device and the controller under test at the physical layer;

[0062] Step 3. Test of reading data through identifier: the automated test module calls the module for reading data through identifier, and according to the UDS protocol and the identifier list, calls the module for generating CAN message data of UDS diagnostic read and write data service, and generates CAN message data of UDS diagnostic read data service; simulates sending the service message of reading data through identifier, and records the reply message data of the controller, and sends the message data to the message parsing module;

[0063] Step 4. Test of writing data through identifiers: The automated test module calls the module for writing data through identifiers, and according to the UDS protocol and the identifier list, calls the module for generating CAN message data for UDS diagnostic read and write data services, and generates CAN message data for UDS diagnostic write data services; simulates sending service messages for writing data through identifiers, and records the controller reply message data, and sends the message data to the message parsing module;

[0064] Step 5. Data analysis: Call the message parsing module to parse the controller reply message data to determine whether the controller's response is correct, and feed the result back to the automated test module;

[0065] Step 6. Test report generation: The automated test module obtains the controller's response to the read and write data through the identifier fed back by the message parsing module, and generates a detailed test report; the report contains error discovery and location information.

[0066] The computer-readable storage medium provided by the present invention has computer-executable instructions that are not limited to the method operations described above, but can also execute related operations in the automated testing method for the UDS diagnostic service provided by any embodiment of the present invention.

[0067] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0068] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (for example, coaxial cable, optical fiber, digital subscriber line DSL) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk Solid State Disk, SSD), etc.

[0069] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention shall be covered within the protection scope of the present invention. At the same time, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims

1. An automated testing system for UDS diagnostic services, characterized in that: include: Read data module through identifier: This module is connected to the controller through the CAN bus, and is mainly responsible for simulating the sending of read data operation messages through identifiers and recording the controller's reply message data; Write data module through identifier: This module is connected to the controller through the CAN bus, and is mainly responsible for simulating the sending of write data operation messages through identifiers and recording the controller's reply message data; Generate CAN message data module for UDS diagnostic read and write data service: Generate CAN message data for UDS diagnostic read and write data service according to UDS protocol and identifier list; Each service request message generated contains only one data identifier.

2. The automated testing system for UDS diagnostic services according to claim 1, characterized in that: When generating the CAN message of the write data service, it includes the CAN message information of writing the vehicle information into the controller to be tested, clearing the ROM, resetting the controller self-learning value, and setting the function option operation in the controller; The generated message includes a data record corresponding to the identifier. When the controller to be tested receives the simulated sending message, the data corresponding to the identifier is written into the position corresponding to the data identifier.

3. The automated testing system for UDS diagnostic services according to claim 2, characterized in that: It also includes a power control module: by controlling the programmable power supply, the controller can be powered on and off to ensure the normal operation of the controller under test during the test.

4. The automated testing system for UDS diagnostic services according to claim 2, characterized in that: It also includes a message parsing module: by parsing the controller reply message data, it determines whether the controller's response is correct.

5. The automated testing system for UDS diagnostic services according to claim 2, characterized in that: It also includes an automated testing module: the automated testing module calls the above-mentioned related devices to implement automated testing execution, and based on the results of error detection and analysis, the module can generate a detailed test report.

6. The automated test system for UDS diagnostic services according to claim 5, characterized in that: The test report contains information about the discovery and location of errors, which helps test engineers locate faults and determine the error type.

7. An automated testing method for UDS diagnostic services, characterized in that: The following steps are involved: Step 1. Determine the test requirements: clarify the test objectives and requirements, and determine the list of identifiers required by the vehicle UDS diagnostic service to read and write data through identifiers; Step 2. Build the test environment: connect the host computer equipped with the test system, the CAN bus device and the controller under test at the physical layer; Step 3. Test of reading data through identifier: the automated test module calls the module of reading data through identifier, and calls the module of generating CAN message data of UDS diagnostic read and write data service according to UDS protocol and identifier list, and generates CAN message data of UDS diagnostic read data service; Simulate sending a service message for reading data through an identifier, record the controller's reply message data, and send the message data to the message parsing module; Step 4. Test of writing data through identifiers: the automated test module calls the module for writing data through identifiers, and according to the UDS protocol and the identifier list, calls the module for generating the CAN message data of the UDS diagnostic read and write data service, and generates the CAN message data of the UDS diagnostic write data service; Simulate sending a service message that writes data through an identifier, and record the controller's reply message data, and send the message data to the message parsing module.

8. The automated testing method for UDS diagnostic service according to claim 7, characterized in that: Also includes: Step 5. Data analysis: Call the message parsing module to parse the controller reply message data to determine whether the controller's response is correct, and feed the result back to the automated test module; Step 6. Test report generation: The automated test module obtains the controller's response to the read and write data through the identifier fed back by the message parsing module, and generates a detailed test report; the report contains error discovery and location information.

9. A device, characterized in that: comprising one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 7 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 7 to 8 is implemented.

Citation Information

Cited By

  • UDS protocol test method and system based on I2C bus

    CN120614284A