Vehicle-mounted part testing method, electronic equipment, storage medium and program product

By sending test message requests in different scenarios to vehicle parts and judging the execution results, the problem of low ECU testing efficiency in the existing technology is solved, and simultaneous testing of multiple vehicle parts in multiple scenarios is achieved, improving test efficiency and accuracy. sex.

CN118733438APending Publication Date: 2024-10-01BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410721487.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When testing multiple ECUs, the existing technology is inefficient and requires a lot of manpower and material resources, making it difficult to test multiple scenarios and multiple vehicle parts simultaneously.

Method used

By sending test message requests in different scenarios to vehicle-mounted parts, and judging the test results based on the received execution results and preset verification rules, simultaneous testing of multiple vehicle-mounted parts in multiple scenarios is achieved.

Benefits of technology

It improves testing efficiency, enables multi-scenario testing of multiple vehicle parts at the same time, reduces manpower and material consumption, and ensures testing accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733438A_ABST
    Figure CN118733438A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test method of a vehicle-mounted part, electronic equipment, a storage medium and a program product. The method comprises the following steps: sending a test message request to the vehicle-mounted part; wherein the test message request is generated in different scenes; an execution result returned by the vehicle-mounted part is received, and the execution result is obtained after the vehicle-mounted part executes the test message request; and determining a test result corresponding to the test message request according to the execution result and a preset verification rule, the test terminal is connected with the plurality of vehicle-mounted parts, the test messages in different scenes are sent to the plurality of vehicle-mounted parts, then the execution result returned by the vehicle-mounted parts is received, and the test result corresponding to the test message request is determined according to the execution result and the preset verification rule. And the execution result is judged according to the preset verification rule to obtain the test result, so that the vehicle-mounted part can be tested in multiple scenes, a plurality of vehicle-mounted parts can be tested at the same time, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a testing method for vehicle parts, electronic equipment, storage medium and program product. Background Art

[0002] With the development of automotive electronic technology, ECU (Electronic Control Unit) is an important core part of the car, and its safe operation is the guarantee of normal driving of the car. As the functional requirements of automotive software change and the functions become more and more, each ECU needs to be tested before it is put into use. The existing technology is to test each ECU separately. If there are many ECUs, it will consume more manpower and material resources, and the testing efficiency is low. Summary of the invention

[0003] Some embodiments of the present application aim to provide a method, electronic device, storage medium and program product for testing vehicle-mounted parts. Through the technical solutions of the embodiments of the present application, a test message request is sent to the vehicle-mounted parts; wherein the test message request is generated in different scenarios; the vehicle-mounted parts return an execution result, wherein the execution result is obtained after the vehicle-mounted parts execute the test message request; according to the execution result and a pre-set verification rule, a test result corresponding to the test message request is determined. In the embodiments of the present application, a test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to multiple vehicle-mounted parts, and then the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to the pre-set verification rules to obtain the test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested at the same time, thereby improving the test efficiency.

[0004] In a first aspect, some embodiments of the present application provide a method for testing vehicle parts, including:

[0005] Sending a test message request to an on-board component; wherein the test message request is generated in different scenarios;

[0006] Receiving an execution result returned by the vehicle-mounted component, wherein the execution result is obtained after the vehicle-mounted component executes the test message request;

[0007] According to the execution result and the preset verification rule, a test result corresponding to the test message request is determined.

[0008] Some embodiments of the present application connect the test terminal to multiple vehicle-mounted parts, send test messages in different scenarios to the multiple vehicle-mounted parts, then receive the execution results returned by the vehicle-mounted parts, and judge the execution results according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0009] Optionally, the test message request includes at least multiple of a test message request in a normal scenario, a test message request in an abnormal scenario, and a fault detection request.

[0010] Some embodiments of the present application provide test cases and scripts in different scenarios to verify the authentication and integrity protection functions of SecOC. These tests can simulate various attack scenarios to evaluate the anti-attack capability of SecOC.

[0011] Optionally, the pre-set verification rules include at least fault code verification rules.

[0012] Some embodiments of the present application set verification rules, which include fault code verification rules, by reading fault codes in the vehicle's electronic control unit. These fault codes provide information about possible problems in the vehicle system, helping diagnostic engineers determine what repairs or adjustments are needed.

[0013] Optionally, the determining, according to the execution result and a preset verification rule, a test result corresponding to the test message request includes:

[0014] Determining whether the execution result includes any fault code in the fault code verification rule;

[0015] In the case where the test message request is a test message request under a normal scenario and the execution result does not include any fault code, a first test result corresponding to the test message request is determined, where the first test result is a correct test result that does not generate a fault code according to the verification rule;

[0016] In the case where the test message request is a test message request under a normal scenario, and the execution result includes any fault code, a second test result corresponding to the test message request is determined, and the second test result is an error test result that does not generate a fault code according to the verification rule;

