CN114004211A - Document template generation method, processing method, device, computer equipment and medium - Google Patents

Document template generation method, processing method, device, computer equipment and medium Download PDF

Info

Publication number
CN114004211A
CN114004211A CN202111640364.2A CN202111640364A CN114004211A CN 114004211 A CN114004211 A CN 114004211A CN 202111640364 A CN202111640364 A CN 202111640364A CN 114004211 A CN114004211 A CN 114004211A
Authority
CN
China
Prior art keywords
template
static
data set
document
processed
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
CN202111640364.2A
Other languages
Chinese (zh)
Other versions
CN114004211B (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.)
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Original Assignee
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
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 Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch filed Critical Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Priority to CN202111640364.2A priority Critical patent/CN114004211B/en
Publication of CN114004211A publication Critical patent/CN114004211A/en
Application granted granted Critical
Publication of CN114004211B publication Critical patent/CN114004211B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application relates to a document template generation method, a document template processing device, computer equipment and a medium. The generation method comprises the following steps: receiving a static template uploaded by a first terminal, wherein the static template comprises an object to be processed; receiving an analysis result obtained by developing and analyzing the static template; configuring a corresponding data set for each object to be processed according to the analysis result; and establishing the configured data set and the static template relation, wherein the data set and the static template are used for generating a document template when the template is used. The method can improve the development efficiency.

Description

Document template generation method, processing method, device, computer equipment and medium
Technical Field
The present application relates to the field of research and development technologies, and in particular, to a document template generation method, a document template processing apparatus, a computer device, and a medium.
Background
With the development of computer technology, there are different customization requirements and different business requirements for documents.
In the conventional art, the process of customizing documents includes: the business provides a document format, a word, pdf or paper document format, the technology communicates with the business in detail according to the document format, and finally, a document development tool is used for development.
However, developing or reconstructing a new version of the document requires a great deal of effort on the part of the user and the IT implementation to communicate details, resulting in a long development period and often difficulty in achieving the desired effect of the user. The aging cannot be guaranteed.
Disclosure of Invention
In view of the above, it is desirable to provide a document template generating method, a processing method, an apparatus, a computer device, and a medium capable of improving development efficiency.
A document template generation method comprises the following steps:
receiving a static template uploaded by a first terminal, wherein the static template comprises an object to be processed;
receiving an analysis result obtained by developing and analyzing the static template;
configuring a corresponding data set for each object to be processed according to the analysis result;
and establishing the configured data set and the static template relation, wherein the data set and the static template are used for generating a document template when the template is used.
In one embodiment, the configuring, according to the parsing result, a corresponding data set for each object to be processed includes:
and storing the static template in a data table main table, and configuring a data set corresponding to each object to be processed in a database access statement mode.
In one embodiment, the establishing the configured data set and the static template relationship comprises:
performing unit test on the generated document template;
and when the unit test is successful, issuing the document template.
In one embodiment, after receiving the static template uploaded by the first terminal, the method further includes:
receiving basic information of the static template uploaded by the first terminal;
and configuring the attribute of the static template according to the basic information.
In one embodiment, the basic information includes at least one of a product, a service, and a process node; configuring the attribute of the static template according to the basic information, including:
and configuring routing information of the static template according to the basic information, and classifying and storing the static template according to the basic information.
In one embodiment, the basic information includes a valid time; configuring the attribute of the static template according to the basic information, including:
and configuring the effective time of the static template according to the effective time.
A document template processing method comprises the following steps:
receiving a template selection instruction sent by a first terminal;
obtaining a static template according to the template selection instruction, and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format;
acquiring a data set corresponding to the object to be processed;
and filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
In one embodiment, the analyzing the static template to obtain a target template includes:
analyzing the static template to obtain a document object, and acquiring the document content of the document object;
analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object;
and analyzing the text object to obtain an object to be processed.
In one embodiment, the analyzing the static template to obtain a target template includes:
judging whether the static template has nesting or not;
and if so, analyzing the nested templates from outside to inside in sequence.
In one embodiment, the acquiring the data set corresponding to the object to be processed includes:
reading a database access statement corresponding to the object to be processed;
and embedding a data set type parameter when the database access statement is executed so as to read the corresponding data set.
In one embodiment, the populating the acquired data set to the corresponding location in the template format includes:
acquiring a picture node corresponding to an object to be processed;
and filling the data set corresponding to the picture node into the picture node by a preset method.
In one embodiment, the obtaining a static template according to the template selection instruction includes:
acquiring routing information according to the template selection instruction;
and reading a static template from the classification corresponding to the routing information.
A document template generation apparatus, the document template generation apparatus comprising:
the first receiving module is used for receiving a static template uploaded by a first terminal, and the static template comprises an object to be processed;
the second receiving module is used for receiving an analysis result obtained by developing and analyzing the static template;
the configuration module is used for configuring a corresponding data set for each object to be processed according to the analysis result;
and the establishing module is used for establishing the configured data set and the static template relationship, and the data set and the static template are used for generating a document template when the template is used.
A document template processing apparatus, comprising:
the third receiving module is used for receiving the template selection instruction sent by the first terminal;
the analysis module is used for obtaining a static template according to the template selection instruction and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format;
the data set acquisition module is used for acquiring a data set corresponding to the object to be processed;
and the filling module is used for filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the above embodiments when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the document template generation method, the document template processing method, the document template generation device, the document template processing device, the computer equipment and the document template medium, the static template is uploaded by the first terminal, and the static template comprises the objects to be processed, so that research and development only need to analyze the static template to obtain the objects to be processed, data set configuration is conducted on each object to be processed, the content of the template does not need to be researched and developed and operated for many times, the communication time is shortened, and the research and development efficiency of the document template is improved.
Drawings
FIG. 1 is a diagram of an application environment for a document template generation and processing method in one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a method for document template generation in one embodiment;
FIG. 3 is a diagram illustrating basic information in one embodiment;
FIG. 4 is a flowchart illustrating a method for processing a document template according to one embodiment;
FIG. 5 is a diagram of routing information in one embodiment;
FIG. 6 is a flowchart illustrating a method for generating a document template according to another embodiment;
FIG. 7 is a block diagram showing the configuration of a document template creating apparatus according to an embodiment;
FIG. 8 is a block diagram showing the structure of a document template processing apparatus according to one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The document template generation and processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the first terminal 102 communicates with the server 104 via a network. The first terminal 102 uploads a static template to the server 104, the static template includes objects to be processed, so that the server 104 receives an analysis result obtained by developing and analyzing the static template, and thus, a corresponding data set is configured for each object to be processed according to the analysis result, a configured data set and static template relationship are established, and the data set and the static template are used for generating a document template when the template is used. The static template comprises the object to be processed, so that the object to be processed is obtained only by analyzing the static template in research and development, and the data set configuration is carried out on each object to be processed, the contents of the template do not need to be discussed for many times in research and development and business, the communication time is shortened, and the research and development efficiency of the document template is improved. The first terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a document template generating method is provided, which is described by taking the application of the method to the terminal in fig. 1 as an example, and includes the following steps:
s202: and receiving a static template uploaded by the first terminal, wherein the static template comprises an object to be processed.
Specifically, the static template is a template including an image to be processed, where the static template is a template without specific data based on a document template rendered during formal use, that is, the static template is a template that has been set by a user and only has no specific data, and gives details of the static template, including a format and each object to be processed therein. The format of the static template can be understood as the printing format of the static template, such as doc, pdf, etc., and each object to be processed of the static template can include, but is not limited to, fields, tables, and embedded objects, where the embedded objects include pictures, xls, docx, pdf, etc. The embedded object analysis generally includes picture analysis and document analysis.
Therefore, the user can set the static template at the first terminal according to the service requirement without communicating with the development for many times, and the development only needs to be carried out according to the static template set by the user at last, such as setting a data set and the like, so that the communication is reduced, and the processing efficiency is improved.
S204: and receiving an analysis result obtained by developing and analyzing the static template.
In particular, the parsing of the static template in this embodiment is parsed by the development, wherein the parsing may be a manual parsing or an automatic parsing by the server. For example, a manual analysis static template is developed to obtain each object to be processed. Or analyzing the static model through a server, for example, analyzing the static template by the server to obtain a document object, and obtaining document contents of the document object; analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object; and finally, analyzing the text object to obtain an object to be processed, in practical application, obtaining a document object XWPFDobject by a server, obtaining a CTbody object by a getDocument (). getBlock () method, and obtaining document content by an xmlText () attribute of the CTbody object. The embedded object obtains a paragraph object through an XWPFDockent document object getParagraphs () method, then traverses the paragraph to obtain an XWPFRun text object through getunits (), obtains a node object through the text object, and obtains the embedded object through a parsing node.
In addition, it should be noted that, when performing parsing, the main template is parsed first, then the nested sub-templates are parsed, and the parsing is completed layer by layer from outside to inside.
S206: and configuring a corresponding data set for each object to be processed according to the analysis result.
S208: and establishing the relationship between the configured data set and the static template, wherein the data set and the static template are used for generating a document template when the template is used.
Specifically, a corresponding data set is configured for each object to be processed through development, so that corresponding dynamic data can be read and filled into a static template when the document template is rendered, and an accurate document template is obtained.
Specifically, configuring the data set for the object to be processed may include: the method comprises the steps of firstly allocating a unique identifier for each object to be processed, and then configuring a corresponding data set for each unique identifier, wherein the configuration is that a database access statement is added to each unique identifier, and a data type, a parameter name and a parameter position corresponding to the database access statement are given, so that the object to be processed is directly read during rendering, the database access statement is executed, the data set can be read, and the rendering is completed.
The server establishes the relationship between the configured data set and the static template, that is, the relationship between the configured data set and the object to be processed in the static template, so that after rendering, the object to be processed is read, the corresponding database access statement is inquired according to the displacement identifier of the object to be processed, and then the data set can be read, and the read data set is filled into the template to complete rendering.
According to the document template generation method, the static template is uploaded by the first terminal, the static template comprises the objects to be processed, so that the static template only needs to be analyzed to obtain the objects to be processed in research and development, data set configuration is carried out on each object to be processed, the content of the template does not need to be discussed for many times in research and development and business, the communication time is shortened, and the research and development efficiency of the document template is improved.
In one embodiment, configuring a corresponding data set for each object to be processed according to the parsing result includes: and storing the static template in a data table main table, and configuring a data set corresponding to each object to be processed in a database access statement mode.
Specifically, in this embodiment, the server uses the data sets as storage units according to the developed configuration, each set of data sets corresponds to one identifier, and the identifier may be used as a foreign key association related data set table. During configuration, a template path is developed and stored in a data set main table, a data set is stored in a data set table in a database access statement sql form, wherein parameters in the database access statement sql are embedded by question marks and are used for embedding parameters when the database access statement sql is read, and data type data can be divided into a main data set, a subdataset independent type sub data set, a LinkDataSet main sub-associated type data set and an img picture.
In one embodiment, after establishing the configured data set and the static template relationship, the method includes: performing unit test on the generated document template; when the unit test is successful, a document template is issued.
The unit test is a simulation test process, under a test environment, a server acquires a corresponding static template according to selection of a user, the static template is analyzed to obtain an object to be processed, a corresponding data set is determined according to an identifier corresponding to the object to be processed, the data set is read and filled to a corresponding position of the static template, a document template is obtained through rendering and displaying, and finally the document template is sent to a first terminal to determine whether the obtained document template is correct or not through the user, if the correct test is successful, the document template is developed and issued to a production environment, if the correct test is successful, the document template can be marked in the rendered template by the user and fed back to the server, and therefore development and timely processing are facilitated.
In one embodiment, after receiving the static template uploaded by the first terminal, the method further includes: receiving basic information of a static template uploaded by a first terminal; and configuring the attribute of the static template according to the basic information.
In one embodiment, the basic information includes at least one of a product, a service, and a process node; configuring the attribute of the static template according to the basic information, comprising the following steps: and configuring routing information of the static template according to the basic information, and classifying and storing the static template according to the basic information.
In one embodiment, the basic information further includes a valid time; configuring the attribute of the static template according to the basic information, comprising the following steps: and configuring the effective time of the static template according to the effective time.
Specifically, as shown in fig. 3, when uploading the static template, the first terminal further needs to fill in basic information corresponding to the static template, where the basic information includes at least one of a product, a service, and a process node, so as to determine the product, the service, and the process corresponding to the static template, and further, when configuring the data set, develop a data selection range that can determine the corresponding data selection range according to the product, the service, and the process corresponding to the static template, and further configure a database access statement of the data set according to the data selection range, so as to improve efficiency for development, and the server further configures routing information of the static template according to the basic information. And the server also classifies and stores the static template according to the basic information, so that the static template can be determined according to the routing information when used, searching in a large number of templates is avoided, and the rendering efficiency is improved.
Specifically, in practical application, the newly added document template can be uploaded by a user and bound with a product and a process node which need to use the template. And unit testing work is completed on line. And the user can upload the word template and the excel data set to realize unit testing. And the page uploading template parameter is modeled according to the document type routing table so as to realize the binding of the template with the product, the node and the type.
In conjunction with fig. 3, the server also sets the Valid time of the template, and in practical applications, stores the Valid and Invalid time of the template in the routing table, and the validInd | Valid flag control, such as 0-Invalid and 1-Valid. And if the effective date is larger than the current date, the document type routing table display interface is not displayed any more.
In one embodiment, as shown in fig. 4, a document template processing method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
s402: and receiving a template selection instruction sent by the first terminal.
Specifically, the template selection instruction may be generated by the first terminal by filtering according to the routing information and clicking a corresponding template, for example, the first terminal may receive information of a corresponding product, a corresponding process, and the like, and then display an identifier of a corresponding document template, and the user selects one of the templates as needed, for example, double-clicking or otherwise selecting one of the templates, so as to obtain the template selection instruction. And sending the template selection instruction to the first terminal, so that the template selection instruction carries the routing information and the unique identifier of the template.
S404: and acquiring a static template according to the template selection instruction, and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format.
Specifically, the server acquires the static template according to the template selection instruction, wherein optionally, the server selects the range of the template according to the routing information, and then determines the corresponding static template according to the unique identifier of the template. After determining the static template, the server parses the static template to obtain a target template, where the target template includes an object to be processed and a template format, where the format of the static template may be understood as a printing format of the static template, such as doc, pdf, etc., and each object to be processed of the static template may include, but is not limited to, a field, a table, and an embedded object, where the embedded object includes a picture, xls, docx, pdf, etc. The embedded object analysis generally includes picture analysis and document analysis.
S406: and acquiring a data set corresponding to the object to be processed.
Specifically, the manner in which the server obtains the data set is to execute a database access statement corresponding to each object to be processed, so as to obtain the corresponding data set from the database.
In practical application, a template path is stored in a reportmain data set main table, a data set is stored in a reportdataset data set table in an sql form, parameters in the sql are embedded by question marks and used for embedding parameters when the sql is read, and the datasettype data types can be divided into a main data set-main data set, a subdataset-independent subdata set, a LinkDataSet-main-child-associated data set and an img-picture.
The execute sql parameter is stored in the reportdatasetparam table, and paramname-parameter name, paramno-parameter number are used to locate the position when embedding the parameter.
And the picture storage table reportimg can manage and store img in a unified way. Pictures are stored in base64.
Specifically, the server acquires a reportdataset dataset Object, executes sql stored in the data Object, acquires service data-list < Map < String, Object > >, and fills the service data-list < Map < String, Object > >, in an parsed xml, that is, in a parsed static template in a circular traversing manner.
The document template can support the printing of Chinese and English bilingual templates, and the position of the English template is similar to the storage mode of the Chinese template. The content is in english form. The path is configured in the reportmain table englishtplate. And the English template can be selected and printed on the document type selection interface.
S408: and filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
And finally, the server fills the read data set to the position corresponding to the template format, and sends the document template obtained after filling to the first terminal for displaying.
According to the document template processing method, the static template is uploaded by the first terminal, the static template comprises the objects to be processed, so that the static template only needs to be analyzed to obtain the objects to be processed in research and development, data set configuration is carried out on each object to be processed, the content of the template does not need to be discussed for many times in research and development and business, the communication time is shortened, and the research and development efficiency of the document template is improved. And the document template is only required to be read when being displayed, and the static template and the corresponding data set are more convenient.
In one embodiment, parsing the static template to obtain the target template includes: analyzing the static template to obtain a document object, and acquiring the document content of the document object; analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object; and analyzing the text object to obtain an object to be processed.
In one embodiment, parsing the static template to obtain the target template includes: judging whether the static template has nesting or not; and if so, analyzing the nested templates from outside to inside in sequence.
In practical application, a server acquires a document object XWPFDcolumn, acquires a CTbody object through a getDocument (). getModule () method, and acquires document contents through an xmlText () attribute of the CTbody object. The embedded object obtains a paragraph object through an XWPFDockent document object getParagraphs () method, then traverses the paragraph to obtain an XWPFRun text object through getunits (), obtains a node object through the text object, and obtains the embedded object through a parsing node.
And the analysis mode of the server is to analyze the main template firstly and then analyze the embedded objects of the sub-templates until all the templates in the inner layer are analyzed.
In one embodiment, acquiring a data set corresponding to an object to be processed includes: reading a database access statement corresponding to an object to be processed; when the database access statement is executed, the data set type parameter is embedded so as to read the corresponding data set.
The data storage uses data sets as storage units, each set of data sets corresponds to one id, and the ids are used as external key association related data set tables.
The template path is stored in a reportain data set main table, the data set is stored in a reportasetdata set table in an sql form, parameters in sql are embedded by question marks and used for embedding parameters when the sql is read, and the datasettype data types can be divided into a maindataset-main data set, a subdataset-independent sub data set, a LinkDataSet-main-sub-related-existing data set and img-pictures.
The execute sql parameter is stored in the reportdatasetparam table, and paramname-parameter name, paramno-parameter number are used to locate the position when embedding the parameter.
And the picture storage table reportimg can manage and store img in a unified way. Pictures are stored in base64.
The Word template is uploaded to a server for unified management, and document management is classified and managed according to business requirements, such as product, business and process node classification.
In one embodiment, the obtaining of the padding of the acquired data set to the corresponding position of the template format comprises: acquiring a picture node corresponding to an object to be processed; and filling the data set corresponding to the picture node into the picture node by a preset method.
It should be noted that, for Logo and background picture rendering, pictures are stored in a reportimg table as base64 for use. The server converts the read base64 data into stream base64.getMimeDecode (). decode (blankImg), analyzes the template again to obtain v: imagedata picture node, and writes the picture in by XWPFDcolumn addPictureData () method.
In one embodiment, obtaining the static template according to the template selection instruction includes: acquiring routing information according to the template selection instruction; and reading the static template from the classification corresponding to the routing information.
Specifically, a document type routing table ggdocumentary print is added, and data in the table is constructed according to a scene of a template actually used by a user. For example: data set id, flow node, product, document type, etc. The data can show corresponding templates according to different scenes according to user requirements. And providing the user with a list for selection. See in particular fig. 5.
The newly added document template management system can be uploaded by a user and binds products and process nodes needing to use the template. And unit testing work is completed on line. And the user can upload the word template and the excel data set to realize unit testing. And the page uploading template parameter is modeled according to the document type routing table so as to realize the binding of the template with the product, the node and the type.
The template valid and invalid time and valid Ind | valid flag control are stored in the routing table. 0-Invalid Invalid and 1-Valid. And if the effective date is larger than the current date, the document type routing table display interface is not displayed any more.
Specifically, referring to fig. 6, fig. 6 shows a complete flowchart of the document template generation method, in this embodiment, a static template is developed under a subscriber line, for example, the static template is drawn by a word or wps tool, and then the static template is sent to a server, the server receives the static template, classifies and stores the static template according to basic information selected when the static template is uploaded by a first terminal, reminds that a new static template exists in development, obtains the new static template through development, obtains an object to be processed through analysis, notifies a user of the first terminal to perform a unit test after configuring a corresponding data set for the object to be processed, the first terminal performs a unit test on the developed document template, that is, in a test environment, obtains the corresponding static template according to a selection server of the user, analyzing the static template to obtain an object to be processed, determining a corresponding data set according to an identifier corresponding to the object to be processed, reading the data set and filling the data set to a corresponding position of the static template to render and display the object to obtain a document template, finally sending the document template to a first terminal, determining whether the obtained document template is correct by a user, if the document template is correct, successfully testing, developing and issuing the document template to a production environment, and if the document template is problematic, marking the rendered template by the user and feeding the template back to a server so as to facilitate development and timely processing.
And after the test is finished, issuing the document template which is successfully tested to the production environment.
It should be understood that although the steps in the flowcharts of fig. 2, 4 and 6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 4 and 6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided a document template generating apparatus including: a first receiving module 701, a second receiving module 702, a configuration module 703 and a setup module 704, wherein:
a first receiving module 701, configured to receive a static template uploaded by a first terminal, where the static template includes an object to be processed;
a second receiving module 702, configured to receive an analysis result obtained by performing development analysis on a static template;
a configuration module 703, configured to configure a corresponding data set for each object to be processed according to the analysis result;
and the establishing module 704 is used for establishing the configured data set and static template relationship, and the data set and the static template are used for generating the document template when the template is used.
In one embodiment, the configuration module 703 is configured to store a static template in a data table main table, and configure a corresponding data set for each object to be processed in the form of a database access statement.
In one embodiment, the document template generating apparatus further includes:
the test module is used for carrying out unit test on the generated document template;
and the issuing module is used for issuing the document template when the unit test is successful.
In one embodiment, the document template generating apparatus further includes:
the fourth receiving module is used for receiving the basic information of the static template uploaded by the first terminal;
and the configuration module is used for configuring the attribute of the static template according to the basic information.
In one embodiment, the basic information includes at least one of a product, a service, and a process node;
the configuration module is used for configuring the routing information of the static template according to the basic information and classifying and storing the static template according to the basic information.
In one embodiment, the basic information includes a valid time; the configuration module is used for configuring the effective time of the static template according to the effective time.
In one embodiment, as shown in fig. 8, there is provided a document template processing apparatus including: a third receiving module 801, a parsing module 802, a data set obtaining module 803, and a filling module 804, wherein:
a third receiving module 801, configured to receive a template selection instruction sent by the first terminal;
the analysis module 802 is configured to obtain a static template according to the template selection instruction, and analyze the static template to obtain a target template, where the target template includes an object to be processed and a template format;
a data set obtaining module 803, configured to obtain a data set corresponding to an object to be processed;
and the filling module 804 is configured to fill the acquired data set to a position corresponding to the template format, and send the document template obtained after filling to the first terminal for display.
In one embodiment, the parsing module 802 includes:
the document analysis unit is used for analyzing the static template to obtain a document object and acquiring the document content of the document object;
the paragraph analyzing unit is used for analyzing the document content to obtain a paragraph object and analyzing the paragraph object to obtain a text object;
and the text analysis unit is used for analyzing the text object to obtain the object to be processed.
In one embodiment, the parsing module 802 includes:
the judging unit is used for judging whether the static template has nesting or not; and if so, analyzing the nested templates from outside to inside in sequence.
In one embodiment, the data set obtaining module 803 includes:
the reading unit is used for reading a database access statement corresponding to the object to be processed;
and the data set acquisition unit is used for embedding the data set type parameters when the database access statement is executed so as to read the corresponding data set.
In one embodiment, the fill module 804 includes:
the node acquisition unit is used for acquiring a picture node corresponding to the object to be processed;
and the filling unit is used for filling the data set corresponding to the picture node into the picture node by a preset method.
In one embodiment, the parsing module 802 includes:
the routing information acquisition unit is used for acquiring routing information according to the template selection instruction;
and the template acquisition unit is used for reading the static template from the classification corresponding to the routing information.
For specific limitations of the document template generating and processing device, reference may be made to the above limitations of the document template generating and processing method, which are not described herein again. The various modules in the document template generation and processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store static templates and data sets. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a document template generation and processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving a static template uploaded by a first terminal, wherein the static template comprises an object to be processed; receiving an analysis result obtained by developing and analyzing a static template; configuring a corresponding data set for each object to be processed according to the analysis result; and establishing the relationship between the configured data set and the static template, wherein the data set and the static template are used for generating a document template when the template is used.
In one embodiment, the configuring, by the processor, a corresponding data set for each object to be processed according to the parsing result when the processor executes the computer program includes: and storing the static template in a data table main table, and configuring a data set corresponding to each object to be processed in a database access statement mode.
In one embodiment, the establishing the configured data set and the static template relationships, as implemented by the processor executing the computer program, comprises: performing unit test on the generated document template; when the unit test is successful, a document template is issued.
In one embodiment, the receiving the static template uploaded by the first terminal when the processor executes the computer program further comprises: and receiving basic information of the static template uploaded by the first terminal, and configuring the attribute of the static template according to the basic information.
In one embodiment, the basic information involved in the execution of the computer program by the processor includes at least one of a product, a service, a flow node; configuring the attribute of the static template according to the basic information when the processor executes the computer program, wherein the configuring is realized by the processor and comprises the following steps: and configuring routing information of the static template according to the basic information, and classifying and storing the static template according to the basic information.
In one embodiment, the basic information involved in the execution of the computer program by the processor includes the validity time; configuring the attribute of the static template according to the basic information when the processor executes the computer program, wherein the configuring is realized by the processor and comprises the following steps: and configuring the effective time of the static template according to the effective time.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving a template selection instruction sent by a first terminal; obtaining a static template according to the template selection instruction, and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format; acquiring a data set corresponding to an object to be processed; and filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
In one embodiment, parsing the static template to obtain the target template, which is implemented when the processor executes the computer program, includes: analyzing the static template to obtain a document object, and acquiring the document content of the document object; analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object; and analyzing the text object to obtain an object to be processed.
In one embodiment, parsing the static template to obtain the target template, which is implemented when the processor executes the computer program, includes: judging whether the static template has nesting or not; and if so, analyzing the nested templates from outside to inside in sequence.
In one embodiment, the acquiring a dataset corresponding to an object to be processed, which is implemented when a processor executes a computer program, includes: reading a database access statement corresponding to an object to be processed; when the database access statement is executed, the data set type parameter is embedded so as to read the corresponding data set.
In one embodiment, the obtaining of the filling of the acquired dataset into corresponding locations of the template format, as implemented by the processor executing the computer program, comprises: acquiring a picture node corresponding to an object to be processed; and filling the data set corresponding to the picture node into the picture node by a preset method.
In one embodiment, the obtaining of the static template from the template selection instruction, as implemented by the processor when executing the computer program, comprises: acquiring routing information according to the template selection instruction; and reading the static template from the classification corresponding to the routing information.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a static template uploaded by a first terminal, wherein the static template comprises an object to be processed; receiving an analysis result obtained by developing and analyzing a static template; configuring a corresponding data set for each object to be processed according to the analysis result; and establishing the relationship between the configured data set and the static template, wherein the data set and the static template are used for generating a document template when the template is used.
In one embodiment, the configuring, when executed by the processor, the corresponding data set for each object to be processed according to the parsing result includes: and storing the static template in a data table main table, and configuring a data set corresponding to each object to be processed in a database access statement mode.
In one embodiment, the computer program, when executed by a processor, when implemented to establish the configured data set and the static template relationships, comprises: performing unit test on the generated document template; when the unit test is successful, a document template is issued.
In one embodiment, the computer program, when executed by the processor, further comprises, after receiving the static template uploaded by the first terminal: and receiving basic information of the static template uploaded by the first terminal, and configuring the attribute of the static template according to the basic information.
In one embodiment, the basic information involved in the execution of the computer program by the processor includes at least one of a product, a service, a flow node; configuring the attribute of the static template according to the basic information when the processor executes the computer program, wherein the configuring is realized by the processor and comprises the following steps: and configuring routing information of the static template according to the basic information, and classifying and storing the static template according to the basic information.
In one embodiment, the basic information involved in the execution of the computer program by the processor further comprises a validity time; configuring the attribute of the static template according to the basic information when the processor executes the computer program, wherein the configuring is realized by the processor and comprises the following steps: and configuring the effective time of the static template according to the effective time.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a template selection instruction sent by a first terminal; obtaining a static template according to the template selection instruction, and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format; acquiring a data set corresponding to an object to be processed; and filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
In one embodiment, parsing the static template to obtain the target template, performed when the computer program is executed by the processor, includes: analyzing the static template to obtain a document object, and acquiring the document content of the document object; analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object; and analyzing the text object to obtain an object to be processed.
In one embodiment, parsing the static template to obtain the target template, performed when the computer program is executed by the processor, includes: judging whether the static template has nesting or not; and if so, analyzing the nested templates from outside to inside in sequence.
In one embodiment, the acquiring a dataset corresponding to an object to be processed, which is implemented when the computer program is executed by a processor, includes: reading a database access statement corresponding to an object to be processed; when the database access statement is executed, the data set type parameter is embedded so as to read the corresponding data set.
In one embodiment, the computer program, when executed by a processor, for obtaining padding the acquired dataset to corresponding locations in a template format, comprises: acquiring a picture node corresponding to an object to be processed; and filling the data set corresponding to the picture node into the picture node by a preset method.
In one embodiment, the obtaining of the static template from the template selection instructions, when performed by the processor, comprises: acquiring routing information according to the template selection instruction; and reading the static template from the classification corresponding to the routing information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A document template generation method is characterized by comprising the following steps:
receiving a static template uploaded by a first terminal, wherein the static template comprises an object to be processed;
receiving an analysis result obtained by developing and analyzing the static template;
configuring a corresponding data set for each object to be processed according to the analysis result;
and establishing the configured data set and the static template relation, wherein the data set and the static template are used for generating a document template when the template is used.
2. The document template generating method according to claim 1, wherein the configuring, according to the parsing result, a corresponding data set for each object to be processed includes:
and storing the static template in a data table main table, and configuring a data set corresponding to each object to be processed in a database access statement mode.
3. The document template generation method of claim 1, wherein the establishing the configured data set and the static template relationship comprises:
performing unit test on the generated document template;
and when the unit test is successful, issuing the document template.
4. The method of claim 1, wherein after receiving the static template uploaded by the first terminal, the method further comprises:
receiving basic information of the static template uploaded by the first terminal;
and configuring the attribute of the static template according to the basic information.
5. The method of claim 4, wherein the basic information comprises at least one of a product, a service, and a process node; configuring the attribute of the static template according to the basic information, including:
and configuring routing information of the static template according to the basic information, and classifying and storing the static template according to the basic information.
6. The method of claim 4, wherein the basic information comprises a valid time; configuring the attribute of the static template according to the basic information, including:
and configuring the effective time of the static template according to the effective time.
7. A document template processing method is characterized by comprising the following steps:
receiving a template selection instruction sent by a first terminal;
obtaining a static template according to the template selection instruction, and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format;
acquiring a data set corresponding to the object to be processed;
and filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
8. The document template processing method of claim 7, wherein the parsing the static template to obtain a target template comprises:
analyzing the static template to obtain a document object, and acquiring the document content of the document object;
analyzing the document content to obtain a paragraph object, and analyzing the paragraph object to obtain a text object;
and analyzing the text object to obtain an object to be processed.
9. The document template processing method of claim 7, wherein the parsing the static template to obtain a target template comprises:
judging whether the static template has nesting or not;
and if so, analyzing the nested templates from outside to inside in sequence.
10. The document template processing method according to claim 7, wherein the acquiring the data set corresponding to the object to be processed includes:
reading a database access statement corresponding to the object to be processed;
and embedding a data set type parameter when the database access statement is executed so as to read the corresponding data set.
11. The document template processing method of claim 7, wherein the populating the acquired data set to corresponding locations of the template format comprises:
acquiring a picture node corresponding to an object to be processed;
and filling the data set corresponding to the picture node into the picture node by a preset method.
12. The method of claim 7, wherein obtaining a static template according to the template selection instruction comprises:
acquiring routing information according to the template selection instruction;
and reading a static template from the classification corresponding to the routing information.
13. A document template generating apparatus, characterized by comprising:
the first receiving module is used for receiving a static template uploaded by a first terminal, and the static template comprises an object to be processed;
the second receiving module is used for receiving an analysis result obtained by developing and analyzing the static template;
the configuration module is used for configuring a corresponding data set for each object to be processed according to the analysis result;
and the establishing module is used for establishing the configured data set and the static template relationship, and the data set and the static template are used for generating a document template when the template is used.
14. A document template processing apparatus, comprising:
the third receiving module is used for receiving the template selection instruction sent by the first terminal;
the analysis module is used for obtaining a static template according to the template selection instruction and analyzing the static template to obtain a target template, wherein the target template comprises an object to be processed and a template format;
the data set acquisition module is used for acquiring a data set corresponding to the object to be processed;
and the filling module is used for filling the acquired data set to the corresponding position of the template format, and sending the document template obtained after filling to the first terminal for displaying.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6 or 7 to 12.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6 or 7 to 12.
CN202111640364.2A 2021-12-30 2021-12-30 Document template generation method, processing method, device, computer equipment and medium Active CN114004211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111640364.2A CN114004211B (en) 2021-12-30 2021-12-30 Document template generation method, processing method, device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111640364.2A CN114004211B (en) 2021-12-30 2021-12-30 Document template generation method, processing method, device, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN114004211A true CN114004211A (en) 2022-02-01
CN114004211B CN114004211B (en) 2022-09-02

Family

ID=79932263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111640364.2A Active CN114004211B (en) 2021-12-30 2021-12-30 Document template generation method, processing method, device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN114004211B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013158758A1 (en) * 2012-04-17 2013-10-24 Nutech Ventures Semantic source code searching
CN109783606A (en) * 2018-12-17 2019-05-21 平安普惠企业管理有限公司 Data processing method, device, computer equipment and storage medium
CN110083650A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of data-query interfaces automatic generation method and system based on metadata self-discovery
CN111679975A (en) * 2020-05-28 2020-09-18 平安普惠企业管理有限公司 Document generation method and device, electronic equipment and medium
CN112380575A (en) * 2020-11-17 2021-02-19 平安普惠企业管理有限公司 Multi-party electronic signature synthesis method, device, equipment and storage medium
CN113642039A (en) * 2021-08-09 2021-11-12 平安科技(深圳)有限公司 Configuration method and device of document template, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013158758A1 (en) * 2012-04-17 2013-10-24 Nutech Ventures Semantic source code searching
CN109783606A (en) * 2018-12-17 2019-05-21 平安普惠企业管理有限公司 Data processing method, device, computer equipment and storage medium
CN110083650A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of data-query interfaces automatic generation method and system based on metadata self-discovery
CN111679975A (en) * 2020-05-28 2020-09-18 平安普惠企业管理有限公司 Document generation method and device, electronic equipment and medium
CN112380575A (en) * 2020-11-17 2021-02-19 平安普惠企业管理有限公司 Multi-party electronic signature synthesis method, device, equipment and storage medium
CN113642039A (en) * 2021-08-09 2021-11-12 平安科技(深圳)有限公司 Configuration method and device of document template, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龙憩: "xwpfdocument保存修改_POI操作word模板并生成新的word", 《BLOG.CSDN.NET/WEIXIN_29149259/ARTICLE/DETAILS/111887023》 *

Also Published As

Publication number Publication date
CN114004211B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN108491367B (en) Report document generation method and device, computer equipment and storage medium
CN109343851A (en) Page generation method, device, computer equipment and storage medium
US9141596B2 (en) System and method for processing markup language templates from partial input data
CN111818175B (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN105589959A (en) Form processing method and form processing system
CN112131837B (en) Service report configuration method, device, computer equipment and storage medium
CN110888634B (en) Game floor page generation method, game floor page generation device, computer equipment and storage medium
CN112114787A (en) Report generation method and device and storage medium
CN116466935A (en) Template processing method, device, computer equipment and storage medium
CN116610304B (en) Page code generation method, device, equipment and storage medium
JP2019101889A (en) Test execution device and program
CN114004211B (en) Document template generation method, processing method, device, computer equipment and medium
WO2024001308A1 (en) Template-based batch generation method and apparatus for infrared thermal image analysis reports
US20120192046A1 (en) Generation of a source complex document to facilitate content access in complex document creation
CN113254455B (en) Dynamic configuration method and device of database, computer equipment and storage medium
CN114676671A (en) Document online editing method and device and computer readable storage medium
CN113822025A (en) Office file automatic generation method, device, equipment and storage medium
CN109344372B (en) Big data-based document generation method and system
CN114489895B (en) Batch poster generation method, device, equipment and medium
CN117436429B (en) Document export method, device, computer equipment and storage medium
CN109376346A (en) Multiple terminals electronic document editorial management method and system based on label and view
CN117972246A (en) CAD file display method and system
CN117742684A (en) Method and system for visually building business full-flow cross-end application
CN116312919A (en) Medical detection report generation method, device, equipment and storage medium
CN117032666A (en) Page editing method and device based on editor, terminal equipment and storage 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
GR01 Patent grant
GR01 Patent grant