Fault code snapshot analysis method, electronic equipment and computer readable storage medium

By allowing for flexible selection of custom parsing modes and parameters, the problem of poor adaptability in fault code snapshot parsing in existing technologies has been solved. This enables efficient and accurate parsing of fault code snapshots under different ECU models and fault code types, thereby improving vehicle diagnostic efficiency and system stability.

CN121807776APending Publication Date: 2026-04-07SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing fault code snapshot parsing methods rely on fixed parsing rules and a single adaptation logic, resulting in poor compatibility with different ECU models and fault code types, affecting vehicle diagnostic efficiency and increasing time and labor costs.

Method used

A fault code snapshot parsing method is provided. By obtaining the original data of the target snapshot, it checks whether a custom enable identifier is included based on the preset custom parsing mode configuration rules. If it is not included, the first parsing parameter is used for segmented parsing. If it is included, the second parsing parameter is obtained using the custom snapshot configuration information for segmented parsing, ensuring the flexibility and accuracy of parsing.

Benefits of technology

It improves the adaptability and flexibility of fault code snapshot parsing, ensures the accuracy and efficiency of parsing in both normal and abnormal scenarios, avoids parsing interruptions caused by missing or incorrect data, and improves the efficiency of vehicle detection and the stability of the diagnostic system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807776A_ABST
    Figure CN121807776A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile electronic diagnosis, in particular to a fault code snapshot analysis method, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining to-be-analyzed target snapshot original data, and according to a preset user-defined analysis mode configuration rule, analyzing the target snapshot original data according to the preset user-defined analysis mode configuration rule; detecting whether analysis mode configuration information associated with the original data of the target snapshot contains a user-defined enabling identifier or not; when the identifier is not detected, extracting a snapshot group identifier and data quantity information in the data, retrieving a matched first analysis parameter in an analysis association database, and analyzing according to a data segmentation analysis rule to obtain first snapshot information; and when the identifier is detected, the associated self-defined snapshot configuration information is obtained, the matched second analysis parameter is retrieved, and the second snapshot information is obtained through analysis according to the self-defined data segmentation analysis rule, so that the adaptation flexibility of fault code snapshot analysis is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automobile electronic diagnosis, and in particular to a fault code snapshot analysis method, an electronic device and a computer readable storage medium. BACKGROUND

[0002] In the field of automobile electronic diagnosis, fault code snapshots, as key operating data recorded when an electronic control unit detects an anomaly, are the core support for restoring the fault occurrence condition and accurately locating the fault source, and are widely used in vehicle manufacturing detection and after-sales maintenance scenarios.

[0003] The current fault code snapshot analysis processing mode relies on fixed analysis rules and single adaptation logic, and has poor adaptability to different ECU (Electronic Control Unit) models and different fault code types.

[0004] This problem significantly affects the efficiency of automobile diagnosis - maintenance personnel may delay fault troubleshooting due to unanalyzable data, and vehicle manufacturers may experience a lag in the diagnosis process due to insufficient adaptation, significantly increasing time and labor costs, restricting the stable and efficient operation of the automobile diagnosis system, and urgently requiring flexible adaptation of fault code snapshot analysis.

[0005] The above content is only used to assist in understanding the technical solutions of the present application and does not represent an admission that the above content is prior art. SUMMARY

[0006] The main purpose of the present application is to provide a fault code snapshot analysis method, an electronic device and a computer readable storage medium, aiming to improve the adaptability of fault code snapshot analysis.

[0007] To achieve the above purpose, the present application provides a fault code snapshot analysis method, which comprises: obtaining target snapshot raw data to be analyzed; detecting whether a custom activation identifier is included in the analysis mode configuration information associated with the target snapshot raw data based on a preset custom analysis mode configuration rule; If it is detected that the custom activation identifier is not included, the snapshot group identifier and data quantity information in the target snapshot raw data are extracted, the matching first analysis parameter is retrieved in the analysis association database based on the snapshot group identifier and data quantity information, the target snapshot raw data is segmented and analyzed according to the data segmentation analysis rule of the first analysis parameter, and the first snapshot information after segmentation and analysis is obtained; If it is detected that the custom enabling identifier is included, custom snapshot configuration information associated with the target snapshot raw data is acquired, a matched second parsing parameter is retrieved in the parsing association database based on the custom snapshot configuration information, the target snapshot raw data is segmented and parsed according to a custom data segmentation and parsing rule in the second parsing parameter, and second snapshot information after segmentation and parsing is obtained.

[0008] In addition, to achieve the above object, the application further provides an electronic device, which comprises a vehicle-mounted loudspeaker, a memory, a processor, and a fault code snapshot parsing program stored in the memory and executable on the processor, and the fault code snapshot parsing program realizes the steps of the fault code snapshot parsing method when executed by the processor.

[0009] In addition, to achieve the above object, the application further provides a computer readable storage medium, which stores a fault code snapshot parsing program, and the fault code snapshot parsing program realizes the steps of the fault code snapshot parsing method when executed by the processor.

[0010] The application provides a fault code snapshot parsing method, which acquires target snapshot raw data to be parsed, provides effective data input for a subsequent parsing process, ensures that a parsing action has an execution basis, and avoids parsing interruption caused by data loss; detects whether a custom enabling identifier is included in parsing mode configuration information associated with the target snapshot raw data based on a preset custom parsing mode configuration rule, realizes clear parsing mode selection basis, avoids confusion between a default mode and a custom mode, and provides direction guidance for accurate parsing; if it is detected that the custom enabling identifier is not included, a snapshot group identifier and data quantity information in the target snapshot raw data are extracted, a matched first parsing parameter is retrieved in a parsing association database based on the snapshot group identifier and the data quantity information, the target snapshot raw data is segmented and parsed according to a data segmentation and parsing rule of the first parsing parameter, first snapshot information after segmentation and parsing is obtained, accurate matching of a parsing rule is ensured relying on grouping characteristics carried by data itself, and accuracy and efficiency of a parsing result in a normal data scenario are ensured; if it is detected that the custom enabling identifier is included, custom snapshot configuration information associated with the target snapshot raw data is acquired, a matched second parsing parameter is retrieved in the parsing association database based on the custom snapshot configuration information, the target snapshot raw data is segmented and parsed according to a custom data segmentation and parsing rule in the second parsing parameter, and second snapshot information after segmentation and parsing is obtained, original data errors are covered through custom configuration, a strong dependence of prior art on a database and original data is broken through, and feasibility of parsing in an abnormal scenario is ensured, and finally, the adaptation flexibility of fault code snapshot parsing is effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 is a flowchart of a first embodiment of the fault code snapshot parsing method of the application; Figure 2 is a schematic diagram of a core data structure of a snapshot analysis database involved in the present application; Figure 3 is a schematic diagram of a process of returning data by snapshot group information involved in the present application; Figure 4 is a schematic diagram of a process of using a custom snapshot group by a snapshot group involved in the present application; Figure 5 is a schematic diagram of the structure of an electronic device involved in the embodiment scheme of the present application.

[0012] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0013] The embodiment of the present application provides a fault code snapshot analysis method, referring to Figure 1 , and Figure 1 is a schematic diagram of a process of the fault code snapshot analysis method according to the first embodiment of the present application.

[0014] The exemplary embodiments will be described in detail below with reference to the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0015] In the field of automotive electronic diagnosis, fault code snapshots are running data recorded when an electronic control unit (ECU) detects a fault, which is the key to troubleshooting and restoring the working condition, and is applied to vehicle detection and after-sales maintenance.

[0016] The current fault code snapshot analysis processing mode relies on a pre-set fixed database and a single matching logic, and the analysis strongly depends on the complete consistency of data and the database. This problem directly leads to the limitation of analysis - the ECU returned data is slightly different (such as snapshot quantity deviation) and cannot be analyzed, which prolongs the maintenance troubleshooting time, reduces the vehicle detection efficiency, and increases the diagnosis cost.

[0017] The present application accordingly provides a fault code snapshot analysis method, an electronic device and a computer readable storage medium, which realize improving the adaptive flexibility of fault code snapshot analysis.

[0018] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a database system, etc., or a device capable of realizing the above functions, such as an electronic device, etc. The present embodiment and each of the following embodiments will be described below taking the electronic device as an example.

[0019] The fault code snapshot analysis method comprises the following implementation steps S10 to S40.

[0020] Step S10: obtaining target snapshot original data to be analyzed; As an example, the application scenario can be a whole vehicle life cycle electronic diagnosis scene or a multi-model ECU cooperative fault troubleshooting scene. The former covers the whole stage diagnosis demand of the vehicle from factory detection, daily operation and maintenance to after-sales maintenance, and the latter adapts to the analysis demand when different functional ECUs (such as engine ECU and body control ECU) jointly generate fault snapshots. Both can rely on the scheme to realize flexible analysis of fault code snapshots.

[0021] Optionally, the execution carrier of the fault code snapshot analysis method comprises but is not limited to a diagnostic instrument, which is mainly used for interacting with an ECU (Electronic Control Unit) and processing fault code snapshot data. It has a data communication function, can send snapshot response data acquisition requests to the ECU and receive snapshot response data returned by the ECU. Meanwhile, it is internally provided with a database module, including a snapshot analysis database and a snapshot group custom database, supports parameter matching retrieval, can execute analysis logic, detects analysis mode, extracts data features and analyzes data according to segmentation rules, can also receive snapshot information manually configured by a user, adapts to ECU data abnormal scenes, finally outputs clear fault snapshot analysis results, and supports fault troubleshooting and diagnosis.

[0022] Optionally, the ECU (Electronic Control Unit) is provided; the snapshot analysis database is used for matching snapshot data returned by the ECU to support analysis; and the snapshot group custom database supports user-defined snapshot groups and quantities.

[0023] Optionally, the embodiment provides a fault code snapshot analysis scheme, which can flexibly analyze snapshot data returned by the ECU. Even if the number of snapshot groups returned by the module is incorrect, the analysis can be completed through manual configuration. Before the scheme is implemented, two types of databases need to be established. One is a snapshot analysis database, which is used for matching snapshot data returned by the ECU and provides basic parameters for analysis. The other is a snapshot group custom database, which supports user-defined snapshot groups and quantities. When the user checks the custom, the analysis uses the custom groups and quantities. If the user does not check the custom, the groups and quantities returned by the ECU are used by default. During actual analysis, the snapshot data returned by the ECU is first acquired through the diagnostic instrument, and reverse matching is performed based on the database. In a conventional scene, the diagnostic instrument directly calls the parameters of the snapshot analysis database to complete the analysis. If the number of snapshot groups returned by the ECU is incorrect, the user can enter the correct groups and quantities in the snapshot group custom database through the configuration entry of the diagnostic instrument. The diagnostic instrument completes the analysis based on the manually configured information, realizing flexible adaptation in different scenes.

[0024] Optionally, in the snapshot resolution database, the different resolution methods for the same snapshot identifier (e.g., F011) across different snapshot groups are stored in the same table using a composite primary key of "snapshot group number - snapshot identifier". The table structure includes fields such as snapshot group number, snapshot identifier, data type (Unsigned / BCD), total number of bytes for the identifier, coefficient, and unit. The difference resolution rules can be accurately located directly through the composite primary key. In the snapshot group custom database, the user-defined snapshot group number has a value range of 001. 16 -FF 16 (3-digit hexadecimal), the maximum number of snapshots is 10 (maximum number of snapshots per group); the initial data for both databases needs to be manually entered. The entry process is as follows: First, import the snapshot format technical document provided by the ECU manufacturer (such as the UDS diagnostic protocol specification document); second, automatically map the document fields to the database fields through the diagnostic instrument configuration interface (such as the document "snapshot group number" corresponding to the database "snapshot group number"); in addition, manually check the key fields (such as the total number of bytes of the identifier, coefficients), and submit the storage after confirming that there are no errors to complete the initialization.

[0025] like Figure 2 As shown, Figure 2 This is a schematic diagram of the core data structure of the snapshot parsing database involved in this application. Data group number: a unique identifier distinguishing different snapshot data groups; Type description: the type attribute of the snapshot data parameter (e.g., Unsigned, BIGD); Data item order: the parameter's sequence number within the corresponding snapshot group; Description: the meaning of the actual physical parameter corresponding to the parameter (e.g., vehicle speed, engine speed); Identifier byte count: the number of bytes occupied by the parameter; Start byte: the starting byte position of the parameter in the snapshot data; Start bit length: the starting bit of the parameter within the start byte; Data point word length: the word length (i.e., the number of data bits) corresponding to the parameter; Data point bit length: the specific bit range of the parameter in the data; State value: the original numerical value corresponding to the parameter; Coefficient: the proportional parameter for converting the state value into a physical quantity; Offset: the offset parameter for converting the state value into a physical quantity; Unit: the unit of measurement for the physical quantity corresponding to the parameter. Figure 2The single data record structure of the snapshot analysis database is fully presented. Specifically, each record corresponds to a specific physical parameter in the snapshot returned by the ECU (e.g., the first record corresponds to "vehicle speed 1"), is associated to the corresponding snapshot group (e.g., group number 1) through "data group number", and its arrangement position in the group is explicitly indicated by "data item order" (e.g., order 2); "number of identification bit bytes", "start byte", and other positioning parameters are used to accurately position and extract the "state value" (e.g., 16) of the parameter from the original snapshot data returned by the ECU; and the state value is converted into a physical quantity with "unit" (e.g., 0.25 km / h) through the operation rule of "coefficient x state value + offset" (e.g., 16 x 0.015625 + 0). The figure contains multiple records (e.g., vehicle speed 1, vehicle speed 2, engine speed, etc.), covering different types of fault-related parameters. The positioning and operation parameters of each record together constitute the standardization rule for snapshot analysis, ensuring that the diagnostic instrument can accurately analyze the actual values of each physical parameter from the original data returned by the ECU, providing data support for fault troubleshooting.

[0026] Optionally, the target snapshot original data refers to the original data of the vehicle operating state recorded synchronously by the electronic control unit (ECU, Electronic Control Unit) when detecting vehicle faults and generating fault codes, including but not limited to fault time, voltage value, vehicle speed, etc. Information is the basic input data for the subsequent fault code snapshot analysis process; diagnostic instrument: the core hardware device of automotive electronic diagnosis, with the functions of communication with ECU and data processing.

[0027] Optionally, to obtain the target snapshot original data to be analyzed, the hardware module of the diagnostic instrument needs to be relied on: through the vehicle-mounted communication interface (including but not limited to OBD-II interface) of the diagnostic instrument, the diagnostic instrument initiates a request to the ECU to obtain snapshot response data; after receiving the request, the ECU encapsulates the stored fault-related operating data into snapshot response data and feeds it back to the diagnostic instrument through the same communication interface; the diagnostic instrument receives the data and identifies the response type, and the identification result includes but is not limited to positive response, negative response or irrelevant data; if there is a target data segment corresponding to the positive response, the data segment is taken as the target snapshot original data to be analyzed; if not, the diagnostic instrument outputs a failure prompt through the display module, and re-sends the request to the ECU through the communication interface again until the target data segment corresponding to the positive response is obtained.

[0028] Optionally, the acquisition process can also establish a connection with the ECU supporting wireless communication and initiate a data request by means of the wireless communication module (including but not limited to Bluetooth, Wi-Fi) of the diagnostic instrument, receive and identify the target snapshot raw data, and interact with the ECU through the hardware interface of the diagnostic instrument to acquire data, thereby ensuring the real-time and accuracy of the target snapshot raw data and providing reliable basic input for the subsequent analysis process.

[0029] Optionally, in the default analysis process, the byte count starts from 1 (e.g., the first byte of the returned data is ReadDTCInformation Response SID); if the snapshot identifier is extracted from the 9th byte, the remaining data length is less than 2 bytes, the diagnostic instrument directly outputs an explicit prompt that "the data length is insufficient (remaining bytes < 2), and the current snapshot cannot be parsed"; datelength refers to the total number of bytes of the entire returned data (including the UDS protocol header and data segment), if the datelength calculation is incorrect (e.g., the number of bytes actually received by the diagnostic instrument deviates by more than 2 bytes), the "data length field" (e.g., the 3rd byte in the UDS protocol frame) of the ECU returned data is automatically re-read for calibration; in the loop analysis, "date" in "data=date+2+didlength" is a typo, and it should actually be "data", i.e., the data update formula is uniformly "data=data+2+didlength", to ensure consistent variable naming.

[0030] Optionally, when acquiring the target snapshot raw data to be analyzed, the snapshot response data returned by the ECU can also be preliminarily checked, including but not limited to checking whether the data length meets the preset range and whether the data format meets the UDS diagnostic protocol requirements; if the check fails, a data invalid prompt is directly output, and a reacquisition request is initiated; if the check passes, the response type is identified to determine the target data segment.

[0031] The above-mentioned method can ensure the validity and integrity of the data input into the analysis process, avoid interruption of analysis caused by invalid or missing data, and lay a foundation for subsequent accurate analysis.

[0032] Step S20: Based on the preset custom analysis mode configuration rule, it is detected whether the custom enable identifier is contained in the analysis mode configuration information associated with the target snapshot raw data. Optionally, the preset custom resolution mode configuration rule is a rule set preset for judging whether to enable the custom resolution mode, including but not limited to a custom enabling identification template and the like; the custom enabling identification is a feature identification for triggering the custom resolution mode, which can be configured by a user or preset by the system; and the resolution mode configuration information is an information segment associated with the target snapshot original data and used for defining the resolution mode, including a related field of whether to enable the custom mode.

[0033] Optionally, based on the preset custom resolution mode configuration rule, it is detected whether the custom enabling identification is contained in the resolution mode configuration information associated with the target snapshot original data, specifically including calling the preset custom resolution mode configuration rule, which includes but is not limited to a preset custom enabling identification template; extracting an information segment of the resolution mode corresponding to the electronic control unit (ECU) from the target snapshot original data; based on the preset rule, performing feature comparison between a field of the information segment and the custom enabling identification template; when the feature comparison is completely matched, it is determined that the custom enabling identification is contained; and when the comparison is not completely matched, it is determined that the custom enabling identification is not contained.

[0034] Optionally, the detection process can also perform integrity verification on the resolution mode configuration information segment, including but not limited to verifying whether the field length meets the preset requirement and whether the field format meets the UDS diagnostic protocol specification; if the verification fails, it is directly determined that the custom enabling identification is not contained, and a prompt that the information segment is invalid is output; and if the verification passes, the feature comparison step is performed again.

[0035] The embodiment can accurately judge the resolution mode through the explicit rule calling, information extraction and comparison logic, provide a clear basis for the selection of subsequent default resolution or custom resolution, avoid resolution errors caused by mode confusion, and guarantee the orderliness and accuracy of the resolution process.

[0036] Step S30: If it is detected that the custom enabling identification is not contained, a snapshot group identification and data quantity information in the target snapshot original data are extracted, a matched first resolution parameter is searched in a resolution association database based on the snapshot group identification and the data quantity information, the target snapshot original data are segmented and resolved according to a data segmentation resolution rule of the first resolution parameter, and first snapshot information after segmentation and resolution is obtained. Optionally, the snapshot group identifier is an identifier for distinguishing different data groups in the target snapshot raw data; the data quantity information is data quantity information contained in the data group corresponding to the snapshot group identifier; the parsing association database includes a snapshot parsing database and a snapshot group custom database, and is used for storing parameters required for parsing; the first parsing parameter is a parameter in the parsing association database matched with the snapshot group identifier and the data quantity information, and includes but is not limited to a data segmentation rule and a first format standard; the data segmentation parsing rule is a rule for segmenting the target snapshot raw data defined in the first parsing parameter; and the first snapshot information is identifiable snapshot information obtained after the target snapshot raw data is parsed according to the first parsing parameter.

[0037] Optionally, when the custom enabling identifier is detected, the snapshot group identifier and the data quantity information are extracted from the target snapshot raw data; based on the identifier and the information, parameter matching retrieval is performed in the parsing association database, and the corresponding first parsing parameter is searched; after the first parsing parameter is searched, the data segmentation rule in the first parsing parameter is called, and the target snapshot raw data is segmented according to the rule; then the first format standard is called, and the segmented data is parsed according to the standard to obtain the first snapshot information.

[0038] Optionally, when the snapshot group identifier and the data quantity information are extracted, the data integrity can be verified first, including but not limited to verifying whether the identifier format conforms to a preset specification and whether the quantity information is a valid value; if the verification fails, an invalid data prompt is output; if the verification passes, the database retrieval step is executed; and if there are multiple parameters corresponding to the same identifier but having different formats during the retrieval, the parameter associated and bound according to the current parsing group identifier is determined as the first parsing parameter.

[0039] The embodiment can accurately extract data features, match and parse parameters, and parse according to rules, to ensure accurate parsing of snapshot data in a conventional scenario, provide reliable data support for fault diagnosis, and guarantee the stability and effectiveness of the parsing process.

[0040] Step S40: If the custom enabling identifier is detected, the custom snapshot configuration information associated with the target snapshot raw data is obtained, the second parsing parameter matched in the parsing association database is searched based on the custom snapshot configuration information, the target snapshot raw data is segmented and parsed according to the custom data segmentation parsing rule in the second parsing parameter, and the second snapshot information obtained after the segmentation and parsing is obtained.

[0041] Optionally, the custom enable identifier is used to trigger a custom analysis mode, which can be configured by a user or preset by the system; the custom snapshot configuration information is information configured in advance by the user for correcting ECU error data, including but not limited to correct snapshot group number and correct data quantity; the second analysis parameter is an analysis parameter matched with the custom snapshot configuration information in the analysis association database, including a custom data segmentation analysis rule and a second format standard; the custom data segmentation analysis rule is a rule defined in the second analysis parameter for segmenting target snapshot original data based on custom configuration; and the second snapshot information is identifiable snapshot information obtained after analysis according to the second analysis parameter.

[0042] Optionally, when the custom enable identifier is detected, the custom snapshot configuration information associated with the target snapshot original data is obtained; based on the configuration information, parameter retrieval is performed in the analysis association database to find a matched second analysis parameter; after the second analysis parameter is found, the custom data segmentation analysis rule in the second analysis parameter is called to segment the target snapshot original data according to the rule; and then the second format standard is called to analyze the segmented data according to the standard to obtain the second snapshot information.

[0043] Optionally, before the custom snapshot configuration information is obtained, a preset display interface can be used to output a prompt to guide the user to confirm the correctness of the configuration information; if the user needs to modify, the correct snapshot group number and data quantity can be updated through an operation portal and stored; and subsequently, the second analysis parameter is retrieved based on the updated configuration information, segmented analysis is completed according to the rule, and the second snapshot information is obtained.

[0044] Optionally, after the custom snapshot group is checked, a “partial custom” mode is supported, and the user can check the snapshot group number that needs to be enabled in the “snapshot group selection” list in the “custom configuration” interface of the diagnostic instrument (for example, only group number 1 and group number 3 are checked); the snapshot group number that is not checked uses the ECU return data by default; if the snapshot quantity defined by the user is inconsistent with the actual return quantity of the ECU, the data is completely truncated according to the custom quantity during analysis, and a prompt is displayed on the diagnostic instrument, indicating that the custom quantity (X) is inconsistent with the ECU return quantity (Y), and the data has been analyzed according to the custom configuration, and a difference log is recorded; when the custom database does not have current snapshot group data, the correct group number and quantity entered by the user through the “maintenance portal” are stored in the snapshot group custom database by default; if synchronization to the snapshot analysis database is needed, the “synchronize to snapshot analysis database” option needs to be manually checked in the entry interface, and a “confirm synchronization” pop-up window is used for secondary verification (to prevent misoperation); after synchronization, the analysis parameter of the corresponding group number in the snapshot analysis database is updated to the custom configuration.

