Method for generating WORD document into description class data module conforming to S1000D standard

文档序号:1156526 发布日期:2020-09-15 浏览:4次 中文

阅读说明:本技术 将word文档生成符合s1000d标准描述类数据模块的方法 (Method for generating WORD document into description class data module conforming to S1000D standard ) 是由 冯彬 张悦 程铮 曹亢 马永起 蒙立荣 郑翠芳 齐天永 吴家菊 于 2020-05-29 设计创作,主要内容包括:本发明公开了将WORD文档生成符合S1000D标准描述类数据模块的方法,包括以下步骤:确定WS规则元素,所述WS规则是基于WORD文档识别出需要关注的元素和S1000D描述类数据模块之间的映射规则;建立WS规则映射关系和转换规则;对需转换的WORD文档进行解析识别,对识别出的元素及内容按WS规则映射关系和转换规则进行转换,自动生成符合S1000D标准描述类数据模块文件。用户通过本发明所述方法可以非常准确、方便、快捷地将WORD文档自动生成符合S1000D标准描述类数据模块信息文件,从而提高了IETM数据内容编辑与制作的效率,降低了IETM数据内容编辑与制作的复杂度。(The invention discloses a method for generating a WORD document into a description class data module conforming to S1000D standard, which comprises the following steps: determining a WS rule element, wherein the WS rule is a mapping rule between an element needing attention based on the WORD document identification and the S1000D description class data module; establishing WS rule mapping relation and conversion rules; and analyzing and identifying the WORD document to be converted, converting the identified elements and contents according to the WS rule mapping relation and the conversion rule, and automatically generating a description data module file conforming to the S1000D standard. The user can accurately, conveniently and quickly automatically generate the WORD document into the description data module information file conforming to the S1000D standard by the method, thereby improving the efficiency of editing and making IETM data content and reducing the complexity of editing and making IETM data content.)

1. A method for generating a WORD document into a description class data module conforming to the S1000D standard, the method comprising: the method comprises the following steps:

step 1, determining WS rule elements, wherein the WS rules are mapping rules between elements needing attention and S1000D description class data modules based on WORD documents;

step 2, establishing a WS rule mapping relation and a conversion rule, wherein the WS rule mapping relation is the mapping relation between the determined WS rule elements and the information elements of the description data module conforming to the S1000D standard; the conversion rule is a rule how the rule elements are converted according to the types of the rule elements, the organizational structures among the rule elements and the mapping relationship;

and 3, analyzing and identifying the WORD document to be converted, converting the identified elements and contents according to the WS rule mapping relation and the conversion rule, and automatically generating a description data module file conforming to the S1000D standard.

2. The method of generating a WORD document into a description class data module conforming to the S1000D standard as recited in claim 1, wherein: in step 1, the determining WS rule element includes the following steps:

step 1.1, analyzing a universal WORD document structure;

step 1.2, identifying elements needing attention in a WORD document structure;

and step 1.3, determining the elements needing attention in the WORD document structure as WS rule elements.

3. The method of generating a WORD document into a description class data module conforming to the S1000D standard as recited in claim 2, wherein: in step 1.2 and step 1.3, the elements needing attention in the WORD document structure include, but are not limited to, title elements, table elements, drawing elements, body elements, segment elements, letter number elements, and number elements at all levels.

4. A method for generating a WORD document into a description class data module according to the S1000D standard as claimed in claim 1, 2 or 3, wherein: the mapping relationship in the step 2 includes, but is not limited to, a mapping relationship between each level of title element and title element defined by the S1000D standard, a mapping relationship between table element and table element defined by the S1000D standard, a mapping relationship between primitive element and diagram element defined by the S1000D standard, a mapping relationship between body element and body element defined by the S1000D standard, a mapping relationship between segment element and segment element defined by the S1000D standard, a mapping relationship between letter number element and letter number element defined by the S1000D standard, and a mapping relationship between number element and number letter number element defined by the S1000D standard.

5. A method for generating a WORD document into a description class data module according to the S1000D standard as claimed in claim 1, 2 or 3, wherein: the conversion rules in the step 2 include a title element conversion rule, a table element conversion rule, a primitive element conversion rule, a body element conversion rule, a segment element conversion rule, an alphabet number element conversion rule, and a number element conversion rule.

6. A method for generating a WORD document into a description class data module according to the S1000D standard as claimed in claim 1, 2 or 3, wherein: the step 3 comprises the following steps:

step 3.1, acquiring WORD document materials to be converted;

and 3.2, analyzing the WORD document material, circularly traversing the WORD document material, and automatically converting the identified elements and contents according to the mapping relation and the conversion rule to generate a description class data module file conforming to the S1000D standard.

7. The method of generating a WORD document into a description class data module conforming to the S1000D standard as recited in claim 6, wherein: the method of the step 3.1 is as follows: opening WORD DOCUMENT materials to be converted, acquiring a DOCUMENT object, and positioning a pointer at the starting position of the WORD DOCUMENT; said step 3.2 comprises the steps of:

step 3.2.1, acquiring a WORD document element object for analysis and identification, converting according to the identification result, contrasting the mapping relation and the conversion rule, and adding the converted content data into the description data module;

step 3.2.2, moving down the WORD document pointer, and repeatedly executing the step 3.2.1 until the pointer reaches the end of the WORD document;

and 3.2.3, closing the WORD document and storing the WORD document in the description class data module file.

Technical Field

The invention relates to a data editing method implemented by software, in particular to a method for generating a WORD document into a description class data module conforming to the S1000D standard.

Background

An Interactive Electronic Technical Manual (IETM) is a technical publication which is compiled according to standard digital format and provides contents such as basic principle, operation, technical maintenance and the like in a man-machine interaction mode in various forms such as characters, graphs, tables, audios and videos. At present, the IETM technology is becoming mature, some units have made interactive electronic technical manuals meeting user requirements through the IETM technology, and it is especially important to adopt advanced technical means and making tools in the process of making ITEM.

The traditional IETM software making tools mainly comprise two types, namely special making software and general making software, and can also be divided into domestic and foreign software in China. The foreign IETM makes software has early start, mature technical development, good performance and strong function and is verified by the use of a plurality of users, but the adopted technical standard version is older, the supported standard is not always compatible with the Chinese IETM standard, the interaction function is poor, the price is high, and the maintenance and the safety are not good enough.

However, in the process of writing content, whether domestic or foreign in China, or professional software or general software, the text content of the WORD document needs to be made into a data module meeting the requirements, and a worker needs to edit the content by using a tool with an XML editor function, or to convert the WORD document by using the tool, and the WORD document needs to be processed into a specific format (such as inserting a tag) or needs to be manually set for the content format to be used. That is to say: for the whole text of the WORD document, when the content part of the data module is edited, there are two ways: (1) manually copying the corresponding contents to the corresponding positions one by one; (2) and processing the WORD document into a specific format (such as inserting a label) by using a manual or manual using tool, and the like and converting. The defects of the two modes are as follows: the first method needs a lot of manpower when actually manufacturing the IETM, and meanwhile, because of manual operation, the accuracy cannot be guaranteed, and multiple checks are needed; the second method also requires a corresponding manual or manual tool setting to a specific format.

The S1000D standard is an international standard for creating technical documents using universal resource database, which proposes two core concepts of data module and universal resource database to ensure information sharing and exchange between IETMs, so it is very convenient for IETM production, but the traditional IETM production method has no precedent for combining and converting WORD documents with the S1000D standard.

Disclosure of Invention

The invention aims to solve the problems and provide a method for generating a WORD document into a description class data module conforming to the S1000D standard, which can effectively produce IETM.

The invention realizes the purpose through the following technical scheme:

a method for generating a WORD document into a description class data module conforming to the S1000D standard, comprising the steps of:

step 1, determining WS rule elements, wherein the WS rules are mapping rules between elements needing attention and S1000D description class data modules based on WORD documents;

step 2, establishing a WS rule mapping relation and a conversion rule, wherein the WS rule mapping relation is the mapping relation between the determined WS rule elements and the information elements of the description data module conforming to the S1000D standard; the conversion rule is a rule how the rule elements are converted according to the types of the rule elements, the organizational structures among the rule elements and the mapping relationship;

and 3, analyzing and identifying the WORD document to be converted, converting the identified elements and contents according to the WS rule mapping relation and the conversion rule, and automatically generating a description data module file conforming to the S1000D standard.

Preferably, in step 1, the determining WS rule element includes the following steps:

step 1.1, analyzing a universal WORD document structure;

step 1.2, identifying elements needing attention in a WORD document structure;

and step 1.3, determining the elements needing attention in the WORD document structure as WS rule elements.

Preferably, in step 1.2 and step 1.3, the elements needing attention in the WORD document structure include, but are not limited to, title elements, table elements, figure elements, body elements, paragraph elements, letter number elements, and number elements at all levels.

Preferably, the mapping relationship in step 2 includes, but is not limited to, a mapping relationship between each level of title element and title element defined by the S1000D standard, a mapping relationship between table element and table element defined by the S1000D standard, a mapping relationship between primitive element and diagram element defined by the S1000D standard, a mapping relationship between body element and body element defined by the S1000D standard, a mapping relationship between segment element and segment element defined by the S1000D standard, a mapping relationship between letter number element and letter number element defined by the S1000D standard, and a mapping relationship between number element and number letter number element defined by the S1000D standard.

Preferably, the conversion rules in step 2 include a title element conversion rule, a table element conversion rule, a primitive element conversion rule, a body element conversion rule, a segment element conversion rule, an alphabet number element conversion rule, and a number element conversion rule.

Preferably, the step 3 comprises the following steps:

step 3.1, acquiring WORD document materials to be converted;

and 3.2, analyzing the WORD document material, circularly traversing the WORD document material, and automatically converting the identified elements and contents according to the mapping relation and the conversion rule to generate a description class data module file conforming to the S1000D standard.

Preferably, the method of step 3.1 is: opening WORD DOCUMENT materials to be converted, acquiring a DOCUMENT object, positioning a pointer at the starting position of the WORD DOCUMENT, wherein the DOCUMENT object represents the whole XML DOCUMENT, is the root of a DOCUMENT tree and provides an initial or top-level access entry to the DOCUMENT data; said step 3.2 comprises the steps of:

step 3.2.1, acquiring a WORD document element object for analysis and identification, converting according to the identification result, contrasting the mapping relation and the conversion rule, and adding the converted content data into the description data module;

step 3.2.2, moving down the WORD document pointer, and repeatedly executing the step 3.2.1 until the pointer reaches the end of the WORD document;

and 3.2.3, closing the WORD document and storing the WORD document in the description class data module file.

The invention has the beneficial effects that:

the invention analyzes the WORD document, analyzes the relation between the WORD document and the S1000D standard description data module, establishes the mapping relation between the elements needing attention identified by the WORD document and the S1000D standard data module description information elements, and automatically maps the elements needing attention and the content in the WORD document to the S1000D standard description data module, thereby automatically generating the description data information conforming to the S1000D standard. Meanwhile, because the invention analyzes the WORD document in full text, the invention is only used for automatically generating the description class data module which conforms to the S1000D standard for analyzing the WORD document in full text, and does not include automatically generating other classes such as program classes or fault classes.

Drawings

FIG. 1 is a flow chart of a method for generating a WORD document into a description class data module conforming to the S1000D standard according to the present invention.

Detailed Description

The invention will be further described with reference to the accompanying drawings in which:

as shown in FIG. 1, the method for generating a WORD document into a description class data module conforming to the S1000D standard according to the present invention includes the following steps:

step 1, determining WS rule elements, wherein the WS rules are mapping rules between elements needing attention based on WORD document identification and S1000D description class data modules.

The method specifically comprises the following steps:

step 1.1, analyzing a universal WORD document structure;

step 1.2, identifying elements needing attention in a WORD document structure; elements of the WORD document structure that need attention include, but are not limited to, title elements, table elements, graph elements, body elements, paragraph elements, letter number elements, and number elements at various levels;

and step 1.3, determining the elements needing attention in the WORD document structure as WS rule elements.

Step 2, establishing a WS rule mapping relation and a conversion rule, wherein the WS rule mapping relation is the mapping relation between the determined WS rule elements and the information elements of the description data module conforming to the S1000D standard; the conversion rule is a rule how the rule elements are converted according to the types of the rule elements, the organizational structures among the rule elements and the mapping relationship; the mapping relationship includes, but is not limited to, the mapping relationship between the title elements of each level and the title elements defined by the S1000D standard, the mapping relationship between the table elements and the table elements defined by the S1000D standard, the mapping relationship between the primitive elements and the diagram elements defined by the S1000D standard, the mapping relationship between the body elements and the body elements defined by the S1000D standard, the mapping relationship between the segment elements and the segment elements defined by the S1000D standard, the mapping relationship between the letter number elements and the letter number elements defined by the S1000D standard, and the mapping relationship between the number elements and the number letter number elements defined by the S1000D standard; the conversion rules include a title element conversion rule, a table element conversion rule, a primitive element conversion rule, a text element conversion rule, a segment element conversion rule, an alphabet number element conversion rule, and a number element conversion rule.

In this step, the specific method for establishing various mapping relationships is as follows:

the mapping relationship between each level of title element and title element defined by the S1000D standard is established as follows:

<levelledPara>

< title > title name </title >

</levelledPara>;

Establishing a mapping relation between the table elements and the table elements defined by the S1000D standard as follows:

table;

the mapping relationship between the graph elements and the graph elements defined by the S1000D standard is established as follows:

< figure > figure </figure >;

establishing a mapping relation between the text element and the text element defined by the S1000D standard as follows:

< para > text content </para >;

establishing a mapping relation between the segment elements and the segment elements defined by the S1000D standard as follows:

< para > paragraph content </para >;

establishing the mapping relation between the letter number elements and the letter number elements defined by the S1000D standard as follows:

< listItem > numeric value and content </listItem >,

wherein: the alphanumeric value is to be converted to a numeric value;

establishing the mapping relation between the number element and the number-letter number element defined by the S1000D standard as follows:

< listItem > data value and content </listItem >.

The above mapping relationships are summarized in the following table:

WS rule mapping table

And 3, analyzing and identifying the WORD document to be converted, converting the identified elements and contents according to the WS rule mapping relation and the conversion rule, and automatically generating a description data module file conforming to the S1000D standard.

The method comprises the following steps:

step 3.1, acquiring WORD document materials to be converted; the specific method comprises the following steps: opening WORD DOCUMENT materials to be converted, acquiring a DOCUMENT object, and positioning a pointer at the starting position of the WORD DOCUMENT;

and 3.2, analyzing the WORD document material, circularly traversing the WORD document material, and automatically converting the identified elements and contents according to the mapping relation and the conversion rule to generate a description class data module file conforming to the S1000D standard.

Step 3.2 comprises the following specific steps:

step 3.2.1, acquiring a WORD document element object for analysis and identification, converting according to the identification result, contrasting the mapping relation and the conversion rule, and adding the converted content data into the description data module;

step 3.2.2, moving down the WORD document pointer, and repeatedly executing the step 3.2.1 until the pointer reaches the end of the WORD document;

and 3.2.3, closing the WORD document and storing the WORD document in the description class data module file.

The above embodiments are only preferred embodiments of the present invention, and are not intended to limit the technical solutions of the present invention, so long as the technical solutions can be realized on the basis of the above embodiments without creative efforts, which should be considered to fall within the protection scope of the patent of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种自动化分类器的构造方法以及从软件开发文本类制品中识别决策的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!