[0017] In the case where the test message request is a test message request under an abnormal scenario, and the execution result includes a fault code, a third test result corresponding to the test message request is determined, and the third test result is a correct test result that generates a fault code according to the verification rule;

[0018] In the case where the test message request is a test message request under an abnormal scenario and the execution result does not include a fault code, a fourth test result corresponding to the test message request is determined, and the fourth test result is an erroneous test result that generates a fault code according to the verification rule.

[0019] In some embodiments of the present application, a test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to the multiple vehicle-mounted parts. Then, the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0020] Optionally, the test terminal is connected to one or more non-directly connected vehicle-mounted parts respectively through directly connected vehicle-mounted parts, and the test terminal and the vehicle-mounted parts perform data communication through a secure vehicle-mounted communication protocol.

[0021] Optionally, before sending the test message request to the vehicle-mounted component, the method further includes:

[0022] Sending a first connection request to the directly connected vehicle-mounted component, wherein the first connection request at least includes a first address of the directly connected vehicle-mounted component;

[0023] A first connection response sent by the directly connected vehicle-mounted component is received, wherein the connection response at least includes a connection success or a connection failure.

[0024] Optionally, the method further comprises:

[0025] When the first connection response is successful, sending a second connection request to the indirect-connected vehicle-mounted component; wherein the second connection request at least includes a second address of the indirect-connected vehicle-mounted component;

[0026] A second connection response returned by the non-directly connected vehicle-mounted component is received, wherein the second connection response at least includes a connection success or a connection failure.

[0027] In some embodiments of the present application, the test terminal is connected to various vehicle-mounted parts before testing to ensure the accuracy of the test.

[0028] In a second aspect, some embodiments of the present application provide a testing device for vehicle parts, including:

[0029] A sending module, used to send a test message request to the vehicle-mounted parts; wherein the test message request is generated in different scenarios;

[0030] A receiving module, used for receiving an execution result returned by the vehicle-mounted component, wherein the execution result is obtained after the vehicle-mounted component executes the test message request;

[0031] The test module is used to determine the test result corresponding to the test message request according to the execution result and the preset verification rule.

[0032] Some embodiments of the present application connect the test terminal to multiple vehicle-mounted parts, send test messages in different scenarios to the multiple vehicle-mounted parts, then receive the execution results returned by the vehicle-mounted parts, and judge the execution results according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0033] Optionally, the test message request includes at least multiple of a test message request in a normal scenario, a test message request in an abnormal scenario, and a fault detection request.

[0034] Some embodiments of the present application provide test cases and scripts in different scenarios to verify the authentication and integrity protection functions of SecOC. These tests can simulate various attack scenarios to evaluate the anti-attack capability of SecOC.

[0035] Optionally, the pre-set verification rules include at least fault code verification rules.

[0036] Some embodiments of the present application set verification rules, which include fault code verification rules, by reading fault codes in the vehicle's electronic control unit. These fault codes provide information about possible problems in the vehicle system, helping diagnostic engineers determine what repairs or adjustments are needed.

[0037] Optionally, the test module is used to:

[0038] Determining whether the execution result includes any fault code in the fault code verification rule;

[0039] In the case where the test message request is a test message request under a normal scenario and the execution result does not include any fault code, a first test result corresponding to the test message request is determined, where the first test result is a correct test result that does not generate a fault code according to the verification rule;

[0040] In the case where the test message request is a test message request under a normal scenario, and the execution result includes any fault code, a second test result corresponding to the test message request is determined, and the second test result is an error test result that does not generate a fault code according to the verification rule;

[0041] In the case where the test message request is a test message request under an abnormal scenario, and the execution result includes a fault code, a third test result corresponding to the test message request is determined, and the third test result is a correct test result that generates a fault code according to the verification rule;

[0042] In the case where the test message request is a test message request under an abnormal scenario and the execution result does not include a fault code, a fourth test result corresponding to the test message request is determined, and the fourth test result is an erroneous test result that generates a fault code according to the verification rule.

[0043] In some embodiments of the present application, a test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to the multiple vehicle-mounted parts. Then, the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0044] Optionally, the test terminal is connected to one or more non-directly connected vehicle-mounted parts respectively through directly connected vehicle-mounted parts, and the test terminal and the vehicle-mounted parts perform data communication through a secure vehicle-mounted communication protocol.

[0045] Optionally, the device further comprises a connection module, wherein the connection module is used for:

[0046] Sending a first connection request to the directly connected vehicle-mounted component, wherein the first connection request at least includes a first address of the directly connected vehicle-mounted component;

[0047] A first connection response sent by the directly connected vehicle-mounted component is received, wherein the connection response at least includes a connection success or a connection failure.

[0048] Optionally, the connection module is used for:

[0049] When the first connection response is successful, sending a second connection request to the indirect-connected vehicle-mounted component; wherein the second connection request at least includes a second address of the indirect-connected vehicle-mounted component;

[0050] A second connection response returned by the non-directly connected vehicle-mounted component is received, wherein the second connection response at least includes a connection success or a connection failure.

[0051] In some embodiments of the present application, the test terminal is connected to various vehicle-mounted parts before testing to ensure the accuracy of the test.

[0052] In a third aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for testing vehicle parts as described in any embodiment of the first aspect can be implemented.

[0053] In a fourth aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the vehicle-mounted parts testing method as described in any embodiment of the first aspect.

[0054] In a fifth aspect, some embodiments of the present application provide a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, can implement the vehicle parts testing method as described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 A schematic diagram of a process flow of a vehicle-mounted parts testing method provided in an embodiment of the present application;

[0057] Figure 2 A schematic diagram of the structure of a test terminal provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of the structure of the test system provided in the embodiment of the present application;

[0059] Figure 4 A schematic diagram of the structure of another test system provided in an embodiment of the present application;

[0060] Figure 5 A schematic flow chart of another vehicle-mounted parts testing method provided in an embodiment of the present application;

[0061] Figure 6 A schematic diagram of a test case provided for an embodiment of the present application;

[0062] Figure 7 A schematic diagram of the structure of a vehicle-mounted parts testing device provided in an embodiment of the present application;

[0063] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.

[0065] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0066] With the development of automotive electronic technology, ECU (Electronic Control Unit) is an important core part of the car, and its safe operation is the guarantee of normal driving of the car. Due to the changes in automotive software functional requirements and the increasing number of functions, each ECU needs to be tested before it is put into use. The prior art is to test each ECU separately. If there are many ECUs, more manpower and material resources are needed, and the test efficiency is low. In view of this, some embodiments of the present application provide a method for testing vehicle-mounted parts, which includes sending a test message request to the vehicle-mounted parts; wherein the test message request is generated in different scenarios; receiving the execution result returned by the vehicle-mounted parts, wherein the execution result is obtained after the vehicle-mounted parts execute the test message request; determining the test result corresponding to the test message request according to the execution result and the pre-set verification rules. In the embodiment of the present application, the test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to multiple vehicle-mounted parts, and then the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to the pre-set verification rules to obtain the test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested at the same time, thereby improving the test efficiency.

[0067] like Figure 1 As shown, an embodiment of the present application provides a method for testing vehicle parts, the method comprising:

[0068] S101, sending a test message request to an on-vehicle component; wherein the test message request is generated in different scenarios;

[0069] Specifically, SecOC (Secure On-Board Communication) is a secure communication protocol used in the automotive field, designed to protect internal vehicle communications from unauthorized access and attacks. SecOC provides a range of security features, including authentication and integrity protection, to ensure that communications between electronic control units (ECUs) in the vehicle are secure and reliable.

[0070] On ECU devices with SecOC functions, whether the ECU supplier ensures the normal use of the SecOC function in accordance with the Autosar standard and the requirements of the car manufacturer, and ensures that the in-vehicle bus can resist various security functions, such as replay attacks, man-in-the-middle attacks and denial of service tools. In actual vehicle application scenarios, multiple ECUs interact at high speed, and it is necessary to test the scenarios in which the SecOC automated test system supports multiple ECUs. In this application, the test terminal establishes a network connection with the directly connected ECU, and then establishes a diagnostic connection through the directly connected ECU and the non-directly connected ECU. The test terminal and the non-directly connected ECU use SecOC for data transmission. The non-directly connected ECU is the vehicle-mounted part. The test terminal sends a test message request to the vehicle-mounted part to be tested; wherein the test message request is generated in different scenarios.

[0071] S102, receiving an execution result returned by the vehicle-mounted component, wherein the execution result is obtained after the vehicle-mounted component executes the test message request;

[0072] Specifically, after receiving the test message request, the on-board component executes the test message request, generates an execution result, and returns the execution result to the test terminal.

[0073] S103: Determine a test result corresponding to the test message request according to the execution result and a preset verification rule.

[0074] Specifically, verification rules are pre-set on the test terminal, and the execution result is judged according to the verification rules to obtain the test result, that is, the test result includes if the test message request sent is sent under a normal scenario, then the obtained test result does not include a fault code; if the test message request sent is sent under an abnormal scenario, then the obtained test result includes the corresponding fault code, in which case the test is successful.

[0075] In the embodiment of the present application, the SecOC automated testing method for the scenario of multiple ECUs being combined establishes a network connection with the directly connected ECU through the test terminal, and then respectively establishes a diagnostic connection with the directly connected ECU and the non-directly connected ECU. After the two-way connection is established, the test data is synchronized to each ECU to be tested, and the test result feedback is received and a test report is output. This is an automated testing method, which solves the problem that the test script cannot be sent synchronously and the test results cannot be fed back in parallel when the system under test is multiple ECUs, and increases and expands the actual application scenarios of the SecOC automated testing system.

[0076] Some embodiments of the present application connect the test terminal to multiple vehicle-mounted parts, send test messages in different scenarios to the multiple vehicle-mounted parts, then receive the execution results returned by the vehicle-mounted parts, and judge the execution results according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0077] Another embodiment of the present application further supplements the vehicle-mounted parts testing method provided in the above embodiment.

[0078] Optionally, the test message request includes at least multiple of a test message request in a normal scenario, a test message request in an abnormal scenario, and a fault detection request.

[0079] Some embodiments of the present application provide test cases and scripts in different scenarios to verify the authentication and integrity protection functions of SecOC. These tests can simulate various attack scenarios to evaluate the anti-attack capability of SecOC.

[0080] Optionally, the pre-set verification rules include at least fault code verification rules.

[0081] DOIP (Diagnostics Over Internet Protocol) is a communication protocol for remote vehicle diagnostics. It provides a range of functions to support diagnostic engineers in vehicle maintenance and troubleshooting. The following are the DOIP diagnostic functions used in this system:

[0082] Reading fault codes: The DOIP protocol allows diagnostic tools to read fault codes from the vehicle's electronic control unit (ECU). These fault codes provide information about possible problems in the vehicle's system, helping diagnostic engineers determine what repairs or adjustments are needed.

[0083] Clear fault codes: The diagnostic tool can use the DOIP protocol to clear the fault codes stored in the vehicle ECU. Once the problem is solved, clearing the fault codes can reset the vehicle system and confirm the effectiveness of the repair action.

[0084] Remote access: The DOIP protocol allows diagnostic engineers to remotely access and control the vehicle's ECU via the Internet or a dedicated network. This allows diagnostic engineers to perform diagnosis and maintenance in different geographical locations, improving efficiency and flexibility.

[0085] Some embodiments of the present application set verification rules, which include fault code verification rules, by reading fault codes in the vehicle's electronic control unit. These fault codes provide information about possible problems in the vehicle system, helping diagnostic engineers determine what repairs or adjustments are needed.

[0086] Optionally, determining a test result corresponding to the test message request according to the execution result and a preset verification rule includes:

[0087] Determine whether the execution result contains any fault code in the fault code verification rule;

[0088] In the case where the test message request is a test message request under a normal scenario and the execution result does not include any fault code, a first test result corresponding to the test message request is determined, where the first test result is a correct test result that does not generate a fault code according to the verification rule;

[0089] In the case where the test message request is a test message request under a normal scenario, if the execution result includes any fault code, a second test result corresponding to the test message request is determined, and the second test result is an error test result that does not generate a fault code according to the verification rule;

[0090] In the case where the test message request is a test message request under an abnormal scenario, and the execution result includes a fault code, a third test result corresponding to the test message request is determined, and the third test result is a correct test result that generates a fault code according to the verification rule;

[0091] When the test message request is a test message request under an abnormal scenario and the execution result does not include a fault code, a fourth test result corresponding to the test message request is determined, and the fourth test result is an erroneous test result that generates a fault code according to the verification rule.

[0092] In some embodiments of the present application, a test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to the multiple vehicle-mounted parts. Then, the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0093] Optionally, the test terminal is connected to one or more non-directly connected vehicle-mounted parts respectively through directly connected vehicle-mounted parts, and the test terminal and the vehicle-mounted parts perform data communication through a secure vehicle-mounted communication protocol.

[0094] Optionally, before sending the test message request to the vehicle-mounted component, the method further includes:

[0095] Sending a first connection request to the directly connected vehicle-mounted component, wherein the first connection request at least includes a first address of the directly connected vehicle-mounted component;

[0096] A first connection response sent by the directly connected vehicle-mounted component is received, wherein the connection response at least includes a connection success or a connection failure.

[0097] Optionally, the method further comprises:

[0098] When the first connection response is successful, sending a second connection request to the indirect-connected vehicle-mounted component; wherein the second connection request at least includes a second address of the indirect-connected vehicle-mounted component;

[0099] A second connection response returned by the non-directly connected vehicle-mounted component is received, wherein the second connection response at least includes a connection success or a connection failure.

[0100] like Figure 3 As shown, the process of establishing network connection and data channel between the SecOC test system and multiple ECUs in the system to be tested in the embodiment of the present application is described as follows:

[0101] 1. Connection establishment:

[0102] The test system (test terminal) initiates a connection request: The test system initiates a connection request to the DOIP gateway (directly connected to the ECU) in the vehicle network.

[0103] DOIP gateway response: After receiving the connection request, the DOIP gateway will respond and the connection will be established successfully.

[0104] 2. Direct route activation:

[0105] Routing activation request (once): The test system will send a routing activation request to the DOIP gateway, and the target ECU address is the DOIP gateway address in the system under test.

[0106] DOIP gateway processing: After receiving the routing activation request, the DOIP gateway first establishes the routing activation process with itself.

