CN113095041A - Document generation method and device, electronic equipment and computer readable storage medium - Google Patents

Document generation method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113095041A
CN113095041A CN202110397825.1A CN202110397825A CN113095041A CN 113095041 A CN113095041 A CN 113095041A CN 202110397825 A CN202110397825 A CN 202110397825A CN 113095041 A CN113095041 A CN 113095041A
Authority
CN
China
Prior art keywords
file
field
target
data
template
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
CN202110397825.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110397825.1A priority Critical patent/CN113095041A/en
Publication of CN113095041A publication Critical patent/CN113095041A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • 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

Abstract

The disclosure provides a document generation method, which can be used in the technical field of finance. The method comprises the following steps: acquiring a first file, wherein the first file comprises a DSR file; acquiring a target template; acquiring target data from the first file based on the target template; and writing the target data to the target template to generate a second file, the second file comprising a markdown file. The present disclosure also provides an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

Description

Document generation method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of financial technologies, and in particular, to a document generation method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
Markdown, as a lightweight markup language, has good readability. Markdown documents have been widely used in a variety of application scenarios requiring user editing input. The Markdown document can be conveniently converted into html format documents, i.e., web documents, pdf documents and other more intuitive format documents, and certainly, word documents, web documents and other format documents with stronger presentation styles may be converted into the Markdown document according to the actual requirements of users.
Disclosure of Invention
One aspect of the present disclosure provides a document generation method, including: obtaining a first file, wherein the first file comprises a DSR file; acquiring a target template; acquiring target data from the first file based on the target template; and writing the target data into the target template to generate a second file, wherein the second file comprises a markdown file.
Optionally, acquiring target data from the first file based on the target template includes: determining at least one field defined in the target template; acquiring the target data from the first file based on the at least one field; the method further comprises the following steps: before writing the target data into the target template, storing the target data acquired from the first file into a designated storage space according to a corresponding relationship between fields and storage areas, wherein the designated storage space comprises at least one storage area, and the at least one storage area is in one-to-one correspondence with the at least one field.
Optionally, writing the target data into the target template includes: and writing the target data stored in the designated storage space into each field defined on the target template according to the corresponding relation between the field and the storage area.
Optionally, the specified storage space is created by: creating the at least one storage area corresponding to the at least one field one by one; and defining the at least one storage area as the designated storage space.
Optionally, creating the at least one storage area in one-to-one correspondence with the at least one field includes: creating at least one first storage area aiming at a first type field in the at least one field, wherein data filled in the first type field does not need to be converted; and/or creating at least one second storage area aiming at a second type field in the at least one field, wherein the data filled in the second type field needs to be subjected to data conversion.
Optionally, the method further comprises: and updating the target template.
Another aspect of the present disclosure provides a document apparatus, including:
the device comprises a first file acquisition module, a second file acquisition module and a file processing module, wherein the first file acquisition module is used for acquiring a first file, and the first file comprises a DSR file; the template acquisition module is used for acquiring a target template; the data extraction module is used for acquiring target data from the first file based on the target template; and a second file acquisition module, configured to write the target data into the target template to generate a second file, where the second file includes a markdown file.
Another aspect of the present disclosure provides an electronic device including: one or more processors; memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods of embodiments of the present disclosure.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, implement the method of embodiments of the present disclosure.
Another aspect of the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the method of an embodiment of the present disclosure.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario suitable for a document generation method and apparatus according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow diagram of a document generation method according to an embodiment of the disclosure;
FIG. 3 schematically shows a flow diagram of a document generation method according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a document generation method according to yet another embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram of a document generation method according to yet another embodiment of the present disclosure;
FIG. 6 schematically illustrates a schematic diagram of a document generation method according to an embodiment of the disclosure;
FIG. 7 schematically shows a block diagram of a document generation apparatus according to an embodiment of the present disclosure; and
FIG. 8 schematically shows a block diagram of an electronic device suitable for a document generation method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
An embodiment of the present disclosure provides a document generating method and a document generating apparatus capable of applying the method, including: obtaining a first file, wherein the first file comprises a DSR file; acquiring a target template; acquiring target data from the first file based on the target template; and writing the target data into the target template to generate a second file, wherein the second file comprises a markdown file.
Fig. 1 schematically illustrates an application scenario 100 of a document generation method and a document generation apparatus according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a document generating apparatus of an embodiment of the present disclosure.
Generally, when the second file needs to be generated, the document generating device is called to generate the second file. Wherein, according to the embodiment of the present disclosure, when the document generating device 110 is invoked, the first file 101 is acquired, and the target template 102 is also acquired. The first file 101 in this disclosure may be a file in the suffix-DSR format, which is referred to in this disclosure as a DSR file. The document generating device 110 acquires the target data 103 from the first file based on the target template 102, and generates the second file 104 based on the target data 103. The second file 104 may be a markdown document in embodiments of the present disclosure. The document generating apparatus 110 may be embodied as the document generating apparatus 700, or the electronic device 800, or the computer-readable storage medium, or the computer program, or the like, which will be described below. A
The document creation device 110 may execute the document creation method of the embodiment of the present disclosure to create a document. Firstly, a first file 101 and a target template 102 are obtained; then acquiring target data 102 from the first file 101 based on the target template 102; finally, the target data 102 is written into the target template 103, and a second file 104 is generated.
According to an embodiment of the present disclosure, the generated second file may be applied to a domestic market or an overseas market. The target template applied to the domestic market is different from the target template applied to the overseas market. The target data extracted based on different target templates are also different, and further the second files generated by adopting different target data are also different. Therefore, the condition that the target data is extracted by adopting the target template of the domestic market in the overseas market is avoided, and further the generated second file is prevented from generating messy codes. And particularly, scrambling codes of markdown files can be prevented.
According to the embodiment of the disclosure, the markdown file is generated based on the target template, the process of developing the write document is simplified, and the markdown file meeting the requirements of overseas market application formats is quickly generated.
The document generation method and the document generation apparatus according to the embodiment of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field, and the present disclosure is not limited thereto.
FIG. 2 schematically shows a flow diagram of a document generation method according to an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S210 to S240.
In operation S210, a first file is acquired, wherein the first file includes a DSR file.
In operation S220, a target template is acquired.
In operation S230, target data is acquired from a first file based on a target template.
In operation S240, the target data is written to the target template to generate a second file, wherein the second file includes a markdown file.
For example, a DSR file may be acquired from a server host in operation S210.
For example, the jar package tool of Eclipse software may be employed to extract target data from the DSR file at operation S230. For example, DsrReader in the jar package tool is employed to extract the target data from the DSR file.
For example, in operation S240, the target data may be written into the target template by using the jar package tool of Eclipse software, so as to generate a second file. For example, the DsrTable in the jar package tool is used to write the target data into the target template, and then the MDFileWriter generates a markdown file from the target template in which the target data is written.
According to the embodiment of the disclosure, the target data is extracted according to the target template, and then the target data is written into the target template to generate the markdown document, so that the usable interface document which accords with the specification of the corresponding region can be generated, and the condition that the interface document has messy codes due to the fact that the template is not suitable is avoided.
The method illustrated in fig. 2 is further described with reference to fig. 3 in conjunction with specific embodiments.
As shown in fig. 3, in the document generating method according to another embodiment of the present disclosure, operation S230 may include operation S331 and operation S332, and operation S333 may be included between operation S230 and operation S240.
In operation S331, at least one field defined in the target template is determined.
For example, fields such as "account name", "account opening information", and the like are defined in the target template.
In operation S332, target data is acquired from the first file based on the at least one field.
For example, according to the 'account name' field defined in the target template, the data corresponding to the 'account name' is extracted from the DSR file accordingly. Concurrently or thereafter, data corresponding to the fields is extracted from the DSR file accordingly, based on other fields defined in the target template. And summarizing the data to obtain target data.
In operation S333, the target data obtained from the first file is stored in a designated storage space according to a correspondence relationship between the fields and the storage areas, where the designated storage space includes at least one storage area, and the at least one storage area is in one-to-one correspondence with the at least one field.
For example, the target data includes data of "account name", and the data of "account name" is stored in a designated storage space corresponding to the "account name" in the storage area. And simultaneously or then, storing other fields in the target data into the specified storage space according to the corresponding relation between the fields and the storage areas.
The method illustrated in fig. 2 is further described with reference to fig. 4 in conjunction with specific embodiments.
As shown in fig. 4, in a document generating method according to another embodiment of the present disclosure, operation S240 may include operation S441 and operation S442.
In operation S441, the target data stored in the designated storage space is written in each field defined on the target template according to the correspondence between the field and the storage area.
For example, data including an "account name" in the target data is stored in the designated storage space, a "account name" field is included in a field defined on the target template, and the "account name" field defined on the target template is written in accordance with a correspondence relationship between the field and the storage area. And simultaneously or then writing the data of other fields in the target data into other fields defined on the target template according to the corresponding relation between the fields and the storage area.
In operation S442, a second file is generated.
The method illustrated in fig. 2 is further described with reference to fig. 5 in conjunction with specific embodiments.
As shown in fig. 5, in the document generating method according to another embodiment of the present disclosure, the designation of the storage space in operation S333 is implemented by operation S531 and operation S532,
in operation S531, at least one memory area corresponding to at least one field one-to-one is created.
For example, a storage area corresponding to the "account name" field is created for storing data of the "account name" field; and creating another storage area corresponding to the 'account opening information' field for storing the data of the 'account opening information' field.
In operation S532, at least one storage area is defined as a designated storage space.
In an embodiment of the present disclosure, when the operation S531 creates at least one storage area corresponding to the at least one field one-to-one, at least one first storage area is created for a first type field of the at least one field, where data conversion is not required to fill in the first type field.
For example, the "account balance" is defined as a first type field, and data conversion is not required when data of "account opening information" is written in the target template.
In an embodiment of the present disclosure, when the operation S531 creates at least one storage area corresponding to the at least one field one-to-one, for a second type field in the at least one field, at least one second storage area is created, where data filled in the second type field needs to be subjected to data conversion.
For example, the "account name" is defined as a second type field, and data conversion is required when data of the "account name" is written into the target template. For example, the data of "account name" is a certain ABC, a certain chinese, and an ABC is a corresponding english name; when the ABC-free water-based paint is applied to overseas markets, the ABC-free water-based paint is converted into ABC so as to meet the requirements of the overseas markets; when the method is applied to the domestic market, the method should be converted into a certain one so as to meet the requirements of the domestic market.
In an embodiment of the present disclosure, the target template is updated.
For example, the probability of a certain field appearing is greatly increased, the field may be added to the field defined by the target template, and further, the corresponding field and the data of the field may appear in the second file.
FIG. 6 schematically shows a schematic diagram of a document generation method according to an embodiment of the disclosure.
As shown in FIG. 6, target data is extracted from a first file 610 based on a field corresponding to at least one storage area in a designated storage space 620, the first file 610 having corresponding fields, data corresponding to the fields, and other fields. The target data extracted from the first file 610 is stored into at least one storage area of the designated storage space 620, for example, into the storage area a 621 and the storage area B622, respectively. The data in the at least one memory area is then written into at least one field defined in the target template 630, e.g., the data of memory area A621 is written into field A631 of the target template 630, and the data of memory area B622 is written into field B632 of the target template 630. A second file 640 is then generated from the target template 630.
As shown in fig. 6, at least one memory area is created based on at least one field defined in the target template 630, the at least one memory area corresponding to the at least one field one-to-one, and the designated memory space is constituted by the at least one memory area. For example, the memory area a 621 is established based on the field a 631, and the memory area B622 is established based on the field B632.
FIG. 7 schematically shows a block diagram of a document creation apparatus according to an embodiment of the disclosure.
As shown in fig. 7, the apparatus 700 applied to document generation includes a first file obtaining module 710, a template obtaining module 720, a data extracting module 730, and a second file obtaining module 740. The document generating apparatus may perform the method described above with reference to the method embodiment, and is not described herein again.
A first file obtaining module 710, configured to obtain a first file, where the first file includes a DSR file; a template obtaining module 720, configured to obtain a target template; a data extraction module 730, configured to obtain target data from the first file based on the target template; and a second file obtaining module 740, configured to write the target data into the target template to generate a second file, where the second file includes a markdown file.
In an embodiment of the present disclosure, the data extraction module 730 may include: a template field acquisition submodule and a field data acquisition submodule. And the template field acquisition submodule is used for determining at least one field defined in the target template. And the field data acquisition submodule is used for acquiring target data from the first file based on at least one field.
In the embodiment of the present disclosure, the document generating apparatus may include a field data storage module in addition to the first file obtaining module 710, the template obtaining module 720, the data extracting module 730, and the second file obtaining module 740, the data extracting module 730 may include a template field obtaining sub-module and a field data obtaining sub-module, and the document generating apparatus may further include a field data storage module. And the field data storage module is used for storing the target data acquired from the first file into an appointed storage space according to the corresponding relation between the field and the storage area, wherein the appointed storage space comprises at least one storage area, and the at least one storage area corresponds to the at least one field I.
In an embodiment of the present disclosure, the field data storage module may include a storage area creation submodule and a specified storage space definition submodule. And the storage area creating submodule is used for creating at least one storage area corresponding to at least one field one by one. And the specified storage space definition submodule is used for defining at least one storage area as a specified storage space.
In an embodiment of the present disclosure, the storage area creating sub-module may include a first storage area creating sub-unit, configured to create at least one first storage area for a first type field in at least one field when creating at least one storage area corresponding to the at least one field one to one, where data conversion is not required to fill in data in the first type field.
In an embodiment of the present disclosure, the storage area creating sub-module may include a second storage area creating sub-unit, configured to create at least one second storage area for a second type field in the at least one field when creating at least one storage area corresponding to the at least one field one to one, where data filled in the second type field needs to be subjected to data conversion.
In an embodiment of the disclosure, the second file obtaining module 740 may include a template writing sub-module and a file generating sub-module. And the template writing submodule is used for writing the target data stored in the designated storage space into each field defined on the target template according to the corresponding relation between the field and the storage area. And the file generation submodule is used for generating a second file.
In an embodiment of the present disclosure, the document generating apparatus may include a template updating module in addition to the first file obtaining module 710, the template obtaining module 720, the data extracting module 730, and the second file obtaining module 740. And the template updating module is used for updating the target template.
It should be noted that the embodiments of the apparatus portion and the method portion are similar to each other, and the achieved technical effects are also similar to each other, which are not described herein again.
Any of the modules, units, or at least part of the functionality of any of them according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules and units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, units according to the embodiments of the present disclosure may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by any other reasonable means of hardware or firmware by integrating or packaging the circuits, or in any one of three implementations of software, hardware and firmware, or in any suitable combination of any of them. Alternatively, one or more of the modules, units according to embodiments of the present disclosure may be implemented at least partly as computer program modules, which, when executed, may perform the respective functions.
For example, any plurality of the first file obtaining module 710, the template obtaining module 720, the data extracting module 730, and the second file obtaining module 740 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first file obtaining module 710, the template obtaining module 720, the data extracting module 730, and the second file obtaining module 740 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or implemented by a suitable combination of any of them. Alternatively, at least one of the first file obtaining module 710, the template obtaining module 720, the data extracting module 730 and the second file obtaining module 740 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
FIG. 8 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, electronic device 800 includes a processor 810, a computer-readable storage medium 820. The electronic device 800 may perform a method according to an embodiment of the disclosure.
For example, processor 810 may include, for example, a general purpose microprocessor, an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 810 may also include on-board memory for caching purposes. Processor 810 may be a single processing unit or a plurality of processing units for performing different actions of a method flow according to embodiments of the disclosure.
Computer-readable storage medium 820, for example, may be a non-volatile computer-readable storage medium, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 820 may include a computer program 821, which computer program 821 may include code/computer-executable instructions that, when executed by the processor 810, cause the processor 810 to perform a method according to an embodiment of the present disclosure, or any variation thereof.
The computer program 821 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 821 may include one or more program modules, including, for example, module 821A, module 821B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, and when the program modules are executed by the processor 810, the processor 810 may execute the method according to the embodiment of the present disclosure or any variation thereof.
According to an embodiment of the present disclosure, at least one of the first file obtaining module 710, the template obtaining module 720, the data extracting module 730, and the second file obtaining module 740 may be implemented as a computer program module described with reference to fig. 8, which, when executed by the processor 810, may implement the respective operations described above.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that while the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (10)

1. A document generation method, comprising:
obtaining a first file, wherein the first file comprises a DSR file;
acquiring a target template;
acquiring target data from the first file based on the target template; and
and writing the target data into the target template to generate a second file, wherein the second file comprises a markdown file.
2. The method of claim 1, wherein:
acquiring target data from the first file based on the target template, wherein the acquisition comprises the following steps:
determining at least one field defined in the target template;
acquiring the target data from the first file based on the at least one field;
the method further comprises the following steps: prior to writing the target data to the target template,
and storing the target data acquired from the first file into a designated storage space according to the corresponding relation between the fields and the storage areas, wherein the designated storage space comprises at least one storage area, and the at least one storage area is in one-to-one correspondence with the at least one field.
3. The method of claim 2, wherein writing the target data to the target template comprises:
and writing the target data stored in the designated storage space into each field defined on the target template according to the corresponding relation between the field and the storage area.
4. The method of claim 2, wherein the specified storage space is created by:
creating the at least one storage area corresponding to the at least one field one by one; and
defining the at least one storage area as the designated storage space.
5. The method of claim 4, wherein creating the at least one memory area in one-to-one correspondence with the at least one field comprises:
creating at least one first storage area aiming at a first type field in the at least one field, wherein data filled in the first type field does not need to be converted; and/or
And creating at least one second storage area aiming at a second type field in the at least one field, wherein the data filled in the second type field needs to be subjected to data conversion.
6. The method of claim 1, wherein the method further comprises:
and updating the template.
7. A document generation apparatus comprising:
the device comprises a first file acquisition module, a second file acquisition module and a file processing module, wherein the first file acquisition module is used for acquiring a first file, and the first file comprises a DSR file;
the template acquisition module is used for acquiring a target template;
the data extraction module is used for acquiring target data from the first file based on the target template; and
and the second file acquisition module is used for writing the target data into the target template to generate a second file, wherein the second file comprises a markdown file.
8. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-6.
9. A computer-readable storage medium storing computer-executable instructions for implementing the method of any one of claims 1 to 6 when executed.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
CN202110397825.1A 2021-04-13 2021-04-13 Document generation method and device, electronic equipment and computer readable storage medium Pending CN113095041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110397825.1A CN113095041A (en) 2021-04-13 2021-04-13 Document generation method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110397825.1A CN113095041A (en) 2021-04-13 2021-04-13 Document generation method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113095041A true CN113095041A (en) 2021-07-09

Family

ID=76677025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110397825.1A Pending CN113095041A (en) 2021-04-13 2021-04-13 Document generation method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113095041A (en)

Similar Documents

Publication Publication Date Title
US9075833B2 (en) Generating XML schema from JSON data
CN107644286B (en) Workflow processing method and device
US7886222B2 (en) Converter-tool for a non-programmer user, to generate a web based application
US8074167B2 (en) Cross domain presence of web user interface and logic
CN110888720A (en) Task processing method and device, computer equipment and storage medium
CN111221521A (en) Method and device for generating log code, computer system and readable storage medium
US10506017B2 (en) Manipulation of PDF file content through HTTP requests
CN110716714B (en) Component creation method, device, computer system and computer readable storage medium
US20150347353A1 (en) Document layering platform
CN111880813B (en) Method for realizing android card UI (user interface) and storage medium
CN113703862A (en) Configuration-based interface calling method, device, equipment and storage medium
US10567472B2 (en) Manipulation of PDF files using HTML authoring tools
CN111124481A (en) Installation package generation method and device of webpage application program, storage medium and equipment
CN110020370B (en) Method and device for realizing animation in client application and framework of animation script
KR101419759B1 (en) Electronic document driving apparatus and method for executing undo
CN113095041A (en) Document generation method and device, electronic equipment and computer readable storage medium
US20240005640A1 (en) Synthetic document generation pipeline for training artificial intelligence models
US10599406B2 (en) Generating executable files through compiler optimization
CN110647371A (en) Multi-language resource file analysis method and system based on service configuration
CN114625379A (en) H5 project source code generation method and H5 project source code development system
CN113656041A (en) Data processing method, device, equipment and storage medium
CN110737642B (en) Database information analysis method, database information analysis device, computer device and storage medium
CN114253536A (en) Calling method of interface design component, terminal device and readable storage medium
US20150370819A1 (en) Computer Implemented System and Method for Comparing At Least Two Visual Programming Language Files
CN114115871A (en) Page data embedding method and device, storage medium and electronic equipment

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