CN111126019B - Report generation method and device based on mode customization and electronic equipment - Google Patents

Report generation method and device based on mode customization and electronic equipment Download PDF

Info

Publication number
CN111126019B
CN111126019B CN201911192609.2A CN201911192609A CN111126019B CN 111126019 B CN111126019 B CN 111126019B CN 201911192609 A CN201911192609 A CN 201911192609A CN 111126019 B CN111126019 B CN 111126019B
Authority
CN
China
Prior art keywords
report
data source
source information
data
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911192609.2A
Other languages
Chinese (zh)
Other versions
CN111126019A (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.)
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Pension Insurance 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 Taikang Insurance Group Co Ltd, Taikang Pension Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201911192609.2A priority Critical patent/CN111126019B/en
Publication of CN111126019A publication Critical patent/CN111126019A/en
Application granted granted Critical
Publication of CN111126019B publication Critical patent/CN111126019B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a report generation method, a report generation device and electronic equipment based on mode customization. The method comprises the following steps: obtaining customized parameters of a report template; analyzing the customized parameters to obtain mode attributes of the composition modules in the report template and data source information of the unit cells in the composition modules; and screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, and replacing the data source information with the target data to generate a target report. According to the invention, the attribute and the data source information of the report form composition module are determined through analyzing the customized parameters of the report form template, so that the target data is utilized to replace the data source information, and the report form is rapidly generated; the target report with multiple modes can be generated in response to the current business requirement only by editing the customized parameters by a user, so that the report development efficiency is improved, and the development period is shortened.

Description

Report generation method and device based on mode customization and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a report generating method based on mode customization, a report generating device based on mode customization, a computer storage medium, and an electronic device.
Background
The popularity of the computer technology field greatly improves the task processing efficiency of various industries, and various data information such as user information, article information, evaluation information, transaction information and the like are often generated in the task processing process. In general, a large amount of business information is statistically analyzed and managed through various reports, and in face of different business demands, the data sources and the complexity of the reports are different, and how to quickly generate satisfactory reports becomes one of important factors for improving business efficiency.
In the related technology, a report template is formed by writing a complete code, the report template generated by the method is fixed and can not meet the requirements of users on business reports in different periods of different businesses, at the moment, report editing and development work is required to be repeatedly carried out, the expandability of report customization is low, and the working cost is increased to a certain extent; meanwhile, aiming at the report containing multiple modes, the development period is longer, and the development efficiency is low.
Therefore, it is necessary to provide a report generating method capable of quickly customizing multiple modes.
It should be noted that the information of the present invention in the above background section is only for enhancing the understanding of the background of the present invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a report generation method and device based on mode customization, a computer storage medium and electronic equipment, so that the problems of low mode customization degree, poor expandability of report customization, low report development efficiency and the like of a complex report are avoided at least to a certain extent.
Other features and advantages of the invention will be apparent from the following detailed description, or may be learned by the practice of the invention.
According to one aspect of the present invention, there is provided a report generation method based on pattern customization, including: obtaining customized parameters of a report template; analyzing the customized parameters to obtain mode attributes of the composition modules in the report template and data source information of the unit cells in the composition modules; and screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, and replacing the data source information with the target data to generate a target report.
In an exemplary embodiment of the present invention, the parsing the custom parameters to obtain the schema attribute of the constituent modules in the report template and the data source information of the cells in the constituent modules includes: and analyzing the customized parameters based on predefined description information to acquire the mode attribute and the data source information.
In an exemplary embodiment of the present invention, before screening target data corresponding to the data source information from current service data according to the data source information and the mode attribute, and replacing the data source information with the target data, the method further includes: and acquiring the current service data from a database according to the identification information of the current service.
In an exemplary embodiment of the invention, the data source information includes a name of a data source object; screening target data corresponding to the data source information from current service data according to the data source information and the mode attribute, replacing the data source information with the target data, and generating a target report, wherein the method comprises the following steps: acquiring target data corresponding to the name of the data source object from the current service data according to the name of the data source object; and replacing the data source information with the target data to generate a target report.
In an exemplary embodiment of the invention, the pattern attribute includes a loop body in the composition module and a loop type of the loop body, the method includes: if the composition module comprises a plurality of circulation bodies, sequentially acquiring target data corresponding to the names of the data source objects in each circulation body from the current service data according to the circulation type; and replacing the data source information in each circulation body with the corresponding target data to generate a target report.
In an exemplary embodiment of the invention, the cycle types include lateral cycles and longitudinal cycles.
In an exemplary embodiment of the present invention, the mode attribute further includes mode type and location information of the constituent modules; wherein the mode types include a block mode, a row mode, a block column mode, a rank mode, and a master-slave mode.
In an exemplary embodiment of the present invention, the target report includes a plurality of constituent modules therein; the method further comprises the steps of: and determining the position of each component module in the report template according to the position information.
In an exemplary embodiment of the invention, the method further comprises: determining the export format of the target report according to a preset format type; or determining the format type based on a selection operation of a user, and determining the format type as the derived format.
According to one aspect of the present invention, there is provided a model-based customization report generating system, the system comprising: the template customizing unit is used for generating a report template according to report customizing operation of a user; the report analysis unit is used for executing the report generation method based on the mode customization based on the report template.
According to an aspect of the present invention, there is provided a report generating apparatus based on pattern customization, the apparatus including: the acquisition module is used for acquiring the customized parameters of the report template; the analysis module is used for analyzing the customized parameters to acquire the mode attribute of the composition module in the report template and the data source information of the unit cells in the composition module; and the data replacement module is used for screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, replacing the data source information with the target data and generating a target report.
According to an aspect of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the schema-based customized report generating method of any one of the above.
According to an aspect of the present invention, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the schema customization based report generating method of any one of the above via execution of the executable instructions.
According to the report generation method based on the mode customization in the exemplary embodiment of the invention, the attribute and the data source information of the report composition module are determined through analyzing the customization parameters of the report template, so that the target data is utilized to replace the data source information, and the rapid generation of various mode reports is realized. On one hand, the target report with multiple modes can be generated in response to the current business demands only by obtaining simple customized parameters, so that the multiple-mode report in multiple business types is allowed to be generated quickly, the editing operation of a developer on the complete report is avoided, the development period of the report is shortened, the generation efficiency of the report is improved, and the development cost is reduced; on the other hand, the invention can quickly respond to new business requirements, generate a corresponding report according to the customized parameters, is not limited by specific business requirements, improves the application range of the invention, and has strong expandability.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 illustrates a flowchart of a report generation method based on pattern customization according to an exemplary embodiment of the present invention;
FIG. 2 illustrates a flowchart of generating a target report from data source information and schema attributes in accordance with an exemplary embodiment of the present invention;
FIGS. 3A-3B illustrate a report schematic and program run timing diagram for generating a target report in block mode according to an exemplary embodiment of the present invention;
FIGS. 4A-4B illustrate a report schema and a data source binding and style customization schema in a row mode in accordance with an exemplary embodiment of the present invention;
FIGS. 5A-5D illustrate a report schema, a data source binding and style customization schema in a chunk column mode, and a report schema, a data source binding and style customization schema in a row column mode, according to an exemplary embodiment of the present invention;
FIGS. 6A-6C illustrate a report schema and a data source binding and style customization schema in a master-slave mode in accordance with an exemplary embodiment of the present invention;
FIG. 7 illustrates a report generating system architecture diagram according to an exemplary embodiment of the invention;
FIG. 8 illustrates a schematic structure of a report generating apparatus based on pattern customization according to an exemplary embodiment of the present invention;
FIG. 9 illustrates a schematic diagram of a storage medium according to an exemplary embodiment of the present invention; and
fig. 10 shows a block diagram of an electronic device according to an exemplary embodiment of the invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and thus detailed descriptions thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known structures, methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
At present, a lot of scenes need to be generated for reports, for example, quotation needs to be generated according to business requirements in industries such as insurance, electronic commerce and the like; staff reports business reports to the company, lower level organizations, to higher level organizations, etc. The business report forms needed by various businesses have differences, in many cases, either a report form template in a fixed mode is used, or report code is rewritten according to each business requirement to form the report form template, so that the generation efficiency of the report forms is reduced to a certain extent, and the business processing period is long.
Based on this, in an exemplary embodiment of the present invention, a report generation method based on pattern customization is provided first.
Referring to fig. 1, the report generating method based on the pattern customization may include the steps of:
Step S110: obtaining customized parameters of a report template;
step S120: analyzing the customized parameters to obtain mode attributes of the composition modules in the report template and data source information of the unit cells in the composition modules;
step S130: and screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, and replacing the data source information with the target data to generate a target report.
According to the report generation method based on the mode customization in the exemplary embodiment of the invention, on one hand, a target report with multiple modes can be generated in response to the current service requirement only by obtaining simple customization parameters, so that the multiple modes of reports in multiple service types are allowed to be generated quickly, the editing operation of a developer on the complete report is avoided, the development period of the report is shortened, the generation efficiency of the report is improved, and the development cost is reduced; on the other hand, the method can quickly respond to new service demands, generate corresponding reports according to the customized parameters, is not limited by specific service demands, and improves the application scope of the method.
The report generation method based on the mode customization in the exemplary embodiment of the present invention is further described with reference to fig. 1.
In step S110, the customization parameters of the reporting template are obtained.
In the exemplary embodiment of the invention, the customization parameters of the report template are obtained according to the template customization operation of the user, and a visual template editing interface can be provided to allow the user to perform the customization work of the report template in the visual template editing interface. In an alternative embodiment, the user may directly input simple customization parameters in the visual template editing interface based on the predefined description information, where the customization parameters include, but are not limited to, parameters corresponding to the component module division of the report template, the mode attribute of the component module, and the data source information of the unit cells in the component module; in an alternative embodiment, a composition module with various modes may be predefined, a user may directly generate a report template in the visual editing module interface by selecting a target composition module, and based on the report template, a customized parameter corresponding to the generated report template may be obtained, for example, the user may form the report template by dragging the corresponding composition module, etc., which includes, but is not limited to, the foregoing report template customization operation and the obtaining manner of the customized parameter.
In step S120, the customization parameters are parsed to obtain the mode attribute of the component module in the report template and the data source information of the unit cells in the component module.
In an exemplary embodiment of the present invention, the obtained customized parameters are parsed based on predefined description information to obtain schema attributes and data source information of constituent modules related to the reporting model, and the like. Wherein the predefined descriptive information is predefined coding information; the attribute information of the composition module describes the composition of the report template, including but not limited to the mode type and position information of the composition module, wherein the mode type comprises a block mode, a row mode, a block column mode, a row-column mode and the like; the data source information describes the data sources of the cells in the reporting template, and in an exemplary embodiment of the present invention allows for a single data source or multiple data sources, in alternative embodiments, the data source information may be in the form of placeholders, such as "names of data source objects, formats of attribute names of data source objects," etc., and the present disclosure includes, but is not limited to, resolution of the customization parameters described above. The method can accurately obtain the constitution information of the report template based on the customization parameters, and a user can customize the report template of any required mode type, so that the customization process of the template is not limited due to different services, and the practicability and the application range of the customized template are expanded.
In step S130, according to the data source information and the mode attribute, target data corresponding to the data source information is screened from the current service data, and the data source information is replaced by the target data, so as to generate a target report.
In an exemplary embodiment of the present invention, before target data corresponding to data source information is screened from current service data according to the data source information and mode attribute, and the data source information is replaced with the target data to generate a target report, the current service data is first obtained from a database according to identification information of the current service. The identification information of the current service may be a number, a letter, or a combination of a number, a letter and other characters, which is not particularly limited in this disclosure. For example, the current service may include one or more data source objects, where different data source objects correspond to different identification information, for example, the identification information corresponding to the "occupational distribution" and the "scheme information" of the data source object is "2" and "14", respectively, and then all the current service data corresponding to the current service is obtained according to the identification information.
Further, after all the current service data are obtained, the target data corresponding to the data source information are screened from the current service data according to the data source information and the mode attribute, and the data source information is replaced by the target data, so that a target report is generated. FIG. 2 shows a flow chart for generating a target report from data source information and schema attributes, as shown in FIG. 2, the process comprising the steps of:
In step S210, target data corresponding to the name of the data source object is acquired from the current service data according to the name of the data source object.
In an exemplary embodiment of the present invention, the name of the data source object is included in the data source information, and target data corresponding to the name of the data source object is screened from all current service data. For example, when the name of the data source object is baciosinfo.username, corresponding target data is obtained from service data corresponding to the data source name baciosinfo in the current service data, and the target data corresponding to the data source information can be accurately determined based on the corresponding relation of the names, so that the accuracy of automatic report generation is improved, the data searching work of a user in the report generation process is avoided, and the working cost is greatly reduced.
In step S220, the data source information is replaced with the target data, and a target report is generated.
In an exemplary embodiment of the present invention, after target data is obtained, data source information is replaced with corresponding target data to generate a target report.
In alternative embodiments, the constituent modules of the report may include a loop portion, e.g., including a plurality of operators and their corresponding business data, etc. Wherein the pattern attributes of the constituent modules include a loop body and a loop type of the loop body in the constituent modules, and the loop type may include a lateral loop and a longitudinal loop. In the process of customizing the report template, after the mode customizing operation is performed on the report template, data source binding is performed on each cell in the composition module, and in an alternative embodiment, the data source binding is performed in a format of 'the name of the data source object and the attribute name of the data source object'. Wherein, the name of the data source object (such as basicinfo in the name) in the data source binding process is consistent with the data source name (basicinfo) in the format customization process of the template. Based on the above, in the process of replacing the data source information with the target data to generate the target report, if the composition module comprises a plurality of loop bodies, the target data corresponding to the names of the data source objects in each loop body are sequentially acquired from the current service data according to the loop type, and the data source information in each loop body is replaced with the corresponding target data to generate the target report.
In addition, the customization operation of the cell patterns in the composition module according to the service requirement by the user can be responded, including but not limited to editing the colors, fonts, cell size distribution and the like of the cells, in an alternative embodiment, the cell patterns in excel can be adopted, and the cell patterns can be customized according to the service requirement, which is not particularly limited in the disclosure. In an alternative embodiment, the description information of the cells in the report template, such as the name of the salesman, the code of the salesman, the telephone and other fixed description information, may be directly input by the user, or a plurality of selectable items are preset according to various common service requirements for the user to directly select, such as a pull-down menu form, so as to further improve the report generating efficiency, which is not limited in this disclosure.
In the exemplary embodiment of the invention, the customized parameters corresponding to the operation of the report template customized by the user are analyzed based on the predefined description information to obtain the mode attribute and the data source information of the composition module related to the report template, and the target data is obtained from the current business data according to the mode attribute and the data source information to replace the data source information so as to finally obtain the target report, and based on the target report, the user can quickly customize the composition module of the report template, the attribute and the position of the composition module without editing the whole report template; under the condition that module composition information and attributes of the report template edited by a user are obtained, the system rapidly determines target data and replaces data source information in the report template, so that report generation efficiency is greatly improved, development period is shortened, and problems of long task processing period and the like caused by report generation are avoided.
The report generation method based on mode customization in the exemplary embodiment of the present invention is described in detail below in connection with the generation process of different mode reports in different services:
FIG. 3A is a diagram of a report in block mode, as shown in FIG. 3A, the report including base information and a underwriting trace, the corresponding report template including two component modules, and the mode properties of the two component modules being block mode. The block mode is a report mode taking a block as a unit, wherein the basic information is a single block mode; the core protection track is in a block circulation mode, and the block circulation mode is of a mode type in which blocks are used as circulation bodies and longitudinally circulate. Based on the preliminary analysis of the report, the user can perform the template customization operation on the visual report editing interface, for example, provide a format customization interface as shown in the following table 1, and acquire customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 1 custom parameters for block mode report
id name type pid ds subDs hastikle location
1 Basic information block 0 basicinfo N 1:5:1:6
2 Nuclear protection track block cycle 0 opinions opinion Y 6:8:1:6
Wherein id is the code of the composition module, name is the name (Chinese) of the data source object of the composition module, type is the mode type of the composition module, pid is the identification information corresponding to the data source object of the composition module, used for obtaining the current service data, hastikle is whether the module needs to customize the title and circulates, for example, Y represents customizing the title and the title does not need to circulate, Y2 represents customizing the title and the title circulates 2 times; ds/subDs are data source names, for example, basic information is basicinfo, a kernel protection track is a set of opions comprising two loop bodies, where opion is a loop monomer, and location is position information of a component module, for example, for positions of "basic information" of the component module are first row to fifth row, first column to sixth column, and the position information of "kernel protection track" of the component module is similar, which is not repeated in the present invention. In the process, the customization operation of the cell patterns in the composition module can be responded by a user according to the service requirement, so that the patterns of the target report to be generated can be rapidly determined, more personalized choices are provided, the interestingness of generating the report is increased, the report is attractive to the user, and the method and the device are not described in detail.
Fig. 3B shows a program running timing diagram for obtaining target data replacing data source information from current service data according to mode attribute and data source information in a block mode, as can be seen from fig. 3B, when running to basicinfo username, the corresponding username "Zhang san" is obtained from the current service data corresponding to the data source name basicinfo to replace the data source information, and other data replacing processes are not listed here.
Fig. 4A shows a schematic diagram of a report in a line mode, which is longitudinally circulated in a line circulation body, as shown in fig. 4A. Based on the preliminary analysis of the report, the user can perform the template customization operation on the visual report editing interface, for example, provide a format customization interface as shown in the following table 2, and acquire customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 2 customization parameters for line mode report
id name type pid ds subDs hastikle location
1 Dangerous seed information row cycle 0 risks risk Y 1:3:1:7
Wherein ds/subDs are names of data sources, for example, risk information is a collection risks including two loop bodies, where risk is a loop unit, and descriptions of other customization parameters are the same as those described in table 1 above, and are not repeated here.
Fig. 4B shows a schematic diagram of data source binding and style customization under a line mode, as can be seen from fig. 4B, the name of a data source object of risk information is the attribute name of a risk+data source object, for example, the name of the data source object of risk name is the risk name, and it is to be noted that, because the composition module includes two loop bodies, the customization parameters are analyzed based on predefined description information, so as to obtain the mode attribute and the data source information of the composition module related to the report template, when the target data replacement data source information is obtained from the current service data according to the mode attribute and the data source information, the target data corresponding to the name of the data source object in the first loop body is firstly obtained from the current service data according to the type of a longitudinal loop, and is 119, 11901, 100000, 1000, 90%,150, and the corresponding target data is replaced by the target data, after the data source information in the first loop body is replaced, the target data corresponding to the name of the data source object in the next loop body is continuously read as the next line, and the process is circulated until the above is completed, the process is completed, and the efficiency of directly reading the customization source information in the custom template in the line is reduced according to the fact that the user can be improved according to the fact that the customization template is required to the type of the customization parameters in the whole line, and the customization template is completely required to be set.
In addition, the serial number in the line mode may include two customization modes, and in an alternative embodiment, the serial number may be automatically added by 1 when the report template is parsed and data replacement is performed in the form of "#" placeholders as shown in fig. 4B; in an alternative embodiment, the method may also be customized according to an attribute name of the data source object, for example, in a form of "risk.no", where the attribute name of each different data source object corresponds to a different sequence number, and the sequence number adding 1 operation is performed based on the different attribute names, and of course, other sequence number customizing modes may also be selected according to actual service requirements, where the method includes but is not limited to the sequence number customizing modes described above.
In an exemplary embodiment of the present invention, the column mode may include a block column mode and a row column mode, and a report customization and generation method in the column mode is described below with reference to fig. 5A-5D, fig. 5A shows a report schematic diagram in the block column mode, and as shown in fig. 5A, the report is circulated in a horizontal circulation manner by using blocks as a circulation body and 2 columns and 3 rows as a circulation monomer. Based on the preliminary analysis of the report, the user can perform the template customization operation on the visual report editing interface, for example, provide a format customization interface as shown in the following table 3, and acquire customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 3 customization parameters for block column schema report
Wherein ds/subDs are data source names, for example, family information is a set occpeples comprising three loop bodies, each loop body peple is a 3-row 2-column loop monomer, and descriptions of other custom parameters are as described in table 1 and are not repeated here.
Fig. 5B shows a schematic diagram of data source binding and style customization in the chunk column mode, and as can be seen from fig. 5B, the name of the data source object of family information is peple+the attribute name of the data source object, for example, the name of the data source object of the number of people is peple count. It should be noted that, since the composition module includes three loop bodies, firstly, according to the type of the loop of the block column, the target data corresponding to the names of the data source objects in the first loop body are obtained from the current service data, 50 and 60 are sequentially obtained, the corresponding data source information is replaced by the target data, after the data source information in the first loop body is replaced, the target data corresponding to the names of the data source objects in the next loop body is continuously read, and is sequentially obtained as 100 and 30, and is used as the next block column of the composition module, the above-mentioned process is circulated until the replacement of the data source information in all the loop bodies is completed.
FIG. 5C shows a schematic diagram of a report in a rank mode, wherein the report is respectively circulated transversely and longitudinally by using blocks as circulants as shown in FIG. 5C. Based on the preliminary analysis of the report, the user can perform the template customization operation on the visual report editing interface, for example, provide a format customization interface as shown in the following table 4, and acquire customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 4 customization parameters for line and column pattern report
Wherein ds/subDs are data source names, for example, an age group is a collection agent comprising six circulation bodies, wherein each age is a circulation monomer of 1 row and 2 columns, and color 2:3 means that after the circulation monomer circulates two groups longitudinally, two columns circulate 3 groups, hastikle Y:2 means that the composition module includes 2 titles and two title loops, and the description of other customization parameters is as described in table 1, and will not be repeated here.
Fig. 5D shows a schematic diagram of data source binding and style customization in a rank mode, as shown in fig. 5D, the names of data source objects distributed in an age group are referred to as the attribute names of the data source objects, for example, the names of the data source objects of the number of people are referred to as the age count, and it should be noted that, because the composition module includes six loop bodies, firstly, according to the rank loop types, the target data corresponding to the names of the data source objects in the first loop body are obtained from the current service data, and are sequentially 1-5,0, and the corresponding data source objects are replaced by the target data, when the data source information in the first loop body is completely replaced, the target data corresponding to the names of the data source objects in the next loop body is continuously read, and is sequentially 5-10, 10, and is used as the next row of the composition module, and the above-mentioned processes are circulated until the replacement of the data source information in all loop bodies is completed.
In an exemplary embodiment of the present invention, when the data source object includes multiple manifestations, the composition module of the report may also be a master-slave mode, where the master-slave mode is a combination of block, row, and column modes, including a single master-slave mode and a master-slave mode. The following describes a report customization and generation method in a master-slave mode with reference to fig. 6A-6C, where, as shown in fig. 6A, the report is formed by a mode of circulation of blocks (titles) +blocks (distribution gears) +rows and columns, based on preliminary analysis of the report, a user can perform a template customization operation on a visual report editing interface, for example, a format customization interface as shown in table 5 below is provided, and obtain customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 5 custom parameters for block column mode report
Wherein ds/subDs are data source names, for example, an age group is a collection agent comprising six circulation bodies, wherein each age is a circulation monomer of 1 row and 2 columns, and a color of 2:3 means that after the circulation monomer circulates two groups longitudinally, two columns circulate 3 groups, and descriptions of other customized parameters and data source binding processes are the same as those of the above-mentioned row and column modes, and are not repeated here.
Fig. 6B shows a schematic diagram of a report in a master-slave mode loop, as shown in fig. 6B, where the report includes two master-slave mode constituent modules, each of which includes a block (title) +line loop+block (Fei Xiaoji), and based on preliminary analysis of the report, a user may perform a template customization operation on a visual report editing interface, for example, provide a format customization interface as shown in table 6 below, to obtain customization parameters corresponding to the format customization of the report template by the user through parameter editing.
Table 6 custom parameters for Master-Slave cycle mode report
The location corresponding to the solution information is the position information of a master-slave mode in the report template, and in each master-slave mode, the risk information is a row circulation mode, including a set risks of two circulation bodies, each circulation body is risk, and description of other customized parameters and a data source binding process are the same as those described above, and are not repeated herein.
Fig. 6C illustrates a schematic diagram of data source binding and style customization in the active circulation mode, and since the report of the master-slave circulation mode is formed by combining modules in multiple modes, the names of data source objects in the data source binding are referred to the above description of the data source binding in each mode, which is not repeated in the disclosure. Based on the report of the master-slave circulation mode, when acquiring the target data in the current service data and replacing the data source information, according to the circulation type of the composition module, the data source information in the first master-slave mode is replaced firstly, then the data source information in the second master-slave mode is replaced, the specific replacement process is as the replacement process of each mode, and is not listed here,
It should be noted that, fig. 3A to fig. 6C are exemplary descriptions of generating a target report according to the customization parameters for each component module under different mode types, and for report generation of other mode types, the process is as follows: resolving customization parameters-determining template composition and attributes-obtaining target data and replacement of template data source information, the disclosure includes, but is not limited to, custom generation of reporting templates of the schema types described above.
Further, in an exemplary embodiment of the present invention, when the reporting model includes a plurality of constituent modules, the locations of the constituent modules in the reporting model are determined according to the location information of the constituent modules. In an alternative embodiment, the export format of the target report may also be determined according to a preset format type; alternatively, the format type is determined based on a selection operation by the user, and the format type is determined as the export format. Based on the above, the generated target report can be output into a designated format, for example, the format can be PDF, excel, html and the like, and the method is suitable for the format requirements of various reports, so that the practicability and the application range of the report generation method of the exemplary embodiment of the invention are improved.
In summary, under the condition that only simple customized parameters are needed, a target report with multiple modes can be generated in response to the current business demands, so that the multiple-mode report in multiple business types is allowed to be generated quickly, the editing operation of a developer on the complete report is avoided, the development period of the report is shortened, the generation efficiency of the report is improved, and the development cost is reduced; meanwhile, the method can quickly respond to new service demands, generate corresponding reports according to the customized parameters, is not limited by specific service demands, and improves the application scope of the method.
In addition, in an exemplary embodiment of the present invention, there is also provided a report generating system based on mode customization, the system including: the template customizing unit is used for generating a report template according to report customizing operation of a user; and the report analysis unit is used for executing the report generation method based on the mode customization based on the report template so as to generate a target report. Fig. 7 illustrates a schematic diagram of a report generating system based on mode customization, and as shown in fig. 7, the system includes a template customizing unit 701 and a report parsing unit 702, for example, a report adapter applicable to any preset grammar, which is not particularly limited in this disclosure. The method comprises the steps of obtaining customized parameters of a report template based on user customization operation, obtaining current service data, analyzing the customized parameters based on preset description information to determine module information of a report, and replacing the obtained current service data into data source information in the report template to generate a target report 703.
In addition, in the exemplary embodiment of the invention, a report generating device based on mode customization is also provided, which can be used for executing the report generating method based on mode customization.
Referring to fig. 8, the schema-based customized report generating apparatus 800 may include an acquisition module 810, a parsing module 820, and a data replacement module 830. In particular, the method comprises the steps of,
an obtaining module 810, configured to obtain a customization parameter of the report template;
the parsing module 820 is configured to parse the customization parameters to obtain the mode attribute of the component module in the report template and the data source information of the unit cells in the component module;
and a data replacing module 830, configured to screen, according to the data source information and the mode attribute, target data corresponding to the data source information from current service data, and replace the data source information with the target data, so as to generate a target report.
Because the functional modules of the report generating system and the report generating device based on the mode customization in the exemplary embodiment of the present invention are the same as those in the embodiment of the report generating method based on the mode customization, the description thereof will not be repeated here.
It should be noted that although several modules or units of the schema-based customized report generating device are mentioned in the above detailed description, such partitioning is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present invention. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, in an exemplary embodiment of the present invention, a computer storage medium capable of implementing the above method is also provided. On which a program product is stored which enables the implementation of the method described above in the present specification. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 9, a program product 900 for implementing the above-described method according to an exemplary embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In addition, in the exemplary embodiment of the invention, an electronic device capable of realizing the method is also provided. Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to such an embodiment of the invention is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. Components of electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, a bus 1030 connecting the various system components (including the memory unit 1020 and the processing unit 1010), and a display unit 1040.
Wherein the storage unit stores program code that is executable by the processing unit 1010 such that the processing unit 1010 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification.
The memory unit 1020 may include readable media in the form of volatile memory units such as Random Access Memory (RAM) 1021 and/or cache memory unit 1022, and may further include Read Only Memory (ROM) 1023.
Storage unit 1020 may also include a program/utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1030 may be representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1000 can also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1050. Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 over the bus 1030. It should be understood that although shown in the drawings
Not shown, other hardware and/or software modules may be used in connection with the electronic device 1000, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (8)

