CN117632754A - Diagnostic data processing method, device, equipment and storage medium - Google Patents

Diagnostic data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN117632754A
CN117632754A CN202311683930.7A CN202311683930A CN117632754A CN 117632754 A CN117632754 A CN 117632754A CN 202311683930 A CN202311683930 A CN 202311683930A CN 117632754 A CN117632754 A CN 117632754A
Authority
CN
China
Prior art keywords
identifier
illegal
preset
data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311683930.7A
Other languages
Chinese (zh)
Inventor
刘新
邓蒙召
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202311683930.7A priority Critical patent/CN117632754A/en
Publication of CN117632754A publication Critical patent/CN117632754A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a diagnostic data processing method, a device, equipment and a storage medium, which relate to the field of data processing and comprise the following steps: analyzing the preloaded initial diagnostic data in the extensible markup language format; determining a corresponding global unique identifier according to the analyzed initial diagnosis data; selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition, and generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule; and constructing target diagnosis data conforming to the preset legal conditions by using the target identifier and the initial diagnosis data. By preloading diagnostic data and checking the validity of the GUID before the data diagnostic process is started, the non-compliant GUID is automatically screened out, and a new GUID is generated for replacement, so that the follow-up diagnostic program can be safely and reliably executed.

Description

Diagnostic data processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a diagnostic data processing method, apparatus, device, and storage medium.
Background
The automobile manufacturer provides the automobile original diagnosis data described by XML (Extensible Markup Language ) language, the different types of diagnosis data are packaged by XML tags "<" ">", for multilingual processing, a common mode is shown in fig. 1 and 2, a text which possibly corresponds to local languages of different sales areas is bound with a UUID (Universally Unique Identifier, universal unique identification code) word string, a series of XML files translated in different languages are configured, the same UUID describes the text content of the same diagnosis data, and the text content only corresponds to different languages respectively, and finally a set of translation library is formed.
It should be noted that, in the current automobile diagnostic data produced by each automobile host factory, the generation schemes of GUIDs (Globally Unique Identifier, globally unique identifiers) of text data are different, and are actually irregular, so that it is difficult to ensure that all GUIDs are compliant GUIDs meeting the unique requirements of the production environment.
In the field of actual automotive diagnostic services and even the whole automotive industry, the GUID of all text data, not only text data, but also all data configured with GUID must be guaranteed to be unique, that is, the GUID referred to in the whole industrial production and after-sales service chain must uniquely represent a certain piece of data, and no duplication is possible, otherwise the accuracy and effectiveness of retrieval and reference are lost.
The international automobile diagnosis business huge head, such as Softing, vector, emotive and the like, respectively have a whole set of business schemes for producing diagnosis data with own closed sources, wherein GUID is generated by using a relatively advanced algorithm scheme, and can be updated and upgraded continuously according to the requirements of safety and stability, the domestic host factories are always forced to select the host factories to use various modes for generation under the condition that the cost pressure does not adopt the whole set of solutions of the other party, for example, the generation modules of the GUID select the host factories to generate the GUID without a plurality of schemes with loopholes and without guaranteeing the uniqueness of the production environment, and the GUID generated by the schemes can cause general data reference disorder in the automobile diagnosis business if not checked, thereby seriously interfering the normal operation of the diagnosis program. Therefore, how to ensure that GUIDs of diagnostic data of respective host factories introduced in an automobile diagnostic service are all compliant to normally perform subsequent automobile diagnostic service is a problem to be solved in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a diagnostic data processing method, apparatus, device, and storage medium, which automatically screen out non-compliant GUIDs and generate new GUIDs for replacement by preloading diagnostic data and verifying the validity of GUIDs before a data diagnostic process is started, thereby ensuring that a subsequent diagnostic program can be executed safely and reliably. The specific scheme is as follows:
In a first aspect, the present application provides a diagnostic data processing method, comprising:
analyzing the preloaded initial diagnostic data in the extensible markup language format;
determining a corresponding global unique identifier according to the analyzed initial diagnosis data;
selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition, and generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule;
and constructing target diagnosis data conforming to the preset legal conditions by using the target identifier and the initial diagnosis data.
Optionally, the parsing the preloaded initial diagnostic data in the extensible markup language format includes:
preloading the initial diagnostic data based on an SAX parsing scheme and parsing the initial diagnostic data in the extensible markup language format.
Optionally, after selecting the illegal identifier and the legal identifier from the globally unique identifier Fu Zhongshai based on a preset legal condition, the method further includes:
and generating prompt information for indicating that the illegal identifier exists currently based on the illegal identifier, and displaying the prompt information through a preset popup window so as to prompt a user that the illegal identifier needs to be repaired through the prompt information.
Optionally, after the generating, according to a preset identifier generating rule, the target identifier that meets the preset legal condition and corresponds to the illegal identifier, the method further includes:
storing the legal identifier and the target identifier in a preset ordered set container.
Optionally, before generating the target identifier that satisfies the preset legal condition and corresponds to the illegal identifier according to a preset identifier generation rule, the method further includes:
taking the text corresponding to the illegal identifier as the Key of a first hash table, taking the illegal identifier as the value of the first hash table, establishing a Key value pair based on the text corresponding to the illegal identifier and the illegal identifier, and storing the Key value pair in the first hash table so as to generate the target identifier which meets the preset legal condition and corresponds to the illegal identifier according to the preset identifier generation rule when the storage is successful;
correspondingly, after generating the target identifier meeting the preset legal condition corresponding to the illegal identifier according to the preset identifier generation rule, the method further comprises:
taking the text corresponding to the illegal identifier as the Key of a second hash table, taking the target identifier as the value of the second hash table, establishing a Key value pair based on the text corresponding to the illegal identifier and the target identifier, and storing the Key value pair in the second hash table;
And taking the illegal identifier as a Key of a third hash table, taking the target identifier as a value of the third hash table, and establishing a Key value pair based on the illegal identifier and the target identifier and saving the Key value pair to the third hash table.
Optionally, after the key value pair is established based on the text corresponding to the illegal identifier and stored in the first hash table, the method further includes:
if the storage fails, inquiring the second hash table according to the text corresponding to the illegal identifier to obtain the corresponding target identifier, taking the illegal identifier as the Key of a third hash table, taking the target identifier as the value of the third hash table, establishing a Key value pair based on the illegal identifier and the target identifier, and storing the Key value pair into the third hash table.
Optionally, the constructing, using the target identifier and the initial diagnostic data, target diagnostic data that meets the preset legal condition includes:
judging the data volume of the third hash table according to a preset data volume threshold condition;
if the data quantity meets the preset data quantity threshold condition, analyzing initial diagnostic data which corresponds to the third hash table and does not meet the preset legal condition in a StAX analysis mode to obtain first editable diagnostic data, circularly traversing the third hash table to replace the illegal identifier in the first editable diagnostic data based on the target identifier, and constructing the target diagnostic data which meets the preset legal condition based on the replaced identifier and the legal identifier;
If the data quantity does not meet the preset data quantity threshold condition, resolving the initial diagnostic data again in a DOM resolving mode to obtain second editable diagnostic data, circularly traversing the third hash table to replace the illegal identifier in the second editable diagnostic data based on the target identifier, and constructing the target diagnostic data conforming to the preset legal condition based on the replaced identifier and the legal identifier;
and if the data quantity is zero, directly taking the initial diagnosis data as the target diagnosis data which accords with the preset legal condition.
In a second aspect, the present application provides a diagnostic data processing apparatus comprising:
the data analysis module is used for analyzing the preloaded initial diagnosis data in the extensible markup language format;
the identifier determining module is used for determining a corresponding global unique identifier according to the analyzed initial diagnosis data;
the identifier generation module is used for selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition and generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule;
And the data construction module is used for constructing target diagnosis data conforming to the preset legal conditions by utilizing the target identifier and the initial diagnosis data.
In a third aspect, the present application provides an electronic device comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the aforementioned diagnostic data processing method.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which when executed by a processor implements the aforementioned diagnostic data processing method.
In the application, first, the initial diagnosis data in the preloaded extensible markup language format is analyzed, a corresponding global unique identifier is determined according to the analyzed initial diagnosis data, then an illegal identifier and a legal identifier are selected from the global unique identifier Fu Zhongshai based on a preset legal condition, and a target identifier which corresponds to the illegal identifier and meets the preset legal condition is generated according to a preset identifier generation rule, so that the target diagnosis data which meets the preset legal condition is constructed by utilizing the target identifier and the initial diagnosis data. According to the method, before the diagnosis process is started, the diagnosis data is automatically preloaded and the tool for verifying the validity of the GUID is automatically used for screening out the non-compliant GUID in the process of verifying the GUID, and the non-compliant GUID is replaced by the generated new GUID, so that the follow-up diagnosis program can be safely and reliably executed, and the validity of the diagnosis data can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an xml document provided herein;
FIG. 2 is a schematic diagram of text content of diagnostic data provided herein;
FIG. 3 is a flow chart of a diagnostic data processing method provided herein;
FIG. 4 is a flow chart of a diagnostic data process provided herein;
FIG. 5 is a flowchart of a specific diagnostic data processing method provided herein;
FIG. 6 is a schematic diagram of a diagnostic data processing apparatus provided herein;
fig. 7 is a block diagram of an electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, automobile diagnosis data produced by each automobile host factory, wherein the generation schemes of GUIDs of text data are different and are actually irregular, it is difficult to ensure that all GUIDs are compliant GUIDs meeting the unique requirements of production environments, and the host factories can generate the GUIDs in various modes, if verification is not carried out, the general data reference disorder is caused in the automobile diagnosis business, and the normal operation of diagnosis programs is seriously disturbed. The tool for automatically preloading the diagnosis data and checking the validity of the GUID is used for automatically screening out the non-compliant GUID in the process of checking the GUID and replacing the GUID with the generated new GUID, so that the follow-up diagnosis program can be safely and reliably executed, and the problem that the GUID of the diagnosis data is not compliant in the existing automobile diagnosis service is solved.
Referring to fig. 3, an embodiment of the present invention discloses a diagnostic data processing method, which includes:
and S11, analyzing the preloaded initial diagnosis data in the extensible markup language format.
The present embodiment first needs to preload the initial diagnostic data based on the SAX (simple API for XML) parsing scheme and parse the initial diagnostic data in the extensible markup language format. It can be understood that SAX is an alternative method of XML parsing, compared with DOM (Document Object Model ) parsing, SAX is a faster and more efficient method, which can scan a document line by line and parse while scanning, and compared with DOM, SAX can stop parsing at any time of parsing the document, and based on the characteristic of fast SAX parsing of XML, it can parse one-pass diagnostic data in advance to confirm whether GUID illegal situation exists. In this way, the embodiment can use the efficient SAX analysis mode to preload the diagnosis data, and can rapidly confirm and report the GUID problem without affecting the perception of the normal starting of the automobile diagnosis program by the user.
Correspondingly, before the target identifier and the initial diagnostic data are utilized to construct the target diagnostic data, the initial diagnostic data can be parsed again based on the DOM parsing mode, so that XML is converted into an object which can be accessed by JavaScript by utilizing the DOM parser, and subsequent identifier replacement is carried out. It should be noted that the DOM parsing schema is used in the process before the identifier substitution is performed, because the repairing process is a modification process of substituting the legal GUID for the illegal GUID, and only the DOM parsing schema supports editing the XML file.
And step S12, determining a corresponding global unique identifier according to the analyzed initial diagnosis data.
The embodiment can determine the corresponding global unique identifier according to the initial diagnosis data obtained after the analysis of the SAX analysis mode. As shown in fig. 4, after the automobile diagnosis data file is parsed in the SAX parsing mode, GUID strings in the data configured with ID attributes can be screened and read. It will be appreciated that the GUID is a 128-bit number, typically represented by 32 characters, divided into five parts, such as: 550e8400-e29b-41d4-a716-446655440000. A legal GUID in this embodiment should satisfy the following basic conditions:
Length: the GUID should have 36 characters, including 4 dashes;
format: the format of the GUID should be 8-4-4-4-12, i.e. the first part contains 8 characters, the second part contains 4 characters, and so on;
characters: GUID contains only hexadecimal characters (0-9,a-f).
Step S13, selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition, and generating a target identifier which meets the preset legal condition and corresponds to the illegal identifier according to a preset identifier generation rule.
In this embodiment, the legal identifier and the illegal identifier may be selected from the global unique identifier Fu Zhongshai based on a preset legal condition, and the target identifier that satisfies the preset legal condition and corresponds to the illegal identifier may be generated according to a preset identifier generation rule. And as shown in fig. 4, after the illegal identifier and the legal identifier are selected from the globally unique identifier Fu Zhongshai, a prompt message indicating that the illegal identifier exists currently may also be generated based on the illegal identifier, and the prompt message may be displayed through a preset popup window, so as to prompt the user that the illegal identifier is about to be repaired through the prompt message.
It should be noted that in the actual automotive diagnostic service and even in the entire automotive industry, the GUID of all text-type data, not only text data, but also all data configured with GUID, must be guaranteed to be unique. After generating the target identifier which corresponds to the illegal identifier and meets the preset legal condition according to the preset identifier generation rule, storing the legal identifier and the target identifier into a preset sequence set container, judging whether the storing set is successful, and if the storing fails, continuing to generate the legal identifier; if the storage is successful, judging whether the validity of all the GUIDs is checked to be finished, and continuously screening the GUIDs needing to be checked when the GUIDs are not finished to judge whether the GUIDs are legal. The preset ordered collection container is the Set container object in fig. 4. It will be appreciated that these newly generated GUIDs are already prepared before the identifier is repaired and stored in the Set collection container object before the repair; because the data in an ordered Set is deduplicated, the method is unique, if a duplicate GUID is generated, then the "duplicate GUID" fails to be stored in the Set container, because the duplicate element is not allowed to be stored, a judgment can be made on the storage operation in specific application, whether the return value after storage represents successful storage or not is judged, and if the storage fails, a GUID can be recreated for storage. In this way, by storing all compliant GUIDs in an ordered collection container, the uniqueness of the GUIDs of all diagnostic data can be ensured.
And S14, constructing target diagnosis data conforming to the preset legal conditions by using the target identifier and the initial diagnosis data.
In this embodiment, as shown in fig. 4, after a legal target identifier is generated and stored in the ordered set container to determine uniqueness, the target identifier may be used to replace the illegal identifier, and then target diagnostic data meeting preset legal conditions may be constructed based on the target identifier and the initial diagnostic data.
In this embodiment, first, initial diagnostic data in an extensible markup language format is preloaded and parsed based on the SAX parsing mode, so as to determine a corresponding global unique identifier according to the parsed initial diagnostic data. And selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition, generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule, and storing the legal identifier and the target identifier into a preset sequence set container after generating the target identifier which meets the preset legal condition. And after the initial diagnosis data is analyzed again based on the DOM analysis mode, constructing target diagnosis data which accords with the preset legal conditions by using the target identifier and the initial diagnosis data. Through the technical scheme, before the diagnosis process starts, the XML file of the diagnosis data is preloaded once by using the SAX analysis mode, the validity of the GUID in the file is checked, new compliant GUIDs are generated for the non-compliant GUIDs, all the compliant GUIDs are stored in an ordered collection container, after the unique GUIDs of all the diagnosis data are ensured, the non-compliant GUIDs in the diagnosis data are analyzed and repaired by using the DOM analysis mode, and automatic inspection and improvement of the automobile diagnosis data are realized. In this way, the GUID is checked by preloading diagnostic data before the execution of diagnostic service, the quote problem of important data can be exploded out in advance, meanwhile, the diagnostic data is preloaded by using an efficient SAX analysis mode, the GUID problem can be quickly confirmed and reported under the condition that the perception of a user on the normal starting of an automobile diagnostic program is not affected at all, and in the process of confirming the GUID problem, the GUID after checking is stored by using an ordered set container, the repeated GUID can be screened in a secondary global manner, so that the global uniqueness of the repaired GUID is absolutely ensured, and the non-compliant GUID is repaired after the global screening of the GUID is completed.
Based on the above embodiment, the present application can automatically screen out non-compliant GUIDs and replace them with new GUIDs generated by automatically preloading diagnostic data and verifying the validity of GUIDs before the diagnostic process is started, and in this embodiment, the process of replacing GUIDs will be described in detail. Referring to fig. 5, an embodiment of the present invention discloses a specific diagnostic data processing method, which includes:
and S21, taking the illegal identifier as the Key of a third hash table, taking the target identifier as the value of the third hash table, and establishing a Key value pair based on the illegal identifier and the target identifier and saving the Key value pair to the third hash table.
In this embodiment, the Key value pair is constructed by using the illegal identifier and the target identifier as keys and values of the third hash table, and the third hash table is constructed based on the Key value pair. After generating a new standard GUID string, the new standard GUID string is stored in a hash table by taking the original non-compliant ID string as Key and the new ID as value, and the target identifier is stored in the ordered collection container in combination with the previous embodiment, as shown in fig. 4. It will be appreciated that in the process of constructing the hash table, repair of the illegal identifier has not yet been started, and by means of the hash table, the illegal identifier can be replaced with the legal identifier based on the key value pair in the hash table after formally starting repair.
And S22, judging the data volume of the third hash table according to a preset data volume threshold condition.
In this embodiment, considering the problem of the data amount of the initial diagnostic data, if the data amount is too large, the possible workload of analyzing all the initial diagnostic data to complete the replacement of the character string is large, so that this embodiment may set a preset data amount threshold, for example, set the data amount threshold to ten thousand pieces of data, and determine the data amount in the third hash table according to the preset data amount threshold condition, so as to adopt different analysis strategies according to the determination result.
In this embodiment, as shown in fig. 4, after generating the target identifier corresponding to the illegal identifier and meeting the preset legal condition according to the preset identifier generating rule, the text corresponding to the illegal identifier may be used as the Key of the second hash table, and the target identifier may be used as the value of the second hash table, so as to establish a Key value pair based on the text corresponding to the illegal identifier and the target identifier and store the Key value pair in the second hash table.
Meanwhile, as shown in fig. 4, before generating the target identifier according to the preset identifier generation rule, the text corresponding to the illegal identifier may be used as the Key of the first hash table, and the illegal identifier may be used as the value of the first hash table, so as to establish a Key value pair based on the text corresponding to the illegal identifier and store the Key value pair in the first hash table; if the storing of the first hash table fails, inquiring the second hash table according to the text corresponding to the illegal identifier to obtain a corresponding target identifier, so that the illegal identifier is used as the Key of the third hash table, the target identifier is used as the value of the third hash table, and a Key value pair is established and stored in the third hash table; if the storage is successful, normal legal target identifier generation and subsequent procedures are performed, and target identifiers which meet preset legal conditions and correspond to the illegal identifiers are generated according to preset identifier generation rules. As can be seen from fig. 4, in this embodiment, the validity check on the GUID is circularly performed, after a Key value pair is established based on the text corresponding to the illegal identifier and the target identifier and stored in the second hash table, after determining the next illegal GUID, the Key value pair may be established based on the text corresponding to the illegal identifier and stored in the first hash table, so when the subsequent illegal GUID is circularly performed, when the storage is performed in the first hash table, if the storage fails, it is indicated that there are different GUIDs in the same text, that is, the text corresponding to the storage failed GUID has been already recorded in the first hash table, and other corresponding GUIDs exist, at this time, the Key value pair may be established with the storage failed GUID as a Key, based on the new GUID found in the second hash table as a value, and stored in the third hash table. Therefore, the problem that the same diagnosis data text corresponds to a plurality of GUIDs can be avoided, and the GUID checking effect is further improved.
Step S23, if the data size meets the preset data size threshold condition, resolving the initial diagnostic data which corresponds to the third hash table and does not meet the preset legal condition in a StAX resolving mode to obtain first editable diagnostic data, and circularly traversing the third hash table to replace the illegal identifier in the first editable diagnostic data based on the target identifier, and constructing the target diagnostic data which meets the preset legal condition based on the replaced identifier and the legal identifier.
In this embodiment, if the data size in the third hash table satisfies the preset data size threshold condition, that is, the data size is greater than ten thousand, the initial diagnostic data corresponding to the third hash table and not conforming to the preset legal condition is parsed in the StAX parsing mode to obtain the first editable diagnostic data, and the third hash table is traversed circularly to replace the illegal identifier in the first editable diagnostic data based on the target identifier. It can be understood that at this time, the third hash table is not empty, which proves that an illegal GUID exists at this time, and the data size is larger, in this case, after the part of the initial diagnostic data which corresponds to the third hash table and does not conform to the preset legal condition is resolved by adopting the StAX resolving mode, the replacement of the identifier is realized, so that under the condition that the data size is larger, only the initial diagnostic data with the illegal GUID can be resolved and the GUID is replaced, and the workload of repairing the diagnostic data is reduced to improve the efficiency.
And step S24, if the data quantity does not meet the preset data quantity threshold condition, analyzing the initial diagnostic data again in a DOM analysis mode to obtain second editable diagnostic data, and circularly traversing the third hash table to replace the illegal identifier in the second editable diagnostic data based on the target identifier, and constructing the target diagnostic data meeting the preset legal condition based on the replaced identifier and the legal identifier.
In this embodiment, if the data size of the third hash table does not meet the preset data size threshold condition, that is, the data size is less than ten thousand, all the initial diagnostic data are parsed again in the DOM parsing mode to obtain second editable diagnostic data, and the third hash table is traversed circularly to replace an illegal identifier in the second editable diagnostic data based on the target identifier. It can be understood that at this time, the third hash table is also not empty, and illegal GUIDs exist, but the data size is smaller, and in this case, all initial diagnostic data can be analyzed by using a DOM analysis mode to realize the replacement of identifiers, so that the process of determining illegal data from the initial diagnostic data is omitted under the condition that the data size is smaller, and the efficiency of GUID repair is improved.
It can be understood that based on the steps S22 and S23, after the replacement of the current illegal identifier is completed, whether all illegal identifiers are completely replaced is determined, if yes, the diagnostic data inspection process is finished; if not, the replacement of the rest GUIDs is continued.
In another specific embodiment, if the data size in the third hash table is zero, it is proved that there is no illegal GUID at this time, and at this time, the initial diagnostic data is directly used as the target diagnostic data meeting the preset legal condition without replacing the GUID.
Through the technical scheme, in the embodiment, a key value pair is established between the illegal identifier and the target identifier and is stored in the third hash table, then the data volume of the third hash table is judged according to the preset data volume threshold condition, and if the condition is met, the initial diagnosis data which does not meet the preset legal condition is analyzed in the StAX analysis mode and the illegal identifier is replaced; if the condition is not satisfied, the initial diagnostic data is parsed again in a DOM parsing mode to replace the illegal identifier based on the target identifier. And the text corresponding to the illegal identifier and the target identifier Fu Cunru can be used as the value of the second hash table, so that a key value pair is established based on the text corresponding to the illegal identifier and the target identifier and is stored in the second hash table, and the text corresponding to the illegal identifier and the illegal identifier Fu Cunru are stored in the third hash table when the storage in the first hash table fails, based on the new GUID searched in the second hash table of the corresponding text. In this way, after global GUID screening is completed, the automobile diagnosis data is analyzed by using the StAX analysis mode and the DOM analysis mode according to the data amount in the hash table, and the non-compliant GUID can be efficiently and accurately repaired, so that functions and performances are considered, the problem that the same diagnosis data text corresponds to a plurality of GUIDs can be avoided, and the GUID checking effect is further improved.
Referring to fig. 6, the embodiment of the application further discloses a diagnostic data processing device, including:
the data analysis module 11 is used for analyzing the preloaded initial diagnosis data in the extensible markup language format;
an identifier determining module 12, configured to determine a corresponding globally unique identifier according to the parsed initial diagnostic data;
an identifier generating module 13, configured to select an illegal identifier and a legal identifier from the globally unique identifier Fu Zhongshai based on a preset legal condition, and generate a target identifier that meets the preset legal condition and corresponds to the illegal identifier according to a preset identifier generating rule;
a data construction module 14, configured to construct target diagnostic data that meets the preset legal condition using the target identifier and the initial diagnostic data.
According to the embodiment, initial diagnosis data in a preloaded extensible markup language format is analyzed, a corresponding global unique identifier is determined according to the analyzed initial diagnosis data, an illegal identifier and a legal identifier are selected from the global unique identifier Fu Zhongshai based on preset legal conditions, a target identifier which corresponds to the illegal identifier and meets the preset legal conditions is generated according to a preset identifier generation rule, and the target identifier and the initial diagnosis data are utilized to construct target diagnosis data which meets the preset legal conditions. In this way, by means of the tool for automatically preloading diagnostic data and verifying the validity of the GUID before the diagnostic process is started, the tool automatically screens out the non-compliant GUID in the process of verifying the GUID and replaces the GUID with the generated new GUID, so that the follow-up diagnostic program can be safely and reliably executed, and the validity of the diagnostic data can be ensured.
In some embodiments, the data parsing module 11 specifically includes:
and the first data analysis unit is used for preloading the initial diagnosis data based on the SAX analysis mode and analyzing the initial diagnosis data in the extensible markup language format.
In some specific embodiments, the identifier generating module 13 further includes:
and the information prompt unit is used for generating prompt information for indicating that the illegal identifier exists currently based on the illegal identifier, displaying the prompt information through a preset popup window and prompting a user that the illegal identifier needs to be repaired through the prompt information.
In some specific embodiments, the identifier generating module 13 further includes:
and the identifier storage unit is used for storing the legal identifier and the target identifier into a preset ordered set container.
In some specific embodiments, the identifier generating module 13 further includes:
a first data storage unit, configured to use a text corresponding to the illegal identifier as a Key of a first hash table, and use the illegal identifier as a value of the first hash table, and establish a Key value pair based on the text corresponding to the illegal identifier and the illegal identifier, and store the Key value pair in the first hash table, so as to generate, when storage is successful, the target identifier corresponding to the illegal identifier and meeting the preset legal condition according to the preset identifier generation rule;
A second data storage unit, configured to use the text corresponding to the illegal identifier as a Key of a second hash table, and use the target identifier as a value of the second hash table, so as to establish a Key value pair based on the text corresponding to the illegal identifier and the target identifier, and store the Key value pair in the second hash table;
and the third data storage unit is used for taking the illegal identifier as a Key of a third hash table and taking the target identifier as a value of the third hash table so as to establish a Key value pair based on the illegal identifier and the target identifier and store the Key value pair into the third hash table.
In some specific embodiments, the identifier generating module 13 further includes:
and a fourth data storage unit, configured to query the second hash table according to a text corresponding to the illegal identifier if the storage fails, obtain the corresponding target identifier, use the illegal identifier as a Key of a third hash table, use the target identifier as a value of the third hash table, and establish a Key value pair based on the illegal identifier and the target identifier and store the Key value pair in the third hash table.
In some embodiments, the data construction module 14 specifically includes:
the data quantity judging unit is used for judging the data quantity of the third hash table according to a preset data quantity threshold condition;
a first data construction unit, configured to, if the data size meets the preset data size threshold condition, parse initial diagnostic data corresponding to the third hash table, which does not meet the preset legal condition, in an StAX parsing mode to obtain first editable diagnostic data, and cycle through the third hash table, so as to replace the illegal identifier in the first editable diagnostic data based on the target identifier, and construct the target diagnostic data meeting the preset legal condition based on the replaced identifier and the legal identifier;
a second data construction unit, configured to, if the data amount does not meet the preset data amount threshold condition, parse the initial diagnostic data again in a DOM parsing mode to obtain second editable diagnostic data, and cycle through the third hash table to replace the illegal identifier in the second editable diagnostic data based on the target identifier, and construct the target diagnostic data that meets the preset legal condition based on the replaced identifier and the legal identifier;
And the third data construction unit is used for directly taking the initial diagnosis data as the target diagnosis data which accords with the preset legal condition if the data quantity is zero.
Further, the embodiment of the present application further discloses an electronic device, and fig. 7 is a block diagram of the electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is adapted to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the diagnostic data processing method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the diagnostic data processing method performed by the electronic device 20 as disclosed in any of the previous embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the diagnostic data processing method disclosed previously. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A diagnostic data processing method, comprising:
analyzing the preloaded initial diagnostic data in the extensible markup language format;
determining a corresponding global unique identifier according to the analyzed initial diagnosis data;
selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition, and generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule;
and constructing target diagnosis data conforming to the preset legal conditions by using the target identifier and the initial diagnosis data.
2. The method of claim 1, wherein parsing the preloaded extensible markup language format of the initial diagnostic data comprises:
Preloading the initial diagnostic data based on an SAX parsing scheme and parsing the initial diagnostic data in the extensible markup language format.
3. The diagnostic data processing method of claim 1, wherein after selecting the illegal identifier and the legal identifier from the globally unique identifier Fu Zhongshai based on a preset legal condition, further comprising:
and generating prompt information for indicating that the illegal identifier exists currently based on the illegal identifier, and displaying the prompt information through a preset popup window so as to prompt a user that the illegal identifier needs to be repaired through the prompt information.
4. The method according to claim 1, wherein after generating the target identifier satisfying the preset legal condition corresponding to the illegal identifier according to a preset identifier generation rule, further comprises:
storing the legal identifier and the target identifier in a preset ordered set container.
5. The diagnostic data processing method according to any one of claims 1 to 4, characterized by further comprising, before the generating of the target identifier satisfying the preset legal condition, corresponding to the illegal identifier, according to a preset identifier generation rule:
Taking the text corresponding to the illegal identifier as the Key of a first hash table, taking the illegal identifier as the value of the first hash table, establishing a Key value pair based on the text corresponding to the illegal identifier and the illegal identifier, and storing the Key value pair in the first hash table so as to generate the target identifier which meets the preset legal condition and corresponds to the illegal identifier according to the preset identifier generation rule when the storage is successful;
correspondingly, after generating the target identifier meeting the preset legal condition corresponding to the illegal identifier according to the preset identifier generation rule, the method further comprises:
taking the text corresponding to the illegal identifier as the Key of a second hash table, taking the target identifier as the value of the second hash table, establishing a Key value pair based on the text corresponding to the illegal identifier and the target identifier, and storing the Key value pair in the second hash table;
and taking the illegal identifier as a Key of a third hash table, taking the target identifier as a value of the third hash table, and establishing a Key value pair based on the illegal identifier and the target identifier and saving the Key value pair to the third hash table.
6. The method according to claim 5, wherein after the key value pair is created based on the text corresponding to the illegal identifier and stored in the first hash table, further comprising:
if the storage fails, inquiring the second hash table according to the text corresponding to the illegal identifier to obtain the corresponding target identifier, taking the illegal identifier as the Key of a third hash table, taking the target identifier as the value of the third hash table, establishing a Key value pair based on the illegal identifier and the target identifier, and storing the Key value pair into the third hash table.
7. The diagnostic data processing method of claim 6, wherein said constructing target diagnostic data conforming to said preset legal condition using said target identifier and said initial diagnostic data comprises:
judging the data volume of the third hash table according to a preset data volume threshold condition;
if the data quantity meets the preset data quantity threshold condition, analyzing initial diagnostic data which corresponds to the third hash table and does not meet the preset legal condition in a StAX analysis mode to obtain first editable diagnostic data, circularly traversing the third hash table to replace the illegal identifier in the first editable diagnostic data based on the target identifier, and constructing the target diagnostic data which meets the preset legal condition based on the replaced identifier and the legal identifier;
If the data quantity does not meet the preset data quantity threshold condition, resolving the initial diagnostic data again in a DOM resolving mode to obtain second editable diagnostic data, circularly traversing the third hash table to replace the illegal identifier in the second editable diagnostic data based on the target identifier, and constructing the target diagnostic data conforming to the preset legal condition based on the replaced identifier and the legal identifier;
and if the data quantity is zero, directly taking the initial diagnosis data as the target diagnosis data which accords with the preset legal condition.
8. A diagnostic data processing apparatus, comprising:
the data analysis module is used for analyzing the preloaded initial diagnosis data in the extensible markup language format;
the identifier determining module is used for determining a corresponding global unique identifier according to the analyzed initial diagnosis data;
the identifier generation module is used for selecting an illegal identifier and a legal identifier from the global unique identifier Fu Zhongshai based on a preset legal condition and generating a target identifier which corresponds to the illegal identifier and meets the preset legal condition according to a preset identifier generation rule;
And the data construction module is used for constructing target diagnosis data conforming to the preset legal conditions by utilizing the target identifier and the initial diagnosis data.
9. An electronic device comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the diagnostic data processing method of any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements the diagnostic data processing method of any one of claims 1 to 7.
CN202311683930.7A 2023-12-07 2023-12-07 Diagnostic data processing method, device, equipment and storage medium Pending CN117632754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311683930.7A CN117632754A (en) 2023-12-07 2023-12-07 Diagnostic data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311683930.7A CN117632754A (en) 2023-12-07 2023-12-07 Diagnostic data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117632754A true CN117632754A (en) 2024-03-01

Family

ID=90030341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311683930.7A Pending CN117632754A (en) 2023-12-07 2023-12-07 Diagnostic data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117632754A (en)

Similar Documents

Publication Publication Date Title
US8589790B2 (en) Rule-based validation of websites
KR20150042877A (en) Managing record format information
CN111966738B (en) System for automatically realizing back-end programming by selecting front-end configuration
CN108762743A (en) Data table operation code generation method and device
CN116226170A (en) Database statement conversion method and device, electronic equipment and storage medium
CN113901083A (en) Heterogeneous data source operation resource analysis positioning method and equipment based on multiple analyzers
CN118245050B (en) Front end frame assembly automatic conversion method, system, electronic device and storage medium
CN112632425B (en) Method, device, equipment and storage medium for generating offline resource file
CN112000690B (en) Method and device for analyzing structured operation statement
CN112463261B (en) Interface calling method, device, electronic equipment, medium and product
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
CN112988781A (en) Data query method and device, electronic equipment and computer readable storage medium
CN117632754A (en) Diagnostic data processing method, device, equipment and storage medium
CN111026669A (en) Test log management method, test log management device, and storage medium
CN114492324A (en) Component data statistical method and device
CN114816364A (en) Method, device and application for dynamically generating template file based on Swagger
CN116561755A (en) Vulnerability detection method and device of cloud API, computer equipment and storage medium
CN114328572A (en) Data query method, device, system and medium based on SQL parser
CN113672233A (en) Server out-of-band management method, device and equipment based on Redfish
CN112632946A (en) Method, apparatus, computer device and storage medium for automatic table building
CN112699279A (en) Method, device and equipment for automatically processing components and storage medium
CN111680474A (en) Method and device for repairing messy codes of files
CN117176305A (en) Verification method, device, equipment and medium of target verification algorithm
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN113694539B (en) Resource management method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination