Vehicle controller testing method, device, storage medium and equipment

By defining the identifier sample set and processing method structure, the test packets of the vehicle controller are processed according to the test requirements, the problem of low test coverage of the vehicle controller is solved and more comprehensive test coverage is achieved.

CN115599067BActive Publication Date: 2025-07-22DONGFENG LIUZHOU MOTOR
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211066943.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2025-07-22
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

In the prior art, the test coverage of the vehicle controller is low, the real working conditions are difficult to manufacture, and the simulation signals are easily disturbed, resulting in some test working conditions being unable to proceed.

Method used

Define the identifier sample set and processing method structure of the test message, assign identifier samples according to the test requirements, and after receiving the test message, determine the processing method to forward, modify or block, and then process the test message.

Benefits of technology

It improves the coverage of vehicle controller testing, ensures the integrity and accuracy of test conditions, and avoids insufficient testing caused by signal interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599067B_ABST
    Figure CN115599067B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle controller testing method, device, storage medium and equipment. The method defines an identifier sample set of test messages and a processing mode structure body according to the number of messages required for testing; assigns the processing mode characters in the processing mode structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set; when receiving a test message, obtains the identifier of the test message; determines the processing mode of the test message according to the identifier and the assignment set, and the processing mode includes forwarding, modifying and shielding; processes the test message according to the processing mode to test the vehicle controller. In the present invention, by defining an identifier sample set and a processing mode structure body according to the number of messages required for testing, and assigning the processing mode to the corresponding identifier sample, when receiving any test message, it is processed by using the processing mode corresponding to the test message, thereby improving the test coverage of the vehicle controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle testing, and particularly to a method, device, storage medium and equipment for testing a vehicle controller. Background Art

[0002] Before a vehicle leaves the factory, a large number of tests need to be carried out on the vehicle controller. To test the function implementation of the vehicle controller, it is necessary to create various real vehicle working conditions, such as high temperature of the battery pack, collision alarm, etc.

[0003] Currently, there are two relatively common methods: one is to create real test working conditions, but it is difficult or even impossible to create some working conditions, such as creating a battery pack temperature above 50°C at room temperature; the safety risk of operating high-voltage component connectors under high voltage is high; resulting in some test working conditions unable to be tested.

[0004] The second is to directly send simulation signals to the vehicle controller through the CAN bus. However, when sending simulation signals through the CAN bus, when the vehicle is in operation, the CAN bus will also output real vehicle signals to the vehicle controller at the same time, resulting in inaccurate signals received by the vehicle controller, and some test working conditions cannot be tested. Among them, the functions of the vehicle controller that can be tested by the two test methods are limited, and the test coverage is not high.

[0005] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of the present invention is to provide a method, device, storage medium and equipment for testing a vehicle controller, aiming to solve the technical problem of low test coverage of the vehicle controller in the prior art.

[0007] To achieve the above purpose, the present invention provides a method for testing a vehicle controller, and the method for testing the vehicle controller includes the following steps:

[0008] Define an identifier sample set and a processing method structure body of test messages according to the number of messages required for testing;

[0009] Assign the processing method characters in the processing method structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set;

[0010] When a test message is received, obtain the identifier of the test message;

[0011] Determine the processing method of the test message according to the identifier and the assignment set, and the processing method includes forwarding, modifying and shielding;

[0012] Process the test message according to the processing method, and test the vehicle controller.

[0013] Optionally, the step of determining the processing method of the test message according to the identifier and the assignment set includes:

[0014] Determine whether the identifier belongs to the set of masked message identifiers in the assignment set;

[0015] When the identifier belongs to the set of masked message identifiers, it is determined that the processing method is to mask the test message;

[0016] When the identifier does not belong to the set of masked message identifiers, determine whether the identifier belongs to the set of modified message identifiers in the assignment set;

[0017] When the identifier belongs to the set of modified message identifiers, it is determined that the processing method is to modify the test message, otherwise it is determined that the processing method is to forward the test message.

[0018] Optionally, the step of processing the test message according to the processing method and testing the vehicle controller includes:

[0019] When the processing method is to forward the test message, assign the test message to the first sending variable;

[0020] Use the output function to send the assigned first sending variable to the vehicle controller to test the vehicle controller.

[0021] Optionally, the step of processing the test message according to the processing method and testing the vehicle controller further includes:

[0022] When the processing method is to modify the test message, send the test message to the predefined modification variable;

[0023] Obtain the modified byte value of the test message;

[0024] Modify the test message according to the modified byte value using the predefined modification variable;

[0025] When the test message modification is completed, assign the modified test message to the second sending variable;

[0026] Use the output function to send the assigned second sending variable to the vehicle controller to test the vehicle controller.

[0027] Optionally, the step of defining the identifier sample set and the processing method structure of the test message according to the number of messages required for testing includes:

[0028] Define an identifier structure body, and define a set of identifier samples in the identifier structure body according to the number of messages required.

[0029] Define a processing method structure body, and the number of processing method characters in the processing method structure body is the same as the number of identifier samples in the identifier sample set.

[0030] Optionally, the step of assigning the processing method characters in the processing method structure body to the corresponding identifier samples in the identifier sample set to obtain an assignment set includes:

[0031] Create a variable of the identifier structure body, and use the variable of the identifier structure body to assign values to each identifier sample in the identifier sample set;

[0032] Create a variable of the processing method structure body, and use the variable of the processing method structure body to assign the processing method characters to the corresponding identifier samples in the identifier sample set.

[0033] Optionally, the step of obtaining the identifier of the test message when receiving the test message includes:

[0034] Obtain the test message between the vehicle controller and the bus;

[0035] Analyze the transmission method of the test message;

[0036] When the transmission method is a received message, obtain the identifier of the test message.

[0037] In addition, to achieve the above object, the present invention also proposes a vehicle controller test device, and the vehicle controller test device includes:

[0038] A definition module, configured to define a set of identifier samples of the test message and a processing method structure body according to the number of messages required for the test;

[0039] An assignment module, configured to assign the processing method characters in the processing method structure body to the corresponding identifier samples in the identifier sample set to obtain an assignment set;

[0040] An identifier acquisition module, configured to obtain the identifier of the test message when receiving the test message;

[0041] A processing method determination module, configured to determine the processing method of the test message according to the identifier and the assignment set, and the processing method includes forwarding, modifying, and shielding;

[0042] A test module, configured to process the test message according to the processing method to test the vehicle controller.

[0043] In addition, to achieve the above object, the present invention further provides a storage medium, on which a vehicle controller test program is stored. When the vehicle controller test program is executed by a processor, the steps of the vehicle controller test method described above are implemented.

[0044] In addition, to achieve the above object, the present invention further provides a vehicle controller test device, which includes a memory, a processor, and a vehicle controller test program stored on the memory and operable on the processor. The vehicle controller test program is configured to implement the steps of the vehicle controller test method described above.

[0045] The present invention provides a vehicle controller test method, device, storage medium, and device. The method defines an identifier sample set and a processing mode structure body of test messages according to the number of messages required for testing; assigns the processing mode characters in the processing mode structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set; when a test message is received, obtains the identifier of the test message; determines the processing mode of the test message according to the identifier and the assignment set, where the processing mode includes forwarding, modifying, and shielding; processes the test message according to the processing mode to test the vehicle controller. In the present invention, by defining an identifier sample set and a processing mode structure body according to the number of messages required for testing, and assigning the processing mode to the corresponding identifier sample, when any test message is received, it is processed using the processing mode corresponding to the test message, improving the test coverage of the vehicle controller. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a schematic structural diagram of a vehicle controller test device in the hardware operating environment related to the embodiment solution of the present invention;

[0047] Figure 2 is a schematic connection diagram of the vehicle controller test device related to the embodiment solution of the present invention;

[0048] Figure 3 is a schematic flowchart of the first embodiment of the vehicle controller test method of the present invention;

[0049] Figure 4 is a schematic flowchart of the first step of the second embodiment of the vehicle controller test method of the present invention;

[0050] Figure 5 is a schematic flowchart of the second step of the second embodiment of the vehicle controller test method of the present invention;

[0051] Figure 6 is a schematic flowchart of the third embodiment of the vehicle controller test method of the present invention;

[0052] Figure 7 This is the structural block diagram of the first embodiment of the vehicle controller test device of the present invention.

[0053] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments

[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0055] Refer to Figure 1 and Figure 2 , Figure 1 This is the schematic structural diagram of the vehicle controller test device for the hardware operating environment involved in the embodiment solution of the present invention.

[0056] As Figure 1 shown, the vehicle controller test device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), and optionally the user interface 1003 may further include a standard wired interface and a wireless interface. For the wired interface of the user interface 1003, it may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable memory (Non-volatile Memory, NVM), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0057] Those skilled in the art can understand that Figure 1 the structure shown in

[0058] does not constitute a limitation on the vehicle controller test device, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components. Figure 1 As

[0059] shown, the memory 1005 regarded as a computer storage medium may include an operating system, a network communication module, a user interface module, and a vehicle controller test program. Figure 1In the vehicle controller test equipment shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to user equipment; the vehicle controller test equipment calls the vehicle controller test program stored in the memory 1005 through the processor 1001 and executes the vehicle controller test method provided by the embodiments of the present invention.

[0060] Based on the above hardware structure, an embodiment of the vehicle controller test method of the present invention is proposed.

[0061] Refer to Figure 3 , Figure 3 is a schematic flowchart of the first embodiment of the vehicle controller test method of the present invention, and the first embodiment of the vehicle controller test method of the present invention is proposed.

[0062] In the first embodiment, the vehicle controller test method includes the following steps:

[0063] Step S10: Define an identifier sample set and a processing mode structure body of the test message according to the number of messages required by the test requirements.

[0064] It should be understood that the execution subject of this embodiment can be a signal processor arranged between the vehicle CAN bus and the vehicle controller, and the signal processor can include CANoe test software. The signal processor can be connected to the CAN bus and the vehicle controller through a DB9 connector.

[0065] It can be understood that during the vehicle controller test process, a large number of test conditions are required. For some test conditions, real test conditions cannot be made, and the test messages in the simulation test process are easily affected, resulting in the inability to test the vehicle controller for some test conditions. When testing the vehicle controller, it can include shielding the test signal to test the fault handling function of the vehicle controller when it cannot receive the test signal, and can also include forwarding the test signal to the vehicle controller to test the control function of the vehicle controller for other components.

[0066] It should be noted that the test requirements are the conditions for the functions that need to be tested for the vehicle controller. The test requirements include information such as specific test items, types of test messages, and numbers. The test message is a signal used to test the vehicle controller. The identifier sample set is the unique identifier set corresponding to the test messages required by the current test requirements. The identifier can be the ID value of the test message, etc. Each test message corresponds to an identifier.

[0067] The processing mode structure is a structure that includes the processing modes of test messages. The processing modes within the processing mode structure mainly include three types of processing mode characters: direct forwarding, modification, and masking. The total number of processing mode characters is the same as the number of test messages required for the test, that is, the total number of processing mode characters is the same as the number of identifiers in the identifier sample set. For example, to meet the current test requirements, thirty test messages are needed. Among them, ten test messages can be directly forwarded to the vehicle controller, ten test messages need to be modified and then the modified test messages are sent to the vehicle controller, while the remaining ten test messages are directly masked. At this time, the processing mode structure should include ten forwarding processing mode characters, ten modification processing mode characters, and ten masking processing mode characters. The processing mode character is an identifier used to represent the specific processing mode of a test message. For example, the forwarding processing mode character can be defined as 0, the masking processing mode character as 1, and the modification processing mode character as 2. The specific form of this character can be defined in CANoe, and the form of the character is not specifically limited here.

[0068] In specific implementation, the signal processor can determine the specific number of test messages required for the current test according to the test requirements, and then define an identifier sample with the same number as this number according to the number of test messages to form an identifier sample set. In addition, the signal processor can also define corresponding processing mode characters according to the number of test messages required for the test, so as to obtain the processing mode structure.

[0069] Step S20: Assign the processing mode characters in the processing mode structure to the corresponding identifier samples in the identifier sample set to obtain an assignment set.

[0070] It should be noted that the processing mode characters in the processing mode structure represent the processing modes corresponding to the identifiers. One identifier corresponds to one test message, and this test message corresponds to one processing mode. Therefore, the identifier and the processing mode character are in one-to-one correspondence. The assignment set is an identifier sample set including processing mode characters obtained after the processing mode identifier is assigned to the identifier sample.

