Vehicle CAN signal transmitting and receiving test method and system

By generating source signal tables and target signal tables, writing random numbers and judging write results on the real-time terminal, the complexity and accuracy of vehicle CAN signal routing frame testing problems are solved, and the testing efficiency and accuracy are improved.

CN119781350AActive Publication Date: 2025-04-08ROX MOTOR TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411928550.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-08
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In the prior art, the reception methods of vehicle CAN signal routing frames are complex in relationships, resulting in high difficulty in manual testing, low accuracy and efficiency.

Method used

The upper computer uses the routing frame test model to generate a source signal table corresponding to the transmitting end of the vehicle's multiple CAN signal and a multiple target signal table corresponding to the receiving end respectively. The transmitting frame and the receiving frame are separated in the routing table. The real-time terminal writes the random number to the target controller and judges that the writing is successful based on the writing result. The upper computer obtains the received frame signal and compares it with the random number to determine the test result.

Benefits of technology

It reduces the difficulty of vehicle CAN signal transmission and reception tests, and improves the accuracy and efficiency of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781350A_ABST
    Figure CN119781350A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle CAN signal transmitting and receiving test method and system, and the method comprises the steps: enabling an upper computer end to generate a source signal table corresponding to a transmitting end and a plurality of target signal tables corresponding to a receiving end based on a test routing table through a routing frame test model, random numbers corresponding to a plurality of sending frames in the source signal table are sent to a real time end; the real-time terminal writes the random number into a target controller of the to-be-tested vehicle, judges whether the target controller successfully writes the random number in response to a received write-in result, and sends a judgment result to the upper computer terminal; and the upper computer end responds to the determination of writing success, obtains numerical values corresponding to a plurality of receiving frame signals sent by the target controller based on the target signal table, compares the numerical values with the corresponding random numbers, and determines a test result of the CAN signal transceiving test of the to-be-tested vehicle. According to the method, the accuracy and efficiency of the vehicle CAN signal receiving and transmitting test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle hardware-in-the-loop testing, and in particular to a vehicle CAN signal transceiver testing method and system. Background Art

[0002] In the vehicle's hardware in the loop (HIL) testing, the real-time hardware runs the controlled object, and the controlled object is controlled by the real controller. Since HIL testing is conducted in the laboratory under extreme working conditions, it is relatively safer and less expensive than real vehicle testing. It can fully test the controller before the control algorithm is deployed in the vehicle.

[0003] At present, the transmission and reception tests of the routing frames of vehicle CAN signals are generally carried out by manual testing. However, the relationships among the receiving modes of the routing frames of vehicle CAN signals are complex and intertwined. Manual testing requires manual search for the corresponding transmission and reception relationships of CAN signals according to the routing table. Moreover, the number of tests of the routing frames of CAN signals is extremely large, which may include thousands of transmission frames and reception frames of CAN signals, thus increasing the difficulty of the test. In addition, the forwarding of the routing frames of CAN signals also requires manual assignment according to the definition of DBC to find the corresponding reception frames, thus reducing the accuracy of the transmission and reception tests of vehicle CAN signals, thereby reducing the efficiency of the transmission and reception tests of vehicle CAN signals. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a vehicle CAN signal transceiver test method and system, wherein the upper computer uses the routing frame test model to generate a source signal table corresponding to the sending end of the vehicle's multi-channel CAN signal and multiple target signal tables corresponding to the receiving end, so as to separate the sending frame and the receiving frame in the routing table, thereby reducing the test difficulty. The real-time machine sends the random number corresponding to the sending frame in the source signal table sent by the upper computer to the target controller set in the vehicle to be tested, and determines whether the writing is successful based on the writing result of the target controller. When determining that the writing is successful, the upper computer obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller and compares them with the random numbers in the source signal table to obtain the test result of the CAN signal transceiver test on the vehicle to be tested, thereby improving the accuracy of the vehicle CAN signal transceiver test, thereby improving the efficiency of the vehicle CAN signal transceiver test.

[0005] The embodiment of the present application provides a vehicle CAN signal transceiver test method, which is applied to a vehicle CAN signal transceiver test system; wherein the system includes a host computer end and a real-time computer end, and the method includes:

[0006] The host computer generates a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively based on a preset test routing table corresponding to the multi-channel CAN signals of the vehicle to be tested, and sends random numbers corresponding to a plurality of transmission frames in the source signal table to the real-time machine end;

[0007] The real-time machine end writes the received random number to a target controller disposed in the vehicle to be tested, and in response to receiving a write result sent by the target controller, determines whether the target controller has successfully written the random number based on the write result, and sends the determination result to the host computer end;

[0008] In response to determining that the judgment result is a successful write, the upper computer obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller based on the target signal table, and compares the numerical values ​​with the corresponding random numbers respectively to obtain the comparison results to determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

[0009] Furthermore, the test routing table corresponding to the pre-set multiple CAN signals is used to generate a source signal table corresponding to the transmitting end and multiple target signal tables corresponding to the receiving end respectively, using a preset routing frame test model, including:

[0010] In a pre-set test routing table corresponding to the multi-channel CAN signals, determine the CAN signal information, transmission frames, signal domains and random numbers corresponding to multiple transmitting ends, and the CAN signal information, reception frames, signal domains and target data corresponding to multiple receiving ends;

[0011] Based on the CAN signal information, transmission frames, signal domains and random numbers respectively corresponding to the multiple transmission ends, a source signal table corresponding to the transmission end is generated using a preset routing frame test model;

[0012] Based on the CAN signal information, receiving frames, signal domains and target data respectively corresponding to the multiple receiving ends, a target signal table respectively corresponding to the multiple receiving ends is generated using a preset routing frame test model.

[0013] Further, in response to receiving the write result sent by the target controller, judging whether the target controller has successfully written the random number based on the write result includes:

[0014] In response to receiving the write result sent by the target controller, determining a write feedback value obtained by the target controller writing each of the random numbers, and judging whether each of the write feedback values ​​is consistent with the random number;

[0015] When each of the write feedback values ​​is consistent with the corresponding random number, determining that the target controller successfully writes the random number;

[0016] When at least one of the write feedback values ​​is inconsistent with the corresponding random number, it is determined that the target controller fails to write the random number.

[0017] Further, in response to determining that the judgment result is a write success, obtaining, based on the target signal table, values ​​corresponding to a plurality of received frame signals sent by the target controller includes:

[0018] receiving a plurality of reception frame signals sent by the target controller to write the random number;

[0019] In response to determining that the judgment result is a write success, based on the received frames in the target signal table, numerical values ​​corresponding to the multiple received frame signals are obtained.

[0020] Further, the comparing the numerical values ​​with the corresponding random numbers to obtain the comparison results to determine the test results of the CAN signal receiving and sending test on the vehicle to be tested includes:

[0021] Compare the numerical values ​​corresponding to the plurality of received frame signals with the random numbers corresponding to the plurality of sent frames in the source signal table respectively, and obtain the comparison result of each numerical value;

[0022] Based on the comparison result, a test result of the CAN signal receiving and sending test on the vehicle to be tested is determined.

[0023] The embodiment of the present application also provides a vehicle CAN signal transceiver test system, the system comprising:

[0024] The host computer end is used to generate a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end;

[0025] The real-time machine end is used to write the received random number into a target controller arranged in the vehicle to be tested, and in response to receiving a write result sent by the target controller, based on the write result, determine whether the target controller has successfully written the random number, and send the determination result to the host computer end;

[0026] In response to determining that the judgment result is a successful write, the host computer end is also used to obtain, based on the target signal table, numerical values ​​corresponding to multiple receiving frame signals sent by the target controller, and compare the numerical values ​​with the corresponding random numbers respectively to obtain comparison results to determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

[0027] Further, the host computer terminal includes:

[0028] A table generation module is used for generating a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end;

[0029] A signal acquisition module, configured to, in response to determining that the judgment result is a successful write, acquire, based on the target signal table, values ​​corresponding to a plurality of received frame signals sent by the target controller;

[0030] The numerical value comparison module is used to compare the numerical value with the corresponding random number respectively to obtain a comparison result to determine the test result of the CAN signal receiving and sending test on the vehicle to be tested.

[0031] Further, when the table generation module is used to generate a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively based on the preset test routing table corresponding to the multi-channel CAN signal and using a preset routing frame test model, the table generation module is used to:

[0032] In a pre-set test routing table corresponding to the multi-channel CAN signals, determine the CAN signal information, transmission frames, signal domains and random numbers corresponding to multiple transmitting ends, and the CAN signal information, reception frames, signal domains and target data corresponding to multiple receiving ends;

[0033] Based on the CAN signal information, transmission frames, signal domains and random numbers respectively corresponding to the multiple transmission ends, a source signal table corresponding to the transmission end is generated using a preset routing frame test model;

[0034] Based on the CAN signal information, receiving frames, signal domains and target data respectively corresponding to the multiple receiving ends, a target signal table respectively corresponding to the multiple receiving ends is generated using a preset routing frame test model.

[0035] Further, when the signal acquisition module is used to obtain the numerical values ​​corresponding to the multiple received frame signals sent by the target controller based on the target signal table in response to determining that the judgment result is a successful write, the signal acquisition module is used to:

[0036] receiving a plurality of reception frame signals sent by the target controller to write the random number;

[0037] In response to determining that the judgment result is a write success, based on the received frames in the target signal table, numerical values ​​corresponding to the multiple received frame signals are obtained.

[0038] Further, when the numerical value comparison module is used to compare the numerical value with the corresponding random number respectively to obtain a comparison result to determine the test result of the CAN signal transceiver test on the vehicle to be tested, the numerical value comparison module is used to:

[0039] Compare the numerical values ​​corresponding to the plurality of received frame signals with the random numbers corresponding to the plurality of sent frames in the source signal table respectively, and obtain the comparison result of each numerical value;