[0107] ECU response: The DOIP gateway sends a response to the test system, indicating that it is ready for the communication process.

[0108] 3. Indirect routing activation:

[0109] Routing activation request (secondary): The test system initiates a routing activation request to the DOIP gateway again. The target ECU address is the non-directly connected ECU address in the system under test. The activation request is forwarded from the directly connected ECU to the non-directly connected ECU.

[0110] ECU response: After receiving the routing activation request, the target ECU processes it and sends a response to the DOIP gateway, indicating that it is ready to communicate with the test system.

[0111] 4. Automated test communication:

[0112] Bidirectional communication: Once the routing is activated successfully, a bidirectional communication channel is established between the test terminal and the target ECU, allowing the transmission and exchange of test data.

[0113] In some embodiments of the present application, the test terminal is connected to various vehicle-mounted parts before testing to ensure the accuracy of the test.

[0114] In an embodiment of the present application, a SecOC automated testing method is provided that supports multiple ECU joint scenarios, uses the DoIP protocol to connect to the network and activate routes with directly connected ECUs, forwards through directly connected ECUs, and then performs secondary route activation with non-directly connected ECUs, ensuring that multiple ECUs remain connected to the test system.

[0115] After the network environment is connected, the test system extracts the address of the ECU to be tested and encapsulates the test data. It executes the test cases in sequence according to the test process and receives the test response. The ECU to be tested will generate or not generate the corresponding fault code. The test terminal uses the DoIP protocol to read its fault code and feed it back to the test terminal. The test terminal evaluates whether the test case is executed correctly based on the fault code and the corresponding preset strategy, and finally outputs the test report.

[0116] Figure 2 The test data encapsulation module in the SecOC test case is used to complete the message encapsulation and test process scripting work corresponding to the SecOC test case, and store the encapsulated test data in the test system for use in the test execution process. The main process is described as follows:

[0117] Construct the first test message: construct a SecOC security function message for a normal scenario, such as a bus message carrying the correct MAC and freshness value content.

[0118] Constructing a second test message: constructing a test message in which the SecOC is tampered with for an abnormal scenario, such as a bus message whose MAC value has been tampered with.

[0119] Construct the third test message: construct a diagnostic request message for clearing fault codes and requesting fault codes according to the diagnostic address of each ECU.

[0120] Construct test process scripts: According to the execution process of the test cases, the constructed test messages are scripted and stored in the test system.

[0121] Register the test response data processing function, which includes operations such as receiving response data from the system under test, parsing positive and negative diagnostic responses, and extracting fault codes.

[0122] Figure 2 The test execution module in is used to complete the concurrent execution of test cases and the real-time processing of test results. It compares the fault codes according to the preset strategy to determine whether the test cases are executed correctly. The main process is described as follows:

[0123] Execute the test process script in sequence, traverse the first test message and the third test message of each ECU to be tested and send them. If no fault code is generated according to the expected strategy, the use case is executed correctly, otherwise the use case execution fails.

[0124] Execute the test process script in sequence, traverse the second test message and the third test message of each ECU to be tested and send them. Generate the corresponding fault code according to the expected strategy if the use case is executed correctly, otherwise the use case execution fails.

[0125] Summarize the number of successes and failures of each test case and output the test results.

[0126] The SecOC automated test system is a test and evaluation system that automatically performs SecOC functions, and is designed to help the development team effectively test the security, reliability, and performance of SecOC implementations to ensure the security of vehicle internal communications. The embodiments of this application include the following functions and features:

[0127] Security function testing: Provides test cases and scripts to verify the authentication and integrity protection functions of SecOC. These tests can simulate various attack scenarios to evaluate SecOC's anti-attack capabilities.

[0128] Communication protocol test: Supports testing of the communication protocols used by SecOC (such as CAN\CANFD, etc.) to ensure that SecOC works normally in the CAN and CANFD communication environment and network topology.

[0129] Automated test execution: Provides automated test execution and result analysis functions, can execute test cases in batches, and generate detailed test reports and logs, which helps to quickly identify and resolve problems and defects in SecOC implementation.

[0130] The embodiment of the present application proposes a novel SecOC automated testing method, which can concurrently execute test cases and respond to test results in real time for multiple ECUs of the system to be tested, thereby improving the test efficiency and real-time processing of test results to a certain extent, and reducing manual intervention and testing time; the test system can be used for both a single ECU and a joint test environment composed of multiple ECUs, thereby increasing and expanding the coverage scenarios of the system to be tested to a certain extent to adapt to new test scenarios and requirements.

[0131] like Figure 4 As shown, the embodiment of the present application provides a joint test system composed of four ECUs as an example, the test terminal is connected to the four ECUs, and the configuration parameters of the test terminal and the terminal to be tested are as follows:

[0132]

[0133]

[0134] Body Domain Controller (BDCU): The Internet of Vehicles system consists of four parts: the host, car T-BOX9, mobile phone APP and background system. The host is mainly used for audio and video entertainment and vehicle information display; the car T-BOX is mainly used to communicate with the background system / mobile phone APP to realize the vehicle information display and control of the background system / mobile phone APP.

[0135] T-BOX is an important part of the Internet of Vehicles system. It is an intelligent terminal device that integrates vehicle body network and wireless communication functions. It connects the vehicle CAN bus and the external cloud platform to realize communication and data exchange between vehicles (V2V), vehicles and infrastructure (V21), and vehicles and the Internet (V2N). T-BOX usually consists of a processor, a GPS module, a wireless module (such as 3G, 4G, 5G, etc.), and supports multiple interfaces (such as CAN bus, USB, RS-232, Bluetooth, etc.).

[0136] In-Vehicle Infotainment (IVI) is an integrated in-vehicle information processing system that uses a dedicated in-vehicle central processor, based on the vehicle body bus system and Internet services. IVI can realize a series of applications including three-dimensional navigation, real-time traffic conditions, IPTV, assisted driving, fault detection, vehicle information, body control, mobile office, wireless communication, online entertainment functions and TSP services, which greatly improves the level of vehicle electrification, networking and intelligence.

[0137] like Figure 2 As shown, the test terminal provided in the embodiment of the present application includes a multi-ECU connectivity module, a test data encapsulation module, a test execution module and a test result handling module.

[0138] Phase 1: Multi-ECU Connectivity Module

[0139] The format of the encapsulated gateway routing activation request message is as follows:

[0140] {0x02,0xFD,0x00,0x05,0x00,0x00,0x00,0x0B,0x80,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

[0141] Description: The message format is 8-byte message header + payload data, where the 4th byte 0x05 indicates the message type, the 8th byte indicates the payload data length, the 9th and 10th bytes indicate the logical address of the target ECU, and the 11th byte indicates the routing activation request. If it is a TBOX or other ECU, just change the 9th and 10th bytes to the corresponding diagnostic address.

[0142] Phase 2: Test data encapsulation module

[0143] Construct the first test message:

[0144] {0x02,0x3b,0x11,0x22,0x33,0x44,0x55,0x66,0x03,0x4e};

[0145] Description: This message is a SecOC message with normal format and content. The first and second bytes represent the CANID message ID, the third to seventh bytes represent the data field content with a length of 6, and the eighth and ninth bytes are the truncated freshness value and MAC value.

[0146] Construct the second test message:

[0147] {0x12,0x3d,0x11,0x22,0x33,0x44,0x55,0x66,0x03,0xff};

[0148] Description: This message is a SecOC message with normal format and content. The first and second bytes represent the CANID, the third and seventh bytes represent the data field content with a length of 6, and the ninth byte represents the tampered MAC value. This message is used to test whether the system to be tested has anti-tampering security capabilities.

[0149] Construct the third test message:

[0150] Diagnostic request to clear fault codes:

[0151] {0x02,0xFD,0x80,0x01,0x00,0x00,0x00,0x08,0x06,0x01,0x08,0x01,0x14,0xFF,0xFF,0xFF}

[0152] Description: This message is a fault code clearing request. The 3rd and 4th bytes are the request type, the 9th and 10th bytes are the source diagnosis address, and the 11th and 12th bytes are the diagnosis purpose.

[0153] Diagnostic request to read fault codes:

[0154] {0x02,0xFD,0x80,0x01,0x00,0x00,0x00,0x0A,0x06,0x01,0x08,0x01,0x19,0x04,0xD0,0x40,0x00,0x01};

[0155] Description: This message is a fault code reading request. The other fields are the same as above. The 13th byte and subsequent bytes are the service ID and data content for reading the fault code.

[0156] Construct a test process script:

[0157] Encapsulate the messages to be sent at each stage into functions and write them into the test script:

[0158] sendFirstPkt(DstECUAddr)

[0159] sendSecondPkt(DstECUAddr)

[0160] sendThirdPkt(DstECUAddr)

[0161] Register the response function for clearing fault codes: recvResponseClearDTC(DstECUAddr)

[0162] Register the response function for requesting to read the fault code: recvResponseReqDTC(DstECUAddr)

[0163] Phase 3: Test execution phase

[0164] The test terminal uses CANOE software to write test cases and automated test scripts. After the above messages and scripts are constructed, the test cases listed below are executed in sequence according to the test process. The test system will select and send the first test message and the third test message of the normal scenario, the second test message and the third test message of the abnormal scenario in sequence according to the test script, and receive the test response data respectively and use the response processing function to extract the fault code, such as Figure 6 shown.

[0165] The fourth stage: test result disposal stage;

[0166] The test result handling phase completes the fault code analysis and comparison process of the test case. For example, the execution of the test case in the normal test scenario does not generate a fault code, while the abnormal test scenario needs to generate a specified fault code according to the preset strategy. The test case is evaluated based on the fault code matching strategy to see if it is executed correctly, and the test report is output.

[0167] like Figure 5 As shown, the test method of the vehicle-mounted parts includes:

[0168] Step 1: The test system (test terminal) initiates an Ethernet connection to the gateway;

[0169] Step 2: The test system initiates a routing activation request to the gateway;

[0170] Step 3: The test system receives a gateway routing activation response;

[0171] Step 4: The test system initiates a routing activation request to TBOX;

[0172] Step 5: The test system receives the TBOX routing activation response and activates the IVI / BDCU in turn;

[0173] Step 6: The network connection is established and the diagnostic channel is established.

[0174] The embodiment of the present application proposes a SecOC test scenario for multiple ECUs, which can be used for a single ECU or a joint test environment composed of multiple ECUs. To a certain extent, it increases and expands the coverage scenarios of the system to be tested. It uses the DoIP protocol to establish diagnostic connections with both directly connected ECUs and non-directly connected ECUs and reads fault code information as a method for evaluating the test results.

[0175] The present invention concurrently executes test cases and responds to test results in real time for multiple ECUs of the system to be tested, thereby improving test efficiency and real-time processing of test results to a certain extent, and reducing manual intervention and test time; by constructing correct test messages and abnormal test messages and scripting the test process, it supports concurrent execution of test cases for multiple ECUs and real-time processing of test response results.

[0176] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.

[0177] Another embodiment of the present application provides a vehicle-mounted component testing device for executing the vehicle-mounted component testing method provided in the above embodiment.

[0178] like Figure 7 , which is a schematic diagram of the structure of the vehicle-mounted parts testing device provided in an embodiment of the present application. The vehicle-mounted parts testing device includes a sending module 701, a receiving module 702 and a testing module 703, wherein:

[0179] The sending module 701 is used to send a test message request to the vehicle-mounted parts; wherein the test message request is generated in different scenarios;

[0180] The receiving module 702 is used to receive the execution result returned by the vehicle-mounted component, wherein the execution result is obtained after the vehicle-mounted component executes the test message request;

[0181] The testing module 703 is used to determine the test result corresponding to the test message request according to the execution result and the preset verification rule.

[0182] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0183] Some embodiments of the present application connect the test terminal to multiple vehicle-mounted parts, send test messages in different scenarios to the multiple vehicle-mounted parts, then receive the execution results returned by the vehicle-mounted parts, and judge the execution results according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0184] Another embodiment of the present application further supplements the vehicle-mounted parts testing device provided in the above embodiment.

[0185] Optionally, the test message request includes at least multiple of a test message request in a normal scenario, a test message request in an abnormal scenario, and a fault detection request.

[0186] Some embodiments of the present application provide test cases and scripts in different scenarios to verify the authentication and integrity protection functions of SecOC. These tests can simulate various attack scenarios to evaluate the anti-attack capability of SecOC.

[0187] Optionally, the pre-set verification rules include at least fault code verification rules.

[0188] Some embodiments of the present application set verification rules, which include fault code verification rules, by reading fault codes in the vehicle's electronic control unit. These fault codes provide information about possible problems in the vehicle system, helping diagnostic engineers determine what repairs or adjustments are needed.

[0189] Optionally, the test module is used to:

[0190] Determine whether the execution result contains any fault code in the fault code verification rule;

[0191] In the case where the test message request is a test message request under a normal scenario and the execution result does not include any fault code, a first test result corresponding to the test message request is determined, where the first test result is a correct test result that does not generate a fault code according to the verification rule;

[0192] In the case where the test message request is a test message request under a normal scenario, if the execution result includes any fault code, a second test result corresponding to the test message request is determined, and the second test result is an error test result that does not generate a fault code according to the verification rule;

[0193] In the case where the test message request is a test message request under an abnormal scenario, and the execution result includes a fault code, a third test result corresponding to the test message request is determined, and the third test result is a correct test result that generates a fault code according to the verification rule;

[0194] When the test message request is a test message request under an abnormal scenario and the execution result does not include a fault code, a fourth test result corresponding to the test message request is determined, and the fourth test result is an erroneous test result that generates a fault code according to the verification rule.

[0195] In some embodiments of the present application, a test terminal is connected to multiple vehicle-mounted parts, and test messages in different scenarios are sent to the multiple vehicle-mounted parts. Then, the execution results returned by the vehicle-mounted parts are received, and the execution results are judged according to pre-set verification rules to obtain test results. In this way, the vehicle-mounted parts can be tested in multiple scenarios, and multiple vehicle-mounted parts can also be tested simultaneously, thereby improving test efficiency.

[0196] Optionally, the test terminal is connected to one or more non-directly connected vehicle-mounted parts respectively through directly connected vehicle-mounted parts, and the test terminal and the vehicle-mounted parts perform data communication through a secure vehicle-mounted communication protocol.

[0197] Optionally, the device further comprises a connection module, and the connection module is used for:

[0198] Sending a first connection request to the directly connected vehicle-mounted component, wherein the first connection request at least includes a first address of the directly connected vehicle-mounted component;

[0199] A first connection response sent by the directly connected vehicle-mounted component is received, wherein the connection response at least includes a connection success or a connection failure.

[0200] Optionally, the connection module is used for:

[0201] When the first connection response is successful, sending a second connection request to the indirect-connected vehicle-mounted component; wherein the second connection request at least includes a second address of the indirect-connected vehicle-mounted component;

[0202] A second connection response returned by the non-directly connected vehicle-mounted component is received, wherein the second connection response at least includes a connection success or a connection failure.

[0203] In some embodiments of the present application, the test terminal is connected to various vehicle-mounted parts before testing to ensure the accuracy of the test.

[0204] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0205] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.

[0206] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the operation of the method corresponding to any embodiment of the vehicle parts testing method provided in the above embodiments can be implemented.

[0207] An embodiment of the present application also provides a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any embodiment of the vehicle parts testing method provided in the above embodiments.

[0208] like Figure 8 As shown, some embodiments of the present application provide an electronic device 800, which includes: a memory 810, a processor 820, and a computer program stored in the memory 810 and executable on the processor 820, wherein the processor 820 can implement any of the methods of the above-mentioned vehicle parts testing method when reading the program from the memory 810 through a bus 830 and executing the program.

[0209] Processor 820 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 820 can be a microprocessor.

[0210] The memory 810 may be used to store instructions executed by the processor 820 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 820 of the disclosed embodiment may be used to execute instructions in the memory 810 to implement the method shown above. The memory 810 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.

[0211] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0212] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0213] 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. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for testing vehicle parts, characterized in that: Applied to a test terminal, the method comprises: Sending a test message request to an on-board component; wherein the test message request is generated in different scenarios; Receiving an execution result returned by the vehicle-mounted component, wherein the execution result is obtained after the vehicle-mounted component executes the test message request; According to the execution result and the preset verification rule, a test result corresponding to the test message request is determined.

2. The vehicle-mounted parts testing method according to claim 1, characterized in that: The test message request includes at least multiple of a test message request in a normal scenario, a test message request in an abnormal scenario, and a fault detection request.

3. The vehicle-mounted parts testing method according to claim 1, characterized in that: The preset verification rules at least include fault code verification rules.

4. The vehicle-mounted parts testing method according to claim 3, characterized in that: The determining, according to the execution result and a preset verification rule, a test result corresponding to the test message request includes: Determining whether the execution result includes any fault code in the fault code verification rule; In the case where the test message request is a test message request under a normal scenario and the execution result does not include any fault code, a first test result corresponding to the test message request is determined, where the first test result is a correct test result that does not generate a fault code according to the verification rule; In the case where the test message request is a test message request under a normal scenario, and the execution result includes any fault code, a second test result corresponding to the test message request is determined, and the second test result is an error test result that does not generate a fault code according to the verification rule; In the case where the test message request is a test message request under an abnormal scenario, and the execution result includes a fault code, a third test result corresponding to the test message request is determined, and the third test result is a correct test result that generates a fault code according to the verification rule; In the case where the test message request is a test message request under an abnormal scenario and the execution result does not include a fault code, a fourth test result corresponding to the test message request is determined, and the fourth test result is an erroneous test result that generates a fault code according to the verification rule.

5. The vehicle-mounted parts testing method according to claim 1, characterized in that: The test terminal is connected to one or more non-directly connected vehicle-mounted parts respectively through directly connected vehicle-mounted parts, and the test terminal and the vehicle-mounted parts perform data communication through a secure vehicle-mounted communication protocol.

6. The vehicle-mounted parts testing method according to claim 5, characterized in that: Before sending the test message request to the vehicle-mounted parts, the method further includes: Sending a first connection request to the directly connected vehicle-mounted component, wherein the first connection request at least includes a first address of the directly connected vehicle-mounted component; A first connection response sent by the directly connected vehicle-mounted component is received, wherein the connection response at least includes a connection success or a connection failure.

7. The vehicle-mounted parts testing method according to claim 6, characterized in that: The method further comprises: When the first connection response is successful, sending a second connection request to the indirect-connected vehicle-mounted component; wherein the second connection request at least includes a second address of the indirect-connected vehicle-mounted component; A second connection response returned by the non-directly connected vehicle-mounted component is received, wherein the second connection response at least includes a connection success or a connection failure.

8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor can implement the vehicle-mounted parts testing method as claimed in any one of claims 1 to 7 when executing the program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the program, when executed by a processor, can implement the vehicle-mounted parts testing method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, wherein: When the computer program is executed by a processor, it can implement the vehicle-mounted parts testing method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Automatic vehicle testing method and device, electronic equipment and storage medium

    CN119270825A

  • Test method and device, vehicle and readable storage medium

    CN119781431A