Anti-disassembly function testing method and system
By using the power module and input/output module in the ETC test system to simulate the communication process between ETC and the certification generation terminal, a binary group is generated and the target frame number is sent, which solves the problem that the existing technology cannot test the anti-tamper function of the CAN network in the vehicle. , achieving high-accuracy automated testing.
Patent Information
- Application Number
- CN202210403374.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-04-18
AI Technical Summary
The existing ETC anti-tampering method mainly targets hardware anti-tampering and cannot effectively test the in-vehicle CAN network anti-tampering function, resulting in the inability to accurately determine the anti-tampering certification results.
By using the power module and input/output module in the test system, the communication process between the ETC and the certification generation terminal is simulated, a binary group is generated and the target frame number is sent, so as to simulate the working conditions of the ETC being connected to different vehicles and realize the verification. Test of CAN anti-tamper function in the car.
It realizes the test of the CAN anti-tamper function in the car, improves the accuracy of the anti-tamper function test results, can automatically conduct unlimited tests, and gets rid of the restrictions of manual operation.
Smart Images

Figure CN114756006B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle ETC technology, and in particular to an anti-disassembly function testing method and system. Background Art
[0002] In order to ensure that the ETC on the vehicle is uniquely matched to the vehicle and not removed from other vehicles and installed, there are two main existing ETC anti-dismantling methods: hard anti-dismantling and in-vehicle CAN network anti-dismantling.
[0003] Among them, the main principle of the in-vehicle CAN network anti-tampering is that the on-board terminal equipment (TelematicsBOX, T-BOX) in each vehicle has a unique vehicle identification number (VIN), so the encryption algorithm between ETC and T-BOX can authenticate each other to output the anti-tampering authentication result.
[0004] However, the correctness of the anti-tampering authentication result needs to be judged by a test device or method for the anti-tampering of the in-vehicle CAN network. The existing test devices and methods are mainly aimed at hardware anti-tampering and are not suitable for the anti-tampering function of the in-vehicle CAN network. Summary of the invention
[0005] The invention provides an anti-disassembly function testing method and system, so as to realize the testing of the anti-disassembly function of CAN in a vehicle.
[0006] According to one aspect of the present invention, there is provided a method for testing an anti-disassembly function, comprising:
[0007] The power module supplies power to the ETC and the authentication generation terminal;
[0008] The input-output module generates a binary group according to the anti-disassembly authentication result, wherein the binary group is formed by the initial vehicle frame number and the corresponding anti-disassembly authentication result, and the anti-disassembly authentication result is output by the ETC after the ETC and the authentication generation terminal complete the anti-disassembly process;
[0009] The input-output module sends a target vehicle frame number to the authentication generation terminal, wherein the target vehicle frame number is different from the initial vehicle frame number;
[0010] The power module cuts off power to the ETC and the authentication generation terminal;
[0011] Return to the step of executing the power module to supply power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module outputs the test result of the anti-disassembly function based on each generated binary group.
[0012] According to another aspect of the present invention, there is provided an anti-disassembly function test system, comprising: an electronic toll collection system ETC, an authentication generation terminal and a test device, wherein the electronic toll collection system ETC, the authentication generation terminal and the test device are connected via network communication, wherein the test device comprises: a power module and an input / output module,
[0013] The electronic toll collection system is used to send an anti-disassembly request message to the authentication generation terminal, and generate the anti-disassembly authentication result according to the returned authentication response message;
[0014] The authentication generation terminal is used to receive the anti-disassembly request message, send an authentication response message to the electronic toll collection system, and receive the target vehicle frame number of the input and output module;
[0015] The power supply module is used to supply power to the anti-disassembly function test system at a regular interval;
[0016] The input-output module is used to output the test result of the anti-disassembly function based on each binary group, and send the target vehicle frame number to the authentication generation terminal.
[0017] The embodiment of the present invention provides an anti-disassembly function testing method and system, the anti-disassembly function testing system includes: an electronic toll collection system ETC, an authentication generation terminal and a testing device, wherein the testing device includes: a power module and an input-output module; the anti-disassembly function testing method includes: the power module supplies power to the ETC and the authentication generation terminal; the input-output module generates a binary group according to the anti-disassembly authentication result, the binary group is formed by an initial vehicle frame number and a corresponding anti-disassembly authentication result, and the anti-disassembly authentication result is output by the ETC after the ETC and the authentication generation terminal complete the anti-disassembly process; the input-output module sends a target vehicle frame number to the authentication generation terminal, and the target vehicle frame number is different from the initial vehicle frame number; the power module cuts off power to the ETC and the authentication generation terminal; returns to execute the step of the power module supplying power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module outputs the test result of the anti-disassembly function based on each generated binary group. By utilizing the above technical solution, the test results of the anti-dismantling function are outputted by the input-output module based on the generated binary groups, thereby realizing the test of the CAN anti-dismantling function in the vehicle. At the same time, by sending the target vehicle frame number to the authentication generation terminal, the working condition of the ETC connected to different vehicles is simulated, thereby further improving the accuracy of the test results of the anti-dismantling function.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flow chart of an anti-disassembly function testing method provided according to Embodiment 1 of the present invention;
[0021] Figure 2 is a flow chart of an anti-disassembly function testing method provided according to Embodiment 2 of the present invention;
[0022] Figure 3 is a flow chart of another anti-disassembly function testing method provided according to the second embodiment of the present invention;
[0023] Figure 4 is a structural schematic diagram of an anti-disassembly function testing system provided according to Embodiment 3 of the present invention;
[0024] Figure 5 It is a structural schematic diagram of an anti-disassembly function testing system provided according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Embodiment 1
[0028] Figure 1 It is a flow chart of an anti-dismantling function testing method provided according to the first embodiment of the present invention. This embodiment is applicable to the situation of testing the anti-dismantling function. The method can be executed by an anti-dismantling function testing system. The anti-dismantling function testing system may include: an electronic toll collection system ETC, an authentication generation terminal and a testing device, etc.
[0029] It should be noted that the Electronic Toll Collection (ETC) system is installed at the front of the vehicle. In order to ensure that the ETC on the vehicle is uniquely matched to the vehicle and not removed from other vehicles and installed, an anti-dismantling function is usually set for the ETC device to protect the transaction security of the ETC owner.
[0030] There are two main methods for ETC anti-disassembly: hard anti-disassembly and in-vehicle CAN network anti-disassembly. Among them, hard anti-disassembly mainly ensures that ETC is not manually disassembled by setting special hardware devices (such as buttons, sliders, etc.); the working principle of in-vehicle CAN network anti-disassembly is mainly: the vehicle-mounted terminal device (Telematics BOX, T-BOX) in each vehicle has a unique vehicle identification number (VIN), and the front-mounted ETC and T-BOX have the function of CAN communication, so the encryption algorithm between ETC and T-BOX can be set to authenticate each other. If ETC finds that the VIN of T-BOX is different from the correct VIN during the authentication process, it will output a message of anti-disassembly authentication failure, thereby ensuring that the VIN of ETC and vehicle T-BOX is unique.
[0031] Whether the anti-dismantling certification result is correct or not needs to be judged by a testing device or method. The existing ETC anti-dismantling testing device and method are mainly for hardware anti-dismantling testing. The hard anti-dismantling function is tested by setting the hardware button angle or spring device. Therefore, there is no testing device or method for the anti-dismantling function of the in-vehicle CAN network.
[0032] Based on this, the embodiment of the present invention proposes an anti-dismantling function testing method for the in-vehicle CAN network anti-dismantling function of the pre-installed ETC in the car. By building an automated test bench, it simulates the working conditions of the ETC being normally not disassembled in the car and being disassembled to other cars, thereby testing the in-vehicle CAN anti-dismantling function of the ETC.
[0033] like Figure 1 As shown, the method includes:
[0034] S110. The power module supplies power to the ETC and the authentication generation terminal.
[0035] The power module can be considered as a module that supplies power to the electronic toll collection system ETC and the authentication generation terminal, for example, it can be an installed power module, or it can be the power supply of the actual vehicle, etc. Among them, the electronic toll collection system ETC can refer to an electronic automatic toll collection system for roads, bridges and tunnels, and the authentication generation terminal can be a terminal for generating an authentication response message, which is used to generate an authentication response message according to the authentication request of the ETC and send it to the ETC.
[0036] It can be considered that each time the power module is powered on, the anti-disassembly process will be triggered. The specific process of the anti-disassembly process is not limited. For example, an anti-disassembly request message is sent to the data receiving interface of the authentication generation terminal through the data sending interface of the ETC, and the ETC outputs the anti-disassembly authentication result according to the authentication response message returned by the authentication generation terminal.
[0037] S120, the input-output module generates a binary group according to the anti-dismantling authentication result, wherein the binary group is formed by the initial vehicle frame number and the corresponding anti-dismantling authentication result, and the anti-dismantling authentication result is output by the ETC after the ETC and the authentication generation terminal execute the anti-dismantling process.
[0038] In this embodiment, the input-output module can be considered as a module that receives the anti-disassembly authentication result and outputs the anti-disassembly function test result. The anti-disassembly authentication result can be the result output by the ETC after the ETC and the authentication generation terminal complete the anti-disassembly process. For example, the anti-disassembly authentication result can include success and / or failure. The anti-disassembly function test result can be the result of testing the anti-disassembly authentication result, such as the anti-disassembly function test result can be correct or wrong.
[0039] A tuple can be formed by an initial frame number and a corresponding anti-dismantling authentication result, and is used for subsequent testing to obtain an anti-dismantling function test result. The initial frame number can be understood as the frame number of the authentication generation terminal when the anti-dismantling process is first triggered. It can be considered that the initial frame number can be a frame number that uniquely matches the ETC, or a frame number that does not match the ETC. This embodiment does not limit this. The match can be understood as the frame number in the authentication response message returned by the authentication generation terminal is the frame number written when the ETC device is installed.
[0040] Specifically, the input-output module may generate a binary group according to the anti-tampering authentication result. The specific process of generating the binary group is not limited as long as the binary group can be generated.
[0041] S130: The input-output module sends a target vehicle frame number to the authentication generation terminal, where the target vehicle frame number is different from the initial vehicle frame number.
[0042] The target frame number can be considered to be a frame number different from the initial frame number. The initial frame number and the target frame number are only used to distinguish different vehicles, that is, each vehicle has a unique frame number. The frame number can be understood as a vehicle identification code, which can include information such as the vehicle manufacturer, year, model, body type and code, engine code, and assembly location. It can be considered that the target frame number can be a frame number that uniquely matches the ETC, or a frame number that does not match the ETC, and this embodiment does not limit this.
[0043] The target vehicle frame number written into the authentication generation terminal may be different each time to improve the accuracy of the test.
[0044] In this step, the input-output module can send the target frame number to the authentication generation terminal to modify the frame number of the authentication generation terminal to simulate the working condition that the ETC is disassembled and replaced on another vehicle. This step does not limit the specific method of sending the target frame number to the authentication generation terminal. For example, the target frame number can be sent directly to the authentication generation terminal, or the target frame number can be encrypted and sent to the authentication generation terminal.
[0045] S140. The power module cuts off power to the ETC and the authentication generation terminal.
[0046] After the input-output module sends the target vehicle frame number to the authentication generation terminal, the power module can be made to cut off the power to the ETC and the authentication generation terminal so that power can be supplied again to trigger the next anti-disassembly process to obtain the anti-disassembly authentication result corresponding to the target vehicle frame number. The means of powering off are not limited, for example, it can be manually operated by relevant technicians, or the system can be set to realize the function of automatically triggering the anti-disassembly process.
[0047] S150, returning to the step of executing the power module to supply power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module outputs the test result of the anti-disassembly function based on each generated binary group.
[0048] The end condition can be understood as the condition for ending the anti-dismantling function test method. The end condition can be set by the system or relevant technical personnel. For example, the end condition can be the completion of a set number of anti-dismantling function test methods. The specific value of the set number is not limited, such as 100.
[0049] In this step, you can return to the step of executing the power module to power the ETC and the authentication generation terminal to start a new round of anti-dismantling process and testing method. It should be noted that each time the anti-dismantling function test method is triggered, the frame number of the current authentication generation terminal can be considered as the initial frame number.
[0050] In addition, the present embodiment can loop through the method for anti-disassembly function testing according to different situations to obtain multiple binary groups, and when the termination condition is met, the input and output module can output the anti-disassembly function test result based on each binary group generated. The specific steps for determining the anti-disassembly function test result based on each binary group are not further limited.
[0051] Exemplarily, each binary group can be divided into two groups according to the frame number in each binary group, namely a binary group consisting of frame numbers that match the ETC and a binary group consisting of frame numbers that do not match the ETC. Then, if the anti-dismantling authentication results in the binary group consisting of frame numbers that match the ETC are all successful, and the anti-dismantling authentication results in the binary group consisting of frame numbers that do not match the ETC are all failed, then the test result of the anti-dismantling function can be correct; otherwise, the test result of the anti-dismantling function is wrong.
[0052] A method for testing an anti-disassembly function provided by the first embodiment of the present invention includes: the power module supplies power to the ETC and the authentication generation terminal; the input-output module generates a binary group according to the anti-disassembly authentication result, the binary group is formed by the initial frame number and the corresponding anti-disassembly authentication result, and the anti-disassembly authentication result is output by the ETC after the ETC and the authentication generation terminal execute the anti-disassembly process; the input-output module sends the target frame number to the authentication generation terminal, and the target frame number is different from the initial frame number; the power module cuts off the power to the ETC and the authentication generation terminal; returns to execute the step of the power module supplying power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module outputs the test result of the anti-disassembly function based on each generated binary group. Using this method, the test result of the anti-disassembly function of the CAN in the vehicle is realized by the input-output module outputting the test result of the anti-disassembly function based on each generated binary group. At the same time, by sending the target frame number to the authentication generation terminal, the working condition of the ETC connected to different vehicles is simulated, and the accuracy of the test result of the anti-disassembly function is further improved.
[0053] In one embodiment, before the input-output module generates a binary group according to the anti-tampering authentication result, the input-output module further includes:
[0054] The ETC sends an anti-disassembly request message to the authentication generation terminal;
[0055] The authentication generation terminal sends an authentication response message to ETC;
[0056] The ETC outputs the anti-tampering authentication result.
[0057] Among them, the anti-disassembly request message can be used to represent the request for authenticating the frame number, and the authentication response message can be considered as a message containing the frame number of the authentication generating terminal.
[0058] It can be understood that before the input-output module generates a binary group according to the anti-dismantling authentication result, the anti-dismantling process of this embodiment needs to be performed. The specific process can be: ETC sends an anti-dismantling request message to the authentication generation terminal; after the authentication generation terminal receives the anti-dismantling request message, the authentication generation terminal can generate an authentication response message according to the frame number and send it to ETC; ETC authenticates the frame number in the authentication response message to output the anti-dismantling authentication result.
[0059] Exemplarily, when the authentication generating terminal is a vehicle-mounted device terminal (i.e., T-BOX), ETC first sends an anti-dismantling request message to the vehicle-mounted device terminal; after receiving the anti-dismantling request message, T-BOX needs to generate an authentication response message based on its own VIN code and encryption algorithm, and send the authentication response message to ETC; secondly, ETC receives the authentication response message and authenticates the authentication response message according to the encryption algorithm; finally, ETC can output the anti-dismantling authentication result (such as success or failure).
[0060] In one embodiment, the input-output module generates a binary group according to the anti-tampering authentication result, including:
[0061] The input-output module reads the frame number of the authentication generation terminal, where the frame number of the authentication generation terminal includes an initial frame number and a target frame number;
[0062] A tuple is generated according to the frame number of the authentication generating terminal and the corresponding anti-disassembly authentication result.
[0063] In this embodiment, in the process of generating a binary group according to the anti-disassembly authentication result, the input-output module needs to obtain the frame number of the authentication generation terminal, and then form a binary group with the obtained frame number and the corresponding anti-disassembly authentication result. The specific method of obtaining the frame number of the authentication generation terminal is not limited, such as directly obtaining the frame number of the authentication generation terminal through network communication, or reading the frame number of the authentication generation terminal through a diagnostic command. The frame number of the authentication generation terminal may include an initial frame number and a target frame number, which will not be further expanded here.
[0064] In one embodiment, the input-output module sends the target vehicle frame number to the authentication generation terminal, including:
[0065] The input-output module sends a diagnostic command to the authentication generation terminal, and the diagnostic command includes a target vehicle frame number.
[0066] Among them, the diagnostic command can be considered as a command for data transmission based on the diagnostic function. When sending the target frame number to the authentication generation terminal, this embodiment can send the target frame number to the authentication generation terminal through the diagnostic command, so as to ensure the accurate transmission of the target frame number. At the same time, when the authentication generation terminal receives the diagnostic command, it can return a reception message to the input and output module, and the reception message indicates that the target frame number in the diagnostic command has been received.
[0067] Embodiment 2
[0068] Figure 2 It is a flow chart of an anti-disassembly function test method provided according to the second embodiment of the present invention, and the second embodiment is optimized on the basis of the above embodiments. In this embodiment, the input-output module outputs the test results of the anti-disassembly function based on each generated binary group, which is further specified as follows: the input-output module obtains each first sending time and each second sending time, the first sending time is the length of the time period from the power supply module starting to supply power to the ETC sending out the anti-disassembly request message, and the second sending time is the length of the time period from the authentication generation terminal receiving the anti-disassembly request message to the authentication generation terminal sending out the authentication response message; the input-output module outputs the test results of the anti-disassembly function based on each first sending time, each second sending time, and / or each binary group.
[0069] For details not yet provided in this embodiment, please refer to Embodiment 1.
[0070] like Figure 2 As shown, a method for testing an anti-disassembly function provided by Embodiment 2 of the present invention includes the following steps:
[0071] S210. The power module supplies power to the ETC and the authentication generation terminal.
[0072] S220, the input-output module generates a binary group according to the anti-dismantling authentication result, wherein the binary group is formed by the initial vehicle frame number and the corresponding anti-dismantling authentication result, and the anti-dismantling authentication result is output by the ETC after the ETC and the authentication generation terminal execute the anti-dismantling process.
[0073] S230: The input-output module sends a target vehicle frame number to the authentication generation terminal, where the target vehicle frame number is different from the initial vehicle frame number.
[0074] S240. The power module cuts off power to the ETC and the authentication generation terminal.
[0075] S250, returning to the step of executing the power module to supply power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module obtains each first sending time and each second sending time.
[0076] Among them, the first sending time can be considered as the length of the time period from when the power module starts to supply power to when the ETC sends out the anti-dismantling request message, and the second sending time can be considered as the length of the time period from when the authentication generation terminal receives the anti-dismantling request message to when the authentication generation terminal sends out the authentication response message.
[0077] Specifically, during the process of performing each anti-dismantling process, the input-output module may monitor and record the first sending time and the second sending time in the anti-dismantling process to assist in judging the test result of the anti-dismantling function.
[0078] S260: The input / output module outputs a test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group.
[0079] In this embodiment, the test result of the anti-tampering function may be output based on each first sending time, each second sending time and / or each binary group, and the specific method of outputting the test result of the anti-tampering function is not limited.
[0080] Exemplarily, it can be determined whether the number of times each first transmission time and each second transmission time is less than the set value exceeds the set number. If the number of times each first transmission time and each second transmission time is less than the set value exceeds the set number, and the frame number in each tuple is the frame number matched by the ETC, the corresponding anti-disassembly authentication result is successful, and the frame number in each tuple is the frame number that does not match the ETC, the corresponding anti-disassembly authentication result is failed, then the test result of the anti-disassembly function is output as correct, otherwise, the test result of the anti-disassembly function is output as wrong in other cases. This step does not limit the specific values of the set value and the set number of times, for example, it can be determined based on empirical values.
[0081] The second embodiment of the present invention provides an anti-disassembly function testing method, which can determine the test result of the anti-disassembly function by acquiring each first sending time and each second sending time and combining them with each binary group, thereby making the test result of the anti-disassembly function more accurate.
[0082] In one embodiment, the input-output module outputs the test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group, including:
[0083] If all the first sending times are less than the first time threshold, and all the second sending times are less than the second time threshold, and the frame number and the anti-disassembly authentication result of the authentication generation terminal in each tuple correspond one-to-one with the frame number and the anti-disassembly authentication result in the preset tuple, then the test result of the anti-disassembly function is output as the anti-disassembly function is correct, the preset tuple is a tuple formed by the frame number matched by the ETC and the anti-disassembly authentication result being successful, or a tuple formed by the frame number not matched by the ETC and the anti-disassembly authentication result being failed, and the frame number of the authentication generation terminal includes the initial frame number and the target frame number;
[0084] Otherwise, the test result of the anti-tampering function is output as an anti-tampering function error.
[0085] Among them, the first time threshold can be the maximum critical value of the first sending time, and the second time threshold can be the maximum critical value of the second sending time. The first time threshold and the second time threshold are only used to distinguish different objects, and can be the same or different. This embodiment does not limit this.
[0086] It is understandable that the preset binary group may be a binary group preset by the system, which may be used to judge the test result of the anti-disassembly function. The preset binary group may be a binary group formed by the frame number matched by ETC and the anti-disassembly authentication result being successful, or a binary group formed by the frame number not matched by ETC and the anti-disassembly authentication result being failed.
[0087] Specifically, when all the first sending times are less than the first time threshold, and all the second sending times are less than the second time threshold, and the frame number and the anti-disassembly authentication result of the authentication generation terminal in each binary group correspond one-to-one with the frame number and the anti-disassembly authentication result in the preset binary group, it means that all the first sending times and the second sending times are less than the maximum critical value of the sending time, and the frame number of the authentication generation terminal in each binary group completely corresponds to the anti-disassembly authentication result, so it can be considered that the anti-disassembly authentication result output by the anti-disassembly function is completely correct, that is, the test result is that the anti-disassembly function is correct;
[0088] On the contrary, when the first sending time is greater than the first time threshold, or the second sending time is greater than the second time threshold, or the frame number and anti-dismantling authentication result of the authentication generating terminal in each tuple do not correspond one to one with the frame number and anti-dismantling authentication result in the preset tuple, it means that the first sending time or the second sending time exceeds the maximum critical value of the sending time, or the frame number of the authentication generating terminal in each tuple does not completely correspond to the anti-dismantling authentication result (that is, there is an incorrect anti-dismantling authentication result). At this time, it can be considered that the test result of the anti-dismantling function is that the anti-dismantling function is wrong.
[0089] Figure 3It is a flowchart of another anti-disassembly function test method provided according to Embodiment 2 of the present invention. Before the anti-disassembly function test starts, the time interval of the power switch (i.e., the power module) can be set, that is, the cycle of power-on and power-off (i.e., the moments of power supply and power cut). In one power-on cycle, as Figure 3 shown, the specific process of the anti-disassembly function test can be as follows:
[0090] Step 01 can be to power on ETC and T-BOX (i.e., the authentication generation terminal), (at this time, the anti-disassembly process is triggered);
[0091] Steps 02, 03, and 04 can be considered as the message exchange between ETC and T-BOX (i.e., the anti-disassembly process). At this time, the CANOE software (i.e., the input-output module) is responsible for monitoring and recording the sending time of the messages (i.e., the first sending time, the second sending time), and then comparing with the message time limits (i.e., the first time threshold, the second time threshold) as auxiliary information for the test result. (If the sending time of the message by ETC or T-BOX exceeds the specified time limit, that is, there is a situation where the first sending time is greater than the first time threshold, or there is a situation where the second sending time is greater than the second time threshold, it can be determined that the anti-disassembly authentication process fails, that is, the test result of the anti-disassembly function is output as anti-disassembly function error).
[0092] Step 05 can be that the CANOE software receives the anti-disassembly inspection result message (i.e., the anti-disassembly authentication result) sent by ETC and records it. (At this time, the CANOE software can form a binary group in the form of <VIN code of T-BOX, ETC anti-disassembly inspection result> for finally checking the result, that is, outputting the test result of the anti-disassembly function);
[0093] Step 06 can be that the CANOE software reads the current VIN code of T-BOX (i.e., reads the vehicle frame number of the authentication generation terminal) through the diagnostic command and records it. Among them, the execution order of Step 05 and Step 06 is not limited. Step 06 can be executed first and then Step 05, or Step 05 and Step 06 can be executed simultaneously;
[0094] Step 07 can be that the CANOE software writes a new VIN code (i.e., the target vehicle frame number) to T-BOX through the diagnostic command;
[0095] Step 08: Power off ETC and T-BOX (i.e., the power module cuts off the power supply to ETC and the authentication generation terminal).
[0096] Finally, return to the step of the power module supplying power to ETC and the authentication generation terminal until the end condition is met. In this embodiment, different numbers of loops can be set according to different situations, and theoretically, an infinite number of loops can be set.
[0097] Finally, multiple binary tuples of <VIN code of the T-BOX, ETC anti-tampering inspection result> can be obtained. The expected result is that only the ETC anti-tampering inspection result corresponding to the correct T-BOX VIN code is correct (i.e., the anti-tampering authentication result is successful), and the results corresponding to the remaining VIN codes are all anti-tampering authentication failures (i.e., the anti-tampering authentication result is failed). That is, the preset binary tuple is the binary tuple formed by the vehicle identification number matched by the ETC and the successful anti-tampering authentication result, or the binary tuple formed by the vehicle identification number not matched by the ETC and the failed anti-tampering authentication result.
[0098] If the actual result is the same as the expected result (i.e., the vehicle identification number of the authentication generation terminal and the anti-tampering authentication result in each binary tuple correspond one by one to the vehicle identification number and the anti-tampering authentication result in the preset binary tuple), then the test result of the anti-tampering function is output as the anti-tampering function is correct; if the actual result is different from the expected result, it indicates that there is an error in the in-vehicle CAN anti-tampering function of the ETC (i.e., the test result of the anti-tampering function is output as the anti-tampering function is incorrect).
[0099] Based on this, the advantages of the embodiments of the present invention are mainly as follows:
[0100] First of all, the anti-tampering function test method of the present invention is an automated test method. In theory, it can automatically perform an infinite number of anti-tampering function tests. By building a test bench, using a real in-vehicle device terminal (T-BOX), connecting it to the ETC to be tested through a CAN network, and connecting to a 12V power supply, to simulate the working condition of triggering the anti-tampering process after the vehicle is powered on, and collecting the results of the ETC anti-tampering function implementation (i.e., the anti-tampering authentication result) through CANOE software. At the same time, the power module can be connected to a host computer software that can control the switch state, and set to click the power switch regularly in a loop to achieve the function of automatically triggering the anti-tampering process;
[0101] Secondly, the anti-tampering function test method proposed by the present invention can simulate the working condition of the ETC being disassembled and replaced on other wrong vehicles by modifying the VIN code of the TBOX. In the embodiments of the present invention, the vehicle that is uniquely matched with the ETC to be tested is called the correct vehicle, and the vehicle that is not matched with the ETC to be tested is called the wrong vehicle.
[0102] Finally, the present invention can also accurately judge whether the anti-tampering result is successful according to the time limit of the anti-tampering process.
[0103] In addition, the embodiments of the present invention can also not use a real T-BOX to connect to the ETC, but use a CAN message device to simulate the T-BOX to send a CAN signal to the ETC. This test method requires obtaining the authentication algorithm process between the T-BOX and the ETC in order to simulate the correct authentication message sent by the T-BOX to the ETC.
[0104] The embodiment of the present invention can also place the ETC on a real vehicle and modify the VIN code of the T-BOX in the real vehicle to simulate the working condition of the ETC being removed from other vehicles. This test method requires manual power-on and power-off of the vehicle, and the real vehicle has various limitations (fuel volume, location, interference from other controllers, etc.), and multiple tests cannot be completed in a short time.
[0105] Embodiment 3
[0106] Figure 4 FIG. 1 is a schematic diagram of a structure of an anti-disassembly function testing system provided according to Embodiment 3 of the present invention. Figure 4 As shown, the system includes: an electronic toll collection system ETC1, an authentication generation terminal 2 and a test device 3, wherein the electronic toll collection system ETC1, the authentication generation terminal 2 and the test device 3 are connected via network communication, wherein the test device 3 includes: a power module 4 and an input / output module 5,
[0107] The electronic toll collection system 1 is used to send an anti-disassembly request message to the authentication generation terminal 2, and generate the anti-disassembly authentication result according to the returned authentication response message;
[0108] The authentication generation terminal 2 is used to receive the anti-disassembly request message, send an authentication response message to the electronic toll collection system 1, and receive the target vehicle frame number of the input and output module 5;
[0109] The power supply module 4 is used to supply power to the anti-disassembly function test system at a regular interval;
[0110] The input-output module 5 is used to output the test result of the anti-disassembly function based on the binary group, and send the target vehicle frame number to the authentication generation terminal 2.
[0111] In one embodiment, the electronic toll collection system, the authentication generation terminal and the test equipment are connected via a controller area network (CAN) communication.
[0112] In this embodiment, the electronic toll collection system, the authentication generation terminal and the test equipment are connected via the controller area network CAN communication, so that the anti-disassembly function test system has high reliability and good error detection capability.
[0113] In one embodiment, the power supply module includes a power supply unit and a host computer unit. The power supply unit is used to supply power to the anti-disassembly function test system, and the host computer unit is used to control the switch of the power supply unit at a fixed time.
[0114] In this embodiment, the power module may include a power supply unit and a host computer unit. The power supply unit may be a unit for supplying power to the anti-dismantling function test system, and the host computer unit may be used to time the switch of the power supply unit to realize the function of automatically triggering the anti-dismantling process.
[0115] In one embodiment, the input-output module includes a bus development environment CANOE.
[0116] In this step, the bus development environment (CAN open environment, CANOE) has a test function set that can be used to simplify or automatically test. In addition, CANOE also has a diagnostic function set for performing diagnostic communication with the certification generation terminal.
[0117] Figure 5 FIG. 1 is a schematic diagram of a structure of an anti-disassembly function testing system provided according to Embodiment 3 of the present invention. Figure 5 As shown, the anti-disassembly function test system includes: a 12V power supply (i.e., a power supply unit), a host computer software that can control the power switch (i.e., a host computer unit), a real vehicle-mounted terminal device (i.e., an authentication generation terminal), CANOE software and CANOE hardware devices (i.e., input and output modules).
[0118] It is understandable that in the existing ETC in-vehicle CAN network anti-tampering function, ETC only interacts with the vehicle terminal system, so the anti-tampering function test system uses a real T-BOX device to connect the ETC and T-BOX through a CAN line; a 12V power supply is used to power the ETC and T-BOX, and a host computer software that can control the switch status is connected to control the power switch to achieve automatic power on and off.
[0119] At the same time, use the computer and CANOE software as signal input / output devices. The computer (CANOE software) has two functions:
[0120] 1. Receive and save the anti-tampering authentication result (anti-tampering authentication success message or anti-tampering authentication failure message) output by ETC after completing the anti-tampering process;
[0121] 2. Use the diagnostic function of CANOE software to flash different VIN codes to T-BOX to simulate the working conditions of ETC connected to different vehicles.
[0122] From the above description, it can be found that the embodiment of the present invention is a test method for the new function of ETC (i.e., the in-vehicle CAN anti-disassembly function). On the one hand, the present invention proposes an automated test method, which can get rid of manual work and perform unlimited anti-disassembly function tests. Its automation is reflected in:
[0123] (1) The ETC will trigger the anti-disassembly process every time it is powered on. Therefore, the present invention is connected to a host computer software that can control the power switch, and a timed cycle can be set to click the power switch to realize the function of automatically triggering the anti-disassembly process.
[0124] (2) Build a test sequence on the CANOE software. After the software is running, it can automatically write the VIN to the T-BOX periodically and automatically receive and save the anti-tampering authentication results output by the ETC.
[0125] On the other hand, the present invention proposes to modify the VIN code of the TBOX to simulate the condition where the ETC is disassembled and replaced on another vehicle.
Claims
1. A method for testing the anti-tampering function. It is characterized in that Applied to an anti-disassembly function test system, the anti-disassembly function test system comprises: an electronic toll collection system ETC, an authentication generation terminal and a test device, wherein the test device comprises: a power module and an input and output module; The anti-disassembly function testing method comprises: The power module supplies power to the ETC and the authentication generation terminal; The input-output module generates a binary group according to the anti-disassembly authentication result, wherein the binary group is formed by the initial vehicle frame number and the corresponding anti-disassembly authentication result, and the anti-disassembly authentication result is output by the ETC after the ETC and the authentication generation terminal complete the anti-disassembly process; The input-output module sends a target vehicle frame number to the authentication generation terminal, wherein the target vehicle frame number is different from the initial vehicle frame number; The power module cuts off power to the ETC and the authentication generation terminal; Return to the step of executing the power module to supply power to the ETC and the authentication generation terminal until the end condition is met, and the input-output module outputs the test result of the anti-disassembly function based on each generated binary group; The input-output module outputs the test results of the anti-disassembly function based on each generated binary group, including: The input-output module acquires each first sending time and each second sending time, wherein the first sending time is the duration from when the power module starts to supply power to when the ETC sends out the anti-disassembly request message, and the second sending time is the duration from when the authentication generation terminal receives the anti-disassembly request message to when the authentication generation terminal sends out the authentication response message; The input-output module outputs the test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group; The input / output module outputs the test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group, including: If all the first sending times are less than the first time threshold, and all the second sending times are less than the second time threshold, and the frame number and the anti-disassembly authentication result of the authentication generation terminal in each tuple correspond one-to-one with the frame number and the anti-disassembly authentication result in the preset tuple, then the test result of the anti-disassembly function is output as the anti-disassembly function is correct, the preset tuple is a tuple formed by the frame number matched by the ETC and the anti-disassembly authentication result being successful, or a tuple formed by the frame number not matched by the ETC and the anti-disassembly authentication result being failed, and the frame number of the authentication generation terminal includes the initial frame number and the target frame number; Otherwise, the test result of the anti-tampering function is output as an anti-tampering function error.
2. The method according to claim 1, It is characterized in that Before the input-output module generates a binary group according to the anti-disassembly authentication result, the input-output module further includes: The ETC sends an anti-disassembly request message to the authentication generation terminal; The authentication generation terminal sends an authentication response message to ETC; The ETC outputs the anti-tampering authentication result.
3. The method according to claim 1, It is characterized in that The input-output module generates a binary group according to the anti-disassembly authentication result, including: The input-output module reads the frame number of the authentication generation terminal, where the frame number of the authentication generation terminal includes an initial frame number and a target frame number; A tuple is generated according to the frame number of the authentication generating terminal and the corresponding anti-disassembly authentication result.
4. The method according to claim 1, It is characterized in that The input-output module sends the target vehicle frame number to the authentication generation terminal, including: The input-output module sends a diagnostic command to the authentication generation terminal, and the diagnostic command includes a target vehicle frame number. 5.An anti-tampering function testing system, It is characterized in that include: An electronic toll collection system ETC, an authentication generation terminal and a test device, wherein the electronic toll collection system ETC, the authentication generation terminal and the test device are connected via network communication, wherein the test device comprises: a power module and an input / output module, The electronic toll collection system is used to send an anti-disassembly request message to the authentication generation terminal, and generate an anti-disassembly authentication result according to the returned authentication response message; The authentication generation terminal is used to receive the anti-disassembly request message, send an authentication response message to the electronic toll collection system, and receive the target vehicle frame number of the input and output module; The power supply module is used to supply power to the anti-disassembly function test system at a regular interval; The input-output module is used to output the test result of the anti-disassembly function based on each binary group, and send the target vehicle frame number to the authentication generation terminal; The input and output module is used to output the test result of the anti-disassembly function for each binary group and send the target vehicle frame number to the authentication generation terminal, including: The input-output module obtains each first sending time and each second sending time; wherein the first sending time is the duration from when the power module starts to supply power to when the ETC sends out the anti-disassembly request message, and the second sending time is the duration from when the authentication generation terminal receives the anti-disassembly request message to when the authentication generation terminal sends out the authentication response message. The input-output module outputs the test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group; The input / output module outputs the test result of the anti-disassembly function based on each first sending time, each second sending time and / or each binary group, including: If all the first sending times are less than the first time threshold, and all the second sending times are less than the second time threshold, and the frame number and the anti-disassembly authentication result of the authentication generation terminal in each tuple correspond one-to-one with the frame number and the anti-disassembly authentication result in the preset tuple, then the test result of the anti-disassembly function is output as the anti-disassembly function is correct, the preset tuple is a tuple formed by the frame number matched by the ETC and the anti-disassembly authentication result being successful, or a tuple formed by the frame number not matched by the ETC and the anti-disassembly authentication result being failed, and the frame number of the authentication generation terminal includes the initial frame number and the target frame number; Otherwise, the test result of the anti-tampering function is output as an anti-tampering function error.
6. The system according to claim 5, It is characterized in that The electronic toll collection system, the authentication generation terminal and the test equipment are connected via a controller area network (CAN) communication.
7. The system according to claim 5, It is characterized in that The power supply module comprises a power supply unit and a host computer unit. The power supply unit is used to supply power to the anti-disassembly function test system, and the host computer unit is used to control the switch of the power supply unit at a fixed time.
8. The system according to claim 5, It is characterized in that The input and output modules include the bus development environment CANOE.
