A diagnostic test method and device for a vehicle control unit, and an electronic device
Patent Information
- Application Number
- CN202311221073.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-09-20
AI Technical Summary
[0004]然而,现有的UDS测试用例多基于正响应进行正向测试,缺少对负响应、错误长度、状态更新时的Data值校验等的测试,生成的测试用例覆盖度不够
[0053]第五方面,本申请实施例提供的一种计算机程序产品,所述计算机程序产品在计算机上运行时,使得计算机执行如第一方面任一项所述的方法。
Smart Images

Figure CN117111586B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and more specifically, to a diagnostic testing method, apparatus, electronic device, and storage medium for an on-board control unit. Background Technology
[0002] The Unified Diagnostic Services (UDS) testing methodology can provide unified diagnostic functions for vehicle electronic control units, such as automatic transmissions and anti-lock braking systems. It encompasses various aspects of requirements, including transmission, data processing, and specific diagnostic application services. It does not refer to a single aspect of diagnostic services but rather includes a series of standards and interaction architectures for transmission methods, data format requirements, and specific diagnostic services.
[0003] UDS testing methods typically involve acquiring the data to be sent, then sending a diagnostic message from the sending module, and finally receiving the message and comparing the message data with the expected data.
[0004] However, existing UDS test cases are mostly based on positive responses for positive testing, lacking testing for negative responses, error length, and data value verification during state updates, resulting in insufficient test case coverage. Most UDS automated tests are relatively fixed, which is not conducive to meeting the ever-changing testing needs during the development phase. While manual testing can meet these changing needs, its scope and accuracy are limited by the experience and capabilities of the testers. Summary of the Invention
[0005] The purpose of this application is to provide a diagnostic testing method, device, electronic device, and storage medium for vehicle control units, which can quickly and effectively diagnose and test vehicle control units, meet various testing needs, promptly identify problems in vehicle control units, eliminate the need for manual testing, reduce testing costs, and improve testing efficiency.
[0006] In a first aspect, embodiments of this application provide a diagnostic testing method for an on-board control unit, the method comprising:
[0007] Obtain the diagnostic test requirements of the vehicle control unit;
[0008] Construct a diagnostic parameter table based on the diagnostic testing requirements;
[0009] Generate diagnostic instructions based on the diagnostic parameter table;
[0010] The vehicle control unit is subjected to diagnostic tests according to the diagnostic instructions, and the diagnostic test results are obtained.
[0011] In the above implementation process, by constructing a diagnostic parameter table and generating diagnostic commands to perform diagnostic tests on the vehicle control unit, the vehicle control unit can be diagnosed and tested quickly and effectively. This can meet various testing needs, promptly identify problems in the vehicle control unit, eliminate the need for manual testing, reduce testing costs, and improve testing efficiency.
[0012] Further, the step of generating diagnostic instructions based on the diagnostic parameter table includes:
[0013] Read the parameter number and parameter value from the diagnostic parameter table;
[0014] Generate key-value pairs based on the serial number and the parameter value;
[0015] Generate an initial diagnostic command based on the parameter values in the key value pair;
[0016] The diagnostic instructions are generated based on the initial diagnostic instructions.
[0017] In the above implementation process, the initial diagnostic command is generated by using the serial number and parameter value in the diagnostic parameter table, and then the diagnostic command is generated based on the initial diagnostic command. This makes the diagnostic command more accurate and better meets the needs of diagnostic testing.
[0018] Further, the step of generating the diagnostic instruction based on the initial diagnostic instruction includes:
[0019] A diagnostic response is obtained based on the initial diagnostic command;
[0020] The diagnostic response was initially analyzed to obtain the analysis results;
[0021] The diagnostic instructions are generated based on the analysis results.
[0022] In the above implementation process, the diagnostic response is initially parsed, and diagnostic instructions are generated based on the parsing results. This allows the diagnostic instructions to be generated promptly as soon as the diagnostic response is received, saving diagnostic testing time.
[0023] Furthermore, the step of performing preliminary analysis on the diagnostic response to obtain the analysis result includes:
[0024] The diagnostic response is preliminarily analyzed to obtain the response value and expected data;
[0025] Determine whether the response value and the expected data match the original message;
[0026] If so, the analysis result indicates that the diagnostic test has passed;
[0027] If not, the analysis result indicates that the diagnostic test failed.
[0028] In the above implementation process, the diagnostic test can be judged as passing based on whether the response value and expected data match the original message, which can further reduce errors and avoid erroneous responses in the diagnostic test.
[0029] Further, the step of generating the diagnostic instruction based on the parsing result includes:
[0030] If the analysis result indicates that the diagnostic test fails, determine whether the diagnostic parameter table needs to be calibrated.
[0031] If so, obtain the signal data and target signal corresponding to the parameters in the diagnostic parameter table, determine whether the signal data and the target signal match each other, and if they match, generate the diagnostic instruction;
[0032] If not, obtain the status update correlation value from the diagnostic parameter table, and generate the diagnostic instruction based on the status update correlation value.
[0033] In the above implementation process, by calibrating the diagnostic parameter table, erroneous data in the diagnostic test table can be effectively reduced, and the diagnostic test table can be updated in real time, thereby improving the accuracy of the diagnostic test.
[0034] Further, the step of generating the diagnostic instruction based on the state update correlation includes:
[0035] Determine whether the diagnostic parameter table needs to be updated based on the status update correlation value;
[0036] If not, determine whether the index value in the diagnostic parameter table is greater than or equal to the threshold. If the index value is greater than or equal to the threshold, obtain a new index value and generate the diagnostic instruction based on the new index value.
[0037] If so, update the diagnostic parameter table and generate the diagnostic instruction.
[0038] In the above implementation process, generating diagnostic instructions based on the new index value, or generating diagnostic instructions after updating the diagnostic parameter table, can effectively improve the accuracy of diagnostic instructions and avoid diagnostic errors caused by incorrect diagnostic instructions.
[0039] Secondly, embodiments of this application also provide a diagnostic testing device for an on-board control unit, the device comprising:
[0040] The acquisition module is used to acquire the diagnostic test requirements of the vehicle control unit;
[0041] The module is used to build a diagnostic parameter table based on the diagnostic test requirements;
[0042] The generation module is used to generate diagnostic instructions based on the diagnostic parameter table;
[0043] The diagnostic test module is used to perform diagnostic tests on the vehicle control unit according to the diagnostic instructions and obtain diagnostic test results.
[0044] In the above implementation process, by constructing a diagnostic parameter table and generating diagnostic commands to perform diagnostic tests on the vehicle control unit, the vehicle control unit can be diagnosed and tested quickly and effectively. This can meet various testing needs, promptly identify problems in the vehicle control unit, eliminate the need for manual testing, reduce testing costs, and improve testing efficiency.
[0045] Furthermore, the generation module is also used for:
[0046] Read the parameter number and parameter value from the diagnostic parameter table;
[0047] Generate key-value pairs based on the serial number and the parameter value;
[0048] Generate an initial diagnostic command based on the parameter values in the key value pair;
[0049] The diagnostic instructions are generated based on the initial diagnostic instructions.
[0050] In the above implementation process, the initial diagnostic command is generated by using the serial number and parameter value in the diagnostic parameter table, and then the diagnostic command is generated based on the initial diagnostic command. This makes the diagnostic command more accurate and better meets the needs of diagnostic testing.
[0051] Thirdly, an electronic device provided in this application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects.
[0052] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in any of the first aspects.
[0053] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform the method described in any of the first aspects.
[0054] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0055] It can be implemented in accordance with the contents of the specification. The preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the range. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 A schematic flowchart illustrating the diagnostic testing method for an on-board control unit provided in this application embodiment;
[0058] Figure 2 A schematic diagram of the structural composition of the diagnostic testing device for the vehicle control unit provided in the embodiments of this application;
[0059] Figure 3 This is a schematic diagram of the structural composition of an electronic device provided in an embodiment of this application. Detailed Implementation
[0060] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0061] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0062] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0063] Example 1
[0064] Figure 1 This is a flowchart illustrating the diagnostic testing method for the vehicle control unit provided in this application embodiment, as shown below. Figure 1 As shown, the method includes:
[0065] S1, Obtain the diagnostic test requirements of the vehicle control unit;
[0066] S2, Construct a diagnostic parameter table based on diagnostic testing requirements;
[0067] S3, Generate diagnostic instructions based on the diagnostic parameter table;
[0068] S4 performs diagnostic tests on the vehicle control unit according to the diagnostic instructions and obtains the diagnostic test results.
[0069] In the above implementation process, by constructing a diagnostic parameter table and generating diagnostic commands to perform diagnostic tests on the vehicle control unit, the vehicle control unit can be diagnosed and tested quickly and effectively. This can meet various testing needs, promptly identify problems in the vehicle control unit, eliminate the need for manual testing, reduce testing costs, and improve testing efficiency.
[0070] In S2, a diagnostic parameter table is built according to the test requirements. The parameter table includes, but is not limited to: sequence number, SID, DID, InputOutputParameter, response value (Response_Code), the original message of the expected data, the length of the diagnostic response message of the expected data, whether signal judgment is required, signal start bit, signal length, signal coefficient, offset, the corresponding signal for signal judgment, whether state update judgment is required, and state update correlation quantity, etc. If multiple signals need to be verified in the diagnostic response, simply add test sequence number entries and supplement the corresponding information accordingly.
[0071] Furthermore, the step of generating diagnostic instructions based on the diagnostic parameter table includes:
[0072] Read the parameter number and parameter value from the diagnostic parameter table;
[0073] Generate key-value pairs based on the serial number and parameter value;
[0074] Generate initial diagnostic instructions based on the parameter values in the key-value pairs;
[0075] Generate diagnostic instructions based on the initial diagnostic instructions.
[0076] In the above implementation process, the initial diagnostic command is generated by using the serial number and parameter value in the diagnostic parameter table, and then the diagnostic command is generated based on the initial diagnostic command. This makes the diagnostic command more accurate and better meets the needs of diagnostic testing.
[0077] The ECUTest calculate function reads the contents of the diagnostic parameter table and stores them in a dictionary. The key of the dictionary is the index of the parameter table, and the value is the parameter value of the corresponding index in the same row. The dictionary keys are traversed, and initial diagnostic instructions are generated based on the value corresponding to the key under each index, and then further diagnostic instructions are generated.
[0078] Furthermore, the step of generating diagnostic instructions based on the initial diagnostic instructions includes:
[0079] Obtain a diagnostic response based on the initial diagnostic instructions;
[0080] A preliminary analysis of the diagnostic response was performed, and the analysis results were obtained.
[0081] Diagnostic instructions are generated based on the analysis results.
[0082] In the above implementation process, the diagnostic response is initially parsed, and diagnostic instructions are generated based on the parsing results. This allows the diagnostic instructions to be generated promptly as soon as the diagnostic response is received, saving diagnostic testing time.
[0083] Use a script or ECUTest to send diagnostic commands, use a script or ECUTest to retrieve and store diagnostic response commands, and obtain a diagnostic response.
[0084] Furthermore, the steps for performing preliminary analysis of the diagnostic response to obtain the analysis results include:
[0085] A preliminary analysis of the diagnostic response is performed to obtain the response value and expected data.
[0086] Determine whether the response value and the expected data match the original message;
[0087] If so, the analysis result indicates that the diagnostic test has passed;
[0088] If not, the analysis result indicates that the diagnostic test failed.
[0089] In the above implementation process, the diagnostic test can be judged as passing based on whether the response value and expected data match the original message, which can further reduce errors and avoid erroneous responses in the diagnostic test.
[0090] The script performs a preliminary parsing of the diagnostic response to determine if the parsed message length, response value, and expected data match the expectations of the original message. If they match, the diagnostic test passes; otherwise, it fails. The parameters to be evaluated (message length, response value, and expected data) can be defined as not existing in the diagnostic parameter table.
[0091] Furthermore, the step of generating diagnostic instructions based on the parsing results includes:
[0092] If the analysis result indicates that the diagnostic test failed, determine whether the diagnostic parameter table needs to be calibrated.
[0093] If so, obtain the signal data and target signal corresponding to the parameters in the diagnostic parameter table, determine whether the signal data and target signal match each other, and if they match, generate a diagnostic command;
[0094] If not, retrieve the status update correlation value from the diagnostic parameter table and generate a diagnostic instruction based on the status update correlation value.
[0095] In the above implementation process, by calibrating the diagnostic parameter table, erroneous data in the diagnostic test table can be effectively reduced, and the diagnostic test table can be updated in real time, thereby improving the accuracy of the diagnostic test.
[0096] Furthermore, the step of generating diagnostic instructions based on the state update correlation includes:
[0097] Determine whether the diagnostic parameter table needs to be updated based on the status update correlation value;
[0098] If not, determine whether the index value in the diagnostic parameter table is greater than or equal to the threshold. If the index value is greater than or equal to the threshold, obtain a new index value and generate a diagnostic instruction based on the new index value.
[0099] If so, update the diagnostic parameter table and generate diagnostic instructions.
[0100] In the above implementation process, generating diagnostic instructions based on the new index value, or generating diagnostic instructions after updating the diagnostic parameter table, can effectively improve the accuracy of diagnostic instructions and avoid diagnostic errors caused by incorrect diagnostic instructions.
[0101] The script determines whether signal-level calibration is needed based on the parameters in the diagnostic parameter table. If so, it calculates the signal value using the signal data in the parameter table, including signal start position, signal length, signal coefficient, and offset, and compares it with the corresponding signal (target signal) in the diagnostic parameter table. If they match, the diagnostic test passes; otherwise, it fails.
[0102] If not, determine whether a status update is needed based on the status update correlation value in the diagnostic parameter table. If an update is needed, update the status based on the status update correlation value in the diagnostic parameter table, store the value of the signal before the status update, and repeat the above operation to regenerate the diagnostic instruction. If no update is needed, determine whether the index value in the diagnostic parameter table is greater than the maximum value of the sequence number. If it is not greater, increment the index value by 1 and repeat the above operation to regenerate the diagnostic instruction.
[0103] This application embodiment, based on a diagnostic parameter table, automatically generates diagnostic commands using the CAPL language and ECUTest software. These commands are then sent via a CAPL user-defined function, and diagnostic responses are received. The response code, length, signal, and response time of the diagnostic responses are verified. It also supports non-positive tests such as negative responses and invalid commands, and is applicable to multi-signal response message verification. It supports signal-level diagnostic testing using state updates. This application embodiment can flexibly and reliably meet the diagnostic testing needs of vehicle control units with different configurations, requirements, and development stages.
[0104] Example 2
[0105] In order to execute the method corresponding to Embodiment 1 above and achieve the corresponding functional and technical effects, a diagnostic testing device for an on-board control unit is provided below, such as... Figure 2 As shown, the device includes:
[0106] Module 1 is used to acquire diagnostic test requirements for the vehicle control unit;
[0107] Module 2 is used to build a diagnostic parameter table based on diagnostic test requirements;
[0108] Generation module 3 is used to generate diagnostic instructions based on the diagnostic parameter table;
[0109] Diagnostic test module 4 is used to perform diagnostic tests on the vehicle control unit according to diagnostic instructions and obtain diagnostic test results.
[0110] In the above implementation process, by constructing a diagnostic parameter table and generating diagnostic commands to perform diagnostic tests on the vehicle control unit, the vehicle control unit can be diagnosed and tested quickly and effectively. This can meet various testing needs, promptly identify problems in the vehicle control unit, eliminate the need for manual testing, reduce testing costs, and improve testing efficiency.
[0111] Furthermore, the generation module 3 is also used for:
[0112] Read the parameter number and parameter value from the diagnostic parameter table;
[0113] Generate key-value pairs based on the serial number and parameter value;
[0114] Generate initial diagnostic instructions based on the parameter values in the key-value pairs;
[0115] Generate diagnostic instructions based on the initial diagnostic instructions.
[0116] In the above implementation process, the initial diagnostic command is generated by using the serial number and parameter value in the diagnostic parameter table, and then the diagnostic command is generated based on the initial diagnostic command. This makes the diagnostic command more accurate and better meets the needs of diagnostic testing.
[0117] Furthermore, the generation module 3 is also used for:
[0118] Obtain a diagnostic response based on the initial diagnostic instructions;
[0119] A preliminary analysis of the diagnostic response was performed, and the analysis results were obtained.
[0120] Diagnostic instructions are generated based on the analysis results.
[0121] In the above implementation process, the diagnostic response is initially parsed, and diagnostic instructions are generated based on the parsing results. This allows the diagnostic instructions to be generated promptly as soon as the diagnostic response is received, saving diagnostic testing time.
[0122] Furthermore, the generation module 3 is also used for:
[0123] A preliminary analysis of the diagnostic response is performed to obtain the response value and expected data.
[0124] Determine whether the response value and the expected data match the original message;
[0125] If so, the analysis result indicates that the diagnostic test has passed;
[0126] If not, the analysis result indicates that the diagnostic test failed.
[0127] In the above implementation process, the diagnostic test can be judged as passing based on whether the response value and expected data match the original message, which can further reduce errors and avoid erroneous responses in the diagnostic test.
[0128] Furthermore, the generation module 3 is also used for:
[0129] If the analysis result indicates that the diagnostic test failed, determine whether the diagnostic parameter table needs to be calibrated.
[0130] If so, obtain the signal data and target signal corresponding to the parameters in the diagnostic parameter table, determine whether the signal data and target signal match each other, and if they match, generate a diagnostic command;
[0131] If not, retrieve the status update correlation value from the diagnostic parameter table and generate a diagnostic instruction based on the status update correlation value.
[0132] In the above implementation process, by calibrating the diagnostic parameter table, erroneous data in the diagnostic test table can be effectively reduced, and the diagnostic test table can be updated in real time, thereby improving the accuracy of the diagnostic test.
[0133] Furthermore, the generation module 3 is also used for:
[0134] Determine whether the diagnostic parameter table needs to be updated based on the status update correlation value;
[0135] If not, determine whether the index value in the diagnostic parameter table is greater than or equal to the threshold. If the index value is greater than or equal to the threshold, obtain a new index value and generate a diagnostic instruction based on the new index value.
[0136] If so, update the diagnostic parameter table and generate diagnostic instructions.
[0137] In the above implementation process, generating diagnostic instructions based on the new index value, or generating diagnostic instructions after updating the diagnostic parameter table, can effectively improve the accuracy of diagnostic instructions and avoid diagnostic errors caused by incorrect diagnostic instructions.
[0138] The diagnostic testing device for the vehicle control unit described above can implement the method of Embodiment 1. The options in Embodiment 1 are also applicable to this embodiment, and will not be described in detail here.
[0139] The remaining contents of this embodiment can be referred to the contents of Embodiment 1 above, and will not be repeated in this embodiment.
[0140] Example 3
[0141] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the diagnostic testing method for the vehicle control unit of Embodiment 1.
[0142] Alternatively, the aforementioned electronic device may be a server.
[0143] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the structural composition of an electronic device provided in an embodiment of this application. The electronic device may include a processor 31, a communication interface 332, a memory 33, and at least one communication bus 34. The communication bus 34 is used to enable direct communication between these components. In this embodiment, the communication interface 32 is used for signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0144] The processor 31 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor, or the processor 31 can be any conventional processor.
[0145] The memory 33 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 31, the device can perform the aforementioned operations. Figure 1 The various steps involved in the method implementation examples.
[0146] Optionally, the electronic device may also include a storage controller and an input / output unit. The memory 33, storage controller, processor 31, peripheral interface, and input / output unit are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via a communication bus 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0147] Input / output units are used to enable users to create tasks and set optional start periods or preset execution times for those tasks, facilitating user-server interaction. Input / output units can be, but are not limited to, a mouse and keyboard.
[0148] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.
[0149] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the diagnostic testing method for the vehicle control unit of Embodiment 1.
[0150] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using dedicated hardware-based apparatus that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0152] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0153] If the aforementioned functions are implemented as software functional 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical disks.
[0154] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0155] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
[0156] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A diagnostic testing method for an on-board control unit, characterized in that, The method includes: Obtain the diagnostic test requirements of the vehicle control unit; Construct a diagnostic parameter table based on the diagnostic testing requirements; Generate diagnostic instructions based on the diagnostic parameter table; The vehicle control unit is subjected to diagnostic testing according to the diagnostic instructions, and the diagnostic test results are obtained. The step of generating diagnostic instructions based on the diagnostic parameter table includes: Read the parameter number and parameter value from the diagnostic parameter table; Generate key-value pairs based on the serial number and the parameter value; Generate an initial diagnostic command based on the parameter values in the key value pair; The diagnostic instruction is generated based on the initial diagnostic instruction; The step of generating the diagnostic instruction based on the initial diagnostic instruction includes: A diagnostic response is obtained based on the initial diagnostic command; The diagnostic response was initially analyzed to obtain the analysis results; The diagnostic instructions are generated based on the parsing results; The step of generating diagnostic instructions based on the diagnostic parameter table further includes generating the diagnostic instructions based on the parsing results, including: If the analysis result indicates that the diagnostic test fails, determine whether the diagnostic parameter table needs to be calibrated. If so, obtain the signal data and target signal corresponding to the parameters in the diagnostic parameter table, determine whether the signal data and the target signal match each other, and if they match, generate the diagnostic instruction; If not, obtain the status update correlation value from the diagnostic parameter table, and generate the diagnostic instruction based on the status update correlation value.
2. The diagnostic testing method for the vehicle control unit according to claim 1, characterized in that, The step of performing preliminary analysis on the diagnostic response to obtain the analysis result includes: The diagnostic response is preliminarily analyzed to obtain the response value and expected data; Determine whether the response value and the expected data match the original message; If so, the analysis result indicates that the diagnostic test has passed; If not, the analysis result indicates that the diagnostic test failed.
3. The diagnostic testing method for the vehicle control unit according to claim 1, characterized in that, The step of generating the diagnostic instruction based on the status update correlation includes: Determine whether the diagnostic parameter table needs to be updated based on the status update correlation value; If not, determine whether the index value in the diagnostic parameter table is greater than or equal to the threshold. If the index value is greater than or equal to the threshold, obtain a new index value and generate the diagnostic instruction based on the new index value. If so, update the diagnostic parameter table and generate the diagnostic instruction.
4. A diagnostic testing device for an on-board control unit, characterized in that, The device includes: The acquisition module is used to acquire the diagnostic test requirements of the vehicle control unit; The module is used to build a diagnostic parameter table based on the diagnostic test requirements; The generation module is used to generate diagnostic instructions based on the diagnostic parameter table; The diagnostic test module is used to perform diagnostic tests on the vehicle control unit according to the diagnostic instructions and obtain diagnostic test results. The generation module is also used for: Read the parameter number and parameter value from the diagnostic parameter table; Generate key-value pairs based on the serial number and the parameter value; Generate an initial diagnostic command based on the parameter values in the key value pair; The diagnostic instruction is generated based on the initial diagnostic instruction; A diagnostic response is obtained based on the initial diagnostic command; The diagnostic response was initially analyzed to obtain the analysis results; The diagnostic instructions are generated based on the parsing results; If the analysis result indicates that the diagnostic test fails, determine whether the diagnostic parameter table needs to be calibrated. If so, obtain the signal data and target signal corresponding to the parameters in the diagnostic parameter table, determine whether the signal data and the target signal match each other, and if they match, generate the diagnostic instruction; If not, obtain the status update correlation value from the diagnostic parameter table, and generate the diagnostic instruction based on the status update correlation value.
5. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the diagnostic test method for the vehicle control unit according to any one of claims 1 to 3.
6. A storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the diagnostic testing method for the vehicle control unit as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Automobile diagnostic instrument testing method and device, equipment and storage medium
CN112860563A
Test case generation method and device, computer equipment and storage medium
CN114443503A