CN107329942A - Report form generation method and device based on tree structure - Google Patents

Report form generation method and device based on tree structure Download PDF

Info

Publication number
CN107329942A
CN107329942A CN201710507137.XA CN201710507137A CN107329942A CN 107329942 A CN107329942 A CN 107329942A CN 201710507137 A CN201710507137 A CN 201710507137A CN 107329942 A CN107329942 A CN 107329942A
Authority
CN
China
Prior art keywords
tree structure
node
data
report
object array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710507137.XA
Other languages
Chinese (zh)
Inventor
刘正方
林峰平
魏洪飞
陈林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY 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 SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd filed Critical SHENZHEN KANGBIDA ZHONGCHUANG TECHNOLOGY Co Ltd
Priority to CN201710507137.XA priority Critical patent/CN107329942A/en
Publication of CN107329942A publication Critical patent/CN107329942A/en
Pending legal-status Critical Current

Links

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/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • 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/174Form filling; Merging

Abstract

The invention discloses a kind of report form generation method and device based on tree structure.Relative to prior art, by way of pre-setting the corresponding relation of report form type and tree structure, so that all there is its corresponding tree structure for the form of different types, and encode data at the appointed time in section by obtaining all variables of tree structure, and inserted after being pre-processed in the node of tree structure, enabling generate form using the tree structure for having inserted data.This kind of mode has exploitation simple, and cost is low, and flexibility it is strong the advantages of, disclosure satisfy that the demand of most of enterprise.The corresponding relation of further setting report form type and tree structure, the problem of can avoiding repeating to model.

Description

Report form generation method and device based on tree structure
Technical field
The present invention relates to data processing field, more particularly to a kind of report form generation method and device based on tree structure.
Background technology
Energy management system is an important component of Enterprise Informatization system, for being adopted to multi-energy data Collect, process, analyze, handle, with the level for improving energy system operation and managing, reduction energy resource consumption is there is provided quality is energized, by force Change and improve energy check appraisement system, raise labour productivity, improve environmental quality, and then it is competing to improve the market of enterprise product Strive power.
Wherein, form is the important tool for analyzing energy consumption, and domestic system, foreign system can be realized present on market Some basic forms, but there is the special form used for oneself in each enterprise, as crystal report, needs programming, or It is familiar to database just to develop multi-functional form.Therefore, the exploitation of current form is complicated, and development cost is high, right In enterprise be than larger burden.
The content of the invention
It is a primary object of the present invention to provide a kind of report form generation method and device based on tree structure, it is intended to solve The exploitation of form is complicated in the prior art, and the high technical problem of cost.
To achieve the above object, first aspect present invention provides a kind of report form generation method based on tree structure, including: In response to report generation instruction, using the report generation instruct the report form type that includes search preset report form type with it is tree-like The corresponding relation of structure, obtains corresponding tree structure;
According to the variable coding of the node extraction from the tree structure, obtain all variable codings from database and specify Data in period;
The data are pre-processed, and pretreated data are inserted in the corresponding node of the tree structure;
Tree structure according to data have been inserted in node generates form.
To achieve the above object, second aspect of the present invention provides a kind of report generation device based on tree structure, including:
Searching modul, for being instructed in response to report generation, instructs the report form type included to look into using the report generation The corresponding relation of preset report form type and tree structure is looked for, corresponding tree structure is obtained;
Acquisition module, for according to the variable coding extracted from the node of the tree structure, obtaining all from database Variable coding specify the period in data;
Module is inserted, for the data to be pre-processed, and pretreated data the tree structure is inserted into In corresponding node;
Generation module, for generating form according to the tree structure that data have been inserted in node.
The present invention provides a kind of report form generation method based on tree structure, and this method includes, referred in response to report generation Order, the corresponding relation of the preset report form type of the report form type lookup included and tree structure is instructed using the report generation, is obtained Corresponding tree structure is taken, is encoded according to the variable of the node extraction from the tree structure, all changes is obtained from database Amount coding specifies the data in the period, the data is pre-processed, and pretreated data are inserted into tree structure phase In the node answered, form is generated according to the tree structure that data have been inserted in node.Relative to prior art, by pre-setting The mode of the corresponding relation of report form type and tree structure so that all have its corresponding tree-like for the form of different types Structure, and data at the appointed time in section are encoded by obtaining all variables of tree structure, and insert after being pre-processed In the node of tree structure, enabling generate form using the tree structure for having inserted data.This kind of mode has exploitation letter Single, cost is low, and flexibility it is strong the advantages of, disclosure satisfy that the demand of most of enterprise.It is further that report form type and tree are set The corresponding relation of shape structure, the problem of can avoiding repeating to model.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those skilled in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is the schematic flow sheet of the report form generation method based on tree structure in first embodiment of the invention;
Fig. 2 is the schematic flow sheet of the refinement step of step 103 in first embodiment of the invention;
Fig. 3 is the schematic flow sheet of the refinement step of step 104 in first embodiment of the invention;
Fig. 4 a are the schematic diagram of report form type in the embodiment of the present invention;
Fig. 4 b are the schematic diagram of the form based on the report form type generation in Fig. 4 a;
Fig. 5 a are another schematic diagram of report form type in the embodiment of the present invention;
Fig. 5 b are the schematic diagram of the form based on the report form type generation in Fig. 5 a;
Fig. 6 a are another schematic diagram of report form type in the embodiment of the present invention;
Fig. 6 b are the schematic diagram of the form based on the report form type generation in Fig. 6 a;
Fig. 7 is the structural representation of the report generation device based on tree structure in second embodiment of the invention;
Fig. 8 be second embodiment of the invention in insert module 703 refinement structure schematic diagram;
Fig. 9 is the schematic diagram of the refinement structure of generation module 704 in second embodiment of the invention.
Embodiment
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described reality It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the art The every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
It is complicated due to there is the exploitation of form in the prior art, and the high technical problem of development cost.
In order to solve the above-mentioned technical problem, the present invention proposes a kind of report form generation method and device based on tree structure, Relative to prior art, by way of pre-setting the corresponding relation of report form type and tree structure so that for different The form of type all has its corresponding tree structure, and encodes at the appointed time section by all variables for obtaining tree structure Interior data, and insert in the node of tree structure after being pre-processed, enabling utilize the tree structure for having inserted data Generate form.This kind of mode has exploitation simple, and cost is low, and flexibility it is strong the advantages of, disclosure satisfy that the need of most of enterprise Ask.The corresponding relation of further setting report form type and tree structure, the problem of can avoiding repeating to model.
Referring to Fig. 1, be the schematic flow sheet of the report form generation method based on tree structure in first embodiment of the invention, The report form generation method includes:
Step 101, instruct in response to report generation, instruct the report form type that includes to search using the report generation preset Report form type and tree structure corresponding relation, obtain corresponding tree structure;
In embodiments of the present invention, the above-mentioned report form generation method based on tree structure can be by based on tree structure Report generation device is (hereinafter referred to as:Generating means) to realize, the generating means can be computer.
Wherein, the report form type of a variety of different types of forms and the corresponding relation of tree structure are pre-set, so as to The form of each report form type has its corresponding tree structure, it is contemplated that Chinese Enterprise form is more complicated, is all a lot Multilevel report, by the form of the classification such as equipment, department, various summations, collects, calculates and require with when ring ratio etc., tree structure The demand of the multi-level node of form can just be met, the critical problems such as the cell span of the gauge outfit of form are met, by This understands, by setting the corresponding relation of report form type and tree structure in the embodiment of the present invention, enabling simplify form Modeling process, and meet demand of the enterprise to form.Based on the principle, a variety of inhomogeneities are pre-set in the embodiment of the present invention The report form type of the form of type and the corresponding relation of tree structure.
Wherein, each node of tree structure can correspond to a table, each single item correspondence form of table in database In a row.The data for generating form are saved in the database.
Wherein, if user performs report generation operation in the generating means, the generating means will respond the form Generation instruction, wherein, the report form type of form to be generated is contained in report generation instruction, generating means utilize the form Report form type and the corresponding relation of tree structure that type search is pre-set, obtain corresponding tree structure.
Step 102, the variable coding according to the node extraction from the tree structure, all variables are obtained from database Coding specifies the data in the period;
In embodiments of the present invention, the title of carry form node is encoded with variable on the node of tree structure, wherein, should Variable coding can be that numeric coding can also be calculation formula coding.Wherein, when numeric coding refers to it as node, its institute What is filled in corresponding row or column is the data in database, and calculation formula is encoded when referring to it as node, corresponding Row or column needs to call calculation formula to calculate data and insert the row or column.
Wherein, the variable in calculation formula needs to be included with bracket, to distinguish different variables, for example, calculating Formula can be [tag1]+[tag2] * 10- ([tag3]/[tag4]).Wherein, by setting calculation formula in tree structure, So that just calculating processing automatically can be carried out to the data in form, in report generation without after report generation Calculated by user is manually operated, simpler convenience, and reduce the operation of user.
After the tree structure of form to be generated is obtained, all variables are extracted from the node of the tree node Coding, and encoded according to the variable, the data in all variable coding specified periods are obtained from database, wherein, should The specified period can be 1 year, one month or one day etc..Wherein, if year, then will by January to display data in December, If the moon, then No. 1 to No. 31 display data will be pressed, if day, then according to the 1st hour to 24 hours display datas.
Step 103, the data are pre-processed, and it is corresponding that pretreated data are inserted into the tree structure In node;
Step 104, according to inserted in node data tree structure generate form.
In embodiments of the present invention, generating means pre-process the data to acquisition, and by pretreated data Insert in the corresponding node of tree structure, and the tree structure for having inserted data using node generates form.Wherein, tree structure Root node can as generation report name, and content in other nodes of tree structure can be the content of form.
In embodiments of the present invention, generating means are instructed in response to report generation, instruct what is included using the report generation Report form type searches the corresponding relation of preset report form type and tree structure, obtains corresponding tree structure, according to from described The variable coding that the node of tree structure is extracted, the data in all variable coding specified periods are obtained from database, will The data are pre-processed, and pretreated data are inserted in the corresponding node of tree structure, according to having been inserted in node The tree structure generation form of data.Relative to prior art, by pre-setting report form type pass corresponding with tree structure The mode of system so that all there is its corresponding tree structure for the form of different types, and by obtaining tree structure The data of all variables coding at the appointed time in section, and insert in the node of tree structure after being pre-processed, enabling Form is generated using the tree structure for having inserted data.This kind of mode has exploitation simple, and cost is low, and flexibility is strong etc. excellent Point, disclosure satisfy that the demand of most of enterprise.The corresponding relation of further setting report form type and tree structure, can be avoided The problem of repeating to model.
Referring to Fig. 2, being the schematic flow sheet of the refinement step of step 103 in first embodiment of the invention, the step 103 Refinement step include:
Step 201, to the multiple object array carry out circulate operation, it is determined that the data ID length for the object array being recycled to Degree, utilizes node rank of the object array being recycled to described in data ID length determination in the tree structure;
In embodiments of the present invention, the data in database are present in the way of object array, are obtaining multiple right After array, generating means will carry out the restructuring of sub- father node, realize the purpose for the node that data are inserted to tree structure.
For multiple object arrays, generating means will carry out circulate operation to it, and for object that each is recycled to Array, will all determine data encoding (ID) length of the object array being recycled to, and determine circulation using data ID length Node rank of the object array arrived in tree structure.
Wherein, in tree structure, root node is first nodes, and next node layer of root node is two-level node, two grades The next stage node of node is three-level node, and so on.
Wherein, it is contemplated that a node layer is generally represented by the data of N number of length, it therefore, it can utilize data ID length Node rank is used as with N business.Wherein, the N can be 3, i.e., using 3 data as one layer.
By above-mentioned circulate operation, node rank of each object array in tree structure can be obtained.
Step 202, the current number carried out to the multiple object array in circulate operation, the object array that acquisition is recycled to According to, current data father node ID affiliated in the tree structure is determined using the current data, and described in Father node ID and the node rank determine object array node affiliated in the tree structure, by the father node ID is added in upper one object array being recycled to and calls records [key] function, to obtain parent data object;
In embodiments of the present invention, after multiple object arrays are completed with one cycle, one cycle will be also performed again Operation, and the current data in the object array being recycled to is obtained, the current data can be represented with current data, and be entered One step, current data father node ID affiliated in tree structure will be determined using the current data.
It is appreciated that to understand, is obtaining object array and belong to the node rank and the father node ID of tree node In the case of, it may further determine that object array node affiliated in tree structure.
Father node ID is also added in upper one object array being recycled to by generating means, and calls records [key] function, to obtain parent data object, wherein, the parent data object can be represented with parent data objects.
If step 203, the parent data object are not sky, the current data is put into the object array described In node belonging in tree structure;If the parent data object is sky, the current data is put into the object array In the child node of node belonging in the tree structure.
In embodiments of the present invention, after parent data objects are obtained, generating means determine the parent data Whether object is empty, if not empty, then the current data in the object array being recycled to is put into the object being recycled to In node belonging to array, if the parent data objects are sky, the current data are put into belonging to the circulation array Node child node in.
In embodiments of the present invention, by the above-mentioned means, can effectively place data into the node of tree structure.
Referring to Fig. 3, being the schematic flow sheet of the refinement step of step 104 in first embodiment of the invention, the step 104 Including:
Step 301, determine using preset node stratification to have inserted the form corresponding to the tree structure of data Gauge outfit;
Step 302, by the data in the node of the tree structure according in the incoming form of the gauge outfit;
If calculation formula is included in step 303, the tree structure, using the calculation formula in the form Corresponding data is calculated, and inserts the form, to complete the generation of form.
In embodiments of the present invention, pre-set node stratification, in the node stratification comprising node title or The relation and combination situation of the upper lower node of the corresponding variable coding of person's title, generating means can be true using the node stratification The gauge outfit of the fixed corresponding form of tree structure for having inserted data, and by the data of the node of tree structure according to the incoming report of gauge outfit In table, and further, if including calculation formula in tree structure, the corresponding data in form is entered using the calculation formula Row is calculated, and inserts form.If for example, the calculation formula is sum formula, and variable coding belongs to capable, then in the row Each corresponding row, is all summed all data of the row, and the numerical value of summation is inserted in the corresponding position of the row.
In embodiments of the present invention, by the above-mentioned means, can be effectively using in the tree structure for having inserted data Node generates form, and in the case of with calculation formula, corresponding calculate can be completed using calculation formula.
In embodiments of the present invention, report form type is to form by being sorted out, and by the way that form is sorted out Into a variety of different report form types, enabling complete the generation of form, Neng Gouman by the corresponding tree structure of report form type The demand of foot major part enterprise.And form is generated by using tree structure, it can solve the problem that the multilevel report of complexity is crucial and build Modulus problem, in addition, same report form template can realize date report capability, is user-friendly, it is not necessary to repeat to model.
In order to be better understood from the technical scheme in the embodiment of the present invention, Fig. 4 a are referred to, are report in the embodiment of the present invention The schematic diagram of table type, wherein, the interface of the report form type is properly termed as form configuration interface.In actual applications, Yong Huke To change the report form type by way of addition, deletion, modulation positions, and it is understood that become in report form type In the case of change, its corresponding tree node will be also adjusted correspondingly.
Using the report form generation method based on tree structure provided in first embodiment of the invention, it will generate such as Fig. 4 b institutes The form shown, is that, using year as form, and wherein, last column is Statistics Bar in form, and the variable coding for showing the row is meter Calculate formula coder.
Fig. 5 a are referred to, is another schematic diagram of report form type in the embodiment of the present invention, refers to Fig. 5 b, for based on Fig. 5 a The schematic diagram of the form of shown report form type generation.
Fig. 6 a are referred to, is another schematic diagram of report form type in the embodiment of the present invention, refers to Fig. 6 b, for based on Fig. 6 a The schematic diagram of the form of shown report form type generation.
The hierarchical relationship of tree structure interior joint is taken full advantage of in the embodiment of the present invention, to realize horizontal gauge outfit and longitudinal direction The classification of gauge outfit, wherein, the father node in tree structure merges, and each node has data correspondence, can design many in table Row, so, each column can use different attribute, wherein, the attribute of root node can be represented with report name, be presented on the page just It is gauge outfit name.
Wherein, cell content is filled with variable, can be that obtained variable, such energy are calculated based on calculation formula The versatility of form is enough increased, and variable is encapsulated by bracket " [] ", further, can be encapsulated 1 year with brace " { } " Become special variable once.
And it is further, in the prior art, the tree node of tree structure can only be divided form gauge outfit in a dimension Level, and in the embodiment of the present invention, title is corresponded to root node, and horizontal line "-" carries out scalping to content again in, reaches two It is classified while individual dimension.
Referring to Fig. 7, being a kind of function mould of the report generation device based on tree structure in second embodiment of the invention The schematic diagram of block, device includes:
Searching modul 701, for being instructed in response to report generation, the report form type included is instructed using the report generation The corresponding relation of the preset report form type of lookup and tree structure, obtains corresponding tree structure;
Acquisition module 702, for according to the variable coding extracted from the node of the tree structure, institute to be obtained from database Some variable codings specify the data in the period;
Module 703 is inserted, the tree-like knot is inserted for the data to be pre-processed, and by pretreated data In the corresponding node of structure;
Generation module 704, for generating form according to the tree structure that data have been inserted in node.
In embodiments of the present invention, generating means are instructed in response to report generation, instruct what is included using the report generation Report form type searches the corresponding relation of preset report form type and tree structure, obtains corresponding tree structure, according to from described The variable coding that the node of tree structure is extracted, the data in all variable coding specified periods are obtained from database, will The data are pre-processed, and pretreated data are inserted in the corresponding node of tree structure, according to having been inserted in node The tree structure generation form of data.Relative to prior art, by pre-setting report form type pass corresponding with tree structure The mode of system so that all there is its corresponding tree structure for the form of different types, and by obtaining tree structure The data of all variables coding at the appointed time in section, and insert in the node of tree structure after being pre-processed, enabling Form is generated using the tree structure for having inserted data.This kind of mode has exploitation simple, and cost is low, and flexibility is strong etc. excellent Point, disclosure satisfy that the demand of most of enterprise.The corresponding relation of further setting report form type and tree structure, can be avoided The problem of repeating to model.
Referring to Fig. 8, the schematic diagram of the refinement structure to insert module 703 in second embodiment of the invention, this inserts mould Block 703 includes:
First circulation determining module 801, for carrying out circulate operation to the multiple object array, it is determined that pair being recycled to As the data encoding ID length of array, using the object array being recycled to described in data ID length determination in the tree-like knot Node rank in structure;
Second circulation determining module 802, for carrying out circulate operation to the multiple object array, obtains pair being recycled to As the current data in array, determine that current data father affiliated in the tree structure saves using the current data Point ID, and determine object array section affiliated in the tree structure using the father node ID and the node rank Point, the father node ID is added in upper one object array being recycled to and records [key] function is called, to obtain Parent data object;
Module 803 is put into, if being not sky for the parent data object, the current data is put into the number of objects In node of the group belonging in the tree structure;If the parent data object is sky, the current data is put into described In the child node of node of the object array belonging in the tree structure.
In embodiments of the present invention, by the above-mentioned means, can effectively place data into the node of tree structure.
Referring to Fig. 9, the schematic diagram of the refinement structure for generation module in second embodiment of the invention 704, the generation mould Block 704 includes:
Gauge outfit determining module 901, for determining to have inserted the tree structure of data using preset node stratification The gauge outfit of corresponding form;
Afferent module 902, for by the data in the node of the tree structure according to the incoming form of the gauge outfit In;
Formula computing module 903, if for including calculation formula in the tree structure, utilizing the calculation formula pair Corresponding data in the form is calculated, and inserts the form, to complete the generation of form.
In embodiments of the present invention, by the above-mentioned means, can be effectively using in the tree structure for having inserted data Node generates form, and in the case of with calculation formula, corresponding calculate can be completed using calculation formula.
, can be by it in several embodiments provided herein, it should be understood that disclosed apparatus and method Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the module, only Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed Coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical of device or module by some interfaces Letter connection, can be electrical, machinery or other forms.
The module illustrated as separating component can be or may not be it is physically separate, it is aobvious as module The part shown can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple On mixed-media network modules mixed-media.Some or all of module therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional module in each embodiment of the invention can be integrated in a processing module, can also That modules are individually physically present, can also two or more modules be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated module is realized using in the form of software function module and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It should be noted that for foregoing each method embodiment, for simplicity description, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
Be above to a kind of description of report form generation method and device based on tree structure provided by the present invention, for Those skilled in the art, according to the thought of the embodiment of the present invention, has change in specific embodiments and applications Part, to sum up, this specification content should not be construed as limiting the invention.

