Vehicle fault code testing method and device, storage medium and electronic device
By acquiring and sending the vehicle controller's configuration information, the test results are determined, which solves the problem of long testing times for vehicle fault codes and improves testing efficiency.
Patent Information
- Application Number
- CN202310685485.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-06-09
AI Technical Summary
Existing technologies for testing vehicle fault codes are time-consuming, resulting in low testing efficiency.
By acquiring the configuration information of the controller in the target vehicle, determining the second configuration information, and sending this information to the controller, the test result is determined in response to receiving the target response information, thereby shortening the test time.
This has shortened the fault code testing time and improved testing efficiency.
Smart Images

Figure CN116560346B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicles, in particular to a vehicle fault code testing method and device, a storage medium and an electronic device. BACKGROUND
[0002] At present, in order to meet the needs of the market and users, there are usually multiple configurations in the same vehicle model. For the vehicle controller, the difference between different configurations may be: 1. Whether to be equipped with a certain controller, for example, a high-end vehicle is equipped with an automatic parking controller, while a low-end vehicle does not have the controller; 2. The software functions of the controller are different, for example, the software functions of the controller of a high-end vehicle are more, while the software functions of the controller of a low-end vehicle are less.
[0003] Therefore, the fault codes supported by the same controller under different configurations may be different, so it is necessary to write the configuration code to make the controller clear the configuration and the fault code list of the vehicle, so as to provide correct fault prompts. In order to prevent the controller from misreporting or missing reporting fault codes, it is necessary to verify the fault codes supported by the controller under different configurations.
[0004] In the related art, the configuration code is usually manually written to the controller, and then the fault codes supported by the controller are read and checked one by one to verify whether the fault codes supported by the controller under the configuration code are correct. However, this method is time-consuming and inefficient.
[0005] At present, there is no effective solution to the above problems. SUMMARY
[0006] The embodiments of the present application provide a vehicle fault code testing method and device, a storage medium and an electronic device, to at least solve the technical problem of low fault code testing efficiency caused by long fault code testing time of the vehicle in the related art.
[0007] According to one of the embodiments of the present application, a vehicle fault code testing method is provided, comprising: obtaining first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller; determining second configuration information based on the first configuration information, and sending the second configuration information to the at least one controller; in response to receiving target response information corresponding to the second configuration information, determining a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
[0008] Optionally, the target identification information comprises a configuration code data identifier, and the determining the second configuration information based on the first configuration information comprises: obtaining a target character length corresponding to the configuration code data identifier and the preset configuration code; and determining the second configuration information based on a first comparison result of the target character length and the preset character length.
[0009] Optionally, the target identification information further comprises data frame interval information, and the determining the second configuration information based on the first comparison result of the target character length and the preset character length comprises: in response to the target character length being less than or equal to the preset character length, determining the first frame, the configuration code data identifier and the preset configuration code as the second configuration information; and in response to the target character length being greater than the preset character length, sending the first frame and determining the second configuration information based on the data frame interval information.
[0010] Optionally, the determining the second configuration information based on the data frame interval information comprises: in response to the data frame interval information being a null value, determining the continuous frame to be sent as the second configuration information based on a flow control frame corresponding to the at least one controller; and in response to the data frame interval information not being the null value, determining the continuous frame to be sent as the second configuration information based on the data frame interval information.
[0011] Optionally, the determining the target test result corresponding to the at least one controller based on the target response information comprises: obtaining a candidate fault code supported by the at least one controller based on the target response information; and determining the target test result based on a second comparison result of the candidate fault code and the preset fault code.
[0012] Optionally, the determining the target test result based on the second comparison result of the candidate fault code and the preset fault code comprises: in response to the candidate fault code being the same as the preset fault code, determining that a test result corresponding to the preset configuration code is a test success; and in response to the candidate fault code being different from the preset fault code, determining that the test result corresponding to the preset configuration code is a test failure.
[0013] According to an embodiment of the present application, a vehicle fault code testing device is provided, comprising: an obtaining module, configured to obtain first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information corresponding to the at least one controller, a preset configuration code and a preset fault code; a sending module, configured to determine second configuration information based on the first configuration information, and send the second configuration information to the at least one controller; and a processing module, configured to, in response to receiving target response information corresponding to the second configuration information, determine a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to represent a test result corresponding to the preset configuration code.
[0014] Optionally, the sending module is further configured to obtain a target character length corresponding to the preset configuration code according to the configuration code data identifier; and determine the second configuration information based on a first comparison result of the target character length and a preset character length.
[0015] Optionally, the sending module is further configured to, in response to the target character length being less than or equal to the preset character length, determine the first frame, the configuration code data identifier and the preset configuration code as the second configuration information; and in response to the target character length being greater than the preset character length, send the first frame and determine the second configuration information based on the data frame interval information.
[0016] Optionally, the sending module is further configured to, in response to the data frame interval information being a null value, determine the continuous frames to be sent as the second configuration information based on the flow control frame corresponding to the at least one controller; and in response to the data frame interval information not being the null value, determine the continuous frames to be sent as the second configuration information based on the data frame interval information.
[0017] Optionally, the processing module is further configured to obtain a candidate fault code supported by the at least one controller based on the target response information; and determine the target test result based on a second comparison result of the candidate fault code and the preset fault code.
[0018] Optionally, the processing module is further configured to, in response to the candidate fault code being the same as the preset fault code, determine that a test result corresponding to the preset configuration code is a test success; and in response to the candidate fault code being different from the preset fault code, determine that the test result corresponding to the preset configuration code is a test failure.
[0019] According to an embodiment of the present application, a non-volatile storage medium is provided, and the non-volatile storage medium stores a computer program. The computer program is configured to execute the vehicle fault code test method in any of the above embodiments when the computer program is run.
[0020] According to an embodiment of the present application, a processor is provided, and the processor is configured to run a program. The program is configured to execute the vehicle fault code test method in any of the above embodiments when the program is run.
[0021] According to an embodiment of the present application, an electronic device is provided, and the electronic device comprises a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the vehicle fault code test method in any of the above embodiments.
[0022] In the embodiment of the present application, by acquiring the first configuration information corresponding to the at least one controller in the target vehicle, then determining the second configuration information based on the first configuration information, and sending the second configuration information to the at least one controller, and finally determining the target test result corresponding to the at least one controller based on the target response information corresponding to the second configuration information in response to receiving the target response information, the purpose of shortening the fault code test time of the vehicle is achieved, thereby realizing the technical effect of improving the fault code test efficiency, and further solving the technical problem of low fault code test efficiency caused by long fault code test time of the vehicle in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0024] Figure 1 is a flowchart of a vehicle fault code test method according to an embodiment of the present application;
[0025] Figure 2 is a schematic diagram of a vehicle fault code test system according to an embodiment of the present application;
[0026] Figure 3 is a schematic diagram of a vehicle fault code test method according to an embodiment of the present application;
[0027] Figure 4 is a schematic diagram of another vehicle fault code test method according to an embodiment of the present application;
[0028] Figure 5 is a structural block diagram of a vehicle fault code test device according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described accompanying 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 under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] According to an embodiment of the present application, a method embodiment of vehicle fault code testing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0032] The method embodiment can be executed in an electronic device or similar computing device comprising a memory and a processor. Taking an example of running on a computer terminal, the computer terminal can include one or more processors (the processor can include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field programmable gate array (FPGA), a neural-network processor unit (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the above-mentioned computer terminal can also include a transmission device for communication function, an input and output device, and a display device. Those skilled in the art can understand that the above structural description is only illustrative, and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal can include more or less components than the above structural description, or have a different configuration from the above structural description.
[0033] The memory can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the vehicle fault code testing method in the embodiments of the present application. The processor executes various functions and data processing by running the computer programs stored in the memory, i.e., implements the vehicle fault code testing method described above. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, which can be connected to the mobile terminal through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0034] The transmission device is used to receive or send data via a network. Specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0035] The display device can be, for example, a liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or a "touch display screen") in the form of a touch screen. The liquid crystal display can enable a user to interact with a user interface of the mobile terminal. In some embodiments, the above-mentioned mobile terminal has a graphical user interface (GUI), and a user can interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. The human-computer interaction function can optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the above-mentioned human-computer interaction functions are configured / stored in one or more computer program products or readable storage media executable by the processor.
[0036] Figure 1 is a flowchart of a vehicle fault code testing method according to one embodiment of the present application, as shown in Figure 1 The method includes the following steps:
[0037] In step S12, first configuration information corresponding to at least one controller in the target vehicle is obtained.
[0038] In the step S12, the first configuration information is used to record the target identification information corresponding to the at least one controller, the preset configuration code and the preset fault code. The first configuration information can be stored in the form of a table, as shown in Table 1.
[0039] Table 1: First configuration information
[0040]
[0041]
[0042] Specifically, the target identification information can include a controller identification (ID), a request ID, a response ID, a configuration code data identifier (DID) and a data frame time interval (STmin). The controller ID can be used to distinguish different controllers. The request ID and the response ID are diagnostic IDs assigned to the controller on the CAN bus. The configuration code DID can be used to identify the configuration of the vehicle, and different configuration code DID corresponds to different configurations, for example, F123. The data frame time interval STmin is the frame interval that the controller can accept when receiving consecutive frames, that is, the minimum time interval between two consecutive frames, for example, null, or 10 ms, 12 ms, etc.
[0043] The first configuration information further includes a preset configuration code and a preset fault code. The preset configuration code, such as configuration code 1, configuration code 2, configuration code 3, etc. shown in the second column of Table 1, can be used to identify different configurations. The preset fault code is a diagnostic trouble code (DTC), which is a digital universal identifier of the fault state recognized by the on-board diagnostic system, and can be used to represent the fault code that the controller should support under a certain configuration. There is a corresponding relationship between the preset configuration code and the preset fault code, as shown in Table 1. The preset fault code corresponding to the configuration code 1 is DTC1, DTC2, DTC3, etc., which represents the DTC that the controller should support under the configuration corresponding to the configuration code 1.
[0044] In the step S14, the second configuration information is determined based on the first configuration information, and the second configuration information is sent to the at least one controller.
[0045] In the step S14, after obtaining the first configuration information corresponding to the at least one controller in the target vehicle, the second configuration information can be determined based on the first configuration information, and the second configuration information is sent to the at least one controller.
[0046] Specifically, the second configuration information to be written into the controller can include 2E, a configuration code DID and a configuration code, and is used to determine the configuration of the controller.
[0047] In step S16, in response to receiving the target response information corresponding to the second configuration information, a target test result corresponding to the at least one controller is determined based on the target response information, where the target test result is used to represent a test result corresponding to the preset configuration code.
[0048] In step S16, in response to receiving the target response information corresponding to the second configuration information, a target test result corresponding to the at least one controller is determined based on the target response information, where the target test result is used to represent a test result corresponding to the preset configuration code.
[0049] Specifically, the target response information is response information from the controller, which can be used to determine whether the second configuration information is successfully written into the controller. When it is determined that the second configuration information is successfully written into the controller according to the target response information, the DTC supported by the controller can be read, and then the read DTC is compared with the DTC corresponding to the preset configuration code in the first configuration information based on the target response information, and then the test result corresponding to the preset configuration code can be determined.
[0050] When it is determined that the second configuration information is not successfully written into the controller according to the target response information, an error of not being successfully written can be recorded, and then the extended session, i.e., the diagnostic service, is re-entered.
[0051] Based on steps S12 to S16, by obtaining the first configuration information corresponding to the at least one controller in the target vehicle, then determining the second configuration information based on the first configuration information, and sending the second configuration information to the at least one controller, finally in response to receiving the target response information corresponding to the second configuration information, the target test result corresponding to the at least one controller is determined based on the target response information, the purpose of shortening the test time of the fault code of the vehicle is achieved, thereby realizing the technical effect of improving the test efficiency of the fault code, and further solving the technical problem of low test efficiency of the fault code in the related art due to the long test time of the fault code of the vehicle.
[0052] Optionally, in step S14, the target identification information includes a configuration code data identifier, and determining the second configuration information based on the first configuration information includes:
[0053] In step S141, a target character length corresponding to the configuration code data identifier and the preset configuration code is obtained.
[0054] In step S141, when the second configuration information is determined based on the first configuration information, the target character length corresponding to the configuration code data identifier and the preset configuration code can be obtained.
[0055] Specifically, the target character length corresponding to the configuration code data identifier and the preset configuration code can be the sum of the byte length corresponding to the configuration code data identifier and the preset configuration code. For example, the configuration code data identifier is 2 bytes, and the preset configuration code is 4 bytes. Therefore, the target character length corresponding to the configuration code data identifier and the preset configuration code is 6.
[0056] In step S142, the second configuration information is determined based on a first comparison result of the target character length and the preset character length.
[0057] In step S142, after obtaining the target character length corresponding to the configuration code data identifier and the preset configuration code, the second configuration information is determined based on a first comparison result of the target character length and the preset character length.
[0058] Specifically, the preset character length can be 6 bytes. In the CAN communication, if the data is greater than 7 bytes, the data cannot be transmitted completely through one CAN frame. In addition to transmitting the configuration code data identifier and the preset configuration code, a request ID (2E) also needs to be added in the CAN frame. The 2E occupies 1 byte. Therefore, the sum of the character lengths of the configuration code data identifier and the preset configuration code that can be transmitted by one CAN frame is at most 6 bytes.
[0059] For example, if the sum of the character lengths of the configuration code data identifier and the preset configuration code is less than or equal to 6 bytes, one CAN frame can be used for transmission. In this case, the corresponding second configuration information is 2E+configuration code data identifier+preset configuration code.
[0060] For another example, if the sum of the character lengths of the configuration code data identifier and the preset configuration code is greater than 6 bytes, one CAN frame cannot be used for transmission. In this case, the 2E+configuration code data identifier+preset configuration code can be divided into multiple parts and transmitted through consecutive frames.
[0061] Based on the above steps S141 to S142, by obtaining the target character length corresponding to the configuration code data identifier and the preset configuration code, the second configuration information can be determined based on a first comparison result of the target character length and the preset character length.
[0062] Optionally, in step S142, the target identification information further includes data frame interval information. Determining the second configuration information based on the first comparison result of the target character length and the preset character length includes:
[0063] In step S1421, in response to the target character length being less than or equal to the preset character length, the first frame, the configuration code data identifier, and the preset configuration code are determined as the second configuration information.
[0064] In the step S1421, when the target character length is less than or equal to the preset character length, the first frame, the configuration code data identifier and the preset configuration code are determined as the second configuration information.
[0065] Specifically, the first frame is a request ID (2E), and thus when the sum of the character lengths of the configuration code data identifier and the preset configuration code is less than or equal to 6 bytes, 2E+configuration code data identifier+preset configuration code are determined as the second configuration information.
[0066] In the step S1422, in response to the target character length being greater than the preset character length, the first frame is sent and the second configuration information is determined based on the data frame interval information.
[0067] In the step S1422, when the target character length is greater than the preset character length, the first frame is sent and the second configuration information is determined based on the data frame interval information.
[0068] Specifically, when the sum of the character lengths of the configuration code data identifier and the preset configuration code is greater than 6 bytes, the first frame 2E is sent to the controller, and the controller can know that the data is not transmitted completely, and thus the configuration code data identifier and the preset configuration code are divided into multiple blocks and transmitted based on STmin through continuous frames until the configuration code data identifier and the preset configuration code are completely transmitted.
[0069] Based on the steps S1421 to S1422, by determining the first frame, the configuration code data identifier and the preset configuration code as the second configuration information in response to the target character length being less than or equal to the preset character length, and sending the first frame and determining the second configuration information based on the data frame interval information in response to the target character length being greater than the preset character length, the second configuration information can be ensured to be completely transmitted to the controller.
[0070] Optionally, in the step S1422, determining the second configuration information based on the data frame interval information comprises:
[0071] In the step S14221, in response to the data frame interval information being a null value, the continuous frames to be sent are determined as the second configuration information based on the flow control frames corresponding to the at least one controller.
[0072] In the step S14221, when the data frame interval information is a null value, the continuous frames to be sent are determined as the second configuration information based on the flow control frames corresponding to the at least one controller.
[0073] Specifically, when STmin is a null value, the configuration code data identifier and the preset configuration code are divided into multiple blocks, and the multiple blocks are transmitted based on the flow control frames corresponding to the controller through continuous frames, and thus the second configuration information is the continuous frames to be sent.
[0074] In step S14222, in response to the data frame interval information not being a null value, the continuous frames to be transmitted are determined as the second configuration information based on the data frame interval information.
[0075] In step S14222, in response to the data frame interval information not being a null value, the continuous frames to be transmitted are determined as the second configuration information based on the data frame interval information.
[0076] Specifically, when STmin is not a null value, the configuration code data identifier and the preset configuration code are divided into multiple blocks, and the multiple blocks are transmitted by using the continuous frames according to STmin, so that the second configuration information is the continuous frames to be transmitted.
[0077] Based on steps S14221 to S14222, in response to the data frame interval information being a null value, the continuous frames to be transmitted are determined as the second configuration information based on the flow control frames corresponding to the at least one controller, and in response to the data frame interval information not being a null value, the continuous frames to be transmitted are determined as the second configuration information based on the data frame interval information, so that the second configuration information can be completely transmitted to the controller.
[0078] Optionally, in step S16, determining the target test result corresponding to the at least one controller based on the target response information comprises:
[0079] In step S161, candidate fault codes supported by the at least one controller are obtained based on the target response information.
[0080] In step S161, when the target test result corresponding to the at least one controller is determined based on the target response information, candidate fault codes supported by the at least one controller can be obtained based on the target response information, wherein the candidate fault codes are DTCs supported by the controller.
[0081] Specifically, when the second configuration information is successfully written into the controller according to the target response information, a service such as 190A reading can be used to read the DTCs supported by the controller.
[0082] In step S162, the target test result is determined by using a second comparison result of the candidate fault codes and the preset fault codes.
[0083] In step S162, after the candidate fault codes supported by the at least one controller are obtained, the target test result can be determined by using a second comparison result of the candidate fault codes and the preset fault codes.
[0084] Specifically, the DTCs supported by the controller read by 190A can be compared with the DTCs corresponding to the configuration code of the controller in the first configuration information, so as to obtain the test result, and to determine whether the preset configuration code is tested successfully.
[0085] Based on the steps S161 to S162, by obtaining the candidate fault code supported by the at least one controller based on the target response information, and then determining the target test result by using the second comparison result of the candidate fault code and the preset fault code, it can be determined whether the preset configuration code is tested successfully.
[0086] Optionally, in step S162, determining the target test result by using the second comparison result of the candidate fault code and the preset fault code comprises:
[0087] In step S1621, in response to the candidate fault code being the same as the preset fault code, it is determined that the test result corresponding to the preset configuration code is test success.
[0088] In the above step S1621, when the candidate fault code is the same as the preset fault code, it can be determined that the test result corresponding to the preset configuration code is test success.
[0089] For example, when the DTC supported by the controller read by 190A is the same as the DTC corresponding to the controller under the configuration code in the first configuration information, it can be determined that the test result corresponding to the preset configuration code is test success.
[0090] In step S1622, in response to the candidate fault code being different from the preset fault code, it is determined that the test result corresponding to the preset configuration code is test failure.
[0091] In the above step S1622, when the candidate fault code is different from the preset fault code, it can be determined that the test result corresponding to the preset configuration code is test failure.
[0092] For example, when the DTC supported by the controller read by 190A is different from the DTC corresponding to the controller under the configuration code in the first configuration information, it can be determined that the test result corresponding to the preset configuration code is test failure.
[0093] Based on the steps S1621 to S1622, by determining that the test result corresponding to the preset configuration code is test success in response to the candidate fault code being the same as the preset fault code, and determining that the test result corresponding to the preset configuration code is test failure in response to the candidate fault code being different from the preset fault code, it can be determined whether the preset configuration code is tested successfully.
[0094] Figure 2 is a schematic diagram of a vehicle fault code test system according to an embodiment of the present application, as Figure 2As shown, the vehicle fault code test system mainly includes the following components: industrial computer, program-controlled power supply, CAN transceiver hardware and controller. Among them, the CAN transceiver corresponding to the host computer is installed in the industrial computer. The host computer can set the output voltage of the program-controlled power supply through the power supply script. The host computer can also generate a test script to control the test process. The program-controlled power supply can receive the program-controlled instructions of the host computer, and then output the voltage to power the controller. The CAN transceiver hardware can convert the sending instructions into corresponding CAN physical level output after receiving the message sending instructions of the host computer. The controller is the controller to be tested, which can receive and respond to the diagnostic services of the host computer.
[0095] Figure 3 is a schematic diagram of a vehicle fault code test method according to an embodiment of the present application, as Figure 3 As shown, the working process of the vehicle fault code test method mainly includes the following execution steps:
[0096] Step S301, obtaining first configuration information corresponding to at least one controller in the target vehicle, wherein the first configuration information is used to record target identification information, preset configuration code and preset fault code corresponding to at least one controller;
[0097] Step S302, obtaining target character length corresponding to configuration code data identifier and preset configuration code;
[0098] Step S303, judging whether the target character length is greater than the preset character length;
[0099] Step S304, in response to the target character length being less than or equal to the preset character length, determining the first frame, the configuration code data identifier and the preset configuration code as the second configuration information;
[0100] Step S305, in response to the target character length being greater than the preset character length, sending the first frame;
[0101] Step S306, judging whether the data frame interval information is a null value;
[0102] Step S307, in response to the data frame interval information being a null value, determining the continuous frame to be sent as the second configuration information based on the flow control frame corresponding to at least one controller;
[0103] Step S308, in response to the data frame interval information not being a null value, determining the continuous frame to be sent as the second configuration information based on the data frame interval information;
[0104] Step S309, sending the second configuration information to at least one controller;
[0105] In step S310, in response to receiving the target response information corresponding to the second configuration information, the candidate fault code supported by the at least one controller is obtained based on the target response information.
[0106] In step S311, it is determined whether the candidate fault code is the same as the preset fault code.
[0107] In step S312, in response to the candidate fault code being the same as the preset fault code, it is determined that the test result corresponding to the preset configuration code is test success.
[0108] In step S313, in response to the candidate fault code being different from the preset fault code, it is determined that the test result corresponding to the preset configuration code is test failure.
[0109] In the working process of the vehicle fault code test method, the first configuration information corresponding to the at least one controller in the target vehicle is obtained, and then the second configuration information is determined based on the first configuration information, and the second configuration information is sent to the at least one controller. Finally, in response to receiving the target response information corresponding to the second configuration information, the target test result corresponding to the at least one controller is determined based on the target response information, which shortens the time length of the vehicle fault code test, thereby achieving the technical effect of improving the fault code test efficiency, and solving the technical problem of low fault code test efficiency caused by long fault code test time in the related art.
[0110] Figure 4 is a schematic diagram of another vehicle fault code test method according to an embodiment of the application, as shown in Figure 4 The working process of the vehicle fault code test method mainly includes the following steps:
[0111] First, manually load the dynamic link library (DLL) in the host computer software, then call the program-controlled power supply to power on the controller, and call the script analysis table to obtain the diagnostic service ID, configuration code DID and Stmin time, read the first row of data to obtain the configuration code, enter the extended session, and unlock to write information into the controller.
[0112] Secondly, it is determined whether the configuration code DID+configuration code is greater than 6 bytes. If the configuration code DID+configuration code is less than or equal to 6 bytes, 2E+configuration code DID+configuration code is sent to the controller. If the configuration code DID+configuration code is greater than 6 bytes, it is determined whether STmin is a null value. If STmin is a null value, the controller is sent a continuous frame according to the flow control frame in the controller. If STmin is not a null value, the controller is sent a continuous frame according to the STmin in the table.
[0113] Further, it is determined whether an active response of the controller is received. If the active response of the controller is not received, it indicates that the configuration code is not successfully written into the controller, and an error is recorded, and the extended session is re-entered. If the active response of the controller is received, it indicates that the configuration code is successfully written into the controller, and the service 190A is used to read the DTC supported by the controller.
[0114] Subsequently, it is determined whether the read DTC is completely identical to the DTC in the same row of the table. If the read DTC is not completely identical to the DTC in the same row of the table, the configuration code test fails. If the read DTC is completely identical to the DTC in the same row of the table, the configuration code test passes, and the next configuration code is read.
[0115] Finally, it is determined whether there is an untested configuration code. If there is no untested configuration code, the test ends. If there is an untested configuration code, the programmable power supply is controlled to power off and power on the controller, and waits for 2s, and the extended session is re-entered.
[0116] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platforms, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method described in each embodiment of the present application.
[0117] In the present embodiment, a vehicle fault code testing device is also provided, which is used to realize the above-mentioned embodiments and preferred embodiments, and has been described and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, realization of hardware, or a combination of software and hardware is also possible and is contemplated.
[0118] Figure 5 is a structural block diagram of a vehicle fault code testing device according to one embodiment of the present application, as Figure 5As shown, the apparatus comprises: an acquisition module 501 configured to acquire first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information corresponding to the at least one controller, a preset configuration code and a preset fault code; a sending module 502 configured to determine second configuration information based on the first configuration information, and send the second configuration information to the at least one controller; and a processing module 503 configured to, in response to receiving target response information corresponding to the second configuration information, determine a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
[0119] Optionally, the sending module 502 is further configured to acquire a target character length corresponding to the configuration code data identifier and the preset configuration code; and determine the second configuration information based on a first comparison result of the target character length and a preset character length.
[0120] Optionally, the sending module 502 is further configured to, in response to the target character length being less than or equal to the preset character length, determine the first frame, the configuration code data identifier and the preset configuration code as the second configuration information; and in response to the target character length being greater than the preset character length, send the first frame and determine the second configuration information based on data frame interval information.
[0121] Optionally, the sending module 502 is further configured to, in response to the data frame interval information being a null value, determine, based on a flow control frame corresponding to the at least one controller, continuous frames to be sent as the second configuration information; and in response to the data frame interval information not being the null value, determine, based on the data frame interval information, the continuous frames to be sent as the second configuration information.
[0122] Optionally, the processing module 503 is further configured to acquire, based on the target response information, a candidate fault code supported by the at least one controller; and determine the target test result by using a second comparison result of the candidate fault code and the preset fault code.
[0123] Optionally, the processing module 503 is further configured to, in response to the candidate fault code being the same as the preset fault code, determine that a test result corresponding to the preset configuration code is test success; and in response to the candidate fault code not being the same as the preset fault code, determine that the test result corresponding to the preset configuration code is test failure.
[0124] It should be noted that the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above modules are located in the same processor; or the above modules are located in different processors in any combination.
[0125] In this embodiment, a nonvolatile storage medium is also provided, and the nonvolatile storage medium stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0126] Optionally, in the embodiment, the storage medium can be configured to store a computer program for performing the following steps:
[0127] Step S1, obtaining first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller;
[0128] Step S2, determining second configuration information based on the first configuration information, and sending the second configuration information to the at least one controller;
[0129] Step S3, in response to receiving target response information corresponding to the second configuration information, determining a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
[0130] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various storage media that can store computer programs.
[0131] In the embodiment, a processor is also provided, and the processor is used to run a program, wherein the program is configured to execute the steps in any one of the method embodiments when running.
[0132] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program:
[0133] Step S1, obtaining first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller;
[0134] Step S2, determining second configuration information based on the first configuration information, and sending the second configuration information to the at least one controller;
[0135] Step S3, in response to receiving target response information corresponding to the second configuration information, determining a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
[0136] In the embodiment, an electronic device is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the method embodiments.
[0137] Optionally, in the embodiment, the processor can be configured to execute the following steps by a computer program:
[0138] In step S1, first configuration information corresponding to at least one controller in the target vehicle is acquired, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller;
[0139] In step S2, second configuration information is determined based on the first configuration information, and the second configuration information is sent to the at least one controller;
[0140] In step S3, in response to receiving target response information corresponding to the second configuration information, target test results corresponding to the at least one controller are determined based on the target response information, wherein the target test results are used to indicate test results corresponding to the preset configuration code.
[0141] Optionally, specific examples in the embodiment can refer to examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.
[0142] The above-mentioned serial numbers of the embodiments of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0143] In the above embodiments of the application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0144] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other manners. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0145] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0146] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0147] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0148] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A method of testing a vehicle trouble code, characterized by, The method comprises the following steps: obtaining first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller, and the target identification information comprises a configuration code data identifier and data frame interval information; obtaining a target character length corresponding to the configuration code data identifier and the preset configuration code; in response to the target character length being less than or equal to a preset character length, determining a first frame, the configuration code data identifier and the preset configuration code as second configuration information; in response to the target character length being greater than the preset character length and the data frame interval information being a null value, first sending the first frame, and then determining a continuous frame to be sent as the second configuration information based on a flow control frame corresponding to the at least one controller; in response to the target character length being greater than the preset character length and the data frame interval information not being a null value, first sending the first frame, and then determining a continuous frame to be sent as the second configuration information based on the data frame interval information; sending the second configuration information to the at least one controller; in response to receiving target response information corresponding to the second configuration information, determining a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
2. The vehicle trouble code testing method according to claim 1, characterized by, The method of determining the target test result corresponding to the at least one controller based on the target response information comprises: obtaining a candidate fault code supported by the at least one controller based on the target response information; determining the target test result by using a second comparison result of the candidate fault code and the preset fault code.
3. The vehicle trouble code testing method of claim 2, wherein The method of determining the target test result by using the second comparison result of the candidate fault code and the preset fault code comprises: in response to the candidate fault code being the same as the preset fault code, determining that a test result corresponding to the preset configuration code is test success; in response to the candidate fault code being different from the preset fault code, determining that a test result corresponding to the preset configuration code is test failure.
4. A vehicle trouble code testing apparatus characterized by comprising: The method comprises the following steps: obtaining first configuration information corresponding to at least one controller in a target vehicle, wherein the first configuration information is used to record target identification information, a preset configuration code and a preset fault code corresponding to the at least one controller, and the target identification information comprises a configuration code data identifier and data frame interval information; The sending module is configured to: acquire the configuration code data identifier and a target character length corresponding to the preset configuration code; in response to the target character length being less than or equal to a preset character length, determine a first frame, the configuration code data identifier and the preset configuration code as second configuration information; in response to the target character length being greater than the preset character length and the data frame interval information being a null value, first send the first frame, and then determine, based on a flow control frame corresponding to the at least one controller, a continuous frame to be sent as the second configuration information; in response to the target character length being greater than the preset character length and the data frame interval information not being a null value, first send the first frame, and then determine, based on the data frame interval information, the continuous frame to be sent as the second configuration information; and send the second configuration information to the at least one controller. The processing module is configured to, in response to receiving target response information corresponding to the second configuration information, determine a target test result corresponding to the at least one controller based on the target response information, wherein the target test result is used to indicate a test result corresponding to the preset configuration code.
5. A non-volatile storage medium, characterized by, The storage medium has stored therein a computer program, wherein the computer program is configured to execute the vehicle fault code test method described in any one of claims 1 to 3 when running.
6. A processor, comprising: The processor is configured to run a program, wherein the program is configured to execute the vehicle fault code test method described in any one of claims 1 to 3 when running. 7.An electronic device comprising a memory and a processor, the electronic device characterized by, The storage medium has stored therein a computer program, wherein the processor is configured to execute the vehicle fault code test method described in any one of claims 1 to 3 by running the computer program.
Citation Information
Patent Citations
Whole vehicle offline configuration verification method
CN112102103A
Vehicle configuration method and device, electronic equipment and storage medium
CN114840200A