[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111090976B - Method and device for generating inspection document based on dynamic data - Google Patents

Method and device for generating inspection document based on dynamic data Download PDF

Info

Publication number
CN111090976B
CN111090976B CN201911309482.8A CN201911309482A CN111090976B CN 111090976 B CN111090976 B CN 111090976B CN 201911309482 A CN201911309482 A CN 201911309482A CN 111090976 B CN111090976 B CN 111090976B
Authority
CN
China
Prior art keywords
document
dynamic
dynamic content
content
data
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.)
Active
Application number
CN201911309482.8A
Other languages
Chinese (zh)
Other versions
CN111090976A (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.)
CHINA INSTITUTE OF SPORT SCIENCE
Original Assignee
CHINA INSTITUTE OF SPORT SCIENCE
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 CHINA INSTITUTE OF SPORT SCIENCE filed Critical CHINA INSTITUTE OF SPORT SCIENCE
Priority to CN201911309482.8A priority Critical patent/CN111090976B/en
Publication of CN111090976A publication Critical patent/CN111090976A/en
Application granted granted Critical
Publication of CN111090976B publication Critical patent/CN111090976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a method for generating a test document based on dynamic data, which comprises the following steps: determining an expression rule of the dynamic content; establishing a document template, wherein the document template comprises a dynamic content name and a region to be filled corresponding to the dynamic content name; traversing the resource file, taking the data matched with the expression rule in the resource file as dynamic content, filling the dynamic content into the area to be filled, and generating a check document. The invention also provides a verification document generation device based on the dynamic data. When the document content or the document format is changed, the invention does not need a programmer to modify the program, and has simple and convenient operation.

Description

Method and device for generating inspection document based on dynamic data
Technical Field
The present invention relates to the field of computer software. More particularly, the present invention relates to a method and apparatus for generating a verification document based on dynamic data.
Background
In the course of checking and checking in stadiums, it is often necessary to present an official document indicating the checking/checking result to the checked unit, and to print this document as a paper document and send it to the checked unit with a signature and seal. In the specific inspection process, although the inspection process is basically the same for each different stadium, the inspection process is performed by submitting an inspection commission book, signing an inspection contract, specifying an inspection process plan, recording a field inspection result, rectifying and verifying rectification information, providing an inspection result and a report, and the like, but the contents of the information of each stadium and the result of the field inspection are greatly different, so that the contents of the inspection report provided for the stadium also need to have the corresponding contents according to the type of the stadium.
The traditional report content is originally written by staff, but with the progressive informatization, the system generates document (report) function: it is common practice to call the document contents dynamically built part by program from the underlying API of a document management program (usually a word or the like program) according to the contents and format of the final document. But can only be modified by programmers familiar with this operation due to the generally lower level of APIs for document management programs. When the content of the document or the format of the document is changed, a new verification document can be generated only after a programmer writes or modifies the program, and the operation is complex, long and high in cost. Therefore, it is desirable to design a technical solution that can overcome the above-mentioned drawbacks to a certain extent.
Disclosure of Invention
The invention aims to provide a method and a device for generating a check document based on dynamic data, which do not need a programmer to modify a program when the content or format of the document changes and are simple and convenient to operate.
To achieve these objects and other advantages and in accordance with the purpose of the invention, there is provided a verification document generation method based on dynamic data, comprising:
determining an expression rule of the dynamic content;
establishing a document template, wherein the document template comprises a dynamic content name and a region to be filled corresponding to the dynamic content name;
traversing the resource file, taking the data matched with the expression rule in the resource file as dynamic content, filling the dynamic content into the area to be filled, and generating a check document.
Preferably, in the method for generating a test document based on dynamic data, the resource file at least includes a test order, test contract information, a test flow plan, a field test result, correction information, a test result, and report information.
Preferably, in the verification document generation method based on dynamic data, the dynamic content has a preset format;
and converting the data matched with the expression rule in the resource file into a preset format and using the data as dynamic content.
Preferably, in the method for generating a verification document based on dynamic data, the regions to be filled of the blank document template are filled with placeholders corresponding to dynamic content one to one;
in populating the dynamic content, the placeholders are replaced with the dynamic content.
Preferably, the method for generating a verification document based on dynamic data further includes:
after the verification document is generated, the verification document is electronically signed.
Preferably, the method for generating a verification document based on dynamic data further includes:
when the resource file is traversed each time, writing each dynamic content into a first intermediate file respectively, and storing the first intermediate file;
acquiring a storage path of the first intermediate file, and generating a first link in the corresponding region to be filled according to the storage path;
after detecting the modification operation on the resource file each time, acquiring the modification content of each dynamic content, writing the modification content into a second intermediate file, and storing the second intermediate file;
acquiring a storage path of the second intermediate file, and generating a second link in the corresponding region to be filled according to the storage path;
and receiving a click command of the first link or the second link, and filling the corresponding content of the first intermediate file or the second intermediate file into the corresponding area to be filled.
The invention also provides a verification document generation device based on dynamic data, which comprises:
a processor;
a memory storing executable instructions;
wherein the processor is configured to execute the executable instructions to perform the method for verification document generation based on dynamic data.
The invention at least comprises the following beneficial effects:
aiming at the practical situations that the inspection flow of the stadium is fixed, but the inspected data contents are different, the project data items change greatly, the types (texts, numbers, pictures) and the like of all the data items are different, the invention sequentially determines the expression rule of the dynamic content, establishes a document template, traverses the resource file, takes the data matched with the expression rule in the resource file as the dynamic content, and fills the dynamic content into the area to be filled to generate the inspection document. The invention can be operated by non-professional IT personnel with general IT skills when the content or format of a newly added inspection item or an inspection report changes, and has the advantages of simple and convenient operation, short time consumption and low cost.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The present invention is described in further detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description text.
It will be understood that terms such as "having," "including," and "comprising," as used herein, do not preclude the presence or addition of one or more other elements or combinations thereof.
In one embodiment, as shown in fig. 1, a method for generating a verification document based on dynamic data includes:
determining an expression rule of the dynamic content;
establishing a document template, wherein the document template comprises a dynamic content name and a region to be filled corresponding to the dynamic content name;
traversing the resource file, taking the data matched with the expression rule in the resource file as dynamic content, filling the dynamic content into the area to be filled, and generating a check document.
In the above technical solution, the dynamic content refers to content of each data entry in the inspection document, and changes with different resource files. The expression rule can generally represent the expression mode of each data item, for example, the expression mode of the test date is year, month and day, the telephone number, address, company name, test item, test result, etc. also have the specific expression mode, and can be determined according to statistics or experience. The document template comprises a dynamic content name meeting the current requirement and a region to be filled for filling the dynamic content, and can be customized by a user according to the requirement of the user. The resource file is a source file of the inspection document and comprises data required by the inspection document, and the data which accords with the expression rule is filled into the region to be filled as dynamic content by traversing the resource file until the filling of all the regions to be filled in the document template is completed.
It can be seen that the technical scheme defines the expression rule in advance, then customizes the document template, and generates the inspection document by traversing the resource file and filling the document template. When the content or format of the newly added inspection item or the inspection report is changed, non-professional IT personnel with general IT skills can edit or modify the document template, and the method is simple and convenient to operate, short in time consumption and low in cost.
In another technical solution, in the method for generating a test document based on dynamic data, the resource file at least includes a test order, test contract information, a test flow plan, a field test result, correction information, a test result, and report information. The resource file is used for providing dynamic content for the test document, and the attribute and the data type of the attribute of the information are defined in advance, wherein the data type of the attribute supports text strings, integers, decimal numbers, dates, times, pictures and documents.
In another technical solution, in the method for generating a test document based on dynamic data, the dynamic content has a preset format;
and converting the data matched with the expression rule in the resource file into a preset format and using the data as dynamic content. Here, the dynamic content is converted into a preset format of the area to be filled, such as attributes and data types specified in the above technical solution. And then refilling the region to be filled with the inspection file, wherein the technical scheme ensures that the obtained inspection file is more in line with the actual requirement.
In another technical scheme, in the inspection document generation method based on dynamic data, placeholders corresponding to dynamic contents one by one are filled in a to-be-filled area of a blank document template;
in populating the dynamic content, the placeholders are replaced with the dynamic content. Here, the placeholder occupies the to-be-filled area of the blank document template, and corresponds to the corresponding dynamic content one to one, so that a user can design the document template conveniently, find the accurate position of each dynamic content conveniently, and fill the dynamic content in the resource file to the accurate position conveniently. The replacement is performed according to the data type of the resource attribute declared by the placeholder.
In another technical solution, the method for generating a test document based on dynamic data further includes:
after the verification document is generated, the verification document is electronically signed. Here, the electronic signature is used to ensure non-tamper-proof property of the electronic verification document.
In another technical solution, the method for generating a test document based on dynamic data further includes:
when the resource file is traversed each time, writing each dynamic content into a first intermediate file respectively, and storing the first intermediate file;
acquiring a storage path of the first intermediate file, and generating a first link in the corresponding region to be filled according to the storage path;
after detecting the modification operation on the resource file each time, acquiring the modification content of each dynamic content, writing the modification content into a second intermediate file, and storing the second intermediate file;
acquiring a storage path of the second intermediate file, and generating a second link in the corresponding region to be filled according to the storage path;
and receiving a click command of the first link or the second link, and filling the corresponding content of the first intermediate file or the second intermediate file into the corresponding region to be filled.
According to the technical scheme, when the resource file is traversed, a first intermediate file is generated and used for storing corresponding dynamic contents, and after the resource file is modified, a second intermediate file is generated and used for storing corresponding modified contents. And displaying the link in the corresponding area to be filled by the first intermediate file and the second intermediate file. And storing the corresponding first intermediate file and the second intermediate file in each traversal and modification. And clicking the link by the user, and presenting the required content in the area to be filled. The user experience is further improved through the first intermediate file and the second intermediate file, and the situation that all resource files need to be traversed every time the resource files are added, replaced or modified is avoided.
The invention also provides a verification document generation device based on dynamic data, which comprises:
a processor;
a memory storing executable instructions;
wherein the processor is configured to execute the executable instructions to perform the method for verification document generation based on dynamic data.
The technical scheme is obtained based on the same inventive concept as the method for generating the inspection document based on the dynamic data, and the description of the method part can be referred to. The device of the technical scheme is not limited to be realized by a PC, a terminal and a server.
The following is a specific description.
Defining the data type: the data types supported by the system and required to be used are predefined, such as text strings, numbers, dates, time, pictures and document basic types. This data type mainly determines the canonical representation of the next data model, and the format and representation of the data in the final document, such as pictures, may require a special empty space to store and define the size and location of the final program.
Define data model (CDM or PDM): since the inspection process of the stadium is substantially the same, the information collected in the whole process is mainly information of 6 subjects, such as an inspection order, inspection contract information, inspection flow plan, field inspection result, correction information, inspection result, report information, and the like. The information of each object is mainly divided into two parts, namely, the preset information related to the process, such as the information of the state of the inspection process, the occurrence time of each step, operators and the like, and the part is mainly set by the system design; and secondly, the related data items are specifically checked, business personnel can dynamically add or modify the data items according to the needs when the system runs, the names and the data types of the data items are simply set, and finally, the system automatically sets a related interface for data management according to the business personnel and the business personnel enter the related data.
Defining a model document template: the method is characterized in that a document template is generated by a service person according to a method for writing a standard document, and the dynamic content can be marked by a special expression method: the content such as the date of verification is included in the template in parenthesis such as: { date of examination }. The mode can be unfixed, and only one or more modes which are convenient for business personnel to understand can be selected as required.
Template processing/document creation program module: the document generation program module loads the data model of the type of the examination venue and automatically loads the corresponding data from the system; the document generation program module loads a template file, traverses the content of the document, finds all dynamic content areas in the document according to the expression rule of the dynamic content, loads and formats actual data according to the data type and the display parameter of the dynamic content defined in the data model, and finally replaces the corresponding placeholder content in the template at the moment.
For data items not found in the data model or data, special processing such as blank processing can be performed. For in-depth applications, expressions can be used in the templates to support certain user-controlled more dynamic control of content, such as common IF conditional decisions/data loops, etc.
Document signing: after the document is generated, the document may be automatically electronically signed according to a pre-configured system. The main purpose of this part is to ensure the non-tamper-proof property of the electronic document (that is, the electronic signature of the document will automatically fail after the document is modified), so that a better application scenario of the electronic document can be provided in the application process of the whole system, and in the future, the signed electronic document can be considered to replace a paper-printed document with a official seal.
The number of apparatuses and the scale of the process described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the method and apparatus for generating a verification document based on dynamic data of the present invention will be apparent to those skilled in the art.
While embodiments of the invention have been described above, it is not limited to the applications set forth in the description and the embodiments, which are fully applicable in various fields of endeavor to which the invention pertains, and further modifications may readily be made by those skilled in the art, it being understood that the invention is not limited to the details shown and described herein without departing from the general concept defined by the appended claims and their equivalents.

Claims (3)

1. The method for generating the inspection document based on the dynamic data is characterized by comprising the following steps:
determining an expression rule of the dynamic content;
establishing a document template, wherein the document template comprises a dynamic content name and a region to be filled corresponding to the dynamic content name;
traversing resource files, taking data matched with the expression rules in the resource files as dynamic content, filling the dynamic content into a region to be filled of the document template, and generating a check document;
when the resource file is traversed each time, writing each dynamic content into a first intermediate file respectively, and storing the first intermediate file;
acquiring a storage path of the first intermediate file, and generating a first link in the corresponding region to be filled according to the storage path;
after detecting the modification operation on the resource file each time, acquiring the modification content of each dynamic content, writing the modification content into a second intermediate file, and storing the second intermediate file;
acquiring a storage path of the second intermediate file, and generating a second link in the corresponding region to be filled according to the storage path;
receiving a click command of the first link or the second link, and filling the corresponding content of the first intermediate file or the second intermediate file into the corresponding area to be filled;
the resource file at least comprises a check order, check contract information, a check flow plan, a field check result, correction information, a check result and report information;
the dynamic content has a preset format; converting data matched with the expression rule in the resource file into a preset format and using the data as dynamic content;
filling placeholders corresponding to the dynamic contents one by one in the to-be-filled area of the blank document template; in populating the dynamic content, the placeholders are replaced with the dynamic content.
2. The method for generating a verification document based on dynamic data according to claim 1, further comprising:
after the verification document is generated, the verification document is electronically signed.
3. The verification document generation device based on dynamic data is characterized by comprising:
a processor;
a memory storing executable instructions;
wherein the processor is configured to execute the executable instructions to perform the method for generating a verification document based on dynamic data according to any one of claims 1 to 2.
CN201911309482.8A 2019-12-18 2019-12-18 Method and device for generating inspection document based on dynamic data Active CN111090976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911309482.8A CN111090976B (en) 2019-12-18 2019-12-18 Method and device for generating inspection document based on dynamic data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911309482.8A CN111090976B (en) 2019-12-18 2019-12-18 Method and device for generating inspection document based on dynamic data

Publications (2)

Publication Number Publication Date
CN111090976A CN111090976A (en) 2020-05-01
CN111090976B true CN111090976B (en) 2022-11-15

Family

ID=70395703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911309482.8A Active CN111090976B (en) 2019-12-18 2019-12-18 Method and device for generating inspection document based on dynamic data

Country Status (1)

Country Link
CN (1) CN111090976B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449502A (en) * 2021-06-29 2021-09-28 平安资产管理有限责任公司 Document generation method and system based on dynamic data
CN114492354A (en) * 2021-12-24 2022-05-13 永中软件股份有限公司 Streaming document generation method, computing device and computer readable medium
CN117910438B (en) * 2024-03-13 2024-06-21 江苏中威科技软件系统有限公司 Dynamic format file DLF generation device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778234A (en) * 2014-01-26 2014-05-07 北京恒华伟业科技股份有限公司 Report form generating method and device
CN108334477A (en) * 2018-01-30 2018-07-27 深圳壹账通智能科技有限公司 Implementation method, device, computer equipment and the storage medium of Intelligent file
CN108572944A (en) * 2017-11-24 2018-09-25 北京金山云网络技术有限公司 A kind of document structure tree method, apparatus, electronic equipment and storage medium
CN109684614A (en) * 2018-11-30 2019-04-26 南京越博动力系统股份有限公司 A kind of vehicle performance simulation report automatic creation system and its generation method
CN109783785A (en) * 2018-12-27 2019-05-21 长沙通诺信息科技有限责任公司 Generate the method, apparatus and computer equipment of tryout test report

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778234A (en) * 2014-01-26 2014-05-07 北京恒华伟业科技股份有限公司 Report form generating method and device
CN108572944A (en) * 2017-11-24 2018-09-25 北京金山云网络技术有限公司 A kind of document structure tree method, apparatus, electronic equipment and storage medium
CN108334477A (en) * 2018-01-30 2018-07-27 深圳壹账通智能科技有限公司 Implementation method, device, computer equipment and the storage medium of Intelligent file
CN109684614A (en) * 2018-11-30 2019-04-26 南京越博动力系统股份有限公司 A kind of vehicle performance simulation report automatic creation system and its generation method
CN109783785A (en) * 2018-12-27 2019-05-21 长沙通诺信息科技有限责任公司 Generate the method, apparatus and computer equipment of tryout test report

Also Published As

Publication number Publication date
CN111090976A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN108762743B (en) Data table operation code generation method and device
CN111090976B (en) Method and device for generating inspection document based on dynamic data
US20130019156A1 (en) Method for Associating Third Party Content with Online Document Signing
US10223698B2 (en) Integrating a web-based CRM system with a PIM client application
US11870738B2 (en) Conversation-enabled document system and method
US9141393B2 (en) Business content authoring and distribution
ITMI20130390U1 (en) METHODS AND SYSTEM FOR DYNAMIC ENDPOINT GENERATORS, DETECTION AND MEDIATION (BROKERAGE) OF DYNAMIC REMOTE OBJECTS
CN107220274B (en) Visual data interface market realization method
US8239754B1 (en) System and method for annotating data through a document metaphor
CN114861623A (en) Protocol template generation method and device, electronic equipment and storage medium
CN109885290B (en) Application program service description information generation and release method, device and storage medium
AU2016200559B2 (en) Method and system for communicating product development information
CN114004591A (en) Automatic user-defined form auditing method and device, electronic equipment and storage medium
JP2003114813A (en) Analysis server, program analysis network system and program analysis method
AU2015200816A1 (en) Generating a signed electronic document
CN111861406A (en) Map changing and reviewing system and method
CN115130442A (en) Report generation method and device, storage medium and computer equipment
CN114386853A (en) Data auditing processing method, device and equipment based on universal auditing model
US8230353B2 (en) Iterative development of services from WSDL
CN111401023B (en) Report generation method, report generation device, server and storage medium
CN116301856B (en) Design method, device, equipment and medium of visual form designer
JP6097231B2 (en) Program generating apparatus and method
CN111858595B (en) Dynamic configuration method and system for electric power engineering examination record table
CN114580359A (en) Document generation method and device based on RPA and AI and electronic equipment
CN114386374A (en) Method for generating odf document by using CA signature in data integration and program thereof

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