Claims (8)

1. a kind of report form generation method based on tree structure, it is characterised in that methods described includes:
In response to report generation instruction, using the report generation instruct the report form type that includes search preset report form type with The corresponding relation of tree structure, obtains corresponding tree structure;
According to the variable coding of the node extraction from the tree structure, obtain all variable codings from database and specify the time Data in section;
The data are pre-processed, and pretreated data are inserted in the corresponding node of the tree structure;
Tree structure according to data have been inserted in node generates form.
2. according to the method described in claim 1, it is characterised in that the name of carry form node on the node of the tree structure Claim, and the corresponding variable coding of the title, the variable is encoded to numeric coding and calculation formula is encoded.
3. according to the method described in claim 1, it is characterised in that the packet contains multiple object arrays;
It is then described to be pre-processed the data, and pretreated data are inserted into the corresponding node of the tree structure It is interior, including:
Circulate operation is carried out to the multiple object array, it is determined that the data encoding ID length for the object array being recycled to, is utilized Node rank of the object array being recycled to described in the data ID length determination in the tree structure;
Circulate operation is carried out to the multiple object array, the current data in the object array that is recycled to is obtained, using described Current data determines current data father node ID affiliated in the tree structure, and utilizes the father node ID and institute State node rank and determine object array node affiliated in the tree structure, the father node ID is added to upper one In the individual object array being recycled to and records [key] function is called, to obtain parent data object;
If the parent data object is not sky, the current data is put into object array institute in the tree structure In the node of category;If the parent data object is sky, the current data is put into the object array in the tree-like knot In the child node of node belonging in structure.
4. according to the method described in claim 1, it is characterised in that described to be given birth to according to the tree structure that data have been inserted in node Into form, including:
Determine to have inserted the gauge outfit of the form corresponding to the tree structure of data using preset node stratification;
By the data in the node of the tree structure according in the incoming form of the gauge outfit;
If including calculation formula in the tree structure, the corresponding data in the form is carried out using the calculation formula Calculate, and insert the form, to complete the generation of form.
5. a kind of report generation device based on tree structure, it is characterised in that described device includes:
Searching modul, for being instructed in response to report generation, instructs the report form type included to search pre- using the report generation The report form type and the corresponding relation of tree structure put, obtain corresponding tree structure;
Acquisition module, for according to the variable coding extracted from the node of the tree structure, all changes to be obtained from database Amount coding specifies the data in the period;
Module is inserted, for the data to be pre-processed, and it is corresponding that pretreated data are inserted into the tree structure Node in;
Generation module, for generating form according to the tree structure that data have been inserted in node.
6. device according to claim 5, it is characterised in that the name of carry form node on the node of the tree structure Claim, and the corresponding variable coding of the title, the variable is encoded to numeric coding and calculation formula is encoded.
7. device according to claim 5, it is characterised in that the packet contains multiple object arrays;
Then the module of inserting includes:
First circulation determining module, for carrying out circulate operation to the multiple object array, it is determined that the object array being recycled to Data encoding ID length, using the data ID length determine described in the object array that is recycled in the tree structure Node rank;
Second circulation determining module, for carrying out circulate operation to the multiple object array, obtains the object array being recycled to In current data, using the current data determine the current data in the tree structure belonging to father node ID, And object array node affiliated in the tree structure is determined using the father node ID and the node rank, will The father node ID is added in upper one object array being recycled to and calls records [key] function, to obtain parent data Object;
Module is put into, if being not sky for the parent data object, the current data is put into the object array in institute In node belonging to stating in tree structure;If the parent data object is sky, the current data is put into the number of objects In the child node of node of the group belonging in the tree structure.
8. device according to claim 5, it is characterised in that the generation module includes:
Gauge outfit determining module, for determining to have inserted corresponding to the tree structure of data using preset node stratification The gauge outfit of form;
Afferent module, for by the data in the node of the tree structure according in the incoming form of the gauge outfit;
Formula computing module, if for including calculation formula in the tree structure, using the calculation formula to the report Corresponding data in table is calculated, and inserts the form, to complete the generation of form.
CN201710507137.XA 2017-06-28 2017-06-28 Report form generation method and device based on tree structure Pending CN107329942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710507137.XA CN107329942A (en) 2017-06-28 2017-06-28 Report form generation method and device based on tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710507137.XA CN107329942A (en) 2017-06-28 2017-06-28 Report form generation method and device based on tree structure

