Rack rapid test system, method and equipment based on CAN protocol and medium
Through the bench rapid test system based on the CAN protocol, the host computer and CAN box are used to build functional controls and custom modules, which solves the problems of difficulty and low efficiency in bench testing in the existing technology, and achieves efficient and accurate testing. process, reducing technical requirements and costs.
Patent Information
- Application Number
- CN202410835990.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing technology, vehicle bench testing is difficult and inefficient. Testers need to spend a lot of energy to understand complex software product trigger logic and fixed operations, resulting in high technical requirements and error-prone, which reduces testing efficiency.
A bench rapid test system based on the CAN protocol is used, including a host computer and a CAN box. Test cases are built through functional controls and custom modules, and target function instructions are sent to the ECU under test. Test results are received and early warning analysis is performed to improve test efficiency and accuracy.
It improves the efficiency and accuracy of testers, reduces overall testing costs and technical requirements, enhances user experience, and takes into account execution flexibility and program maintainability.
Smart Images

Figure CN118760591A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a CAN protocol-based bench rapid testing system, method, equipment and medium. Background Art
[0002] Vehicle bench testing is a very important part of the automotive R&D and production process. It can help engineers and technicians understand the performance and reliability of the vehicle, and promptly discover and solve problems, thereby improving the quality and market competitiveness of the vehicle. As people's demand for safety, comfort and convenience in driving increases, the speed of vehicle-related software development iterations has accelerated, and a large number of software product diagnostic testing needs have been generated accordingly. Therefore, based on the current fast-release rhythm of software product development, testers need to complete the overall software version situation in a short period of time, so as to have a more comprehensive judgment and conclusion. However, at present, testers test the version and function of a software product through test cases one by one on the test bench. Therefore, testers need to spend a lot of energy to understand the complex trigger logic and some fixed operations in the software product, which has high technical requirements for testers and is prone to errors, greatly reducing the test efficiency. Summary of the invention
[0003] The embodiments of the present invention provide a bench rapid testing system, method, device and medium based on the CAN protocol, aiming to solve the problems of great testing difficulty and low efficiency in the prior art methods.
[0004] In a first aspect, an embodiment of the present invention provides a bench rapid testing system based on the CAN protocol, wherein the system includes a host computer and a CAN box, wherein:
[0005] The host computer is used for bench testing, and includes a functional control and a custom module; the functional control is configured to be built by a preset test case, and is configured to be associated with a corresponding target functional instruction through the custom module;
[0006] The CAN box is used for communication connection between the host computer and the ECU to be tested based on the CAN protocol, so as to send the target function instruction to the ECU to be tested so as to test the target function software in the ECU to be tested, and return the corresponding target test result to the host computer.
[0007] In a second aspect, an embodiment of the present invention further provides a bench rapid testing method based on the CAN protocol, wherein the device is applied to the host computer of the bench rapid testing system based on the CAN protocol, and the testing method comprises:
[0008] If an operation instruction of a functional control is detected, a target functional instruction corresponding to the functional control is called according to the operation instruction, and a target functional software of the ECU to be tested associated with the target functional instruction is determined;
[0009] Executing the target function instruction through the CAN box to determine the version of the corresponding target function software;
[0010] If the determined version of the target function software is the same as the preset correct version, determining whether the configuration information of the target function software is the same as the preset target configuration information;
[0011] If the configuration information of the target function software is the same as the preset target configuration information, controlling the ECU to be tested to run the target function software to obtain a target test result;
[0012] The target test result is received through the CAN box and an early warning analysis is performed.
[0013] In a third aspect, an embodiment of the present invention further provides a computer device, wherein the device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0014] Memory, used to store computer programs;
[0015] The processor is used to implement the steps of the bench rapid testing method based on the CAN protocol described in the second aspect when executing the program stored in the memory.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the bench rapid testing method based on the CAN protocol as described in the second aspect above are implemented.
[0017] The embodiment of the present invention provides a bench rapid testing system, method, device and medium based on the CAN protocol, wherein the system includes a host computer and a CAN box, wherein the host computer is used for bench testing, and includes a function control and a custom module; the function control is configured to be built by a preset test case, and is configured to be associated with a corresponding target function instruction through a custom module; the CAN box is used for the communication connection between the host computer and the ECU to be tested based on the CAN protocol, so as to send the target function instruction to the ECU to be tested so as to test the target function software in the ECU to be tested, and return the corresponding target test result to the host computer. The above-mentioned bench rapid testing system and method based on the CAN protocol can not only improve the test efficiency and test accuracy of the tester, but also effectively reduce the overall test cost and the technical requirements of the tester, especially it can take into account the flexibility of execution and the maintainability of the program, and effectively improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0019] Figure 1 A structural diagram of a CAN protocol-based rapid test bench system provided by an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a process flow of a CAN protocol-based rapid test bench method provided by an embodiment of the present invention;
[0021] Figure 3 Another schematic diagram of a process flow of a bench rapid testing method based on the CAN protocol provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of the structure of a bench rapid testing device based on the CAN protocol provided by an embodiment of the present invention;
[0023] Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0026] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0027] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0028] See also Figure 1 As shown in the figure, the embodiment of the present invention application provides a bench rapid test system based on the CAN protocol, and the bench rapid test system 100 based on the CAN protocol includes a host computer 110 and a CAN box 120. Among them, the host computer 110 is used for bench testing, and it includes a function control 111 and a custom module 112; the function control 111 is configured to be built by a preset test case, and is configured to be associated with a corresponding target function instruction through the custom module 112. The CAN box 120 is used for the communication connection between the host computer 110 and the ECU 130 to be tested based on the CAN protocol, so as to send the target function instruction to the ECU 130 to be tested, so as to test the target function software in the ECU to be tested, and return the corresponding target test result to the host computer 110.
[0029] Specifically, in this embodiment, the CAN (Controller Area Network) protocol is a serial communication protocol widely used in the fields of automobiles and industrial automation. The host computer 110 can be a user terminal or a server, etc., which is not specifically limited in this embodiment. The host computer 110 communicates with the external ECU 130 to be tested through the CAN box 120, that is, the communication signal that complies with the CAN protocol is transmitted through the CAN box, so that the host computer 110 performs relevant tests on the target functional software in the ECU 130 to be tested, and receives the target test results returned by the ECU 130 to be tested.
[0030] Among them, the host computer 110 may include a function control 111 and a custom module 112, that is, the function control 111 can be set according to the user's test requirements, that is, the function of the function control 111 can be limited by configuring the custom module 112. The host computer 110 can build the function control 111 of the corresponding function according to the test case used for testing, that is, when a certain product function of the ECU to be tested is to be tested, the function control 111 is built according to the set test case, and the configuration of the corresponding target function instruction is realized through the custom module 112. When the tester uses the function control 111, the target function instruction can be run, thereby realizing the test of the target function software of the ECU to be tested.
[0031] Therefore, it can improve the testing efficiency and accuracy of testers, effectively reduce the overall development cost, and improve the user experience.
[0032] In one embodiment, the custom module 112 of the bench rapid testing system based on the CAN protocol includes a custom variable 112a and a custom program sequence 112b, wherein the custom variable 112a is used to assign a value to a specific signal within a preset range; the custom program sequence 112b is used to determine a corresponding target calculation program sequence in combination with the assigned custom variable, and configure the determined target calculation program sequence into an executable target function instruction; wherein the target function instruction is associated with the corresponding function control 111.
[0033] Among them, the function control 111 can be linked with the custom variable 112a and the custom program sequence 112b, and the custom variable 112a can be used as a medium between the CAN (CANFD) signal and the function control 111 to complete the specific signal assignment or the specified content display, that is, the custom variable 112a can assign a value to a specific signal within a preset range, and the specific signal can be determined according to the function of the target function software in the ECU to be tested, which is not limited in this embodiment. At the same time, the custom program sequence 112b can do some calculations or specify regular sequential operations, that is, determine a corresponding target calculation program sequence in combination with the assigned custom variables, and configure the determined target calculation program sequence into an executable target function instruction; wherein, the target function instruction is an instruction to control a target function software to run according to the information determined by the custom variable, and the target function instruction is associated with the function control 111 after determination.
[0034] Therefore, when a target functional software needs to be tested, the relevant test cases need to be determined. The host computer can build relevant functional controls according to the test cases, and realize the relevant tests of the ECU to be tested by controlling the functional controls. That is, the functional controls are combined with the custom variables and custom program sequences in the custom module, which facilitates the testers to directly test the corresponding target functional software. Specifically, after a test case is turned into a functional control, these operations can be sent in order through the CAN box by clicking the functional control of the host computer. During this period, the host computer can also pay real-time attention to the expected phenomenon of the CAN signal.
[0035] In one embodiment, the test system 100 further includes a serial port tool 140 for realizing serial port information collection between the host computer 110 and the ECU to be tested. Among them, the serial port is a communication protocol for transmitting data between different devices. It is a point-to-point communication method that can only transmit data between two devices. It is mainly used for low-speed and low-capacity data transmission, such as control panels and sensors, etc., and can adopt synchronous or asynchronous transmission methods. In the test system, relevant serial port information collection can be realized through the serial port tool.
[0036] In one embodiment, the test system 100 further includes that the host computer 110 is configured with a first functional tool for building and implementing a functional control. For example, the first functional tool may be Vehicle Spy3, which is a tool that integrates functions such as diagnosis, node / ECU simulation, data acquisition, automatic testing, and vehicle network bus monitoring; in this embodiment, Vehicle Spy 3 is mainly used to build and implement the functions of the functional control. In addition, the host computer 110 may also have a Secure CRT Portable tool, which is mainly used for some necessary serial port information collection during the test process.
[0037] In one embodiment, the test system 100 further includes a display operation module. The display operation module is used to display the icons of the function controls for the user to select operations; the display operation module includes a display signal indicator light to display according to the corresponding target test results returned, wherein different function controls correspond to different display signal indicators. Through the display operation module, the tester can more conveniently control the test process, reduce the intervention in the internal programs of the relevant test programs and the target function software, and improve the test efficiency and user experience.
[0038] Therefore, the above-mentioned CAN protocol-based bench rapid testing system and method can not only improve the testing efficiency and accuracy of testers, but also effectively reduce the overall testing cost and the technical requirements of testers, especially taking into account the flexibility of execution and the maintainability of the program, effectively improving the user experience.
[0039] like Figure 2 As shown, in one embodiment, the bench rapid testing method based on the CAN protocol is applied to a host computer of a bench rapid testing system based on the CAN protocol, and the testing method includes steps S110 to S150.
[0040] Step S110: if an operation instruction of a functional control is detected, a target functional instruction corresponding to the functional control is called according to the operation instruction, and a target functional software of the ECU to be tested associated with the target functional instruction is determined.
[0041] In this embodiment, if the host computer detects the tester's operation instructions on the functional control, then the target functional instructions corresponding to the functional control can be called according to the operation instructions, so as to determine the target functional software of the ECU to be tested that is associated with the target functional instructions, that is, through the functional controls built and configured by custom modules and test cases, the corresponding tests can be performed on the target functional software of the ECU to be tested, and the functional controls can be flexibly configured according to the actual needs of the testers.
[0042] Step S120: executing the target function instruction through the CAN box to determine the version of the corresponding target function software.
[0043] In this embodiment, in order to achieve the accuracy of the test, the host computer needs to execute the target function instruction through the CAN box to determine the version of the corresponding target function software, and compare the version with the correct version of the target function software to be tested. If the version is incorrect, a test error will be reported, etc. If the version is correct, the next steps can be performed.
[0044] Step S130: If the determined version of the target function software is the same as the preset correct version, it is determined whether the configuration information of the target function software is the same as the preset target configuration information.
[0045] In this embodiment, if the determined version of the target function software is the same as the preset correct version, it is necessary to detect whether the configuration information of the target function software is the same as the preset target configuration information. If they are the same, the next detection can be performed. If they are not the same, an error may be reported.
[0046] Step S140: If the configuration information of the target function software is the same as the preset target configuration information, the ECU to be tested is controlled to run the target function software to obtain a target test result.
[0047] In this embodiment, if the configuration information of the target function software is the same as the preset target configuration information, the host computer can control the ECU under test to run the target function software to obtain the target test result when executing the target function instruction through the CAN box, so as to complete the test of the target function software.
[0048] Step S150, receiving the target test result through the CAN box and performing early warning analysis.
[0049] In this embodiment, the host computer can also receive the target test results from the ECU to be tested through the CAN box, so as to perform corresponding early warning analysis.
[0050] The above method can not only improve the test efficiency and test accuracy of testers, but also effectively reduce the overall test cost and the technical requirements of testers. In particular, it can take into account the flexibility of execution and the maintainability of the program, effectively improving the user experience.
[0051] In one embodiment, the host computer is configured with a first functional tool for building and implementing a functional control, the first functional tool includes a functional block, the functional block includes a preset Diag button, and the method further includes:
[0052] If the configuration information of the target function software is different from the preset target configuration information, the configuration information of the target function software is updated to the target configuration information through a preset Diag button in the function block of the first function tool.
[0053] The first functional tool may be Vehicle Spy 3, and the function block may include multiple functional parts, wherein the Diag button may be bound to a certain pre-set diagnostic service, and by clicking the button, Vehicle Spy 3 may send a corresponding diagnostic message. Therefore, the configuration information of the target functional software is updated to the target configuration information through the preset Diag button in the function block of the first functional tool, that is, the configuration of the target functional software is realized.
[0054] In one embodiment, the target function software is IACC software, and the test system also includes a display operation module, the display operation module includes a display signal indicator light, different function controls correspond to different display signal indicator lights, and the step of controlling the ECU under test to run the target function software to obtain the target test result includes: controlling the ECU under test to run the target function software to adjust the IACC indicator light signal to light up, receiving and reading the outgoing state of the ACC status signal returned by the ECU under test; adjusting the display signal indicator light corresponding to the function control in the display operation module to a state that matches the outgoing state of the ACC status signal.
[0055] That is, through the display operation module and the display signal indicator light in the display operation module, feedback display of the target function software test results can be realized when the target function software is tested, so that the tester can understand the specific performance of the target function software through the display signal indicator light.
[0056] In addition, IACC is an integrated adaptive cruise control, which belongs to L2 level autonomous driving. It uses multi-sensor fusion technology, integrates millimeter-wave radar, multi-function camera, etc. to perceive the current road environment, and controls the vehicle's automatic acceleration, deceleration and steering through power, braking and steering to keep the vehicle in the lane or follow the trajectory of the target vehicle in front to drive automatically. The full name of ACC in English is "Adaptive Cruise Control", which means "Adaptive Cruise Control" in Chinese. It is just adaptive cruise control, which is equivalent to L1 level autonomous driving.
[0057] Specifically, when the target functional software is the IACC software, it is determined whether the ACC outgoing state is correct when the IACC indicator light of the current version is on. The specific process of the method can be as follows: Figure 3 As shown, the following steps S210 to S260 are included. Among them,
[0058] Step S210, obtaining the current version number.
[0059] Among them, a host computer tool, namely a first function tool, is installed on the host computer. The host computer tool may be Vehicle Spy 3. In the function block in Vehicle Spy 3, a diag Job Action (Diag button) is called and a $22 service request message is sent, so as to read the corresponding DID to obtain the current version number.
[0060] Step S220: Check whether the current version number is consistent with the correct version number.
[0061] Among them, the correct version number is assigned to the variable appsignal_1, and the current version number corresponding to the obtained diagnostic response is compared with the correct version number of the variable appsignal_1. If the comparison is correct, go to step S230. If the comparison is wrong, the test is terminated.
[0062] Step S230, confirm whether the current configuration is IACC.
[0063] Among them, Diag Job Action is called to send $22 service message to read the current configuration information of IACC software, and the value of the correct configuration information of IACC software is assigned to variable appsignal_2, and the current configuration information corresponding to the obtained diagnostic response is compared with the correct configuration information in variable appsignal_2. If the comparison is correct, go to step S240. If the comparison is wrong, jump to step S230' to configure the correct configuration information for IACC software. Specifically, Diag JobAction is called to send diagnostic messages in the diagnostic safety unlocking order, and the correct configuration information in the correctly configured variable appsignal_2 is assigned to the $2E service to write the IACC configuration.
[0064] Step S240, sending an IACC indicator light signal to light up.
[0065] Among them, in the Function Block, Setvalue (the Setvalue function is used to set the value of a global variable or an element in a data block) is used to set ACC_IACC HWAMode=3 to light up the IACC indicator light to indicate the intelligent cruise state of the vehicle.
[0066] Step S250, reading the ACC status signal and determining whether it is equal to 1.
[0067] Among them, IP_ACC Interface Display Sts may be a state variable in a specific software or system, used to indicate the interface access control state. Assume that IP_ACC is an interface parameter, Interface is the interface name, Display is the action, and Sts is the state. This variable may indicate the state of the display operation on a certain interface. Therefore, in this embodiment, IP_ACC Interface Display Sts represents the ACC state signal, so it is determined whether the value of IP_ACC InterfaceDisplay Sts meets the requirements. If it meets the requirements, the variable value Flag=1, otherwise Flag=0, that is, the ACC state signal is represented by the variable value Flag. In addition, it is necessary to associate Flag with the Signal property of the function status display control, control different values corresponding to the Pass / Fail state display, associate the value of IP_ACC Interface Display Sts with the display control Signal, and pay attention to real-time display.
[0068] Step S260: If yes, it will display "outgoing" and light up the green control to indicate approval.
[0069] If the variable value Flag=1 after the display is sent out, the green control is lit to indicate passing, that is, the corresponding display signal indicator light is green, indicating passing. If not, go to step S260', if the red control is lit after the display is sent out to indicate failure, that is, the variable value Flag=0, indicating that the test has failed.
[0070] In summary, by operating the functional controls instead of the operations that require finding signals and assigning values one by one, the efficiency of testers in executing use cases is improved and it is less prone to errors. Compared with the original signal operations, it is more convenient and easier to understand, so it also reduces the requirements for testers and improves testing efficiency. In the actual test execution process, relatively small custom program sequences can be modified more conveniently, which can relatively well balance the flexibility of execution and the maintainability of the program, thereby improving the user experience.
[0071] The embodiment of the present invention also provides a bench rapid test device based on the CAN protocol, which can be configured in the host computer of the bench rapid test system based on the CAN protocol, and is used to execute any embodiment of the aforementioned bench rapid test method based on the CAN protocol. Figure 4 , Figure 4 A schematic block diagram of a CAN protocol-based rapid testing device for a bench provided in an embodiment of the present invention.
[0072] like Figure 4 As shown, the bench rapid testing device 400 based on the CAN protocol includes a call detection unit 410 , a version determination unit 420 , a configuration determination unit 430 , an operation processing unit 440 and a test analysis unit 450 .
[0073] The calling detection unit 410 is used to call the target function instruction corresponding to the function control according to the operation instruction if an operation instruction of the function control is detected, and determine the target function software of the ECU to be tested associated with the target function instruction.
[0074] In this embodiment, if the host computer detects the tester's operation instructions on the functional control, then the target functional instructions corresponding to the functional control can be called according to the operation instructions, so as to determine the target functional software of the ECU to be tested that is associated with the target functional instructions, that is, through the functional controls built and configured by custom modules and test cases, the corresponding tests can be performed on the target functional software of the ECU to be tested, and the functional controls can be flexibly configured according to the actual needs of the testers.
[0075] The version determination unit 420 is used to execute the target function instruction through the CAN box to determine the version of the corresponding target function software.
[0076] In this embodiment, in order to achieve the accuracy of the test, the host computer needs to execute the target function instruction through the CAN box to determine the version of the corresponding target function software, and compare the version with the correct version of the target function software to be tested. If the version is incorrect, a test error will be reported, etc. If the version is correct, the next steps can be performed.
[0077] The configuration determination unit 430 is configured to determine whether the configuration information of the target function software is the same as the preset target configuration information if the determined version of the target function software is the same as the preset correct version.
[0078] In this embodiment, if the determined version of the target function software is the same as the preset correct version, it is necessary to detect whether the configuration information of the target function software is the same as the preset target configuration information. If they are the same, the next detection can be performed. If they are not the same, an error may be reported.
[0079] The operation processing unit 440 is used to control the ECU to be tested to run the target function software to obtain a target test result if the configuration information of the target function software is the same as the preset target configuration information.
[0080] In this embodiment, if the configuration information of the target function software is the same as the preset target configuration information, the host computer can control the ECU under test to run the target function software to obtain the target test result when executing the target function instruction through the CAN box, so as to complete the test of the target function software.
[0081] The test analysis unit 450 is used to receive the target test result through the CAN box and perform early warning analysis.
[0082] In this embodiment, the host computer can also receive the target test results from the ECU to be tested through the CAN box, so as to perform corresponding early warning analysis.
[0083] Since this bench rapid testing device based on the CAN protocol is a device corresponding to the bench rapid testing method based on the CAN protocol, the relevant contents of the device will not be repeated separately, and reference may be made to the contents described in the bench rapid testing method based on the CAN protocol.
[0084] The above-mentioned bench rapid test device based on CAN protocol can be realized by a computer program, and the computer program can be implemented in Figure 5 Runs on the computer device shown.
[0085] See also Figure 5 , Figure 5 : is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a user terminal or a server for executing a bench rapid test method based on the CAN protocol to perform a bench rapid test based on the CAN protocol according to a bench rapid test module based on the CAN protocol imported into an operating system.
[0086] See also Figure 5 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a communication bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0087] The storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a bench rapid test method based on the CAN protocol, wherein the storage medium 503 can be a volatile storage medium or a non-volatile storage medium.
[0088] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0089] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a bench rapid testing method based on the CAN protocol.
[0090] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0091] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned bench rapid testing method based on the CAN protocol.
[0092] Those skilled in the art will understand that Figure 5 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 5 The embodiments shown are consistent and will not be described again here.
[0093] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0094] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned bench rapid testing method based on the CAN protocol are implemented.
[0095] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0096] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0098] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for 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 method described in each embodiment of the present invention. The aforementioned computer-readable 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, Read-Only Memory), a magnetic disk or an optical disk.
[0100] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A bench rapid test system based on CAN protocol, characterized in that: The system includes a host computer and a CAN box, wherein: The host computer is used for bench testing, and includes a functional control and a custom module; the functional control is configured to be built by a preset test case, and is configured to be associated with a corresponding target functional instruction through the custom module; The CAN box is used for communication connection between the host computer and the ECU to be tested based on the CAN protocol, so as to send the target function instruction to the ECU to be tested so as to test the target function software in the ECU to be tested, and return the corresponding target test result to the host computer.
2. The CAN protocol-based rapid test bench system according to claim 1, characterized in that: The custom module includes custom variables and custom program sequences, wherein: The custom variable is used to assign a value to a specific signal within a preset range; The custom program sequence is used to determine a corresponding target computing program sequence in combination with the assigned custom variables, and to combine and configure the determined target computing program sequence into executable target function instructions; Wherein, the target function instruction is associated with the corresponding function control.
3. The CAN protocol-based rapid test bench system according to claim 1, characterized in that: The test system further comprises: The serial port tool is used to realize serial port information collection between the host computer and the ECU to be tested.
4. The CAN protocol-based rapid test bench system according to claim 1, characterized in that: The host computer is configured with a first functional tool for building and implementing a functional control.
5. The CAN protocol-based rapid test bench system according to claim 4 is characterized in that: The test system also includes a display operation module. The display operation module is used to display the icons of the functional controls for the user to select operations; the display operation module includes a display signal indicator light to display according to the corresponding target test results returned, wherein different functional controls correspond to different display signal indicator lights.
6. A bench rapid testing method based on CAN protocol, characterized in that: The test method is applied to the host computer of the CAN protocol-based bench rapid test system as shown in claim 1, and the test method includes: If an operation instruction of a functional control is detected, a target functional instruction corresponding to the functional control is called according to the operation instruction, and a target functional software of the ECU to be tested associated with the target functional instruction is determined; Executing the target function instruction through the CAN box to determine the version of the corresponding target function software; If the determined version of the target function software is the same as the preset correct version, determining whether the configuration information of the target function software is the same as the preset target configuration information; If the configuration information of the target function software is the same as the preset target configuration information, controlling the ECU to be tested to run the target function software to obtain a target test result; The target test result is received through the CAN box and an early warning analysis is performed.
7. The CAN protocol-based bench rapid testing method according to claim 6, characterized in that: The host computer is configured with a first functional tool for building and implementing a functional control, the first functional tool includes a functional block, the functional block includes a preset Diag button, and the method further includes: If the configuration information of the target function software is different from the preset target configuration information, the configuration information of the target function software is updated to the target configuration information through a preset Diag button in the function block of the first function tool.
8. The bench rapid testing method based on CAN protocol according to claim 7 is characterized in that: The target function software is IACC software, the test system further includes a display operation module, the display operation module includes a display signal indicator light, different function controls correspond to different display signal indicator lights, and the step of controlling the ECU to be tested to run the target function software to obtain a target test result includes: Controlling the ECU under test to run the target function software to adjust the IACC indicator light signal to light up, and receiving and reading the outgoing state of the ACC state signal returned by the ECU under test; The display signal indicator light corresponding to the function control in the display operation module is adjusted to a state matching the outgoing state of the ACC state signal.
9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the bench rapid testing method based on the CAN protocol described in any one of claims 6 to 8 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the bench rapid testing method based on the CAN protocol as described in any one of claims 6 to 8 are implemented.