[0071] In specific implementation, after defining the identifier sample set and the processing mode structure, the identifier sample corresponding to each test message can be determined first, and then each identifier sample in the identifier sample set and the processing mode characters in the processing mode structure are made to correspond one by one according to the test messages. Finally, the corresponding processing mode characters are assigned to the corresponding identifier samples to obtain the assignment set.

[0072] Step S30: When a test message is received, obtain the identifier of the test message.

[0073] It should be understood that during the testing process of the vehicle controller, the signal processor can receive the test messages output by the CAN bus, and then send the test messages to the vehicle controller or shield them. The signal processor needs to determine the specific processing method of the test message according to the identifier of the test message. Therefore, when the signal processor receives a test message, it needs to first parse the test message to extract the identifier corresponding to the test message.

[0074] Step S40: Determine the processing method of the test message according to the identifier and the assignment set.

[0075] It can be understood that the assignment set includes the identifier samples of all test messages required by the test requirements and the corresponding processing relationship characters. When the signal processor obtains the identifier, it can directly search for the processing method corresponding to the identifier in the assignment set, that is, the processing method of the test message.

[0076] Step S50: Process the test message according to the processing method to test the vehicle controller.

[0077] It should be noted that after determining the processing method corresponding to the test message, the signal processor can directly process the test message according to the processing method to test the vehicle controller.

[0078] Of course, the tests of the vehicle controller corresponding to different processing methods are different. For example, in the case of the shielding processing method, the signal processor directly shields the test signal, and then detects how the vehicle controller processes when it cannot receive the test signal normally. For the modification processing method, the signal processor needs to modify the test parameters in the test message according to the test requirements, and then send the modified test message to the vehicle controller to test the vehicle controller. For example, when it is necessary to test the control function of the vehicle controller on the battery at an ambient temperature of 50 degrees Celsius, the temperature parameter corresponding to the test message transmitted by the CAN bus collected by the temperature sensor to the signal processor is the currently collected ambient temperature. At this time, the signal processor needs to adjust the temperature parameter in the test message to 50 degrees Celsius, and then send the test message to the vehicle controller.

[0079] In the first embodiment, a method for testing a vehicle controller is provided. This method defines an identifier sample set and a processing method structure body for test messages according to the number of messages required for testing; assigns the processing method characters in the processing method structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set; when a test message is received, obtains the identifier of the test message; determines the processing method of the test message according to the identifier and the assignment set, where the processing methods include forwarding, modifying, and shielding; processes the test message according to the processing method to test the vehicle controller. In this embodiment, by defining an identifier sample set and a processing method structure body for the number of messages required for testing, and assigning the processing method to the corresponding identifier sample, when any test message is received, it is processed using the processing method corresponding to the test message, improving the test coverage of the vehicle controller.

[0080] Referring to Figure 4 , Figure 4 FIG. is the first flow schematic diagram of the second embodiment of the vehicle controller test method of the present invention. Based on the above Figure 3 shown first embodiment, a second embodiment of the vehicle controller test method of the present invention is proposed.

[0081] In the second embodiment, the step S40 includes:

[0082] Step S401: Determine whether the identifier belongs to the set of shielded message identifiers in the assignment set.

[0083] Step S402: When the identifier belongs to the set of shielded message identifiers, determine that the processing method is to shield the test message.

[0084] It should be understood that after obtaining the identifier corresponding to the test message, it is necessary to confirm the processing method corresponding to the identifier. Among them, there are three processing methods in the processing method structure body. Each processing method corresponds to multiple identifier samples. Among them, the set of shielded message identifiers refers to the set of identifiers corresponding to test messages that need to be processed by shielding.

[0085] Usually, the proportion of test messages that need to be shielded and modified during the test is relatively small, and the number of identifiers in the corresponding set of shielded message identifiers and the set of modified message identifiers is relatively small. During the process of determining the processing method, it is possible to first determine whether the identifier belongs to the set of message identifiers with fewer identifiers, thereby reducing the workload during the process of determining the processing method.

[0086] In a specific implementation, the signal processor can first determine whether the identifier corresponding to the current test message belongs to the identifiers in the set of masked message identifiers. When the identifier belongs to the set of masked message identifiers, it can be determined at this time that the current test message is a message for masking test of the vehicle controller, so as to determine that the processing method of the test message is to mask the test message and prevent the test message from being input to the vehicle controller.

[0087] Step S403: When the identifier does not belong to the set of masked message identifiers, determine whether the identifier belongs to the set of modified message identifiers within the assignment set.

[0088] It should be understood that when confirming the set of masked message identifiers of the test message to be tested currently, it can be confirmed that the test message needs to be sent to the vehicle controller. Of course, the test messages sent to the vehicle controller can also be divided into messages that need to be modified and messages that do not need to be modified. Therefore, it is also necessary to determine whether the identifier belongs to the set of modified message identifiers to prevent the test messages that need to be modified from being directly sent to the vehicle controller, resulting in some working conditions not being able to be tested. The set of modified message identifiers refers to the set of identifiers corresponding to the test messages that need to be processed by the modified sending method.

[0089] During the judgment process, the identifier can be compared with the identifier samples in the set of modified message identifiers to determine that the identifier of the test message belongs to the set of modified message identifiers.

[0090] Step S404: When the identifier belongs to the set of modified message identifiers, determine that the processing method is to modify the test message, otherwise determine that the processing method is to forward the test message.

[0091] When the identifier belongs to the set of modified message identifiers, it can be determined at this time that the test message needs to be modified. The signal controller executes the relevant steps for message modification and then sends the modified test message to the vehicle controller.

[0092] When the identifier does not belong to the set of modified message identifiers, it can be determined that the test message can be directly sent to the vehicle controller for testing. It should be noted here that during the test, other messages may also be transmitted to the vehicle controller. If the message does not affect the test, the message can be directly sent to the vehicle controller. Of course, the message can be sent at different times or in different ways from the test message.

[0093] In this embodiment, the step S50 includes:

[0094] Step S501': When the processing method is to forward the test message, assign the test message to the first sending variable.

[0095] It should be understood that the shielding processing method does not need to send the test message to the vehicle controller. The test message can be directly shielded and then the vehicle controller can be detected, which will not be elaborated here. For the processing methods of forwarding the test message and modifying the test message, the test message needs to be sent to the vehicle controller.

[0096] It should be noted that the first sending variable is a carrier variable used to send the test message that needs to be directly forwarded. During the signal transmission process, it usually includes a signal fundamental wave and a carrier wave. In this embodiment, the first sending variable can be understood as the carrier wave of the test message that needs to be directly forwarded.

[0097] Step S502': Use the output function to send the assigned first sending variable to the vehicle controller to test the vehicle controller.

[0098] Among them, the output function is a function used to output the sending variable to the vehicle controller. This output function meets the communication protocol corresponding to the DB9 interface, and the sending variable can be sent to the vehicle controller through the DB9.

[0099] In a specific implementation, when it is confirmed that the processing method is to directly forward the test message, the test message can be assigned to the first sending variable, and then the output function is used to send the first sending variable to the vehicle controller. When the vehicle controller receives the first sending variable, it can parse the first sending variable to obtain the test message and execute the test.

[0100] In addition, referring to Figure 5 , in this embodiment, step S50 also includes:

[0101] Step S501: When the processing method is to modify the test message, send the test message to a predefined modification variable.

[0102] It should be understood that when the processing method is to modify the test message, the test parameters in the test message need to be modified. Therefore, the signal controller can pre-define a modification variable as a predefined modification variable, and this predefined modification variable can modify the test parameters in the test message according to the current test requirements.

[0103] Step S502: Obtain the modified byte value of the test message.

[0104] It should be noted that the byte value is modified to the target value of the test parameter. For example, when it is required to test the function of the vehicle controller at 50 degrees Celsius of the battery, the modified byte value is 50 degrees Celsius at this time. The modified byte value can be determined according to the specific test conditions and then obtained by input. Of course, it is also possible to directly analyze the test conditions to obtain the modified byte value.

[0105] Step S503: Modify the test message according to the modified byte value by using the predefined modification variable.

[0106] It should be understood that after determining the modified byte value and the predefined modification variable, the test parameter in the test message can be directly modified to the corresponding modified byte value by using the predefined modification variable to obtain the modified test message.

[0107] Step S504: When the modification of the test message is completed, assign the modified test message to the second sending variable.

[0108] Step S505: Use the output function to send the assigned second sending variable to the vehicle controller to test the vehicle controller.

[0109] It should be noted that the second sending variable is a carrier variable for sending the modified test message.

[0110] In a specific implementation, when the modification of the test message is completed, the modified test message can be assigned to the second sending variable, and then the output function is used to send the second sending variable to the vehicle controller. When the vehicle controller receives the second sending variable, it can analyze the second sending variable to obtain the test message and execute the test.

[0111] In the second embodiment, by judging the processing method of the test message, each test message is processed according to the corresponding processing method, so as to avoid improper processing of the test message corresponding to some test conditions, resulting in some conditions not being testable and reducing the test coverage of the vehicle controller.

[0112] Refer to Figure 6 , Figure 6 which is the flowchart of the third embodiment of the vehicle controller test method of the present invention. Based on the first embodiment shown above Figure 3 the third embodiment of the vehicle controller test method of the present invention is proposed.

[0113] In the third embodiment, the step S10 includes:

[0114] Step S101: Define an identifier structure, and define an identifier sample set in the identifier structure according to the required number of messages.

[0115] It should be understood that a structure is a structured data composed of a batch of data; each data that composes the structured data is called an "attribute" or "member" of the structured data, and these members can be variables, arrays, strings, and structures, etc. The identifier structure includes data used to define identifiers. The identifier structure includes the same number of identifiers as the number of test messages.

[0116] In a specific implementation, the signal processor can preferably define an identifier structure first, and then define identifier samples with the same number as the number of messages required in the identifier structure to obtain an identifier sample set.

[0117] Step S102: Define a processing method structure, and the number of processing method characters in the processing method structure is the same as the number of identifier samples in the identifier sample set.

[0118] It can be understood that the processing method structure is a data structure including data for defining processing methods. The processing method character structure includes the same number of processing methods as the number of test messages, and each processing method belongs to a shielding processing method, a forwarding processing method, or a modification processing method.

[0119] In a specific implementation, the signal processor can preferably define an initial processing method structure that does not include processing methods first, and then define the same number of processing methods as the number of messages required in the processing method structure to obtain the processing method structure.

[0120] The step S20 includes:

[0121] Step S201: Create an identifier structure variable, and use the identifier structure variable to assign values to each identifier sample in the identifier sample set.

[0122] It should be understood that one identifier corresponds to one test message. When determining the test messages for test requirements, all identifier samples in the identifier sample can be assigned values. The identifier structure variable is a variable used to assign values to identifiers according to test messages.

[0123] Step S202: Create a processing method structure variable, and use the processing method structure variable to assign the processing method characters to the identifier samples corresponding to the identifier sample set respectively.

[0124] It should be understood that the processing mode structure variable is a variable used to assign processing mode characters to identifiers. When determining the identifiers and processing modes corresponding to each test message, the processing mode can be assigned to the corresponding identifier to obtain an assignment set. Thus, when a test message is received, the processing mode corresponding to the message can be directly determined based on the test message and the assignment set.

[0125] The step S30 includes:

[0126] Step S301: Obtain the test message between the vehicle controller and the bus.

[0127] It can be understood that when data is transmitted between the vehicle controller and the bus, the signal processor is between the vehicle controller and the bus, and the message data needs to be transmitted through the signal processor. During the test, the signal processor can receive messages and also send messages. When a message is received, the received message can be used as the test message, and the identifier of the test message can be obtained; while the message output by the signal processor does not need to be further processed by the signal processor, and at this time, the identifier of the message does not need to be obtained.

[0128] It should be noted that the messages between the vehicle controller and the bus not only include the test messages input to the vehicle controller, but also include the messages output by the vehicle controller to control the vehicle operation. The signal processor can forward the message to the bus.

[0129] Step S302: Analyze the transmission mode of the test message.

[0130] It should be understood that the transmission modes of the test message with the signal receiver as the execution entity include two transmission modes: output message and received message. The specific structures of the test messages received and sent by the signal processor are not the same. For example, the test messages output by the signal receiver are all output through the sending variable as the carrier. Therefore, when determining whether the test message is a message output or received by the signal processor, the test message can be directly analyzed. When the parsed test message uses the sending variable as the carrier, it can be determined that the test message is an output message, otherwise it is determined that the test message is a received message.

[0131] Step S303: When the transmission mode is a received message, obtain the identifier of the test message.

[0132] It should be noted that when it is determined that the transmission mode of the test message is a received message, the signal processor needs to collect the identifier of the test message to determine the processing mode of the test message.

[0133] In the third embodiment, by defining an identifier sample set and a processing mode structure body, and then assigning the identifier samples and the corresponding processing mode characters, it is ensured that all test messages in the test requirements can be processed by the signal processor according to the predetermined processing mode, avoiding the situation where some test conditions cannot be tested.

[0134] In addition, an embodiment of the present invention further provides a storage medium, on which a vehicle controller test program is stored. When the vehicle controller test program is executed by a processor, the steps of the vehicle controller test method described above are implemented.

[0135] In addition, referring to Figure 7 , an embodiment of the present invention further provides a vehicle controller test device, which includes:

[0136] A definition module 10, configured to define an identifier sample set of test messages and a processing mode structure body according to the number of messages in the test requirements;

[0137] An assignment module 20, configured to assign the processing mode characters in the processing mode structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set;

[0138] An identifier acquisition module 30, configured to acquire the identifier of the test message when receiving the test message;

[0139] A processing mode determination module 40, configured to determine the processing mode of the test message according to the identifier and the assignment set, where the processing mode includes forwarding, modification, and shielding;

[0140] A test module 50, configured to process the test message according to the processing mode to test the vehicle controller.

[0141] In this embodiment, a vehicle controller test device is provided. The definition module 10 of the device defines an identifier sample set of test messages and a processing mode structure according to the number of messages required for testing; the assignment module 20 assigns the processing mode characters in the processing mode structure to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set; when the identifier acquisition module 30 receives a test message, it acquires the identifier of the test message; the processing mode determination module 40 determines the processing mode of the test message according to the identifier and the assignment set, and the processing modes include forwarding, modification, and shielding; the test module 50 processes the test message according to the processing mode to test the vehicle controller. In this embodiment, by defining an identifier sample set and a processing mode structure according to the number of messages required for testing, and assigning the processing mode to the corresponding identifier sample, when any test message is received, it is processed using the processing mode corresponding to the test message, improving the test coverage of the vehicle controller.

[0142] In one embodiment, the processing mode determination module 40 is further configured to determine whether the identifier belongs to the shielding message identifier set in the assignment set; when the identifier belongs to the shielding message identifier set, it is determined that the processing mode is to shield the test message; when the identifier does not belong to the shielding message identifier set, it is determined whether the identifier belongs to the modification message identifier set in the assignment set; when the identifier belongs to the modification message identifier set, it is determined that the processing mode is to modify the test message, otherwise it is determined that the processing mode is to forward the test message.

[0143] In one embodiment, the test module 50 is further configured to, when the processing mode is to forward the test message, assign the test message to a first sending variable; use an output function to send the assigned first sending variable to the vehicle controller to test the vehicle controller.

[0144] In one embodiment, the test module 50 is further configured to, when the processing mode is to modify the test message, send the test message to a predefined modification variable; obtain the modification byte value of the test message; modify the test message using the predefined modification variable according to the modification byte value; when the test message modification is completed, assign the modified test message to a second sending variable; use an output function to send the assigned second sending variable to the vehicle controller to test the vehicle controller.

[0145] In one embodiment, the definition module 10 is further configured to define an identifier structure body, and define an identifier sample set in the identifier structure body according to the required number of messages; define a processing mode structure body, where the number of processing mode characters in the processing mode structure body is the same as the number of identifier samples in the identifier sample set.

[0146] In one embodiment, the assignment module 20 is further configured to create a variable of the identifier structure body, and use the variable of the identifier structure body to assign values to each identifier sample in the identifier sample set; create a variable of the processing mode structure body, and use the variable of the processing mode structure body to assign the processing mode characters to the identifier samples corresponding to the identifier sample set respectively.

[0147] In one embodiment, the identifier acquisition module 30 is further configured to acquire a test message between the vehicle controller and the bus; analyze the transmission mode of the test message; when the transmission mode is a received message, acquire the identifier of the test message.

[0148] For other embodiments or specific implementation manners of the vehicle controller test device of the present invention, reference may be made to the above method embodiments, which will not be elaborated here.

[0149] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including the element.

[0150] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. Among the several apparatus unit claims listing several apparatuses, several of these apparatuses may be embodied by the same hardware item. The use of the words "first", "second", and "third", etc. does not indicate any order, and these words may be interpreted as names.

[0151] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a Read Only Memory image (ROM) / Random Access Memory (RAM), magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0152] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall equally be included in the patent protection scope of the present invention.

Claims

1. A method for testing a vehicle controller, characterized in that, The vehicle controller test method includes: Defining an identifier sample set of test messages and a processing method structure according to the number of messages required for testing; Assigning the processing method characters in the processing method structure to their corresponding identifier samples in the identifier sample set to obtain an assignment set; When receiving a test message, obtaining the identifier of the test message; Determining the processing method of the test message according to the identifier and the assignment set, where the processing methods include forwarding, modifying, and shielding; Processing the test message according to the processing method to test the vehicle controller.

2. The vehicle controller testing method according to claim 1, wherein The step of determining the processing method of the test message according to the identifier and the assignment set includes: Judging whether the identifier belongs to the shielding message identifier set in the assignment set; When the identifier belongs to the shielding message identifier set, determining that the processing method is to shield the test message; When the identifier does not belong to the shielding message identifier set, judging whether the identifier belongs to the modified message identifier set in the assignment set; When the identifier belongs to the modified message identifier set, determining that the processing method is to modify the test message; otherwise, determining that the processing method is to forward the test message.

3. The vehicle controller testing method according to claim 2, wherein The step of processing the test message according to the processing method to test the vehicle controller includes: When the processing method is to forward the test message, assigning the test message to a first sending variable; Using an output function to send the assigned first sending variable to the vehicle controller to test the vehicle controller.

4. The vehicle controller testing method according to claim 3, wherein The step of processing the test message according to the processing method to test the vehicle controller further includes: When the processing method is to modify the test message, sending the test message to a predefined modification variable; Obtaining the modification byte value of the test message; Modifying the test message according to the modification byte value using the predefined modification variable; When the test message modification is completed, assigning the modified test message to a second sending variable; Using an output function to send the assigned second sending variable to the vehicle controller to test the vehicle controller.

5. The vehicle controller test method according to claim 1, characterized in that The step of defining an identifier sample set of test messages and a processing method structure according to the number of messages required for testing includes: Defining an identifier structure and defining an identifier sample set in the identifier structure according to the number of messages required; Defining a processing method structure, where the number of processing method characters in the processing method structure is the same as the number of identifier samples in the identifier sample set.

6. The vehicle controller testing method according to claim 5, characterized in that The step of assigning the processing method characters in the processing method structure to their corresponding identifier samples in the identifier sample set to obtain an assignment set includes: Creating a new identifier structure variable and using the identifier structure variable to assign values to each identifier sample in the identifier sample set; Creating a new processing method structure variable and using the processing method structure variable to assign the processing method characters to their corresponding identifier samples in the identifier sample set.

7. The vehicle controller testing method according to claim 1, wherein, The step of obtaining the identifier of the test message when receiving the test message includes: Obtaining a test message between the vehicle control unit and the bus; Analyzing the transmission mode of the test message; When the transmission mode is a received message, obtaining the identifier of the test message.

8. A vehicle controller test device, characterized in that, The vehicle control unit test device includes: A definition module, configured to define an identifier sample set of the test message and a processing method structure body according to the number of messages required for the test; An assignment module, configured to assign the processing method characters in the processing method structure body to the respective corresponding identifier samples in the identifier sample set to obtain an assignment set; An identifier obtaining module, configured to obtain the identifier of the test message when receiving the test message; A processing method determination module, configured to determine the processing method of the test message according to the identifier and the assignment set, where the processing method includes forwarding, modification, and shielding; A test module, configured to process the test message according to the processing method to test the vehicle control unit.

9. A storage medium, characterized in that, A vehicle control unit test program is stored on the storage medium, and when the vehicle control unit test program is executed by a processor, the steps of the vehicle control unit test method according to any one of claims 1 to 7 are implemented.

10. A vehicle controller test device, characterized in that, The vehicle control unit test device includes: a memory, a processor, and a vehicle control unit test program stored on the memory and executable on the processor, and when the vehicle control unit test program is executed by the processor, the steps of the vehicle control unit test method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Message processing method and device

    CN104144156A

  • Method of testing electric control unit in vehicle and device

    CN104865945A

  • Automatic test method and device for transmitting and receiving messages of vehicle controller

    CN114866447A