Automobile motor controller message test method and device

Through automated automotive motor controller message testing methods and devices, the problem of low test efficiency and artificial operation errors of smart vehicle terminal controller has been solved, and efficient and reliable test results have been achieved.

CN119383102AInactive Publication Date: 2025-01-28CHINA FAW CO LTD

Patent Information

Application Number
CN202411438027.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the test efficiency of the intelligent vehicle terminal controller is low and relies on manual operation, which is prone to operational errors, affecting the reliability of the test results.

Method used

Provide a car motor controller message test method and device, which can automatically test the correctness test of communication messages. Through automatic modification of the signal value of the message and sending a message, and read the MCU software variable value for comparison, generate the test report Essence

Benefits of technology

Implement automated testing, improve test efficiency, reduce the risk of errors caused by manual operations, and ensure the reliability of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383102A_ABST
    Figure CN119383102A_ABST
Patent Text Reader

Abstract

The invention provides an automobile motor controller message test method and device. The method comprises the following steps: acquiring a test demand of automobile motor controller message test and a preset signal modification value set corresponding to the test demand; determining that the test requirement is that the test MCU receives the message signal or the test MCU sends the message signal, and obtaining a to-be-sent message based on the test requirement; performing preset value modification on the to-be-sent message to obtain a to-be-detected message; sending a to-be-detected message, and obtaining a corresponding receiving message after a preset time period; judging whether the received message is consistent with the to-be-detected message or not; if yes, generating a corresponding test report; and when the test of the message signals received by the MCU is completed, all the test reports are summarized to obtain a signal test summarizing report, and the signal test summarizing report is output. According to the method and the device, the correctness of the communication message can be automatically tested, and manual participation is avoided, so that the problems of low test efficiency and high manual error risk are solved.
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 method and device for testing messages of an automobile motor controller. Background Art

[0002] At present, intelligent vehicles play an important role in the growing intelligent transportation system, and the intelligent vehicle terminal controller, as its core component, is responsible for the information exchange between the vehicle and the outside world and the control of the internal system. In practical applications, the intelligent vehicle terminal controller may experience system abnormalities due to signal interruption or instability, affecting the safety and performance of the vehicle. Therefore, before the intelligent vehicle is officially put into operation, it is crucial to conduct a comprehensive and effective test on the reliability of the intelligent vehicle terminal controller. Traditional testing methods are usually performed manually by testers. This method is not only inefficient, but also highly dependent on manual operation, prone to operational errors, and reduces testing efficiency. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method and device for testing automobile motor controller messages, which can automatically test the correctness of communication messages without human intervention, solve the problems of low testing efficiency and high risk of errors caused by manual operation, and improve testing efficiency.

[0004] The first aspect of the present application provides a method for testing a message of an automobile motor controller, comprising:

[0005] Obtaining a test requirement for a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement;

[0006] When the test requirement is to test the MCU receiving message signal, obtain a first sending message to be sent;

[0007] Modify the first sent message according to the preset signal modification value set to obtain a modified second sent message;

[0008] Sending the second sending message according to a preset message period;

[0009] After a first preset time period, reading a message to be tested corresponding to the second sent message in the program;

[0010] Compare the message to be tested and the second sent message to obtain a first test result;

[0011] Generate a test report according to the first test result, the message to be tested and the second sent message;

[0012] When the test of the MCU receiving message signal is completed, all the test reports are summarized to obtain a signal test summary report, and the signal test summary report is output.

[0013] Further, the modifying the first sent message according to the preset signal modification value set to obtain a modified second sent message includes:

[0014] Determining the current target signal value to be modified according to the preset signal modification value set; wherein the preset signal modification value set includes at least a preset maximum value, a preset minimum value and at least one preset intermediate value;

[0015] The signal value of the first sending message is modified to the target signal value to obtain a modified second sending message.

[0016] Further, the comparing the message to be tested and the second sent message to obtain a first test result includes:

[0017] Obtaining the variable value of the message to be tested;

[0018] Determine whether the variable value of the message to be tested is consistent with the target signal value;

[0019] If yes, determining that the first test result is that the test of the MCU receiving message signal for the target signal value is successful;

[0020] If not, it is determined that the first test result is that the test of the MCU receiving message signal for the target signal value fails.

[0021] Further, generating a test report according to the first test result, the message to be tested and the second sent message includes:

[0022] A test report is generated according to the first test result, the variable value of the message to be tested and the target signal value.

[0023] Furthermore, the method further comprises:

[0024] Deleting the target signal value from the preset signal modification value set to obtain an updated preset signal modification value set;

[0025] Determining whether the updated preset signal modification value set is empty;

[0026] If not, executing the step of determining the current target signal value to be modified according to the preset signal modification value set;

[0027] If yes, it is determined that the test of the MCU receiving message signal is completed, and the summary of all the test reports is performed to obtain a signal test summary report.

[0028] Furthermore, the method further comprises:

[0029] When the test requirement is to test that the MCU sends a message signal, obtain a first message signal in the program;

[0030] Determining the current target variable value to be modified according to the preset signal modification value set;

[0031] Modifying the variable value of the first message signal to the target variable value to obtain a second message signal;

[0032] After the second preset time period, reading the received message sent by the MCU;

[0033] Obtain the signal value of the message sent by the MCU;

[0034] Compare the signal value of the message sent by the MCU with the target variable value to obtain a second test result;

[0035] Generate a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value;

[0036] When the test of the message signal sent by the MCU is completed, the summary of all the test reports is performed to obtain a signal test summary report.

[0037] Further, the comparing the signal value of the message sent by the MCU with the target variable value to obtain a second test result includes:

[0038] Determine whether the signal value of the message sent by the MCU is consistent with the target variable value;

[0039] If yes, determining that the second test result is that the test of the target variable value sent by the MCU is successful;

[0040] If not, it is determined that the second test result is that the test of the message sent by the MCU for the target variable value fails.

[0041] A second aspect of the present application provides a vehicle motor controller message testing device, the vehicle motor controller message testing device comprising:

[0042] A first acquisition unit, used to acquire a test requirement of a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement;

[0043] A second acquisition unit, used for acquiring a first sending message to be sent when the test requirement is to test the MCU receiving a message signal;

[0044] A modification unit, configured to modify the first sent message according to the preset signal modification value set to obtain a modified second sent message;

[0045] A sending unit, configured to send the second sending message according to a preset message period;

[0046] A reading unit, configured to read a message to be tested corresponding to the second sent message in the program after a first preset time period;

[0047] A comparing unit, used for comparing the message to be tested with the second sent message to obtain a first test result;

[0048] A report generating unit, configured to generate a test report according to the first test result, the message to be tested and the second sent message;

[0049] The summarizing unit is used to summarize all the test reports when the test of the MCU receiving message signal is completed, obtain a signal test summary report, and output the signal test summary report.

[0050] Furthermore, the modification unit includes:

[0051] A first determination subunit, configured to determine a target signal value to be modified according to the preset signal modification value set; wherein the preset signal modification value set includes at least a preset maximum value, a preset minimum value, and at least one preset intermediate value;

[0052] The modification subunit is used to modify the signal value of the first sending message to the target signal value to obtain a modified second sending message.

[0053] Furthermore, the comparison unit comprises:

[0054] An acquisition subunit, used for acquiring the variable value of the message to be tested;

[0055] A comparison subunit, used to determine whether the variable value of the message to be tested is consistent with the target signal value;

[0056] A second determining subunit is used to determine that the first test result is that the test of the MCU receiving the message signal for the target signal value is successful when the variable value of the message to be tested is consistent with the target signal value;

[0057] The second determining subunit is further configured to determine, when the variable value of the message to be tested is inconsistent with the target signal value, that the first test result is a test failure of the MCU receiving message signal with respect to the target signal value.

[0058] Furthermore, the report generating unit is specifically configured to generate a test report according to the first test result, the variable value of the message to be tested and the target signal value.

[0059] Furthermore, the automobile motor controller message testing device also includes:

[0060] a deleting unit, configured to delete the target signal value from the preset signal modification value set to obtain an updated preset signal modification value set;

[0061] A judging unit, configured to judge whether the updated preset signal modification value set is empty;

[0062] The modification unit is specifically configured to determine the current target signal value to be modified according to the preset signal modification value set when the preset signal modification value set after update is not empty;

[0063] The summary unit is specifically used to determine that the test of the MCU receiving message signal is completed when the updated preset signal modification value set is empty, and summarize all the test reports to obtain a signal test summary report.

[0064] Furthermore, the automobile motor controller message testing device also includes:

[0065] The second acquisition unit is further configured to acquire the first message signal in the program when the test requirement is to test the MCU to send a message signal;

[0066] A determination unit, configured to determine a target variable value to be modified according to the preset signal modification value set;

[0067] The modification unit is further used to modify the variable value of the first message signal to the target variable value to obtain a second message signal;

[0068] The reading unit is further used to read the received message sent by the MCU after a second preset time period;

[0069] A third acquisition unit is used to obtain a signal value of a message sent by the MCU;

[0070] The comparison unit is further used to compare the signal value of the message sent by the MCU with the target variable value to obtain a second test result;

[0071] The report generating unit is further used to generate a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value;

[0072] The summarizing unit is also used to summarize all the test reports to obtain a signal test summary report when the test of sending message signals to the MCU is completed.

[0073] Furthermore, the comparison unit comprises:

[0074] A comparison subunit, used to determine whether the signal value of the message sent by the MCU is consistent with the target variable value;

[0075] The second determining subunit is further configured to determine, when the signal value of the message sent by the MCU is consistent with the target variable value, that the second test result is that the test of the message sent by the MCU for the target variable value is successful;

[0076] The second determining subunit is further configured to determine, when a signal value of the message sent by the MCU is inconsistent with the target variable value, that the second test result is a test failure of the message sent by the MCU for the target variable value.

[0077] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the automotive motor controller message testing method described in any one of the first aspects of the present application.

[0078] A fourth aspect of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the automobile motor controller message testing method described in any one of the first aspect of the present application is executed.

[0079] The beneficial effects of the present application are as follows: the method and device can automatically test the correctness of communication messages, send messages after automatically modifying the message signal value, read the MCU software variable value and judge the correctness, thereby solving the problems of low test efficiency and high risk of manual operation errors through automated testing, thereby improving test efficiency and reducing the risk of errors caused by manual operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain 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.

[0081] Figure 1 A schematic diagram of a flow chart of a vehicle motor controller message testing method provided in an embodiment of the present application;

[0082] Figure 2 A schematic diagram of an example flow of a method for testing a message of an automobile motor controller provided in an embodiment of the present application;

[0083] Figure 3 A schematic diagram of a flow chart of another automobile motor controller message testing method provided in an embodiment of the present application;

[0084] Figure 4 A schematic diagram of an example flow of another automobile motor controller message testing method provided in an embodiment of the present application;

[0085] Figure 5 A schematic diagram of the structure of a vehicle motor controller message testing device provided in an embodiment of the present application;

[0086] Figure 6 A schematic diagram of the structure of another automobile motor controller message testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0088] 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.

[0089] Example 1

[0090] Please see Figure 1 , Figure 1 A flow chart of a method for testing a message of an automobile motor controller provided in this embodiment. The method for testing a message of an automobile motor controller includes:

[0091] S101, obtaining test requirements for a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirements.

[0092] S102: When the test requirement is to test the MCU receiving a message signal, obtain a first sending message to be sent.

[0093] In this embodiment, when the test requirement is to test the message signal received by the MCU, it means that the message signal to be tested is a signal in the message received by the MCU (motor controller).

[0094] S103: Determine a current target signal value to be modified according to a preset signal modification value set.

[0095] In this embodiment, the preset signal modification value set includes at least a preset maximum value, a preset minimum value, and at least one preset intermediate value.

[0096] In this embodiment, the target signal value is one of a preset maximum value, a preset minimum value, and a preset intermediate value.

[0097] S104: Modify the signal value of the first sent message to the target signal value to obtain a modified second sent message.

[0098] S105: Send a second sending message according to a preset message period.

[0099] S106. After the first preset time period, read a message to be tested corresponding to the second sent message in the program.

[0100] In this embodiment, the first preset time period may be 500 ms.

[0101] S107: Obtain variable values ​​of the message to be tested.

[0102] S108, judging whether the variable value of the message to be tested is consistent with the target signal value, if so, executing step S109; if not, executing step S110.

[0103] In this embodiment, the signal value of the second sent message is the target signal value.

[0104] S109: Determine that the first test result is that the test of the MCU receiving message signal against the target signal value is successful, and execute step S111.

[0105] S110. Determine that the first test result is that the test of the MCU receiving message signal against the target signal value fails, and execute step S112.

[0106] S111. Generate a test report according to the first test result, the variable values ​​of the message to be tested, and the target signal value.

[0107] In this embodiment, the method can first modify the value of the sent message signal to the maximum value, and start sending messages according to the message cycle. After waiting for T1 (i.e., the first preset time period), the variable value corresponding to the message signal to be tested in the program is read through XCP, and the program variable value and the sent signal value are compared to see if they are consistent. If they are consistent, the test of the maximum value of the MCU receiving the message signal passes, and the read program variable value and the sent message signal value are printed in the test report. Otherwise, the test of the maximum value of the MCU receiving the message signal fails.

[0108] In this embodiment, the method can modify the value of the sent message signal to the minimum value, and start sending messages according to the message cycle. After waiting for T1, the variable value corresponding to the message signal to be tested in the program is read through XCP, and the program variable value and the sent signal value are compared to see if they are consistent. If they are consistent, the MCU receives the message signal minimum value test and passes, and prints the read program variable value and the sent message signal value into the test report. Otherwise, the MCU receives the message signal maximum value test and fails.

[0109] In this embodiment, the method can continue to modify the value of the sent message signal to the intermediate value, and start sending messages according to the message cycle. After waiting for T1, the variable value corresponding to the message signal to be tested in the program is read through XCP, and the program variable value and the sent signal value are compared to see if they are consistent. If they are consistent, the MCU receives the message signal intermediate value test and passes, and prints the read program variable value and the sent message signal value into the test report. Otherwise, the MCU receives the message signal intermediate value test and fails, and stops sending messages.

[0110] S112: Delete the target signal value from the preset signal modification value set to obtain an updated preset signal modification value set.

[0111] S113, determining whether the updated preset signal modification value set is empty, if so, executing step S114; if not, executing step S103.

[0112] In this embodiment, when the updated preset signal modification value set is empty, it is determined that the test on the MCU receiving the message signal is completed.

[0113] In this embodiment, the method can eliminate randomness by testing the maximum value, minimum value, and intermediate value (any value between the maximum value and the minimum value) of the message signal and performing multiple measurements on the same signal, thereby ensuring the correctness of the signal range.

[0114] S114. Summarize all test reports to obtain a signal test summary report, and output the signal test summary report.

[0115] Please see Figure 2 , Figure 2 An example flow chart of a method for testing a message of an automobile motor controller is shown.

[0116] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.

[0117] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.

[0118] In this embodiment, a communication message automation test script for implementing the above method can be written based on the canoe software using the CAPL language, that is, the communication message automation test script can be the execution subject of this method.

[0119] It can be seen that the automobile motor controller message testing method described in this embodiment can automatically test the correctness of communication messages without human intervention, thereby solving the problems of low test efficiency and high risk of errors caused by manual operation and improving test efficiency.

[0120] Example 2

[0121] Please see Figure 3 , Figure 3 A flow chart of a method for testing a message of an automobile motor controller provided in this embodiment. The method for testing a message of an automobile motor controller includes:

[0122] S201. Acquire test requirements for a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirements.

[0123] S202: When the test requirement is to test that the MCU sends a message signal, obtain a first message signal in the program.

[0124] In this embodiment, when the test requirement is to test the message signal sent by the MCU, it means that when the message signal to be tested is a signal in the message sent by the MCU (motor controller).

[0125] S203: Determine the target variable value to be modified according to the preset signal modification value set.

[0126] S204: Modify the variable value of the first message signal to the target variable value to obtain a second message signal.

[0127] S205. After the second preset time period, read the received message sent by the MCU.

[0128] In this embodiment, the first preset time period and the second preset time period may be the same or different, and this embodiment does not impose any limitation on this.

[0129] In this embodiment, the second preset time period may be 500 ms.

[0130] S206: Obtain the signal value of the message sent by the MCU.

[0131] S207, determine whether the signal value of the message sent by the MCU is consistent with the target variable value, if so, execute step S208; if not, execute step S209.

[0132] In this embodiment, the variable value of the second message signal is the target variable value.

[0133] S208. Determine that the second test result is that the test of the target variable value sent by the MCU is successful, and execute step S210.

[0134] S209: Determine that the second test result is that the test of the target variable value sent by the MCU fails, and end this process.

[0135] S210: Generate a test report according to the second test result, the signal value of the message sent by the MCU, and the target variable value.

[0136] In this embodiment, the method can first modify the variable value corresponding to the message signal in the program to the maximum value through XCP, wait for T2 (i.e., the second preset time period, T2 can be equal to T1), read the received MCU sent message signal value, and compare whether the program variable value and the received signal value are consistent. If they are consistent, the MCU sends the message signal maximum value test passes, and the read program variable value and the sent message signal value are printed in the test report, otherwise the MCU sends the message signal maximum value test fails.

[0137] In this embodiment, the method can modify the variable value corresponding to the message signal in the program to the minimum value through XCP, wait for T2, read the received MCU send message signal value, compare the program variable value and the received signal value to see if they are consistent, if they are consistent, the MCU sends the message signal minimum value test passed, and the read program variable value and the sent message signal value are printed in the test report, otherwise the MCU sends the message signal minimum value test failed.

[0138] In this embodiment, the method can continue to modify the variable value corresponding to the message signal in the program to an intermediate value through XCP, wait for T2, read the received MCU sent message signal value, compare the program variable value and the received signal value to see if they are consistent, if they are consistent, the MCU sends the message signal intermediate value test passed, and the read program variable value and the sent message signal value are printed in the test report, otherwise the MCU sends the message signal intermediate value test failed, and stops sending messages.

[0139] As an optional implementation manner, after generating a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value, the method further includes:

[0140] Deleting the target variable value from the preset signal modification value set to obtain an updated preset signal modification value set;

[0141] Determine whether the updated preset signal modification value set is empty;

[0142] If not, the above-mentioned step of determining the current target variable value to be modified according to the preset signal modification value set is executed;

[0143] If yes, it is determined that the test of the message signal sent by the MCU is completed, and the following summary of all test reports is performed to obtain a signal test summary report.

[0144] In this embodiment, the method can eliminate randomness by testing the maximum value, minimum value, and intermediate value (any value between the maximum value and the minimum value) of the message signal and performing multiple measurements on the same signal, thereby ensuring the correctness of the signal range.

[0145] S211. Summarize all test reports to obtain a signal test summary report, and output the signal test summary report.

[0146] Please see Figure 4 , Figure 4 An example flow chart of a method for testing a message of an automobile motor controller is shown.

[0147] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.

[0148] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.

[0149] It can be seen that the automobile motor controller message testing method described in this embodiment can automatically test the correctness of communication messages without human intervention, thereby solving the problems of low test efficiency and high risk of errors caused by manual operation and improving test efficiency.

[0150] Example 3

[0151] Please see Figure 5 , Figure 5 The structure diagram of a vehicle motor controller message testing device provided in this embodiment is shown in FIG. Figure 5 As shown, the automobile motor controller message test device includes:

[0152] A first acquisition unit 310 is used to acquire a test requirement of a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement;

[0153] The second acquisition unit 320 is used to acquire a first transmission message to be sent when the test requirement is to test the MCU receiving a message signal;

[0154] A modification unit 330, configured to modify the first transmission message according to a preset signal modification value set to obtain a modified second transmission message;

[0155] The sending unit 340 is used to send a second sending message according to a preset message period;

[0156] A reading unit 350, configured to read a message to be tested corresponding to the second sent message in the program after a first preset time period;

[0157] A comparison unit 360, configured to compare the message to be tested with the second sent message to obtain a first test result;

[0158] A report generating unit 370, configured to generate a test report according to the first test result, the message to be tested and the second sent message;

[0159] The summarizing unit 380 is used to summarize all test reports when the test of the MCU receiving message signal is completed, obtain a signal test summary report, and output the signal test summary report.

[0160] As an optional implementation, the vehicle motor controller message testing device further includes:

[0161] The second acquisition unit 320 is further used to acquire the first message signal in the program when the test requirement is to test the MCU to send a message signal;

[0162] A determination unit 390, configured to determine a target variable value to be modified according to a preset signal modification value set;

[0163] The modification unit 330 is further configured to modify the variable value of the first message signal to a target variable value to obtain a second message signal;

[0164] The reading unit 350 is further configured to read the received message sent by the MCU after a second preset time period;

[0165] The third acquisition unit 400 is used to obtain the signal value of the message sent by the MCU;

[0166] The comparison unit 360 is further used to compare the signal value of the message sent by the MCU with the target variable value to obtain a second test result;

[0167] The report generating unit 370 is further used to generate a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value;

[0168] The summarizing unit 380 is further used to summarize all test reports to obtain a signal test summary report when the test of sending message signals to the MCU is completed.

[0169] In this embodiment, the explanation of the automobile motor controller message testing device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.

[0170] It can be seen that the automobile motor controller message testing device described in this embodiment can automatically test the correctness of communication messages without human intervention, thereby solving the problems of low test efficiency and high risk of errors caused by manual operation and improving test efficiency.

[0171] Example 4

[0172] Please see Figure 6 , Figure 6 The structure diagram of a vehicle motor controller message testing device provided in this embodiment is shown in FIG. Figure 6 As shown, the automobile motor controller message test device includes:

[0173] A first acquisition unit 310 is used to acquire a test requirement of a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement;

[0174] The second acquisition unit 320 is used to acquire a first transmission message to be sent when the test requirement is to test the MCU receiving a message signal;

[0175] A modification unit 330, configured to modify the first transmission message according to a preset signal modification value set to obtain a modified second transmission message;

[0176] The sending unit 340 is used to send a second sending message according to a preset message period;

[0177] A reading unit 350, configured to read a message to be tested corresponding to the second sent message in the program after a first preset time period;

[0178] A comparison unit 360, configured to compare the message to be tested with the second sent message to obtain a first test result;

[0179] A report generating unit 370, configured to generate a test report according to the first test result, the message to be tested and the second sent message;

[0180] The summarizing unit 380 is used to summarize all test reports when the test of the MCU receiving message signal is completed, obtain a signal test summary report, and output the signal test summary report.

[0181] As an optional implementation manner, the modifying unit 330 includes:

[0182] A first determining subunit 331 is used to determine the current target signal value to be modified according to a preset signal modification value set; wherein the preset signal modification value set includes at least a preset maximum value, a preset minimum value and at least one preset intermediate value;

[0183] The modification subunit 332 is used to modify the signal value of the first transmission message to a target signal value to obtain a modified second transmission message.

[0184] As an optional implementation, the comparison unit 360 includes:

[0185] An acquisition subunit 361 is used to acquire the variable value of the message to be tested;

[0186] The comparison subunit 362 is used to determine whether the variable value of the message to be tested is consistent with the target signal value;

[0187] The second determining subunit 363 is used to determine that the first test result is that the test of the MCU receiving the message signal against the target signal value is successful when the variable value of the message to be tested is consistent with the target signal value;

[0188] The second determining subunit 363 is further configured to determine, when the variable value of the message to be tested is inconsistent with the target signal value, that the first test result is a test failure of the MCU receiving the message signal with respect to the target signal value.

[0189] As an optional implementation manner, the report generating unit 370 is specifically configured to generate a test report according to the first test result, the variable value of the message to be tested, and the target signal value.

[0190] As an optional implementation, the vehicle motor controller message testing device further includes:

[0191] A deleting unit 410, configured to delete the target signal value from the preset signal modification value set to obtain an updated preset signal modification value set;

[0192] A judging unit 420, configured to judge whether the updated preset signal modification value set is empty;

[0193] The modifying unit 330 is specifically configured to determine the current target signal value to be modified according to the preset signal modification value set when the preset signal modification value set after update is not empty;

[0194] The summarizing unit 380 is specifically used to determine that the test of the MCU receiving message signal is completed when the updated preset signal modification value set is empty, and summarize all test reports to obtain a signal test summary report.

[0195] As an optional implementation, the vehicle motor controller message testing device further includes:

[0196] The second acquisition unit 320 is further used to acquire the first message signal in the program when the test requirement is to test the MCU to send a message signal;

[0197] A determination unit 390, configured to determine a target variable value to be modified according to a preset signal modification value set;

[0198] The modification unit 330 is further configured to modify the variable value of the first message signal to a target variable value to obtain a second message signal;

[0199] The reading unit 350 is further configured to read the received message sent by the MCU after a second preset time period;

[0200] The third acquisition unit 400 is used to obtain the signal value of the message sent by the MCU;

[0201] The comparison unit 360 is further used to compare the signal value of the message sent by the MCU with the target variable value to obtain a second test result;

[0202] The report generating unit 370 is further used to generate a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value;

[0203] The summarizing unit 380 is further used to summarize all test reports to obtain a signal test summary report when the test of sending message signals to the MCU is completed.

[0204] As an optional implementation, the comparison unit 360 includes:

[0205] A comparison subunit 362 is used to determine whether the signal value of the message sent by the MCU is consistent with the target variable value;

[0206] The second determining subunit 363 is further configured to determine that the second test result is that the test of the message sent by the MCU for the target variable value is successful when the signal value of the message sent by the MCU is consistent with the target variable value;

[0207] The second determining subunit 363 is further configured to determine, when the signal value of the message sent by the MCU is inconsistent with the target variable value, that the second test result is a test failure of the message sent by the MCU with respect to the target variable value.

[0208] In this embodiment, the explanation of the automobile motor controller message testing device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.

[0209] It can be seen that the automobile motor controller message testing device described in this embodiment can automatically test the correctness of communication messages without human intervention, thereby solving the problems of low test efficiency and high risk of errors caused by manual operation and improving test efficiency.

[0210] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the automobile motor controller message testing method in embodiment 1 or embodiment 2 of the present application.

[0211] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the automobile motor controller message testing method in Embodiment 1 or Embodiment 2 of the present application is executed.

[0212] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0213] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0214] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0215] The above description is only an embodiment of the present application and is 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.

[0216] 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.

[0217] 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 a message of an automobile motor controller, characterized in that: include: Obtaining a test requirement for a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement; When the test requirement is to test the MCU receiving message signal, obtain a first sending message to be sent; Modify the first sent message according to the preset signal modification value set to obtain a modified second sent message; Sending the second sending message according to a preset message period; After a first preset time period, reading a message to be tested corresponding to the second sent message in the program; Compare the message to be tested and the second sent message to obtain a first test result; Generate a test report according to the first test result, the message to be tested and the second sent message; When the test of the MCU receiving message signal is completed, all the test reports are summarized to obtain a signal test summary report, and the signal test summary report is output.

2. The automotive motor controller message testing method according to claim 1, characterized in that: The modifying the first sent message according to the preset signal modification value set to obtain a modified second sent message includes: Determining the current target signal value to be modified according to the preset signal modification value set; wherein the preset signal modification value set includes at least a preset maximum value, a preset minimum value and at least one preset intermediate value; The signal value of the first sending message is modified to the target signal value to obtain a modified second sending message.

3. The automotive motor controller message testing method according to claim 2, characterized in that: The comparing the message to be tested and the second sent message to obtain a first test result includes: Obtaining the variable value of the message to be tested; Determine whether the variable value of the message to be tested is consistent with the target signal value; If yes, determining that the first test result is that the test of the MCU receiving message signal for the target signal value is successful; If not, it is determined that the first test result is that the test of the MCU receiving message signal for the target signal value fails.

4. The automotive motor controller message testing method according to claim 3, characterized in that: The generating a test report according to the first test result, the message to be tested and the second sent message includes: A test report is generated according to the first test result, the variable value of the message to be tested and the target signal value.

5. The automotive motor controller message testing method according to claim 2, characterized in that: The method further comprises: Deleting the target signal value from the preset signal modification value set to obtain an updated preset signal modification value set; Determining whether the updated preset signal modification value set is empty; If not, executing the step of determining the current target signal value to be modified according to the preset signal modification value set; If yes, it is determined that the test of the MCU receiving message signal is completed, and the summary of all the test reports is performed to obtain a signal test summary report.

6. The automotive motor controller message testing method according to claim 1, characterized in that: The method further comprises: When the test requirement is to test that the MCU sends a message signal, obtain a first message signal in the program; Determining the current target variable value to be modified according to the preset signal modification value set; Modifying the variable value of the first message signal to the target variable value to obtain a second message signal; After the second preset time period, reading the received message sent by the MCU; Obtain the signal value of the message sent by the MCU; Compare the signal value of the message sent by the MCU with the target variable value to obtain a second test result; Generate a test report according to the second test result, the signal value of the message sent by the MCU and the target variable value; When the test of the message signal sent by the MCU is completed, the summary of all the test reports is performed to obtain a signal test summary report.

7. The automobile motor controller message testing method according to claim 6, characterized in that: The comparing the signal value of the message sent by the MCU with the target variable value to obtain a second test result includes: Determine whether the signal value of the message sent by the MCU is consistent with the target variable value; If yes, determining that the second test result is that the test of the target variable value sent by the MCU is successful; If not, it is determined that the second test result is that the test of the message sent by the MCU for the target variable value fails.

8. A vehicle motor controller message testing device, characterized in that: The automobile motor controller message testing device comprises: A first acquisition unit, used to acquire a test requirement of a vehicle motor controller message test and a set of preset signal modification values ​​corresponding to the test requirement; A second acquisition unit, used for acquiring a first sending message to be sent when the test requirement is to test the MCU receiving a message signal; A modification unit, configured to modify the first sent message according to the preset signal modification value set to obtain a modified second sent message; A sending unit, configured to send the second sending message according to a preset message period; A reading unit, configured to read a message to be tested corresponding to the second sent message in the program after a first preset time period; A comparing unit, used for comparing the message to be tested with the second sent message to obtain a first test result; A report generating unit, configured to generate a test report according to the first test result, the message to be tested and the second sent message; The summarizing unit is used to summarize all the test reports when the test of the MCU receiving message signal is completed, obtain a signal test summary report, and output the signal test summary report.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the automotive motor controller message testing method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the automobile motor controller message testing method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Vehicle-mounted terminal CAN signal automatic testing method and device, and automatic test bench

    CN106814726A

  • Vehicle control unit test method and device, storage medium and equipment

    CN115599067A

  • Automatic test method, device, terminal equipment and system for automobile central control

    CN115687149A

  • Communication test method and device, equipment and storage medium

    CN117201350A

Cited By

  • Motor test bench system

    CN121348079A