Vehicle communication test method, device and system and electronic equipment

By receiving test cases to execute instructions and obtaining full message data from the target database, combining real signal values ​​to generate messages to be sent, the problems of slow and low efficiency of manual sampling and verification speed in the prior art are solved, and the automated test of vehicle communication and data accuracy and completeness are achieved.

CN119814631APending Publication Date: 2025-04-11CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510054135.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The manual random inspection and verification of vehicle communication data adopted in the prior art leads to slow verification speed, long time, low efficiency, and easy to cause random inspection defects, resulting in some erroneous data being omitted.

Method used

By receiving test cases execution instructions, if it is a full simulation data test case, the full message data corresponding to the vehicle model will be obtained from the preset target database, the real signal value will be combined to generate the message to be sent, and it will be sent to the vehicle to be tested to read the message data received by the third-party platform. If the message is the same as the message to be sent, the test will be confirmed to be passed.

Benefits of technology

Automatic testing of vehicle communications is realized, testing speed and efficiency are improved, data integrity and accuracy are ensured, and costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814631A_ABST
    Figure CN119814631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle testing, in particular to a vehicle communication testing method, device and system and electronic equipment, and the method comprises the steps: receiving a test case execution instruction which is used for indicating to execute at least one to-be-executed case; if the to-be-executed case is a full-amount simulation data test case, obtaining full-amount message data corresponding to the vehicle type of the to-be-tested vehicle from a preset target database; combining the real signal values of the plurality of signals in the simulation message to obtain a plurality of first messages to be sent; sending the first to-be-sent message to the to-be-tested vehicle; reading message data uploaded by the to-be-tested vehicle and received by the third-party platform; if the message data received by the third-party platform is the same as the first to-be-sent message, determining that the full-amount simulation test passes; the method can achieve the automatic testing of the vehicle, so as to determine whether the to-be-tested vehicle can correctly transmit the real signal value to the third-party platform or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle testing technology, and in particular to a vehicle communication testing method, device, system and electronic equipment. Background Art

[0002] With the continuous update of vehicle architecture, the number of vehicle-side ECUs (Electronic Control Units) continues to increase, and the volume of vehicle communication data (on-board data) continues to increase, such as driving habit data (acceleration, braking, steering and other driving behavior data collected by vehicle-side sensors), ECU operating status (such as engine temperature, fuel consumption, fault codes), and special scene reproduction data (such as sharp turns, slippery road driving, etc.). For the purpose of data security monitoring and traffic management, the vehicle side needs to upload the vehicle communication data to the monitoring platform, and the monitoring platform will perform security monitoring on the received vehicle communication data.

[0003] In order to ensure the correctness of the vehicle communication data received by the monitoring platform, the vehicle communication data uploaded to the monitoring platform by the vehicle is usually checked manually. However, the above manual sampling and verification method has many disadvantages, such as slow verification speed, long verification time, low efficiency, and large omissions in sampling, resulting in the omission of some erroneous data. Summary of the invention

[0004] The present invention provides a vehicle communication test method, device, system and electronic equipment to solve the problems of manual random sampling and verification in the prior art, which leads to slow verification speed, long verification time, low efficiency and large omissions in random sampling.

[0005] The present invention provides a vehicle communication test method, the method comprising: receiving a test case execution instruction, the test case execution instruction being used to instruct execution of at least one test case to be executed;

[0006] If the test case to be executed is a full-scale simulation data test case, then according to the model of the vehicle to be tested, the full-scale message data corresponding to the model of the vehicle to be tested is obtained from a preset target database, wherein the full-scale message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and the full-scale real signal value of each signal;

[0007] By combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value;

[0008] The first message to be sent is sent to the vehicle to be tested; the message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

[0009] In one embodiment of the present invention, before the step of obtaining the full amount of message data corresponding to the model of the vehicle to be tested from a preset target database according to the model of the vehicle to be tested, the method further includes:

[0010] Determine any network segment of the CAN bus system as a target network segment;

[0011] Reading the message data of the target network segment to obtain first message data;

[0012] Reading the message data uploaded by the vehicle to be tested and received by the third-party platform, if there is a message with the same message ID as the first message data, determining the message with the same message ID as the first message data as the second message data;

[0013] If the first message data is the same as the second message data, determining that the target network segment communication verification is passed;

[0014] Traverse the remaining network segments of the CAN bus system until the communication verification of all network segments is completed, wherein passing the communication verification is a prerequisite for executing the full simulation data test case.

[0015] In one embodiment of the present invention, the target database stores a CAN message data table and a CAN signal table, wherein the CAN message data table includes: message name, message ID, network segment of the message, and vehicle model applicable to the message; the CAN signal table includes: message name, message ID, signal name, and full data signal value column, wherein the full data signal value column includes the full real signal value of the signal;

[0016] The step of filling the full data signal value column comprises: if the original value of the acquired signal is a plurality of enumeration values, filling all the enumeration values ​​into corresponding positions of the full data signal value column;

[0017] If the original value of the acquired signal is a value range, then according to the preset value interval and the value range, a signal value combination is obtained, and the difference between two adjacent signal values ​​in the value combination is the value interval; the value combination is filled into the corresponding position of the full data signal value column.

[0018] In one embodiment of the present invention, if the use case to be executed is a critical simulation data test case, critical message data corresponding to the model of the vehicle to be tested is obtained from the target database according to the model of the vehicle to be tested, the critical message data includes critical messages of each network segment of the CAN bus system, the signal type included in the critical message is the same as the signal type included in the simulation message, the critical message includes at least two critical signal values ​​of the signal, the critical signal value is obtained by expanding the maximum value of the full amount of real signal values, or by reducing the minimum value of the full amount of real signal values, or by synthesizing multiple random arrays into critical signal values;

[0019] By combining the critical signal values ​​of the plurality of signals in the critical message, a plurality of second messages to be sent are obtained, the number of signals included in the second messages to be sent is the same as the number of signals included in the corresponding critical message, and each signal in the second messages to be sent corresponds to a critical signal value;

[0020] The second message to be sent is sent to the vehicle to be tested; the message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data read is the same as the second message to be sent, it is determined that the critical simulation test has failed, and the current second message to be sent is determined as error information and recorded.

[0021] In one embodiment of the present invention, the CAN signal table further includes a critical data signal value column, the critical data signal value column includes a critical signal value of the signal, and the filling step of the critical data signal value column includes:

[0022] If the type of the original value of the acquired signal is a numerical value, then the maximum value and the minimum value of the signal in the original value of the current signal are acquired; the sum of the maximum value of the signal and a preset first numerical value is determined as a first critical value; the sum of the minimum value of the signal and a preset second numerical value is determined as a second critical value; the first critical value and the second critical value are filled into the critical data signal value column;

[0023] If the type of the original value of the acquired signal is text, multiple random numbers are taken to fill in the critical data signal value column.

[0024] In one embodiment of the present invention, if the to-be-executed use case is a fuzzy attack test case, a fuzzy attack data table preset in the target database is read to obtain a plurality of fuzzy attack messages;

[0025] Sending the fuzzy attack message to the vehicle to be tested;

[0026] If the fault information fed back by the vehicle to be tested is received, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded;

[0027] The message data uploaded by the vehicle to be tested and received by the third-party platform is read. If the message data identical to the fuzzy attack message is read, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded.

[0028] In one embodiment of the present invention, the test case execution instruction is triggered by triggering an instruction triggering area in a display screen;

[0029] Among them, one prerequisite for triggering the instruction trigger area is that at least one test case is selected in the display screen, and the selected test case is the test case to be executed; another prerequisite for triggering the instruction trigger area is that the authentication credentials are valid, and the authentication credentials refer to the authentication credentials entered by the user, and the authentication credentials are used to access the third-party platform.

[0030] The present invention also provides a vehicle communication test device, the device comprising: an instruction receiving module, used to receive a test case execution instruction, the test case execution instruction is used to instruct the execution of at least one test case to be executed;

[0031] A first processing module is used for obtaining, if the test case to be executed is a full simulation data test case, full message data corresponding to the model of the vehicle to be tested from a preset target database according to the model of the vehicle to be tested, wherein the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and a full real signal value of each signal;

[0032] A second processing module, configured to obtain a plurality of first messages to be sent by combining the real signal values ​​of a plurality of signals in the simulation message, wherein the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value;

[0033] The third processing module is used to send the first message to be sent to the vehicle to be tested; read the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

[0034] The present invention also provides an electronic device, comprising a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a method provided in any one of the above embodiments.

[0035] The present invention also provides a vehicle communication test system, comprising:

[0036] A vehicle to be tested, a CANoe test device, and the vehicle communication test device as described above, wherein the vehicle to be tested, the CANoe test device, and the vehicle communication test device are connected in sequence, the CANoe test device is used to perform protocol conversion, and the vehicle to be tested communicates with the vehicle communication test device through the CANoe test device.

[0037] Beneficial effects of the present invention: The vehicle communication test method, device, system and electronic device proposed in the present invention receive a test case execution instruction, and the test case execution instruction is used to instruct the execution of at least one case to be executed; if the case to be executed is a full simulation data test case, then according to the model of the vehicle to be tested, the full message data corresponding to the model of the vehicle to be tested is obtained from a preset target database, and the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested. The simulation message includes multiple signals and the full real signal value of each signal; by combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, the number of signals contained in the first message to be sent is the same as the number of signals contained in the corresponding simulation message, and each signal in the first message to be sent corresponds to a real signal value; the first message to be sent is sent to the vehicle to be tested; the message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed. This method can realize automated testing of the vehicle to be tested to determine whether the vehicle to be tested can correctly transmit the real signal value to the third-party platform. The test speed is fast and the efficiency is high. Moreover, by adopting the full real signal value and combining the real signal values ​​of different signals, it can cover most of the real signals of the vehicle, thereby improving the accuracy of the vehicle communication test at a low cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a vehicle communication test method according to an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of the main business functions of a vehicle communication test method provided in one embodiment of the present invention;

[0040] Figure 3 A schematic diagram of a process of logging into a system in a vehicle communication test method provided in an embodiment of the present invention;

[0041] Figure 4 A schematic diagram of a flow chart of viewing a test case in a vehicle communication test method provided in an embodiment of the present invention;

[0042] Figure 5 A schematic diagram of a flow chart of parameter configuration in a vehicle communication test method provided in an embodiment of the present invention;

[0043] Figure 6 A schematic diagram of a flow chart of starting a use case to be executed in a vehicle communication test method provided in an embodiment of the present invention;

[0044] Figure 7 A schematic diagram of a process flow of full simulation data preprocessing in a vehicle communication test method provided in an embodiment of the present invention;

[0045] Figure 8 A schematic diagram of a communication verification process in a vehicle communication test method provided by an embodiment of the present invention;

[0046] Fig. 9 A schematic diagram of a process for executing a full-scale simulation data test case in a vehicle communication test method provided in an embodiment of the present invention;

[0047] Fig.10 A schematic diagram of a flow chart of executing a critical simulation data test case in a vehicle communication test method provided by an embodiment of the present invention;

[0048] Fig.11 A schematic diagram of the design process of fuzzy attack data in a vehicle communication test method provided by an embodiment of the present invention;

[0049] Fig.12 A schematic diagram of a flow chart of executing a fuzzy attack test case in a vehicle communication test method provided in an embodiment of the present invention;

[0050] Fig.13 A schematic diagram of the structure of a vehicle communication test device provided by an embodiment of the present invention;

[0051] Fig.14 A schematic diagram of the structure of a vehicle communication test system provided by an embodiment of the present invention;

[0052] Fig.15 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0054] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0055] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0056] Combine the following Figures 1 to 15 , the vehicle communication test method, device, system and electronic equipment provided by the present invention are explained.

[0057] See also Figure 1 , Figure 1 A flow chart of a vehicle communication test method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method includes:

[0058] S110: Receive a test case execution instruction, where the test case execution instruction is used to instruct execution of at least one test case to be executed.

[0059] It should be noted that the test case execution instruction is triggered by the user, and the test case includes a full simulation data test case, a critical simulation data test case, and a fuzzy attack test case. Among them, the full simulation data test case can perform a communication test on the vehicle to be tested through the full simulation data (data obtained by performing a full simulation on the vehicle communication data) to determine whether the vehicle to be tested can correctly upload the full simulation data received by each network segment, that is, the first message to be sent described below, to the third-party platform. The critical simulation data test case can perform a critical simulation test on the vehicle to be tested based on the critical signal value (the value obtained by expanding the maximum value of the full real signal value, or the value obtained by reducing the minimum value of the full real signal value, or the value composed of multiple random numbers) to determine whether the vehicle to be tested can filter out the critical signal value. The fuzzy attack test case can use the fuzzy attack message to determine whether the vehicle to be tested will be affected by the fuzzy attack message, thereby generating an abnormal response, such as a black screen, etc., and it can also test whether the vehicle to be tested can filter out the fuzzy attack message.

[0060] It can be understood that for the full amount of simulation data, that is, the first message to be sent, under normal communication conditions, if the vehicle to be tested receives the first message to be sent, it is necessary to upload the first message to be sent to a third-party platform for monitoring by the third-party platform. For the first message to be sent, this process is a normal communication process. However, for the second message to be sent where the critical signal value is located, under normal communication conditions, if the vehicle to be tested receives the second message to be sent, it is necessary to filter out the second message to be sent, so as to avoid uploading the wrong second message to be sent to the third-party platform. The same is true for fuzzy attack messages. If the vehicle to be tested filters out the received fuzzy attack message, it means that the vehicle communication is normal. If the vehicle to be tested uploads the received fuzzy attack message to a third-party platform, it means that the vehicle communication is abnormal, that is, the vehicle to be tested uploads the wrong fuzzy attack message to the third-party platform.

[0061] S120: If the use case to be executed is a full simulation data test case, then according to the model of the vehicle to be tested, the full message data corresponding to the model of the vehicle to be tested is obtained from a preset target database, and the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and the full real signal value of each signal.

[0062] It should be noted that the target database may be a sqlite3 database (a self-contained, server-independent relational database management system), etc. The target database pre-stores full message data of different vehicles for full simulation testing.

[0063] It should be mentioned that the "full amount" in the above embodiment is a special term in this field and can be simply understood as all. It can be understood that by simulating the full amount of message data of each network segment of the vehicle, it is convenient to conduct a full amount simulation test, that is, to determine whether the vehicle to be tested can upload the correct message data to the third-party platform, with a wide coverage, effectively avoiding test omissions and the like. The full amount of real signal values ​​in the above step S120 means that each signal corresponds to at least one real signal value.

[0064] S130: By combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value.

[0065] It should be noted that by combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, which can further expand the coverage of the message. For example: Assuming that the current simulation message contains three signals A, B, and C, the real signal values ​​corresponding to signal A are a1 and a2, the real signal values ​​corresponding to signal B are b1, b2, and b3, and the real signal values ​​corresponding to signal C are c1, c2, c3, and c4, then, by combining the real signal values ​​of these three signals, multiple combination results can be obtained, such as {a1\b1\c1}, {a2\b2\c2}, {a2\b3\c3}, {a2\b3\c4}, etc., and each combination result corresponds to the generation of a message to be sent. Since there are multiple combination results, in order to save resources, the number of combination results generated can be pre-set, such as 4 or 5.

[0066] S140: Send the first message to be sent to the vehicle to be tested; read the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

[0067] Specifically, the first message to be sent is sent to the corresponding network segment of the CAN bus system of the vehicle to be tested. After receiving the first message to be sent, the vehicle to be tested will perform operations such as message processing and uploading. Under normal circumstances, the vehicle to be tested will upload the received first message to be sent to a third-party platform so that the third-party platform can perform data monitoring, etc. Therefore, in the above step S140, by reading the message data uploaded by the vehicle to be tested and received by the third-party platform, it is determined whether the third-party platform has received the same message as the first message to be sent. If so, it can be determined that the full simulation test corresponding to the current first message to be sent has passed, and then the next first message to be sent is sent to the corresponding network segment of the vehicle to be tested, and the third-party platform message reading and comparison operations are repeated until all the first messages to be sent are verified, that is, the last first message to be sent is sent and the comparison is completed.

[0068] The vehicle communication test method in the above embodiment can better realize the automated test of vehicle communication, so as to determine whether the vehicle to be tested can correctly transmit the real signal value to the third-party platform. The test speed is fast, the test efficiency is high, and the test coverage is wide. Compared with the manual sampling method, it can effectively avoid the occurrence of test omissions or sampling omissions.

[0069] The above explains the execution steps of the full simulation data test case of the vehicle communication test method. In order to further understand the implementation means of the method, the front-end and back-end contents involved in the method are explained below.

[0070] The front end mainly provides functions such as login, test case viewing, test case start (trigger), and result display (such as historical execution statistics chart viewing, historical execution record viewing), etc. The back end mainly provides test case execution, etc.

[0071] Figure 2 This is a schematic diagram of the main business functions of the vehicle communication test method provided in one embodiment of the present invention. Please refer to Figure 2First, the user can enter the login interface and log in by visiting the URL. Then, determine whether the login is successful. If the login is successful, enter the homepage. If the login fails, return to the login interface and log in again. On the homepage, the user can view test cases, view historical execution statistics, and view historical execution records. After that, the user can enter the corresponding authentication credentials on the homepage, which are used to access the third-party platform. Then, select the test case to be executed. Then, determine whether the authentication credentials are valid. If not, return to the homepage to prompt the user to re-enter the authentication credentials. If valid, start and execute the corresponding test case. Finally, display the test results of the test case. The user can also view the test results of the test case.

[0072] It should be mentioned that, regarding the front end, VUE (a progressive framework for building user interfaces) is used in this embodiment for front-end page rendering, such as the home page, etc. In addition, TypeScipt (an open source programming language) is used for logic processing, Axios (an HTTP (HyperText Transfer Protocol) client based on Promise (an object for processing asynchronous operations)) is used for back-end logic interface access, and echarts (an open source visualization chart library) is used for statistical chart display.

[0073] It is also necessary to mention that with regard to the backend, this embodiment uses django (a high-level Web (network) framework) for overall framework construction, database access and interface access, uses sqlite3 for data storage, uses python_logging (a module for recording logs in the Python (a high-level programming language) standard library) for logging, and uses CANoe (Controller Area Network Open Environment) test equipment and python_can (a library for communicating with CAN devices) for data simulation.

[0074] For the login function, the processing methods involved in the front end include: accessing the URL (the corresponding URL for running the vehicle communication test method), entering the login interface, and using the user name and password to log in to the system. By triggering the logout button, the system is logged out. During the login access process, the password can be encrypted to improve the security of the login. The processing methods involved in the back end include: using the sqlite3 database to establish the user_info (user information) data table to store the user name and the encrypted ciphertext.

[0075] Figure 3This is a flow chart of logging into the system in the vehicle communication test method provided in one embodiment of the present invention. Please refer to Figure 3 , first, enter your username and password.

[0076] Secondly, the front end encrypts the input password. The steps of encrypting the password in this embodiment include: 1. According to the preset format conversion rule, the password is converted once to convert the password into a ciphertext of the target format. The format conversion rule can be an MD5 conversion rule. MD5 refers to converting the password into a hash value of a fixed length (such as 16 bytes). 2. Inverting the ciphertext to obtain inverted data; 3. According to the format conversion rule, the inverted data is converted twice to obtain the encrypted password.

[0077] Then, access the backend login interface to transmit the user name and encrypted password to the backend.

[0078] Finally, the backend verifies the user name and encrypted password. If the verification is successful, the user logs into the system (the system that runs the vehicle communication test method). If the verification fails, the user name and password input interface is returned. It should be mentioned that in the process of verifying the user name and encrypted password, the encrypted password must be decrypted first. The decryption process is the inverse process of the above encryption process.

[0079] For the test case viewing function, the processing methods involved in the front end include: displaying all test cases in the form of a table. In addition, multi-condition queries are performed through the Axios request program interface to display a list of test cases that meet the conditions. In addition, by triggering the details button in the display screen, the details of a single test case may be displayed. The processing methods involved in the back end include: using the sqlite3 database to establish the use_testcase (test case) data table, which contains the test case ID (primary key), the project to which the test case belongs, the field to which the test case belongs, the function to which the test case belongs, the test case name, the test case prerequisites, the test case operation steps, the test case expected results, the test case execution level and other column names, which are used to store all executable test cases.

[0080] Figure 4 For a flow chart of viewing a test case in a vehicle communication test method provided in an embodiment of the present invention, please refer to Figure 4 , first, enter the Use Case View menu bar.

[0081] Secondly, determine whether to perform filtering, that is, whether there is a need for use case filtering, where the standard for determining whether there is a need for use case filtering can be whether a use case filtering instruction is received, and the triggering method of the use case filtering instruction is that the user clicks or touches the filter button in the use case viewing menu bar.

[0082] Then, if there is a use case screening requirement, you can filter according to at least one of the project, use case name, and function, and then obtain and view a list of test cases that meet the conditions. If there is no use case screening requirement, you can directly view the use case list.

[0083] Finally, a user-triggered use case details viewing instruction is received, where the user clicks or touches a details button on the display screen. When the use case details viewing instruction is received, the details of the corresponding test case are displayed.

[0084] For the test case start function, the front-end processing means include: uploading the vehicle data to be verified to the platform or system (the platform or system that runs the vehicle communication test method) to test the uploaded vehicle data using the test case (if necessary). In addition, under normal circumstances, multiple test cases can be selected to trigger the start button on the display screen to start the selected test case (the test case to be executed) to test the vehicle to be tested.

[0085] For the test case startup function, the backend processing methods include: using Django to run the test case startup interface, and using the sqlite3 database to establish the use_test_result (test result) data table and the use_test_result_info (test result details) data table. The use_test_result data table is used to store the test case task execution list (understandably, a test case task may need to execute one or more test cases, and the specific number of test cases executed depends on the number of test cases selected by the user, that is, the number of test cases to be executed, and the use_test_result data table is used to store the execution status of the test case task). The use_test_result data table includes: task ID (primary key), task name, task execution status, test case execution time, and test case field. The use_test_result_info data table is used to store the test results of a single test case. The use_test_result_info data table includes: task ID, test case ID, test case name, test time, test result, failure reason, and execution vehicle.

[0086] It should be mentioned that this embodiment uses a preset iterator to print logs and write results of the use case execution process. Specifically, the logging module is used to print logs, and the django.db.model module is used to read and write input database data.

[0087] It is also worth mentioning that before starting the test case, parameter configuration is required. The parameters that need to be configured include: VIN (Vehicle Identification Number), Environment (environmental information of the third-party platform), Session (authentication credentials of the third-party platform), and CFTK (verification credentials of the third-party platform). The authentication credentials are used to access the third-party platform. The verification credentials are used to carry in the transmitted message to ensure that the message has not been tampered with. It is worth mentioning that the backend needs to provide an interface to enter the authentication credentials of the third-party platform. Figure 5 For a flow chart of parameter configuration in a vehicle communication test method provided in an embodiment of the present invention, please refer to Figure 5 First, determine whether the preset parameter configuration file has the authentication credentials of the third-party platform. Secondly, if yes, check the correctness of the configured parameters in the parameter configuration file. If no, prompt the user to configure each parameter, and then check the correctness of the configured parameters. Then, determine whether the configured parameters are available. If yes, end the parameter configuration. If no, prompt the user to reconfigure the parameters.

[0088] After completing the above parameter configuration, you can start the selected test case, that is, the test case to be executed. Figure 6 This is a flow chart of starting a test case to be executed in a vehicle communication test method provided in an embodiment of the present invention. Please refer to Figure 6 First, after receiving the test case execution instruction and completing the parameter configuration, the test case task is started. Specifically, it includes: accessing the test task start interface; obtaining the task execution ID and task time (current time) in sequence; printing the task execution information by the logging module; and writing the task execution information into the use_test_result data table.

[0089] Secondly, start the test case. Specifically, it includes: starting a single test case, accessing the preset iterator, and using the iterator to start the test case to be executed (sending the messages to be sent to the vehicles to be tested in sequence); obtaining the test case time (current time) and the test case name; and using the logging module to print the test case execution information.

[0090] Then, execute a single use case to be executed.

[0091] Next, determine whether the execution of the use case is abnormal. If there is an abnormality, write the test result object (the vehicle to be tested, the network segment where the abnormality occurs, and the message sent, etc.) into the test result; if there is no abnormality, obtain the test result of a single use case to be executed.

[0092] Afterwards, the test results are returned, and the logging module prints the information of the executed test cases.

[0093] Finally, determine whether all the to-be-executed use cases in the use case task have been executed. If so, obtain all the test result objects and write the use case execution details into the use_test_result_info data table. If not, return to the "Start Test Case" step.

[0094] For the result display function, the processing methods involved in the front end include: displaying the test results of the past week through echarts, etc. All historical execution records are displayed in a table format. By triggering the details button, the details of a single execution (such as execution status, start time, end time, time consumption, number of scenario use cases, number of passed use cases, number of failed use cases, number of execution exceptions, etc.) can be displayed. You can also use the Axios request program interface to perform multi-condition queries and display a list of test results that meet the conditions. In addition, you can also view the reasons for the failure of the use case by triggering the corresponding button. The back end involves the definition of the data structure of the test results. In this embodiment, the TestResult (test result) class is used to define the data structure of the test results. The data structure of the test results in this embodiment includes: execution_id (execution ID), case_id (use case ID), case_name (use case name), test_time (test time), test_result (test result), fail_reason (failure reason), and VIN (vehicle identification number).

[0095] superior Figure 6 The overall startup and processing process of the use case to be executed is explained in the following, and how to execute different use cases to be executed (full simulation data test cases, critical simulation data test cases, and fuzzy attack test cases) is explained in the form of embodiments.

[0096] Regarding the full simulation data test cases, it should be noted that before executing the full simulation data test cases, full simulation data preprocessing steps and communication verification steps are involved.

[0097] Please refer to Figure 7 ,The full simulation data preprocessing steps include:

[0098] First, use the "Complete Vehicle CAN Communication Protocol" to read all the message data of the vehicle (data collection vehicle, i.e., the vehicle used for message and signal collection) and enter it into the CAN message data table (can_message_list). The CAN message data table includes: message name, message ID, network segment where the message is located, vehicle model applicable to the message, message sending mode, message sending cycle, message length, message sending device, project to which the message belongs, and message version. The message sending device refers to the electronic control unit (ECU) that sends the current message.

[0099] Next, read all signals within a single message.

[0100] Then, the full data signal value column in the CAN signal table is filled, and the filling step includes: if the original value of the acquired (read) signal is a plurality of enumerated values, all the enumerated values ​​are filled into the corresponding positions of the full data signal value column. If the original value of the acquired signal is a value range, a signal value combination is obtained according to a preset value interval and the value range, and the difference between two adjacent signal values ​​in the value combination is the value interval; the value combination is filled into the corresponding position of the full data signal value column.

[0101] Specifically, determine whether the original value of the acquired signal is a plurality of enumeration values. If so, determine all the enumeration values ​​as the values ​​to be filled, and fill the values ​​to be filled into the corresponding positions of the full data signal value column. If not, determine that the original value of the acquired signal is a value range. Next, determine whether the maximum value and the minimum value of the value range are both decimals. If so, obtain the signal value combination (such as 0.3, 1.4, 2.5, 3.6) according to the preset first value interval (such as 1.1, etc.) and the value range (such as [0.3, 3.6], etc.), and the signal value in the value combination is the value to be filled. If not, determine whether the maximum value and the minimum value of the value range are both integers, and the maximum value of the value range is less than or equal to the preset first threshold value (such as 500, etc.) (this judgment condition is abbreviated as Figure 7 In the value range, the value is "integer, [0,500]"). If the maximum value and the minimum value of the value range are both integers, and the maximum value of the value range is less than or equal to the first threshold, then according to the preset second value interval (such as 3, etc.) and the value range (such as [3,12], etc.), a signal value combination (such as 3, 6, 9, 12) is obtained, and the signal value in the value combination is the value to be filled. If the maximum value and the minimum value of the value range are both integers, and the maximum value is greater than the first threshold, then it is determined whether the maximum value is less than or equal to the preset second threshold (such as 1000, etc.) (the judgment condition is abbreviated as Figure 7 In the example, the maximum value is the integer [501, 1000]). If the maximum value is less than or equal to the second threshold, then according to the preset third value interval (such as 40, etc.) and the value range (such as [10, 130], a signal value combination (such as 10, 50, 90, 130) is obtained, and the signal value in the value combination is the value to be filled. If the maximum value is greater than the second threshold, then it is determined whether the maximum value is less than or equal to the preset third threshold (such as 10000, etc.) (the determination condition is abbreviated as Figure 7In the example, "integer, [1001, 10000]"). If the maximum value is less than or equal to the third threshold, then according to the preset fourth value interval (such as 120, etc.) and the value range (such as [100, 460], a signal value combination (such as 100, 220, 340, 460) is obtained, and the signal value in the value combination is the value to be filled. If the maximum value is greater than the third threshold (the judgment condition is abbreviated as Figure 7 , if the value is "integer, greater than 10000" in the value range), then according to the preset fifth value interval (such as 2000, etc.) and the value range (such as [100, 8100], etc.), the signal value combination (such as 100, 2100, 4100, 6100, 8100) is obtained, and the signal value in the value combination is the value to be filled. The signal value in the value combination, that is, the value to be filled, is written into the full data signal value column. It should be noted that by adopting different value intervals to take values ​​for signals in different value ranges, the value requirements of different signals can be better met. The above preset values ​​are empirical values ​​and can be adjusted according to actual conditions.

[0102] Finally, the remaining signal data (such as message name, message ID, signal name, signal maximum value, signal minimum value, etc.) is written into the CAN signal table.

[0103] Regarding the communication verification step, in some embodiments, the communication verification step includes:

[0104] 1. Determine any network segment of the CAN bus system as the target network segment.

[0105] 2. Read the message data of the target network segment to obtain the first message data.

[0106] 3. Reading the message data uploaded by the vehicle to be tested and received by the third-party platform, if there is a message with the same message ID as the first message data, determining the message with the same message ID as the first message data as the second message data.

[0107] 4. If the first message data is the same as the second message data, it is determined that the communication verification of the target network segment is passed.

[0108] 5. Traverse the remaining network segments of the CAN bus system until the communication verification of all network segments is completed, wherein passing the communication verification is a prerequisite for executing the full simulation data test case.

[0109] It should be noted that, through the above steps, the communication test of the vehicle to be tested can be completed well, that is, it is determined whether the vehicle to be tested communicates normally with the third-party platform.

[0110] Figure 8 For detailed instructions on the communication verification steps, please refer to Figure 8 First, prepare the hardware, software, and environment. Hardware preparation refers to preparing the vehicle to be tested, the CANoe test device (an interface device), and the test computer (a computer that runs the vehicle communication test method). Software preparation refers to pre-installing the CANoe test software and the corresponding drivers on the test computer. Environmental preparation refers to test environment preparation, that is, using an ODB (open data) line to connect the vehicle to be tested (the vehicle to be tested can be a VHR (vehicle communication data) function bench) with the preset CANoe test device. Use a CANoe connection cable to connect the CANoe test device and the test computer.

[0111] Secondly, the link preconditions are checked. Specifically, the hardware conditions, software conditions, and environmental conditions prepared in the above steps are checked to determine whether they meet the requirements.

[0112] Then, it is determined whether the check is passed. If the check is passed, a network segment is selected, that is, any network segment of the CAN bus system of the vehicle to be tested is determined as the target network segment. Then, a single message data of the network segment is obtained from the vehicle to be tested as the first message data. The second message data is obtained from the third-party platform, that is, the message data with the same message ID as the first message data. It is determined whether there is a signal value in the second message data. If there is a signal value, the first message data and the second message data are compared to determine whether the first message data is consistent with the second message data. If they are consistent, the remaining network segments of the CAN bus system are traversed until the communication verification of all network segments is completed, that is, whether all network segments have completed the communication verification. If so, the communication verification is terminated. If not, the next network segment is selected to continue the communication verification. If not, the current first message data is determined as error information, the cause of the error is recorded, and the remaining network segments are verified until the communication verification of all network segments is completed. If the signal value does not exist in the second message data, the current first message data is also determined as error information, the error cause is recorded, and the remaining network segments are continuously verified until the communication verification of all network segments is completed.

[0113] After completing the communication verification of all network segments, you can execute the full amount of simulation data test cases. Fig. 9 , explaining the specific steps of executing the full simulation data test case.

[0114] Please refer to Fig. 9 , the same as communication verification, first, prepare the hardware, software, and environment. Second, check the link preconditions. Determine whether the check passes. If the check passes, select the network segment. If the check fails, return to re-prepare the hardware, software, and environment.

[0115] After selecting the network segment, read all messages (simulated messages) of the network segment in the CAN message data table, select a single message under the network segment, read all signals of the message in the CAN signal table, obtain the full (all) real signal value of each signal of the message (the full real signal value is obtained from the full data signal value column), and then perform signal value combination, that is, combine the real signal values ​​of multiple signals in the message to obtain multiple first messages to be sent. It can be understood that by performing the above signal value combination step, a single message in the CAN message data table corresponds to multiple first messages to be sent.

[0116] Next, a single first message to be sent is sent to the corresponding network segment of the vehicle to be tested through the CANoe test device.

[0117] Then, a message having the same message ID as the first message to be sent is obtained from the third-party platform.

[0118] Afterwards, a message consistency check is performed, that is, the consistency of the message received in the third-party platform and the current first message to be sent is checked. If they are consistent, the remaining first message to be sent of the current combination continues to be sent. Specifically, it is determined whether the first message to be sent of the current combination has been verified. If so, the remaining messages of the current network segment in the CAN message data table are continued to be read, and the signal combination and verification operation is continued until all messages in the network segment are verified. If all messages in the network segment are verified, the remaining network segments are continued to be verified, that is, it is determined whether all network segments are verified. If so, the verification is terminated, if not, the operation of selecting the network segment is continued to be performed to select a network segment from the remaining network segments to continue the verification. It should be mentioned that if the message received in the third-party platform is inconsistent with the current first message to be sent, the current first message data is determined as error information, the cause of the error (such as network reasons, etc.) is recorded, and the remaining first message to be sent of the current combination is continued to be sent.

[0119] The above explains the execution steps of the full simulation data test case. The following explains the execution steps of the critical simulation data test case.

[0120] In some embodiments, the steps of executing the critical simulation data test case include:

[0121] 1. If the use case to be executed is a critical simulation data test case, then according to the model of the vehicle to be tested, critical message data corresponding to the model of the vehicle to be tested is obtained from the target database, the critical message data including critical messages of each network segment of the CAN bus system, the signal type contained in the critical message is the same as the signal type contained in the simulation message, the critical message includes at least two critical signal values ​​of the signal, the critical signal value is obtained by expanding the maximum value of the full amount of real signal values, or by reducing the minimum value of the full amount of real signal values, or by synthesizing multiple random arrays into a critical signal value.

[0122] It should be noted that the critical message and the simulation message contain the same signal type and quantity, the difference lies in the signal value. It is understandable that the signal value in the simulation message is the full real signal value, while the signal value in the critical message is the critical signal value, that is, the signal value obtained by expanding the maximum value of the full real signal value, or by reducing the minimum value of the full real signal value. The critical signal value of the signal in the critical message is obtained from the critical data signal value column of the CAN signal table. It is understandable that the number of random numbers can be set according to the actual situation.

[0123] In some embodiments, the step of filling the critical data signal value column includes:

[0124] A. If the type of the original value of the acquired signal is a numerical value, the maximum value and the minimum value of the signal in the original value of the current signal are acquired; the sum of the maximum value of the signal and a preset first numerical value is determined as a first critical value; the sum of the minimum value of the signal and a preset second numerical value is determined as a second critical value; the first critical value and the second critical value are filled into the critical data signal value column. The first numerical value and the second numerical value can be set according to actual conditions.

[0125] It should be noted that, for the differences between the types of original values ​​of the signal, different first values ​​and second values ​​may be used to improve the comprehensiveness and accuracy of the signal values.

[0126] Specifically, if the type of the original value of the acquired signal is a numeric value and is a plurality of enumerated values, the maximum value and the minimum value of the signal among the plurality of enumerated values ​​are taken; the maximum value of the signal is added by 1 to obtain a first critical value; the minimum value of the signal is subtracted by 1 to obtain a second critical value; the first critical value and the second critical value are filled into the critical data signal value column. For example: assuming that the original value of the acquired signal is [0, 1, 2], the first critical value is 3 and the second critical value is -1.

[0127] If the type of the original value of the acquired signal is a numeric value, the original value of the acquired signal is a value range, and the maximum value and the minimum value of the signal in the value range are both decimals, then add 0.1 to the maximum value of the signal to obtain the first critical value, and subtract 0.1 from the minimum value of the signal to obtain the second critical value; fill the first critical value and the second critical value into the critical data signal value column. For example: assuming that the original value of the acquired signal is [-1.1,3.2], the first critical value is 3.3 and the second critical value is -1.2.

[0128] If the type of the original value of the acquired signal is a numeric value, the original value of the acquired signal is a value range, and the maximum value and the minimum value of the signal in the value range are both integers, then add 1 to the maximum value of the signal to obtain a first critical value, and add 0.1 to the maximum value of the signal to obtain another first critical value; subtract 1 from the minimum value of the signal to obtain a second critical value, and subtract 0.1 from the minimum value of the signal to obtain another second critical value; fill all the first critical values ​​and second critical values ​​into the critical data signal value column. For example: Assuming that the original value of the acquired signal is [0,100], the first critical values ​​are 101 and 100.1, and the second critical values ​​are -1 and -0.1.

[0129] If the type of the original value of the acquired signal is text, multiple random numbers are taken as critical signal values, and the critical signal values ​​are filled into the critical data signal value column.

[0130] B. If the type of the original value of the acquired signal is text, multiple random numbers are taken to fill in the critical data signal value column.

[0131] 2. By combining the critical signal values ​​of multiple signals in the critical message, multiple second messages to be sent are obtained, the number of signals contained in the second messages to be sent is the same as the number of signals contained in the corresponding critical message, and each signal in the second messages to be sent corresponds to a critical signal value.

[0132] 3. Send the second message to be sent to the vehicle to be tested; read the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data read is the same as the second message to be sent, it is determined that the critical simulation test has failed, and the current second message to be sent is determined as error information and recorded.

[0133] It should be noted that, through the above steps, critical simulation data testing can be well implemented with high accuracy.

[0134] Combine the following Fig.10 , for an explanation of the specific execution steps of the critical simulation data test case, please refer to Fig.10First, similarly, prepare the hardware, software, and environment. Second, check the link preconditions. Determine whether the check passes. If the check passes, select the network segment. If the check fails, return to re-prepare the hardware, software, and environment.

[0135] After selecting the network segment, read all messages (simulated messages) of the network segment in the CAN message data table, select a single message under the network segment, read all signals of the message in the CAN signal table, obtain all critical signal values ​​of each signal of the message, and then perform signal value combination, that is, combine the critical signal values ​​of multiple signals in the message to obtain multiple second messages to be sent. It can be understood that by performing the above signal value combination step, a single message in the CAN message data table corresponds to multiple second messages to be sent.

[0136] Next, the single second message to be sent is sent to the corresponding network segment of the vehicle to be tested through the CANoe test device.

[0137] Then, determine whether the second message to be sent exists in the third-party platform. If it does, determine the current second message data as error information, record the cause of the error (such as network reasons, etc.), and continue to send the remaining second messages to be sent in the current combination. Specifically, determine whether the second messages to be sent in the current combination have all been verified. If so, continue to read the remaining messages of the current network segment in the CAN message data table, and continue to perform signal combination and verification operations until all messages in the network segment have been verified (that is, determine whether all messages in the current network segment have been verified). If all messages in the network segment have been verified, continue to verify the remaining network segments, that is, determine whether all network segments have been verified. If so, end the verification. If not, continue to perform the operation of selecting the network segment to select a network segment from the remaining network segments to continue verification.

[0138] If the second message to be sent does not exist in the third-party platform, it is determined that the critical simulation test of the second message to be sent passes, and the remaining second messages to be sent of the current combination continue to be sent.

[0139] The above explains the execution steps of the critical simulation data test case. The following explains the execution steps of the fuzzy attack test case.

[0140] Before executing fuzzy attack test cases, you need to design fuzzy attack data. Fig.11 In some embodiments, the steps of designing fuzzy attack data include:

[0141] 1. Perform fuzzy attack message data combination.

[0142] Specifically, the fuzzy attack message includes: fuzzy attack message ID, message length, and message content. The format of the fuzzy attack message ID designed in this embodiment is 0x[*][*][*] (such as 0x123), where the value range of "*" in [*] is [0-9], [az], that is, 36 values. On this basis, the value of the entire message ID has 36*36*36 types. Remove the message IDs that already exist in the CAN message data table, and the remaining message IDs are the fuzzy attack message IDs.

[0143] The fuzzy attack message lengths designed in this embodiment are 8 types, namely 8 bytes, 12 bytes, 16 bytes, 20 bytes, 24 bytes, 32 bytes, 48 ​​bytes, and 64 bytes.

[0144] The method for obtaining the fuzzy attack message content designed in this embodiment is: randomly generating a random number corresponding to the byte according to the message length; converting the random number into hexadecimal data to obtain the fuzzy attack message content.

[0145] By combining the above fuzzy attack message ID, message length, and message content, multiple fuzzy attack messages are obtained.

[0146] Second, store the combined multiple fuzzy attack messages into the fuzzy attack data table in the sqlite3 database.

[0147] After the fuzzy attack data design is completed, the fuzzy attack test case can be executed. In some embodiments, the execution steps of the fuzzy attack test case include:

[0148] 1. If the test case to be executed is a fuzzy attack test case, a fuzzy attack data table preset in the target database is read to obtain a plurality of fuzzy attack messages.

[0149] 2. Sending the fuzzy attack message to the vehicle to be tested.

[0150] 3. If the fault information fed back by the vehicle to be tested is received, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded.

[0151] 4. Read the message data uploaded by the vehicle to be tested and received by the third-party platform. If the message data read is the same as the fuzzy attack message, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded.

[0152] It should be noted that, through the above steps, the fuzzy attack test on the vehicle to be tested can be completed well, so as to ensure that the vehicle to be tested can fully filter out the fuzzy attack message and avoid the vehicle to be tested from uploading the wrong fuzzy attack message to the third-party platform.

[0153] Combine the following Fig.12 , the specific steps of executing fuzzy attack test cases are illustrated.

[0154] Please refer to Fig.12 ,First, select the fuzzy attack network segment.

[0155] Secondly, obtain all fuzzy attack messages in the fuzzy attack data table.

[0156] Then, a single fuzzy attack message is sent to the fuzzy attack network segment of the vehicle to be tested.

[0157] Next, check the response of the vehicle to be tested, such as external abnormalities such as a black screen.

[0158] Afterwards, check whether the vehicle to be tested has any functional abnormality. If so, determine the current fuzzy attack message as error information and record it for relevant personnel to view. If not, read the message data uploaded by the vehicle to be tested and received by the third-party platform to determine whether the third-party platform has received the fuzzy attack message. If the third-party platform has received the fuzzy attack message, determine the current fuzzy attack message as error information and record it. If the third-party platform has not received the fuzzy attack message, continue to send the remaining fuzzy attack messages to the fuzzy attack network segment until all fuzzy attack messages are sent. Specifically, determine whether all fuzzy attack messages have been sent. If so, determine whether all network segments have been sent. If not, continue to send the remaining fuzzy attack messages to the fuzzy attack network segment. If there are still network segments that have not been sent, continue to select fuzzy attack network segments from the remaining network segments. If all network segments have been sent, the fuzzy attack test ends.

[0159] In some embodiments, the test case execution instruction is triggered by triggering an instruction triggering area in a display screen;

[0160] Among them, one prerequisite for triggering the instruction trigger area is that at least one test case is selected in the display screen, and the selected test case is the test case to be executed; another prerequisite for triggering the instruction trigger area is that the authentication credentials are valid, and the authentication credentials refer to the authentication credentials entered by the user, and the authentication credentials are used to access the third-party platform.

[0161] It should be noted that, through the above method, the whole process of vehicle communication testing is visualized and simplified, and the operation threshold is low.

[0162] It should also be noted that the vehicle communication test method in the above embodiment has high versatility, can meet the testing needs of most vehicles, has high test efficiency, and has high test signal coverage, strong scalability, low cost, and is easy to implement.

[0163] The vehicle communication test device provided by the present invention is described below. The vehicle communication test device described below and the vehicle communication test method described above can be referred to each other.

[0164] Please refer to Fig.13 , the vehicle communication test device provided in this embodiment includes:

[0165] The instruction receiving module 1310 is used to receive a test case execution instruction, where the test case execution instruction is used to instruct the execution of at least one test case to be executed;

[0166] The first processing module 1320 is used for obtaining, according to the model of the vehicle to be tested, full message data corresponding to the model of the vehicle to be tested from a preset target database if the test case to be executed is a full simulation data test case, wherein the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and a full real signal value of each signal;

[0167] The second processing module 1330 is used to obtain multiple first messages to be sent by combining the real signal values ​​of multiple signals in the simulation message, wherein the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value;

[0168] The third processing module 1340 is used to send the first message to be sent to the vehicle to be tested; read the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed. The instruction receiving module 1310, the first processing module 1320, the second processing module 1330, and the third processing module 1340 are connected. The vehicle communication test device in this embodiment can better realize the automated test of the vehicle to be tested to determine whether the vehicle to be tested can correctly transmit the real signal value to the third-party platform. The test speed is fast and the efficiency is high. Moreover, by adopting the full real signal value and combining the real signal values ​​of different signals, it can cover most of the real signals of the vehicle, thereby improving the accuracy of the vehicle communication test, with low cost and strong feasibility.

[0169] In some embodiments, it further includes: a communication verification module, which is used to determine any network segment of the CAN bus system as a target network segment before obtaining the full message data corresponding to the model of the vehicle to be tested from a preset target database according to the model of the vehicle to be tested;

[0170] Reading the message data of the target network segment to obtain first message data;

[0171] Reading the message data uploaded by the vehicle to be tested and received by the third-party platform, if there is a message with the same message ID as the first message data, determining the message with the same message ID as the first message data as the second message data;

[0172] If the first message data is the same as the second message data, determining that the target network segment communication verification is passed;

[0173] Traverse the remaining network segments of the CAN bus system until the communication verification of all network segments is completed, wherein passing the communication verification is a prerequisite for executing the full simulation data test case.

[0174] In some embodiments, it further includes: a first filling module, configured to fill all the enumerated values ​​into corresponding positions of the full data signal value column if the original value of the acquired signal is a plurality of enumerated values;

[0175] If the original value of the acquired signal is a value range, then according to the preset value interval and the value range, a signal value combination is obtained, and the difference between two adjacent signal values ​​in the value combination is the value interval; the value combination is filled into the corresponding position of the full data signal value column.

[0176] In some embodiments, it further includes: a critical simulation processing module, which is used to obtain critical message data corresponding to the model of the vehicle to be tested from the target database according to the model of the vehicle to be tested if the use case to be executed is a critical simulation data test case, wherein the critical message data includes critical messages of each network segment of the CAN bus system, the signal type included in the critical message is the same as the signal type included in the simulation message, and the critical message includes at least two critical signal values ​​of the signal, and the critical signal value is obtained by expanding the maximum value of the full amount of real signal values, or by reducing the minimum value of the full amount of real signal values, or by synthesizing multiple random arrays into critical signal values;

[0177] By combining the critical signal values ​​of the plurality of signals in the critical message, a plurality of second messages to be sent are obtained, the number of signals included in the second messages to be sent is the same as the number of signals included in the corresponding critical message, and each signal in the second messages to be sent corresponds to a critical signal value;

[0178] The second message to be sent is sent to the vehicle to be tested; the message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data read is the same as the second message to be sent, it is determined that the critical simulation test has failed, and the current second message to be sent is determined as error information and recorded.

[0179] In some embodiments, the method further includes: a second filling module, which is used to obtain a signal maximum value and a signal minimum value in the original value of the current signal if the type of the original value of the acquired signal is a numerical value; determine the sum of the signal maximum value and a preset first numerical value as a first critical value; determine the sum of the signal minimum value and a preset second numerical value as a second critical value; and fill the first critical value and the second critical value into the critical data signal value column;

[0180] If the type of the original value of the acquired signal is text, multiple random numbers are taken to fill in the critical data signal value column.

[0181] In some embodiments, it further includes: a fuzzy attack processing module, which is used to read a fuzzy attack data table preset in the target database to obtain a plurality of fuzzy attack messages if the use case to be executed is a fuzzy attack test case;

[0182] Sending the fuzzy attack message to the vehicle to be tested;

[0183] If the fault information fed back by the vehicle to be tested is received, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded;

[0184] The message data uploaded by the vehicle to be tested and received by the third-party platform is read. If the message data identical to the fuzzy attack message is read, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded.

[0185] This embodiment also provides a vehicle communication test system, please refer to Fig.14 , the system comprises:

[0186] The vehicle to be tested, the CANoe test equipment, and the vehicle communication test device as claimed in claim 9, wherein the vehicle to be tested, the CANoe test equipment, and the vehicle communication test device are connected in sequence, the CANoe test equipment is used to perform protocol conversion, and the vehicle to be tested communicates with the vehicle communication test device through the CANoe test equipment. The vehicle communication test system in this embodiment can better complete the test of vehicle communication, has low cost, and has strong real-time performance.

[0187] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure is shown in FIG. Fig.15 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.

[0188] In some embodiments, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: receiving a test case execution instruction, the test case execution instruction is used to instruct the execution of at least one test case to be executed; if the test case to be executed is a full simulation data test case, then according to the model of the vehicle to be tested, obtaining full message data corresponding to the model of the vehicle to be tested from a preset target database, the full message data including simulation messages of each network segment of a CAN bus system of the vehicle to be tested, the simulation message including multiple signals, and the full real signal value of each signal; obtaining multiple first messages to be sent by combining the real signal values ​​of multiple signals in the simulation message, the number of signals contained in the first message to be sent is the same as the number of signals contained in the corresponding simulation message, and each signal in the first message to be sent corresponds to a real signal value; sending the first message to be sent to the vehicle to be tested; reading the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data received by the third-party platform is the same as the first message to be sent, determining that the full simulation test has passed.

[0189] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving a test case execution instruction, the test case execution instruction is used to instruct the execution of at least one test case to be executed; if the test case to be executed is a full simulation data test case, then according to the model of the vehicle to be tested, the full message data corresponding to the model of the vehicle to be tested is obtained from a preset target database, the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, the simulation message includes multiple signals, and the full real signal value of each signal; by combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, the number of signals contained in the first message to be sent is the same as the number of signals contained in the corresponding simulation message, and each signal in the first message to be sent corresponds to a real signal value; sending the first message to be sent to the vehicle to be tested; reading the message data uploaded by the vehicle to be tested and received by the third-party platform; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

[0190] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0191] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0192] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A vehicle communication test method, characterized in that: include: Receive a test case execution instruction, wherein the test case execution instruction is used to instruct execution of at least one test case to be executed; If the test case to be executed is a full-scale simulation data test case, then according to the model of the vehicle to be tested, the full-scale message data corresponding to the model of the vehicle to be tested is obtained from a preset target database, wherein the full-scale message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and the full-scale real signal value of each signal; By combining the real signal values ​​of multiple signals in the simulation message, multiple first messages to be sent are obtained, the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value; Sending the first message to be sent to the vehicle to be tested; The message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

2. The vehicle communication test method according to claim 1, characterized in that: Before the step of obtaining the full amount of message data corresponding to the model of the vehicle to be tested from a preset target database according to the model of the vehicle to be tested, the method further includes: Determine any network segment of the CAN bus system as a target network segment; Reading the message data of the target network segment to obtain first message data; Reading the message data uploaded by the vehicle to be tested and received by the third-party platform, if there is a message with the same message ID as the first message data, determining the message with the same message ID as the first message data as the second message data; If the first message data is the same as the second message data, determining that the target network segment communication verification is passed; Traverse the remaining network segments of the CAN bus system until the communication verification of all network segments is completed, wherein passing the communication verification is a prerequisite for executing the full simulation data test case.

3. The vehicle communication test method according to claim 1, characterized in that: The target database stores a CAN message data table and a CAN signal table, wherein the CAN message data table includes: message name, message ID, network segment where the message is located, and vehicle model applicable to the message; the CAN signal table includes: message name, message ID, signal name, and full data signal value column, wherein the full data signal value column includes the full real signal value of the signal; The step of filling the full data signal value column comprises: if the original value of the acquired signal is a plurality of enumeration values, filling all the enumeration values ​​into corresponding positions of the full data signal value column; If the original value of the acquired signal is a value range, then according to the preset value interval and the value range, a signal value combination is obtained, and the difference between two adjacent signal values ​​in the value combination is the value interval; the value combination is filled into the corresponding position of the full data signal value column.

4. The vehicle communication test method according to claim 3, characterized in that: If the use case to be executed is a critical simulation data test case, then according to the model of the vehicle to be tested, critical message data corresponding to the model of the vehicle to be tested is obtained from the target database, the critical message data including critical messages of each network segment of the CAN bus system, the signal type included in the critical message is the same as the signal type included in the simulation message, the critical message includes at least two critical signal values ​​of the signal, the critical signal value is obtained by expanding the maximum value of the full amount of real signal values, or by reducing the minimum value of the full amount of real signal values, or by synthesizing multiple random arrays into critical signal values; By combining the critical signal values ​​of the plurality of signals in the critical message, a plurality of second messages to be sent are obtained, the number of signals included in the second messages to be sent is the same as the number of signals included in the corresponding critical message, and each signal in the second messages to be sent corresponds to a critical signal value; Sending the second message to be sent to the vehicle to be tested; The message data uploaded by the vehicle to be tested and received by the third-party platform is read; if the message data read is the same as the second message to be sent, it is determined that the critical simulation test has failed, and the current second message to be sent is determined as error information and recorded.

5. The vehicle communication test method according to claim 4, characterized in that: The CAN signal table further includes a critical data signal value column, wherein the critical data signal value column includes a critical signal value of the signal, and the filling step of the critical data signal value column includes: If the type of the original value of the acquired signal is a numerical value, then the maximum value and the minimum value of the signal in the original value of the current signal are acquired; the sum of the maximum value of the signal and a preset first numerical value is determined as a first critical value; the sum of the minimum value of the signal and a preset second numerical value is determined as a second critical value; the first critical value and the second critical value are filled into the critical data signal value column; If the type of the original value of the acquired signal is text, multiple random numbers are taken to fill in the critical data signal value column.

6. The vehicle communication test method according to claim 1, characterized in that: If the test case to be executed is a fuzzy attack test case, a fuzzy attack data table preset in the target database is read to obtain a plurality of fuzzy attack messages; Sending the fuzzy attack message to the vehicle to be tested; If the fault information fed back by the vehicle to be tested is received, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded; The message data uploaded by the vehicle to be tested and received by the third-party platform is read. If the message data identical to the fuzzy attack message is read, it is determined that the fuzzy attack test has failed, and the current fuzzy attack message is determined as error information and recorded.

7. The vehicle communication test method according to claim 1, characterized in that: The test case execution instruction is triggered by triggering the instruction trigger area in the display screen; Among them, one prerequisite for triggering the instruction trigger area is that at least one test case is selected in the display screen, and the selected test case is the test case to be executed; another prerequisite for triggering the instruction trigger area is that the authentication credentials are valid, and the authentication credentials refer to the authentication credentials entered by the user, and the authentication credentials are used to access the third-party platform.

8. A vehicle communication test device, characterized in that: include: An instruction receiving module, used to receive a test case execution instruction, wherein the test case execution instruction is used to instruct the execution of at least one test case to be executed; A first processing module is used for obtaining, if the test case to be executed is a full simulation data test case, full message data corresponding to the model of the vehicle to be tested from a preset target database according to the model of the vehicle to be tested, wherein the full message data includes simulation messages of each network segment of the CAN bus system of the vehicle to be tested, and the simulation message includes multiple signals and a full real signal value of each signal; A second processing module, configured to obtain a plurality of first messages to be sent by combining the real signal values ​​of a plurality of signals in the simulation message, wherein the number of signals included in the first messages to be sent is the same as the number of signals included in the corresponding simulation message, and each signal in the first messages to be sent corresponds to a real signal value; A third processing module, configured to send the first message to be sent to the vehicle to be tested; Reading the message data uploaded by the vehicle to be tested and received by the third-party platform; If the message data received by the third-party platform is the same as the first message to be sent, it is determined that the full simulation test has passed.

9. A vehicle communication test system, characterized in that: include: A vehicle to be tested, a CANoe test device, and a vehicle communication test device as described in claim 9, wherein the vehicle to be tested, the CANoe test device, and the vehicle communication test device are connected in sequence, the CANoe test device is used to perform protocol conversion, and the vehicle to be tested communicates with the vehicle communication test device through the CANoe test device.

10. An electronic device, characterized in that: It comprises a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the vehicle communication test method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fuzzy test method for vehicle-mounted CAN bus, terminal and computer equipment

    CN113872985A

  • Penetration test method and device of vehicle-mounted network, test equipment and storage medium

    CN116389024A

  • Vehicle data processing method and computer readable storage medium

    CN116932351A

  • Vehicle-mounted software CAN message test method, device, equipment and medium

    CN117784762A

  • Cybersecurity penetration test platform

    US20200412759A1