CN110909520A - Document construction method and electronic equipment - Google Patents

Document construction method and electronic equipment Download PDF

Info

Publication number
CN110909520A
CN110909520A CN201911112134.1A CN201911112134A CN110909520A CN 110909520 A CN110909520 A CN 110909520A CN 201911112134 A CN201911112134 A CN 201911112134A CN 110909520 A CN110909520 A CN 110909520A
Authority
CN
China
Prior art keywords
data
preset
file
document
rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911112134.1A
Other languages
Chinese (zh)
Inventor
童彤
卢旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec 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 Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN201911112134.1A priority Critical patent/CN110909520A/en
Publication of CN110909520A publication Critical patent/CN110909520A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The application discloses a document construction method and electronic equipment, wherein the method comprises the following steps: acquiring a preset rule file, wherein the preset rule file comprises a first preset file, a second preset file and a template file; analyzing the first preset file, and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file; analyzing the second preset file, and converting the data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form corresponding target data, wherein the target data is matched with the template document; and adding the target data to a preset position of the template document to generate a target document. According to the document construction method, when the content and the format of the generated target document need to be modified, the content and the format can be modified only by modifying the preset rule file, an application program does not need to be modified, the operation difficulty is low, and the method is easy to implement.

Description

Document construction method and electronic equipment
Technical Field
The present disclosure relates to the field of document construction technologies, and in particular, to a document construction method and an electronic device.
Background
During the daily work of enterprises and public institutions, reports in various document forms, such as project feasibility reports, audit reports, work reports, marketing plans and the like, are often required to be made, and various data, charts and written statements are required to be made in the reports. For the organization which has applied the management information system, the data that these reports need often all have been stored in the database in various information systems, the prior art needs to combine the customized development of the business to the file that outputs each time, if need to modify the file content and format and need to modify the procedure, this results in the reusability of the procedure to be low, it is inconvenient to modify the file content and format.
Taking a Word document as an example, in the prior art, the style of the Word document is mainly controlled by configuring an XML file of the Word document, a query module needs to be developed according to the requirement of a customized template to query data, and then the data is replaced in the XML file to obtain the Word document. The main process is as follows: 1) designing a Word template document; 2) developing an application program interface (api) to obtain data for mapping to a Word template document; 3) replacing XML with data to generate a Word document; then the Word document can be exported and downloaded. The method can only produce Word documents in a single form, has low program reuse rate, and can be realized by personnel of the bottom layer structure of the data Word program when the content and the format of the Word documents need to be modified, so that the modification of the Word documents each time needs to be matched by research personnel, the operation is complex, and the realization is difficult.
Content of application
The application provides a document construction method and electronic equipment, documents with required contents and formats can be conveniently output by using the method, and when the contents and the formats of the output documents are modified, an application program does not need to be modified.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme:
a document construction method, comprising:
acquiring a preset rule file, wherein the preset rule file comprises a first preset file, a second preset file and a template file;
analyzing the first preset file, and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file;
analyzing the second preset file, and converting a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form target data corresponding to the data structure, wherein the target data is matched with the template document;
and adding the target data to a preset position of the template document to generate a target document.
In some embodiments, the first preset rule includes a data obtaining rule and a data processing rule, and the obtaining at least one basic data according to the first preset rule defined in the first preset file includes:
acquiring at least one piece of original data from a specific position according to the data acquisition rule;
and processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
In some embodiments, the converting, according to a second preset rule defined in the second preset file, a data structure of at least one data unit in the base data to form target data corresponding to the data structure of the at least one data unit in the base data includes:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
In some embodiments, the preset position has a second identifier, and the adding the target data to the preset position of the template document includes:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
In some embodiments, further comprising:
acquiring the constructed preset rule file;
and under the condition that the text content of the preset rule file conforms to the grammatical rule of the programming language adopted by the preset rule file, storing the preset rule file.
In some embodiments, further comprising:
and configuring task information so as to obtain the preset rule file appointed by the task information when a trigger condition is met.
An electronic device, comprising:
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a preset rule file, and the preset rule file comprises a first preset file, a second preset file and a template file;
the first analysis module is used for analyzing the first preset file and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file;
the second analysis module is used for analyzing the second preset file, and converting a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form target data corresponding to the data structure, wherein the target data is matched with the template document;
and the generating module is used for adding the target data to a preset position of the template document so as to generate a target document.
In some embodiments, the first preset rule includes a data acquisition rule and a data processing rule, and the first parsing module is specifically configured to:
acquiring at least one piece of original data from a specific position according to the data acquisition rule;
and processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
In some embodiments, the second parsing module is specifically configured to:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
In some embodiments, the preset location has a second identifier, and the generating module is specifically configured to:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
The beneficial effects of the embodiment of the application are that:
the document construction method of the embodiment of the application is characterized in that a preset rule file is constructed in advance, when a target document needs to be generated, basic data are obtained based on a first preset rule defined in a first preset file in the preset rule file, data structure conversion is performed on data units in the basic data based on a second preset rule defined in a second preset file to obtain the target data, and finally the target data are mapped to a preset position in a template document, so that the target document can be generated, and the operation is convenient. Because the preset rule file is not coupled with the application program and directly interacts with the data layer, when the content and the format of the generated target document need to be modified, the modification can be realized only by modifying the preset rule file without modifying the application program, the operation difficulty is low, and the realization is easy.
Drawings
FIG. 1 is a flowchart of a first embodiment of a document construction method according to an embodiment of the present application;
FIG. 2 is a flowchart of the S200 step of the document construction method according to the embodiment of the present application;
FIG. 3 is a schematic page diagram of a template document in the document construction method according to the embodiment of the present application;
FIG. 4 is a flowchart of a second embodiment of a document construction method according to an embodiment of the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Description of reference numerals:
10-a first acquisition module; 20-a first parsing module; 30-a second parsing module; 40-generating module.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present application has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
The embodiment of the application provides a document construction method, which includes acquiring data based on a preset rule defined in a preset rule file constructed in advance, processing the data, mapping the processed data to a template document to generate a target document, directly interacting with a data layer without coupling with an application program, and only modifying the preset rule file without modifying the application program when the content or format of the target document is required to be modified.
Fig. 1 is a flowchart of a first embodiment of a document building method according to an embodiment of the present application, and referring to fig. 1, the document building method according to the embodiment of the present application specifically includes the following steps:
s100, acquiring a preset rule file, wherein the preset rule file comprises a first preset file, a second preset file and a template file.
The preset rule file specifies rules of how to acquire data, rules of how to process the acquired data and template styles of target documents, and at least one target document can be generated based on the preset rule file. The predetermined rule file may be, for example, a file in a zip format, but may also be in other formats. The preset rule file can be one or a plurality of files. The preset rule file may be pre-stored in a predetermined position, and the process of acquiring the preset rule file is a process of calling the corresponding preset rule file from the predetermined position according to the target document generated as required.
S200, analyzing the first preset file, and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file.
Wherein the base data is data obtained from a data source without modifying the data structure. The first preset file defines a first preset rule, where the first preset rule is a rule for acquiring the basic data, such as a data address indicating the acquired basic data, and a data range of the basic data. The first predetermined file may be, for example, a yml format file, and the content of the first predetermined file may be edited in, for example, SQL language, although other formats or other programming languages may also be used.
After the preset rule file is obtained, the first preset file may be first parsed based on a grammar rule of a programming language of text content of the first preset file to obtain a first preset rule, and then, the basic data may be obtained from, for example, a database based on the first preset rule.
S300, analyzing a second preset file, and converting a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form corresponding target data, wherein the target data is matched with the template document.
Since the basic data is data obtained from a database or other data sources without data structure conversion, the meaning of the data is not easy to understand by ordinary users, so that the basic data is not suitable for being directly mapped to the template document, and therefore the data structure conversion is needed to form target data matched with the template document. The base data may include a plurality of data units, each data unit being a data block capable of independent data format conversion and generating corresponding target data.
The second preset file defines a second preset rule, and the second preset rule is used for indicating how to perform data structure conversion on the data units in the basic data. After the basic data is obtained, the second preset file can be analyzed based on the grammar rule of the programming language of the text content of the second preset file to obtain a second preset rule. And then, converting at least one data unit in the basic data based on the second preset rule to obtain target data which is suitable for being directly mapped into the template document and can be matched with the template document. For example, the basic data may include a first data unit, a second data unit, and a third data unit, the first data unit may be converted into words based on a first conversion rule in a second preset rule, the words may be recombined to form new text content, and a format of the new text content may be adjusted to obtain first target data; the second data unit can be converted into a table for example based on a second conversion rule in a second preset rule, and the format of the text can be adjusted to obtain second target data; the third data unit may be converted into, for example, a picture based on a third conversion rule of the second preset rules to obtain third target data. The second predetermined file may be, for example, a yml format file, and the content of the second predetermined file may be edited in, for example, SQL language, although other formats or other programming languages may also be used.
S400, adding the target data to a preset position of the template document to generate a target document.
The template document is a document pre-constructed according to the required data content and document format, and the template document can be a plurality of different types of documents, such as a Word document, an Excel document, a PPT document, a text document or other documents. At least one preset position is reserved in the template document, and the preset position is used for inserting target data to form a target document. As previously mentioned, the target data is a data that is suitable for direct mapping to a preset location in the template document and can be matched to the format and content of the template document. And after the target data is obtained, mapping the target data to a preset position of the template document to generate the target document required by the user. For example, a Word document desired by a user can be formed by inserting text, tables, pictures, and the like into a specific position in a Word template.
The document construction method of the embodiment of the application is characterized in that a preset rule file is constructed in advance, when a target document needs to be generated, basic data are obtained based on a first preset rule defined in a first preset file in the preset rule file, data structure conversion is performed on data units in the basic data based on a second preset rule defined in a second preset file to obtain the target data, and finally the target data are mapped to a preset position in a template document, so that the target document can be generated, and the operation is convenient. Because the preset rule file is not coupled with the application program and directly interacts with the data layer, when the content and the format of the generated target document need to be modified, the modification can be realized only by modifying the preset rule file without modifying the application program, the operation difficulty is low, and the realization is easy.
As shown in fig. 2, in some embodiments, the first preset rule may include a data obtaining rule and a data processing rule, and the obtaining at least one basic data according to the first preset rule defined in the first preset file S200 may include:
s201, acquiring at least one piece of original data from a specific position according to the data acquisition rule;
s202, processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
Raw data is data directly obtained from data sources such as databases, documents, other applications, and the like without processing. The data acquisition rule may include a data address, a data type and a data range of the original data, and the like. After parsing the first preset file, at least one original data may be acquired from a specific location of a specific data source based on a data acquisition rule.
Since the original data is not processed, data units meeting the data structure conversion condition are not formed. For example, when a company report needs to be obtained, the company report may relate to financial data, personnel data, sales data, production data, and the like, and the raw data obtained from each department or corresponding storage location may include financial data, personnel data, sales data, and production data, but the raw data are not associated or aggregated. Accordingly, after determining the content of the target document and the form of the original data, the data processing rules may be constructed in advance. In this way, after the raw data is obtained, the raw data may be processed based on the data processing rules to obtain at least one data unit.
For example, in one embodiment, the process of obtaining at least one basic data based on the first preset rule may be as follows:
Figure BDA0002273025840000081
Figure BDA0002273025840000091
in the above process, the first step and the second step acquire original data and name the original data, that is, add a data identifier, and phase3 and phase4 process the acquired original data based on the data identifier and name the basic data obtained by the process. In the specific implementation process, the type, position and size of the acquired original data and the process of processing the original data can be adjusted according to actual needs.
In some embodiments, S300, the converting, according to a second preset rule defined in the second preset file, a data structure of at least one data unit in the base data to form target data corresponding to the data structure, includes:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
The acquired basic data is data acquired from a data source without data structure conversion, and the data structure of the basic data can be a data structure which is supported by the data source such as a database and is suitable for storage, but the meaning of the basic data is not easily understood by people, the visualization degree is low, and the basic data is not suitable for being directly shown to a user. For example, the basic data corresponding to a table may include multi-row codes, but the meaning of such codes cannot be understood by ordinary users, and the meaning of the codes cannot be really understood by the ordinary users only if a table with ordinary rows and columns is formed.
After the second preset file is parsed, the basic data may be structurally transformed in units of data units based on a second preset rule to form target data corresponding thereto. For example, null in the underlying data may be converted to "no data"; converting the dates in the basic data into a specific date format; converting one or more data units into text may further include combining multiple pieces of text to form a piece of smooth text content. The format of the formed text content may also be adjusted to accommodate the format of the text in the template document. Data units can also be converted into tables based on specific association relations; alternatively, one or more of the data elements may be converted into a picture, although the format of the table and picture may be adjusted to fit the template document.
When the basic data is converted into the target data, a first identifier is also required to be added to the target data, and the first identifier is used for identifying the adding position of the target data in the template document, such as a paragraph inserted in a text document, a position inserted in a picture, and the like. For example, text may be identified as text1, text2 …, pictures may be identified as Picture1, Picture2 …, tables may be identified as table1, table2 …, and so forth. Of course, the specific form of the first identifier may be determined according to actual needs, and is not limited to the above form.
For example, in a specific embodiment, the process of converting the data structure of at least one data unit in the base data according to a second preset rule defined in the second preset file to form the target data corresponding thereto may be as follows:
Figure BDA0002273025840000101
Figure BDA0002273025840000111
Figure BDA0002273025840000121
through the above conversion process, the obtained target data includes text identified as t2, a picture identified as p1, a table identified as table1, and the like.
In some embodiments, the preset position has a second identifier, and the adding the target data to the preset position of the template document includes:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
The template document may be a document pre-constructed according to the required data content and document format, taking a Word document as an example, the template document may include a pre-constructed document structure and a preset position reserved for inserting target data, and the document structure may include, for example, a directory, titles of documents at various levels, fixed text content, fixed headers, footers, and the like.
The second identifier is used to identify a preset position in the template document for inserting the target data, and the second identifier corresponds to the first identifier, for example, the second identifier may be identical to the first identifier, or other corresponding relationships may also be used, as long as the preset position in the template document, where the target data needs to be inserted, can be determined based on the association relationship between the first identifier and the second identifier. For example, the preset locations for inserting text may be identified as text1, text2 …, the preset locations for inserting pictures may be identified as Picture1, Picture2 …, the preset locations for inserting tables may be identified as table1, table2 …, etc.
After the target data are obtained, the target data can be inserted into a correct preset position in the template document by matching the first identification and the second identification, and therefore the target document is generated. In one embodiment, a page of the template document may be as shown in FIG. 3, the page including a secondary heading "1.2 Security overview", a preset location and identification for inserting text (t2), a preset location and identification for inserting pictures (p1), and fixed annotation content. Inserting the aforementioned class identified as t2 into the preset position identified as t2, and inserting the picture identified as p1 into the preset position identified as p1 form a complete target document, and outputting or downloading the target document.
As shown in fig. 4, in some embodiments, the document building method further includes:
acquiring the constructed preset rule file;
and under the condition that the text content of the preset rule file conforms to the grammatical rule of the programming language adopted by the preset rule file, storing the preset rule file.
When a user needs to obtain a target document with specific content and a specific format, a preset rule file needs to be constructed in advance, namely a template document is compiled in advance, and a first preset file and a second preset file are compiled according to data content and a data format which are required to be inserted into the template document and data content of original data which can be obtained. After the three files are acquired, a preset rule file is manufactured and uploaded.
In order to ensure that the preset rule file can be smoothly executed without errors, after the preset rule file which is pre-constructed by a user is obtained, the obtained preset rule file can be checked based on the grammatical rule of the programming language adopted by the text content of the preset rule file. For example, when the programming language of the first rule file and the second rule file of the preset rule file is the SQL language, the first rule file and the second rule file may be checked by using the syntax rules of the SQL language. In the case where the text content of the preset rule file conforms to the grammatical rules of the programming language adopted by the preset rule file, the preset rule file may be stored so that the target document of this type may be output when necessary.
Continuing with FIG. 4, in some embodiments, the document construction method further comprises:
and configuring task information so as to obtain the preset rule file appointed by the task information when a trigger condition is met.
The task is a task for generating a target document, the task information may include a time or a condition for outputting the target document and type information of the document, and a preset rule file for generating the target document may be determined based on the type information of the document. For example, if the personnel department needs to make an attendance report of the last month in 1 day per month, the tasks can be configured on the office system, a preset rule file for constructing the personnel report is selected, and the triggering condition is set to be 1 day per month. When the system time reaches 1 day per month, the task is automatically triggered, and a personnel report is generated based on a preset rule file. Of course, the task may be set as a real-time triggered task or executed when other trigger conditions are met.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present application, and referring to fig. 5, the electronic device according to the embodiment of the present application includes:
the system comprises a first obtaining module 10, a first storage module and a second storage module, wherein the first obtaining module is used for obtaining a preset rule file, and the preset rule file comprises a first preset file, a second preset file and a template document;
a first parsing module 20, configured to parse the first preset file, and obtain at least one piece of basic data according to a first preset rule defined in the first preset file;
a second parsing module 30, configured to parse the second preset file, and convert a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form target data corresponding to the data structure, where the target data is matched with the template document;
and the generating module 40 is configured to add the target data to a preset position of the template document to generate a target document.
In some embodiments, the first preset rule includes a data obtaining rule and a data processing rule, and the first parsing module 20 is specifically configured to:
acquiring at least one piece of original data from a specific position according to the data acquisition rule;
and processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
In some embodiments, the second parsing module 30 is specifically configured to:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
In some embodiments, the preset location has a second identifier, and the generating module 40 is specifically configured to:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
In some embodiments, further comprising:
the second acquisition module is used for acquiring the constructed preset rule file;
and the checking module is used for storing the preset rule file under the condition that the text content of the preset rule file conforms to the grammar rule of the programming language adopted by the preset rule file.
In some embodiments, further comprising:
and the configuration module is used for configuring the task information so as to acquire the preset rule file appointed by the task information when the task information meets the triggering condition.
The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.

Claims (10)

1. A document construction method, comprising:
acquiring a preset rule file, wherein the preset rule file comprises a first preset file, a second preset file and a template file;
analyzing the first preset file, and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file;
analyzing the second preset file, and converting a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form target data corresponding to the data structure, wherein the target data is matched with the template document;
and adding the target data to a preset position of the template document to generate a target document.
2. The document building method according to claim 1, wherein the first preset rule includes a data obtaining rule and a data processing rule, and the obtaining at least one basic data according to the first preset rule defined in the first preset file includes:
acquiring at least one piece of original data from a specific position according to the data acquisition rule;
and processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
3. The document building method according to claim 2, wherein the converting, according to a second preset rule defined in the second preset file, the data structure of at least one data unit in the basic data to form target data corresponding to the data structure of the at least one data unit comprises:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
4. The document building method according to claim 3, wherein the preset position has a second identifier, and the adding the target data to the preset position of the template document comprises:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
5. The document building method according to claim 1, further comprising:
acquiring the constructed preset rule file;
and under the condition that the text content of the preset rule file conforms to the grammatical rule of the programming language adopted by the preset rule file, storing the preset rule file.
6. The document building method according to claim 1, further comprising:
and configuring task information so as to obtain the preset rule file appointed by the task information when a trigger condition is met.
7. An electronic device, comprising:
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a preset rule file, and the preset rule file comprises a first preset file, a second preset file and a template file;
the first analysis module is used for analyzing the first preset file and acquiring at least one piece of basic data according to a first preset rule defined in the first preset file;
the second analysis module is used for analyzing the second preset file, and converting a data structure of at least one data unit in the basic data according to a second preset rule defined in the second preset file to form target data corresponding to the data structure, wherein the target data is matched with the template document;
and the generating module is used for adding the target data to a preset position of the template document so as to generate a target document.
8. The electronic device according to claim 7, wherein the first preset rule includes a data acquisition rule and a data processing rule, and the first parsing module is specifically configured to:
acquiring at least one piece of original data from a specific position according to the data acquisition rule;
and processing the original data based on the data processing rule to obtain basic data meeting the conversion condition.
9. The electronic device of claim 8, wherein the second parsing module is specifically configured to:
converting the data structure of at least one data unit in the basic data according to the second preset rule to form corresponding target data;
adding a first identifier to the target data, wherein the first identifier is used for identifying the adding position of the target data in the template document.
10. The electronic device of claim 9, wherein the preset location has a second identifier, and the generating module is specifically configured to:
and adding the target data to the preset position where the first identifier is matched with the second identifier.
CN201911112134.1A 2019-11-14 2019-11-14 Document construction method and electronic equipment Pending CN110909520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911112134.1A CN110909520A (en) 2019-11-14 2019-11-14 Document construction method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911112134.1A CN110909520A (en) 2019-11-14 2019-11-14 Document construction method and electronic equipment

Publications (1)

Publication Number Publication Date
CN110909520A true CN110909520A (en) 2020-03-24

Family

ID=69817543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911112134.1A Pending CN110909520A (en) 2019-11-14 2019-11-14 Document construction method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110909520A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560423A (en) * 2020-12-22 2021-03-26 北京来也网络科技有限公司 Document processing method, device, equipment and medium combining RPA and AI
CN114329262A (en) * 2021-12-20 2022-04-12 江苏云工场信息技术有限公司 CDN-based dynamic document generation method and device
CN117056539A (en) * 2023-10-13 2023-11-14 一网互通(北京)科技有限公司 Method and device for generating pptx format file in real time and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598635A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Automatic complex document generating method based on XML (Extensive Markup Language) description
US20170154019A1 (en) * 2015-11-30 2017-06-01 Open Text Sa Ulc Template-driven transformation systems and methods
CN107644027A (en) * 2016-07-20 2018-01-30 江苏云媒数字科技有限公司 A kind of hypermedia metadata synthesis and converting system
CN109298861A (en) * 2018-10-19 2019-02-01 中国银行股份有限公司 A kind of method and device automatically generating file according to interface document
CN109388612A (en) * 2018-09-14 2019-02-26 中国科学院光电研究院 A kind of method, equipment, system and the medium of data summarization document structure tree

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598635A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Automatic complex document generating method based on XML (Extensive Markup Language) description
US20170154019A1 (en) * 2015-11-30 2017-06-01 Open Text Sa Ulc Template-driven transformation systems and methods
CN107644027A (en) * 2016-07-20 2018-01-30 江苏云媒数字科技有限公司 A kind of hypermedia metadata synthesis and converting system
CN109388612A (en) * 2018-09-14 2019-02-26 中国科学院光电研究院 A kind of method, equipment, system and the medium of data summarization document structure tree
CN109298861A (en) * 2018-10-19 2019-02-01 中国银行股份有限公司 A kind of method and device automatically generating file according to interface document

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560423A (en) * 2020-12-22 2021-03-26 北京来也网络科技有限公司 Document processing method, device, equipment and medium combining RPA and AI
CN114329262A (en) * 2021-12-20 2022-04-12 江苏云工场信息技术有限公司 CDN-based dynamic document generation method and device
CN114329262B (en) * 2021-12-20 2022-07-26 江苏云工场信息技术有限公司 CDN-based dynamic document generation method and device
CN117056539A (en) * 2023-10-13 2023-11-14 一网互通(北京)科技有限公司 Method and device for generating pptx format file in real time and electronic equipment
CN117056539B (en) * 2023-10-13 2024-01-02 一网互通(北京)科技有限公司 Method and device for generating pptx format file in real time and electronic equipment

Similar Documents

Publication Publication Date Title
US11210456B2 (en) Method relating to preparation of a report
US8214401B2 (en) Techniques for automated generation of ontologies for enterprise applications
US7979793B2 (en) Graphical creation of a document conversion template
CN110909520A (en) Document construction method and electronic equipment
US8438190B2 (en) Generating web services from business intelligence queries
US8086592B2 (en) Apparatus and method for associating unstructured text with structured data
US8275775B2 (en) Providing web services from business intelligence queries
CN107145480B (en) Method for compiling XBRL report based on Word
US11093520B2 (en) Information extraction method and system
US20140258840A1 (en) Xml based custom code generating method and generator, computer program product and computer readable medium
CN101944082A (en) Excel-like report processing method
US6374270B1 (en) Corporate disclosure and repository system utilizing inference synthesis as applied to a database
CN109241384B (en) Scientific research information visualization method and device
CN107506383B (en) Audit data processing method and computer equipment
CN109408043A (en) A kind of program creating method and device
WO2020139079A1 (en) System and method for analyzing heterogeneous data by utilizing data virtualization components
US8099663B2 (en) Apparatus and method for document synchronization
CN112131289A (en) Data processing method and device, electronic equipment and storage medium
US20130144896A1 (en) Method of integrating data of xml document with database on web
Lagoze et al. Data management of confidential data
CN111190965A (en) Text data-based ad hoc relationship analysis system and method
US20060242169A1 (en) Storing and indexing hierarchical data spatially
CN109657010B (en) Document processing method, device and storage medium
CN113822025A (en) Office file automatic generation method, device, equipment and storage medium
US20200278981A1 (en) Information processing device and non-transitory computer readable 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