Publications (1)

Publication Number Publication Date
CN107329942A true CN107329942A (en) 2017-11-07

Family

ID=60198681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710507137.XA Pending CN107329942A (en) 2017-06-28 2017-06-28 Report form generation method and device based on tree structure

Country Status (1)

Country Link
CN (1) CN107329942A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009145A (en) * 2017-12-18 2018-05-08 深圳市康必达控制技术有限公司 Report form generation method and device
CN108363732A (en) * 2018-01-15 2018-08-03 阿里巴巴集团控股有限公司 A kind of form processing method of multi-user collaborative, device and equipment
CN109308284A (en) * 2018-09-28 2019-02-05 中国平安财产保险股份有限公司 Report menu generating method, device, computer equipment and storage medium
CN109815281A (en) * 2019-01-28 2019-05-28 四川爱信诺航天信息有限公司 A kind of showing interface system and method
CN109857911A (en) * 2019-01-17 2019-06-07 新奥数能科技有限公司 A kind of method, apparatus, readable medium and the electronic equipment of determining policy data
CN112433712A (en) * 2020-11-09 2021-03-02 金蝶软件(中国)有限公司 Report display method and device, computer equipment and storage medium
CN114021536A (en) * 2021-11-17 2022-02-08 广州天维信息技术股份有限公司 Processing method, device, equipment and storage medium of multi-level header report

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308490B (en) * 2008-04-28 2010-06-09 北京航空航天大学 Dynamic report generation method and platform
US9069823B2 (en) * 2009-03-24 2015-06-30 Infovista Sa Method for managing a relational database of the SQL type
CN106407303A (en) * 2016-08-30 2017-02-15 北京深思数盾科技股份有限公司 Data storage method and apparatus, and data query method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308490B (en) * 2008-04-28 2010-06-09 北京航空航天大学 Dynamic report generation method and platform
US9069823B2 (en) * 2009-03-24 2015-06-30 Infovista Sa Method for managing a relational database of the SQL type
CN106407303A (en) * 2016-08-30 2017-02-15 北京深思数盾科技股份有限公司 Data storage method and apparatus, and data query method and apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑相周: "静态树形结构数据库及自动代码管理", 《计算机时代》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009145A (en) * 2017-12-18 2018-05-08 深圳市康必达控制技术有限公司 Report form generation method and device
CN108363732A (en) * 2018-01-15 2018-08-03 阿里巴巴集团控股有限公司 A kind of form processing method of multi-user collaborative, device and equipment
CN109308284A (en) * 2018-09-28 2019-02-05 中国平安财产保险股份有限公司 Report menu generating method, device, computer equipment and storage medium
CN109308284B (en) * 2018-09-28 2023-09-19 中国平安财产保险股份有限公司 Report menu generation method and device, computer equipment and storage medium
CN109857911A (en) * 2019-01-17 2019-06-07 新奥数能科技有限公司 A kind of method, apparatus, readable medium and the electronic equipment of determining policy data
CN109857911B (en) * 2019-01-17 2021-03-05 新奥数能科技有限公司 Method and device for determining policy data, readable medium and electronic equipment
CN109815281A (en) * 2019-01-28 2019-05-28 四川爱信诺航天信息有限公司 A kind of showing interface system and method
CN112433712A (en) * 2020-11-09 2021-03-02 金蝶软件(中国)有限公司 Report display method and device, computer equipment and storage medium
CN114021536A (en) * 2021-11-17 2022-02-08 广州天维信息技术股份有限公司 Processing method, device, equipment and storage medium of multi-level header report
CN114021536B (en) * 2021-11-17 2022-08-09 广州天维信息技术股份有限公司 Processing method, device, equipment and storage medium of multi-level header report

