Data analysis method, device and equipment and readable storage medium

By analyzing the National VI emission data, reading each line and removing the header check code, extracting and converting it into physical values ​​and storing them in a table, the problem of poor analysis results in existing technologies is solved, and the effect of quickly identifying vehicle environmental performance issues is achieved.

CN121118878APending Publication Date: 2025-12-12DONGFENG AUTOMOBILE ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511176736.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing technologies are not effective at analyzing China VI emission data, making it difficult to quickly locate and detect vehicle environmental performance issues.

Method used

By acquiring the file to be parsed, reading it line by line and removing the packet header and checksum, extracting the field content based on the type flags and lengths of the data stream information and OBD information, converting it into actual physical values, and storing it in a table for display and analysis.

Benefits of technology

It enables rapid location and detection of vehicle environmental performance issues, and facilitates the statistical analysis of fault code frequency and the observation of abnormal data changes through tables and graphs, thereby improving the efficiency and accuracy of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121118878A_ABST
    Figure CN121118878A_ABST
Patent Text Reader

Abstract

The invention discloses a data analysis method, device and equipment and a readable storage medium, and the method comprises the steps: reading each line of original environment-friendly data package of a to-be-analyzed file line by line, and obtaining an environment-friendly data unit; according to the sequence and the length of fields contained in the data stream information and the OBD information respectively, extracting field contents from each data stream information packet data and each OBD information packet data, and converting the field contents into actual physical values from hexadecimal character strings; and storing the field names of the data stream information and the OBD information in the first row of the data stream table and the OBD table, and sequentially storing the field contents converted into the actual physical values below the corresponding field names of the data stream table and the OBD table to obtain the analyzed data stream table and OBD table. According to the invention, the data change of the data flow information and the OBD information can be conveniently compared through the table, so that the environmental protection performance problem of the vehicle can be quickly positioned and found.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of vehicle environmental protection technology, and in particular to a data analysis method and device, equipment and a readable storage medium. BACKGROUND

[0003] In the standard communication data format of GB 17691-2018, the most important thing is the collection and reporting of vehicle environmental information (such as real-time emission data of nitrogen oxides and particulate matter, etc.), which is referred to as national six environmental data. Enterprises can analyze the national six environmental data collected from vehicles to determine whether the environmental performance of the vehicle meets the standards in advance and take appropriate measures.

[0004] However, the existing technology has poor analysis effect on the national six environmental data, which is not convenient for quickly positioning and finding the environmental performance problems of the vehicle. SUMMARY

[0005] The present application provides a data analysis method, device, equipment and readable storage medium, which aims to solve the problem of poor analysis effect of the national six environmental data in the prior art, which is not convenient for quickly positioning and finding the environmental performance problems of the vehicle.

[0006] In a first aspect, the present application provides a data analysis method, which comprises: Obtaining a to-be-analyzed file, wherein the to-be-analyzed file comprises multiple lines of original environmental data packets, and each line of original environmental data packet is obtained by encapsulating the collected vehicle environmental data using a preset data packet structure; Reading each line of original environmental data packet of the to-be-analyzed file line by line, and if the original environmental data packet includes real-time information prefix or reissue information prefix, removing the packet header and check code of the original environmental data packet according to the preset data packet structure to obtain an environmental data unit; According to the information type flag and data length of the data stream information and OBD information, extracting each data stream information packet data and OBD information packet data from the environmental data unit in sequence; According to the order and length of the fields contained in the data stream information and OBD information, extracting the field content from each data stream information packet data and OBD information packet data, and converting the field content from a hexadecimal string to an actual physical value; Storing the field names of the data stream information and OBD information in the first row of the data stream table and the OBD table, and storing the field content converted to the actual physical value in the lower part of the corresponding field name of the data stream table and the OBD table in sequence, to obtain the analyzed data stream table and OBD table.

[0007] Optionally, the converting the field content from the hexadecimal string into the actual physical value comprises: converting the field content from the hexadecimal string into an unsigned integer value in a big-endian mode; multiplying the converted unsigned integer value by a preset precision and adding a preset offset to obtain the field content converted into the actual physical value.

[0008] Optionally, after the obtaining the parsed data stream table and the OBD table, the method further comprises: saving the data stream table and the OBD table into a directory where the file to be parsed is located in a CSV format file.

[0009] Optionally, after the obtaining the parsed data stream table and the OBD table, the method further comprises: visually displaying the data stream table and the OBD table in a graphical form.

[0010] Optionally, after the obtaining the parsed data stream table and the OBD table, the method further comprises: when a value of field content in the data stream table and the OBD table is greater than a preset value, highlighting a row where the field content is located and outputting a warning.

[0011] Optionally, the fields of the data stream information comprise at least one of an engine speed, a temperature, fuel consumption and an emission amount, and the fields of the OBD information comprise at least one of a fault code, a fault occurrence time and a fault description.

[0012] In a second aspect, an embodiment of the present application provides a data parsing device, which comprises: an acquisition module configured to acquire a file to be parsed, wherein the file to be parsed comprises a plurality of rows of original environmental protection data packets, and each row of original environmental protection data packet is obtained by encapsulating collected vehicle environmental protection data by using a preset data packet structure; a reading module configured to read each row of original environmental protection data packet of the file to be parsed row by row, and if the original environmental protection data packet comprises a real-time information prefix or a reissue information prefix, remove a packet header and a check code of the original environmental protection data packet according to the preset data packet structure to obtain an environmental protection data unit; an extraction module configured to extract each data stream information packet data and OBD information packet data from the environmental protection data unit in sequence according to information type tags and data lengths of the data stream information and the OBD information; a parsing module configured to extract field content from each data stream information packet data and OBD information packet data according to orders and lengths of fields contained in the data stream information and the OBD information respectively, and convert the field content from a hexadecimal string into an actual physical value. The saving module is configured to store the field names of the data stream information and the OBD information in the first row of a data stream table and an OBD table, and store the field contents converted into actual physical values in the rows below the corresponding field names of the data stream table and the OBD table, to obtain the parsed data stream table and the OBD table.

[0013] Optionally, the converting the field contents from the hexadecimal string into the actual physical value is configured to: convert the field contents from the hexadecimal string into an unsigned integer value according to a big-endian mode; multiply the converted unsigned integer value by a preset precision, and add a preset offset to obtain the field contents converted into the actual physical value.

[0014] In a third aspect, an embodiment of the present application provides a data analysis device, which comprises a processor, a memory, and a data analysis program stored in the memory and executable by the processor, wherein the data analysis program, when executed by the processor, implements the steps of the data analysis method described above.

[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which stores a data analysis program, wherein the data analysis program, when executed by a processor, implements the steps of the data analysis method described above.

[0016] The technical scheme provided by the embodiment of the present application has the following beneficial effects: In the embodiment of the present application, a to-be-analyzed file is acquired, the to-be-analyzed file including multiple lines of original environmental protection data packets, each line of original environmental protection data packet being obtained by encapsulating collected vehicle environmental protection data by using a preset data packet structure; each line of original environmental protection data packet of the to-be-analyzed file is read line by line, and if the original environmental protection data packet includes real-time information prefix or reissue information prefix, the packet header and the check code of the original environmental protection data packet are removed according to the preset data packet structure to obtain an environmental protection data unit; each data stream information packet data and OBD information packet data are sequentially extracted from the environmental protection data unit according to the information type mark and the data length of the data stream information and the OBD information; the field contents are extracted from each data stream information packet data and OBD information packet data according to the order and length of the fields contained in the data stream information and the OBD information, and the field contents are converted from hexadecimal strings to actual physical values; the field names of the data stream information and the OBD information are stored in the first row of a data stream table and an OBD table, and the field contents converted to actual physical values are sequentially stored below the corresponding field names of the data stream table and the OBD table to obtain an analyzed data stream table and an OBD table. Through the embodiment of the present application, the preset data packet structure is a standard communication data format specified in GB 17691-2018, the real-time information and the reissue information that need to be focused on are extracted from the original environmental protection data packet through the prefix identification, and the check code of the packet header and the packet tail is removed. The field contents are extracted according to the field order and length structure of the two different information types of the data stream information and the OBD information, and the field names and the field contents are saved in two tables respectively, so that the data changes of the data stream information and the OBD information can be conveniently compared through the tables, such as the occurrence frequency of fault codes and the change of observed abnormal data can be conveniently counted based on the tables, and then the environmental protection performance problems of the vehicle can be quickly located and found. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 A flowchart of an embodiment of a data analysis method of the present application; Figure 2 A schematic diagram of multiple lines of original environmental protection data packets of an embodiment of a data analysis method of the present application; Figure 3 A schematic diagram of an analyzed data stream table of an embodiment of a data analysis method of the present application; Figure 4 A schematic diagram of an analyzed OBD table of an embodiment of a data analysis method of the present application; Figure 5 A functional module schematic diagram of an embodiment of a data analysis device of the present application; Figure 6 A hardware structure schematic diagram of a data analysis device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0020] Firstly, embodiments of this application provide a data parsing method.

[0021] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the data parsing method of this application, as shown below. Figure 1 As shown, the data parsing methods include: Step S10: Obtain the file to be parsed. The file to be parsed includes multiple lines of raw environmental protection data packets. Each line of raw environmental protection data packet is obtained by encapsulating the collected vehicle environmental protection data using a preset data packet structure.

[0022] In this embodiment, software for parsing China VI emission standard data is provided to the user. After opening the software interface, the user can select to upload multiple files to be parsed. The software program selects the files to be parsed one by one and processes them according to the following steps in this embodiment. Finally, the software program outputs the parsed data stream table and OBD table for each file to be parsed. The preset data packet structure is as specified in the standard communication data format of GB 17691-2018. Each line of original environmental data packet comes from the environmental information about the vehicle (such as real-time emission data of nitrogen oxides and particulate matter) collected and reported by the vehicle terminal, referred to as China VI emission standard data. Based on GB 17691-2018, China VI emission standard data is divided into real-time information reporting and supplementary information reporting. The reported information is further divided into engine data stream information and vehicle OBD (On-Board Diagnostics) information. Specifically, "supplementary information reporting" refers to the process where, when a data communication link is abnormal, the vehicle-mounted terminal first stores the reported data locally. Once the data communication link is restored, the stored reported data is re-sent simultaneously with the original reported data. The re-sent data should be the data stored during the period of communication link abnormality on the same day, with the same data format as the original reported data, and identified as "supplementary information reporting." (Refer to...) Figure 2 , Figure 2 This is a schematic diagram of a multi-line raw environmental protection data packet according to an embodiment of the data parsing method of this application, such as...Figure 2 As shown, the original environmental protection data packet has 3 rows of data, and the original environmental protection data packet can be saved in a txt text in a hexadecimal string when data collection is performed to obtain a to-be-parsed file.

[0023] In step S20, each row of original environmental protection data packet of the to-be-parsed file is read and, if the original environmental protection data packet includes real-time information prefix or supplementary information prefix, the packet header and the check code of the original environmental protection data packet are removed according to the preset data packet structure to obtain an environmental protection data unit.

[0024] In this embodiment, the software program reads the content of the to-be-parsed file row by row, checks whether each row of original environmental protection data packet starts with real-time information prefix ("232302") or supplementary information prefix ("232303"), and if so, removes the packet header at the header of the row of original environmental protection data packet and the check code at the tail, and only retains the environmental protection data unit in the middle for subsequent analysis. It should be noted that the original environmental protection data packet also includes the vehicle login information prefix ("232301") and the vehicle logout information prefix ("232304"). For analyzing the environmental protection performance of the vehicle, only the original environmental protection data packet starting with the real-time information prefix ("232302") and the supplementary information prefix ("232303") is extracted.

[0025] In step S30, each data stream information packet data and OBD information packet data is extracted from the environmental protection data unit according to the information type flag and the data length of the data stream information and the OBD information.

[0026] In this embodiment, the information type flag of the data stream information is 2, for example, and the information type flag of the OBD information is 1, for example. According to the information type flag, the data stream information and the OBD information can be identified. The fields included in the data stream information and the OBD information and the corresponding lengths are different. The environmental protection data unit in step S20 is usually composed of multiple data stream information packet data and OBD information packet data. For example, the environmental protection data unit is composed of 10 data stream information packet data when the vehicle is running normally, and additionally includes 1 OBD information packet data when the vehicle is just started. Each packet data is usually the data collected per second. Therefore, according to the information type flag of the data stream information and the OBD information, the fields included and the corresponding lengths, the environmental protection data unit can be divided into each data stream information packet data and OBD information packet data for subsequent analysis.

[0027] In step S40, the field content is extracted from each data stream information packet data and OBD information packet data according to the order and length of the fields included in the data stream information and the OBD information, and the field content is converted from a hexadecimal string to an actual physical value.

[0028] In this embodiment, the software program extracts the field contents from each small packet of data according to the order and length of the fields contained in the data stream information and OBD information. For example, for the OBD information small packet of data, the field contents of the fault code, fault occurrence time and fault description, etc. are extracted according to the order and length of the fields contained, and for the data stream information small packet of data, the field contents of the engine speed, temperature, fuel consumption and emission, etc. are extracted according to the order and length of the fields contained. The original environmental protection data packet is stored in a hexadecimal string, and the field contents need to be converted from the hexadecimal string to the actual physical value, so as to facilitate the user to intuitively understand.

[0029] In step S50, the field names of the data stream information and OBD information are stored in the first row of the data stream table and the OBD table, and the field contents converted to the actual physical value are sequentially stored below the corresponding field names in the data stream table and the OBD table, to obtain the parsed data stream table and OBD table.

[0030] In this embodiment, for the data stream information and OBD information, two tables are used to save the field names and field contents respectively, and the software program first writes the field names of the data stream information (such as engine speed, temperature, fuel consumption and emission, etc.) and the field names of the OBD information (such as fault code, fault occurrence time and fault description, etc.) into the first row of the corresponding table, and then writes the field contents converted to the actual physical value in order below the corresponding field names, to finally generate the data stream table and OBD table files in CSV format with clear structure and easy to analyze, as shown in Figure 3 , Figure 3 The data stream table after parsing by the data parsing method of one embodiment of the present application is shown in FIG. 2, and Figure 4 , Figure 4 The OBD table after parsing by the data parsing method of one embodiment of the present application is shown in FIG. 3.

[0031] In this embodiment, a software for analyzing the sixth-generation environmental protection data is provided for users. After opening the software interface, the user can select to upload multiple files to be analyzed. The software program selects the files to be analyzed one by one, and the preset data packet structure is the standard communication data format specified in GB 17691-2018. Each line of original environmental protection data packet is derived from the environmental protection information about the vehicle collected and reported by the vehicle terminal, which is referred to as the sixth-generation environmental protection data. The software program reads the content of the file to be analyzed line by line, checks whether each line of original environmental protection data packet starts with a real-time information prefix ("232302") or a supplementary information prefix ("232303"), and if so, removes the packet header at the head and the check code at the tail of the original environmental protection data packet header, and only retains the environmental protection data unit in the middle. According to the information type mark, the included fields and the corresponding length of the data stream information and OBD information, the environmental protection data unit can be divided into each data stream information packet data and OBD information packet data. The software program extracts the field content from each packet data according to the order and length of the fields contained in the data stream information and OBD information. For example, for OBD information packet data, according to the order and length of the included fields, the field contents of fault code, fault occurrence time and fault description are extracted. For data stream information packet data, according to the order and length of the included fields, the field contents of engine speed, temperature, fuel consumption and emission are extracted. For data stream information and OBD information, two tables are used to save the field name and field content respectively. The software program first writes the field name of data stream information (such as engine speed, temperature, fuel consumption and emission) and the field name of OBD information (such as fault code, fault occurrence time and fault description) into the first row of the corresponding table, and then writes the field content converted into actual physical value into the lower part of the corresponding field name in order. Finally, the data stream table and OBD table files in CSV format with clear structure and easy analysis are generated, so that the data changes of data stream information and OBD information can be compared conveniently through the table. For example, based on the table, the occurrence frequency of fault code and the change of observed abnormal data can be easily counted, and then the environmental protection performance problem of the vehicle can be quickly located and found.

