CN109388612B - Method, equipment, system and medium for generating data summary document - Google Patents

Method, equipment, system and medium for generating data summary document Download PDF

Info

Publication number
CN109388612B
CN109388612B CN201811073238.1A CN201811073238A CN109388612B CN 109388612 B CN109388612 B CN 109388612B CN 201811073238 A CN201811073238 A CN 201811073238A CN 109388612 B CN109388612 B CN 109388612B
Authority
CN
China
Prior art keywords
data
document
filled
xml file
filling
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
CN201811073238.1A
Other languages
Chinese (zh)
Other versions
CN109388612A (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.)
Academy of Opto Electronics of CAS
Original Assignee
Academy of Opto Electronics of CAS
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 Academy of Opto Electronics of CAS filed Critical Academy of Opto Electronics of CAS
Priority to CN201811073238.1A priority Critical patent/CN109388612B/en
Publication of CN109388612A publication Critical patent/CN109388612A/en
Application granted granted Critical
Publication of CN109388612B publication Critical patent/CN109388612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The present disclosure provides a document generation method, including: establishing a document template, wherein filling positions corresponding to the data to be filled one by one are marked in the document template; establishing an XML file, wherein a data storage index, a data filling index and a data calculation formula are recorded in the XML file; the method comprises the steps of obtaining an XML file, obtaining data to be filled according to a data storage index, calculating the data to be filled according to a data calculation formula, filling the calculated data to be filled into a document template according to the data filling index, and generating a target document. The method greatly improves the timeliness and the standardization of the document generation work and reduces the cost of human resources. The disclosure also provides an electronic device for document generation, a document generation system and a computer readable medium.

Description

Method, equipment, system and medium for generating data summary document
Technical Field
The present disclosure relates to the field of data statistics, and in particular, to a method, device, system, and medium for generating a data summary document.
Background
In daily work, enterprises and public institutions can continuously generate a large number of data summary documents related to businesses, which are obtained through complicated calculation and analysis according to certain business rules based on basic data in an enterprise and public institution database. In order to more intuitively show the data in work, part of enterprises require that the data in rows and columns are converted into more meaningful graphs so that a decision maker can more quickly find new phenomena or laws from a large amount of data. Although formats and styles of proprietary data summary documents of the same unit in different periods basically do not change greatly, summary statistics needs to be carried out on massive and complicated data in specific time. At present, most enterprises adopt a manual query and manual record mode to summarize, calculate and edit data by specially-assigned persons, so that the working efficiency is low, and the possibility of bringing errors is high, therefore, how to quickly, standardly and comprehensively obtain a special data summarization document is a problem which needs to be solved urgently by each unit.
In recent years, there have been many studies on automatic document generation at home and abroad, such as defining necessary operations and document templates in the document generation process based on a workflow engine to realize automation of some complex calculations in an electric power manufacturing enterprise; and establishing a document template database by combining multiple technologies such as Visual Basic for Applications (VBA), Active X Data Objects (ADO), Active Server Pages (ASP) and the like, and designing a document template customizing tool and a document automatic generation platform suitable for designing documents of the satellite thermal control system.
Most of the research results are based on that a worker manually inputs contents during operation or data obtained through a simple calculation formula replaces a label edited in a template in advance, so that a required document is generated, the service logic is simple, complex logic calculation cannot be realized, and complex operation steps such as drawing of a chart in the document are performed. In addition, the existing automatic document generation method is single in application condition and cannot simultaneously solve the problem of automatic generation of Word and Excel format documents.
Disclosure of Invention
Aiming at the defects in the prior art, the method, the device, the system and the medium for generating the data summary document are provided by the disclosure, and are used for solving the problems that the automatic generation method of the data summary document in the prior art is single in application range, cannot perform complicated logic calculation, cannot draw icons in the document and the like.
The present disclosure provides a data summary document generation method, including: establishing a document template; establishing an XML file, wherein a data storage index, a data filling index and a data calculation formula are recorded in the XML file; the method comprises the steps of obtaining an XML file, obtaining data to be filled according to a data storage index, calculating the data to be filled according to a data calculation formula, filling the calculated data to be filled into a document template according to the data filling index, and generating a target document.
Optionally, creating a document template comprises: establishing a blank document; and marking the filling position of each data to be filled in the blank document to generate the document template.
Optionally, creating an XML file includes: acquiring the storage position of each data to be filled, acquiring the data storage index, and writing the data storage index into the XML file; editing the data calculation formula of the data to be filled, and writing the data calculation formula into the XML file; and acquiring the filling position of each data to be filled, acquiring the data filling index, and writing the data filling index into the XML file.
Optionally, according to the data filling index, filling the calculated data to be filled into the document template to generate a target document, including: and calling a replacement function to fill the calculated data to be filled into a filling position corresponding to the data to be filled in the document template.
Optionally, the obtaining data to be filled according to the data storage index, and calculating the data to be filled according to the data calculation formula includes: and acquiring and calculating the data to be filled according to the sequence of the data filling indexes in the XML file, and recording the number of the processed data filling indexes.
Optionally, according to the data filling index, filling the calculated data to be filled into the document template to generate a target document, further including: and judging whether the filling of the data to be filled is completed or not according to the number of the processed data filling indexes, if so, directly deriving the target document, and if not, repeating the operation S3 to process the unfilled data.
Optionally, a filling position of each data to be filled is marked in the blank document, and the filling position of each data to be filled is marked in the blank document by using a bookmark or a row and column mark.
Another aspect of the present disclosure provides an electronic device for data summary document generation, including: a processor; a memory storing a computer executable program which, when executed by the processor, causes the processor to perform a document auto-generation method as disclosed herein.
Another aspect of the present disclosure also provides a data summary document generating system, including: the document template establishing module is used for establishing a document template, and filling positions which are in one-to-one correspondence with each data to be filled are marked in the document template; the XML file establishing module is used for establishing an XML file, and a data storage index, a data filling index and a data calculation formula are recorded in the XML file; and the data processing module is used for acquiring the XML file, acquiring the data to be filled according to the data storage index, calculating the data to be filled according to the data calculation formula, filling the calculated data to be filled into the document template according to the data filling index, and generating the target document.
Another aspect of the present disclosure also provides a computer readable medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements a document generating method as disclosed herein.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates a schematic diagram of a data summary document generation method according to an embodiment of the disclosure.
FIG. 2 schematically shows a flow diagram of a data summary document generation method according to an embodiment of the disclosure.
FIG. 3 schematically shows an XML file schematic according to an embodiment of the disclosure.
Fig. 4 schematically illustrates a temperature variation curve diagram of a gyro assembly according to an embodiment of the present disclosure.
FIG. 5 schematically illustrates a block diagram of an electronic device for data summary document generation in accordance with an embodiment of the present disclosure.
FIG. 6 schematically shows a block diagram of a data summary document generation system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. Accordingly, the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.).
FIG. 1 schematically illustrates a schematic diagram of a data summary document generation method of an embodiment of the disclosure.
As shown in fig. 1, the basic principle is: firstly, marking variable domains in a document according to different types of data to be filled to generate a document template, wherein each type of data has a filling identifier corresponding to the data, and each type of data has a filling position corresponding to the data; then, establishing a document description model, converting a document generation process into a mathematical model, formulating an Extensible Markup Language (XML) file according to the document description model, wherein the XML file records key information required for filling data of a document template variable field, and the key information is required for subsequently calculating the data, and comprises a service name, an English identifier, query information (data query index), a chart name, a filling identifier (data filling index), a data calculation formula and the like corresponding to the data which needs to be counted by a user; and finally, solving the data which needs to be counted by the user, specifically reading an XML file, acquiring the data to be filled according to query information, calculating the data to be filled according to a calculation formula, calling a replacement function according to a filling identifier to fill the calculated result into a variable domain corresponding to the data in a document template so as to generate a target document, after the data are summarized, judging whether all the data which need to be counted are recorded in the target document, if not, acquiring the data which need not be counted according to the query information, calculating the data, and filling the calculated result into the variable domain in the document template until all the data are counted.
The generated target document has the same content, the same format and style as the format, and the fixed position region is a constant field, the region other than the constant field is a variable field, the variable field is used for filling data that needs to be counted by a user, the data in the constant field and the variable field can be characters or pictures, and the data types included in the variable field can be summarized as the following six types:
1) directly acquired Data, including Data input by a user or directly read from an external file, is defined as Direct Data;
2) retrieving the obtained Data through a Database, and defining the Data as Database Data;
3) calculating the obtained Data based on Direct Data and a service formula, and defining the Data as summarized Data;
4) reusing Database Data/summarized Data, and combining Database search and a service formula to perform comprehensive calculation to obtain Data, wherein the Data is defined as summarized Data;
5) growth and decline type words, such as increase/decrease, rise/fall, etc., are defined as Trend Word;
6) and (3) reflecting a Chart of data change trend within a certain time range, and combining data obtained by calculation of a service formula to define the Chart as Chart.
However, this does not mean that only these six data types are in the target document, and in an embodiment, the data may be one data or multiple data, and the following describes the flow of generating the data summary document specifically.
FIG. 2 schematically shows a flowchart of an embodiment data summary document generation method of the present disclosure.
As shown in fig. 2, the specific method includes:
and S1, establishing the document template.
In the above operation S1, a blank document is created, a constant domain and a variable domain are divided, data in the target document that needs to be counted by the user is classified according to the summarized six types of data, the variable domain in the blank document is marked according to each data to be filled, the constant domain in the blank document is retained, a document template is generated, and in the subsequent operation, the data is filled into the variable domain in the document template, so as to generate the target document.
The variable domain identification obtained by marking the variable domain corresponds to each data to be filled one by one, so that the calculated data to be filled can be accurately filled into the filling position corresponding to the data of the type in the document template according to the corresponding relation.
The format of the marked document is selected according to the requirements of users, because the positions of constant domains and variable domains of documents in different formats are different, the documents cannot be uniformly defined, but after a document template in one format is generated, the data summary documents in the format can be automatically generated by adopting the document template in the format. For example, for a document template in the format of Word, the present embodiment uses a bookmark function as an identifier of a variable field to solve the problem of navigation of the variable field, inserts a corresponding bookmark in each position with padding, and quickly locates to the position where the bookmark is located. For a document module in the format of Excel, in the embodiment, a row and column label is used as a unique identifier of the position of each piece of data, and the position of a variable domain in a document is marked.
S2, establishing an XML file, wherein the XML file records a data storage index, a data filling index and a data calculation formula.
In operation S2, in order to facilitate the calculation of data in the process of generating the data summarization document, a document description model is created, the process of automatically generating the data summarization document is converted into a mathematical model, the document template, the identifier of the variable field in the document template, the target document and the related data type are expressed by mathematical symbols and languages, then an XML file is written according to the created mathematical model, and key information required for filling the document template to generate the target document is recorded, where the key information includes a data storage index (for example, the storage location of the data to be filled, i.e., in what name of the database field, what name of the database table is to be used to query the data to be filled), a data calculation formula (how to calculate the data to be filled) and a data filling index (to which location of the mark in the document template the data to be filled after the processing is completed, i.e. the identifier of the variable field in the document template), etc., i.e. the XML file is equivalent to an auxiliary file matched with the document template, and plays a role of indexing. In the subsequent data summarizing process, the final data is filled into the document template to generate the target document by matching the corresponding calculation formula and function aiming at different data according to the index relation recorded by the XML file.
For the summary process of the above six types of data, the established document description model may be:
1) the document template is abstracted into a two-tuple T (C, K), wherein C is a constant domain part in the document template, K is a mark (bookmark or line and column mark) part in the document template, and the value of K is a six-tuple K ═ K1,K2…,Kn},K=<αKKKKKK>In the formula, αKKKKKKAnd the six elements (Direct Data, Database Data, called Data, complied Data, Trend Word, Chart) respectively represent the corresponding variable field identification in the document template, namely the Data filling index.
2) The target document is a binary D (C, V), wherein C is a constant domain part in the document, and V is a final value of a variable domain in the target document under a given input condition. The final value of V is a six-tuple V ═ V1,V2…,Vn},V=<αVVVVVV>In the formula, wherein alphaVVVVVVRespectively representing six types of elements contained in the variable field.
According to the established document description model, a writing rule of XML file information is formulated, wherein in order to judge the type of data in the calculation process, a data filling index (a label of a root element) in the XML file is a document template variable field identifier. The specific writing rules of the internal elements of the XML file are as follows:
1) direct Data: a business name and a unique English identification;
2) database Data: the system comprises a service name, a unique English mark, and database fields and form information which need to be inquired;
3) summarized Data: the business name, the unique English mark and the calculation formula of the data;
4) complied Data: the business name, the unique English identification and the query information or the calculation formula of the data;
5) trend Word: the business name, the unique English mark and the reference data English mark;
6) chart: chart names, data sources, and custom information such as coordinate axes and titles.
For example, the XML file is shown in FIG. 3, for example, the business name is half of the ignition pointThe data fill index corresponding to the major axis is sigmaK_1If the Data type of the Data is Database Data, the English identifier is FIREAXIS, the queried Database field is Axis _ Fire, and the queried form information is Sys _ Dictionary, the value of the ignition point semi-major Axis can be accurately queried from the Database according to the information.
S3, obtaining the XML file, obtaining the data to be filled according to the data storage index, calculating the data to be filled according to the data calculation formula, filling the calculated data to be filled into the document template according to the data filling index, and generating the target document.
In the above operation S3, the key information recorded in the XML file is read to process the data to be counted, which includes the following steps:
s301, judging whether the type of the Data to be filled is Direct Data or not, if so, calling a replacement function to fill the Direct Data into the document template alphaKIdentified variable field, the calculation formula is as follows:
RSα=R(αVK)
in the formula of alphaVDirect Data, alpha representing Direct readingKRepresenting the corresponding identification of the Direct Data in the document template; if not, the next calculation is continued.
S302, judging whether the type of the Data to be filled is Database Data or not, and calling a formula R if the type of the Data to be filled is Database DataDBQ (CN, TN, F), the required data is obtained by database search, where CN represents the database field name, TN represents the database form name, and F represents the selection criteria, such as the date and time (directly obtained data) and other screening conditions. Then filling the Data obtained by adopting the replacement function into the document template betaKIdentified variable field, the calculation formula is as follows:
RSβ=R(RDBK)
in the formula RDBRepresenting retrieval of acquired Database Data, beta, through a DatabaseKRepresenting the corresponding identification of Database Data in the document template; if not, the next step is continued.
With beta as shown in FIG. 3K_1For example, it is necessary to calculate "semi-major axis of ignition point for a certain position hold of a certain satellite on 1/12/2016", and first call the following formula:
RDB=Q(‘Axis_Fire’,′Sys_Dictionary′,′2016-1-12′)
obtaining a Structured Query Statement (SQL) of a database: "select Axis _ Fire from Sys _ Dictionary where Date to _ Date ("' 2016-01-12 "," YYYYY-MM-DD ")" queried data FireAxis (i.e.,. beta. -in the target document)VData corresponding to type variables) and then calls RSβ=R(RDBK_1) Replacing beta in a document templateK-1The corresponding satellite ignition point semi-major axis.
S303, judging whether the Data type to be filled is called Data, if so, firstly acquiring reused Direct Data, and then calculating to obtain gammaVThe summarized Data corresponding to the type variable is filled in the gammaKAnd the specific calculation formula of the identified scalar domain is as follows:
RSγ=C(VF,RSαK)
in the formula, VF represents a variable formula required for solving the solved Data, RSαDirect Data, gamma, representing Data for reuseKRepresenting the corresponding mark of the summarized Data in the document template; if not, the next step is continued.
At gamma as shown in FIG. 3K_1For example, it is necessary to calculate "pulse period maintained at a certain position", obtain a required calculation formula and search for data to be reused, where the data to be reused is pulse frequency, calculate pulse period again, and fill the pulse period into the γ in the document templateK_1The specific calculation formula of the identified variable domain is as follows:
RSγ=C(‘1/MCPL’,′0.4′,γK_1)
where '1/MCPL' represents a variable formula required for solving the pulse period MCZQ, and '0.4' represents a value of the directly acquired pulse frequency MCPL (i.e., Direct Data), γK_1Representing pulsesAnd corresponding identification in the document template is periodically carried out.
S304, judging whether the Data type to be filled is the complied Data, if so, firstly obtaining the Data Direct Data/summarized Data to be reused, determining whether all the Direct Data/summarized Data are obtained, if not, repeating S302 and S303 until all the Data are processed, then obtaining the complied Data by calculating the Direct Data/summarized Data, and filling the complied Data with the Data in the document template deltaKThe specific formula of the identified variable domain is as follows:
RSδ=C(VF,RSβ||RSγK)
where VF represents the variable formula, RS, required to solve the compounded Dataβ||RSγRepresenting Data Direct Data/ordered Data, delta, to be reusedKRepresenting the corresponding identification of the complied Data in the document template; if not, the next step is continued.
At δ shown in FIG. 3K_1For example, the variable of the semi-major axis at a certain position of a certain satellite needs to be calculated, the values of the semi-major axis FireAxis of the ignition point and the semi-major axis CutAxis of the flameout point are firstly obtained, whether the two values are obtained or not is judged, if not, the values of the semi-major axis FireAxis of the ignition point and the semi-major axis CutAxis of the flameout point are obtained by searching in an XML file through unique English identifiers corresponding to the semi-major axis of the ignition point and the semi-major axis of the flameout point and matching with corresponding solving algorithms, then the variable formula 'FireAxis-CutAxis' for calculating the semi-major axis variable quantity AxischangeData is obtained, the semi-major axis variable quantity is calculated, and then the calculated resultK_1The specific calculation formula of the identified variable domain is as follows:
RSδ=C(‘FireAxis-CutAxis’,′1200||1300′,δK_1)
wherein 'FireAxis-CutAxis' represents a variable formula required for solving variation AxisChangeData of semi-major axis, '1200' represents a value of semi-major axis of acquired ignition point, '1300' represents a value of semi-major axis of acquired ignition point, and deltaK_1RepresentsThe corresponding identification of the semi-major axis change quantity AxisChangeData in the document template.
S305, judging whether the type of the Data to be filled is Trend Data, if so, firstly acquiring reference Data for judging the change Trend, determining whether the reference Data is acquired, if not, repeating S302, S303 and S304 to acquire the reference Data, then judging whether the reference Data is positive or negative, and acquiring change Trend Data Trend Data referenced to the reference Data, wherein the specific calculation formula is as follows:
RSμ=W(RSβ||RSγ||RSδK)
in the formula of RSβ||RSγ||RSδRepresents the Data referenced for solving Trend Data, μKRepresenting the corresponding identification of Trend Data in the document template; if not, the next step is continued.
With μ as shown in FIG. 3K_1For example, it is necessary to determine whether the semi-major axis of a certain position of a satellite is increased or decreased, first obtain the semi-major axis change quantity AxisChangeData and determine whether the AxisChangeData has been obtained, if not, search in a configuration file through the unique English mark of the AxisChangeDat variable, match a corresponding solving algorithm to obtain reference Data, then obtain Trend Data according to the reference Data, and fill the Trend Data into a document template muK_1The specific calculation formula of the identified variable domain is as follows:
RSμ=W(‘-100’,μK_1)
wherein '-100' represents the variation of the semi-major axis AxisChangeData, μK_1Representing whether the semi-major axis increases or decreases the corresponding flag in the document template.
S306, aiming at the Chart type data, firstly calling a formula RDBObtaining data sources required for drawing the chart through database retrieval, wherein CN represents the name of a database field of a query, TN represents the name of a database form of the query, and F represents the standard of the query, for example, the screening conditions such as the date and time are directly obtained, and then drawing the chart by adopting the following formula:
RSσ=(RDB,AI,σK)
in the formula, RDBData sources representing charts, AI representing attribute information (such as custom information including coordinate axes, titles and legends) of the chart to be drawn, σKRepresenting the corresponding identity of the chart in the document template.
At σ as shown in FIG. 3K_1For example, a "gyro component temperature change curve" needs to be drawn, and first, the following formula is called to perform database retrieval to obtain a data source:
RDB=Q(′TK16,TK22,TK23,TK24,TK25′,′Sys_Parameter′,′2016-01-12′)
that is, the above-described formulas are called to execute the result returned by the database SOL statement "select TK16, TK22, TK23, TK24, TK25 from Sys _ Parameter where Time between to _ Timestamp ('2016-01-1200: 00: 00', 'YYYYYYY-MM-DD HH: MM: ss') and to _ Timestamp ('2016-01-1300: 00:00: 00', 'YYYYYYYY-MM-DD: MM: ss')", and then the formulas RS are calledσ=D(RDB,AI,σK_1) Drawing a chart and filling the drawn chart into a document template sigmaK_1The corresponding variable field, the plotting result is shown in fig. 4.
In operation S3, after the data processing is completed, it is determined whether all the data to be filled in the document template have been processed, if so, the target document is directly exported, and if not, the unfinished data is processed according to the method in operation S3 until all the data that the user needs to count are processed, and then the target document is exported.
In addition, the definition of the above document automatic generation method is not limited to the specific formula or manner mentioned in the embodiments, and those skilled in the art can make simple changes or substitutions, for example: the distinguishing and solving of the corresponding Data type in operation S3 can be directly omitted if the element included in the variable field in the target document lacks one or more types of Data, and if the marked Data in the target document includes only Direct Data, then operations S302-S306 can be omitted.
In summary, the present embodiment provides a data summarization document generation method based on a custom template, which classifies and analyzes data types to be counted in a target document, specifies a corresponding document template and a configuration file storage rule, fills solved data into the document template according to key information provided by the configuration file, converts the document template into a data summarization document in a specific period, and greatly improves timeliness and normalization of document generation work. Meanwhile, document templates with formats such as Word and Excel can be made according to different functional requirements, required management data can be captured, a target document can be automatically generated, and the cost of human resources is reduced.
The present disclosure provides an electronic device for data summary document generation, as shown in fig. 5, the electronic device 500 includes a processor 510 and a memory 520. The electronic device 500 may perform a method according to an embodiment of the present disclosure shown in fig. 2.
In particular, processor 510 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 510 may also include on-board memory for caching purposes. Processor 510 may be a single processing unit or a plurality of processing units for performing different actions of a method flow according to embodiments of the disclosure.
The memory 520, for example, can be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the readable storage medium include: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or wired/wireless communication links.
The memory 520 may include a computer program 521, which computer program 521 may include code/computer-executable instructions that, when executed by the processor 510, cause the processor 510 to perform a method according to an embodiment of the disclosure, or any variation thereof.
The computer program 521 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 521 may include at least one program module, including for example, module 521A, modules 521B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, and when these program modules are executed by the processor 510, the processor 510 may execute the method according to the embodiment of the present disclosure or any variation thereof.
FIG. 6 schematically shows a system block diagram of data summary document generation in accordance with an embodiment of the present disclosure.
As shown in FIG. 6, the system 600 includes a document template creation module 610, an XML file creation module 620, and a target document generation module 630.
The document template creating module 610 is configured to create a document template, where filling positions corresponding to the data filling indexes recorded in the XML file are marked in the document template.
The XML file creating module 620 is configured to create an XML file, where a data storage index, a data padding index, and a data calculation formula are recorded in the XML file, the data storage index is used to mark at what storage location the data to be padded is acquired, the data calculation formula is used to calculate the acquired data to be padded, and the data padding index is used to mark at what location in the template with the document the calculated data to be padded is padded.
The target document generating module 630 is configured to generate a target document, acquire an XML file, acquire data to be filled according to the data storage index, calculate the data to be filled according to the data calculation formula, fill the calculated data to be filled into the document template according to the data filling index, and generate the target document.
It should be understood that the document template creation module 610, the XML file creation module 620, and the target document generation module 630 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present invention, at least one of the document template creation module 610, the XML file creation module 620, and the target document generation module 630 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in a suitable combination of three implementations, software, hardware, and firmware. Alternatively, at least one of the document template creation module 610, the XML file creation module 620, and the target document generation module 630 may be at least partially implemented as a computer program module, which, when executed by a computer, may perform the functions of the respective modules.
The present disclosure also provides a computer-readable medium, which may be embodied in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer readable medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, a computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical fiber cable, radio frequency signals, etc., or any suitable combination of the foregoing.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (9)

1. A document generation method, comprising:
s1, establishing a blank document; marking the filling position of each data to be filled in the blank document according to the data type of the data to be filled, and generating a document template, wherein the data type comprises directly acquired data, data obtained by searching a database, data obtained by combining the directly acquired data with a business formula, data obtained by combining the database search with the business formula for comprehensive calculation, characters of increasing and decreasing types, and data obtained by combining a chart reflecting the data change trend in a preset time range with the business formula;
s2, establishing an XML file, wherein the XML file records a data storage index, a data calculation formula and a data filling index;
establishing the XML file according to the service name and the unique English identification for the directly acquired data;
for the data obtained by searching the database, establishing the XML file according to the service name, the unique English identification, the database field to be inquired and the form information;
for the data obtained by combining the directly obtained data with the data obtained by calculation of the service formula, establishing the XML file according to the service name, the unique English identification and the calculation formula of the data;
for the data obtained by comprehensive calculation combining database search and a service formula, establishing the XML file according to the service name, the unique English identification and the query information or the calculation formula of the data;
for the characters with growth and decline, establishing the XML file according to the business name, the unique English identification and the referenced data English identification;
for the data obtained by combining a chart reflecting the data change trend in a preset time range and a service formula, establishing the XML file according to the chart name, the data source, the coordinate axis and the title;
s3, acquiring the XML file, acquiring data to be filled according to the data storage index, calculating the data to be filled according to the data calculation formula, filling the calculated data to be filled into the document template according to the data filling index, and generating a target document.
2. The document generating method according to claim 1, wherein in the above operation S2, creating an XML file includes:
acquiring the storage position of each data to be filled, acquiring the data storage index, and writing the data storage index into the XML file;
editing the data calculation formula of the data to be filled, and writing the data calculation formula into the XML file;
and acquiring the filling position of each data to be filled, acquiring the data filling index, and writing the data filling index into the XML file.
3. The method of claim 1, wherein in operation S3, the step of filling the calculated data to be filled into the document template according to the data filling index to generate a target document includes:
and calling a replacement function to fill the calculated data to be filled into a filling position corresponding to the data to be filled in the document template.
4. The document generating method according to claim 1, wherein in operation S3, acquiring data to be filled according to the data storage index, and calculating the data to be filled according to the data calculation formula includes:
and acquiring and calculating the data to be filled according to the sequence of the data filling indexes in the XML file, and recording the number of the processed data filling indexes.
5. The document generating method according to claim 4, wherein in operation S3, the step of generating the target document by filling the calculated data to be filled into the document template according to the data filling index further comprises:
and judging whether the filling of the data to be filled is completed or not according to the number of the processed data filling indexes, if so, directly deriving the target document, and if not, repeating the operation S3 to process the unfilled data.
6. The document generation method of claim 1, wherein marking a filling position of each data to be filled in the blank document comprises:
and marking the filling position of each data to be filled in the blank document by using a bookmark or a row and column mark.
7. A document generation electronic device, comprising:
a processor;
a memory storing a computer executable program which, when executed by the processor, causes the processor to perform the document generation method as claimed in claims 1-6.
8. A document generation system, comprising:
the document template establishing module is used for establishing a document template, and filling positions which correspond to the data to be filled one by one are marked in the document template; wherein the establishing of the document template comprises: a blank document; marking the filling position of each data to be filled in the blank document according to the data type of the data to be filled, and generating a document template, wherein the data type comprises directly acquired data, data obtained by searching a database, data obtained by combining the directly acquired data with a business formula, data obtained by combining the database search with the business formula for comprehensive calculation, characters of increasing and decreasing types, and data obtained by combining a chart reflecting the data change trend in a preset time range with the business formula;
the XML file establishing module is used for establishing an XML file, and a data storage index, a data filling index and a data calculation formula are recorded in the XML file;
establishing the XML file according to the service name and the unique English identification for the directly acquired data;
for the data obtained by searching the database, establishing the XML file according to the service name, the unique English identification, the database field to be inquired and the form information;
for the data obtained by combining the directly obtained data with the data obtained by calculation of the service formula, establishing the XML file according to the service name, the unique English identification and the calculation formula of the data;
for the data obtained by comprehensive calculation combining database search and a service formula, establishing the XML file according to the service name, the unique English identification and the query information or the calculation formula of the data;
for the characters with growth and decline, establishing the XML file according to the business name, the unique English identification and the referenced data English identification;
for the data obtained by combining a chart reflecting the data change trend in a preset time range and a service formula, establishing the XML file according to the chart name, the data source, the coordinate axis and the title;
and the data processing module is used for acquiring the XML file, acquiring data to be filled according to the data storage index, calculating the data to be filled according to a data calculation formula, filling the index according to the data, filling the calculated data to be filled into the document template, and generating a target document.
9. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the document creation method of claims 1-6.
CN201811073238.1A 2018-09-14 2018-09-14 Method, equipment, system and medium for generating data summary document Active CN109388612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811073238.1A CN109388612B (en) 2018-09-14 2018-09-14 Method, equipment, system and medium for generating data summary document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811073238.1A CN109388612B (en) 2018-09-14 2018-09-14 Method, equipment, system and medium for generating data summary document

Publications (2)

Publication Number Publication Date
CN109388612A CN109388612A (en) 2019-02-26
CN109388612B true CN109388612B (en) 2021-01-15

Family

ID=65418711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811073238.1A Active CN109388612B (en) 2018-09-14 2018-09-14 Method, equipment, system and medium for generating data summary document

Country Status (1)

Country Link
CN (1) CN109388612B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977385B (en) * 2019-03-18 2023-04-25 合肥智慧联接科技有限公司 Intelligent data filling method and device, storage medium and terminal
CN110008461A (en) * 2019-04-16 2019-07-12 北京中电普华信息技术有限公司 Document structure tree method and relevant apparatus
CN110263221A (en) * 2019-06-21 2019-09-20 福建南威软件有限公司 A kind of method and system based on xml operation word document
CN110309496B (en) * 2019-06-24 2023-08-22 招商局金融科技有限公司 Data summarizing method, electronic device and computer readable storage medium
CN110866383B (en) * 2019-10-15 2023-09-19 中国直升机设计研究所 Interactive electronic data list generation method and system
CN110826297A (en) * 2019-11-05 2020-02-21 北京锐安科技有限公司 Data export method, device, equipment and storage medium
CN110909520A (en) * 2019-11-14 2020-03-24 北京天融信网络安全技术有限公司 Document construction method and electronic equipment
CN111079388B (en) * 2019-11-15 2023-06-09 中国水利水电第八工程局有限公司 Automatic generation method, system and medium for river interception hydraulic calculation result of hydraulic and hydroelectric engineering
CN111159995A (en) * 2020-01-16 2020-05-15 江西金格科技股份有限公司 Method for generating word document in template mode
CN111581937A (en) * 2020-05-15 2020-08-25 航天科工智慧产业发展有限公司 Document generation method and device, computer readable medium and electronic equipment
CN111859899A (en) * 2020-07-06 2020-10-30 合肥森亿智能科技有限公司 Method, device, equipment and storage medium for parsing and filling Word document
CN112115694B (en) * 2020-08-21 2023-07-04 江苏徐工工程机械研究院有限公司 Simulation report generation method and device based on multi-element data structure
CN112668041B (en) * 2020-12-17 2023-07-04 平安消费金融有限公司 Method and device for generating document file, computer equipment and storage medium
CN112560423A (en) * 2020-12-22 2021-03-26 北京来也网络科技有限公司 Document processing method, device, equipment and medium combining RPA and AI
CN112818655B (en) * 2021-04-19 2021-08-03 中建电子商务有限责任公司 Excel data processing method and tool based on template and file additional writing
CN113435175A (en) * 2021-06-17 2021-09-24 长沙通诺信息科技有限责任公司 Generation method and device of examination batch, terminal equipment and storage medium
CN114387369A (en) * 2022-03-23 2022-04-22 湖北交投智能检测股份有限公司 Automatic generation method and system for road water transport test detection graph

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650712A (en) * 2009-08-18 2010-02-17 深圳市科陆电子科技股份有限公司 Generating management method and system of self-defined report
CN101650711A (en) * 2009-08-18 2010-02-17 深圳市科陆电子科技股份有限公司 Method for generating report
CN101894115A (en) * 2009-05-18 2010-11-24 北京大学 Image data processing method of electronic document and device thereof
CN102156741A (en) * 2011-04-16 2011-08-17 武钢集团昆明钢铁股份有限公司 Custom dynamic report system and implementation method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8549398B2 (en) * 2009-09-17 2013-10-01 International Business Machines Corporation Method and system for handling non-presence of elements or attributes in semi-structured data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894115A (en) * 2009-05-18 2010-11-24 北京大学 Image data processing method of electronic document and device thereof
CN101650712A (en) * 2009-08-18 2010-02-17 深圳市科陆电子科技股份有限公司 Generating management method and system of self-defined report
CN101650711A (en) * 2009-08-18 2010-02-17 深圳市科陆电子科技股份有限公司 Method for generating report
CN102156741A (en) * 2011-04-16 2011-08-17 武钢集团昆明钢铁股份有限公司 Custom dynamic report system and implementation method thereof