Similar Documents

Publication Publication Date Title
CN107329942A (en) Report form generation method and device based on tree structure
CN106709035B (en) A kind of pretreatment system of electric power multidimensional panoramic view data
CN109033497B (en) High-concurrency-oriented multi-stage data mining algorithm intelligent selection method
CN101315644B (en) Part classification method based on developable clustering
CN106529028B (en) A kind of automatic generation method of technological procedure
CN106951498A (en) Text clustering method
CN110471948A (en) A kind of customs declaration commodity classifying intelligently method excavated based on historical data
CN103729432A (en) Method for analyzing and sequencing academic influence of theme literature in citation database
CN105975466A (en) Method and device for machine manuscript writing aiming at short newsflashes
CN105808853B (en) A kind of ontological construction management of Engineering Oriented application and ontology data automatic obtaining method
CN106294661A (en) A kind of extended search method and device
Michnik The WINGS method with multiple networks and its application to innovation projects selection
CN110245249A (en) A kind of three-dimensional CAD model intelligent search method based on the double-deck depth residual error network
CN116127084A (en) Knowledge graph-based micro-grid scheduling strategy intelligent retrieval system and method
CN110874717B (en) Data management method
CN102508971B (en) Method for establishing product function model in concept design stage
CN106250110A (en) Set up the method and device of model
CN114493535A (en) Asset model-based data center system for data driving
CN103885977A (en) Webpage data classification method, device and system
CN115168929B (en) Dynamo-based BIM model element coding information input method
CN106815719A (en) The design and implementation methods of manufacturing enterprise's flexibility ERP system visual development platform
CN115099309A (en) Method for designing cost evaluation model for storage and index of graph data
CN109062819A (en) A kind of generation method and device of software test case
Denk et al. The IDARESA data mediation architecture for statistical aggregates
Kopp et al. Enterprise Architecture Tools Assessment for Smart Cities Governance using Fuzzy Logic Techniques

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171107