[0032] Further, in an embodiment, the conversion of the field content from a hexadecimal string to an actual physical value includes: converting the field content from a hexadecimal string to an unsigned integer value according to the big-endian mode; multiplying the converted unsigned integer value by a preset precision and adding a preset offset to obtain the field content converted into an actual physical value.

[0033] In this embodiment, for example, for the "engine speed" field, the hexadecimal string is "0x0510", which is converted to an unsigned integer value 1296 in big-endian mode, multiplied by a preset precision such as 0.5 and added to a preset offset such as 0, to obtain the final engine speed value of 648.0 revolutions / minute, thereby facilitating the user's intuitive understanding.

[0034] Further, in an embodiment, after obtaining the parsed data stream table and the OBD table, the following steps are included: The data stream table and the OBD table are saved in the directory where the file to be parsed is located in the form of a CSV file.

[0035] In this embodiment, the software program automatically saves the parsed data stream table and the OBD table in the directory where the file to be parsed is located in the form of a CSV file, and the file names of the data stream table and the OBD table are, for example, "original file name_data stream parsing.csv" and "original file name_OBD parsing.csv", respectively. The CSV format facilitates the user to directly open and analyze the data using Excel or other table software, thereby improving the data processing efficiency.

[0036] Further, in an embodiment, after obtaining the parsed data stream table and the OBD table, the following steps are included: The data stream table and the OBD table are visually displayed in the form of a graph.

[0037] In this embodiment, the software program can provide a graphical interface to visually display the key data (such as engine speed, frequency of fault codes, etc.) in the data stream table and the OBD table in the form of a line chart and a column chart. The user can intuitively observe the data trend and quickly find abnormal points, thereby improving the data analysis efficiency.

[0038] Further, in an embodiment, after obtaining the parsed data stream table and the OBD table, the following steps are included: When the value of the field content in the data stream table and the OBD table is greater than a preset value, the row where the field content is located is highlighted, and a warning is output.

[0039] In this embodiment, the software program can preset the normal range threshold of the key parameters (such as the normal range of engine speed is 500-5000 revolutions / minute). When it is detected that the data exceeds the threshold, the row of data is automatically highlighted (such as the background color changes to red), and a warning prompt is popped up in the software interface, thereby helping the user to quickly locate potential vehicle environmental performance problems.

[0040] Further, in an embodiment, the fields of the data stream information include at least one of engine speed, temperature, fuel consumption and emission, and the fields of the OBD information include at least one of fault code, fault occurrence time and fault description.

[0041] In the embodiment, the fields of the data stream information include engine speed, temperature, fuel consumption and emission, and the fields of the OBD information include fault code, fault occurrence time and fault description, and the selection of the fields can be based on the GB 17691-2018 standard and the actual needs of vehicle environmental protection detection, to ensure the comprehensiveness and practicability of data analysis.

[0042] In a second aspect, the embodiments of the present application further provide a data analysis device.

[0043] In an embodiment, the data stream information includes at least one of engine speed, temperature, fuel consumption and emission, and the OBD information includes at least one of fault code, fault occurrence time and fault description. Figure 5 Figure 5 The functional module diagram of an embodiment of the data analysis device of the present application is shown in FIG. 1, which includes: Figure 5 The acquisition module 10 is configured to acquire a file to be analyzed, and the file to be analyzed includes multiple lines of original environmental protection data packets, and each line of original environmental protection data packet is obtained by encapsulating the collected vehicle environmental protection data by using a preset data packet structure. The reading module 20 is configured to read each line of original environmental protection data packet of the file to be analyzed, and if the original environmental protection data packet includes real-time information prefix or reissue information prefix, remove the packet header and check code of the original environmental protection data packet according to the preset data packet structure, to obtain an environmental protection data unit. The extraction module 30 is configured to extract each data stream information packet data and OBD information packet data from the environmental protection data unit in sequence according to the information type mark and data length of the data stream information and the OBD information. The analysis module 40 is configured to extract the field content from each data stream information packet data and OBD information packet data according to the order and length of the fields contained in the data stream information and the OBD information, and convert the field content from a hexadecimal string to an actual physical value. The storage module 50 is configured to store the field names of the data stream information and the OBD information in the first row of a data stream table and an OBD table, and store the field content converted to the actual physical value in the data stream table and the OBD table below the corresponding field names in sequence, to obtain the analyzed data stream table and OBD table.

[0044] Further, in an embodiment, the conversion of the field content from a hexadecimal string to an actual physical value is used for: Converting the field content from a hexadecimal string to an unsigned integer value according to the big-endian mode. ​​The converted unsigned integer value is multiplied by a preset precision and added by a preset offset to obtain field content converted into an actual physical value.

[0045] Further, in an embodiment, the data analysis apparatus further comprises a storage module for: The data stream table and the OBD table are saved to a directory where the to-be-analyzed file is located in a CSV format file.

[0046] Further, in an embodiment, the data analysis apparatus further comprises a display module for: The data stream table and the OBD table are visually displayed in a graphical form.

[0047] Further, in an embodiment, the data analysis apparatus further comprises a warning module for: When a value of field content in the data stream table and the OBD table is greater than a preset value, a line where the field content is located is highlighted, and a warning is output.

[0048] Further, in an embodiment, the fields of the data stream information include at least one of engine speed, temperature, fuel consumption, and emission, and the fields of the OBD information include at least one of fault code, fault occurrence time, and fault description.

[0049] The functions of each module in the data analysis apparatus correspond to the steps in the data analysis method embodiments, and the functions and implementation processes are not repeated here.

[0050] In a third aspect, an embodiment of the present application provides a data analysis device.

[0051] Reference Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a hardware structure of a data analysis device involved in an embodiment of the present application. In an embodiment of the present application, the data analysis device can include a processor, a memory, a communication interface, and a communication bus.

[0052] The communication bus can be of any type, for interconnecting the processor, the memory, and the communication interface.

[0053] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, and the like, which are interfaces for interconnecting devices inside the data analysis device, and interfaces for interconnecting the data analysis device with other devices (for example, other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber interface, an ATM interface, and the like; the user device can be a display (Display), a keyboard (Keyboard), and the like.

[0054] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0055] The processor can be a general-purpose processor, which can invoke a data parsing program stored in the memory and execute the data parsing method provided by the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed by the data parsing program when invoked can refer to various embodiments of the data parsing method of the present application, which will not be described here.

[0056] Those skilled in the art can understand that the hardware structure shown in the above-mentioned embodiments is not a limitation of the present application, and can include more or fewer components than shown, or combine certain components, or different component arrangements. Figure 6

[0057] In a fourth aspect, the embodiments of the present application further provide a readable storage medium.

[0058] The readable storage medium of the present application stores a data parsing program, wherein the data parsing program is executed by the processor to implement the steps of the data parsing method as described above.

[0059] The method implemented by the data parsing program when executed can refer to various embodiments of the data parsing method of the present application, which will not be described here.

[0060] It should be noted that the above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0061] The terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device. The terms "first", "second" and "third" and the like descriptions are used to distinguish different objects, and do not represent the order or limitation of "first", "second" and "third".​

[0062] In the description of the embodiments of the present application, "exemplary", "for example", "e.g." or "for instance" are used on the basis that a proper name is an example and should not be necessarily construed to favour the named example over others. Any embodiment or design described herein as "exemplary", "for example" or "for instance" is not necessarily to be construed as preferred or advantageous over other embodiments or designs.

[0063] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text only means a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0064] In some of the processes described in the embodiments of the present application, a plurality of operations or steps appear in a specific order, but it should be understood that these operations or steps can be executed or performed in parallel or in a different order from their appearance in the embodiments of the present application, and the serial number of the operation is only used to distinguish different operations, and the serial number itself does not represent any execution order. In addition, these processes can include more or fewer operations, and these operations or steps can be executed in sequence or in parallel, and these operations or steps can be combined.

[0065] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, 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 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) as described above, and includes a plurality of instructions for making a terminal device execute the method described in each embodiment of the present application.

[0066] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation made by using the content of the specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data parsing method, characterized in that, The data parsing method includes: Obtain the file to be parsed, which includes multiple lines of raw environmental protection data packets. Each line of raw environmental protection data packet is obtained by encapsulating the collected vehicle environmental protection data using a preset data packet structure. Read each line of the original environmental protection data packet in the file to be parsed. If the original environmental protection data packet includes a real-time information prefix or a resend information prefix, remove the header and checksum of the original environmental protection data packet according to the preset data packet structure to obtain the environmental protection data unit. Based on the information type flags and data lengths of the data stream information and OBD information, extract the data of each data stream information packet and the OBD information packet from the environmental protection data unit in sequence; Based on the order and length of the fields contained in the data stream information and OBD information respectively, extract the field content from each data stream information packet and OBD information packet, and convert the field content from hexadecimal strings into actual physical values; Store the field names of the data flow information and OBD information in the first row of the data flow table and OBD table, and then store the field contents after they have been converted into actual physical values ​​below the corresponding field names in the data flow table and OBD table, thus obtaining the parsed data flow table and OBD table.

2. The data parsing method as described in claim 1, characterized in that, The process of converting the field content from a hexadecimal string to an actual physical value includes: Convert the field content from a hexadecimal string to an unsigned integer value in big-endian mode; Multiply the converted unsigned integer value by the preset precision and add the preset offset to obtain the field content after conversion to the actual physical value.

3. The data parsing method as described in claim 1, characterized in that, After obtaining the parsed data stream table and OBD table, the following is included: Use a CSV file to save the data stream table and OBD table to the directory containing the file to be parsed.

4. The data parsing method as described in claim 1, characterized in that, After obtaining the parsed data stream table and OBD table, the following is included: The data flow table and OBD table are visualized using graphical means.

5. The data parsing method as described in claim 1, characterized in that, After obtaining the parsed data stream table and OBD table, the following is included: When the value of a field in the data stream table and OBD table exceeds a preset value, the row containing the field value will be highlighted and an alert will be output.

6. The data parsing method as described in claim 1, characterized in that, The fields of the data stream information include at least one of engine speed, temperature, fuel consumption, and emissions, and the fields of the OBD information include at least one of fault code, fault occurrence time, and fault description.

7. A data parsing device, characterized in that, The data parsing device includes: The acquisition module is used to acquire the file to be parsed, which includes multiple lines of raw environmental protection data packets. Each line of raw environmental protection data packet is obtained by encapsulating the collected vehicle environmental protection data using a preset data packet structure. The reading module is used to read each line of the original environmental protection data packet of the file to be parsed. If the original environmental protection data packet includes a real-time information prefix or a resend information prefix, the header and checksum of the original environmental protection data packet are removed according to the preset data packet structure to obtain the environmental protection data unit. The extraction module is used to extract each data stream information packet and OBD information packet from the environmental protection data unit sequentially based on the information type flag and data length of the data stream information and OBD information. The parsing module is used to extract field content from each data stream information packet and OBD information packet according to the order and length of the fields contained in the data stream information and OBD information respectively, and convert the field content from hexadecimal strings into actual physical values; The save module stores the field names of data stream information and OBD information in the first row of the data stream table and the OBD table, and stores the field contents after they have been converted into actual physical values ​​below the corresponding field names in the data stream table and the OBD table, thus obtaining the parsed data stream table and OBD table.

8. The data parsing apparatus as described in claim 7, characterized in that, The process of converting the field content from a hexadecimal string to an actual physical value is used for: Convert the field content from a hexadecimal string to an unsigned integer value in big-endian mode; Multiply the converted unsigned integer value by the preset precision and add the preset offset to obtain the field content after conversion to the actual physical value.

9. A data parsing device, characterized in that, The data parsing device includes a processor, a memory, and a data parsing program stored in the memory and executable by the processor, wherein when the data parsing program is executed by the processor, it implements the steps of the data parsing method as described in any one of claims 1 to 6.

10. A readable storage medium, characterized in that, The readable storage medium stores a data parsing program, wherein when the data parsing program is executed by a processor, it implements the steps of the data parsing method as described in any one of claims 1 to 6.