[0040] Based on the comparison result, a test result of the CAN signal receiving and sending test on the vehicle to be tested is determined.

[0041] Further, the real-time machine terminal includes:

[0042] A signal writing module is used to write the received random number into a target controller arranged in the vehicle to be tested.

[0043] The write judgment module is used to respond to receiving the write result sent by the target controller, judge whether the target controller has successfully written the random number based on the write result, and send the judgment result to the host computer.

[0044] Further, when the write judgment module is used to judge whether the target controller has successfully written the random number based on the write result in response to receiving the write result sent by the target controller, the write judgment module is used to:

[0045] In response to receiving the write result sent by the target controller, determining a write feedback value obtained by the target controller writing each of the random numbers, and judging whether each of the write feedback values ​​is consistent with the random number;

[0046] When each of the write feedback values ​​is consistent with the corresponding random number, determining that the target controller successfully writes the random number;

[0047] When at least one of the write feedback values ​​is inconsistent with the corresponding random number, it is determined that the target controller fails to write the random number.

[0048] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the vehicle CAN signal receiving and sending test method as described above are performed.

[0049] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle CAN signal receiving and sending test method as described above are executed.

[0050] The vehicle CAN signal transceiver test method and system provided in the embodiment of the present application are applied to the vehicle CAN signal transceiver test system; wherein the system includes a host computer end and a real-time machine end, and the method includes: the host computer end generates a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end based on a preset test routing table corresponding to the multi-channel CAN signal of the vehicle to be tested, and sends the random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end; the real-time machine The end writes the received random number to the target controller set in the vehicle to be tested, and in response to receiving the write result sent by the target controller, based on the write result, determines whether the target controller has successfully written the random number, and sends the judgment result to the host computer end; in response to determining that the judgment result is a successful write, the host computer end obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller based on the target signal table, and compares the numerical values ​​with the corresponding random numbers respectively to obtain the comparison results, so as to determine the test result of the CAN signal reception and transmission test of the vehicle to be tested.

[0051] Compared with the method of manually testing the transmission and reception of the routing frames of the vehicle CAN signals in the prior art, the host computer uses the routing frame test model to generate a source signal table corresponding to the transmitting end of the vehicle's multi-channel CAN signals and multiple target signal tables corresponding to the receiving end, so as to separate the transmission frame and the reception frame in the routing table, thereby reducing the difficulty of the test. The real-time machine sends the random number corresponding to the transmission frame in the source signal table sent by the host computer to the target controller set in the vehicle to be tested, and determines whether the writing is successful according to the writing result of the target controller. When determining that the writing is successful, the host computer obtains the numerical values ​​corresponding to the multiple reception frame signals sent by the target controller and compares them with the random numbers in the source signal table to obtain the test result of the CAN signal transmission and reception test on the vehicle to be tested, thereby improving the accuracy of the vehicle CAN signal transmission and reception test, and further improving the efficiency of the vehicle CAN signal transmission and reception test.

[0052] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments 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.

[0054] Figure 1 A flow chart of a vehicle CAN signal receiving and sending test method provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of receiving and sending a vehicle CAN signal provided in an embodiment of the present application;

[0056] Figure 3 One of the structural schematic diagrams of a vehicle CAN signal transceiver test system provided in an embodiment of the present application;

[0057] Figure 4 The second structural diagram of a vehicle CAN signal receiving and transmitting test system provided in an embodiment of the present application;

[0058] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0060] Through research, it is found that, at present, the transmission and reception tests of the routing frames of vehicle CAN signals are generally carried out through manual testing. However, the relationships among the reception methods of the routing frames of vehicle CAN signals are complex and intertwined. Manual testing requires manual search for the corresponding transmission and reception relationships of CAN signals based on the routing table. Moreover, the number of tests on the routing frames of CAN signals is extremely large, which may include thousands of transmission frames and reception frames of CAN signals, thus increasing the difficulty of the test. In addition, the forwarding of the routing frames of CAN signals also requires manual assignment according to the definition of DBC to find the corresponding reception frames, thus reducing the accuracy of the transmission and reception tests of vehicle CAN signals, thereby reducing the efficiency of the transmission and reception tests of vehicle CAN signals.

[0061] Based on this, an embodiment of the present application provides a vehicle CAN signal transceiver test method, in which the upper computer uses the routing frame test model to generate a source signal table corresponding to the sending end of the vehicle's multi-channel CAN signal and multiple target signal tables corresponding to the receiving end, so as to separate the sending frame and the receiving frame in the routing table, thereby reducing the test difficulty. The real-time machine sends the random number corresponding to the sending frame in the source signal table sent by the upper computer to the target controller set in the vehicle to be tested, and determines whether the writing is successful based on the writing result of the target controller. When determining that the writing is successful, the upper computer obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller and compares them with the random numbers in the source signal table to obtain the test result of the CAN signal transceiver test on the vehicle to be tested, thereby improving the accuracy of the vehicle CAN signal transceiver test, thereby improving the efficiency of the vehicle CAN signal transceiver test.

[0062] See also Figure 1 , Figure 1 This is a flow chart of a vehicle CAN signal receiving and transmitting test method provided in an embodiment of the present application. Figure 1 As shown in , the vehicle CAN signal transceiver test method provided in the embodiment of the present application is generally applied to a vehicle CAN signal transceiver test system, wherein the system may include a host computer end and a real-time computer end, and the method includes:

[0063] It should be noted that the embodiments of the present application can be applied to hardware-in-the-loop (HIL) testing of vehicles, and the hardware-in-the-loop testing can include the following aspects.

[0064] Through real-time simulation, a high-precision mathematical model is created to simulate the behavior of the controlled object. This model usually includes the dynamic characteristics of the physical system, such as mechanical, electrical or thermodynamic characteristics, and can be run under real-time conditions.

[0065] Interface and communication, the hardware-in-the-loop test system can provide the necessary interfaces to connect to the vehicle's controller hardware (VCU). These interfaces support various types of signals, including analog, digital, PWM (pulse width modulation), CAN bus and other communication protocols.

[0066] In closed-loop testing, the output of the controller acts directly on the simulated environment, and the feedback of the simulated environment is returned to the controller as input, forming a closed-loop control system, which can accurately reproduce the interaction process in the real world.

[0067] Data acquisition and analysis, during the entire test process, all relevant signals will be recorded for subsequent data analysis and report generation.

[0068] In the embodiment of the present application, the vehicle CAN signal transceiver test system may include a host computer end and a real-time machine end; wherein, the host computer end may include at least one host computer device, and the host computer refers to a computer running a high-level software application program for managing and monitoring the operation of the lower-level device or system. It may be an ordinary personal computer (PC), workstation or server.

[0069] The real-time machine end may include at least one real-time machine device, where the real-time machine refers to a dedicated computing platform that can execute tasks according to strict time constraints to ensure that key tasks are completed within a specified time window.

[0070] In the vehicle CAN signal transceiver test system, the host computer and the real-time machine usually work together through a network connection. The host computer is responsible for high-level logic processing, user interaction and non-real-time tasks, while the real-time machine focuses on real-time control and data processing.

[0071] On the other hand, the host computer can be seen as the "brain", responsible for planning and decision-making; the real-time machine is the "hands and feet", responsible for quickly executing specific actions. This division of labor improves the efficiency and reliability of the entire system.

[0072] In hardware-in-the-loop (HIL) testing, the host computer can run a simulation model to simulate environmental changes in the real world, while the real-time machine acts as the controller under test and responds in real time based on these simulated conditions.

[0073] S101. The host computer generates a source signal table corresponding to the transmitting end and multiple target signal tables corresponding to the receiving end for the receiving end and the transmitting end corresponding to the multiple CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multiple CAN signals, and uses a preset routing frame test model to generate a source signal table corresponding to the transmitting end and multiple target signal tables corresponding to the receiving end, and sends random numbers corresponding to multiple sending frames in the source signal table to the real-time machine.

[0074] In the embodiment of the present application, the multiple CAN signals may include PTDomain, EPCAN, PTCAN and CHCAN.

[0075] Among them, PTDomain (Powertrain Domain) refers to the powertrain domain, which includes functions such as engine management and transmission control, and is crucial to vehicle performance and fuel efficiency.

[0076] EPCAN (Electronic Powertrain CAN) refers to the vehicle electronic powertrain system CAN signal, which is suitable for communication between components related to the powertrain, such as the engine, transmission, motor (in electric vehicles or hybrid vehicles), battery management system, etc.

[0077] PTCAN (Powertrain CAN) refers to a CAN signal suitable for high-speed data exchange between powertrain-related components, such as the engine control module (ECM), automatic transmission control module (TCM), etc.

[0078] CHCAN (Chassis CAN) refers to a chassis CAN signal, which is mainly used for communication between components of the chassis system, such as the braking system, suspension control system, etc. Since the performance of the chassis system directly affects the safety and driving experience of the vehicle, CHCAN provides a reliable communication platform to ensure the coordinated work of these key systems.

[0079] For further information, see Figure 2 , Figure 2 A schematic diagram of the transmission and reception of a vehicle CAN signal provided in an embodiment of the present application. Figure 2As shown in the figure, the relationship between the receiving modes of the vehicle CAN signal routing frames is complex and intertwined. The multi-channel CAN signals including PTDomain, EPCAN, PTCAN and CHCAN can be respectively used as the receiving end and the sending end corresponding to the multi-channel CAN signals of the vehicle to be tested. Therefore, each CAN signal can be used as a sending end to send routing frame signals (sending frames) to the other three CAN signals. At the same time, each CAN signal can be used as a receiving end to receive the routing frame signals (receiving frames) sent by the other three CAN signals.

[0080] In an embodiment of the present application, the test routing table corresponding to the multiple CAN signals can be specifically set according to actual test requirements, relevant industry standards and historical experimental data; the test routing table may include but is not limited to the signal content and signal names corresponding to the transmitter and receiver of multiple different CAN data.

[0081] Among them, the preset routing frame test model can be obtained through model training based on the data and signal addresses corresponding to the CAN signal and the mutual transmission and reception logic of the CAN signal.

[0082] In one embodiment of the present application, in a specific implementation, the step of generating a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively based on the preset test routing table corresponding to the multi-channel CAN signal in step S101 using a preset routing frame test model may include:

[0083] S1011. In a pre-set test routing table corresponding to the multiple CAN signals, determine the CAN signal information, transmission frames, signal domains and random numbers corresponding to multiple transmitting ends, as well as the CAN signal information, reception frames, signal domains and target data corresponding to multiple receiving ends.

[0084] In the embodiment of the present application, the random number corresponds to the sending frame, and the random number can be obtained by converting the sending frame according to the definition in the preset DBC file.

[0085] The DBC (Database Container) file is a file used to define the format and attributes of messages and signals in the CAN communication protocol, and is usually used in the automotive and industrial automation fields to ensure compatibility and interoperability between devices from different manufacturers.

[0086] Here, the sending frame refers to the routing frame data created by the source device (for example, a computer, router or other network device) and prepared to be transmitted to the target device through the network; the receiving frame is relative to the sending frame, and represents the routing frame data received at the network interface layer.

[0087] In this step, information identification is performed on the test routing table corresponding to the multiple CAN signals, so as to determine the CAN signal information, transmission frame, signal domain and random number corresponding to the transmitting end in the test routing table for multiple transmitting ends.

[0088] Furthermore, for multiple receiving ends, CAN signal information, receiving frames, signal domains and target data corresponding to the receiving ends are determined in the test routing table.

[0089] S1012. Based on the CAN signal information, transmission frames, signal domains and random numbers respectively corresponding to the multiple transmission ends, a source signal table corresponding to the transmission end is generated using a preset routing frame test model.

[0090] In this step, the preset routing frame test model is used to generate the CAN signal information, transmission frame, signal domain and random number corresponding to the determined transmitting end into a source signal table corresponding to the transmitting end.

[0091] Here, the multiple CAN signals including PTDomain, EPCAN, PTCAN and CHCAN can be used as transmitters respectively, and a generated source signal table may include the CAN signal information, transmission frame, signal domain and random number corresponding to each CAN signal as the transmitter; wherein the CAN signal information may include the CAN signal content and the CAN signal name.

[0092] Illustratively, an example of a source signal table is shown in the following table.

[0093]

[0094] In this way, a source signal table including multiple CAN signals as the relevant data and information of the sending end is generated, and the source signal table is sent to the real-time machine to be written into the target controller of the vehicle to be tested through the real-time machine. This can solve the problem of excessive complexity of the receiving and transmitting test caused by too many sending ends, so as to improve the efficiency of the CAN signal receiving and transmitting test.

[0095] S1013. Based on the CAN signal information, receiving frames, signal domains and target data respectively corresponding to the multiple receiving ends, a preset routing frame test model is used to generate target signal tables respectively corresponding to the multiple receiving ends.

[0096] In this step, a preset routing frame test model is used to generate multiple target signal tables corresponding to multiple receiving ends based on the CAN signal information, receiving frames, signal domains and target data corresponding to the determined receiving ends.

[0097] Here, the multiple CAN signals including PTDomain, EPCAN, PTCAN and CHCAN can be used as receiving ends respectively, each receiving end can correspond to a target signal table, and each target signal table can include the CAN signal information, receiving frame, signal domain and target data corresponding to the receiving end.

[0098] Illustratively, an example of a target signal table is shown in the following table.

[0099]

[0100] In this way, when receiving the receiving frame signal sent by the target controller of the vehicle to be tested, the receiving frame signal can be compared based on a target signal table corresponding to each receiving end to improve the accuracy and efficiency of the CAN signal receiving and sending test.

[0101] S102, the real-time machine end writes the received random number to the target controller set in the vehicle to be tested, and in response to receiving the write result sent by the target controller, based on the write result, determines whether the target controller has successfully written the random number, and sends the judgment result to the host computer end.

[0102] In this step, the real-time machine end writes all the random numbers corresponding to the received multiple transmission frames to the target controller set in the vehicle to be tested through Ethernet communication, and after receiving the write result sent by the target controller, it determines whether the target controller has successfully written the random numbers, obtains the judgment result, and sends the judgment result to the host computer end through XCP communication.

[0103] In one embodiment of the present application, in a specific implementation, in response to receiving the write result sent by the target controller in step S102, the step of determining whether the target controller has successfully written the random number based on the write result may include:

[0104] S1021. In response to receiving the write result sent by the target controller, determine a write feedback value obtained by the target controller writing each of the random numbers, and judge whether each of the write feedback values ​​is consistent with the random number.

[0105] In this step, when it is specifically implemented, first, after the target controller is written with random numbers by the real-time machine, the target controller will send the write result of each written random number to the real-time machine; then, the real-time machine determines the write feedback value obtained by the target controller writing each random number in response to receiving the write result of each random number sent by the target controller; finally, the write feedback value of each random number is compared with the random number to determine whether each write feedback value is consistent with the corresponding random number.

[0106] S1022: When each of the write feedback values ​​is consistent with the corresponding random number, determine that the target controller writes the random number successfully.

[0107] In this step, when all the write feedback values ​​sent by the target controller to the real-time machine are consistent with the random numbers in the corresponding source signal table, it is determined that the target controller has successfully written the random numbers.

[0108] S1023: When at least one of the write feedback values ​​is inconsistent with the corresponding random number, determine that the target controller fails to write the random number.

[0109] In this step, when at least one of all the write feedback values ​​sent by the target controller to the real-time machine is inconsistent with the random number in the corresponding source signal table, it is determined that the target controller fails to write the random number.

[0110] S103. In response to determining that the judgment result is a successful write, the host computer obtains, based on the target signal table, numerical values ​​corresponding to multiple receiving frame signals sent by the target controller, and compares the numerical values ​​with the corresponding random numbers respectively to obtain comparison results to determine the test results of the CAN signal receiving and sending test of the vehicle to be tested.

[0111] In an embodiment of the present application, after the host computer sends the random number corresponding to the frame sent in the source signal table that needs to be written into the target controller to the real-time machine end, the host computer end needs to first respond to the judgment result sent by the real-time machine end indicating successful writing, and then obtain the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller, so as to further compare the numerical values ​​with the corresponding random numbers respectively, obtain the comparison results, and then determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

[0112] Furthermore, the host computer determines the comparison result between the random number corresponding to each sending frame in the source signal table and the receiving frames in multiple target signal tables as the test result of the CAN signal receiving and sending test on the vehicle to be tested, and generates a corresponding test report based on the test result.

[0113] In one embodiment of the present application, in a specific implementation, in response to determining that the judgment result is a successful write in step S103, based on the target signal table, the step of obtaining the values ​​corresponding to the multiple received frame signals sent by the target controller may include:

[0114] S1031. Receive a plurality of receiving frame signals sent by the target controller to write the random number.

[0115] In this step, after all the random numbers are written into the target controller, the target controller sends multiple receiving frame signals obtained by writing the random numbers to the host computer end; the host computer end receives the multiple receiving frame signals and hangs up, waiting for the judgment result sent by the real-time machine.

[0116] S1032. In response to determining that the judgment result is a write success, based on the received frames in the target signal table, obtain numerical values ​​corresponding to the multiple received frame signals.

[0117] In this step, when it is determined that the random number written into the target controller is written successfully, based on the target signal table corresponding to the receiving end of each CAN signal, according to the information of the received frame signal in each target signal table, the numerical value corresponding to each received frame signal is obtained.

[0118] In one embodiment of the present application, in a specific implementation, the step of comparing the numerical values ​​with the corresponding random numbers in step S103 to obtain a comparison result to determine the test result of the CAN signal receiving and sending test of the vehicle to be tested may include:

[0119] S1033, respectively compare the numerical values ​​corresponding to the multiple received frame signals with the random numbers corresponding to the multiple sent frames in the source signal table to obtain a comparison result for each of the numerical values.

[0120] In this step, the numerical value corresponding to the received frame signal corresponding to the receiving end of each CAN signal is respectively compared with the random number corresponding to each sent frame in the source signal table to obtain the comparison result of the numerical value corresponding to each received frame signal.

[0121] S1034. Based on the comparison result, determine the test result of the CAN signal receiving and sending test of the vehicle to be tested.

[0122] In this step, the comparison result of the numerical value corresponding to each received frame signal and the transmission frame corresponding to the received frame signal and its random number are determined as the test result of the CAN signal receiving and sending test for the vehicle to be tested.

[0123] The vehicle CAN signal transceiver test method provided in the embodiment of the present application uses a routing frame test model to generate a source signal table corresponding to the sending end of the vehicle's multi-channel CAN signal and multiple target signal tables corresponding to the receiving end through the routing table on the upper computer side, so as to separate the sending frame and the receiving frame in the routing table, thereby reducing the test difficulty. The real-time machine side sends the random number corresponding to the sending frame in the source signal table sent by the upper computer to the target controller set in the vehicle to be tested, and determines whether the writing is successful based on the writing result of the target controller. When determining that the writing is successful, the upper computer obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller and compares them with the random numbers in the source signal table to obtain the test result of the CAN signal transceiver test on the vehicle to be tested, thereby improving the accuracy of the vehicle CAN signal transceiver test, thereby improving the efficiency of the vehicle CAN signal transceiver test.

[0124] See also Figure 3 , Figure 4 , Figure 3 This is one of the structural schematic diagrams of a vehicle CAN signal transceiver test system provided in an embodiment of the present application. Figure 4 This is a second structural schematic diagram of a vehicle CAN signal receiving and transmitting test system provided in an embodiment of the present application.

[0125] like Figure 3 As shown in FIG. , the vehicle CAN signal transceiver test system 30 includes:

[0126] The host computer end 310 is used to generate a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end 320;

[0127] The real-time machine end 320 is used to write the received random number to a target controller disposed in the vehicle to be tested, and in response to receiving a write result sent by the target controller, determine whether the target controller has successfully written the random number based on the write result, and send the determination result to the host machine end 310;

[0128] In response to determining that the judgment result is a successful write, the host computer end 310 is also used to obtain the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller based on the target signal table, and compare the numerical values ​​with the corresponding random numbers respectively to obtain the comparison results to determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

[0129] Further, if Figure 4 As shown in , the host computer end 310 includes:

[0130] The table generation module 311 is used for generating a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to a plurality of transmission frames in the source signal table to the real-time machine end 320;

[0131] A signal acquisition module 312, configured to acquire, in response to determining that the judgment result is a write success, values ​​corresponding to a plurality of received frame signals sent by the target controller based on the target signal table;

[0132] The numerical value comparison module 313 is used to compare the numerical value with the corresponding random number to obtain a comparison result to determine the test result of the CAN signal receiving and sending test of the vehicle to be tested.

[0133] Further, when the table generation module 311 is used to generate a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively based on the preset test routing table corresponding to the multi-channel CAN signal and using a preset routing frame test model, the table generation module 311 is used to:

[0134] In a pre-set test routing table corresponding to the multi-channel CAN signals, determine the CAN signal information, transmission frames, signal domains and random numbers corresponding to multiple transmitting ends, and the CAN signal information, reception frames, signal domains and target data corresponding to multiple receiving ends;

[0135] Based on the CAN signal information, transmission frames, signal domains and random numbers respectively corresponding to the multiple transmission ends, a source signal table corresponding to the transmission end is generated using a preset routing frame test model;

[0136] Based on the CAN signal information, receiving frames, signal domains and target data respectively corresponding to the multiple receiving ends, a target signal table respectively corresponding to the multiple receiving ends is generated using a preset routing frame test model.

[0137] Further, when the signal acquisition module 312 is used to obtain the values ​​corresponding to the multiple received frame signals sent by the target controller based on the target signal table in response to determining that the judgment result is a successful write, the signal acquisition module 312 is used to:

[0138] receiving a plurality of reception frame signals sent by the target controller to write the random number;

[0139] In response to determining that the judgment result is a write success, based on the received frames in the target signal table, numerical values ​​corresponding to the multiple received frame signals are obtained.

[0140] Further, when the numerical value comparison module 313 is used to compare the numerical value with the corresponding random number to obtain a comparison result to determine the test result of the CAN signal transceiver test on the vehicle to be tested, the numerical value comparison module 313 is used to:

[0141] Compare the numerical values ​​corresponding to the plurality of received frame signals with the random numbers corresponding to the plurality of sent frames in the source signal table respectively, and obtain the comparison result of each numerical value;

[0142] Based on the comparison result, a test result of the CAN signal receiving and sending test on the vehicle to be tested is determined.

[0143] Further, if Figure 4 As shown in , the real-time machine end 320 includes:

[0144] The signal writing module 321 is used to write the received random number into a target controller disposed in the vehicle to be tested.

[0145] The write judgment module 322 is used to respond to receiving the write result sent by the target controller, judge whether the target controller has successfully written the random number based on the write result, and send the judgment result to the host computer end 310.

[0146] Further, when the write judgment module 322 is used to judge whether the target controller has successfully written the random number based on the write result in response to receiving the write result sent by the target controller, the write judgment module 322 is used to:

[0147] In response to receiving the write result sent by the target controller, determining a write feedback value obtained by the target controller writing each of the random numbers, and judging whether each of the write feedback values ​​is consistent with the random number;

[0148] When each of the write feedback values ​​is consistent with the corresponding random number, determining that the target controller successfully writes the random number;

[0149] When at least one of the write feedback values ​​is inconsistent with the corresponding random number, it is determined that the target controller fails to write the random number.

[0150] See also Figure 5 , Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown in , the electronic device 500 includes a processor 510 , a memory 520 and a bus 530 .

[0151] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530. When the machine-readable instructions are executed by the processor 510, the above-mentioned Figure 1 The specific implementation of the steps of the vehicle CAN signal receiving and sending test method in the method embodiment shown can be found in the method embodiment, which will not be repeated here.

[0152] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The specific implementation of the steps of the vehicle CAN signal receiving and sending test method in the method embodiment shown can be found in the method embodiment, which will not be repeated here.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0155] 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 solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application 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.

[0157] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several 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 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.

[0158] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A vehicle CAN signal transceiver test method, characterized in that: The method is applied to a vehicle CAN signal transceiver test system; wherein the system includes a host computer end and a real-time computer end, and the method includes: The host computer generates a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively based on a preset test routing table corresponding to the multi-channel CAN signals of the vehicle to be tested, and sends random numbers corresponding to a plurality of transmission frames in the source signal table to the real-time machine end; The real-time machine end writes the received random number to a target controller disposed in the vehicle to be tested, and in response to receiving a write result sent by the target controller, determines whether the target controller has successfully written the random number based on the write result, and sends the determination result to the host computer end; In response to determining that the judgment result is a successful write, the upper computer obtains the numerical values ​​corresponding to the multiple receiving frame signals sent by the target controller based on the target signal table, and compares the numerical values ​​with the corresponding random numbers respectively to obtain the comparison results to determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

2. The method according to claim 1, characterized in that The test routing table corresponding to the multi-channel CAN signal is based on a preset test routing frame test model, and a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end are generated, including: In a pre-set test routing table corresponding to the multi-channel CAN signals, determine the CAN signal information, transmission frames, signal domains and random numbers corresponding to multiple transmitting ends, and the CAN signal information, reception frames, signal domains and target data corresponding to multiple receiving ends; Based on the CAN signal information, transmission frames, signal domains and random numbers respectively corresponding to the multiple transmission ends, a source signal table corresponding to the transmission end is generated using a preset routing frame test model; Based on the CAN signal information, receiving frames, signal domains and target data respectively corresponding to the multiple receiving ends, a target signal table respectively corresponding to the multiple receiving ends is generated using a preset routing frame test model.

3. The method according to claim 1, characterized in that The step of, in response to receiving the write result sent by the target controller, judging whether the target controller has successfully written the random number based on the write result, comprises: In response to receiving the write result sent by the target controller, determining a write feedback value obtained by the target controller writing each of the random numbers, and judging whether each of the write feedback values ​​is consistent with the random number; When each of the write feedback values ​​is consistent with the corresponding random number, determining that the target controller successfully writes the random number; When at least one of the write feedback values ​​is inconsistent with the corresponding random number, it is determined that the target controller fails to write the random number.

4. The method according to claim 1, characterized in that: In response to determining that the judgment result is a write success, obtaining, based on the target signal table, values ​​corresponding to a plurality of received frame signals sent by the target controller, includes: receiving a plurality of reception frame signals sent by the target controller to write the random number; In response to determining that the judgment result is a write success, based on the received frames in the target signal table, numerical values ​​corresponding to the multiple received frame signals are obtained.

5. The method according to claim 1, characterized in that The comparing the numerical values ​​with the corresponding random numbers to obtain a comparison result to determine a test result of a CAN signal receiving and sending test on the vehicle to be tested includes: Compare the numerical values ​​corresponding to the plurality of received frame signals with the random numbers corresponding to the plurality of sent frames in the source signal table respectively, and obtain the comparison result of each numerical value; Based on the comparison result, a test result of the CAN signal receiving and sending test on the vehicle to be tested is determined.

6. A vehicle CAN signal transceiver test system, characterized in that: The system comprises: The host computer end is used to generate a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end; The real-time machine end is used to write the received random number into a target controller arranged in the vehicle to be tested, and in response to receiving a write result sent by the target controller, based on the write result, determine whether the target controller has successfully written the random number, and send the determination result to the host computer end; In response to determining that the judgment result is a successful write, the host computer end is also used to obtain, based on the target signal table, numerical values ​​corresponding to multiple receiving frame signals sent by the target controller, and compare the numerical values ​​with the corresponding random numbers respectively to obtain comparison results to determine the test results of the CAN signal reception and transmission test of the vehicle to be tested.

7. The system according to claim 6, characterized in that The host computer terminal includes: A table generation module is used for generating a source signal table corresponding to the transmitting end and a plurality of target signal tables corresponding to the receiving end respectively for the receiving end and the transmitting end corresponding to the multi-channel CAN signals of the vehicle to be tested, based on a preset test routing table corresponding to the multi-channel CAN signals, using a preset routing frame test model, and sending random numbers corresponding to the plurality of transmission frames in the source signal table to the real-time machine end; A signal acquisition module, configured to, in response to determining that the judgment result is a successful write, acquire, based on the target signal table, values ​​corresponding to a plurality of received frame signals sent by the target controller; The numerical value comparison module is used to compare the numerical value with the corresponding random number respectively to obtain a comparison result to determine the test result of the CAN signal receiving and sending test on the vehicle to be tested.

8. The system according to claim 6, characterized in that The real-time machine terminal comprises: A signal writing module, used for writing the received random number into a target controller arranged in the vehicle to be tested; The write judgment module is used to respond to receiving the write result sent by the target controller, judge whether the target controller has successfully written the random number based on the write result, and send the judgment result to the host computer.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the vehicle CAN signal receiving and sending test method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vehicle CAN signal receiving and sending test method as claimed in any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • WiFi-based portable unmanned aerial vehicle test system

    CN112034747A

  • Vehicle control method and device and vehicle

    CN113353093A

  • Controller CAN signal test method and system

    CN116389314A

  • Vehicle fault diagnosis test method and device, electronic equipment and storage medium

    CN116679683A

  • Signal detection method and device, electronic equipment and vehicle

    CN116915645A