Also Published As

Publication number Publication date
CN109388612A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN109388612B (en) Method, equipment, system and medium for generating data summary document
CN111611458B (en) Method for realizing system data architecture carding based on metadata and data analysis technology in big data processing
US9928288B2 (en) Automatic modeling of column and pivot table layout tabular data
CN110109896B (en) UAV flight parameter intelligent reduction method
CN111078702B (en) SQL sentence classification management and unified query method and device
CN103810212A (en) Automated database index creation method and system
CN110765750B (en) Report data input method and terminal equipment
CN110688544A (en) Method, device and storage medium for querying database
US20210073655A1 (en) Rule mining for rule and logic statement development
CN108829651A (en) A kind of method, apparatus of document treatment, terminal device and storage medium
CN110083617B (en) DDL statement processing method and device, electronic device and medium
CN112541692B (en) Scientific data management plan generation method and device
CN109086476A (en) It is a kind of for the data processing method of layout design, PLM plug-in unit and calculate equipment
CN112634004A (en) Blood margin map analysis method and system for credit investigation data
GB2528697A (en) Generating a database structure from a scanned drawing
CN116150236A (en) Data synchronization method and device, electronic equipment and computer readable storage medium
CN114969109A (en) Progressive interactive data query system, method and medium
CN114186554A (en) Script data processing method and device, computer equipment and storage medium
CN112632266B (en) Data writing method and device, computer equipment and readable storage medium
CN114154468A (en) Report synthesis method and device, electronic equipment and storage medium
CN105809577B (en) Power plant informatization data classification processing method based on rules and components
JP2016143106A (en) Business influence portion extraction method based on business variation and business influence portion extraction device
CN116383094B (en) Test case library construction method, device, equipment and storage medium
CN117648339B (en) Data exploration method and device, server and storage medium
CN117033420B (en) Visual display method and device for entity data under same concept of knowledge graph

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