A method and system based on IPC log analysis
By using tools and methods based on IPC log parsing, IPC protocol data can be parsed automatically, solving the problems of high difficulty and error rate of manual parsing on MCU and Qt sides, and improving the communication efficiency and testing efficiency of vehicle system.
Patent Information
- Application Number
- CN202410682236.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-05-29
AI Technical Summary
In existing technologies, when the MCU sends data and the Qt receives data, the IPC protocol needs to be manually parsed, which makes the parsing difficult and prone to errors, affecting the communication efficiency of the vehicle system.
We employ tools and methods based on IPC log parsing, and through IPC data import, data field display, standardized text display, and IPC data parsing modules, we achieve automated parsing of IPC protocol data. Furthermore, we improve parsing efficiency and accuracy through IPC data parsing tables and abnormal data correction controls.
It simplifies the data analysis process on the MCU and Qt sides, improves the communication efficiency of the vehicle system, reduces the difficulty and error probability of manual analysis, and simplifies the vehicle system testing process.
Smart Images

Figure CN118573740B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicle-mounted intelligent cockpit and Internet of Vehicles, and in particular to a method and tool for analyzing IPC log. BACKGROUND
[0002] In the development of automobile instruments, MCU defines the data format according to the IPC protocol, and Qt needs to analyze the data according to the IPC protocol for corresponding data processing. In the existing related scheme, MCU needs to add comments to the data format in the protocol document for each new type of data, and Qt analyzes the message according to the protocol. If the log data needs to be analyzed, the data needs to be filtered and analyzed by Notepad++, and the filtered data also needs to be manually analyzed according to the protocol format. Whether the data sent by MCU is normal or the data received by Qt is normal, the difficulty and error of manual analysis cannot be avoided. SUMMARY
[0003] The purpose of the present application is to provide a method and tool for analyzing IPC log, so as to realize automatic implementation and analysis of IPC protocol of each module in the vehicle-mounted system, improve the communication efficiency of the vehicle-mounted system, and further reduce the difficulty and error probability of manual analysis.
[0004] In order to achieve the above purpose, the first aspect of the present application provides a tool for analyzing IPC log, which specifically includes an IPC data import module, a data field display module, a standardized text display module and an IPC data analysis module, wherein:
[0005] The IPC data import module is used to import the data of the specified module in the vehicle-mounted system according to the user's demand, the data includes the IPC protocol data and the canservcie log data, and the IPC protocol data is selected for custom viewing according to the user's demand;
[0006] The data field display module acquires and displays the canservcie log data imported by the IPC data import module, and performs custom secondary viewing selection on the imported canservcie log data according to the user's demand;
[0007] The IPC data analysis module acquires the data imported by the IPC protocol import module, uses the method for analyzing IPC log to analyze the data into standardized text data, and transmits the analyzed data to the standardized text display module for display;
[0008] The standardized text display module is used to display the standardized text data after analysis.
[0009] Specifically, the IPC-based log analysis system in the application adopts the form of a host computer to further solve the technical problem of complex data analysis operation and long time consumption after MCU end transmission and Qt end reception.
[0010] Preferably, the IPC data import module comprises an IPC protocol import end, a log import end, a LUN_ID / CID selection end and a data filtering end, wherein the data filtering end selects a Date Filter mode to filter data by date.
[0011] The second aspect of the application provides an analysis method for data analysis using an IPC log analysis-based tool, wherein data of a specified module in a vehicle-mounted system is imported into the IPC data analysis module, the data is sequentially accessed in the order of transmission to an IPC data analysis table, and is associated with binary data in the IPC data analysis table, and the normalized text data corresponding to the binary data obtained by association is output.
[0012] Preferably, the specific steps of defining the IPC data analysis table are as follows:
[0013] S1, normalizing the data of the specified module;
[0014] S2, associating the normalized data with text data defined in an IPC technical document;
[0015] S3, constructing a mapping relationship based on key-value pairs and adding an insertion order based on a bidirectional linked list;
[0016] S4, finally forming an ordered IPC data analysis structure.
[0017] Preferably, in the normalization process, a standard structure is constructed to classify the data of the specified module, specific data is extracted according to the data classification result, and the extracted specific data is converted into a text format.
[0018] Specifically, the data analysis includes a data transmission end path and a data reception end path composed of fixed-length strings. The text format includes but is not limited to CSV and XML formats.
[0019] Preferably, in the normalization process, the standardized data is directly extracted and stored in the IPC data analysis table according to a human-defined universal format, and the non-standardized data is stored in the IPC data analysis table after constructing a mapping relationship based on key-value pairs.
[0020] Specifically, in the standardized data processing, the standardized data and the non-standardized data are parsed respectively, so that the data parsing efficiency is improved, and the problem of memory occupation in the process of large data stream transmission is avoided.
[0021] Preferably, in the IPC data parsing table, when updating data, the normalized data of the to-be-updated statement is moved to the end of the ordered IPC data parsing structure, and then the update of the text data defined in the IPC technical document is performed.
[0022] Specifically, in the ordered IPC data parsing structure, the mapping relationship based on the key-value pair is combined with the insertion order based on the double-linked list, so that the sequential access function of the IPC data parsing table is realized, and the efficiency of using the IPC data parsing table is improved.
[0023] Preferably, an abnormal data correction control is established in the IPC data parsing table, and the abnormal data correction control performs correlation degree evaluation on the binary data obtained through correlation.
[0024] Preferably, the correlation degree evaluation judges whether two binary data segments are the same data segment by judging the similarity between the two binary data segments.
[0025] Preferably, in the similarity judgment, a threshold level range is set for the similarity, and a corresponding abnormal data correction method is selected according to the threshold level range.
[0026] Compared with the prior art, the present application has the following advantages:
[0027] 1. In the present application, a tool based on IPC log analysis is constructed, which converts the traditional manual analysis mode of IPC communication protocol into a mode of analysis and display by the host computer. When analyzing log data, complex text conversion and manual analysis are not required, which improves the efficiency of IPC protocol analysis and avoids the error-prone problem of manual analysis of IPC protocol data. By directly applying the host computer in the present application to vehicle system testing, the testing process of the vehicle system can be simplified, and the testing and development efficiency can be improved.
[0028] 2. Based on 1, the present application provides a method based on IPC log analysis. In the present application, an IPC data parsing table is defined and standardized to realize the conversion of vehicle communication data and standardized text format data. In the conversion process, an abnormal data correction control is added, and abnormal value monitoring is performed in the data transmission and analysis process in multiple ways, which further reduces the error probability in the data analysis process and improves the accuracy of IPC log analysis. BRIEF DESCRIPTION OF DRAWINGS
[0029] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application, and are incorporated into and constitute a part of this specification. The embodiments of the application, and their
[0030] Figure 1 is a method flow chart based on IPC log analysis;
[0031] Figure 2 is a specific workflow diagram of a tool based on IPC log analysis;
[0032] Figure 3 is the protocol content corresponding to the type according to LUN_ID / CID=0x80, 0x08 after the IPC protocol is imported, which is convenient for users to understand the protocol;
[0033] Figure 4 is the protocol content corresponding to the type according to LUN_ID / CID=0x80, 0x09 after the IPC protocol is imported, which is convenient for users to understand the protocol;
[0034] Figure 5 is the corresponding data according to LUN_ID / CID=0x80, 0x08 after the IPC protocol is imported and the canservice_log is further imported, which is displayed by rows and can support clicking the beginning of the row to parse and display the row data to the right side;
[0035] Figure 6 is the corresponding data according to LUN_ID / CID=0x80, 0x09 after the IPC protocol is imported and the canservice_log is further imported, which is displayed by rows and can support clicking the beginning of the row to parse and display the row data to the right side. DETAILED DESCRIPTION
[0036] The application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict.
[0037] As Figures 1-6 indicated, the following detailed description is exemplary description and is intended to provide further detailed description of the application. Unless otherwise specified, all technical terms used in the application are the same as the meanings commonly understood by the general technical personnel in the field to which the application belongs. The terms used in the application are only for the purpose of describing the specific embodiments and are not intended to limit the exemplary embodiments according to the application.
[0038] The tool based on the IPC log analysis provided in the embodiment specifically comprises an IPC data import module, a data field display module, a normalized text display module and an IPC data analysis module, wherein:
[0039] The IPC data import module is used to import the data of the specified module in the vehicle-mounted system according to the user demand, the data comprises the IPC protocol data and the canservcie log data, and the IPC protocol data is selected for customized viewing according to the user demand;
[0040] The data field display module acquires and displays the canservcie log data imported by the IPC data import module, and the imported canservcie log data is selected for customized secondary viewing according to the user demand;
[0041] The IPC data analysis module acquires the data imported by the IPC protocol import module, analyzes the data into normalized text data by using the IPC log analysis method, and transmits and displays the analyzed data to the normalized text display module;
[0042] The normalized text display module is used to display the normalized text data after the analysis.
[0043] In an embodiment, the IPC data import module comprises an IPC protocol import end, a log import end, a LUN_ID / CID selection end and a data filtering end, wherein:
[0044] The IPC protocol import end is used to import the IPC protocol of the specified module in the vehicle-mounted system according to the user demand;
[0045] The log import end is used to import the canservcie log data of the specified module in the vehicle-mounted system according to the user demand;
[0046] The LUN_ID / CID selection end is used to select the imported IPC protocol data for customized viewing by using the LUN_ID / CID; the system is a host computer, and the imported canservcie log data is selected for viewing by using the LUN_IC / CID when the canservcie log data is imported in the host computer;
[0047] The analysis method for data analysis by using the tool based on the IPC log analysis provided in the embodiment is that the data of the specified module in the vehicle-mounted system is imported in the IPC data analysis module, the data is sequentially accessed according to the sending order, and the binary data in the IPC data analysis table is associated and referenced, and the normalized text data corresponding to the binary data obtained by the association and reference is outputted.
[0048] In an embodiment, the specific steps of defining the IPC data parsing table are as follows:
[0049] S1, normalizing the data of the specified module;
[0050] S2, associating the normalized data with the text data defined in the IPC technical document;
[0051] S3, constructing a mapping relationship based on key-value pairs and adding an insertion order based on a double-linked list;
[0052] S4, finally forming an ordered IPC data parsing structure.
[0053] In an embodiment, in the normalization process, the data of the specified module is classified according to data type, data segment length, data segment starting position, and byte order by constructing a standard structure, the data parsing mode is determined according to the data type, the specific data is identified and extracted according to the data segment length and the data segment starting position, the big end and the small end are identified by determining the byte order classification, and the specific data is extracted on this basis, and the extracted specific data is converted into text format.
[0054] In an embodiment, in the normalization process, the standardized data is directly extracted and stored in the IPC data parsing table according to the human-defined general format, and the non-standardized data is stored in the IPC data parsing table after constructing a mapping relationship based on key-value pairs; wherein the standardized statements include but are not limited to timestamp statements and data packet path statements.
[0055] In an embodiment, in the IPC data parsing table, when updating the data, the normalized data of the statement to be updated is moved to the end of the ordered IPC data parsing structure, and then the update of the text data defined in the IPC technical document is performed.
[0056] In an embodiment, an abnormal data correction control is established in the IPC data parsing table, and the abnormal data correction control performs correlation degree evaluation on the binary data obtained by correlation.
[0057] In an embodiment, the correlation degree evaluation judges whether two binary data segments are the same data segment by judging the similarity between the two binary data segments.
[0058] In an implementation, the similarity is set to a threshold level range in the correlation evaluation, and a corresponding abnormal data correction method is selected according to the threshold level range. In the binary-based correlation evaluation, 1 represents correlation, and 0 represents non-correlation. In a data segment, the threshold level range is divided according to the probability of 1 or 0, including correlation, similarity, difference, and non-correlation. When the threshold level range is similarity and difference, the abnormal data segment is located according to the correlation evaluation result, and the abnormal data correction processing is performed by discarding the abnormal data, invalidating the abnormal data, inferring and filling the abnormal data, and using the backup abnormal data. When the threshold level range is non-correlation, the data transmission of the specified module in the vehicle-mounted system is re-performed, and the IPC protocol communication document and the IPC log analysis method are adjusted. The abnormal data correction control is used to correct the data format abnormality, data damage, and data loss problem, thereby ensuring the stable operation of the tool based on the IPC log analysis.
[0059] In a preferred implementation, the specific workflow of the tool based on the IPC log analysis is as follows:
[0060] A1, import the IPC protocol in the tool based on the IPC log analysis, and use LUN_ID / CID to view the specific content of the IPC protocol, and screen out the binary data required by the user;
[0061] A2, on the basis of A1, select whether to import the canservcie log. If yes, import the canservcie log in the host computer, and use LUN_IC / CID to view the specific content of the canservcie log. On the basis of step S2, the data required by the user is subjected to secondary screening;
[0062] A3, select the specified row data after secondary screening, and automatically generate the standardized text analysis of the corresponding row data on the right side of the host computer according to the IPC data analysis table, wherein each standardized text analysis is displayed in sequence according to the timestamp corresponding to the specified row data;
[0063] A4, if no, on the basis of A1, select the binary data required by the user, and automatically generate the standardized text analysis of the corresponding row data on the right side of the host computer according to the IPC data analysis table, wherein each standardized text analysis is displayed in sequence according to the timestamp corresponding to the specified row data.
[0064] It is known from common technical knowledge that the present application can be implemented by other embodiments without departing from the spirit or essential characteristics thereof. Therefore, the above disclosed embodiments are merely illustrative in all aspects, and are not the only ones. All changes within the scope of the present application or within the scope equivalent to the present application are included in the present application.
[0065] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, apparatus, or computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0066] The application is described in reference to the flowchart and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0067] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0068] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0069] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing and illustrating, not limiting, the technical solutions of the present application. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and any modifications or replacements of the specific embodiments of the present application without departing from the spirit and scope of the present application should be covered within the protection scope of the claims of the present application.
Claims
1. A data parsing method for a system based on IPC log parsing, characterized in that, The system based on IPC log parsing includes an IPC data import module, a data field display module, a normalized text display module, and an IPC data parsing module, wherein: The IPC data import module is used to import data from a specified module in the vehicle system according to user needs. The data includes IPC protocol data and CanServicing log data, and allows users to customize and select the IPC protocol data according to their needs. The data field display module retrieves and displays the CanService log data imported from the IPC data import module, and allows for customized secondary viewing options for the imported CanService log data based on user needs. The IPC data parsing module obtains the data imported from the IPC protocol import module, parses the data into normalized text data using an IPC log parsing method, and transmits the parsed data to the normalized text display module for display. The normalized text display module is used to display the normalized text data after parsing; The parsing method is as follows: import data from a specified module in the vehicle system, access the IPC data parsing table sequentially according to the sending order of the data, associate and reference the binary data in the IPC data parsing table, and output the normalized text data corresponding to the binary data obtained by association and reference. An abnormal data correction control is established in the IPC data parsing table, and the abnormal data correction control evaluates the correlation degree of binary data obtained by the associated reference. The correlation assessment determines whether two binary data segments belong to the same data segment by judging their similarity. In this correlation assessment, a threshold range is set for the similarity, and a corresponding abnormal data correction method is selected based on the threshold range. In the binary-based correlation assessment, 1 represents correlation and 0 represents irrelevance. Within a data segment, the threshold range is divided based on the probability of 1 or 0, including correlation, similarity, difference, and irrelevance. When the threshold range is similarity or difference, an abnormal data segment is located based on the correlation assessment result. Abnormal data correction is performed by discarding abnormal or invalid abnormal data, inferring and filling abnormal data, and using backup abnormal data. When the threshold range is irrelevance, data is re-sent to the designated module in the vehicle system, and the IPC protocol communication document and IPC log parsing methods are adjusted. The abnormal data correction control is used to correct data format errors, data corruption, and data loss.
2. The data parsing method according to claim 1, characterized in that, The specific steps for defining the IPC data parsing table are as follows: S1. Standardize the data of the specified module; S2. Associate the normalized data with the text data defined in the IPC technical document; S3. By constructing a key-value pair-based mapping relationship and adding an insertion order based on a doubly linked list; S4. Finally, an ordered IPC data parsing structure is formed.
3. The data parsing method according to claim 2, characterized in that, In the normalization process, a standard structure is constructed to classify the data of the specified module, specific data is extracted based on the data classification results, and the extracted specific data is converted into text format.
4. The data parsing method according to claim 3, characterized in that, In the standardization process, standardized data is directly extracted and stored in the IPC data parsing table according to a human-defined general format, while non-standardized data is constructed based on key-value pair mapping and then stored in the IPC data parsing table.
5. The data parsing method according to claim 2, characterized in that, When updating data in the IPC data parsing table, the normalized data of the statement to be updated is moved to the end of the ordered IPC data parsing structure, and then the text data defined in the IPC technical document is updated.
6. The data parsing method according to claim 5, characterized in that, The correlation assessment determines whether two binary data segments are the same data segment by judging their similarity.
7. The data parsing method according to claim 6, characterized in that, In the similarity determination, a threshold level range is set for the similarity, and a corresponding abnormal data correction method is selected according to the threshold level range.
8. The data parsing method according to claim 1, characterized in that, The IPC data import module includes: an IPC protocol import terminal, a log import terminal, a LUN_ID / CID selection terminal, and a data filtering terminal, wherein: The IPC protocol import terminal is used to import the IPC protocol of a specified module in the vehicle system according to user needs, thereby importing the IPC protocol data of the specified module in the vehicle system. The log import terminal is used to import the service log data of a specified module in the vehicle system according to user needs. The LUN_ID / CID selection terminal allows users to customize and select the imported data from a specified module using LUN_ID / CID. The data filtering interface is configured to use the Date Filter mode to filter data by date.
Citation Information
Patent Citations
Method for creating index lexical item as well as data retrieval method and system
CN101251854A
KR20230157556A