1. A report generation method based on mode customization is characterized by comprising the following steps:
obtaining customized parameters of a report template; the customization parameters comprise parameters corresponding to the division of the composition modules of the report template, the mode attribute of the composition modules and the data source information of the unit cells in the composition modules;
analyzing the customized parameters to obtain mode attributes of the composition modules in the report template and data source information of the unit cells in the composition modules;
Screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, and replacing the data source information with the target data to generate a target report;
the data source information comprises the name of a data source object;
screening target data corresponding to the data source information from current service data according to the data source information and the mode attribute, replacing the data source information with the target data, and generating a target report, wherein the method comprises the following steps:
acquiring target data corresponding to the name of the data source object from the current service data according to the name of the data source object;
replacing the data source information with the target data to generate a target report;
the pattern attributes include a loop body in the constituent modules and a loop type of the loop body, the method further comprising:
if the composition module comprises a plurality of circulation bodies, sequentially acquiring target data corresponding to the names of the data source objects in each circulation body from the current service data according to the circulation type;
and replacing the data source information in each circulation body with the corresponding target data to generate a target report.
2. The method for generating a report based on mode customization according to claim 1, wherein the parsing the customization parameters to obtain the mode attribute of a component module in the report template and the data source information of the cells in the component module includes:
and analyzing the customized parameters based on predefined description information to acquire the mode attribute and the data source information.
3. The report generation method based on pattern customization according to any of claims 1 to 2, characterized in that the pattern attribute further includes pattern type and position information of the constituent modules; wherein the mode types include a block mode, a row mode, a block column mode, a rank mode, and a master-slave mode.
4. The model-based customized report generation method of claim 3, wherein the target report includes a plurality of the composition modules; the method further comprises the steps of:
and determining the position of each component module in the report template according to the position information.
5. The model-based customized report generation method of any one of claims 1 to 2, further comprising:
Determining the export format of the target report according to a preset format type; or (b)
And determining the format type based on a selection operation of a user, and determining the format type as the derived format.
6. A report generating apparatus based on pattern customization, the apparatus comprising:
the acquisition module is used for acquiring the customized parameters of the report template; the customization parameters comprise parameters corresponding to the division of the composition modules of the report template, the mode attribute of the composition modules and the data source information of the unit cells in the composition modules;
the analysis module is used for analyzing the customized parameters to acquire the mode attribute of the composition module in the report template and the data source information of the unit cells in the composition module;
the data replacement module is used for screening target data corresponding to the data source information from the current service data according to the data source information and the mode attribute, replacing the data source information with the target data and generating a target report;
the data source information comprises the name of a data source object;
screening target data corresponding to the data source information from current service data according to the data source information and the mode attribute, replacing the data source information with the target data, and generating a target report, wherein the method comprises the following steps:
Acquiring target data corresponding to the name of the data source object from the current service data according to the name of the data source object;
replacing the data source information with the target data to generate a target report;
the pattern attributes include a loop body in the constituent modules and a loop type of the loop body, the apparatus further being for: if the composition module comprises a plurality of circulation bodies, sequentially acquiring target data corresponding to the names of the data source objects in each circulation body from the current service data according to the circulation type; and replacing the data source information in each circulation body with the corresponding target data to generate a target report.
7. A storage medium having stored thereon a computer program which, when executed by a processor, implements the schema-based customized report generation method according to any one of claims 1 to 5.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the schema customization based report generating method of any one of claims 1-5 via execution of the executable instructions.
CN201911192609.2A 2019-11-28 2019-11-28 Report generation method and device based on mode customization and electronic equipment Active CN111126019B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911192609.2A CN111126019B (en) 2019-11-28 2019-11-28 Report generation method and device based on mode customization and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911192609.2A CN111126019B (en) 2019-11-28 2019-11-28 Report generation method and device based on mode customization and electronic equipment

Publications (2)

Publication Number Publication Date
CN111126019A CN111126019A (en) 2020-05-08
CN111126019B true CN111126019B (en) 2024-01-05

Family

ID=70496965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911192609.2A Active CN111126019B (en) 2019-11-28 2019-11-28 Report generation method and device based on mode customization and electronic equipment

Country Status (1)

Country Link
CN (1) CN111126019B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760943A (en) * 2020-06-16 2021-12-07 北京京东乾石科技有限公司 Business report processing method and device
CN112434505A (en) * 2020-11-24 2021-03-02 文思海辉智科科技有限公司 Template generation method and device, computer equipment and storage medium
CN112487771B (en) * 2020-12-14 2023-05-30 国网河北省电力有限公司 Report generation method, report generation device and terminal
CN113221522B (en) * 2021-04-28 2024-01-09 北京达佳互联信息技术有限公司 Report generation method, device, system, electronic equipment and storage medium
CN114331627A (en) * 2021-12-31 2022-04-12 胜斗士(上海)科技技术发展有限公司 Method and device for generating menu
CN114417803B (en) * 2022-03-29 2022-07-19 深圳竹云科技股份有限公司 Report generation method and device, computing equipment and computer storage medium
CN116414853A (en) * 2023-02-20 2023-07-11 广州快决测信息科技有限公司 Online report generation system, method, electronic equipment and medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013101914A1 (en) * 2011-12-29 2013-07-04 Bibo Labs, Inc. Spreadsheet-based programming language adapted for report generation
CN103823793A (en) * 2014-03-05 2014-05-28 成都交大光芒科技股份有限公司 Realizing method for dynamic report based on Excel template
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN106339363A (en) * 2015-07-07 2017-01-18 北京神州泰岳软件股份有限公司 PPT report making method and device
CN107918600A (en) * 2017-11-15 2018-04-17 泰康保险集团股份有限公司 report development system and method, storage medium and electronic equipment
CN107977351A (en) * 2017-12-28 2018-05-01 平安科技(深圳)有限公司 Electronic report forms generation method, device, computer equipment and storage medium
WO2018201601A1 (en) * 2017-05-05 2018-11-08 平安科技(深圳)有限公司 Data source-based service customisation apparatus, method, system, and storage medium
CN108829653A (en) * 2018-05-04 2018-11-16 山东中创软件工程股份有限公司 A kind of generation method of report, device, equipment and medium
CN109542554A (en) * 2018-10-26 2019-03-29 金蝶软件(中国)有限公司 Method, apparatus, computer equipment and the storage medium of document layout conversion
CN109657214A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Report form generation method, device, terminal and storage medium
CN109766529A (en) * 2018-12-03 2019-05-17 中国联合网络通信集团有限公司 A kind of generation method and equipment of report

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11644949B2 (en) * 2016-06-27 2023-05-09 Oracle International Corporation Autotagging a template of a reporting workbook

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013101914A1 (en) * 2011-12-29 2013-07-04 Bibo Labs, Inc. Spreadsheet-based programming language adapted for report generation
CN103823793A (en) * 2014-03-05 2014-05-28 成都交大光芒科技股份有限公司 Realizing method for dynamic report based on Excel template
CN106339363A (en) * 2015-07-07 2017-01-18 北京神州泰岳软件股份有限公司 PPT report making method and device
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
WO2018201601A1 (en) * 2017-05-05 2018-11-08 平安科技(深圳)有限公司 Data source-based service customisation apparatus, method, system, and storage medium
CN107918600A (en) * 2017-11-15 2018-04-17 泰康保险集团股份有限公司 report development system and method, storage medium and electronic equipment
CN107977351A (en) * 2017-12-28 2018-05-01 平安科技(深圳)有限公司 Electronic report forms generation method, device, computer equipment and storage medium
CN108829653A (en) * 2018-05-04 2018-11-16 山东中创软件工程股份有限公司 A kind of generation method of report, device, equipment and medium
CN109657214A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Report form generation method, device, terminal and storage medium
CN109542554A (en) * 2018-10-26 2019-03-29 金蝶软件(中国)有限公司 Method, apparatus, computer equipment and the storage medium of document layout conversion
CN109766529A (en) * 2018-12-03 2019-05-17 中国联合网络通信集团有限公司 A kind of generation method and equipment of report

Also Published As

Publication number Publication date
CN111126019A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111126019B (en) Report generation method and device based on mode customization and electronic equipment
CN109062567B (en) B/S structure-based information management system rapid development platform
CN111367976B (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN109408764B (en) Page area dividing method, device, computing equipment and medium
CN115617327A (en) Low code page building system, method and computer readable storage medium
CN110990274B (en) Data processing method, device and system for generating test cases
CN106469140A (en) A kind of report generating system and its method
CN112083920A (en) Front-end page design method, device, storage medium and equipment
CN108268525A (en) A kind of report implementation method and device based on Excel template
CN113590102B (en) Zero-code rapid software development method, system, medium and equipment
CN112558967A (en) Page automatic generation method and device, electronic equipment and storage medium
CN111414405A (en) Data acquisition method and device and electronic equipment
CN103729713A (en) Audit result display configuration method and device
CN115293124A (en) Automatic generation method and device for software engineering document
CN110806866A (en) Generation method and device of front-end management system
CN109213480A (en) A kind of method, storage medium, equipment and system for developing the back-stage management page
CN115358204A (en) Report generation method and device, electronic equipment and storage medium
CN114253537A (en) Form generation method and device, electronic equipment and storage medium
CN115543282A (en) Page code generation method and device, storage medium and computer equipment
CN113448552A (en) Code generation method and device
CN114371845A (en) Form generation method and device
US8392892B2 (en) Method and apparatus for analyzing application
CN112558969A (en) Webpage form generation method, device, equipment and medium
US20190042549A1 (en) Method and apparatus for building pages, apparatus and non-volatile computer storage medium
CN105739717A (en) Information input method and device

Legal Events

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