A fast compilation method of XML format graphic parts data module

By analyzing graphic files and directory data, generating and associating XML format diagram part-like data modules, the problem of inefficiency in traditional compilation methods is solved, and fast and efficient XML data module compilation is achieved.

CN118673880BActive Publication Date: 2024-12-24AVICIT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410730858.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-12-24
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

The compilation of traditional graphical parts data modules is inefficient, and it is necessary to manually select, copy and paste the association between component information and graphic hotspot IDs, resulting in a cumbersome compilation process.

Method used

By analyzing hot spots in the graphics file, generating XML format graphic element information, parsing the graphical directory data to generate a string matrix, and converting it to XML format according to the standard mode, combining the graphical elements and directory data, realizing the association between the graphical hot spots and directory data.

Benefits of technology

It greatly improves the compilation efficiency of XML format diagram part-type data modules, simplifies the conversion process from source files to XML format data, and reduces manual operation steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673880B_ABST
    Figure CN118673880B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for quickly compiling a graphic parts data module in XML format, which belongs to the field of intelligent data processing, and includes: step S1: parsing hot spots in a graphic file with interactive hot spots and numbering them; generating graphic elements and sub-element information of the graphic parts data module in XML format; S2: opening a source file recording graphic directory data, and converting the directory data in all table rows into a string matrix; S3: setting a conversion rule for the string matrix, and converting each row of strings into directory data of the graphic parts data module in XML format according to the document structure defined by the standard mode; S4: merging the graphic elements and sub-element information with the directory sequence numbering elements and sub-element data of the directory data, and associating the graphic hot spot ID with the corresponding directory data; S5: generating an XML format graphic parts data module that meets the standard requirements. The method of the present invention greatly improves the compilation efficiency of the graphic parts data module in XML format.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of intelligent data processing, and in particular relates to a method for quickly compiling a graphical parts data module in XML format. Background Art

[0002] The illustrated parts data module is an important part of the interactive electronic technical manual (IETM), which is mainly composed of illustrated drawings and corresponding illustrated catalog tables. When compiling the illustrated parts data module, it is necessary to establish a link relationship between the hot spots of the illustrated drawings and the catalog tables, so that when users read the IETM, they can realize the interactive highlighting of the hot spots in the drawings (usually the illustrated numbers) and the corresponding parts information in the parts catalog tables.

[0003] The traditional method of compiling graphic parts data modules is to use an XML editor to copy the graphic catalog data in the material file to the correct label position. A piece of component information (such as serial number, model / number, name, quantity, specification, etc.) needs to be selected, copied, and pasted multiple times, and it also needs to be associated with the correct graphic hotspot ID, resulting in extremely low efficiency in compiling such data modules. There is an urgent need for a method to quickly compile graphic parts data modules. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a method for quickly compiling a graphical parts data module in XML format, comprising the following steps:

[0005] Step S1: open a graphic file with interactive hotspots, parse the hotspots contained in the graphic, sequentially number the graphic hotspots, and obtain the graphic hotspot ID; generate graphic elements and their sub-element information (S1000D standard) or hotspot graphics and their attribute information (GJB6600 standard) of the XML format diagram part data module;

[0006] Step S2: Open the source file recording the graphic catalog data, parse the graphic catalog data of each row in the table in turn, separate the data in each pane with spaces to generate a row of character strings, until the information in all the table rows is converted into a character string matrix;

[0007] Step S3: setting a conversion rule for the string matrix, converting each row of strings into directory data of a graphical parts data module in XML format according to the document structure defined by the standard mode;

[0008] Step S4: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data;

[0009] Step S5: Generate an XML formatted graphical parts data module that meets standard requirements.

[0010] Beneficial effects:

[0011] The present invention provides a method for quickly compiling a graphical parts data module in XML format, which can quickly convert graphical catalog data in a source file (Word or Excel) into XML format data, changing the current compilation method in which users first manually create an XML format file and then copy the data in the table to a specific element position. Under the premise of ensuring the correctness of the data content, the compilation efficiency of the graphical parts data module in XML format is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of a method for quickly compiling a parts data module in XML format according to the present invention;

[0013] Figure 2 It is a diagram of the < figure > element and its sub-elements for illustrating the part data module;

[0014] Figure 3 A schematic diagram for illustrating the conversion of directory data into a string matrix;

[0015] Figure 4 This is a schematic diagram of the XML format code for converting a string matrix into a graphical directory data module. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0017] Embodiment 1

[0018] like Figure 1 As shown, an embodiment of the present invention provides a method for quickly compiling a graphical parts data module in XML format, comprising the following steps:

[0019] Step S1: Open a graphic file with interactive hotspots, parse the hotspots contained in the graphic, number the graphic hotspots in sequence, and obtain the graphic hotspot ID; generate graphic elements and their sub-element information or hotspot graphics and their attribute information of the XML format diagram part data module;

[0020] Step S2: Open the source file recording the graphic catalog data, parse the graphic catalog data of each row in the table in turn, separate the data in each pane with spaces to generate a row of character strings, until the information in all the table rows is converted into a character string matrix;

[0021] Step S3: setting a conversion rule for the string matrix, converting each row of strings into directory data of a graphical parts data module in XML format according to the document structure defined by the standard mode;

[0022] Step S4: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data;

[0023] Step S5: Generate an XML formatted graphical parts data module that meets standard requirements.

[0024] In one embodiment, the above step S1: opening a graphic file with interactive hotspots, parsing the hotspots contained in the graphic, sequentially numbering the graphic hotspots, and obtaining a graphic hotspot ID; generating graphic elements and their sub-element information (S1000D standard) or hotspot graphics and their attribute information (GJB6600 standard) of a graphical part data module in XML format, specifically includes:

[0025] Step S11: Open a graphic file in CGM or SVG format;

[0026] Use third-party plug-ins (such as Cortona2D Viewer, IsoView) to open CGM or SVG format graphics (graphics with interactive hotspots) files;

[0027] Step S12: parsing the hot spots contained in the graphic to obtain the graphic hot spots;

[0028] Analyze the hot spots contained in the graphics, obtain the hot spot information of the graphics, click the hot spot area in the graphics, and record the graphics number corresponding to each hot spot;

[0029] Step S13: According to the requirements of S1000D or GJB6600 standards, use <graphic>Child elements of an element <hotspot>or the attribute hotspot ID of <hotspot graphic>, sequentially number the graphic hotspots to obtain the graphic hotspot ID;

[0030] If the S1000D standard is used to compile the graphic parts data module, the hotspot element, a child element of the graphic element, is used to sequentially number the graphic hotspots obtained through analysis, such as <hotspot id="hot-0001">If the GJB6600 standard is used to compile the graphic parts data module, the same method is used to sequentially number the graphic hot spots;

[0031] Step S14: Generate graphic elements and their sub-element information or hotspot graphics and their attribute information in the graphic parts data module according to the schema defined in the S1000D or GJB6600 standards;

[0032] According to the schema defined in the S1000D (or GJB6600) standard, the graphic < figure > element and its sub-element information in the diagram part data module are generated, such as Figure 2 shown.

[0033] In one embodiment, the above step S2: opening the source file recording the graphic catalog data, parsing the graphic catalog data of each row in the table in turn, separating the data in each pane with spaces to generate a row of strings, until the information in all the table rows is converted into a string matrix, specifically includes:

[0034] Step S21: Open the source file recording the graphic directory data;

[0035] Open the source file that records the graphic catalog data, such as XLS / XLSX spreadsheet file;

[0036] Step S22: parsing the graphic catalog data contained in the first row of the table in the source file, obtaining the character data stored in each cell in order from left to right, and determining whether the character data in the cell contains a space, and if so, deleting the space in the cell character data;

[0037] Step S23: Generate a string of data from the graphic directory data contained in the first row of the table, where the character data in different cells are separated by spaces;

[0038] Step S24: parsing the graphic catalog data of subsequent rows in the table in sequence until the data in all the table rows are converted into a character string matrix;

[0039] As attached Figure 3 Figure 1 shows an example of converting directory data into a string matrix.

[0040] In one embodiment, the above step S3: setting the conversion rules of the string matrix, converting each row of strings into the directory data of the XML format diagram parts data module according to the document structure defined by the standard mode, specifically includes:

[0041] Step S31: according to the S1000D or GJB6600 standard, the conversion rule of the character string matrix is ​​set, that is, the content of each row of character string data (separated by spaces) is configured with data elements or attributes that are suitable therefor;

[0042] Set the conversion rules for the string matrix according to the S1000D (or GJB6600) standard mode. If the first column represents the name, add the element <descrforpart>< / descrforpart> Label; the second column indicates the quantity, then add elements <quantitypernexthigherassy> < / quantitypernexthigherassy> Label, and so on to complete the conversion rule setting of the string matrix. If one or more columns of data in the string matrix do not need to be converted, you can skip it;

[0043] Step S32: according to the configuration generated rules, convert the first line of character strings into directory data of the graphical parts data module in XML format according to the document structure defined by the schema;

[0044] Step S33: repeating step S32 until all row data of the character string matrix are converted into directory data of the graphical parts data module in XML format;

[0045] Step S34: Format the directory data of the XML format graphic parts data module to generate the directory sequence number in the graphic parts data module <catalogseqnumber>Element or <directory number> and its sub-element information.

[0046] like Figure 4 The following is an XML code example for converting a string matrix into a graphical catalog data module.

[0047] In one embodiment, the above step S4: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data, specifically includes:

[0048] Step S41: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data;

[0049] Firstly, the graphic elements and their sub-element data of the graphic parts data module are merged with the catalog sequence number elements and their sub-element data to generate the complete technical content part of the graphic parts data module, and the schema of the graphic parts data module is verified;

[0050] Then, according to the association method defined in the S1000D (or GJB6600) standard mode, the hotspot sub-elements of the interactive graphic element are sequentially associated with the corresponding graphic catalog number elements (or <catalog serial number>);

[0051] Step S42: Formatting the content of the compiled graphic catalog data module.

[0052] In one embodiment, the above step S5: generating an XML formatted graphical parts data module that meets the standard requirements specifically includes:

[0053] Step S51: Performing format compliance check on the XML format graphic parts data module according to the mode defined in the S1000D or GJB6600 standard, and checking the correctness of the association relationship between the graphic hotspot ID and the corresponding catalog data;

[0054] Step S52: Save the generated XML format graphic part class data module file.

[0055] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.< / catalogseqnumber> < / hotspot> < / hotspot> < / graphic>

Claims

1. A method for quickly compiling XML format graphic parts data module, characterized in that: include: Step S1: Open a graphic file with interactive hotspots, parse the hotspots contained in the graphic, number the graphic hotspots in sequence, and obtain the graphic hotspot ID; generate graphic elements and sub-element information of the XML format diagram part data module; Step S2: Open the source file recording the graphic catalog data, parse the graphic catalog data of each row in the table in turn, separate the data in each pane with spaces to generate a row of character strings, until the information in all the table rows is converted into a character string matrix; Step S3: setting a conversion rule for the string matrix, converting each row of strings into directory data of a graphical parts data module in XML format according to the document structure defined by the standard mode; Step S4: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data according to the association method defined in the standard mode; Step S5: Generate an XML formatted graphical parts data module that meets standard requirements.

2. The method for rapidly compiling XML format graphic parts data module according to claim 1 is characterized in that: The step S1: opening a graphic file with interactive hotspots, parsing the hotspots contained in the graphic, sequentially numbering the graphic hotspots, and obtaining a graphic hotspot ID; generating graphic elements and sub-element information of a graphical part data module in XML format, specifically including: Step S11: Open a graphic file in CGM or SVG format; Step S12: parsing the hot spots contained in the graphic to obtain the graphic hot spots; Step S13: According to the requirements of S1000D or GJB6600 standards, use <graphic>Child elements of an element <hotspot> , sequentially number the graphic hotspots to obtain a graphic hotspot ID;< / hotspot> < / graphic> Step S14: Generate the diagram parts data module according to the schema defined in S1000D or GJB6600 standard <figure> Element and its sub-element information.< / figure> 3. The method for quickly compiling XML format graphic parts data module according to claim 2 is characterized in that: The step S2: opening the source file recording the graphic catalog data, parsing the graphic catalog data of each row in the table in turn, separating the data in each pane with spaces to generate a row of strings, until the information in all the table rows is converted into a string matrix, specifically includes: Step S21: Open the source file recording the graphic directory data; Step S22: parsing the graphic catalog data contained in the first row of the table in the source file, obtaining the character data stored in each cell in order from left to right, and determining whether the character data in the cell contains a space, and if so, deleting the space in the cell character data; Step S23: Generate a string of data from the graphic catalog data contained in the first row of the table, where the strings in different cells are separated by spaces; Step S24: parsing the graphic catalog data of subsequent rows in the table in turn until the data in all the table rows are converted into a string matrix.

4. The method for rapidly compiling XML format graphic parts data module according to claim 3 is characterized in that: The step S3: setting the conversion rules of the string matrix, converting each row of strings into the directory data of the XML format diagram parts data module according to the document structure defined by the standard mode, specifically includes: Step S31: according to the S1000D or GJB6600 standard, the conversion rule of the character string matrix is ​​set, that is, the data separated by spaces in each row of the character string is configured with an element label or attribute that is suitable for it; Step S32: according to the configuration generated rules, convert the first line of character strings into directory data of the graphical parts data module in XML format according to the document structure defined by the schema; Step S33: repeating step S32 until all row data of the string matrix are converted into directory data of the XML formatted graphical parts data module; Step S34: Format the directory data of the XML format graphic parts data module to generate the directory sequence number in the graphic parts data module. <catalogseqnumber> Element and its sub-element information.< / catalogseqnumber> 5. The method for rapidly compiling XML format graphic parts data module according to claim 4 is characterized in that: The step S4: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data, specifically includes: Step S41: merging the graphic element and its sub-element information with the directory sequence number element and its sub-element data of the directory data, and associating the graphic hotspot ID with the corresponding directory data; Step S42: Formatting the content of the compiled graphic catalog data module.

6. The method for rapidly compiling XML format graphic parts data module according to claim 5 is characterized in that: The step S5: generating an XML formatted graphical parts data module that meets the standard requirements, specifically includes: Step S51: Performing format compliance check on the XML format graphic parts data module according to the mode defined in the S1000D or GJB6600 standard, and checking the correctness of the association relationship between the graphic hotspot ID and the corresponding catalog data; Step S52: Save the generated XML format graphic part class data module file.

Citation Information

Patent Citations

  • IETM illustrated part data entry device and method based on templates

    CN104156347A

  • Technical publication content compiling system and method

    CN104699713A