A report generation method and terminal

By using a configurable method for automatically generating reports, the problem of low efficiency in generating power distribution network data reports has been solved, achieving efficient and flexible data integration and field generation, and reducing development costs.

CN115169303BActive Publication Date: 2025-12-16STATE GRID FUJIAN POWER ELECTRIC CO ECONOMIC RESEARCH INSTITUTE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210687528.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-12-16
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

The existing methods for generating data reports for power distribution networks are inefficient and cannot adapt to rapidly changing needs and the integration and computation of multiple data sources, resulting in high development costs and low efficiency.

Method used

By receiving report definition information, basic configuration information is generated, query statements are automatically generated, and data is integrated. Reports are generated in a configuration-based manner without the need for writing code, thus achieving automatic report generation and data integration calculation.

Benefits of technology

It significantly reduces report generation costs, improves generation efficiency, supports flexible integration of multiple data sources and generation of custom fields, and enables rapid customization of report design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115169303B_ABST
    Figure CN115169303B_ABST
Patent Text Reader

Abstract

The application discloses a report generation method and a terminal. Report definition information is received, and basic configuration information of a report to be generated is generated according to the report definition information. Report entities determined based on a business scenario, entity fields corresponding to the report entities, and configuration information of association relationships between the report entities are received, and corresponding query statements are automatically generated according to the report entities, the entity fields, and the configuration information of the association relationships. The report to be generated is generated according to the basic configuration information and the query statements, and the report contains new entity fields generated based on the query statements. The automatic generation of the report can be realized only by the configuration of a page, the generation cost of the report is greatly reduced, the integration operation and the generation of the new fields can be synchronously completed based on the query statements while the report is generated, the report generation and the data integration are synchronously completed, and the generation efficiency of the report is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of table data processing, in particular to a report generation method and a terminal. BACKGROUND

[0002] The power distribution network is an important part of the power system, and analyzing the power distribution network data is an important way for business personnel to understand the operation of the power distribution network to ensure the stability and reliability of the power distribution network. In order to analyze the power distribution network data, generating a report based on the power distribution network data and presenting it to the business personnel in the form of a report is a common way.

[0003] However, the traditional power distribution network data report generation generally adopts a programming method, and customized development is performed according to the report requirements of users. The implementation of each report requires a software development process including requirement analysis, function design, prototype design, outline design, detailed design, development and implementation, system testing, and system online.

[0004] If the traditional power distribution data report generation method is used for the requirements of a client that change greatly, continuous report updating requirements, or continuous report optimization requirements, the design and development work needs to be constantly reworked and iterated, greatly increasing the software development cost and reducing the software development efficiency. Moreover, the power distribution network is a large and complex network, and there are data from different regions and various types of data in the power distribution network. Analysts need to present different data according to the analysis requirements, so when analyzing the power distribution network data, the data from different regions needs to be integrated, and various types of data needs to be transformed and operated. If the existing power distribution data report generation method is used, each integration and each transformation needs to be developed correspondingly. Moreover, for data from different data sources and transformation and operation of different types of data, the existing method generally connects different data sources through different interfaces on the generated report, then obtains data through different interfaces, integrates the data, and processes different types of data according to the transformation and operation relationship, which seriously affects the software development efficiency and further affects the report generation efficiency. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a report generation method and a terminal that can improve the report generation efficiency.

[0006] To solve the above technical problems, a technical solution adopted by the present application is as follows:

[0007] A report generation method, comprising the steps of:

[0008] S1, receive report definition information, and generate basic configuration information of a report to be generated according to the report definition information;

[0009] S2, receive report entities determined based on a business scenario, entity fields corresponding to the report entities, and configuration information of association relationships between the report entities, and automatically generate corresponding query statements according to the report entities, the entity fields, and the configuration information of the association relationships;

[0010] S3, generate the report to be generated according to the basic configuration information and the query statements, and the report includes new entity fields generated based on the query statements.

[0011] To solve the above technical problems, another technical solution adopted by the present application is:

[0012] A report generation terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements each step of the above report generation method when executing the computer program.

[0013] The present application has the advantages that: based on the received report definition information, the basic configuration information of the report is generated, based on the report entities adapted to the business scenario, the entity fields corresponding to the report entities, and the configuration information fields of the association relationships between the report entities, the corresponding query statements are generated, and finally based on the generated basic configuration information and the query statements, the report is generated, the report includes new entity fields generated based on the query statements, the report is generated in a configuration manner, without the need to write code, and only the configuration of the page can realize the automatic generation of the report, greatly reducing the generation cost of the report, and if the integration operation of data from different data reports and the generation of new fields are involved, only the association relationship between different data reports needs to be configured in the configuration stage and the corresponding query statements are automatically generated, the integration operation and the generation of new fields can be completed simultaneously based on the query statements when the report is generated, that is, the report generation and data integration are completed simultaneously, greatly improving the generation efficiency of the report. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 A step flow chart of a report generation method of an embodiment of the present application;

[0015] Figure 2 A structural schematic diagram of a report generation terminal of an embodiment of the present application;

[0016] Figure 3 A detailed flow chart of a report generation method of an embodiment of the present application;

[0017] Figure 4A schematic diagram of report data import of an embodiment of the present application;

[0018] Figure 5 A schematic diagram of report entity association relationship configuration in a report generation method of an embodiment of the present application;

[0019] Figure 6 A schematic diagram of report statement generation of an embodiment of the present application. DETAILED DESCRIPTION

[0020] To make the technical content, the achieved purposes and effects of the present application clear, the following will be described in combination with embodiments and the accompanying drawings.

[0021] Please refer to Figure 1 A report generation method, comprising the steps of:

[0022] S1, receiving report definition information, and generating basic configuration information of a report to be generated according to the report definition information;

[0023] S2, receiving report entity, entity field corresponding to the report entity and association relationship configuration information between each report entity based on a business scenario, and automatically generating a corresponding query statement according to the report entity, the entity field and the association relationship configuration information;

[0024] S3, generating the report to be generated according to the basic configuration information and the query statement, wherein the report contains a new entity field generated based on the query statement.

[0025] From the above description, the beneficial effects of the present application are: generating basic configuration information of a report based on received report definition information, generating a corresponding query statement based on report entity, entity field corresponding to the report entity and association relationship configuration information field between each report entity adapted to a business scenario, and finally generating a report based on the generated basic configuration information and the query statement, wherein the report contains a new entity field generated based on the query statement. The report is generated in a configuration manner, without the need to write code, but only needs to be configured through a page to realize automatic generation of the report, greatly reducing the generation cost of the report. Moreover, if integration operation of data from different data reports and generation of new fields are involved, only the association relationship between different data reports needs to be configured in the configuration stage and the corresponding query statement is automatically generated, and the integration operation and the generation of new fields can be completed simultaneously based on the query statement when the report is generated, that is, the report generation and the data integration are completed simultaneously, greatly improving the generation efficiency of the report.

[0026] Further, the step S1 further comprises the step of:

[0027] receiving a report entity creation request, the report entity creation request including a report entity identifier, a data source type corresponding to the report entity, and entity fields corresponding to the report entity;

[0028] creating a corresponding report entity according to the report entity creation request;

[0029] receiving a report entity data import request, and importing data into the created report entity according to the report entity data import request;

[0030] adding the report entity after the data import into a report entity list;

[0031] The report entity and the entity fields in the step S2 are determined based on the report entity list.

[0032] As can be seen from the above description, the report entity is configured by setting the report entity identifier, the data source type corresponding to the report entity, and the entity fields corresponding to the report entity, the configured report entity is added to the report entity list for the user to select and use when designing a report, and the flexibility of report generation is further improved.

[0033] Further, the report entity data import request includes a report entity identifier of data to be imported;

[0034] The data is imported into the created report entity according to the report entity data import request, including:

[0035] generating a corresponding template header dynamically according to the report entity identifier of the data to be imported;

[0036] receiving a template download request, and downloading a corresponding template header according to the template download request;

[0037] receiving a file upload request, and obtaining a template header after data import according to the file upload request;

[0038] Importing corresponding data into the created report entity according to the template header after the data import.

[0039] As can be seen from the above description, the corresponding template header is generated dynamically based on the report entity identifier, the user downloads and imports the adaptive data, and the corresponding data is imported into the report entity based on the template header of the imported data uploaded by the user, thereby realizing the automatic setting of the report basic data, which is convenient and fast.

[0040] Further, it further includes the steps of:

[0041] receive a report entity list update request, update the report entity list according to the report entity list update request, the report entity list update request comprising a report entity addition request, a report entity modification request or a report entity deletion request.

[0042] From the above description, it can be seen that the report entity can be added, modified and deleted through the report entity list update request, so as to maintain the report entity list, realizing the convenience and flexibility of maintaining the report entity.

[0043] Further, the automatically generating a corresponding query statement according to the report entity, the entity field and the association relationship configuration information comprises:

[0044] generating a report entity selection table according to the report entity and the entity field;

[0045] generating a report entity relationship table according to the association relationship configuration information;

[0046] automatically generating a corresponding query statement based on the report entity selection table and the report entity relationship table, the query statement comprising a dependent variable, an independent variable and an operation rule;

[0047] The dependent variable is an entity field to be generated determined based on the report entity relationship table, the independent variable is an entity field participating in operation determined based on the entity selection table, and the operation rule is an operation relationship between entity fields between different report entities determined based on the report entity relationship table.

[0048] From the above description, it can be seen that the report entity selection table is generated based on the report entity and the entity field, and the report entity relationship table is generated based on the association relationship configuration information, and then the query statement comprising the dependent variable, the independent variable and the operation rule is automatically generated based on the report entity selection table and the report entity relationship table. With the sorting of the report entity selection table and the report entity relationship table, the query statement can be quickly and conveniently generated, so that the corresponding entity field can be quickly generated based on the query statement, and the quick generation of the custom entity field is facilitated.

[0049] Further, the step S3 further comprises a step of:

[0050] receiving a report template configuration request, and configuring a template of the generated report according to the report template configuration request;

[0051] receiving a report display request, and displaying the configured report according to the report display request.

[0052] It can be known from the above description that the report template configuration request and the report display request can set the template of the report and display the report based on the set template, thereby realizing the customized design of the report interface display.

[0053] Further, the report template configuration request comprises a template type and a template presentation type.

[0054] The template of the report generated according to the report template configuration request comprises:

[0055] According to the template type, the corresponding template presentation type is matched.

[0056] The template of the report generated according to the template type and the matched template presentation type is configured.

[0057] It can be known from the above description that the template type and the template presentation type are contained in the report template configuration request. When the report template is configured, the corresponding template presentation type is matched according to the template type, so that the target type is adapted to the template presentation type. Then, the report template is configured based on the template type and the matched template presentation type, thereby ensuring the accuracy and diversity of the template presentation.

[0058] Further, the step S3 further comprises a step:

[0059] A temporary report establishment request is received, and a temporary report is generated according to the temporary report establishment request. The temporary report comprises a report entity or an entity field not contained in the report generated in the step S3.

[0060] Data in the temporary report is imported into the report generated in the step S3.

[0061] It can be known from the above description that the establishment of the temporary report can quickly obtain the temporary data through the establishment of the temporary report when the report needs the temporary data not contained in the table, thereby further improving the flexibility of the report setting.

[0062] Further, the step S3 further comprises a step:

[0063] A report authorization request is received, and the report authorization request comprises a report function authorization and a report data authorization.

[0064] The report generated in the step S3 is authorized according to the report function authorization and the report data authorization.

[0065] It can be known from the above description that the report function and the report data are further authorized after the report is generated, thereby ensuring the security of the report and ensuring that the report can play a greater role through appropriate authorization.

[0066] Referring to Figure 2 A report generation terminal, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements each step of the above report generation method when executing the computer program.

[0067] The above report generation method and terminal of the present application are applicable to application scenarios that require reference to different data sources and require various integration and operation of data to be analyzed, such as power distribution network data reports, which will be described below through specific embodiments:

[0068] Embodiment one

[0069] Referring to Figure 1 A report generation method, in this embodiment, the report is a report for power distribution network data, comprising the steps of:

[0070] S01, receiving a report entity creation request, wherein the report entity creation request contains a report entity identifier, a data source type corresponding to the report entity, and an entity field corresponding to the report entity;

[0071] S02, creating a corresponding report entity according to the report entity creation request;

[0072] In actual business scenarios, a business object is a report entity, as shown in Figure 3 This step is the basic configuration stage, which defines the report entity. The so-called report entity definition is the process of creating a business object, that is, the process of creating a bottom database table, which supports all business entities. For example, in a power distribution network, each power distribution network device can be considered as a business object, thereby constructing a corresponding report entity;

[0073] In order to realize the report entity definition, a visual method can be used, (1) in the report entity definition page, click to create a report entity, and fill in the report entity name (i.e. report entity identifier) in the pop-up entity creation window; (2) select the data source type (Mysql, Oracle, Postgresql, HIVE, etc.); (3) add entity fields, including field code, field annotation, field type, and field length. Multiple fields can be added here, and the actual business requirements are used as the standard;

[0074] After completing the above three steps, click submit to complete the definition of the report entity;

[0075] S03, receiving a report entity data import request, and importing data into the created report entity according to the report entity data import request;

[0076] The report entity data import request contains a report entity identifier of the data to be imported.

[0077] The data is imported into the created report entity according to the report entity data import request, including:

[0078] A corresponding template table header is dynamically generated according to the report entity identifier of the data to be imported.

[0079] A template download request is received, and a corresponding template table header is downloaded according to the template download request.

[0080] A file upload request is received, and a template table header after data import is obtained according to the file upload request.

[0081] Corresponding data is imported into the created report entity according to the template table header after data import.

[0082] After defining the report entity, as shown in Figure 3 The next step is to import report data, which can also be implemented using a visual interface. The page for importing report data is shown in Figure 4 In this page, select the report entity whose data needs to be imported, click "Download Data Import Template", and the template will dynamically generate a corresponding template table header according to the defined report entity. For example, if the report entity defines four fields A, B, C, and D, the generated template table header also has four columns A, B, C, and D. According to the specific business scenario, complete the filling of the "Data Import Template".

[0083] After filling in, click "Data Import", select the prepared "Data Import Template", and complete the import of report data. Only the corresponding data needs to be filled in the "Data Import Template" according to the actual demand. Then click the template data file in the page and click Import to realize the import of data. The background will poll the corresponding cell data in the four columns A, B, C, and D and store it into the four fields A, B, C, and D of the report entity.

[0084] If the data source of some fields in the report entity is an existing entity in the database, the data source can be directly obtained from the existing entity in the database, and the data import template is generated according to the custom fields, and the data columns of the template correspond to the custom fields one by one. For example, the report entity includes A1, A2, A3, A4 and A5 fields, wherein the A3 and A4 fields are from an existing entity in the database, so when the data import template is generated, the A3 and A4 fields are automatically skipped, the field codes and field names of A1, A2 and A5 are obtained, and three data columns are generated in the form of Excel, which correspond to A1, A2 and A5 one by one. When the template is imported, the data of the three data columns is read and stored in the corresponding report entity fields.

[0085] S04, adding the report entity after the data import to the report entity list;

[0086] The dynamic configuration of the data source is realized through steps S01-S04. Through the above dynamic configuration function, various mainstream databases such as Mysql, Oracle, Postgresql and HIVE can be configured and included in the report entity.

[0087] In the actual configuration process, the configuration and test of the data source can be completed by only knowing the data source type, IP address, port, database name, username and password. Specifically, by configuring the data source address including IP, port, dbname, etc., different jdbc drivers are called according to different database types to realize the calling of data of different data source types.

[0088] In order to realize the maintenance of the report entity list, in an optional embodiment, a report entity list update request is received, and the report entity list is updated according to the report entity list update request. The report entity list update request includes a report entity addition request, a report entity modification request or a report entity deletion request.

[0089] S1, receiving report definition information, and generating basic configuration information of a report to be generated according to the report definition information;

[0090] As shown in Figure 3 The report definition is the first step of report design, which can be realized in the form of an interface. In the report creation interface page, the name (i.e. report identifier) of the report, the report path, the report description, the report creator, the creation time, etc. are filled in, so as to realize the basic information configuration of the report.

[0091] S2, receiving report entity determined based on the business scenario, the entity field corresponding to the report entity and the association relationship configuration information between each report entity, automatically generating the corresponding query statement according to the report entity, the entity field and the association relationship configuration information, wherein the report entity and the entity field are determined based on the report entity list;

[0092] Specifically, according to the report defined in step S1, the report entity to be presented is selected based on the actual business scenario, the corresponding entity field in the selected report entity is further selected, multiple fields can be selected, and the association relationship between the selected report entities is configured, such as A table B field = C table D field, or a new field F = A table B field + C table D field, and multiple association relationships are supported.

[0093] In an optional embodiment, the association relationship configuration can be realized by screening, as shown in the following figure: Figure 5 By selecting two different tables and the fields corresponding to each table in turn, and selecting the relationship between the two tables, the association relationship between the two tables is configured.

[0094] S3, generating the report to be generated according to the basic configuration information and the query statement, wherein the report includes a new entity field generated based on the query statement;

[0095] S4, receiving a report template configuration request, and configuring the template of the generated report according to the report template configuration request;

[0096] The report template configuration request includes a template type and a template presentation type.

[0097] The report template configuration request includes a template type and a template presentation type.

[0098] According to the template type, the corresponding template presentation type is matched;

[0099] According to the template type and the matched template presentation type, the template of the generated report is configured;

[0100] In the report template configuration stage, the user can configure the template according to the actual demand, support configuring multiple templates, each template contains content: template type, display configuration, grouping configuration, sorting configuration, template presentation type, display form configuration (line chart, column chart, pie chart, table, Sanji diagram, bubble chart, etc.). Template type includes normal template, associated template, down-drill template, normal template directly configures grouping, sorting, presentation type, etc., associated template needs to select multiple defined templates to realize the association jump between templates, down-drill template needs to select multiple defined business-related sub-templates to realize the down-drill jump between templates; that is, if it is an associated template type, it needs to judge whether there is a defined template to realize the association jump between templates, if not, prompt the user to add a defined template, if it is a down-drill template, judge whether there is a defined business-related sub-template, if not, prompt the user to add a defined business-related sub-template, so as to realize the matching of template type and corresponding template presentation type;

[0101] As shown in Figure 3 The display configuration is the display field selection and configuration, that is, after generating the report, the fields that need to be displayed are selected and configured according to the actual application scene, the grouping configuration is the grouping field selection and configuration, the grouping field is generally a latitude field, such as area, type, etc., some fields need to be grouped according to the grouping field to calculate the maximum value, minimum value, average value or quantity, etc., such as in the power distribution network, it may include multiple areas, at this time the area field can be selected as the grouping field and configured to calculate the required parameters, such as load average, thereby the load condition of the power distribution network of each area can be determined, the sorting configuration is the sorting field selection and configuration, the sorting field is generally selected as an index field, such as a numerical value, a unit code, a time, etc., this type of field can usually be sorted and displayed according to the numerical value size, time, name, etc., therefore, when sorting display is required, the field to be sorted can be set, and the corresponding sorting method, such as ascending or descending, can be set.

[0102] S5, receiving a report display request, displaying the configured report according to the report display request;

[0103] In this embodiment, the automatic generation and display of the report are realized through data source configuration, table data configuration, field definition and page definition, without writing code, the automatic generation of the report is realized completely through page configuration, which greatly reduces the development cost and meets the rapid iteration of the report under the demand.

[0104] Embodiment two

[0105] The embodiment further defines how to automatically generate a corresponding query statement according to the report entity, the entity field and the association relationship configuration information, and specifically includes:

[0106] As shown in Figure 6 , a report entity selection table is generated according to the report entity and the entity field;

[0107] A report entity relationship table is generated according to the association relationship configuration information;

[0108] A corresponding query statement is automatically generated based on the report entity selection table and the report entity relationship table, and the query statement includes a dependent variable, an independent variable and an operation rule;

[0109] The dependent variable is an entity field to be generated determined based on the report entity relationship table, the independent variable is an entity field participating in operation determined based on the entity selection table, and the operation rule is an operation relationship between entity fields between different report entities determined based on the report entity relationship table;

[0110] Among them, the operation relationship can be a merging relationship, that is, two corresponding fields of different report entities are merged and spliced into a new field, such as in a power distribution network, the charge load field in the report entity corresponding to region A is merged with the charge load field in the report entity corresponding to region B, as a new field of the report entity corresponding to large region C;

[0111] The operation relationship can also be a preset conversion formula, such as calculating power distribution loss, there is a corresponding power distribution loss model calculation formula, and the calculation formula involves different calculation parameters, each of which comes from a field in a different report entity;

[0112] In an optional implementation, the operation relationship can be customized, the operation model corresponding to the operation relationship is constructed, and each variable involved in the operation model is bound to the corresponding field in the report entity, not only realizing the customization of the field, but also realizing the customization of the association relationship between different report entities, improving the flexibility of data association, and realizing the real-time adjustment of the report data taking logic;

[0113] As shown in Figure 6 , after defining the report, the defined report is stored, a report definition table is generated, and then a report statement is generated based on the report definition table and the generated query statement, and finally a report is generated based on the report statement and the report is displayed, wherein the report statement can further include a query condition, and the data corresponding to the field to be queried can be set to meet the condition, such as data in a certain time period, or data meeting a preset condition.

[0114] Embodiment three

[0115] The embodiment is further limited based on the embodiment one or the embodiment two:

[0116] The step S3 is further followed by a step of:

[0117] receiving a temporary report establishment request, and generating a temporary report according to the temporary report establishment request, the temporary report containing report entities or entity fields not contained in the report generated in the step S3;

[0118] importing data in the temporary report into the report generated in the step S3;

[0119] In the embodiment, when the currently generated report lacks some data, the definition of the temporary report table name, the definition of the fields (field code, field annotation, field type, field length), and the import, modification or deletion of the data can be completed through the interface, thereby constructing a temporary report containing the required data, and importing the required data from the temporary report into the current report, so as to facilitate the quick generation and import of the data not in the current report.

[0120] Embodiment four

[0121] The embodiment is further limited based on the embodiment one or the embodiment two or the embodiment three:

[0122] The step S3 is further followed by a step of:

[0123] receiving a report authorization request, the report authorization request including a report function authorization and a report data authorization;

[0124] authorizing the report generated in the step S3 according to the report function authorization and the report data authorization;

[0125] As shown in the following table, after the report is generated, the report can be authorized, and the authorization includes two aspects, one is the authorization of the report function, and the other is the authorization of the report data, the function authorization restricts which reports the user can access, and the data authorization restricts which data area the user can query in the report, and the authorization is realized through the menu, role and user association configuration, wherein, the role supports configuration of multiple, the function authorization and the data authorization configured for each role can be different, and each user can adjust the role to which it belongs, and the specific authorization process is as follows: Figure 3 defining a report menu;

[0126] defining a user role;

[0127] configuring the role, configuring the report menu it can access and the data area range it can access;

[0128]

[0129] assigning a defined role to a user;

[0130] After the above configuration is completed, the authorization process of the report is realized.

[0131] In an optional embodiment, it can be set whether the report template is public or private, and the user can view both the report template set by himself and the public template shared by others in the same report.

[0132] Embodiment five

[0133] Please refer to Figure 2 A report generation terminal, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of the report generation method according to any one of the above embodiments when executing the computer program.

[0134] In summary, the report generation method and terminal provided by the application generate basic configuration information of a report based on received report definition information, generate a corresponding query statement based on a report entity adapted to a business scenario, entity fields corresponding to the report entity and association relationship configuration information fields between each report entity, and finally generate a report based on the generated basic configuration information and query statement. The report contains new entity fields generated based on the query statement. The entire process of report generation is configured in a visual interface, including data source configuration, report definition configuration, report field configuration, association relationship configuration between different report entities, report template configuration and report display configuration. Thus, the report is generated without the need to write code, and the automatic generation of the report can be realized only by configuring the page, which greatly reduces the generation cost of the report. Moreover, if integration operation of data from different data reports and generation of new fields are involved, only the association relationship between different data reports needs to be configured in the configuration stage, and the corresponding query statement is automatically generated. The integration operation and the generation of new fields can be completed synchronously based on the query statement when the report is generated, that is, the report generation and data integration are completed synchronously. The data can be obtained from multiple data sources and across data sources. Temporary reports can be generated and the corresponding data can be maintained in an interface manner. The data association between different data sources is flexible, and the association relationship can be configured as needed, which greatly improves the generation efficiency and flexibility of the report, realizes the maintainability and expandability of the generated report, and greatly reduces or even avoids the workload of system secondary development through the interface configuration of data sources, temporary table maintenance, data association, template configuration and the like. The low-threshold configuration also greatly reduces the labor cost of operation and maintenance, training and other work, greatly improves the design efficiency of report customization, and solves the business pain points such as continuous changes in report requirements, difficulty in cross-data-source data acquisition, and large amount of work handover content.

[0135] The above merely illustrates the embodiments of the present application, and is not intended to limit the patent scope of the present application. Any equivalent variation or direct or indirect application in the related technical field made according to the content of the present application specification and drawings shall be included in the patent protection scope of the present application.

Claims

1. A method of generating a report, characterized by, The method comprises the steps of: S1, receiving report definition information, and generating basic configuration information of a report to be generated according to the report definition information; S2, receiving report entities determined based on a business scenario, entity fields corresponding to the report entities, and configuration information of association relationships between the report entities, and automatically generating corresponding query statements according to the report entities, the entity fields, and the configuration information of the association relationships; S3, generating the report to be generated according to the basic configuration information and the query statements, wherein the report comprises new entity fields generated based on the query statements; Before the step S1, the method further comprises the steps of: receiving a report entity creation request, wherein the report entity creation request comprises a report entity identifier, a data source type corresponding to the report entity, and entity fields corresponding to the report entity; creating a corresponding report entity according to the report entity creation request; receiving a report entity data import request, and importing data into the created report entity according to the report entity data import request; adding the report entity after the data import into a report entity list; the report entities and the entity fields in the step S2 are determined based on the report entity list; the automatically generating of the corresponding query statements according to the report entities, the entity fields, and the configuration information of the association relationships comprises: generating a report entity selection table according to the report entities and the entity fields; generating a report entity relationship table according to the configuration information of the association relationships; automatically generating the corresponding query statements based on the report entity selection table and the report entity relationship table, wherein the query statements comprise dependent variables, independent variables, and operation rules; the dependent variables are entity fields to be generated which are determined based on the report entity relationship table, the independent variables are entity fields participating in operation which are determined based on the entity selection table, and the operation rules are operation relationships between entity fields of different report entities which are determined based on the report entity relationship table.

2. The method of claim 1, wherein, the report entity data import request comprises a report entity identifier of data to be imported; the importing of the data into the created report entity according to the report entity data import request comprises: dynamically generating a corresponding template table header according to the report entity identifier of the data to be imported; receiving a template download request, and downloading the corresponding template table header according to the template download request; receiving a file upload request, and obtaining a template table header after data import according to the file upload request; importing corresponding data into the created report entity according to the template table header after the data import.

3. The report generation method of claim 1 or 2, wherein, The method further comprises the steps of: receiving a report entity list update request, and updating the report entity list according to the report entity list update request, wherein the report entity list update request comprises a report entity addition request, a report entity modification request, or a report entity deletion request.

4. The method of claim 1 or 2, wherein, After the step S3, the method further comprises the steps of: receiving a report template configuration request, and configuring a template of the generated report according to the report template configuration request; receiving a report display request, and displaying the configured report according to the report display request.

5. The method of claim 4, wherein, the report template configuration request comprises a template type and a template presentation type. The template of the report generated according to the report template configuration request comprises: According to the template type, a corresponding template presentation type is matched; Based on the template type and the matched template presentation type, the template of the generated report is configured.

6. The method of claim 1 or 2, wherein, The step S3 further comprises the following steps: A temporary report establishment request is received, and a temporary report is generated according to the temporary report establishment request, wherein the temporary report contains report entities or entity fields not contained in the report generated in the step S3; Data in the temporary report is imported into the report generated in the step S3.

7. The method of claim 1, 2 or 5, wherein, The step S3 further comprises the following steps: A report authorization request is received, wherein the report authorization request comprises a report function authorization and a report data authorization; The report generated in the step S3 is authorized according to the report function authorization and the report data authorization.

8. A report generation terminal comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize each step in the report generation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Report generation method, terminal equipment and storage medium

    CN112256684A

  • Report configuration method, device and equipment and computer storage medium

    CN113342821A