Report generation method and device, electronic equipment and storage medium

文档序号:1242913 发布日期:2020-08-18 浏览:6次 中文

阅读说明:本技术 报表生成方法、装置、电子设备及存储介质 (Report generation method and device, electronic equipment and storage medium ) 是由 熊志国 熊一龙 王德品 于 2020-04-21 设计创作,主要内容包括:本发明涉及大数据技术领域,揭露了一种报表生成方法,包括:接收报表集,提取所述报表集中所有的底层数据模型并汇总,得到初始报表数据模型集;从所述初始报表数据模型集中筛选出公共报表数据模型;接收待生成报表的字段集,计算所述字段集与所述公共报表数据模型中字段的匹配值,选取所述匹配值大于预设阈值的公共报表数据模型,得到通用报表数据模型;获取待生成报表的报表数据,并将所述待生成报表的报表数据导入到所述通用报表数据模型中,生成报表。本发明还提出一种报表生成装置、电子设备以及计算机可读存储介质。本发明可以提高报表生成的时效性。(The invention relates to the technical field of big data, and discloses a report generation method, which comprises the following steps: receiving a report set, extracting all bottom layer data models in the report set and summarizing to obtain an initial report data model set; screening out a public report data model from the initial report data model set; receiving a field set of a report to be generated, calculating a matching value of the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model; and acquiring report data of the report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report. The invention also provides a report generating device, electronic equipment and a computer readable storage medium. The invention can improve the timeliness of report generation.)

1. A report generation method is applied to a computing device and is characterized by comprising the following steps:

receiving a report set, extracting all bottom layer data models in the report set and summarizing to obtain an initial report data model set;

screening out a public report data model from the initial report data model set;

receiving a field set of a report to be generated, calculating a matching value of the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model;

and acquiring report data of the report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report.

2. The report generation method of claim 1, wherein the screening of the common reporting data model from the set of initial reporting data models comprises:

clustering the initial report data model set to obtain a target report data model set;

establishing a matrix for the target report data model set;

calculating the expected value of each target report data model in the matrix according to a preset correlation algorithm;

and taking the target report data model with the same expected value as the public report data model.

3. A report generation method according to claim 2, characterized in that said preset correlation algorithm comprises:

wherein, CiExpected value, E, representing the ith target report data modeliA feature vector representing the ith target report data model,representing the feature vector covariance of the ith target report data model in the matrix, and trace () representing a spatial filter function.

4. The report generation method of claim 1, wherein the calculating matching values for the set of fields to fields in the common report data model comprises:

acquiring the same fields of the field set and the fields in the public report data model, and identifying the same fields to obtain a target field set;

summarizing the field length of each field in the field set to obtain a first field length value;

summarizing the field lengths of all fields in the public report data model to obtain a second field length value;

summarizing the field length of each field in the target field set to obtain a third field length value;

calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio;

calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio;

and obtaining a matching value of the field set and the fields in the public report data model according to the first ratio and the second ratio.

5. The report generation method according to any of claims 1 to 4, wherein the importing the report data of the report to be generated into the common report data model to generate a report comprises:

creating an object receiving script in the general report data model, and receiving report data of the report to be generated by using the object receiving script to obtain initial report data;

and transmitting the initial report data to an SQL configuration statement of the general report data model, and operating the SQL configuration statement to generate a report.

6. The report generation method of claim 5, wherein after generating the report, the method further comprises: and displaying the report in a webpage platform by using a data graphical tool.

7. A report generation apparatus, characterized in that the apparatus comprises:

the extraction and summarization module is used for receiving a report set, extracting and summarizing all bottom layer data models in the report set, and obtaining an initial report data model set;

the screening module is used for screening out a public report data model from the initial report data model set;

the calculation and selection module is used for receiving a field set of the report to be generated, calculating a matching value between the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a general report data model;

and the import module is used for acquiring the report data of the report to be generated, importing the report data of the report to be generated into the general report data model and generating the report.

8. The report generating apparatus of claim 7, wherein the filtering module comprises: a clustering submodule: the system comprises an initial report data model set, a target report data model set and a matrix, wherein the initial report data model set is used for clustering to obtain the target report data model set;

a calculation submodule: and the expected value of each target report data model in the matrix is calculated according to a preset correlation algorithm, and the target report data models with the same expected values are used as the public report data models.

9. An electronic device, characterized in that the electronic device comprises:

at least one processor; and the number of the first and second groups,

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the report generating method according to any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the report generating method according to any one of claims 1 to 6.

Technical Field

The invention relates to the technical field of big data, in particular to a report generation method and device, electronic equipment and a computer readable storage medium.

Background

The report forms are an indispensable data display form in daily statistical analysis, financial settlement and other businesses. At present, reports are usually generated through tools such as excel or simple graphical interfaces.

However, when report generation is performed through excel or a simple graphical interface or other tools, report generation conditions are often required to be screened to select a bottom layer data model generated by a report, since the screening conditions generated by each report are not identical, and the corresponding bottom layer data model is only specific to the current single report, a computer is required to store massive quantities of bottom layer data models generated by the reports, and the timeliness of report generation is easily affected.

Disclosure of Invention

The invention provides a method and a device for generating a report, electronic equipment and a computer readable storage medium, and mainly aims to improve the timeliness of report generation.

In order to achieve the above object, the present invention provides a report generating method, including:

receiving a report set, extracting all bottom layer data models in the report set and summarizing to obtain an initial report data model set;

screening out a public report data model from the initial report data model set;

receiving a field set of a report to be generated, calculating a matching value of the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model;

and acquiring report data of the report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report.

Optionally, the screening out a common report data model from the initial report data model set includes:

clustering the initial report data model set to obtain a target report data model set;

establishing a matrix for the target report data model set;

calculating the expected value of each target report data model in the matrix according to a preset correlation algorithm;

and taking the target report data model with the same expected value as the public report data model.

Optionally, the preset correlation algorithm includes:

wherein, CiExpected value, E, representing the ith target report data modeliA feature vector representing the ith target report data model,representing the feature vector covariance of the ith target report data model in the matrix, and trace () representing a spatial filter function.

Optionally, the calculating matching values of the field set and the fields in the public reporting data model includes:

acquiring the same fields of the field set and the fields in the public report data model, and identifying the same fields to obtain a target field set;

summarizing the field length of each field in the field set to obtain a first field length value;

summarizing the field lengths of all fields in the public report data model to obtain a second field length value;

summarizing the field length of each field in the target field set to obtain a third field length value;

calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio;

calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio;

and obtaining a matching value of the field set and the fields in the public report data model according to the first ratio and the second ratio.

Optionally, the importing the report data of the report to be generated into the general report data model to generate the report includes:

creating an object receiving script in the general report data model, and receiving report data of the report to be generated by using the object receiving script to obtain initial report data;

and transmitting the initial report data to an SQL configuration statement of the general report data model, and operating the SQL configuration statement to generate a report.

Optionally, after generating the report, the method further includes: and displaying the report in a webpage platform by using a data graphical tool.

In order to solve the above problem, the present invention further provides a report generating apparatus, including:

the extraction and summarization module is used for receiving a report set, extracting and summarizing all bottom layer data models in the report set, and obtaining an initial report data model set;

the screening module is used for screening out a public report data model from the initial report data model set;

the calculation and selection module is used for receiving a field set of the report to be generated, calculating a matching value between the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a general report data model;

and the import module is used for acquiring the report data of the report to be generated, importing the report data of the report to be generated into the general report data model and generating the report.

Optionally, the screening module comprises:

a clustering submodule: the system comprises an initial report data model set, a target report data model set and a matrix, wherein the initial report data model set is used for clustering to obtain the target report data model set;

a calculation submodule: and the expected value of each target report data model in the matrix is calculated according to a preset correlation algorithm, and the target report data models with the same expected values are used as the public report data models.

In order to solve the above problem, the present invention also provides an electronic device, including:

a memory storing at least one instruction; and

and the processor executes the instructions stored in the memory to realize the report generation method.

In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the report generation method described in the above.

The method comprises the steps of firstly, acquiring all bottom layer data models from a report set, summarizing to obtain an initial report data model set, and screening out a public report data model from the initial report data model set; secondly, calculating a matching value between a field set of the report to be generated and a field in the public report data model, selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model, solving the problem that a bottom layer data model generated by each report only aims at the current single report, and releasing resources stored by a computer system; and further, acquiring report data of a report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report. Therefore, the report generation method, the report generation device, the electronic equipment and the computer-readable storage medium can improve the timeliness of report generation.

Drawings

Fig. 1 is a schematic flowchart of a report generation method according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a detailed implementation of step S3 in the text feature semantic extracting method of FIG. 1 according to the present invention;

fig. 3 is a schematic block diagram of a report generation apparatus according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of an electronic device implementing a report generating method according to an embodiment of the present invention;

the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The invention provides a report generation method. Fig. 1 is a schematic flow chart of a report generation method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.

In this embodiment, the method for generating a report includes:

and S1, receiving the report set, extracting and summarizing all bottom layer data models in the report set, and obtaining an initial report data model set.

In at least one embodiment of the invention, the report set may be obtained by summarizing existing reports.

Wherein the report includes, but is not limited to: student score reports, enterprise quarter assessment reports, financial data statistics reports, and the like.

The bottom data model is a data model configured through SQL statements, and report data required by a corresponding report can be generated through the bottom data model. For example: the sales performance report forms of each quarter in a year of a department group of a certain housing company comprise monthly performance, total performance and average performance of each quarter, wherein SQL sentences need to be configured for the monthly performance, the total performance and the average performance of the department group respectively, and report data of the monthly performance, the total performance and the average performance can be generated according to the SQL sentences, wherein the SQL sentences form a bottom data model of the sales performance report forms.

Further, because the bottom layer data models between the reports may have commonalities, the invention extracts and summarizes the bottom layer data models in the report set to obtain an initial report data model set for subsequent analysis of the data models of the reports.

In detail, the extracting and summarizing all bottom layer data models in the report set to obtain an initial report data model includes:

establishing a unique identifier for each report in the report set by using an md5 algorithm to obtain an initial report set, rapidly identifying the position of each report according to the unique identifier, splitting SQL (structured query language) statements for each report in the initial report set, generating a corresponding report bottom layer data model according to a splitting result, summarizing the report bottom layer data model, and storing the summarized report bottom layer data model into a database to obtain an initial report data model.

And S2, screening out a public report data model from the initial report data model set.

In one embodiment of the present invention, since the underlying data model of the report is obtained by configuring the SQL statement, the initial report data model set includes the same SQL statement, and thus, according to the SQL statement in the initial report data model set and by using a preset correlation algorithm, the embodiment of the present invention screens out the common report data model from the target report data model set. The public report data model refers to a data model configured by combining the same SQL statements. For example: a, B, C, D four reports of the same type exist, the bottom layer data model of each report is combined by 4 SQL query results, wherein, 2 SQL statements corresponding to the bottom layer data models of A, B, C three reports are the same, so the same 2 SQL statements are extracted and combined to generate a bottom layer data model as a public data model, and other reports which are independently applicable to a single report are used as independent data models.

In detail, the screening out a common report data model from the initial report data model set includes:

clustering the initial report data model set by using a clustering algorithm, namely summarizing reports of the same type together to obtain a target report data model set;

establishing a matrix for the target report data model set;

calculating the expected value of each target report data model in the matrix according to a preset correlation algorithm;

and taking the target report data model with the same expected value as the public report data model.

Optionally, the clustering algorithm may be a k-means algorithm.

Optionally, the correlation algorithm is as follows:

wherein, CiExpected value, E, representing the ith target report data modeliA feature vector representing the ith target report data model,representing the feature vector covariance of the ith target report data model in the matrix, and trace () representing a spatial filter function.

S3, receiving a field set of the report to be generated, calculating a matching value between the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model.

In at least one embodiment of the present invention, the field set includes, but is not limited to, id, date, password, username, data, and the like. For example, if the report to be generated is a student achievement list, the field set included in the report to be generated may be: student, time, achievements, and name, etc.

In detail, referring to fig. 2, the calculating the matching values of the field sets and the fields in the public reporting data model includes:

s30, acquiring the same fields of the field set and the fields in the public report data model, and identifying the same fields to obtain a target field set;

in a preferred embodiment of the invention, the same field of the field set and the field in the public report data model is obtained through an SQL query statement, for example, a field student exists in the field set, the SQL query statement is used for carrying out field query on the public report data model, and if the field student is queried, the field student is identified.

S31, summarizing the field length of each field in the field set to obtain a first field length value, summarizing the field lengths of all fields in the public report data model to obtain a second field length value, summarizing the field length of each field in the target field set to obtain a third field length value;

in an embodiment of the present invention, the field length refers to the number of characters contained in the corresponding field, for example, if the field student contains 7 characters, the field degree of the field student is 7.

S32, calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio, and calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio.

Optionally, calculating the ratio of the length value of the third field to the length value of the first field by using the following method, and obtaining the first ratio includes:

where P1 denotes the first percentage, m denotes the third field length value, and n denotes the first field length value.

Optionally, calculating a ratio of the length value of the third field to the length value of the second field by using the following method, and obtaining the second ratio includes:

where P2 denotes the second ratio, m denotes the third field length value, and t denotes the second field length value.

And S33, obtaining the matching value of the field set and the field in the public report data model according to the first ratio and the second ratio.

In one embodiment of the invention, the average value of the first ratio and the second ratio is used as the matching value of the field set and the field in the public reporting data model.

Optionally, the average of the first ratio and the second ratio is calculated by the following method:

wherein P represents an average of the first and second ratios.

Further, in a preferred embodiment of the present invention, the public reporting data model with the matching value greater than the preset threshold is selected as the general reporting data model, and optionally, the preset threshold is 0.6.

In another embodiment of the present invention, the method further comprises: the general report data model is dynamically configured by configuring the SQL statement, for example, the time field in the SQL statement is configured, so that the monthly average sales general report data model can be configured as the weekly average sales general report data model or the annual average sales general report data model.

And S4, acquiring the report data of the report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report.

Optionally, the report data is different according to different types of the report to be generated, for example, if the report to be generated is an enterprise quarterly report, the report data of the enterprise quarterly report includes: enterprise profit data, enterprise asset data, enterprise profit-loss proportion data and the like.

Preferably, the embodiment of the invention imports the report data of the report to be generated into the general report data model to generate the report, thereby greatly improving the generation speed of the report to be generated.

In detail, the importing the report data of the report to be generated into the general report data model, and the generating the report includes:

creating an object receiving script in the general report data model, and receiving report data of the report to be generated by using the object receiving script to obtain initial report data; and transmitting the initial report data to an SQL configuration statement of the general report data model by using the sheet object, and operating the SQL configuration statement to generate a report.

Furthermore, the report is displayed in a webpage platform through a data graphical tool in the embodiment of the invention.

Optionally, the data graphical tool is obtained by compiling through a javaweb webpage technology.

Specifically, the displaying the report collection result in the web page platform by using the data graphical tool comprises:

and importing a project package of the data graphical tool in a compiling environment, importing a report collection result into the project package, and operating the project package by using an open-source data graphical code to obtain a visual report. The visual report can be displayed in a webpage platform in different forms, wherein the forms comprise: pie, tree, and bar shapes.

The method comprises the steps of firstly, acquiring all bottom layer data models from a report set, summarizing to obtain an initial report data model set, and screening out a public report data model from the initial report data model set; secondly, calculating a matching value between a field set of the report to be generated and a field in the public report data model, selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model, solving the problem that a bottom layer data model generated by each report only aims at the current single report, and releasing resources stored by a computer system; and further, acquiring report data of a report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report. Therefore, the report generation method provided by the invention can improve the timeliness of report generation.

Fig. 3 is a schematic block diagram of a report generation apparatus according to an embodiment of the present invention.

The report generating apparatus 100 according to the present invention may be installed in an electronic device. According to the realized function, the report generating device may include an extracting and summarizing module 101, a screening module 102, a calculating and selecting module 103, and an importing module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.

In the present embodiment, the functions regarding the respective modules/units are as follows:

the extraction and summarization module 101 is configured to receive a report set, extract and summarize all bottom layer data models in the report set, and obtain an initial report data model set.

In at least one embodiment of the invention, the report set may be obtained by summarizing existing reports. Wherein the report includes, but is not limited to: student score reports, enterprise quarter assessment reports, financial data statistics reports, and the like.

The bottom data model is a data model configured through SQL statements, and report data required by a corresponding report can be generated through the bottom data model. For example: the sales performance report forms of each quarter in a year of a department group of a certain housing company comprise monthly performance, total performance and average performance of each quarter, wherein SQL sentences need to be configured for the monthly performance, the total performance and the average performance of the department group respectively, and report data of the monthly performance, the total performance and the average performance can be generated according to the SQL sentences, wherein the SQL sentences form a bottom data model of the sales performance report forms.

Further, because the bottom layer data models between the reports may have commonalities, the invention extracts and summarizes the bottom layer data models in the report set to obtain an initial report data model set for subsequent analysis of the data models of the reports.

In detail, the extracting and summarizing all bottom layer data models in the report set to obtain an initial report data model includes:

establishing a unique identifier for each report in the report set by using an md5 algorithm to obtain an initial report set, rapidly identifying the position of each report according to the unique identifier, splitting SQL (structured query language) statements for each report in the initial report set, generating a corresponding report bottom layer data model according to a splitting result, summarizing the report bottom layer data model, and storing the summarized report bottom layer data model into a database to obtain an initial report data model.

The screening module 102 is configured to screen out a common report data model from the initial report data model set.

In one embodiment of the present invention, since the underlying data model of the report is obtained by configuring the SQL statement, the initial report data model set includes the same SQL statement, and thus, according to the SQL statement in the initial report data model set and by using a preset correlation algorithm, the embodiment of the present invention screens out the common report data model from the target report data model set. The public report data model refers to a data model configured by combining the same SQL statements. For example: a, B, C, D four reports of the same type exist, the bottom layer data model of each report is combined by 4 SQL query results, wherein, 2 SQL statements corresponding to the bottom layer data models of A, B, C three reports are the same, so the same 2 SQL statements are extracted and combined to generate a bottom layer data model as a public data model, and other reports which are independently applicable to a single report are used as independent data models.

In detail, the screening module 102 further includes:

clustering sub-module 1020: clustering the initial report data model set by using a clustering algorithm, namely summarizing reports of the same type together to obtain a target report data model set, and establishing a matrix for the target report data model set;

the calculation submodule 1021: and calculating the expected value of each target report data model in the matrix according to a preset correlation algorithm, and taking the target report data models with the same expected values as the public report data model.

Optionally, the clustering algorithm may be a k-means algorithm.

Optionally, the correlation algorithm is as follows:

wherein, CiExpected value, E, representing the ith target report data modeliA feature vector representing the ith target report data model,representing the feature vector covariance of the ith target report data model in the matrix, and trace () representing a spatial filter function.

The calculation and selection module 103 is configured to receive a field set of a report to be generated, calculate a matching value between the field set and a field in the public report data model, and select the public report data model with the matching value greater than a preset threshold value to obtain a general report data model.

In at least one embodiment of the present invention, the field set includes, but is not limited to, id, date, password, username, data, and the like. For example, if the report to be generated is a student achievement list, the field set included in the report to be generated may be: student, time, achievements, and name, etc.

In detail, the calculating the matching values of the field set and the fields in the public reporting data model comprises:

step I, acquiring the same fields of the field set and the fields in the public report data model, and identifying the same fields to obtain a target field set;

in a preferred embodiment of the invention, the same field of the field set and the field in the public report data model is obtained through an SQL query statement, for example, a field student exists in the field set, the SQL query statement is used for carrying out field query on the public report data model, and if the field student is queried, the field student is identified.

Step II, summarizing the field length of each field in the field set to obtain a first field length value, summarizing the field lengths of all fields in the public report data model to obtain a second field length value, summarizing the field length of each field in the target field set to obtain a third field length value;

in an embodiment of the present invention, the field length refers to the number of characters contained in the corresponding field, for example, if the field student contains 7 characters, the field degree of the field student is 7.

And III, calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio, and calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio.

Optionally, calculating the ratio of the length value of the third field to the length value of the first field by using the following method, and obtaining the first ratio includes:

where P1 denotes the first percentage, m denotes the third field length value, and n denotes the first field length value.

Optionally, calculating a ratio of the length value of the third field to the length value of the second field by using the following method, and obtaining the second ratio includes:

where P2 denotes the second ratio, m denotes the third field length value, and t denotes the second field length value.

And IV, obtaining a matching value of the field set and a field in the public report data model according to the first ratio and the second ratio.

In one embodiment of the invention, the average value of the first ratio and the second ratio is used as the matching value of the field set and the field in the public reporting data model.

Optionally, the average of the first ratio and the second ratio is calculated by the following method:

wherein P represents an average of the first and second ratios.

Further, in a preferred embodiment of the present invention, the public reporting data model with the matching value greater than the preset threshold is selected as the general reporting data model, and optionally, the preset threshold is 0.6.

In another embodiment of the present invention, the method further comprises: the general report data model is dynamically configured by configuring the SQL statement, for example, the time field in the SQL statement is configured, so that the monthly average sales general report data model can be configured as the weekly average sales general report data model or the annual average sales general report data model.

The import module 104 is configured to obtain report data of a report to be generated, import the report data of the report to be generated into the general report data model, and generate the report.

Optionally, the report data is different according to different types of the report to be generated, for example, if the report to be generated is an enterprise quarterly report, the report data of the enterprise quarterly report includes: enterprise profit data, enterprise asset data, enterprise profit-loss proportion data and the like.

Preferably, the embodiment of the invention imports the report data of the report to be generated into the general report data model to generate the report, thereby greatly improving the generation speed of the report to be generated.

In detail, the importing the report data of the report to be generated into the general report data model, and the generating the report includes:

creating an object receiving script in the general report data model, and receiving report data of the report to be generated by using the object receiving script to obtain initial report data; and transmitting the initial report data to an SQL configuration statement of the general report data model by using the sheet object, and operating the SQL configuration statement to generate a report.

Furthermore, the report is displayed in a webpage platform through a data graphical tool in the embodiment of the invention.

Optionally, the data graphical tool is obtained by compiling through a javaweb webpage technology.

Specifically, the displaying the report collection result in the web page platform by using the data graphical tool comprises:

and importing a project package of the data graphical tool in a compiling environment, importing a report collection result into the project package, and operating the project package by using an open-source data graphical code to obtain a visual report. The visual report can be displayed in a webpage platform in different forms, wherein the forms comprise: pie, tree, and bar shapes.

The method comprises the steps of firstly, acquiring all bottom layer data models from a report set, summarizing to obtain an initial report data model set, and screening out a public report data model from the initial report data model set; secondly, calculating a matching value between a field set of the report to be generated and a field in the public report data model, selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model, solving the problem that a bottom layer data model generated by each report only aims at the current single report, and releasing resources stored by a computer system; and further, acquiring report data of a report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report. Therefore, the report generation method provided by the invention can improve the timeliness of report generation.

Fig. 4 is a schematic structural diagram of an electronic device implementing a report generation method according to an embodiment of the present invention.

The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a report generator 12, stored in the memory 11 and operable on the processor 10.

The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the report generator 12, but also to temporarily store data that has been output or is to be output.

The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., the report generator 12, etc.) stored in the memory 11 and calling data stored in the memory 11.

The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.

Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.

For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.

Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.

Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.

It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.

The report generator 12 stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can implement:

receiving a report set, extracting all bottom layer data models in the report set and summarizing to obtain an initial report data model set;

screening out a public report data model from the initial report data model set;

receiving a field set of a report to be generated, calculating a matching value of the field set and a field in the public report data model, and selecting the public report data model with the matching value larger than a preset threshold value to obtain a universal report data model;

and acquiring report data of the report to be generated, and importing the report data of the report to be generated into the general report data model to generate the report.

Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again.

Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).

In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.

The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.

It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.

The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.

Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.

Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种测量报告生成系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!