CN110297947B - Data calling method and device and electronic equipment - Google Patents
Data calling method and device and electronic equipment Download PDFInfo
- Publication number
- CN110297947B CN110297947B CN201910414645.2A CN201910414645A CN110297947B CN 110297947 B CN110297947 B CN 110297947B CN 201910414645 A CN201910414645 A CN 201910414645A CN 110297947 B CN110297947 B CN 110297947B
- Authority
- CN
- China
- Prior art keywords
- document
- data
- segment
- identification
- data type
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/83—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/83—Querying
- G06F16/832—Query formulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a data calling method, which is applied to calling of vehicle diagnosis data and comprises the following steps: acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called; searching out corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification; and associating the corresponding segment of the corresponding document with the current document. The data calling method, the data calling device and the electronic equipment achieve calling of vehicle diagnosis data in documents, so that data redundancy is reduced, and calling is flexible.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a data calling method and apparatus, and an electronic device.
Background
With the continuous development of automotive electronics technology, the workload carried by an Electronic Control Unit (ECU) is greater and greater, which makes the diagnostic communication protocol of the ECU in the vehicle more and more complex. Then whatever form (word/Excel file, XML file) the diagnostic data is stored in, there are certain cases where the data is reused.
The prior art solution generally requires multiple Word or Excel documents per ECU to store the ECU diagnostic protocol and diagnostic data. Or using XML documents to store diagnostic data and invoking the diagnostic data through value inheritance relationships between the XML documents. The diagnosis protocol and data are stored in a word/excel file mode, redundancy cannot be well eliminated, machine readability is poor, and a diagnosis instrument development engineer must manually arrange the protocol files into machine readable data after taking the protocol files. Although the XML document storage technology improves the problem of poor readability of a word/excel machine, data of other diagnostic layers can be called in a value inheritance mode. But once a value inheritance relationship is established between XML documents, it means that the inheritance layer owns all the data of the inherited layer. Thus, only full disk inheritance is possible, and flexibility is obviously lacking.
Disclosure of Invention
In order to solve the problems that data calling is not flexible and data redundancy cannot be reduced in the prior art, the application aims to provide a data calling method, a data calling device and electronic equipment.
The application provides a data calling method, which is applied to calling of vehicle diagnosis data and comprises the following steps:
acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
searching out corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
and associating the corresponding segment of the corresponding document with the current document.
Preferably, the finding out the corresponding segment of the corresponding document from the database according to the document identifier, the data type, and the segment identifier specifically includes:
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Preferably, the finding out the corresponding segment of the corresponding document from the database according to the document identifier, the data type, and the segment identifier further includes:
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, finding out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
Preferably, before the obtaining the call link, the method further includes:
and classifying and storing the vehicle diagnosis data according to data types.
Preferably, the classifying and storing the vehicle diagnostic data according to data types specifically includes:
establishing a plurality of documents corresponding to the data types one by one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and distributing a segment identifier for each vehicle diagnosis data segment.
The present application further provides a data call device, which is applied to call vehicle diagnosis data, and includes:
the acquisition module is used for acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
the searching module is used for searching corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
and the association module is used for associating the corresponding segment of the corresponding document with the current document.
Preferably, the search module is further configured to,
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Preferably, the search module is further configured to,
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, finding out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
Preferably, the obtaining module is further configured to classify and store the vehicle diagnostic data according to data types.
Preferably, the obtaining module is further configured to establish a plurality of documents corresponding to the data types one to one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and distributing a segment identifier for each vehicle diagnosis data segment.
The present application further provides an electronic device comprising a processor and a memory, the memory having stored therein a computer readable program configured to be executed by the processor, the computer readable program when executed by the processor implementing:
acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
searching out corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
and associating the corresponding segment of the corresponding document with the current document.
Preferably, the computer readable program when executed by the processor further implements:
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Preferably, the computer readable program when executed by the processor further implements:
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, searching out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
Preferably, the computer readable program when executed by the processor further implements:
and classifying and storing the vehicle diagnosis data according to data types.
Preferably, the computer readable program when executed by the processor further implements:
establishing a plurality of documents corresponding to the data types one by one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and distributing a segment identifier for each vehicle diagnosis data segment.
Compared with the prior art, the beneficial effects of the application lie in that: by acquiring the call link, the corresponding segment of the corresponding document is searched out from the database according to the document identifier, the data type and the segment identifier, and the corresponding segment of the corresponding document is associated with the current document to call the corresponding segment, so that data redundancy is reduced, and flexible call is realized.
Drawings
Fig. 1 is a flowchart of a data calling method provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating sub-steps of categorizing and storing vehicle diagnostic data according to data types according to an embodiment of the present application;
fig. 3 is a schematic diagram of a macro definition list provided in an embodiment of the present application;
FIG. 4 is a flow diagram illustrating sub-steps of a data call method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data call apparatus according to an embodiment of the present application;
fig. 6 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the present application, the embodiments or technical features described below may be arbitrarily combined to form a new embodiment without conflict.
The data calling method provided by the application is applied to calling of vehicle diagnosis data, for example, a diagnosis box calls the diagnosis data in a database to diagnose a vehicle. The database stores documents to be called when different vehicle brands are diagnosed and identifications corresponding to the documents.
As shown in fig. 1, the data calling method provided in the embodiment of the present application includes:
step S101: and acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of the document to be called.
The document may be, but not limited to, a file in a format of XML, TXT, TTF, word, excel, or the like, and the format of the called and called documents may be the same or different.
In one embodiment, the vehicle diagnostic data is categorized and stored by data type prior to obtaining the call link. As shown in fig. 2, classifying and storing the vehicle diagnostic data according to the data types specifically includes:
step S201: and establishing a plurality of documents corresponding to the data types one by one.
Specifically, a macro definition list corresponding to data types of the diagnostic data one to one is first established, as shown in fig. 3, each type of diagnostic data corresponds to one macro definition, that is, one data type. After the macro definition list is established, an XML document is correspondingly established for each data type, and one XML document corresponds to one document identifier and one data type.
Step S202: a vehicle diagnostic data segment is acquired.
Step S203: and judging the type of the vehicle diagnosis data segment.
Step S204: and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and allocating a segment identifier to each vehicle diagnosis data segment.
Specifically, the vehicle diagnostic data fragments are added to the XML document corresponding to the data types according to the types of the vehicle diagnostic data fragments, and each data fragment corresponds to one fragment identifier. Thus, the document identification, data type, and segment identification may locate a diagnostic data segment.
For example, the call link includes three variables of "DOCTYPE", "DOCREF", and "ID-REF", and the document identifier, the data type, and the fragment identifier corresponding to the data to be called are sequentially assigned to the three variables to form the call link.
Step S102: and searching corresponding segments of the corresponding documents from a database according to the document identification, the data type and the segment identification.
As shown in fig. 4, in an embodiment, step S102 specifically includes:
step S401: and judging whether the document identification and the data type are null or not.
Step S402: if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification.
Specifically, if the document identifier and the data type are not empty, the document is positioned according to the document identifier and the data type, and then the document fragment is positioned in the document according to the fragment identifier.
In one implementation, if the document identifier and the data type are not empty, determining whether the document identifier and the data type are matched; if the document identification is matched with the data type, finding out a corresponding segment of a corresponding document from a database; and if the document identification is not matched with the data type, ending the current data calling, thereby reducing errors.
Step S403: and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Specifically, if the document identifier and the data type are null, the diagnostic data fragment is called from the current XML document.
Step S103: and associating the corresponding segment of the corresponding document with the current document.
Specifically, the calling link is corresponding to the called data fragment, and the calling link references the corresponding fragment of the corresponding XML document.
In the above embodiment, the corresponding segment of the document is found from the database according to the document identifier, the data type, and the segment identifier in the call link, so that the document segment is called, the call is flexible, and the data redundancy is reduced.
As shown in fig. 5, the data invoking device provided in the embodiment of the present application is applied to invoking vehicle diagnostic data, and includes:
the obtaining module 10 is configured to obtain a call link, where the call link includes a document identifier, a data type, and a fragment identifier of a document to be called;
the searching module 20 is configured to search a corresponding segment of a corresponding document from a database according to the document identifier, the data type, and the segment identifier;
the association module 30 is configured to associate the corresponding segment of the corresponding document with the current document.
Preferably, the look-up module 20 is further configured to,
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Preferably, the search module 20 is further configured to,
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, searching out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
Preferably, the obtaining module 10 is further configured to classify and store the vehicle diagnostic data according to data types.
Preferably, the obtaining module 10 is further configured to establish a plurality of documents corresponding to the data types one to one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and distributing a segment identifier for each vehicle diagnosis data segment.
As shown in fig. 6, an electronic device provided in an embodiment of the present application includes a processor 11 and a memory 12, where the memory 12 stores therein a computer-readable program, the computer-readable program is configured to be executed by the processor 11, and when executed by the processor 11, the computer-readable program implements:
acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
searching out corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
and associating the corresponding segment of the corresponding document with the current document.
Preferably, the computer readable program when executed by the processor 11 further implements:
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding fragment according to the fragment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
Preferably, the computer readable program when executed by the processor 11 further implements:
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, finding out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
Preferably, the computer readable program when executed by the processor 11 further implements:
and classifying and storing the vehicle diagnosis data according to data types.
Preferably, the computer readable program when executed by the processor 11 further implements:
establishing a plurality of documents corresponding to the data types one by one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and distributing a segment identifier for each vehicle diagnosis data segment.
The electronic device in this embodiment and the method in the foregoing embodiment are based on two aspects of the same inventive concept, and the detailed description of the implementation process of the method has been described in the foregoing, so that those skilled in the art can clearly understand the implementation process of the electronic device in this embodiment according to the foregoing description, and for the brevity of the description, details are not repeated here.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on this understanding, the technical solutions of the present application, in essence or contributing to the prior art, can be embodied in the form of a software product. The application also relates to a computer readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., on which a computer program is stored, which computer program, when executed by a processor, performs the above-mentioned method.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the unit is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
According to the data calling method, the data calling device and the electronic equipment, the calling link is obtained, the corresponding segment of the corresponding document is searched out from the database according to the document identification, the data type and the segment identification, the corresponding segment of the corresponding document is associated with the current document to call the corresponding segment, so that data redundancy is reduced, and flexible calling is achieved.
The above embodiments are only preferred embodiments of the present application, and the protection scope of the present application is not limited thereto, and any insubstantial changes and substitutions made by those skilled in the art based on the present application are intended to be covered by the present application.
Claims (9)
1. A data calling method is applied to calling of vehicle diagnosis data and is characterized by comprising the following steps:
acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
searching out corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
associating the corresponding segment of the corresponding document with the current document;
the finding out the corresponding segment of the corresponding document from the database according to the document identifier, the data type and the segment identifier specifically includes:
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
2. The data call method according to claim 1, wherein said finding the corresponding segment of the corresponding document from the database based on the document identification, the data type, and the segment identification further comprises:
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, finding out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
3. The data call method of claim 1, wherein prior to said obtaining a call link, the method further comprises:
and classifying and storing the vehicle diagnosis data according to data types.
4. The data calling method according to claim 3, wherein the classifying and storing the vehicle diagnostic data according to data types specifically comprises:
establishing a plurality of documents corresponding to the data types one by one;
acquiring a vehicle diagnosis data segment;
judging the type of the vehicle diagnosis data segment;
and sequentially adding the vehicle diagnosis data segments into the documents of the corresponding data types, and allocating a segment identifier to each vehicle diagnosis data segment.
5. A data calling device applied to calling of vehicle diagnosis data is characterized by comprising:
the acquisition module is used for acquiring a calling link, wherein the calling link comprises a document identifier, a data type and a fragment identifier of a document to be called;
the searching module is used for searching corresponding fragments of corresponding documents from a database according to the document identification, the data type and the fragment identification;
and the association module is used for associating the corresponding segment of the corresponding document with the current document.
6. The data call apparatus of claim 5, wherein the lookup module is further to,
judging whether the document identification and the data type are null or not;
if the document identification and the data type are not empty, searching a document corresponding to the document identification from a database, and searching a corresponding segment according to the segment identification;
and if the document identification and the data type are null, searching a segment corresponding to the segment identification from the current document.
7. The data call apparatus of claim 5, wherein the lookup module is further to,
judging whether the document identification is matched with the data type;
if the document identification is matched with the data type, searching out a corresponding segment of a corresponding document from a database;
and if the document identification is not matched with the data type, ending the current data call.
8. The data call device of claim 5, wherein the obtaining module is further configured to categorize and store the vehicle diagnostic data by data type.
9. An electronic device comprising a processor and a memory, the memory having stored therein a computer readable program configured to be executed by the processor, the computer readable program when executed by the processor implementing the method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910414645.2A CN110297947B (en) | 2019-05-17 | 2019-05-17 | Data calling method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910414645.2A CN110297947B (en) | 2019-05-17 | 2019-05-17 | Data calling method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110297947A CN110297947A (en) | 2019-10-01 |
CN110297947B true CN110297947B (en) | 2023-04-07 |
Family
ID=68026921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910414645.2A Active CN110297947B (en) | 2019-05-17 | 2019-05-17 | Data calling method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110297947B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104766B (en) * | 2020-08-27 | 2023-06-30 | 深圳市元征科技股份有限公司 | Diagnostic protocol reconstruction method, device, terminal equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6314422B1 (en) * | 1997-12-09 | 2001-11-06 | Chrysler Corporation | Method for softlinking between documents in a vehicle diagnostic system |
CN104520676A (en) * | 2013-04-15 | 2015-04-15 | 弗莱克斯电子有限责任公司 | Virtual personality vehicle communications with third parties |
CN106855866A (en) * | 2015-12-09 | 2017-06-16 | 北大方正集团有限公司 | XML document storage method and device |
CN107168296A (en) * | 2017-06-30 | 2017-09-15 | 东南(福建)汽车工业有限公司 | A kind of automotive diagnostic installation software systems |
-
2019
- 2019-05-17 CN CN201910414645.2A patent/CN110297947B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110297947A (en) | 2019-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110601880B (en) | Cloud platform, service processing method, command interface and computer equipment | |
CN109814524B (en) | Vehicle diagnosis method, device and system | |
CN111552267B (en) | Vehicle diagnosis method and device and vehicle diagnosis equipment | |
CN110297947B (en) | Data calling method and device and electronic equipment | |
CN112015489A (en) | Management method, device, storage medium and system for vehicle-mounted software | |
CN112445490A (en) | File sequence processing method and device, terminal equipment and storage medium | |
CN111338716A (en) | Data processing method and device based on rule engine and terminal equipment | |
CN110633074A (en) | Use control method and device of software development kit | |
CN112306041A (en) | Vehicle configuration information writing method and device and electronic equipment | |
CN110633157A (en) | Menu dynamic management method, server, system and computer readable storage medium | |
CN112667270A (en) | Voice processing resource updating method, computer equipment and storage device | |
CN113760500A (en) | Service processing method, device, server and medium | |
CN107689955A (en) | SIP information analysis methods and server | |
CN111324645B (en) | Block chain data processing method and device | |
CN111414528A (en) | Method and device for determining equipment identification, storage medium and electronic equipment | |
CN112445816B (en) | Vehicle diagnosis data reference method, device, terminal equipment and storage medium | |
CN113065830B (en) | Storage system attribute pre-modification method and device, electronic equipment and storage medium | |
CN108763053A (en) | Bury the generation method and terminal device of a title | |
CN113342430A (en) | Fault code processing method and device, terminal equipment and readable storage medium | |
CN113094415B (en) | Data extraction method, data extraction device, computer readable medium and electronic equipment | |
CN110471708B (en) | Method and device for acquiring configuration items based on reusable components | |
CN109522014B (en) | Algorithm processing method based on new product development, electronic device and readable storage medium | |
CN113655776A (en) | Vehicle detection method and device, electronic equipment and storage medium | |
CN112306040A (en) | Vehicle detection method, device, equipment and server | |
CN111538651A (en) | Interface testing method, device, server and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |