[go: up one dir, main page]

CN113515926A - Automatic file publishing method for plug-in development system model information based on Office Word - Google Patents

Automatic file publishing method for plug-in development system model information based on Office Word Download PDF

Info

Publication number
CN113515926A
CN113515926A CN202111071652.0A CN202111071652A CN113515926A CN 113515926 A CN113515926 A CN 113515926A CN 202111071652 A CN202111071652 A CN 202111071652A CN 113515926 A CN113515926 A CN 113515926A
Authority
CN
China
Prior art keywords
template
document
placeholder
ctl
value
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.)
Granted
Application number
CN202111071652.0A
Other languages
Chinese (zh)
Other versions
CN113515926B (en
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.)
Nanjing Guorui Xinwei Software Co ltd
Original Assignee
Nanjing Guorui Xinwei Software 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 Nanjing Guorui Xinwei Software Co ltd filed Critical Nanjing Guorui Xinwei Software Co ltd
Priority to CN202111071652.0A priority Critical patent/CN113515926B/en
Publication of CN113515926A publication Critical patent/CN113515926A/en
Application granted granted Critical
Publication of CN113515926B publication Critical patent/CN113515926B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to an Office Word-based automatic file publishing method for plug-in development system model information, which belongs to the technical field of automatic processing of image-text information and comprises the following operation steps: setting a basic template of the document: editing a basic template of a document, setting a non-circulation area specified by the basic template, and setting a circulation area specified by the basic template; binding a document template and a data template incidence relation of a software system; acquiring user data to obtain a user template, and filling the obtained content information into the determined document template according to the association relation between the obtained user template and the data template; automatically publishing the document. The template format of the invention can be made into a template library, which is provided for users to select, thus improving the working efficiency, when the template format is changed and adjusted, the template format is immediately loaded, and the document reloads a new template format, thus the change is quick and the time is saved.

Description

Automatic file publishing method for plug-in development system model information based on Office Word
Technical Field
The invention relates to an Office Word-based automatic file publishing method for plug-in development system model information, belonging to the technical field of automatic processing of image-text information.
Background
Many existing information systems have a demand for exporting system model data in the form of Word documents. Because each data format of the information system has respective specification, no method capable of converting various data formats of the information system into Word documents exists in the market at present, if the Word documents are made through Office Word software, the documents need to be manually adjusted, the arrangement wastes time and labor, and great inconvenience is brought to use.
Disclosure of Invention
In order to solve the technical problems, the invention provides an automatic document publishing method of plug-in development system model information based on Office Word, which has the following specific technical scheme:
an Office Word-based plug-in development system model information automatic document publishing method comprises the following operation steps:
step 1: setting a basic template of the document:
1.1, editing a basic template of a document;
1.2, setting a non-circulation area designated by a basic template;
1.3, setting a circulation area designated by a basic template;
step 2: the association relationship between the binding basic template and the data template is as follows:
2.1, associating a data template in the area designated by the basic template;
2.2, providing a data template in a Json/XML format;
and step 3: automatically publishing the document:
3.1, acquiring user data to obtain a user template, and filling the obtained content information of the user template into the determined document template according to the incidence relation between the obtained user template and the data template;
and 3.2, automatically publishing the document.
Further, the specific process of setting the non-cyclic region specified by the basic template in step 1.2 is as follows:
step 1.2.1: selecting an area on the basic template;
step 1.2.2: double clicking a leaf node of the data template, and inserting a placeholder control ctl into a selected area;
step 1.2.3: recording the current operation time key;
step 1.2.4: acquiring a feature code value of a leaf node;
step 1.2.5: setting the attribute tag of the placeholder control ctl as key;
step 1.2.6: the { key = value } information is stored in the base template doc.
Further, the specific process of setting the circulation area specified by the basic template in step 1.3 is as follows:
step 1.3.1: selecting an area on the basic template;
step 1.3.2: clicking a 'circulation area' button, and inserting a placeholder control ctl _ loop in a selected area;
step 1.3.3: recording the current operation time key;
step 1.3.4: setting the attribute tag value of the content control ctl2 to key;
step 1.3.5: the { key = value } information is stored in the base template doc.
Further, the step 3.1, according to the association relationship between the obtained content information and the data template, fills the obtained content information into the determined document template as follows:
step 3.1.1: opening a document template, and acquiring a placeholder control ctl _ loop of a first mark 'circulation area';
step 3.1.2: traversing all placeholder controls ctl1, ctl2, ctl3.. said, ctln contained in the placeholder control ctl _ loop;
step 3.1.3: acquiring the tag of the placeholder control ctl1 as key 1;
step 3.1.4: acquiring a value1 corresponding to key1 from { key = value } information of the document template;
step 3.1.5: traversing the property name of the content information data, and recording a property value set when the property name is matched with a value1, wherein the property value set corresponds to the content of ctl 1;
step 3.1.6: sequentially repeating the steps 3.1.3, 3.1.4 and 3.1.5 for placeholder controls ctl2, ctl3.. and ctln, respectively;
step 3.1.7: calculating a maximum value count1 of a ctl content propertyValues set, placeholder controls ctl1, ctl2, ctl3.. times;
step 3.1.8: calculating a maximum line number count2 contained in the placeholder control ctl _ loop;
step 3.1.9: when the count1> count2, automatically adding a count1-count2 line in the area where the placeholder control ctl _ loop is located; when count1 is less than count2, the region where the placeholder control ctl _ loop is located automatically deletes the count2-count1 line, and when count1= count2, does not operate;
step 3.1.10: sequentially writing a content propertyValues set corresponding to placeholder controls ctl1, ctl2 and ctl3.. said, ctln into a document template according to lines, and if the content propertyValues set does not exist, the document template is empty, and the code is represented as "";
step 3.1.11: clearing placeholder controls ctl1, ctl2, ctl3.. times, ctl n, and ctl _ loop;
step 3.1.12: repeating step 3.1.1 until there is no placeholder control marked "loop area";
step 3.1.13: obtaining a remaining placeholder ctln 1;
step 3.1.14: executing the steps 3.1.3, 3.1.4 and 3.1.5 to obtain a value n1_ propertyValues set;
step 3.1.15: a value n1_ propertyValues set first record n1_ propertyValues 1 is written into a placeholder ctln1, if the value does not exist, the record is empty, and the code is represented as "";
step 3.1.16: clear placeholder control ctln 1;
step 3.1.17: repeating step 3.1.13, step 3.1.14, step 3.1.15 and step 3.1.16 until all remaining placeholders have been traversed;
step 3.1.18: and saving the document template.
The invention has the beneficial effects that:
1. the template format of the invention can be made into a template library, which is provided for users to select, thereby improving the working efficiency.
2. When the template format is changed and adjusted, the template format is immediately loaded, and the document is reloaded with a new template format, so that the change is quick, and the time is saved.
3. And flexibly binding the data template object through the Json format, and respectively secondarily expanding and customizing the system data template information.
4. By generating the template, binding the data template, automatically releasing the document, forming a standard process and saving time.
Drawings
Figure 1 is a flow chart of the implementation principle of the invention,
figure 2 is a schematic diagram of the location of a leaf node of the present invention,
figure 3 is a schematic diagram of the present invention inserting placeholders at leaf nodes,
fig. 4 is a schematic illustration of the location of the recirculation zones of the present invention.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
As shown in FIG. 1, the invention is a document template developed based on Office Word plug-in, and combines it with the data template of the software system to realize the method for automatically publishing documents, the specific operation process is as follows:
the method comprises the following steps: deployment program
Providing an installation and uninstallation script, wherein the installation or uninstallation script needs to be operated under the authority of an administrator and is installed before use;
step two: invoking document generation
When calling, only a program needs to be opened, and corresponding parameters are input, and an entry is opened, wherein the contents of the ' example input data ' json ' file are as follows:
{
"SMEXDiagram":{
"Operational Analysis":{
"Operational Interaction Scenario":{
"Diagram":[
{
"ImageName" [ OES ] Normal anti-derivative scene ",
"ImageUrl":"
}
]
},
"OperationalCapabilities Blank":{
"Diagram":[
{
"ImageName" [ OCB ] operational capability ",
"ImageUrl":"
}
]
},
"OperationalCapabilities Blank":{
"Diagram":[
{
"ImageName" [ OAB ] running framework ",
"ImageUrl":"iVBORw0
}
]
},
"OperationalCapabilities Blank":{
"Diagram":[
{
"ImageName" [ OEBD ] run entity definition ",
"ImageUrl":"iVBORw0
}
]
}
},
wherein the "example. bat" document contents are as follows:
cmd — isBackup 1 — isEncrypt 1 — inDocxPath = "example input template.
The parameter meanings are shown in the following table:
Figure DEST_PATH_IMAGE001
step three: generating a document template:
1) and editing the document basic template.
2) Setting a non-circulation area designated by a basic template, wherein the specific process is as follows:
step 1: selecting an area on the basic template doc;
step 2: referring to fig. 2 and 3, double clicking on a leaf node of the data template selects an area to insert a placeholder control ctl;
and step 3: recording the current operating time key (e.g., 20210901010101);
and 4, step 4: obtaining a feature code value of a leaf node (e.g., smexdiagram. common. Class Diagram blank. Diagram. ImageName);
and 5: setting a label tag of the placeholder control ctl as key;
step 6: information { key = value } (e.g., {20210901010101= smexdiram. common. Class Diagram blank. Diagram. ImageName }) is stored in the base template doc.
3) Setting a cycle area appointed by a basic template, and the specific process is as follows:
step 1: selecting an area on the basic template doc;
step 2: referring to fig. 4, clicking the "loop area" button, selecting an area to insert the placeholder control ctl _ loop;
and step 3: recording the current operation time key;
and 4, step 4: setting the attribute tag value of the content control ctl2 to key;
and 5: the { key = value } information is stored in the base template doc.
Step four: binding a document template and a data template incidence relation of a software system:
1) associating the data template in the area designated by the basic template;
2) data is provided in Json format, examples of which are as follows:
{
"SMEXDiagram": {
"Common": {
"Class Diagram Blank": [{
"Diagram": [{
"ImageName": "",
"@ Notes @ _ ImageName": picture name ",
"ImageUrl": "",
"@ Notes @ _ ImageUrl": picture path "
}],
"@ Notes @ _ Diagram": picture list "
}],
"@ Notes @ _ Class Diagram Blank": Class Diagram "
},
"@ Notes @ _ Common": general purpose ",
"Operational Analysis": {
"Operational Entity Blank": [{
"Diagram": [{
"ImageName": "",
"@ Notes @ _ ImageName": picture name ",
"ImageUrl": "",
"@ Notes @ _ ImageUrl": picture path "
}],
"@ Notes @ _ Diagram": picture list "
}],
Step five: automatically publishing the document:
1) filling the obtained content information into the determined document template according to the association relation between the obtained content information and the associated data template, wherein the specific process is as follows:
step 1: opening a document template doc, and acquiring a placeholder control ctl _ loop of a first mark 'circulation area';
step 2: traversing placeholder controls ctl1, ctl2, ctl3.. said, ctln contained in the placeholder control ctl _ loop;
and step 3: acquiring tag of a placeholder control ctl1 as key 1;
and 4, step 4: acquiring a value1 corresponding to a key from { key = value } information of the document template;
and 5: traversing the property name of the content information data, and recording the property value set of property when the property name is matched with a value1, wherein the value corresponds to the content of ctl 1;
step 6: repeating steps 3, 4 and 5 for placeholder controls ctl2, ctl3.. and ctln;
and 7: calculating a maximum value count1 of a ctl content propertyValues set, placeholder controls ctl1, ctl2, ctl3.. times;
and 8: calculating a maximum line number count2 contained in the placeholder control ctl _ loop;
and step 9: when the count1> count2, the area of the placeholder control ctl _ loop is automatically increased by the number 1-count 2; when the current count1 is less than the count2, automatically deleting the count2-count1 rows in the area where the placeholder control ctl _ loop is located;
step 10: sequentially writing content propertyValues sets corresponding to placeholder controls ctl1, ctl2 and ctl3.. the ctln into rows (if the content propertyValues sets do not exist, the content propertyValues sets are ");
step 11: clearing placeholder controls ctl1, ctl2, ctl3.. times, ctl n, and ctl _ loop;
step 12: repeating the step 1 until no placeholder control marked as 'circulation area' exists;
step 13: obtaining the remaining placeholders ctln 1;
step 14: step 3, step 4 and step 5 are executed to obtain a value n1_ propertyValues set
Step 15: taking a value n1_ propertyValues set first record (if the value is not existed, the value is "") n1_ propertyValues 1 is written into a placeholder ctln 1;
step 16: clear placeholder control ctln 1;
and step 17: repeating the steps 13, 14, 15 and 16;
step 18: and saving the document template.
2) And automatically publishing the document.
In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims (4)

1. An Office Word-based automatic document publishing method for plug-in development system model information is characterized in that: the method comprises the following operation steps:
step 1: setting a basic template of the document:
1.1, editing a basic template of a document;
1.2, setting a non-circulation area designated by a basic template;
1.3, setting a circulation area designated by a basic template;
step 2: the association relationship between the binding basic template and the data template is as follows:
2.1, associating a data template in the area designated by the basic template;
2.2, providing a data template in a Json/XML format;
and step 3: automatically publishing the document:
3.1, acquiring user data to obtain a user template, and filling the obtained content information of the user template into the determined document template according to the incidence relation between the obtained user template and the data template;
and 3.2, automatically publishing the document.
2. The Office Word-based plug-in development system model information automation document issuing method according to claim 1, characterized in that: the specific process of setting the non-cyclic area specified by the basic template in the step 1.2 is as follows:
step 1.2.1: selecting an area on the basic template;
step 1.2.2: double clicking a leaf node of the data template, and inserting a placeholder control ctl into a selected area;
step 1.2.3: recording the current operation time key;
step 1.2.4: acquiring a feature code value of a leaf node;
step 1.2.5: setting the attribute tag of the placeholder control ctl as key;
step 1.2.6: the { key = value } information is stored in the base template doc.
3. The Office Word-based plug-in development system model information automation document issuing method according to claim 1, characterized in that: step 1.3 the specific process of setting the cycle region specified by the basic template is as follows:
step 1.3.1: selecting an area on the basic template;
step 1.3.2: clicking a 'circulation area' button, and inserting a placeholder control ctl _ loop in a selected area;
step 1.3.3: recording the current operation time key;
step 1.3.4: setting the attribute tag value of the content control ctl2 to key;
step 1.3.5: the { key = value } information is stored in the base template doc.
4. The Office Word-based plug-in development system model information automation document issuing method according to claim 1, characterized in that: the specific process of filling the obtained content information into the determined document template according to the association relationship between the obtained content information and the data template in the step 3.1 is as follows:
step 3.1.1: opening a document template, and acquiring a placeholder control ctl _ loop of a first mark 'circulation area';
step 3.1.2: traversing all placeholder controls ctl1, ctl2, ctl3.. said, ctln contained in the placeholder control ctl _ loop;
step 3.1.3: acquiring the tag of the placeholder control ctl1 as key 1;
step 3.1.4: acquiring a value1 corresponding to key1 from { key = value } information of the document template;
step 3.1.5: traversing the property name of the content information data, and recording a property value set when the property name is matched with a value1, wherein the property value set corresponds to the content of ctl 1;
step 3.1.6: sequentially repeating the steps 3.1.3, 3.1.4 and 3.1.5 for placeholder controls ctl2, ctl3.. and ctln, respectively;
step 3.1.7: calculating a maximum value count1 of a ctl content propertyValues set, placeholder controls ctl1, ctl2, ctl3.. times;
step 3.1.8: calculating a maximum line number count2 contained in the placeholder control ctl _ loop;
step 3.1.9: when the count1> count2, automatically adding a count1-count2 line in the area where the placeholder control ctl _ loop is located; when count1 is less than count2, the region where the placeholder control ctl _ loop is located automatically deletes the count2-count1 line, and when count1= count2, does not operate;
step 3.1.10: sequentially writing a content propertyValues set corresponding to placeholder controls ctl1, ctl2 and ctl3.. said, ctln into a document template according to lines, and if the content propertyValues set does not exist, the document template is empty, and the code is represented as "";
step 3.1.11: clearing placeholder controls ctl1, ctl2, ctl3.. times, ctl n, and ctl _ loop;
step 3.1.12: repeating step 3.1.1 until there is no placeholder control marked "loop area";
step 3.1.13: obtaining a remaining placeholder ctln 1;
step 3.1.14: executing the steps 3.1.3, 3.1.4 and 3.1.5 to obtain a value n1_ propertyValues set;
step 3.1.15: a value n1_ propertyValues set first record n1_ propertyValues 1 is written into a placeholder ctln1, if the value does not exist, the record is empty, and the code is represented as "";
step 3.1.16: clear placeholder control ctln 1;
step 3.1.17: repeating step 3.1.13, step 3.1.14, step 3.1.15 and step 3.1.16 until all remaining placeholders have been traversed;
step 3.1.18: and saving the document template.
CN202111071652.0A 2021-09-14 2021-09-14 Automatic file publishing method for plug-in development system model information based on Office Word Active CN113515926B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111071652.0A CN113515926B (en) 2021-09-14 2021-09-14 Automatic file publishing method for plug-in development system model information based on Office Word

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111071652.0A CN113515926B (en) 2021-09-14 2021-09-14 Automatic file publishing method for plug-in development system model information based on Office Word

Publications (2)

Publication Number Publication Date
CN113515926A true CN113515926A (en) 2021-10-19
CN113515926B CN113515926B (en) 2022-01-04

Family

ID=78063049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111071652.0A Active CN113515926B (en) 2021-09-14 2021-09-14 Automatic file publishing method for plug-in development system model information based on Office Word

Country Status (1)

Country Link
CN (1) CN113515926B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117272953A (en) * 2023-11-15 2023-12-22 明度智云(浙江)科技有限公司 Automatic document information filling method, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702617A (en) * 2004-05-28 2005-11-30 微软公司 Method and system for mapping content between a starting template and a target template
CN109657215A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Document structure tree method, equipment, storage medium and device based on template
CN110442851A (en) * 2019-07-23 2019-11-12 南京国睿信维软件有限公司 The method of power editor is independently limited based on the document automated modular of Office Word and multiple terminals

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702617A (en) * 2004-05-28 2005-11-30 微软公司 Method and system for mapping content between a starting template and a target template
CN109657215A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Document structure tree method, equipment, storage medium and device based on template
CN110442851A (en) * 2019-07-23 2019-11-12 南京国睿信维软件有限公司 The method of power editor is independently limited based on the document automated modular of Office Word and multiple terminals

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117272953A (en) * 2023-11-15 2023-12-22 明度智云(浙江)科技有限公司 Automatic document information filling method, system and storage medium
CN117272953B (en) * 2023-11-15 2024-03-12 明度智云(浙江)科技有限公司 Automatic document information filling method, system and storage medium

Also Published As

Publication number Publication date
CN113515926B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN111259202B (en) Document structured data embedding method and system
US8966357B2 (en) User interface for establishing mappings from internal metadata to external metadata
CN110442822A (en) A kind of small routine content displaying method, device, equipment and storage medium
CN114035773A (en) Configuration-based low-code form development method, system and device
US7720885B2 (en) Generating a word-processing document from database content
CN101430714B (en) A style-based content structured processing method and system
US20090089299A1 (en) Declarative model editor generation
CN113590115B (en) Automatic generation method and device for service system codes
CN105701251A (en) Data export and import method based on object definition
US6915313B2 (en) Deploying predefined data warehouse process models
CN105468793B (en) A kind of automatic management method of simulation model data
CN113515926B (en) Automatic file publishing method for plug-in development system model information based on Office Word
CN109325217B (en) File conversion method, system, device and computer readable storage medium
CN103984554A (en) Software design document generating method and device
US7756819B2 (en) Integrated authoring system for electronic technical manual and paper technical manual using logistics support analysis data and authoring method therefor
US8082496B1 (en) Producing a set of operations from an output description
CN103294477A (en) Method for carrying out mobile development project management through Office documents
US20070061349A1 (en) Hierarchically describing shapes
US20040205657A1 (en) Method and system for linking project information
US20120192046A1 (en) Generation of a source complex document to facilitate content access in complex document creation
CN113407164B (en) Software code generation method and system based on mind map and tree structure technology
CN112099793B (en) Interface generation method and device, electronic equipment and storage medium
CN114118026B (en) Automatic document generation method and device, computer storage medium and electronic equipment
CN115130186A (en) A Method of Quickly Creating Piping System Based on Modeling Software
CN113822023B (en) Automatic standard document generation method and system

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
CB03 Change of inventor or designer information

Inventor after: Zhang Lei

Inventor after: Chen Xueqin

Inventor after: Wu Wengang

Inventor after: Li Jie

Inventor after: Zhang Jie

Inventor before: Zhang Lei

Inventor before: Wu Wengang

Inventor before: Li Jie

Inventor before: Zhang Jie

CB03 Change of inventor or designer information