[0045] The embodiment effectively covers the ECU data error scene by calling the custom configuration information matching analysis parameter, ensures that the snapshot data can be normally analyzed, provides reliable support for fault diagnosis, and improves the adaptive flexibility and fault tolerance of the analysis scheme.

[0046] The embodiment provides effective data input for the subsequent analysis process by obtaining the target snapshot raw data to be analyzed, ensures that the analysis action has a basis for execution, and avoids analysis interruption due to data loss; based on the preset custom analysis mode configuration rule, it is detected whether the analysis mode configuration information associated with the target snapshot raw data contains a custom enabled identifier, the basis for selecting the analysis mode is clear, the default mode and the custom mode are avoided, and the direction of accurate analysis is provided; if it is detected that the custom enabled identifier is not included, the snapshot group identifier and data quantity information in the target snapshot raw data are extracted, the matching first analysis parameter is retrieved in the analysis associated database based on the snapshot group identifier and data quantity information, the target snapshot raw data is segmented and analyzed according to the data segmentation analysis rule of the first analysis parameter, the first snapshot information after segmentation and analysis is obtained, the grouping characteristics carried by the data itself are accurately matched with the analysis rule, and the accuracy and efficiency of the analysis result in the normal data scene are ensured; if it is detected that the custom enabled identifier is included, the custom snapshot configuration information associated with the target snapshot raw data is obtained, the matching second analysis parameter is retrieved in the analysis associated database based on the custom snapshot configuration information, the target snapshot raw data is segmented and analyzed according to the custom data segmentation analysis rule in the second analysis parameter, the second snapshot information after segmentation and analysis is obtained, the original data error is covered by the custom configuration, the strong dependence of the prior art on the database and the original data is broken through, the feasibility of analysis in the abnormal scene is ensured, and finally the adaptive flexibility of fault code snapshot analysis is effectively improved.

[0047] Further, based on the above content, the second embodiment of the fault code snapshot analysis method is proposed. In some feasible embodiments, the above step S10 includes the following implementation steps B201-B203.

[0048] Step B201: receiving snapshot response data returned by an electronic control unit for fault diagnosis, identifying the response type of the snapshot response data to obtain an identification result, wherein the identification result includes a positive response, a negative response or irrelevant data; Step B202: if the target data segment corresponding to the positive response exists in the identification result, the target data segment is taken as the target snapshot raw data to be analyzed; Step B203: If there is no target data segment corresponding to the positive response in the identification result, output a prompt information that the target snapshot original data acquisition fails, and resend the snapshot response data acquisition request to the electronic control unit until the target data segment corresponding to the positive response is acquired, and the target data segment is taken as the target snapshot original data to be parsed.

[0049] Optionally, the electronic control unit (ECU, Electronic Control Unit): a vehicle fault diagnosis core module, which can detect faults and return snapshot data containing the running state of the vehicle at the time of the fault; snapshot response data: information returned by the ECU in response to the snapshot data acquisition request, including but not limited to fault snapshot valid data, response state identifier; response type identification: an operation of determining the validity and type of snapshot response data, and the identification result includes but is not limited to positive response (including valid snapshot data), negative response (no valid data), irrelevant data (non-snapshot related response); positive response: a response type in which the ECU successfully returns valid snapshot data, including a target data segment containing snapshot information that can be extracted; target data segment: a data part in the positive response carrying actual fault snapshot information; target snapshot original data: snapshot original information extracted from the target data segment of the positive response and used for subsequent parsing.

[0050] In this embodiment, snapshot response data returned by the ECU for fault diagnosis is received, the data is response information containing snapshot identifier, data length and other fields generated by the ECU based on the UDS diagnosis protocol after detecting a vehicle fault; the snapshot response data is subjected to response type identification, and the identification logic includes but is not limited to checking whether the first byte of the response is a preset positive response identifier (such as 59 16 , corresponding to ReadDTCInformation Response SID), judging whether the data segment contains fault codes (3-5 bytes) and snapshot group identifier (7 bytes) related fields, and the obtained identification result includes but is not limited to positive response, negative response or irrelevant data; if there is a target data segment corresponding to the positive response (i.e., containing complete fault codes, snapshot group identifier and snapshot data) in the identification result, the target data segment is taken as the target snapshot original data to be parsed; if there is no target data segment corresponding to the positive response in the identification result (such as negative response code, missing key information in the data field), a prompt information that the target snapshot original data acquisition fails is output, and the snapshot response data acquisition request is resent to the ECU until the positive response containing the complete target data segment is acquired, and the target data segment is taken as the target snapshot original data to be parsed.

[0051] The embodiment combines the response identification logic and the retry mechanism of the UDS protocol specification to ensure that the target snapshot raw data meeting the analysis requirements can be stably obtained, to provide complete and effective input for subsequent snapshot analysis, and to ensure the accuracy and reliability of the fault diagnosis data acquisition link.

[0052] Further, based on the above content, in some feasible embodiments, the step S20 includes the following implementation steps C301-C305.

[0053] Step C301: retrieve the preset custom analysis mode configuration rule, wherein the preset custom analysis mode configuration rule includes a preset custom enable identification template; Step C302: extract the analysis mode configuration information segment corresponding to the electronic control unit from the target snapshot raw data; Step C303: based on the preset custom analysis mode configuration rule, perform feature comparison between the fields of the analysis mode configuration information segment and the custom enable identification template; Step C304: when it is determined that the feature comparison is completely matched, it is determined that the custom enable identification is included. Step C305: when it is determined that the feature comparison is not completely matched, it is determined that the custom enable identification is not included.

[0054] Optionally, the preset custom analysis mode configuration rule is a pre-stored rule set for determining the analysis mode, including but not limited to the custom enable identification template, the field verification logic, and is suitable for the snapshot format difference of different ECUs (electronic control units); the custom enable identification template is a feature template for matching the analysis mode, including specific fields required for triggering the custom mode (such as snapshot group number identification, data quantity verification identification); the analysis mode configuration information segment is a byte segment in the target snapshot raw data carrying the analysis mode configuration, corresponding to the format definition of the ECU returned snapshot (such as the 7th byte snapshot group number, associated configuration field); the feature comparison is an operation of matching the fields of the analysis mode configuration information segment with the custom enable identification template, including field value matching, key bit verification and other logic; the custom enable identification is a feature identification triggering the custom analysis mode, and the custom snapshot configuration analysis is enabled when the matching is successful.

[0055] Optionally, a preset custom analysis mode configuration rule is called, the rule including a preset custom enabling identification template, the template field referring to the format of the ECU return snapshot (such as covering the snapshot group number, data quantity check bit, and adapting to the snapshot identifier ordering, length difference of different ECUs); from the target snapshot raw data, the analysis mode configuration information segment corresponding to the electronic control unit is extracted, the extraction range including but not limited to specific bytes in the snapshot data related to the analysis mode (such as the configuration field associated with the snapshot group number, the data quantity identification field); based on the preset custom analysis mode configuration rule, the field of the analysis mode configuration information segment is compared with the custom enabling identification template, the comparison logic including but not limited to complete field value matching and consistent key feature bits (such as data length check bits); when it is determined that the feature comparison is completely matched, it is determined that the custom enabling identification is included; when it is determined that the feature comparison is not completely matched, it is determined that the custom enabling identification is not included.

[0056] The embodiment ensures the accuracy of the analysis mode judgment by adapting the rule design and accurate field extraction to the ECU snapshot format difference, avoids the mode misjudgment caused by the inconsistent ECU snapshot format, provides a reliable basis for subsequent analysis path selection, and guarantees the stability of the analysis process.

[0057] Further, based on the above content, in some feasible embodiments, the step of step S30 further includes the following implementation steps D401 to D404.

[0058] Step D401: if it is detected that the custom enabling identification is not included, the snapshot group identification for identifying the data packet and the data quantity information corresponding to the data packet are extracted from the target snapshot raw data; Step D402: based on the snapshot group identification and the data quantity information, parameter matching retrieval is performed in the analysis associated database to find the first analysis parameter corresponding to the snapshot group identification and the data quantity information; Step D403: when the first analysis parameter is found, the data segmentation rule in the first analysis parameter is called, the target snapshot raw data is segmented according to the data segmentation rule, and the segmented data is obtained; Step D404: the first format standard corresponding to the first analysis parameter is called, and the segmented data is analyzed according to the first format standard, and the first snapshot information is obtained.

[0059] Optionally, snapshot group identification: a unique identifier used to distinguish different data groups in the target snapshot raw data, corresponding to the "snapshot group number" (such as group number 1, group number 5) in the 7th byte of the ECU (Electronic Control Unit) returned snapshot format; data quantity information: the number of snapshot data contained in the data group corresponding to the snapshot group identification, i.e. the "snapshot quantity" (such as 5 snapshot data per group) in the 8th byte of the ECU returned snapshot format; parsing associated database: a database set containing a snapshot parsing database (storing snapshot identifier matching parameters, such as the parsing rule corresponding to "F011") and a snapshot group custom database (storing user configuration information); first parsing parameter: a parsing parameter in the parsing associated database that matches both the snapshot group identification and the data quantity information, including but not limited to data segmentation rule, first format standard; data segmentation rule: a raw data division rule defined in the first parsing parameter, such as "from the 9th byte, each snapshot identifier occupies 2 bytes"; first format standard: a data parsing format defined in the first parsing parameter, including data type (Unsigned, BCD), coefficient, offset, unit (V, rpm, km / h), etc.

[0060] Optionally, when it is detected that the custom enable identification is not included, the snapshot group identification (such as extracting the value of the 7th byte as the group number) used to identify the data group is extracted from the target snapshot raw data, and the data quantity information (such as extracting the value of the 8th byte as the number of snapshot per group) corresponding to the data quantity of the data group is extracted; based on the snapshot group identification and the data quantity information, parameter matching retrieval is performed in the parsing associated database to find the first parsing parameter corresponding to both (such as when the group number is 1 and the quantity is 5, the parsing parameters of the identifiers "F011", "F012", etc. in the snapshot parsing database are matched); when the first parsing parameter is found, the data segmentation rule (such as the rule of "each snapshot identifier occupies 2 bytes, and the subsequent data occupies 1 byte") is called, the target snapshot raw data is segmented according to the rule, and the segmented data is obtained; the first format standard corresponding to the first parsing parameter (such as Unsigned type, coefficient 0.1, unit V corresponding to "F011") is called, and the segmented data is parsed according to the standard (such as converting the state value 16 to 1.6V), and the first snapshot information is obtained.

[0061] The embodiment ensures efficient parsing of snapshot data in a conventional scenario by matching the parameters extracted from the ECU snapshot format with the accurate database, avoids parsing failure caused by parameter mismatch, and provides reliable data support for fault diagnosis.

[0062] Further, based on the content of any of the above embodiments, in some feasible embodiments, the above step S40 further includes the following implementation steps E501-E505.

[0063] Step E501: If the custom enable identifier is detected, confirm that the snapshot quantity in the target snapshot raw data is error data; Step E502: Call the custom snapshot configuration information manually configured by the user in advance in the parsing association database, wherein the configuration information includes the correct snapshot group number corresponding to the error data and the correct data quantity; Step E503: Based on the correct snapshot group number and the correct data quantity, perform parameter retrieval in the parsing association database to find a second parsing parameter that matches both the correct snapshot group number and the correct data quantity; Step E504: When the second parsing parameter is found, call the custom data segmentation rule in the second parsing parameter, segment and divide the target snapshot raw data according to the custom data segmentation rule, and obtain custom segmented data; Step E505: Call the second format standard in the second parsing parameter, and perform information conversion processing on the custom segmented data according to the second format standard to obtain second snapshot information after segmentation and parsing.

[0064] Optionally, the custom enable identifier is a feature identifier for triggering a custom parsing mode, which is used to switch to a custom parsing path when the snapshot quantity returned by an ECU (Electronic Control Unit) is incorrect due to development changes; the error data is snapshot quantity information in the target snapshot raw data that does not match the actual snapshot quantity, such as an error value of 3 returned by an ECU that should return 5 snapshots; the custom snapshot configuration information is correction information manually configured by the user in advance in the parsing association database (including a snapshot parsing database and a snapshot group custom database), including but not limited to a correct snapshot group number (such as group number 1) and a correct data quantity (such as 5) corresponding to the error data; the second parsing parameter is a parsing parameter in the parsing association database that matches the correct snapshot group number and the correct data quantity, including a custom data segmentation rule and a second format standard; the custom data segmentation rule is a raw data division rule set based on the correct data quantity in the second parsing parameter, such as division according to “2 bytes per snapshot identifier and corresponding byte number of data”; and the second format standard is a parsing format defined in the second parsing parameter, including data type (Unsigned, BCD), coefficient (such as 0.015625), offset, unit (km / h, rpm), etc.

[0065] Optionally, when the detection includes the custom enabling identifier, it is confirmed that the number of snapshots in the target snapshot raw data is error data (such as the number of snapshots returned by the identification ECU does not match the actual data length); the custom snapshot configuration information manually configured by the user in advance in the parsing association database is called, and the configuration information includes a correct snapshot group number and a correct data number corresponding to the error data (such as the user configures the correct number 5 for the error number of group number 1); based on the correct snapshot group number and the correct data number, the parameter retrieval is performed in the parsing association database to find a second parsing parameter that matches both (such as searching for a matching parameter of group number 1 and number 5 in the snapshot parsing database); when the second parsing parameter is found, the custom data segmentation rule in the second parsing parameter is called (such as segmentation according to "snapshot identifier 2 bytes + data 1 byte"), and the target snapshot raw data is segmented and divided according to the custom data segmentation rule to obtain custom segmented data; the second format standard corresponding to the second parsing parameter (such as data type Unsigned, coefficient 0.25, unit rpm) is called, and the custom segmented data is processed by information conversion (such as converting the state value 16 to 4 rpm) according to the second format standard to obtain the second snapshot information.

[0066] The embodiment can correct the ECU snapshot number error by user self-defined configuration, realize accurate parsing by database matching, effectively cover the data abnormal scene in ECU development, and guarantee the continuity and accuracy of fault diagnosis data parsing.

[0067] Further, based on the content of any of the above embodiments, in some feasible embodiments, the fault code snapshot parsing method further includes the following implementation steps F501 to F503.

[0068] Step F501: If multiple groups of snapshot information are detected in the target snapshot raw data, after the first group of snapshot information in the multiple groups of snapshot information is parsed, the parsing mode corresponding to the first group of snapshot information is recorded; Step F502: Based on the data number information corresponding to the first group of snapshot information, the starting position of the next group of snapshot information of the first group of snapshot information is calculated; Step F503: The snapshot group identifier and data number information of the next group of snapshot information are extracted according to the starting position, and the parsing mode of the first group of snapshot is used until all the multiple groups of snapshot group information are parsed to obtain the snapshot information after the segmentation parsing of the multiple groups of snapshot information.

[0069] Optionally, multiple groups of snapshot information: multiple independent snapshot group sets contained in the target snapshot raw data, each group following the ECU (Electronic Control Unit) return snapshot format (including snapshot group identification, data quantity, snapshot identifier, and data); first group of snapshot information: the first snapshot group data in the multiple groups of snapshot information; parsing method: a rule set for parsing a single snapshot group, including but not limited to database matching logic, data segmentation rule, format standard (such as Unsigned type analysis, coefficient conversion); starting position: the starting byte of the next group of snapshot information in the target snapshot raw data, which needs to be calculated in combination with the total length of the previous group of data; snapshot group identification: a unique identifier for distinguishing snapshot groups (corresponding to the 7th byte of the ECU snapshot format); data quantity information: the number of snapshot data contained in a single snapshot group (corresponding to the 8th byte of the ECU snapshot format).

[0070] Optionally, when multiple groups of snapshot information are detected in the target snapshot raw data, the first group of snapshot information is parsed first, and after the parsing is completed, the corresponding parsing method of the first group is recorded (such as the "group number + data quantity" parameter retrieval logic based on snapshot parsing database matching, the "identifier 2 bytes + data 1 byte" segmentation rule, and the "coefficient 0.015625 + unit km / h" format standard); based on the data quantity information of the first group (such as 5), in combination with the number of bytes occupied by each snapshot data of the first group (such as 3 bytes per piece), the total length of the first group of data is calculated (5x3=15 bytes), and the starting position of the next group of snapshot is determined (the first group starts from the 9th byte, and the starting position is 9+15=24 bytes); according to the starting position, the snapshot group identification (such as group number 3 at the 24th byte) and data quantity information (such as quantity 6 at the 25th byte) of the next group are extracted, and the parsing method of the first group (same retrieval logic, segmentation rule, and format standard) is used to parse the data of the group; according to this logic, the cycle is repeated until all the multiple groups of snapshot information are parsed, and all the segmented and parsed snapshot information is obtained.

[0071] Optionally, when the ECU return data does not match the database, the diagnostic instrument outputs a prompt of "no relevant snapshot data, please maintain!" and pops up a selection box for the user to select "skip this data and continue parsing" or "terminate the current parsing process"; after selecting "skip", the system automatically records the identification information (snapshot group number + snapshot identifier) of the unresolved data, and after all data parsing is completed, it is displayed through the "unresolved data summary" interface, which is convenient for the user to maintain subsequently; the diagnostic instrument has an automatic snapshot quantity error identification function, which calculates the deviation value of "total length of parsed data + length of remaining unresolved data" and "datelength (total number of bytes of return data)", and if the deviation exceeds the preset threshold (5 bytes), a pop-up window prompts "suspected snapshot quantity error, do you want to enable custom parsing mode?", and the user selects "yes" to directly jump to the custom configuration interface; when multiple snapshot groups are parsed continuously, the error in the previous group does not affect the next group, and the diagnostic instrument automatically calculates the starting byte position of the next snapshot group according to datelength and the length of the parsed data (e.g., after the previous group is interrupted, the data variable is reset to "length of parsed data + 1"), and independently executes the parsing process of the next group to ensure that the parsing of the groups does not interfere with each other.

[0072] The embodiment solves the problem of group connection when multiple snapshot groups are parsed continuously by accurately calculating the starting position and reusing the parsing method, avoids parsing interruption caused by parameter differences between groups, reduces repeated rule configuration, and ensures the continuity and efficiency of parsing in the multiple snapshot group scenario.

[0073] Further, based on the content of any of the above embodiments, in some feasible embodiments, the fault code snapshot parsing method, step S30 includes step G601.

[0074] Step G601: based on the snapshot group identifier and data quantity information, a plurality of parsing parameters corresponding to the snapshot group identifier and data quantity information are retrieved in the parsing associated database, and the plurality of parsing parameters correspond to the same snapshot group identifier but have different parsing formats; according to the group identifier of the current parsing snapshot group, a target parsing parameter directly associated with the group identifier of the current parsing snapshot group is determined from the plurality of parsing parameters, and the target parsing parameter is used as the first parsing parameter.

[0075] Optionally, multiple parsing parameters: a set of parameters in the parsing association database (including snapshot parsing database, snapshot group custom database) that match the same snapshot group identifier and data quantity information but have different parsing formats, such as two sets of parameters corresponding to the Unsigned type (coefficient 0.1, unit V) and the BCD type (coefficient 0.01, unit V) of the same snapshot identifier (F011) under group number 1; parsing format: a data processing rule defined in the parsing parameter, including but not limited to data type (Unsigned, BCD), coefficient, offset, unit; group identifier of the current parsing snapshot group: a unique identifier corresponding to the snapshot group being parsed, corresponding to the snapshot group number (such as group number 1, group number 5) of the 7th byte in the snapshot format returned by the ECU (Electronic Control Unit); target parsing parameter: a parameter selected from the multiple parsing parameters and directly associated with the group identifier of the current parsing snapshot group; first parsing parameter: a parameter used for regular parsing mode, i.e., the target parsing parameter after screening. In this embodiment, when searching in the parsing association database based on the snapshot group identifier and the data quantity information, if multiple parsing parameters are searched (such as two sets of parameters corresponding to the parsing formats of F011 when the snapshot group identifier is 1 and the data quantity is 5), and the multiple parameters correspond to the same snapshot group identifier but have different parsing formats; according to the group identifier of the current parsing snapshot group (such as group number 1), the preset "group identifier-parameter binding relationship" (such as group number 1 binding Unsigned type parameter) in the database is called to determine the target parsing parameter (such as the Unsigned type parameter of F011, including starting byte 0, data occupying 8 bits, coefficient 0.1) directly associated with the group identifier from the multiple parsing parameters; the target parsing parameter is used as the first parsing parameter for subsequent segmentation and parsing of the target snapshot raw data. Optionally, in the whole vehicle factory real vehicle test environment scene, 10 common ECU fault codes (including engine misfire fault codes P0300-P0309) and 5 different UDS read snapshot instructions (such as 0x19 0x04, 0x19 0x06, 0x19 0x0A, etc.) are tested, and the compatible success rate under different ECU models (such as Bosch EDC17, Continental VDO) is 98%; in the ECU development stage, the error scene of snapshot quantity change caused by function iteration appears about 15% of the time, and before adopting the scheme, the parsing success rate in this scene is only 60%, and after adopting the scheme, the parsing success rate is improved to 99%; the parsing efficiency comparison test shows that the existing technology takes about 800 ms to parse a group of snapshot data containing 5 snapshots, and the scheme shortens the time consumption to 400 ms through database joint primary key search and parsing rule reuse, and the parsing efficiency is improved by 50%.

[0076] The embodiment solves the adaptation problem of multiple format parameters under the same snapshot group identification through the binding screening of group identification and parameters, avoids data analysis errors caused by incorrect selection of analysis format, and ensures the accuracy and stability of parameter matching in the conventional analysis mode.

[0077] Further, based on any of the above embodiments, in some possible embodiments, the fault code snapshot analysis method further includes steps K701-K702 after step E501.

[0078] Step K701: outputting information reminding the user to input the correct snapshot group number and the correct data quantity based on a preset operation portal through a preset display interface; Step K702: storing the correct snapshot group number and the correct data quantity when receiving the correct snapshot group number and the correct data quantity input by the user based on the preset operation portal, so as to retrieve the custom snapshot configuration information manually configured by the user in the analysis association database; Optionally, the preset display interface is a visual interface on the hardware of the diagnostic instrument for information interaction, which can present operation instructions, input prompts and error alarms, and is suitable for the operation requirements of the vehicle electronic diagnosis scene; the preset operation portal is an interactive channel on the diagnostic instrument for the user to input configuration data, including but not limited to a touch input box and an input panel awakened by a physical button; the correct snapshot group number is a snapshot group identification for correcting error data returned by an electronic control unit (ECU), which needs to match the group number configured by the user in the analysis association database (including a snapshot group custom database) (such as group number 1 and group number 5); the correct data quantity is the number of snapshots for correcting error data of the ECU, which needs to be consistent with the actual snapshot quantity configured by the user (such as 5 pieces per group and 4 pieces per group); and the custom snapshot configuration information is the correction information manually configured by the user in the analysis association database (including a snapshot group custom database) in advance, which is used for analysis adaptation when the snapshot quantity of the ECU is incorrect. Optionally, the information reminding the user to input the correct snapshot group number and the correct data quantity based on the preset operation portal is output through the preset display interface, and the interface prompt needs to clearly instruct the input format (such as “please input a 3-digit snapshot group number and a data quantity in the range of 1-10”); the user inputs the correct snapshot group number (such as “001”) and the correct data quantity (such as “5”) through the preset operation portal (such as a digital keyboard of the touch screen of the diagnostic instrument); the system performs legality verification on the input information, including but not limited to whether the group number format meets the 3-digit standard and whether the data quantity is in the valid range of 1-10; after the verification, the correct snapshot group number and the correct data quantity are stored in the snapshot group custom database of the analysis association database; and the stored data is used to retrieve the custom snapshot configuration information configured by the user in advance, so as to ensure accurate matching of analysis parameters when the ECU data is incorrect. Optionally, as Figure 3As shown, Figure 3 The flowchart of returning data for the snapshot group information involved in the present application is shown, wherein the snapshot group number (group): a field identifying different snapshot groups, corresponding to the 7th byte of the returned data, used to distinguish multiple snapshot groups; the snapshot quantity (count): the number of snapshots contained in a single group, corresponding to the 8th byte of the returned data, used to control the termination of single group parsing; the snapshot identifier (did): a 2-byte field identifying a single snapshot, which is the core identifier for matching the parsing rule; the total number of identifiers (didlength): the actual data byte length of a single snapshot, obtained by database matching, to ensure data extraction accuracy; didcount: the number of parsed snapshot identifiers, used to check the single group parsing completion status; data: the starting byte position of the current parsing of the returned data, to realize continuous parsing of multiple groups / multiple snapshots; snapshot parsing database: a database storing the group number-identifier-parsing format, providing the basis for the parsing rule; starting from the “module returned snapshot data”, the variables are first initialized: group is the 7th byte of the returned data, count is the 8th byte, didlength and didcount are set to 0, and data is set to 9 (starting from the 9th byte for parsing), 2 bytes are taken from the data byte of the returned data as did, didcount is incremented and the snapshot parsing database is matched: when there is no matching record, the diagnostic instrument prompts “no related snapshot data, please maintain”, quickly locates data anomalies, and reduces invalid parsing time consumption; when there is a matching record, didlength is obtained and the corresponding length data is parsed, ensuring accurate single snapshot data format matching and avoiding parsing deviation; after parsing, the didcount is checked: if didcount ≠ group, data is updated for continuous parsing, realizing continuous processing of multiple snapshots in a single group and ensuring complete data parsing within the group; if didcount = group, the data length is checked again: when the lengths do not match, group and count are reset and parsing is continued, adapting to the multiple snapshot group scenario and avoiding data interruption between groups; when the lengths match, the parsing is completed, ensuring that all data is parsed without omission; through variable iteration and database matching, the automatic and accurate parsing of multiple groups / multiple snapshots is realized, and through abnormal prompt and state checking, the parsing efficiency and data integrity are improved.

[0079] Optionally, as Figure 4 shown, Figure 4A flowchart of a self-defined snapshot group for a snapshot group involved in the present application, wherein the self-defined snapshot group: a snapshot grouping rule pre-configured by a user, adapted to an ECU return data abnormal scenario; a snapshot self-defined database: a database storing a "snapshot group number (group) - snapshot number (groupnum)" correspondence relationship, supporting self-defined analysis; snapshot group number (group): a field identifying the self-defined snapshot group, initially corresponding to the 7th byte of the return data, and dynamically updated with the analysis progress; snapshot number (groupnum): the number of snapshots included in the self-defined snapshot group, obtained from the self-defined database matching; snapshot identifier (did): a 2-byte field identifying a single snapshot, which is the core identifier for matching analysis rules; didcount: the number of snapshot identifiers that have been analyzed, used to verify the completion status of single group analysis; didlength: the actual data byte length of a single snapshot, determined by matching the snapshot analysis database; data: the starting byte position of the current analysis of the return data, realizing continuous analysis of multiple groups / multiple snapshots; Specifically, taking "module return snapshot data" as the starting point, first initialize the variables: group is the 7th byte of the return data, groupnum, didcount, and didlength are set to 0, and data is set to 9; First, match the snapshot self-defined database: when there is no matching record, the diagnostic instrument prompts an exception, quickly locates the missing configuration, and reduces invalid analysis; when there is a matching record, groupnum (self-defined snapshot number) is obtained, realizing the adaptation of analysis rules in abnormal data scenarios and improving fault tolerance; invalid identifier; when there is a matching record, didlength is obtained and the corresponding data is analyzed, ensuring accurate format matching of a single snapshot and avoiding analysis deviation. After analysis, check: if didcount ≠ groupnum, update data for continuous analysis, realize complete processing of multiple snapshots in a single group, and ensure that there is no omission of data within the group; if didcount = groupnum, check the data length again: if the lengths do not match, reset group and groupnum to adapt to the multiple snapshot scenario and avoid interruption of inter-group analysis; if the lengths match, the analysis is complete, ensuring complete analysis of the full amount of data; through the self-defined database and dynamic checking, both the ECU data abnormal scenario and the continuity and accuracy of multiple snapshot analysis are adapted, improving the flexibility and reliability of the analysis scheme.

[0080] Optionally, in addition to the "based on 'group number-identifier' reverse matching database" and "custom snapshot group configuration", the scheme also has "multi-group snapshot independent analysis", "snapshot quantity error automatic identification", "unresolved data skipping and summarizing" and other innovative technical features not mentioned. The alternative implementation of the reverse matching database includes: first, based on the hash table to store the mapping relationship of "snapshot group number-snapshot identifier" and the analysis parameter, the retrieval speed is improved by 40% compared with the traditional data table; second, for the simple scene containing only 1-2 snapshot data, the analysis process can be simplified to "directly call the preset fixed segmentation rule (such as snapshot identifier 2 bytes + data 1 byte)", without database retrieval, further shortening the analysis time; the alternative design scheme of the database building is "storage by ECU type", that is, the snapshot analysis database is split into "engine ECU analysis library", "vehicle body control ECU analysis library" and the like, and when retrieving, first match the corresponding sub-database through the ECU model (such as the ECU hardware number obtained from the diagnostic protocol), and then find the analysis parameter corresponding to the "group number-identifier", the retrieval efficiency is improved by about 30%.

[0081] The embodiment ensures that the correction information input by the user is accurate and effective through visual guidance, input verification and directional storage, provides reliable configuration support for the ECU snapshot quantity error scene, reduces the user operation difficulty, and improves the ease of use and fault tolerance of the analysis scheme.

[0082] In addition, the application also provides an electronic device. Please refer to Figure 5 , Figure 5 The structure schematic diagram of the electronic device related to the embodiment scheme of the application.

[0083] The application provides an electronic device, which comprises at least one processor, and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the fault code snapshot analysis method in the embodiment one.

[0084] The following refers to Figure 5 , Figure 5is a structural diagram of an electronic device to which an embodiment of the present application relates, and illustrates a structural diagram of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Portable Application Description), a PMP (Portable Media Player), a car terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. Figure 5 The illustrated electronic device is merely an example and should not impose any limitation on the functions and use range of the embodiment of the present application.

[0085] As shown in Figure 5 the electronic device can include a processing device 1001 (e.g., a central processor, a graphic processor, or the like) that can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following devices can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, or the like; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, or the like; the storage device 1003 including, for example, a magnetic tape, a hard disk, or the like; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device having various devices is illustrated in the drawing, it should be understood that all of the illustrated devices are not required to be implemented or provided. More or less devices can be alternatively implemented or provided.

[0086] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.

[0087] The electronic device provided by the present application adopts the fault code snapshot analysis method in the above-mentioned embodiments, and can solve the technical problem of flexible adaptation of fault code snapshot analysis. Compared with the prior art, the electronic device provided by the present application has the same beneficial effects as the fault code snapshot analysis method provided by the above-mentioned embodiments, and other technical features in the electronic device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0088] In addition, the present application provides a computer readable storage medium. The computer readable storage medium stores a fault code snapshot analysis program, and the fault code snapshot analysis program is executed by a processor to implement the steps of the fault code snapshot analysis method described above.

[0089] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0090] The above-mentioned serial numbers of the embodiments of the present application are only for description, not representing the advantages and disadvantages of the embodiments.

[0091] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a computer readable storage medium (such as ROM / RAM, magnetic disk, optical disc) as described above, including a number of instructions to make a device (may be a mobile phone, computer, server, or network equipment, etc.) execute the method of each embodiment of the present application.

[0092] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, all use the contents of the present application specification and drawings to make equivalent structure or equivalent process transformation, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for parsing fault code snapshots, characterized in that, The fault code snapshot parsing method includes: Obtain the original data of the target snapshot to be parsed; Based on preset custom parsing mode configuration rules, detect whether the parsing mode configuration information associated with the original data of the target snapshot contains a custom enable identifier; If the custom enable identifier is not detected, the snapshot group identifier and data quantity information are extracted from the original data of the target snapshot. Based on the snapshot group identifier and data quantity information, the matching first parsing parameter is retrieved in the parsing association database. The original data of the target snapshot is parsed in segments according to the data segmentation parsing rules of the first parsing parameter to obtain the first snapshot information after segmentation parsing. If the custom enable identifier is detected, the custom snapshot configuration information associated with the original data of the target snapshot is obtained. Based on the custom snapshot configuration information, the matching second parsing parameter is retrieved from the parsing association database. The original data of the target snapshot is parsed in segments according to the custom data segmentation parsing rules in the second parsing parameter to obtain the segmented parsing second snapshot information.

2. The fault code snapshot parsing method as described in claim 1, characterized in that, The steps for obtaining the original data of the target snapshot to be parsed include: Receive snapshot response data returned by the electronic control unit used for fault diagnosis, identify the response type of the snapshot response data, and obtain an identification result, wherein the identification result includes positive response, negative response or irrelevant data; If the identification result contains a target data segment corresponding to the positive response, then the target data segment is used as the original data of the target snapshot to be parsed; If the target data segment corresponding to the affirmative response is not found in the identification result, a prompt message indicating that the acquisition of the target snapshot original data has failed is output, and a request to acquire the snapshot response data is resent to the electronic control unit until the target data segment corresponding to the affirmative response is acquired, and the target data segment is used as the target snapshot original data to be parsed.

3. The fault code snapshot parsing method as described in claim 2, characterized in that, The step of detecting whether the parsing mode configuration information associated with the original data of the target snapshot contains a custom enable identifier based on preset custom parsing mode configuration rules includes: The preset custom parsing mode configuration rule is retrieved, wherein the preset custom parsing mode configuration rule includes a preset custom enable identifier template; Extract the parsing mode configuration information segment corresponding to the electronic control unit from the original data of the target snapshot; Based on the preset custom parsing mode configuration rules, the fields of the parsing mode configuration information segment are compared with the custom enable identifier template; When a feature match is determined to be complete, the custom enable identifier is included. If it is determined that the feature match is not a perfect match, then the custom enable identifier is not included.

4. The fault code snapshot parsing method as described in claim 3, characterized in that, The steps of extracting the snapshot group identifier and data quantity information from the original data of the target snapshot if the custom enable identifier is not detected, retrieving the matching first parsing parameter in the parsing association database based on the snapshot group identifier and data quantity information, and segmenting the original data of the target snapshot according to the data segmentation parsing rules of the first parsing parameter to obtain the segmented parsing first snapshot information include: If the custom enable identifier is not detected, then the snapshot group identifier for identifying the data group and the data quantity information corresponding to the number of data entries for identifying the data group are extracted from the original data of the target snapshot. Based on the snapshot group identifier and the data quantity information, parameter matching and retrieval are performed in the parsing association database to find the first parsing parameter that corresponds to both the snapshot group identifier and the data quantity information. When the first parsing parameter is found, the data segmentation rule in the first parsing parameter is retrieved, and the original data of the target snapshot is segmented according to the data segmentation rule to obtain the segmented data. The first format standard corresponding to the first parsing parameter is retrieved, and the segmented data is parsed according to the first format standard to obtain the first snapshot information.

5. The fault code snapshot parsing method as described in claim 4, characterized in that, The steps of obtaining custom snapshot configuration information associated with the original data of the target snapshot if the custom enable identifier is detected, retrieving matching second parsing parameters from the parsing association database based on the custom snapshot configuration information, and parsing the original data of the target snapshot in segments according to the custom data segmentation parsing rules in the second parsing parameters to obtain the segmented parsed second snapshot information include: If the custom enable identifier is detected, then the number of snapshots in the original data of the target snapshot is confirmed to be incorrect. Retrieve custom snapshot configuration information that the user has manually configured in advance in the parsing association database, wherein the configuration information includes the correct snapshot group number and the number of correct data corresponding to the erroneous data; Based on the correct snapshot group number and the correct data quantity, a parameter retrieval is performed in the parsing association database to find a second parsing parameter that matches both the correct snapshot group number and the correct data quantity; When the second parsing parameter is found, the custom data segmentation rule in the second parsing parameter is retrieved, and the original data of the target snapshot is segmented according to the custom data segmentation rule to obtain the data after custom segmentation; The second format standard in the second parsing parameters is retrieved, and the data after custom segmentation is processed according to the second format standard to obtain the second snapshot information after segmentation and parsing.

6. The fault code snapshot parsing method as described in claim 5, characterized in that, The fault code snapshot parsing method also includes: If multiple sets of snapshot information are detected in the original data of the target snapshot, after parsing the first set of snapshot information in the multiple sets of snapshot information, the parsing method corresponding to the first set of snapshot information is recorded; Based on the data quantity information corresponding to the first set of snapshot information, calculate the starting position of the next set of snapshot information; Based on the starting position, extract the snapshot group identifier and data quantity information of the next set of snapshot information, and continue using the parsing method of the first set of snapshots until all the multiple sets of snapshot information are parsed, to obtain the snapshot information after segmented parsing of the multiple sets of snapshot information.

7. The fault code snapshot parsing method as described in claim 6, characterized in that, The step of retrieving a matching first parsing parameter from the parsing association database based on the snapshot group identifier and data quantity information includes: Based on the snapshot group identifier and data quantity information, multiple parsing parameters corresponding to the snapshot group identifier and data quantity information are retrieved in the parsing association database. The multiple parsing parameters correspond to the same snapshot group identifier but have different parsing formats. According to the group identifier of the current parsing snapshot group, a target parsing parameter that is directly associated with and bound to the group identifier of the current parsing snapshot group is determined from the multiple parsing parameters, and the target parsing parameter is used as the first parsing parameter.

8. The fault code snapshot parsing method as described in claim 4, characterized in that, After the step of confirming that the number of snapshots in the original data of the target snapshot is incorrect, the method further includes: The system displays a message reminding the user to input the correct snapshot group number and the correct amount of data through a preset operation entry point. Upon receiving the correct snapshot group number and the correct data quantity input by the user based on a preset operation entry, the correct snapshot group number and the correct data quantity are stored for use in retrieving custom snapshot configuration information that the user has manually configured in the parsing association database beforehand.

9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a fault code snapshot parsing program stored in the memory that can be executed by the processor, wherein when the fault code snapshot parsing program is executed by the processor, it implements the steps of the fault code snapshot parsing method as described in any one of claims 1 to 8.

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