CN105930323A - File generating method and apparatus - Google Patents

File generating method and apparatus Download PDF

Info

Publication number
CN105930323A
CN105930323A CN201510560993.2A CN201510560993A CN105930323A CN 105930323 A CN105930323 A CN 105930323A CN 201510560993 A CN201510560993 A CN 201510560993A CN 105930323 A CN105930323 A CN 105930323A
Authority
CN
China
Prior art keywords
file
content information
subfile
content
generated
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
CN201510560993.2A
Other languages
Chinese (zh)
Other versions
CN105930323B (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 Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201510560993.2A priority Critical patent/CN105930323B/en
Publication of CN105930323A publication Critical patent/CN105930323A/en
Application granted granted Critical
Publication of CN105930323B publication Critical patent/CN105930323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An embodiment of the invention relates to the field of data processing, in particular to a file generating method and apparatus for generating a file of a new format in a simple way. In the embodiment of the invention, the method comprises the steps of acquiring format template information and file content information of a file to be generated, the format template information including identifiers of N sub templates, where N is a positive integer; and acquiring the format template information and file content information of the file to be generated, determining a format template of the file to be generated according to the format template information, acquiring file content of the file to be generated from a data source according to the file content information, and generating the file to be generated according to the format template and the file content of the file to be generated. If a minor change in the format of a part of the file to be generated, only sub templates corresponding to the changed part of the file to be generated are required to change, so that, the mode in which the development of a set of format templates is required when a file of a new format is generated in the prior art is avoided, and the file generating efficiency is improved.

Description

A kind of document generating method and device
Technical field
The present embodiments relate to data processing field, particularly relate to a kind of document generating method and device.
Background technology
Along with the becoming increasingly abundant of class of business of the increasingly extensive and different field of cyber-net application, The demand of data genaration format file (report file in such as financial field) based on data base is more come The most.
Currently for the demand of generation format file, the method that prior art uses is this format file Corresponding a whole set of format module of exploitation, combines a whole set of format module and the data of this exploitation afterwards, generates new Formatted file.During Gai, once the form of this format file occurs in that any minor variations, then be both needed to Again it is a whole set of format module of formatted file exploitation after this change, due to the development efficiency of a whole set of format module Relatively low, therefore generated during the file of multiple format inefficient, further, due to the program by the method In, need to add in system file a whole set of newly-increased format module, system file be modified, Therefore stablizing of system it is unfavorable for.
Summary of the invention
The embodiment of the present invention provides a kind of document generating method and device, new in order to be generated by easy method Formatted file.
The embodiment of the present invention provides a kind of document generating method, comprises the following steps:
Obtain format template information and the document content information of file to be generated;Wherein, format template information bag Including the mark of N number of subtemplate, N is positive integer;
According to the mark of N number of subtemplate, determine N number of subtemplate, and N number of subtemplate is combined, Format module to file to be generated;
According to document content information, obtain the file content of file to be generated from data source;
File content is processed according to format module, obtains to be generated written consistent with format module of form Part.
Preferably, file to be generated is made up of N number of part, the form and of a part of file to be generated The form of individual subtemplate is consistent, the N section of file to be generated and N number of subtemplate one_to_one corresponding;
N number of subtemplate is combined, specifically includes:
According to the part of the file to be generated corresponding to subtemplate each in N number of subtemplate, by N number of submodule Plate combines.
Preferably, according to document content information, obtain the file content of file to be generated from data source, specifically Including:
According to document content information, determine the data volume of the file content that document content information is corresponding;
If the data volume of the file content that document content information is corresponding is more than threshold value, then believe according to file content Breath, generates M group subfile content information;Wherein, in the file that arbitrary group of subfile content information is corresponding Appearance is a part for the file content that document content information is corresponding, the literary composition that wantonly two groups of subfile content informations are corresponding Part content is different, the file that file content that M group subfile content information is corresponding is corresponding with document content information Content is identical;Often the data volume of the file content that group subfile content information is corresponding is not more than threshold value, and M is just Integer;
Obtain M group subfile content information from data source and often organize in the file that subfile content information is corresponding Hold;
File content is processed according to format module, obtains to be generated written consistent with format module of form Part, specifically includes:
M group subfile content information will often organize file content corresponding to subfile content information according to form Template processes, and obtains often organizing Ziwen in the M group subfile content information that form is consistent with format module The file that part content information is corresponding;
The Piece file mergence corresponding by often organizing subfile content information, obtains file to be generated.
Preferably, from data source acquisition M group subfile content information, subfile content information is often organized corresponding File content, specifically include:
Parallel often organizing in the data source that subfile content information is corresponding from M group subfile content information obtains Take the file content that often group subfile content information is corresponding, obtain the file content of file to be generated;
M group subfile content information will often organize file content corresponding to subfile content information according to form Template processes, and obtains often organizing Ziwen in the M group subfile content information that form is consistent with format module The file that part content information is corresponding, specifically includes:
Parallel presses the file content often organizing subfile content information corresponding in M group subfile content information Template processes in accordance with the form provided, obtains in the M group subfile content information that form is consistent with format module every The file that group subfile content information is corresponding.
Preferably, obtain format template information and the document content information of file to be generated, specifically include:
Obtain the configuration information of user;
According to preset rules, configuration information is processed, obtain file to be generated format template information and Document content information.
The embodiment of the present invention provides a kind of file creating apparatus, including:
Acquiring unit, for obtaining format template information and the document content information of file to be generated;Wherein, Format template information includes the mark of N number of subtemplate, and N is positive integer;
Determine unit, for the mark according to N number of subtemplate, determine N number of subtemplate, and by N number of Subtemplate combines, and obtains the format module of file to be generated;According to document content information, obtain from data source The file content of file to be generated;
Processing unit, for being processed according to format module by file content, obtains form and format module Consistent file to be generated.
Preferably, file to be generated is made up of N number of part, the form and of a part of file to be generated The form of individual subtemplate is consistent, the N section of file to be generated and N number of subtemplate one_to_one corresponding;
Determine unit, specifically for:
According to the part of the file to be generated corresponding to subtemplate each in N number of subtemplate, by N number of submodule Plate combines.
Preferably, determine unit, specifically for:
According to document content information, determine the data volume of the file content that document content information is corresponding;
If the data volume of the file content that document content information is corresponding is more than threshold value, then believe according to file content Breath, generates M group subfile content information;Wherein, in the file that arbitrary group of subfile content information is corresponding Appearance is a part for the file content that document content information is corresponding, the literary composition that wantonly two groups of subfile content informations are corresponding Part content is different, the file that file content that M group subfile content information is corresponding is corresponding with document content information Content is identical;Often the data volume of the file content that group subfile content information is corresponding is not more than threshold value, and M is just Integer;
Obtain M group subfile content information from data source and often organize in the file that subfile content information is corresponding Hold;
Processing unit, specifically for:
M group subfile content information will often organize file content corresponding to subfile content information according to form Template processes, and obtains often organizing Ziwen in the M group subfile content information that form is consistent with format module The file that part content information is corresponding;
The Piece file mergence corresponding by often organizing subfile content information, obtains file to be generated.
Preferably, determine unit, specifically for:
Parallel often organizing in the data source that subfile content information is corresponding from M group subfile content information obtains Take the file content that often group subfile content information is corresponding, obtain the file content of file to be generated;
Processing unit, specifically for:
Parallel presses the file content often organizing subfile content information corresponding in M group subfile content information Template processes in accordance with the form provided, obtains in the M group subfile content information that form is consistent with format module every The file that group subfile content information is corresponding.
Preferably, acquiring unit, specifically for:
Obtain the configuration information of user;
According to preset rules, configuration information is processed, obtain file to be generated format template information and Document content information.
In the embodiment of the present invention, obtain format template information and the document content information of file to be generated;Wherein, Format template information includes the mark of N number of subtemplate, and N is positive integer;According to the mark of N number of subtemplate, Determine N number of subtemplate, and N number of subtemplate is combined, obtain the format module of file to be generated;Root According to document content information, obtain the file content of file to be generated from data source;By file content according to form Template processes, and obtains the file to be generated that form is consistent with format module.Due to when needing generation form During file to be generated as format module, user can select each in this file to be generated flexibly The subtemplate that part is corresponding, by being combined by subtemplate corresponding for some, obtains the lattice of file to be generated Formula template.If the form of certain part of file to be generated has trickle variation, the most only change this file to be generated The subtemplate that the part that changes is corresponding, so, then avoids in prior art and is generating format File time need to develop the mode of a whole set of format module, improve file generated efficiency, and without changing system File, improves the stability of system.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below The accompanying drawing used is needed to briefly introduce, it should be apparent that, the accompanying drawing in describing below is only the present invention's Some embodiments, from the point of view of those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of system architecture schematic diagram that the embodiment of the present invention is suitable for;
A kind of document generating method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention;
The structural representation of a kind of file creating apparatus that Fig. 3 provides for the embodiment of the present invention.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and beneficial effect clearer, below in conjunction with accompanying drawing And embodiment, the present invention is further elaborated.Should be appreciated that described herein being embodied as Example only in order to explain the present invention, is not intended to limit the present invention.
As it is shown in figure 1, the system architecture schematic diagram that the embodiment of the present invention is suitable for.This system architecture includes source Data base 101, the file 102 of non-database type, file creating apparatus 103 and destination server.Source Data base 101 is one or more same type or different types of source database.The file of non-database type 102 include multiple same type or different types of file.Source database 101 and the file of non-database type 102 can be located at different system, and are used to deposit data source.File creating apparatus 103 may have access to source data The file 102 of storehouse 101 and non-database type, in order to obtain data source, and generate new based on data source File.File creating apparatus 103 may have access to destination server 104, and destination server 104 is used for storing literary composition The file that part generating means 103 generates.
In the embodiment of the present invention, file creating apparatus 103 is for based on source database 101 or non-database class Data source in the file 102 of type, generates the file with certain format, and file is stored in destination service In device 104.
Based on the system architecture shown in Fig. 1, Fig. 2 shows a kind of file generated that the embodiment of the present invention provides Method method, comprises the following steps:
Step 201, obtains format template information and the document content information of file to be generated;Wherein, form Template Information includes the mark of N number of subtemplate, and N is positive integer;
Step 202, according to the mark of N number of subtemplate, determines N number of subtemplate, and by N number of submodule Plate combines, and obtains the format module of file to be generated;
Step 203, according to document content information, obtains the file content of file to be generated from data source;
Step 204, processes file content according to format module, obtains form consistent with format module File to be generated.
In above-mentioned steps 201, a kind of optional embodiment is that file creating apparatus obtains the configuration of user Information.Concretely user inputs configuration information to file creating apparatus.Afterwards, file creating apparatus according to Preset rules, processes configuration information, obtains format template information and the file content of file to be generated Information.
Another kind of optional embodiment is that the format and content of configuration information all meets the requirements, it is not necessary to joining Confidence breath is further processed, i.e. configuration information is format template information and document content information.
Specifically, form or the form of the configuration information of user's input may be varied, therefore, and literary composition Configuration information is first processed by part generating means, such as, filters out key word from configuration information, and Format template information, and according to the key word filtered out, the key word in configuration information is standardized place Reason, obtains format template information and document content information.Format template information in the embodiment of the present invention and literary composition Part content information can be to have certain format to require, the statement that file creating apparatus can identify and process.
In above-mentioned steps 202, file to be generated is made up of N number of part, a part of file to be generated The form of form and a subtemplate is consistent, the N section of file to be generated and N number of subtemplate one_to_one corresponding; N number of subtemplate is combined by above-mentioned steps 202, particularly as follows:
According to the part of the file to be generated corresponding to subtemplate each in N number of subtemplate, by N number of submodule Plate combines.
Specifically, prestoring subtemplate in the embodiment of the present invention in file creating apparatus, this subtemplate is pin To the template set by a part of a file.Give an example, a file generally includes multiple portion Point, respectively header line, detailed row, summary row, then can store multiple format in file creating apparatus Header line subtemplate, each header line subtemplate all has identification number, such as A01, A02, an A03 etc.; Can store the detailed row subtemplate of multiple format in file creating apparatus, each detailed row subtemplate all has one Individual identification number, such as B01, B02, B03 etc.;File creating apparatus can store the remittance of multiple format Head office's subtemplate, each summary row subtemplate all has identification number, such as C01, C02, a C03 etc..
Some key words that file creating apparatus obtains from configuration information can be data source location, data source mark Know, screening key word, destination server identify, and call format etc..Give an example, configuration information Including two parts, the document content information of file the most to be generated and the format module letter of file to be generated Breath.Wherein document content information is: obtain card number is 123456789 the 2014 of Zhang San from source database 1 The day-to-day account record in the whole year in year, generates credit record table, and credit record table is stored in destination server 123 In.Format template information is: header line uses template A01, detailed enforcement to use template B05, collect enforcement Use template C03.
Visible, the various piece of a file is all fabricated to a subtemplate, then each portion of a file Point all can the combination of freedom and flexibility so that file creating apparatus is according only to format template information, can generate Format module various in style, and, when the form of certain part of file to be generated has slight change, The subtemplate changed only changed in the format template information of this document identifies, or newly-increased one The subtemplate changed, due to subtemplate be only file format module in a part, may It is the pattern etc. of the pattern of header line, detailed row, it is to avoid prior art needs again to develop a whole set of The situation of the format module of file, improves efficiency and the motility of the format module generation of file, further Improve the efficiency of file generated.
In being embodied as, it will usually the situation that the data volume of data source is bigger occurs, in order to promote literary composition further Part formation efficiency, provides one to be preferably carried out mode in the embodiment of the present invention, in above-mentioned steps 203, and root According to document content information, determine the data volume of the file content that document content information is corresponding;If file content is believed The data volume of the file content that breath is corresponding more than threshold value, then according to document content information, generates M Ziwen Part content information;Wherein, the file content that any one subfile content information is corresponding is document content information pair A part for the file content answered, the file content that any two subfile content informations are corresponding is different, M son The file content that file content that document content information is corresponding is corresponding with document content information is identical;Often organize Ziwen The data volume of the file content that part content information is corresponding is not more than threshold value, and M is positive integer;Obtain from data source M group subfile content information often organizes the file content that subfile content information is corresponding.By M group subfile The file content often organizing subfile content information corresponding in content information processes according to format module, obtains The M group subfile content information that form is consistent with format module often organizes the literary composition that subfile content information is corresponding Part;The Piece file mergence corresponding by often organizing subfile content information, obtains file to be generated.
Give an example, from source database 1, obtain the whole year in card number is 123456789 2014 of Zhang San Day-to-day account record, generate credit record table, and credit record table be stored in destination server 123. The format template information of file to be generated is: header line uses template A01, detailed enforcement to use template B05, Summary row uses template C03.The data volume that this document content information is corresponding is 1000 records, more than threshold Value 100, therefore, is grouped file content corresponding for document content information.
The foundation of packet has multiple, now provides one to be optionally grouped foundation, and every record all has a transaction Mark, such as, transaction ID 1, transaction ID 2, transaction ID 3 etc..Each transaction ID is corresponding Record is all less than 100.Now, M group subfile content information is generated by sub-transaction ID, it is assumed that generate 10 groups of subfile content informations, the subfile content information that first group of file content is corresponding is: from source database Transaction Identification Number mark 1 in the day-to-day account record in the whole year in card number is 123456789 2014 obtaining Zhang San in 1 Record;The subfile content information that second group of file content is corresponding is: obtain Zhang San from source database 1 The whole year in card number is 123456789 2014 day-to-day account record in Transaction Identification Number mark 2 record;… The subfile content information that tenth group of file content is corresponding is: the card number obtaining Zhang San from source database 1 is The record of Transaction Identification Number mark 10 in the day-to-day account record in the whole year in 2014 of 123456789.
Template A01, detailed enforcement is used to use template B05, summary row according to the requirement header line of format module Use template C03, and the file content that first group of subfile content information is corresponding, generate first group of Ziwen The file that part content information is corresponding;Will file content corresponding to first group of subfile content information according to form The requirement of template, treated exports.Template A01 is used according to the requirement header line of format module, bright Thin enforcement uses template B05, and summary row uses template C03, and second group of subfile content information is corresponding File content, generates second group of file corresponding to subfile content information;... according to the requirement mark of format module Topic enforcement template A01, detailed enforcement template B05, summary row uses template C03, and the tenth group The file content that subfile content information is corresponding, generates the tenth group of file that subfile content information is corresponding.It After, according to the file that this ten groups of subfile content informations are corresponding, generate file to be generated.
In order to further increase file generated efficiency, one is preferred embodiment, obtains from data source M group subfile content information often organizes the file content that subfile content information is corresponding, specifically includes:
Parallel often organizing in the data source that subfile content information is corresponding from M group subfile content information obtains Take the file content that often group subfile content information is corresponding, obtain the file content of file to be generated;Parallel M group subfile content information will often organize file content corresponding to subfile content information according to format module Process, obtain the M group subfile content information that form is consistent with format module is often organized in subfile The file that appearance information is corresponding.
It can be seen from the above: in the embodiment of the present invention, obtains the format template information of file to be generated And document content information;Wherein, format template information includes the mark of N number of subtemplate, and N is positive integer; According to the mark of N number of subtemplate, determine N number of subtemplate, and N number of subtemplate is combined, treated Generate the format module of file;According to document content information, obtain in the file of file to be generated from data source Hold;File content is processed according to format module, obtains to be generated written consistent with format module of form Part.Owing to when needing to generate form file to be generated as format module, user can select flexibly The subtemplate that each part in this file to be generated is corresponding, by by subtemplate group corresponding for some Close, obtain the format module of file to be generated.If the form of certain part of file to be generated has trickle variation, The most only change the subtemplate that part that this file to be generated changes is corresponding, so, then avoid existing There is the mode that need to develop a whole set of format module in technology when generating the file of format, improve file generated Efficiency, and without changing system file, improve the stability of system.
Fig. 3 illustrates the structural representation of a kind of file creating apparatus that the embodiment of the present invention provides.
Based on same idea, as it is shown on figure 3, the embodiment of the present invention provides a kind of file creating apparatus, including Acquiring unit 301, determine unit 302, processing unit 303:
Acquiring unit, for obtaining format template information and the document content information of file to be generated;Wherein, Format template information includes the mark of N number of subtemplate, and N is positive integer;
Determine unit, for the mark according to N number of subtemplate, determine N number of subtemplate, and by N number of Subtemplate combines, and obtains the format module of file to be generated;According to document content information, obtain from data source The file content of file to be generated;
Processing unit, for being processed according to format module by file content, obtains form and format module Consistent file to be generated.
Preferably, file to be generated is made up of N number of part, the form and of a part of file to be generated The form of individual subtemplate is consistent, the N section of file to be generated and N number of subtemplate one_to_one corresponding;
Determine unit, specifically for:
According to the part of the file to be generated corresponding to subtemplate each in N number of subtemplate, by N number of submodule Plate combines.
Preferably, determine unit, specifically for:
According to document content information, determine the data volume of the file content that document content information is corresponding;
If the data volume of the file content that document content information is corresponding is more than threshold value, then believe according to file content Breath, generates M group subfile content information;Wherein, in the file that arbitrary group of subfile content information is corresponding Appearance is a part for the file content that document content information is corresponding, the literary composition that wantonly two groups of subfile content informations are corresponding Part content is different, the file that file content that M group subfile content information is corresponding is corresponding with document content information Content is identical;Often the data volume of the file content that group subfile content information is corresponding is not more than threshold value, and M is just Integer;
Obtain M group subfile content information from data source and often organize in the file that subfile content information is corresponding Hold;
Processing unit, specifically for:
M group subfile content information will often organize file content corresponding to subfile content information according to form Template processes, and obtains often organizing Ziwen in the M group subfile content information that form is consistent with format module The file that part content information is corresponding;
The Piece file mergence corresponding by often organizing subfile content information, obtains file to be generated.
Preferably, determine unit, specifically for:
Parallel often organizing in the data source that subfile content information is corresponding from M group subfile content information obtains Take the file content that often group subfile content information is corresponding, obtain the file content of file to be generated;
Processing unit, specifically for:
Parallel presses the file content often organizing subfile content information corresponding in M group subfile content information Template processes in accordance with the form provided, obtains in the M group subfile content information that form is consistent with format module every The file that group subfile content information is corresponding.
Preferably, acquiring unit, specifically for:
Obtain the configuration information of user;
According to preset rules, configuration information is processed, obtain file to be generated format template information and Document content information.
It can be seen from the above: in the embodiment of the present invention, obtains the format template information of file to be generated And document content information;Wherein, format template information includes the mark of N number of subtemplate, and N is positive integer; According to the mark of N number of subtemplate, determine N number of subtemplate, and N number of subtemplate is combined, treated Generate the format module of file;According to document content information, obtain in the file of file to be generated from data source Hold;File content is processed according to format module, obtains to be generated written consistent with format module of form Part.Owing to when needing to generate form file to be generated as format module, user can select flexibly The subtemplate that each part in this file to be generated is corresponding, by by subtemplate group corresponding for some Close, obtain the format module of file to be generated.If the form of certain part of file to be generated has trickle variation, The most only change the subtemplate that part that this file to be generated changes is corresponding, so, then avoid existing There is the mode that need to develop a whole set of format module in technology when generating the file of format, improve file generated Efficiency, and without changing system file, improve the stability of system.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method or computer journey Sequence product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or combine software Form with the embodiment of hardware aspect.And, the present invention can use and wherein include meter one or more The computer-usable storage medium of calculation machine usable program code (include but not limited to disk memory, CD-ROM, optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and / or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/ Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know base This creativeness concept, then can make other change and amendment to these embodiments.So, appended right is wanted Ask and be intended to be construed to include preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention Bright spirit and scope.So, if the present invention these amendment and modification belong to the claims in the present invention and Within the scope of its equivalent technologies, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a document generating method, it is characterised in that comprise the following steps:
Obtain format template information and the document content information of file to be generated;Wherein, described format module letter Breath includes the mark of N number of subtemplate, and N is positive integer;
According to the mark of described N number of subtemplate, determine described N number of subtemplate, and by described N number of son Form assembly, obtains the format module of described file to be generated;
According to described document content information, obtain the file content of described file to be generated from data source;
Described file content is processed according to described format module, obtains form and described format module one The file described to be generated caused.
2. the method for claim 1, it is characterised in that described file to be generated is by N number of part Composition, the form of a part of described file to be generated and the form of a subtemplate are consistent, described to be generated Become the N section of file and N number of subtemplate one_to_one corresponding;
Described by the combination of described N number of subtemplate, specifically include:
According to the part of the file described to be generated corresponding to subtemplate each in N number of subtemplate, by described N Individual sub-form assembly.
3. the method for claim 1, it is characterised in that described according to described document content information, Obtain the file content of described file to be generated from data source, specifically include:
According to described document content information, determine the data of the file content that described document content information is corresponding Amount;
If the data volume of the file content that described document content information is corresponding is more than threshold value, then according to described file Content information, generates M group subfile content information;Wherein, arbitrary group of subfile content information is corresponding File content is a part for the file content that described document content information is corresponding, wantonly two groups of subfile contents letter The file content that breath is corresponding is different, file content that described M group subfile content information is corresponding and described literary composition The file content that part content information is corresponding is identical;The often data of the file content that group subfile content information is corresponding Amount is not more than described threshold value, and M is positive integer;
Obtain described M group subfile content information from data source and often organize the literary composition that subfile content information is corresponding Part content;
Described described file content is processed according to described format module, obtain form and described form mould The file described to be generated that plate is consistent, specifically includes:
By described M group subfile content information is often organized file content corresponding to subfile content information according to Described format module processes, and obtains in the described M group subfile that form is consistent with described format module Appearance information is often organized the file that subfile content information is corresponding;
By Piece file mergence corresponding for described often group subfile content information, obtain described file to be generated.
4. method as claimed in claim 3, it is characterised in that described from the data source described M group of acquisition Subfile content information is often organized the file content that subfile content information is corresponding, specifically includes:
Parallel often organizes, from described M group subfile content information, the data source that subfile content information is corresponding The file content that subfile content information is corresponding is often organized in middle acquisition, obtains in the file of described file to be generated Hold;
Described described M group subfile content information will often organize the file content that subfile content information is corresponding Process according to described format module, obtain the described M group Ziwen that form is consistent with described format module Part content information is often organized the file that subfile content information is corresponding, specifically includes:
Parallel often will organize in the file that subfile content information is corresponding in described M group subfile content information Hold and process according to described format module, obtain described M group that form is consistent with described format module Document content information is often organized the file that subfile content information is corresponding.
5. the method as described in any claim in Claims 1-4, it is characterised in that described in obtain Take format template information and the document content information of file to be generated, specifically include:
Obtain the configuration information of user;
According to preset rules, described configuration information is processed, obtain the described lattice of described file to be generated Formula Template Information and described document content information.
6. a file creating apparatus, it is characterised in that including:
Acquiring unit, for obtaining format template information and the document content information of file to be generated;Wherein, Described format template information includes the mark of N number of subtemplate, and N is positive integer;
Determine unit, for the mark according to described N number of subtemplate, determine described N number of subtemplate, And described N number of subtemplate is combined, obtain the format module of described file to be generated;According in described file Appearance information, obtains the file content of described file to be generated from data source;
Processing unit, for described file content is processed according to described format module, obtain form with The file described to be generated that described format module is consistent.
7. device as claimed in claim 6, it is characterised in that described file to be generated is by N number of part Composition, the form of a part of described file to be generated and the form of a subtemplate are consistent, described to be generated Become the N section of file and N number of subtemplate one_to_one corresponding;
Described determine unit, specifically for:
According to the part of the file described to be generated corresponding to subtemplate each in N number of subtemplate, by described N Individual sub-form assembly.
8. device as claimed in claim 6, it is characterised in that described determine unit, specifically for:
According to described document content information, determine the data of the file content that described document content information is corresponding Amount;
If the data volume of the file content that described document content information is corresponding is more than threshold value, then according to described file Content information, generates M group subfile content information;Wherein, arbitrary group of subfile content information is corresponding File content is a part for the file content that described document content information is corresponding, wantonly two groups of subfile contents letter The file content that breath is corresponding is different, file content that described M group subfile content information is corresponding and described literary composition The file content that part content information is corresponding is identical;The often data of the file content that group subfile content information is corresponding Amount is not more than described threshold value, and M is positive integer;
Obtain described M group subfile content information from data source and often organize the literary composition that subfile content information is corresponding Part content;
Described processing unit, specifically for:
By described M group subfile content information is often organized file content corresponding to subfile content information according to Described format module processes, and obtains in the described M group subfile that form is consistent with described format module Appearance information is often organized the file that subfile content information is corresponding;
By Piece file mergence corresponding for described often group subfile content information, obtain described file to be generated.
9. device as claimed in claim 8, it is characterised in that described determine unit, specifically for:
Parallel often organizes, from described M group subfile content information, the data source that subfile content information is corresponding The file content that subfile content information is corresponding is often organized in middle acquisition, obtains in the file of described file to be generated Hold;
Described processing unit, specifically for:
Parallel often will organize in the file that subfile content information is corresponding in described M group subfile content information Hold and process according to described format module, obtain described M group that form is consistent with described format module Document content information is often organized the file that subfile content information is corresponding.
10. the device as described in any claim in claim 6 to 9, it is characterised in that described in obtain Take unit, specifically for:
Obtain the configuration information of user;
According to preset rules, described configuration information is processed, obtain the described lattice of described file to be generated Formula Template Information and described document content information.
CN201510560993.2A 2015-09-06 2015-09-06 A kind of document generating method and device Active CN105930323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510560993.2A CN105930323B (en) 2015-09-06 2015-09-06 A kind of document generating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510560993.2A CN105930323B (en) 2015-09-06 2015-09-06 A kind of document generating method and device

Publications (2)

Publication Number Publication Date
CN105930323A true CN105930323A (en) 2016-09-07
CN105930323B CN105930323B (en) 2019-05-24

Family

ID=56839889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510560993.2A Active CN105930323B (en) 2015-09-06 2015-09-06 A kind of document generating method and device

Country Status (1)

Country Link
CN (1) CN105930323B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018145635A1 (en) * 2017-02-08 2018-08-16 深圳壹账通智能科技有限公司 File generation method, device, server, and storage medium
CN110674628A (en) * 2019-09-25 2020-01-10 中国工商银行股份有限公司 File template generation method and system
CN112434502A (en) * 2020-11-04 2021-03-02 西安理工大学 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt
CN113627145A (en) * 2021-08-02 2021-11-09 上海浦东发展银行股份有限公司 Method, device, equipment and medium for generating file of parameterized configuration

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819564A (en) * 2012-07-05 2012-12-12 无锡中科泛在信息技术研发中心有限公司 Method for generating report forms by limited table element combination
CN104598635A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Automatic complex document generating method based on XML (Extensive Markup Language) description

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819564A (en) * 2012-07-05 2012-12-12 无锡中科泛在信息技术研发中心有限公司 Method for generating report forms by limited table element combination
CN104598635A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Automatic complex document generating method based on XML (Extensive Markup Language) description

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018145635A1 (en) * 2017-02-08 2018-08-16 深圳壹账通智能科技有限公司 File generation method, device, server, and storage medium
US10802804B2 (en) 2017-02-08 2020-10-13 One Connect Smart Technology Co., Ltd. File generation method, device, server, and storage medium
CN110674628A (en) * 2019-09-25 2020-01-10 中国工商银行股份有限公司 File template generation method and system
CN110674628B (en) * 2019-09-25 2023-08-22 中国工商银行股份有限公司 File template generation method and system
CN112434502A (en) * 2020-11-04 2021-03-02 西安理工大学 Method for automatically identifying CAD (computer-aided design) engineering drawing of bolt
CN112434502B (en) * 2020-11-04 2024-05-28 西安理工大学 Method for automatically identifying CAD engineering drawing of bolt
CN113627145A (en) * 2021-08-02 2021-11-09 上海浦东发展银行股份有限公司 Method, device, equipment and medium for generating file of parameterized configuration

Also Published As

Publication number Publication date
CN105930323B (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN109741517A (en) A kind of invoice checking method, device and system
US20210365421A1 (en) Data analysis method, computer device and storage medium
CN105930323A (en) File generating method and apparatus
CN106302579A (en) The distribution method of a kind of task and server
CN106325756B (en) Data storage method, data calculation method and equipment
CN106250303A (en) Business diary collection and early warning system and business diary collection and method for early warning
CN109697537A (en) The method and apparatus of data audit
CN107291745B (en) Data index management method and device
CN110471754A (en) Method for exhibiting data, device, equipment and storage medium in job scheduling
CN108764319A (en) A kind of sample classification method and apparatus
CN106155769A (en) A kind of workflow processing method, device and workflow engine
CN110084658A (en) The matched method and apparatus of article
CN109522332A (en) Customer profile data merging method, device, equipment and readable storage medium storing program for executing
CN109145050B (en) Computing device
CN109815448A (en) Lantern slide generation method and device
CN105786941B (en) Information mining method and device
CN109582476A (en) Data processing method, apparatus and system
CN110222286A (en) Information acquisition method, device, terminal and computer readable storage medium
CN106250243B (en) The processing method and processing device of banking system application based on poll tupe
CN103064862B (en) A kind of multi objective sorting data disposal route and equipment
CN109120509A (en) A kind of method and device that information is collected
CN106469168B (en) The method and device that diversiform data is handled in data integrated system
CN113609122A (en) Data quality scanning method and system
CN109543024B (en) Text processing method and device
CN111125063A (en) Method and device for rapidly verifying data migration among clusters

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant