A method and device for analyzing vehicle fault functions
By automatically analyzing the vehicle operation log and historical CAN messages, judging the errors of API and CAN signals, and quickly locate the cause of vehicle failures, solving the problem of time-consuming and labor-intensive manual review of logs and packets in the prior art, improving the efficiency of fault diagnosis.
Patent Information
- Application Number
- CN202211414677.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-11-11
AI Technical Summary
In the diagnosis of vehicle faults, designers require manual review of vehicle operation logs and CAN message information, which is time-consuming and labor-intensive, and it is difficult to quickly locate the causes of failures that may be caused by multiple professions.
Provide a vehicle failure function analysis method, by obtaining vehicle operation logs and historical CAN messages, it automatically determines whether there is an API or an error CAN signal with error parameters, thereby determining the vehicle failure function. The method includes obtaining API information, judging the API parameter type, using the preset API judgment logic and parameter database to make judgments, and comparing CAN messages to determine missing message information.
By automatically analyzing fault codes, API parameters and CAN signals, quickly locate the cause of the fault, reduce designer maintenance time and energy, and improve fault diagnosis efficiency.
Smart Images

Figure CN116125938B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle fault diagnosis, and particularly relates to a vehicle fault function analysis method and a vehicle fault function analysis device. Background Art
[0002] In recent years, the intelligent system of the car central control screen has developed rapidly, continuously enriching the driving experience of users and generating huge economic value. With the popularization of smart phones and mobile devices, more and more functions are carried on the vehicle machine system. During the development of different vehicle models, different function verifications or actual vehicle verifications are carried out after product design to reduce the function error rate before mass production of the vehicle, so as to satisfy users.
[0003] For some fault phenomena, sometimes it is not only related to the body system itself, but sometimes it is also caused by the failure of the counterpart components. Therefore, the possible causes involving multiple specialties will cause trouble to designers. However, the existing technologies all require designers to check the vehicle operation logs or CAN message information one by one to find the faulty functions, which is time-consuming and laborious.
[0004] Therefore, it is hoped that there is a technical solution to solve or at least alleviate the above deficiencies of the existing technology. Summary of the Invention
[0005] The purpose of the present invention is to provide a vehicle fault function analysis method to at least solve one of the above technical problems.
[0006] In one aspect of the present invention, there is provided a vehicle fault function analysis method, the vehicle fault function analysis method comprising:
[0007] Obtain a vehicle operation log;
[0008] Judge whether there is an API with an incorrect parameter according to the vehicle operation log. If so,
[0009] Obtain the vehicle function corresponding to the API with the incorrect parameter as the vehicle fault function.
[0010] Optionally, the vehicle fault function analysis method further comprises:
[0011] Obtain the vehicle historical CAN message;
[0012] Judge whether there is an incorrect CAN signal according to the vehicle historical CAN message. If so,
[0013] Obtain the vehicle function corresponding to the incorrect CAN signal as the vehicle fault function.
[0014] Optionally, the judging whether there is an API with an incorrect parameter according to the vehicle operation log includes:
[0015] Obtain each API information in the vehicle operation log respectively;
[0016] Obtain a preset API judgment logic, and judge each API information according to the preset API judgment logic respectively, so as to judge whether there is an API with incorrect parameters.
[0017] Optionally, the obtaining of the preset API judgment logic and judging each API information according to the preset API judgment logic respectively to judge whether there is an API with incorrect parameters includes:
[0018] Make the following judgments for each API information:
[0019] Judge the parameter type corresponding to the API information;
[0020] Obtain the preset API judgment logic corresponding to the parameter type according to the parameter type corresponding to the API information;
[0021] Judge whether the API is an API with incorrect parameters according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information.
[0022] Optionally, the parameter type of the API includes the Int type;
[0023] When the parameter type is the Int type, the judging whether the API is an API with incorrect parameters according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0024] Obtain a preset Int parameter database, where the preset parameter database includes at least one preset API information and a preset Int parameter standard, and one preset Int parameter standard corresponds to one preset API information;
[0025] Judge whether the parameter information in the API information that is the same as the preset API information conforms to the preset Int parameter standard. If not, then
[0026] Judge that the API is an API with incorrect parameters.
[0027] Optionally, the parameter type of the API includes the double type;
[0028] When the parameter type is the double type, the judging whether the API is an API with incorrect parameters according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0029] Obtain a preset double-parameter database, where the preset parameter database includes at least one preset API information and a preset double-parameter standard, and one preset double-parameter standard corresponds to one preset API information;
[0030] Judge whether the parameter information in the API information identical to the preset API information conforms to the preset double-parameter standard. If not, then
[0031] Judge that this API is an API with incorrect parameters.
[0032] Optionally, the parameter type of the API includes the bool type;
[0033] When the parameter type is the bool type, judging whether this API is an API with incorrect parameters according to the preset API judgment logic corresponding to this parameter type and the parameter information in this API information includes:
[0034] Obtain a preset bool-parameter database, where the preset parameter database includes at least one preset API information and a preset bool-parameter standard, and one preset bool-parameter standard corresponds to one preset API information;
[0035] Judge whether the parameter information in the API information identical to the preset API information conforms to the preset bool-parameter standard. If not, then
[0036] Judge that this API is an API with incorrect parameters.
[0037] Optionally, judging whether there is an incorrect CAN signal according to the vehicle historical CAN messages includes:
[0038] Obtain the data of each vehicle historical CAN message;
[0039] Obtain the standard message template;
[0040] Compare the data of each vehicle historical CAN message with the standard message template respectively, so as to judge whether there is missing message information. If so, then
[0041] Judge that there is an incorrect CAN signal.
[0042] Optionally, before obtaining the vehicle operation log, the vehicle fault function analysis method further includes:
[0043] The comparing the data of each vehicle historical CAN message with the standard message template respectively to judge whether there is missing message information includes:
[0044] Perform the following processing on each vehicle historical CAN message data:
[0045] Convert the vehicle historical CAN message data into vehicle historical CAN message EXCEL table data;
[0046] Convert the standard message template into standard message EXCEL table data;
[0047] Sort out the data in the vehicle historical CAN message EXCEL table data to form the first EXCEL table data in a unified format;
[0048] Sort out the data in the standard message EXCEL table data to form the second EXCEL table data in a unified format;
[0049] Match the data in the first EXCEL table data with the data in the second EXCEL table data to obtain the matching data;
[0050] Compare the matching data with the second EXCEL table data one by one to determine whether there are different items. If so,
[0051] Determine that there is missing message information.
[0052] This application also provides a vehicle fault function analysis device, and the vehicle fault function analysis device includes:
[0053] A vehicle operation log acquisition module, which is used to acquire vehicle operation logs;
[0054] An API judgment module, which is used to judge whether there is an API with error parameters according to the vehicle operation log;
[0055] A vehicle fault function acquisition module, which is used to acquire the vehicle function corresponding to the API with error parameters as the vehicle fault function.
[0056] Beneficial effects
[0057] The vehicle fault function analysis method of this application finds the corresponding system problems through automatic analysis of fault codes, and then analyzes the specific causes of faults by analyzing different parameters of the API and the messages uploaded by the CAN signal. At the same time, it also helps automotive designers provide valuable references when maintaining functions by automatically analyzing the faults of the API and the CAN signal. Description of the drawings
[0058] Figure 1 It is a schematic flow chart of the vehicle fault function analysis method according to an embodiment of this application.
[0059] Figure 2Schematic diagram of an electronic device capable of implementing the vehicle fault function analysis method according to an embodiment of the present application.
[0060] Figure 3 Log schematic diagram in the vehicle fault function analysis method according to an embodiment of the present application. Detailed implementation manners
[0061] To make the purpose, technical solutions, and advantages of the implementation of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below with reference to the accompanying drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions from beginning to end. The described embodiments are some, but not all, of the embodiments of the present application. The embodiments described below by referring to the drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application. The embodiments of the present application will be described in detail below with reference to the drawings.
[0062] Figure 1 Flow schematic diagram of the vehicle fault function analysis method according to an embodiment of the present application.
[0063] As Figure 1 shown, the vehicle fault function analysis method includes:
[0064] Step 1: Obtain the vehicle operation log;
[0065] Step 2: Determine whether there is an API with an error parameter according to the vehicle operation log. If so, then
[0066] Step 3: Obtain the vehicle function corresponding to the API with the error parameter as the vehicle fault function.
[0067] The vehicle fault function analysis method of the present application automatically analyzes the fault code to find the corresponding system problem, and then analyzes the specific cause of the fault by analyzing different parameters of the API and the messages uploaded by the CAN signal. At the same time, it also helps automotive designers provide valuable references when maintaining functions by automatically analyzing the faults of the API and the CAN signal.
[0068] In this embodiment, the vehicle fault function analysis method further includes:
[0069] Obtain the vehicle historical CAN messages;
[0070] Determine whether there is an error CAN signal according to the vehicle historical CAN messages. If so, then
[0071] Obtain the vehicle function corresponding to the error CAN signal as the vehicle fault function.
[0072] In this embodiment, the determining whether there is an API with an error parameter according to the vehicle operation log includes:
[0073] Obtain each API information in the vehicle operation log respectively;
[0074] Obtain the preset API judgment logic, and judge each API information respectively according to the preset API judgment logic, so as to judge whether there is an API with an error parameter.
[0075] In this embodiment, the obtaining the preset API judgment logic, and judging each API information respectively according to the preset API judgment logic, so as to judge whether there is an API with an error parameter includes:
[0076] Make the following judgments for each API information:
[0077] Judge the parameter type corresponding to the API information;
[0078] Obtain the preset API judgment logic corresponding to the parameter type according to the parameter type corresponding to the API information;
[0079] Judge whether the API is an API with an error parameter according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information.
[0080] In this embodiment, the parameter type of the API includes the Int type;
[0081] When the parameter type is the Int type, the judging whether the API is an API with an error parameter according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0082] Obtain a preset Int parameter database, the preset parameter database includes at least one preset API information and a preset Int parameter standard, and one preset Int parameter standard corresponds to one preset API information;
[0083] Judge whether the parameter information in the API information that is the same as the preset API information conforms to the preset Int parameter standard, if not, then
[0084] Judge that the API is an API with an error parameter.
[0085] In this embodiment, the parameter type of the API includes the double type;
[0086] When the parameter type is double, the process of determining whether the API has incorrect parameters based on the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0087] Obtain a preset double parameter database, where the preset parameter database includes at least one preset API information and a preset double parameter standard, and one preset double parameter standard corresponds to one preset API information;
[0088] Determine whether the parameter information in the API information that is the same as the preset API information conforms to the preset double parameter standard. If not, then
[0089] Determine that the API has incorrect parameters.
[0090] In this embodiment, the parameter type of the API includes the bool type;
[0091] When the parameter type is bool, the process of determining whether the API has incorrect parameters based on the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0092] Obtain a preset bool parameter database, where the preset parameter database includes at least one preset API information and a preset bool parameter standard, and one preset bool parameter standard corresponds to one preset API information;
[0093] Determine whether the parameter information in the API information that is the same as the preset API information conforms to the preset bool parameter standard. If not, then
[0094] Determine that the API has incorrect parameters.
[0095] In this embodiment, determining whether there is an incorrect CAN signal based on the vehicle historical CAN messages includes:
[0096] Obtain the data of each vehicle historical CAN message;
[0097] Obtain the standard message template;
[0098] Compare the data of each vehicle historical CAN message with the standard message template respectively to determine whether there is missing message information. If so, then
[0099] Determine that there is an incorrect CAN signal.
[0100] In this embodiment, before obtaining the vehicle operation log, the vehicle fault function analysis method further includes:
[0101] Comparing each piece of vehicle historical CAN message data with the standard message template to determine whether there is missing message information includes:
[0102] Performing the following processing on each piece of the vehicle historical CAN message data:
[0103] Converting the vehicle historical CAN message data into vehicle historical CAN message EXCEL table data;
[0104] Converting the standard message template into standard message EXCEL table data;
[0105] Sorting out the vehicle historical CAN message EXCEL table data to form first EXCEL table data in a unified format;
[0106] Sorting out the standard message EXCEL table data to form second EXCEL table data in a unified format;
[0107] Matching the data in the first EXCEL table data with the data in the second EXCEL table data to obtain matching data;
[0108] Comparing the matching data with the second EXCEL table data one by one to determine whether there are different items. If so,
[0109] It is determined that there is missing message information.
[0110] The present application will be further elaborated in detail by way of example below. It can be understood that this example does not constitute any limitation to the present application.
[0111] Referring to Table 1 below, DTC (Diagnostic Trouble Code) represents a diagnostic trouble code, which is the "identity ID" of the fault type (as shown in Table 1); it is used to troubleshoot the fault location and cause when the vehicle has a fault.
[0112] Table 1 Fault Codes
[0113]
[0114] The corresponding function can be matched according to the corresponding fault code in the vehicle. After mastering the corresponding fault, the corresponding log can be found in the operation log.
[0115] In this embodiment, the vehicle fault function analysis method of the present application includes:
[0116] Step 1: Obtain the vehicle operation log;
[0117] Specifically, the Logger is the core component of log processing. During laboratory tests, for the functional verification of the in-vehicle system, testers will conduct on-road tests and simulation usage from the perspective of users. Such behaviors will be recorded in the in-vehicle log, forming vehicle operation logs.
[0118] As Figure 3 shown, after each test, some fault phenomena will occur and some problems between systems will be exposed. At this time, the designer checks the fault codes and selectively analyzes the vehicle operation logs of the corresponding systems.
[0119] See Figure 3 , Figure 3 which is the vehicle operation log of the tester. It can be seen that there are each interface, time, and usage frequency. Each interface represents a function, and with different parameters, the corresponding functional meanings are also different. If the parameter values of each API interface are passed correctly, then there will be no problem with the in-vehicle system at this time. However, if the passed interface parameters are not the predefined data, errors will occur when calling each interface because the set meanings are not understood. Therefore, it is necessary to screen the APIs with incorrect parameters in the faulty system. The functions corresponding to the APIs in the interface table are shown in Table 2:
[0120] Table 2 Partial Functions Corresponding to APIs
[0121]
[0122]
[0123] In the above table, it represents three different types of interfaces. After the designer obtains the log, they will find the corresponding parameter types and returned parameter values through the APIs in the log to determine whether the data transfer is incorrect. However, the data contained in the in-vehicle system log is in the tens of thousands. It is time-consuming and the data volume is too large for the designer to manually analyze each interface. Therefore, we design an algorithm to help the designer find the filtered parameters.
[0124] The following judgments are made for each API information:
[0125] Judge the parameter type corresponding to the API information;
[0126] Obtain the preset API judgment logic corresponding to the parameter type according to the parameter type corresponding to the API information;
[0127] Judge whether the API is an API with incorrect parameters according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information.
[0128] Specifically, the parameter types of the API include the Int type;
[0129] When the parameter type is the Int type, determining whether the API is an API with incorrect parameters according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes:
[0130] Obtain a preset Int parameter database, where the preset parameter database includes at least one preset API information and a preset Int parameter standard, and one preset Int parameter standard corresponds to one preset API information;
[0131] Judge whether the parameter information in the API information that is the same as the preset API information conforms to the preset Int parameter standard. If not, then
[0132] Judge that the API is an API with incorrect parameters.
[0133] For example, the vehicle operation logs obtained through USB (which can also be obtained through other means, such as network transmission) are regular. After selecting the API and corresponding parameters in a fixed format, such as setECASHeightstatus = 3 in the figure, the interface API is setECASHeight, and the parameter value corresponding to status = 3 is 3. Find the corresponding interface name through the interface API. After matching, then select the defined parameter type. In this embodiment, there are three parameter types, namely Int, double, and bool.
[0134] If the parameter type of the interface API is Int, it means that the value transmitted can only be an integer type. For example, in the preset Int parameter database, the preset Int parameter standard for this interface API is [0, 2], then the values transmitted in the data can only be 0, 1, and 2. At this time, any value transmitted in the parameter information in the API information that is not one of these three values is an incorrect data.
[0135] If the parameter type of the interface API is double, it means that the value transmitted is a floating-point type, and the transmitted numerical value can be within an interval. For example, in the preset double parameter database, the preset double parameter standard is -48 to 141.75, then as long as the data transmitted is within this interval, it meets the requirements, and if it exceeds this interval, it does not meet the requirements.
[0136] If the parameter type of the interface API is bool, it means that the value transmitted can only be a boolean type, and the transmitted numerical value can only be true or False. In addition, any other data will cause a malfunction.
[0137] In this embodiment, the present application further includes:
[0138] Obtain the vehicle's historical CAN messages;
[0139] Judge whether there is an error CAN signal according to the vehicle's historical CAN messages. If so,
[0140] Obtain the vehicle function corresponding to the error CAN signal as the vehicle fault function.
[0141] Specifically, judging whether there is an error CAN signal according to the vehicle's historical CAN messages includes:
[0142] Obtain the data of each vehicle's historical CAN message;
[0143] Obtain the standard message template;
[0144] Compare the data of each vehicle's historical CAN message with the standard message template respectively, so as to judge whether there is missing message information. If so,
[0145] Judge that there is an error CAN signal.
[0146] More specifically, before obtaining the vehicle operation log, the vehicle fault function analysis method further includes:
[0147] Comparing the data of each vehicle's historical CAN message with the standard message template respectively, so as to judge whether there is missing message information includes:
[0148] Process each of the vehicle's historical CAN message data as follows:
[0149] Convert the vehicle's historical CAN message data into vehicle's historical CAN message EXCEL table data;
[0150] Convert the standard message template into standard message EXCEL table data;
[0151] Sort out the vehicle's historical CAN message EXCEL table data to form the first EXCEL table data in a unified format;
[0152] Sort out the standard message EXCEL table data to form the second EXCEL table data in a unified format;
[0153] Match the data in the first EXCEL table data with the data in the second EXCEL table data to obtain the matching data;
[0154] Compare the matching data with the second EXCEL table data one by one to judge whether there are different items. If so,
[0155] Judge that there is missing message information.
[0156] For example, the standard message template is CANMatrix. For instance, Table 3 below shows some of the information recorded in CANMatrix:
[0157] Table 3 CANMatrix
[0158]
[0159] In CANmatrix, each CAN signal has a corresponding value. This CANmatrix is a standard message template. In theory, when actually sending CAN messages, although the specific values sent may be different from those in CANmatrix, the signal types in the actually sent CAN messages should be the same. For example, in the above table, there is HCU_EVReady. Then, in theory, in the actually sent message, there should also be HCU_EVReady. Although the specific value of HCU_EVReady in the message may be different from that in CANmatrix, there should at least be this signal type. Therefore, if this HCU_EVReady is not detected during the detection, it indicates an error.
[0160] For example, we first convert the historical CAN message data of each vehicle to be compared and the standard message template into excel.
[0161] Specifically, we use Python for the conversion. The Python package for processing Excel is openpyxl. If you directly download anaconda to install the Python library, then openpyxl has already been installed when downloading. If not, you can also directly use pip install openpyxl in cmd to install it.
[0162] After converting to Excel, data collation is also required to form Excel table data in a unified format, as follows:
[0163] In excel, each row has a corresponding sequence, but the column items all correspond to letters. We perform a data conversion on the column items to change the column letter numbers to numbers.
[0164] import openpyxl
[0165] from openpyxl.utils import column_index_from_string # Convert column letter numbers to numbers
[0166] The next step is to extract the data from each Excel file. You need to open each Excel table first and get the sheet page and the maximum number of texts in the sheet.
[0167] filename1 = r'E:\Table\AA.xlsx'
[0168] wb_To_A=openpyxl.load_workbook(filename1)
[0169] ws_To_A=wb_To_A.get_sheet_by_name('Sheet1')
[0170] maxrowA = ws_To_A.max_row
[0171] Repeat the above steps for each Excel sheet.
[0172] Then, each first EXCEL table data is matched with the second EXCEL table data to see whether they have the same function. First, the information in the first EXCEL table data is traversed and extracted, and the second EXCEL table data is cyclically matched, and the matched data is rewritten into a new table (third EXCEL table data).
[0173]
[0174] If some signal types in the second EXCEL table data cannot be matched in the signal types in the third EXCEL table data, these signal types are missing message information, and the vehicle historical CAN message data missing these message information is erroneous vehicle historical CAN message data.
[0175] Through the above method, you can obtain API with incorrect parameters and vehicle historical CAN message data.
[0176] The present application also provides a vehicle fault function analysis device, which includes a vehicle operation log acquisition module, an API judgment module and a vehicle fault function acquisition module. The vehicle operation log acquisition module is used to obtain the vehicle operation log; the API judgment module is used to judge whether there is an API with incorrect parameters based on the vehicle operation log; the vehicle fault function acquisition module is used to obtain the vehicle function corresponding to the API with incorrect parameters as the vehicle fault function when the API judgment module judges as yes.
[0177] In this embodiment, the vehicle fault function analysis device further includes a vehicle historical CAN message acquisition module, a CAN signal judgment module, and a CAN signal fault acquisition module. The vehicle historical CAN message acquisition module is used to acquire vehicle historical CAN messages; the CAN signal judgment module is used to judge whether there are error CAN signals according to the vehicle historical CAN messages; the CAN signal fault acquisition module is used to, when the CAN signal judgment module judges yes, acquire the vehicle function corresponding to the error CAN signal as the vehicle fault function.
[0178] Glossary:
[0179] The Logger is the core component for log processing. log4j has 5 normal levels.
[0180] 1. static Level DEBUG: The DEBUG Level indicates that fine-grained information events are very helpful for debugging applications. Generally, it is considered that detailed viewing of the running situation is required for relatively important method executions, so debug is enabled.
[0181] 2. static Level INFO: The INFO level indicates that the message highlights the running process of the application at a coarse-grained level. If you only need to know whether the method runs, you can use INFO.
[0182] 3. static Level WARN: The WARN level indicates a situation where potential errors may occur.
[0183] 4. static Level ERROR: The ERROR level indicates that although an error event has occurred, it still does not affect the continued operation of the system. Generally, error handling and other situations require ERROR.
[0184] 5. static Level FATAL: The FATAL level indicates that each serious error event will cause the application to exit.
[0185] In addition, there are two available special logging levels:
[0186] 1. static Level ALL: The ALL Level is the lowest level and is used to turn on all logging.
[0187] 2. static Level OFF: The OFF Level is the highest level and is used to turn off all logging.
[0188] By defining the levels here, you can control the on / off switch of the log information at the corresponding levels in the application. For example, if the INFO level is defined here, all the log information at the DEBUG level in the application will not be printed out.
[0189] Those with higher priorities will be printed out. When in the production environment of the project, it is recommended to reset the log level of debug to warn or higher to avoid generating a large amount of logs.
[0190] Application Programming Interface: The main purpose of an API is to provide the application and developers with the ability to access a set of routines without having to access the source code or understand the details of the internal working mechanisms. The software that provides the functions defined by the API is called the implementation of this API. An API is an interface and thus an abstraction. The Application Programming Interface (API), also known as the Application Programming Interface, is an agreement for the connection of different components of a software system. Due to the increasing scale of software in recent years, complex systems often need to be divided into small components, and the design of programming interfaces is very important. In the practice of programming, the design of programming interfaces should first reasonably divide the responsibilities of the software system. A good interface design can reduce the mutual dependence of various parts of the system, improve the cohesion of the component units, reduce the coupling degree between the component units, and thus improve the maintainability and extensibility of the system.
[0191] It can be understood that the above description of the method also applies equally to the description of the device.
[0192] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the vehicle fault function analysis method as described above is implemented.
[0193] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the vehicle fault function analysis method as described above can be implemented.
[0194] Figure 2 It is an exemplary structural diagram of an electronic device that can implement the vehicle fault function analysis method provided by an embodiment of this application.
[0195] Such as Figure 2As shown, the electronic device includes an input device 501, an input interface 502, a central processing unit 503, a memory 504, an output interface 505, and an output device 506. Among them, the input interface 502, the central processing unit 503, the memory 504, and the output interface 505 are interconnected via a bus 507. The input device 501 and the output device 506 are respectively connected to the bus 507 through the input interface 502 and the output interface 505, and then connected to other components of the electronic device. Specifically, the input device 504 receives input information from the outside and transmits the input information to the central processing unit 503 through the input interface 502; the central processing unit 503 processes the input information based on the computer-executable instructions stored in the memory 504 to generate output information, stores the output information temporarily or permanently in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; the output device 506 outputs the output information to the outside of the electronic device for the user to use.
[0196] That is to say, Figure 2 the electronic device shown can also be implemented to include: a memory storing computer-executable instructions; and one or more processors that can implement the vehicle fault function analysis method described in conjunction with Figure 1 the description.
[0197] In one embodiment, Figure 2 the electronic device shown can be implemented to include: a memory 504 configured to store executable program code; one or more processors 503 configured to run the executable program code stored in the memory 504 to execute the vehicle fault function analysis method in the above embodiment.
[0198] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0199] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash RAM. The memory is an example of computer-readable media.
[0200] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can store information that can be accessed by a computing device.
[0201] Those skilled in the art will appreciate that the embodiments of the present application can be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0202] Furthermore, it is obvious that the term "comprising" does not exclude other elements or steps. The multiple elements, modules, or devices recited in the apparatus claims may also be implemented by one element or a general device through software or hardware.
[0203] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the figures. For example, two consecutive blocks marked may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or overall flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0204] In this embodiment, the so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0205] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the device / terminal device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.
[0206] In this embodiment, if the modules / units integrated in the device / terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, to implement all or part of the processes in the above embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. Although this application is disclosed above in preferred embodiments, it is not actually used to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the protection scope of this application should be subject to the scope defined by the claims of this application.
[0207] Those skilled in the art should understand that the embodiments of this application can be provided as a method, system, or computer program product. Therefore, this application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0208] In addition, obviously, the term "including" does not exclude other units or steps. The multiple units, modules, or devices stated in the apparatus claims can also be implemented by one unit or a general apparatus through software or hardware.
[0209] Although the present invention has been described in detail above with general descriptions and specific embodiments, based on the present invention, some modifications or improvements can be made, which are obvious to those skilled in the art. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection required by the present invention.
Claims
1. A vehicle fault function analysis method, characterized in that, The vehicle fault function analysis method includes: Obtain the vehicle operation log; Judge whether there is an API with an error parameter according to the vehicle operation log. If so, Obtain the vehicle function corresponding to the API with the error parameter as the vehicle fault function; The judging whether there is an API with an error parameter according to the vehicle operation log includes: Respectively obtain each API information in the vehicle operation log; Obtain the preset API judgment logic, and respectively judge each API information according to the preset API judgment logic, so as to judge whether there is an API with an error parameter; The obtaining the preset API judgment logic and respectively judging each API information according to the preset API judgment logic, so as to judge whether there is an API with an error parameter includes: Make the following judgments for each API information: Judge the parameter type corresponding to the API information; Obtain the preset API judgment logic corresponding to the parameter type according to the parameter type corresponding to the API information; Judge whether the API is an API with an error parameter according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information.
2. The vehicle fault function analysis method according to claim 1, wherein, The vehicle fault function analysis method further includes: Obtain the vehicle historical CAN message; Judge whether there is an error CAN signal according to the vehicle historical CAN message. If so, Obtain the vehicle function corresponding to the error CAN signal as the vehicle fault function.
3. The vehicle fault function analysis method according to claim 2, wherein The parameter type of the API includes the Int type; When the parameter type is the Int type, the judging whether the API is an API with an error parameter according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes: Obtain the preset Int parameter database, and the preset parameter database includes at least one preset API information and a preset Int parameter standard, and one preset Int parameter standard corresponds to one preset API information; Judge whether the parameter information in the API information identical to the preset API information conforms to the preset Int parameter standard. If not, Judge that the API is an API with an error parameter.
4. The vehicle fault function analysis method according to claim 3, wherein, The parameter type of the API includes the double type; When the parameter type is the double type, the judging whether the API is an API with an error parameter according to the preset API judgment logic corresponding to the parameter type and the parameter information in the API information includes: Obtain the preset double parameter database, and the preset parameter database includes at least one preset API information and a preset double parameter standard, and one preset double parameter standard corresponds to one preset API information; Judge whether the parameter information in the API information identical to the preset API information conforms to the preset double parameter standard. If not, Judge that the API is an API with an error parameter.
5. The vehicle fault function analysis method according to claim 4, wherein The parameter type of the API includes the bool type; When the parameter type is of bool type, the determination of whether the API is an API with incorrect parameters according to the preset API determination logic corresponding to the parameter type and the parameter information in the API information includes: Obtain a preset bool parameter database, where the preset parameter database includes at least one preset API information and a preset bool parameter standard, and one preset bool parameter standard corresponds to one preset API information; Determine whether the parameter information in the API information that is the same as the preset API information conforms to the preset bool parameter standard. If not, then Determine that the API is an API with incorrect parameters.
6. The vehicle fault function analysis method according to claim 5, wherein The determination of whether there is an incorrect CAN signal according to the vehicle historical CAN messages includes: Obtain the data of each vehicle historical CAN message; Obtain a standard message template; Compare the data of each vehicle historical CAN message with the standard message template respectively to determine whether there is missing message information. If so, then Determine that there is an incorrect CAN signal.
7. The vehicle fault function analysis method according to claim 6, wherein, Before obtaining the vehicle operation log, the vehicle fault function analysis method further includes: The comparison of the data of each vehicle historical CAN message with the standard message template respectively to determine whether there is missing message information includes: Perform the following processing on each vehicle historical CAN message data: Convert the vehicle historical CAN message data into vehicle historical CAN message EXCEL table data; Convert the standard message template into standard message EXCEL table data; Organize the vehicle historical CAN message EXCEL table data to form first EXCEL table data in a unified format; Organize the standard message EXCEL table data to form second EXCEL table data in a unified format; Match the data in the first EXCEL table data with the data in the second EXCEL table data to obtain matching data; Compare the matching data with the second EXCEL table data one by one to determine whether there are difference items. If so, then Determine that there is missing message information.
8. A vehicle fault function analysis device for implementing the vehicle fault function analysis method according to any one of claims 1 to 7, characterized in that, The vehicle fault function analysis device includes: A vehicle operation log acquisition module, which is used to acquire a vehicle operation log; An API determination module, which is used to determine whether there is an API with incorrect parameters according to the vehicle operation log; A vehicle fault function acquisition module, which is used to, when the API determination module determines yes, acquire the vehicle function corresponding to the API with incorrect parameters as the vehicle fault function.
Citation Information
Patent Citations
Analysis engine for automatic analysis and error log linking
CN104239158A
Remote upgrade exception reason determination method and device, electronic equipment and storage medium
CN115118577A