Report generation method, device and equipment and computer readable storage medium

CN117669517BActive Publication Date: 2026-10-16WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311634765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2026-10-16
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种报表生成方法,旨在解决现有报表生成的普适性较低的技术问题

Benefits of technology

[0060] This application proposes a report generation method, apparatus, device, and computer-readable storage medium. It obtains report requirement information from target users and then constructs a corresponding report data map based on this information, according to a preset data classification hierarchy. This allows for structural standardization of the report at the data classification level and finer-grained management of the report. Next, data is populated into the target view table in the report data map, filling it with relevant indicator parameters. Since the report data map is still based on underlying data, the populated target view table can be visualized according to requirements to obtain the target report. This application, by achieving structural standardization and fine-grained management of the report at the data classification level, ensures that the developed report data map containing the target view table is structurally standardized and unified, effectively improving the universality of report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117669517B_ABST
    Figure CN117669517B_ABST
Patent Text Reader

Abstract

The application discloses a report generation method and device, equipment and a computer readable storage medium, and relates to the technical field of computers. The report generation method comprises the following steps: obtaining report requirement information of a target user; constructing a corresponding report data map according to a preset data classification hierarchy based on the report requirement information; performing data filling on a target view table in the report data map, and performing visual processing on the filled target view table to obtain a target report. The application solves the technical problem of low universality of report generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology (Fintech), and more particularly to a report generation method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher demands are being placed on technology.

[0003] Currently, in the financial industry, report generation typically involves users querying existing report databases and configuring the corresponding reports based on the retrieved information. Alternatively, users may develop their own reports based on business needs and configure them accordingly. However, the lack of standardized and unified development methods among different users results in low universality of report generation. Summary of the Invention

[0004] The main purpose of this application is to provide a report generation method that aims to solve the technical problem of low universality in existing report generation methods.

[0005] To achieve the above objectives, in a first aspect, this application provides a report generation method applied to a report generation device, the report generation method comprising:

[0006] Obtain the reporting requirements information of the target users;

[0007] Based on the report requirement information, construct the corresponding report data map according to the preset data classification hierarchy;

[0008] The target view table in the report data map is populated with data, and the populated target view table is visualized to obtain the target report.

[0009] According to the first aspect, the step of constructing a corresponding report data map based on the report requirement information and according to a preset data classification hierarchy includes:

[0010] Based on the report requirements, determine the corresponding data hierarchy information;

[0011] Based on the data hierarchy information, a report data map containing the target view table is constructed according to a preset data classification hierarchy.

[0012] According to the first aspect, or any implementation of the first aspect above, the step of determining the corresponding data hierarchy information based on the report requirement information includes:

[0013] Based on the report engineering function in the report requirement information, determine the corresponding target project;

[0014] Based on the report dimensions in the report requirement information, determine the corresponding target theme;

[0015] Based on the target view table corresponding to the aforementioned report requirement information, determine the corresponding target chart;

[0016] Based on the report metrics of the target view table, determine the corresponding target fields;

[0017] The target project, the target theme, the target chart, and the target field are used as the data hierarchy information corresponding to the report requirement information.

[0018] According to the first aspect, or any implementation of the first aspect above, the step of populating the target view table in the report data map with data includes:

[0019] Based on the report requirement information, obtain the corresponding raw data tables and confirm the dependencies between the raw data tables;

[0020] Based on the aforementioned dependency relationship, corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

[0021] According to the first aspect, or any implementation of the first aspect above, before the step of selecting corresponding indicator parameters from the original data table based on the dependency relationship and inserting them into the target view table to populate the target view table with data, the method includes:

[0022] The data retrieval logic of the indicators of each target view table in the report requirement information is converted into auxiliary code;

[0023] Based on the auxiliary code, generate the complete code corresponding to the target view table using a preset script;

[0024] Configure the complete code as a scheduled task, and after the scheduled task is triggered, execute the following steps: based on the dependency relationship, select the corresponding indicator parameters from the original data table and insert them into the target view table to populate the target view table with data.

[0025] According to the first aspect, or any implementation of the first aspect above, the step of visualizing the filled target view table to obtain the target report includes:

[0026] Receive user interaction operations regarding report style parameters and confirm the report style parameters of the target report;

[0027] Based on the report style parameters and the populated target view table, generate the corresponding target report.

[0028] According to the first aspect, or any implementation of the first aspect above, after the steps of populating the target view table with data and visualizing the populated target view table to obtain the target report, the method includes:

[0029] Publish the target report to the website of the department to which the target user belongs;

[0030] Obtain the list of authorized users for the target report, and grant viewing permissions to the target report on the department's site based on the list of authorized users.

[0031] Secondly, this application provides a report generation device, applied to a report generation equipment, the report generation device comprising:

[0032] The acquisition module is used to acquire the report requirement information of the target user;

[0033] The construction module is used to construct a corresponding report data map based on the report requirement information and according to a preset data classification hierarchy;

[0034] The visualization module is used to populate the target view table in the report data map with data, and to perform visualization processing on the populated target view table to obtain the target report.

[0035] According to the second aspect, the building module is also used for:

[0036] Based on the report requirements, determine the corresponding data hierarchy information;

[0037] Based on the data hierarchy information, a report data map containing the target view table is constructed according to a preset data classification hierarchy.

[0038] Based on the second aspect, or any implementation of the second aspect above, the construction module is also used for:

[0039] Based on the report engineering function in the report requirement information, determine the corresponding target project;

[0040] Based on the report dimensions in the report requirement information, determine the corresponding target theme;

[0041] Based on the target view table corresponding to the aforementioned report requirement information, determine the corresponding target chart;

[0042] Based on the report metrics of the target view table, determine the corresponding target fields;

[0043] The target project, the target theme, the target chart, and the target field are used as the data hierarchy information corresponding to the report requirement information.

[0044] According to the second aspect, or any implementation of the second aspect above, the visualization module is also used for:

[0045] Based on the report requirement information, obtain the corresponding raw data tables and confirm the dependencies between the raw data tables;

[0046] Based on the aforementioned dependency relationship, corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

[0047] According to the second aspect, or any implementation of the second aspect above, the visualization module is also used for:

[0048] The data retrieval logic of the indicators of each target view table in the report requirement information is converted into auxiliary code;

[0049] Based on the auxiliary code, generate the complete code corresponding to the target view table using a preset script;

[0050] Configure the complete code as a scheduled task, and after the scheduled task is triggered, execute the following steps: based on the dependency relationship, select the corresponding indicator parameters from the original data table and insert them into the target view table to populate the target view table with data.

[0051] According to the second aspect, or any implementation of the second aspect above, the visualization module is also used for:

[0052] Receive user interaction operations regarding report style parameters and confirm the report style parameters of the target report;

[0053] Based on the report style parameters and the populated target view table, generate the corresponding target report.

[0054] According to the second aspect, or any implementation of the second aspect above, the report generation device further includes an authorization module, used for:

[0055] Publish the target report to the website of the department to which the target user belongs;

[0056] Obtain the list of authorized users for the target report, and grant viewing permissions to the target report on the department's site based on the list of authorized users.

[0057] Thirdly, this application provides a report generation device, which includes a memory and a processor. The memory stores a computer program that can run on the processor, and the computer program is configured to implement the steps of the report generation method described above.

[0058] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform a report generation method as described in any one of the first aspects or possible implementations thereof.

[0059] Fifthly, embodiments of this application provide a computer program including instructions for executing the report generation method in the first aspect and any possible implementation thereof.

[0060] This application proposes a report generation method, apparatus, device, and computer-readable storage medium. It obtains report requirement information from target users and then constructs a corresponding report data map based on this information, according to a preset data classification hierarchy. This allows for structural standardization of the report at the data classification level and finer-grained management of the report. Next, data is populated into the target view table in the report data map, filling it with relevant indicator parameters. Since the report data map is still based on underlying data, the populated target view table can be visualized according to requirements to obtain the target report. This application, by achieving structural standardization and fine-grained management of the report at the data classification level, ensures that the developed report data map containing the target view table is structurally standardized and unified, effectively improving the universality of report generation. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating the first embodiment of the report generation method of this application;

[0062] Figure 2 This is a flowchart illustrating the second embodiment of the report generation method of this application;

[0063] Figure 3 This is a schematic diagram of the structure of the preset data classification hierarchy involved in the embodiments of this application;

[0064] Figure 4 This is a flowchart illustrating the third embodiment of the report generation method of this application;

[0065] Figure 5 This is a schematic diagram of the report generation device of this application;

[0066] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0067] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0070] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0071] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0072] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0073] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the report generation method of this application. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0074] The first embodiment of this application provides a report generation method, which includes the following steps:

[0075] Step S100: Obtain the report requirement information of the target user;

[0076] In this embodiment, it should be noted that the report requirement information may include at least the report indicators (such as age group, asset range, product repurchase rate, complaint rate, etc.) of each target view table in the target report, and the report dimensions (such as a specific product, process, region, industry, etc.) targeted by the target report. It is understood that, to avoid ambiguity, the report indicators and report dimensions need to be clearly defined (i.e., the same name or definition should be used for the same report indicator or report dimension). If the target report contains at least two target view tables, then the report requirement information also includes the target view tables covered by the target report and the correspondence between each target view table and the report indicators.

[0077] Furthermore, the report requirement information may also include the indicator data retrieval logic for the report indicators (i.e., the rules for calculating the indicator parameters corresponding to the report indicators). Preferably, the indicator data retrieval logic is aligned to the original code logic to facilitate its conversion into auxiliary code. The report requirement information may also include the report style parameters of the target report, such as the color, unit, font, and other information of the target report.

[0078] Step S200: Based on the report requirement information, construct the corresponding report data map according to the preset data classification hierarchy;

[0079] In this embodiment, the preset data classification hierarchy is a pre-set hierarchy for classifying report data. For example, the preset data classification hierarchy can be divided into items, themes, charts, and fields from bottom to top. Of course, it is understood that the preset data classification hierarchy can also include more or fewer levels, such as the preset data classification hierarchy being divided into themes, charts, and fields from bottom to top.

[0080] This embodiment can determine the data hierarchy information corresponding to the preset data classification hierarchy based on the report requirement information. For example, the corresponding target theme can be determined according to the report dimensions in the report requirement information; the corresponding target chart can be determined according to the target view table corresponding to the report requirement information, and the target chart includes at least one target view table. The corresponding target fields are determined according to the report indicators of the target view table; the target theme, the target chart, and the target fields are used as the data hierarchy information corresponding to the report requirement information. In another example, the data hierarchy information also includes target items. Based on the report engineering function in the report requirement information, the corresponding target items are determined to determine whether the target report is a static dashboard, interactive dashboard, or real-time dashboard, etc. Then, based on the data hierarchy information, the corresponding report data map is constructed sequentially according to the preset data classification hierarchy. Since the report data map is a data map constructed from the report requirement information according to the preset data classification hierarchy, structural standardization of the report can be achieved at the data classification hierarchy, and the management granularity of the report can be refined, realizing the standardization and unification of the report structure.

[0081] Step S300: Populate the target view table in the report data map with data, and perform visualization processing on the populated target view table to obtain the target report.

[0082] In this embodiment, the corresponding raw data tables (i.e., detailed tables, summary tables, and other data tables related to the report indicators and report dimensions) can be obtained based on the report indicators and report dimensions in the report requirement information. Then, the corresponding indicator parameters can be filtered from the raw data tables according to the index retrieval logic corresponding to the report indicators and inserted into the target view table to populate the target view table with data. Since the report data map is still underlying data at this time, it cannot be directly displayed. Therefore, it is necessary to perform visualization processing on the populated target view table to obtain the target report. For example, a preset report style can be used to visualize the populated target view table to obtain the target report. Alternatively, user interaction operations on the report style parameters can be received to confirm the report style parameters of the target report. Then, based on the report style parameters, the populated target view table can be visualized to obtain the target report, thereby making the style of the target report more in line with user needs.

[0083] The step S300, which involves visualizing the filled target view table to obtain the target report, includes:

[0084] Step S310: Receive user interaction operation for report style parameters and confirm the report style parameters of the target report;

[0085] Step S320: Generate the corresponding target report based on the report style parameters and the filled target view table.

[0086] In this embodiment, it should be noted that the user interaction operation refers to the interaction operation performed by the target user on the report style of the target report, such as inputting the report style parameters, clicking to select, etc. The report style parameters include parameters such as the color, unit, and font of the target report.

[0087] In this embodiment, after constructing the data map, the data map containing the target view table can be pushed to the MySQL database. Then, based on a visualization tool (such as Tableau) in the MySQL database, user interaction operations regarding report style parameters can be received. These user interaction operations are identified, and the corresponding report style parameters are confirmed. Then, the populated target view table is visualized according to the report style parameters, so that the target view table is displayed according to the report style parameters, generating the corresponding target report.

[0088] This embodiment visualizes the filled target view table through user interaction with the report style parameters, thereby obtaining a target report style that better meets the user's needs.

[0089] The step S300, which involves populating the target view table with data and visualizing the populated target view table to obtain the target report, includes the following:

[0090] Step A10: Publish the target report to the department site of the target user;

[0091] Step A20: Obtain the list of authorized users for the target report, and grant viewing permissions to the target report on the department site based on the list of authorized users.

[0092] In this embodiment, it should be noted that the department site refers to the site of the target user's department on the preset data visualization BI (Business Intelligence) platform, and the site is the main logical unit managed by the preset data visualization BI platform. The list of authorized users for the target report includes at least the target user, and may also include users who have been approved to view the target report.

[0093] In this embodiment, the target reports are centrally managed on the site by publishing them to the department site of the target user. A list of authorized users for the target reports is then obtained, and viewing permissions are granted to the target reports on the department site based on this list. Therefore, this embodiment achieves minimal availability of viewing permissions for each target report by publishing the target reports to the department site of the target user and granting viewing permissions based on the list of authorized users. It also achieves data isolation between the target reports, effectively reducing the access risk to the target reports and improving their security.

[0094] In the first embodiment of this application, the report requirement information of the target user is obtained. Based on this information, a corresponding report data map is constructed according to a preset data classification hierarchy. This allows for structural standardization of the report at the data classification hierarchy and finer-grained management of the report. Then, data is populated into the target view table in the report data map, filling it with the corresponding indicator parameters. Since the report data map is still based on underlying data, the populated target view table can be visualized according to requirements to obtain the target report. This embodiment, by achieving structural standardization and fine-grained management of the report at the data classification hierarchy, ensures that the developed report data map containing the target view table is structurally standardized and unified, effectively improving the universality of report generation.

[0095] Reference Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the report generation method of this application.

[0096] In another embodiment of this application, content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. A second embodiment of this application provides a report generation method. Step S200, which involves constructing a corresponding report data map based on the report requirement information and according to a preset data classification hierarchy, includes:

[0097] Step S210: Determine the corresponding data hierarchy information based on the report requirement information;

[0098] Step S220: Based on the data hierarchy information, construct a report data map containing the target view table according to a preset data classification hierarchy.

[0099] In this embodiment, it should be noted that the data hierarchy information refers to the hierarchy information in the report requirement information that corresponds to the preset data classification hierarchy. For example, if the preset data classification hierarchy includes items, themes, charts, and fields from bottom to top, then the data hierarchy information includes the target items, target themes, target charts, and target fields corresponding to the report requirement information and the preset data classification hierarchy.

[0100] This embodiment can determine the data hierarchy information corresponding to the report requirement information and the preset data classification hierarchy based on the report requirement information. For example, the corresponding target theme can be determined based on the report dimensions in the report requirement information; the corresponding target chart can be determined based on the target view table corresponding to the report requirement information, and the target chart includes at least one target view table. The corresponding target fields can be determined based on the report indicators of the target view table; the target theme, the target chart, and the target fields are used as the data hierarchy information corresponding to the report requirement information. In another example, the data hierarchy information also includes target items. Based on the report engineering function in the report requirement information, the corresponding target items are determined to determine whether the target report is a static dashboard, interactive dashboard, or real-time dashboard, etc. Then, based on the data hierarchy information, the corresponding report data map is constructed sequentially according to the preset data classification hierarchy. Since the report data map is a data map constructed from the report requirement information according to the preset data classification hierarchy, structural standardization of the report can be achieved at the data classification hierarchy, and the management granularity of the report can be refined, realizing the standardization and unification of the report structure.

[0101] The step S210, which involves determining the corresponding data hierarchy information based on the report requirement information, includes:

[0102] Step S211: Determine the corresponding target project based on the report engineering function in the report requirement information;

[0103] Step S212: Determine the corresponding target topic based on the report dimensions in the report requirement information;

[0104] Step S213: Determine the corresponding target chart based on the target view table corresponding to the report requirement information;

[0105] Step S214: Determine the corresponding target field based on the report indicators of the target view table;

[0106] Step S215: The target project, the target theme, the target chart, and the target field are used as the data hierarchy information corresponding to the report requirement information.

[0107] See Figure 3 , Figure 3 This is a schematic diagram of the preset data classification hierarchy involved in the embodiments of this application. The preset data classification hierarchy includes, from bottom to top, items, themes, charts, and fields. The item is the highest category of the target report, used to distinguish the engineering functions of the target report, such as static dashboards, interactive dashboards, real-time dashboards, etc.; themes are used to distinguish the business functions of the report, such as the product to which the target report belongs, or the process monitored by the target report; charts refer to the target view tables contained in the target report (at this time, the view tables have not yet been filled with specific data), and there may be multiple target view tables in the target report; the fields in the view table contain detailed information about the fields, including the field type and field meaning.

[0108] This embodiment determines the corresponding target project based on the report engineering function in the report requirement information, thus determining whether the target report is a static dashboard, interactive dashboard, or real-time dashboard. A static dashboard is one that does not require updating or replacing the report indicators and their parameters in the target view table; an interactive dashboard requires users to add, delete, or replace the project functions, report dimensions, target view tables, and report indicators of the target report based on their dashboard interactions; and a real-time dashboard requires real-time updates to the indicator parameters of the report indicators in the target view table. Furthermore, the corresponding target theme is determined based on the report dimensions in the report requirement information. The corresponding target chart is determined based on the target view table corresponding to the report requirement information; the target chart may contain one or more target view tables. The corresponding target fields are determined based on the report indicators in the target view table. The target project, the target theme, the target chart, and the target fields are used as the data hierarchy information corresponding to the report requirement information.

[0109] In the second embodiment of this application, by determining the corresponding data hierarchy information based on the report requirement information, and then constructing a report data map containing the target view table according to a preset data classification hierarchy based on the data hierarchy information. Since the report data map is a data map constructed by the report requirement information according to a preset data classification hierarchy, structural standardization of the report can be achieved at the data classification hierarchy level, and the granularity of report management can be refined, thus realizing the standardization and unification of the report structure.

[0110] Reference Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the report generation method of this application.

[0111] In another embodiment of this application, content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. A third embodiment of this application provides a report generation method, wherein the step of filling the target view table in the report data map with data in step S300 includes:

[0112] Step S330: Based on the report requirement information, obtain the corresponding raw data table and confirm the dependency relationship between each raw data table;

[0113] Step S340: Based on the dependency relationship, the corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

[0114] In this embodiment, it should be noted that the original data tables are detailed tables, summary tables, and other data tables related to the report indicators and report dimensions. The dependency relationships between the upstream and downstream tables of each of the original data tables refer to the upstream tables needed to construct the original table, and the downstream tables that require the original table. For example, taking a time-based summary table as an example, the upstream table of the daily summary table is the detailed table for that day, and the downstream table of the daily summary table is the weekly summary table.

[0115] In this embodiment, based on the report requirement information, detailed tables, summary tables, and other data tables related to the report indicators and report dimensions in the report requirement information are traversed from a preset database as corresponding original data tables, and the dependencies between the original data tables are confirmed. Then, based on the indicator retrieval logic of the report indicators and the dependencies, the corresponding indicator parameters are selected from the original data tables and inserted into the target view table to populate the target view table with data.

[0116] As an example, the data retrieval logic of the indicator can be output to obtain the complete code written for the indicator data logic. Then, the complete code can be configured as a scheduled task. After the scheduled task is triggered, the following steps can be executed: based on the dependency relationship, the corresponding indicator parameters can be selected from the original data table and inserted into the target view table to populate the target view table with data.

[0117] As another example, the data retrieval logic of each target view table in the report requirement information can be converted into auxiliary code; based on the auxiliary code, the complete code corresponding to the target view table is generated based on a preset script; the complete code is configured as a scheduling task, and after the scheduling task is triggered, the following steps are executed: based on the dependency relationship, the corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

[0118] Prior to step S340, which involves selecting corresponding indicator parameters from the original data table based on the dependency relationship and inserting them into the target view table to populate the target view table, the process includes:

[0119] Step B10: Convert the data retrieval logic of the indicators of each target view table in the report requirement information into auxiliary code;

[0120] Step B20: Based on the auxiliary code, generate the complete code corresponding to the target view table using a preset script;

[0121] Step B30: Configure the complete code as a scheduled task, and after the scheduled task is triggered, execute the following steps: Based on the dependency relationship, select the corresponding indicator parameters from the original data table and insert them into the target view table to populate the target view table with data.

[0122] In this embodiment, it should be noted that the data retrieval logic of the indicator is the calculation rule of the indicator parameters of the report indicator.

[0123] In this embodiment, after the data map is populated, the indicator retrieval logic can be split according to different target view tables and converted into computer language, then placed in a folder containing auxiliary code, using the indicator retrieval logic as auxiliary code. Furthermore, the target view tables, and the `with` and `from` modules in the SQL statements of the MySQL library, also need to be split into different files. For example, the view table number of the target view table is entered into a preset script (such as a Python script), and based on the auxiliary code, the complete code corresponding to the target view table is generated from the preset script. Therefore, when creating the same target view table, it can be created directly based on the view table number, without redevelopment. The complete code generated by the Python script can include four files: 1) Hive table creation SQL statements: used to create the target view table; 2) Hive core logic SQL statements: used to filter the corresponding indicator parameters from the original data table based on the dependencies and insert them into the target view table; 3) Push data shell statements: used to push the report data map from the Hive database to the MySQL database; 4) Hive query SQL statements: used to query the report indicators in the target view table. In this embodiment, the Hive core logic SQL statements and the data inference shell statements can be configured as scheduling tasks. These tasks can then be triggered based on the target project corresponding to the target report. For example, if the target report is a static dashboard, the scheduling task is triggered upon receiving the report request information; if the target report is an interactive dashboard, the scheduling task is triggered both upon receiving the report request information and upon receiving a user's dashboard interaction operation for the target report; if the target report is a real-time dashboard, the scheduling task is triggered in real-time upon receiving the report request information to ensure continuous real-time updates of the report metrics parameters in the target view table.

[0124] In the third embodiment of this application, the corresponding original data tables are obtained according to the report requirement information, and the dependencies between the original data tables are confirmed. Based on the dependencies, corresponding indicator parameters are selected from the original data tables and inserted into the target view table to populate the target view table with data. This can be achieved by converting the indicator retrieval logic of each target view table in the report requirement information into auxiliary code, and then generating the complete code corresponding to the target view table based on a preset script using the auxiliary code. The complete code is configured as a scheduled task, and after the scheduled task is triggered, the following steps are executed: selecting the corresponding indicator parameters from the original data tables based on the dependencies and inserting them into the target view table to populate the target view table with data. In this embodiment, a preset script can automatically generate the complete code for data population of each target view table based on the auxiliary code converted from the indicator retrieval logic. This improves data population efficiency and also provides compatibility and versatility, effectively enhancing the efficiency and versatility of the report generation method.

[0125] See Figure 5 , Figure 5 This is a schematic diagram of the report generation device of this application.

[0126] like Figure 5 As shown, this application provides a report generation device, applied to a report generation equipment, the report generation device comprising:

[0127] Module 10 is used to obtain the report requirement information of the target user;

[0128] Construction module 20 is used to construct a corresponding report data map based on the report requirement information and according to a preset data classification hierarchy;

[0129] The visualization module 30 is used to populate the target view table in the report data map with data, and to perform visualization processing on the populated target view table to obtain the target report.

[0130] Optionally, building module 20 is also used for:

[0131] Based on the report requirements, determine the corresponding data hierarchy information;

[0132] Based on the data hierarchy information, a report data map containing the target view table is constructed according to a preset data classification hierarchy.

[0133] Optionally, building module 20 is also used for:

[0134] Based on the report engineering function in the report requirement information, determine the corresponding target project;

[0135] Based on the report dimensions in the report requirement information, determine the corresponding target theme;

[0136] Based on the target view table corresponding to the aforementioned report requirement information, determine the corresponding target chart;

[0137] Based on the report metrics of the target view table, determine the corresponding target fields;

[0138] The target project, the target theme, the target chart, and the target field are used as the data hierarchy information corresponding to the report requirement information.

[0139] Optionally, the visualization module 30 is also used for:

[0140] Based on the report requirement information, obtain the corresponding raw data tables and confirm the dependencies between the raw data tables;

[0141] Based on the aforementioned dependency relationship, corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

[0142] Optionally, the visualization module 30 is also used for:

[0143] The data retrieval logic of the indicators of each target view table in the report requirement information is converted into auxiliary code;

[0144] Based on the auxiliary code, generate the complete code corresponding to the target view table using a preset script;

[0145] Configure the complete code as a scheduled task, and after the scheduled task is triggered, execute the following steps: based on the dependency relationship, select the corresponding indicator parameters from the original data table and insert them into the target view table to populate the target view table with data.

[0146] Optionally, the visualization module 30 is also used for:

[0147] Receive user interaction operations regarding report style parameters and confirm the report style parameters of the target report;

[0148] Based on the report style parameters and the populated target view table, generate the corresponding target report.

[0149] Optionally, the report generation device also includes an authorization module for:

[0150] Publish the target report to the website of the department to which the target user belongs;

[0151] Obtain the list of authorized users for the target report, and grant viewing permissions to the target report on the department's site based on the list of authorized users.

[0152] The report generation apparatus provided in this application employs the report generation methods described in the above embodiments, solving the technical problem of low universality in existing report generation methods. Compared with the prior art, the beneficial effects of the report generation apparatus provided in this application are the same as those of the report generation methods provided in the above embodiments, and other technical features in this report generation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0153] like Figure 6 As shown, Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0154] Specifically, the report generation device can be a PC (Personal Computer), tablet computer, portable computer, or server, etc.

[0155] like Figure 6 As shown, the report generation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0156] Those skilled in the art will understand that Figure 6 The device structure shown does not constitute a limitation on the report generation device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0157] like Figure 6As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a report generation application.

[0158] exist Figure 6 In the device shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; and the processor 1001 can be used to call the report generation program stored in the memory 1005 to implement the operations in the report generation method provided in the above embodiment.

[0159] Furthermore, this application also proposes a computer storage medium storing a computer program. When the computer program is executed by a processor, it implements the operations in the report generation method provided in the above embodiments. The specific steps will not be described in detail here.

[0160] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity / operation / object from another, and do not necessarily require or imply any such actual relationship or order between these entities / operations / objects; the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0161] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant details can be found in the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. Some or all of the modules can be selected according to actual needs to achieve the purpose of this application. Those skilled in the art can understand and implement this without creative effort.

[0162] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0163] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, television, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0164] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A report generation method, characterized in that, The report generation method includes the following steps: Obtain the reporting requirements information of the target users; Based on the report engineering function in the report requirement information, determine the corresponding target project; Based on the report dimensions in the report requirement information, determine the corresponding target theme; Based on the target view table corresponding to the aforementioned report requirement information, determine the corresponding target chart; Based on the report metrics of the target view table, determine the corresponding target fields; The target project, the target theme, the target chart, and the target field are used as the data hierarchy information corresponding to the report requirement information; Based on the data hierarchy information, a report data map containing the target view table is constructed according to a preset data classification hierarchy; the preset data classification hierarchy is a pre-set hierarchy for classifying report data, which is divided into items, themes, charts and fields from bottom to top. The target view table in the report data map is populated with data, and the populated target view table is visualized to obtain the target report.

2. The report generation method as described in claim 1, characterized in that, The step of populating the target view table in the report data map with data includes: Based on the report requirement information, obtain the corresponding raw data tables and confirm the dependencies between the raw data tables; Based on the aforementioned dependency relationship, corresponding indicator parameters are selected from the original data table and inserted into the target view table to populate the target view table with data.

3. The report generation method as described in claim 2, characterized in that, Before the step of selecting corresponding indicator parameters from the original data table based on the dependency relationship and inserting them into the target view table to populate the target view table with data, the following steps are included: The data retrieval logic of the indicators of each target view table in the report requirement information is converted into auxiliary code; Based on the auxiliary code, generate the complete code corresponding to the target view table using a preset script; Configure the complete code as a scheduled task, and after the scheduled task is triggered, execute the following steps: based on the dependency relationship, select the corresponding indicator parameters from the original data table and insert them into the target view table to populate the target view table with data.

4. The report generation method as described in claim 1, characterized in that, The step of visualizing the populated target view table to obtain the target report includes: Receive user interaction operations regarding report style parameters and confirm the report style parameters of the target report; Based on the report style parameters and the populated target view table, generate the corresponding target report.

5. The report generation method according to any one of claims 1 to 4, characterized in that, After the steps of populating the target view table in the report data map with data and visualizing the populated target view table to obtain the target report, the following steps are included: Publish the target report to the website of the department to which the target user belongs; Obtain the list of authorized users for the target report, and grant viewing permissions to the target report on the department's site based on the list of authorized users.

6. A report generation device, characterized in that, The report generation device includes: The acquisition module is used to acquire the report requirement information of the target user; The construction module is used to determine the corresponding target project based on the report engineering function in the report requirement information; determine the corresponding target theme based on the report dimension in the report requirement information; determine the corresponding target chart based on the target view table corresponding to the report requirement information; determine the corresponding target field based on the report indicators of the target view table; and use the target project, target theme, target chart, and target field as the data hierarchy information corresponding to the report requirement information. Based on the data hierarchy information, a report data map containing the target view table is constructed according to a preset data classification hierarchy. The preset data classification hierarchy is a pre-set hierarchy for classifying report data, which is divided into project, theme, chart, and field from bottom to top. The visualization module is used to populate the target view table in the report data map with data, and to perform visualization processing on the populated target view table to obtain the target report.

7. A report generation device, characterized in that, The report generation device includes a memory and a processor. The memory stores a computer program that can run on the processor. When the computer program is executed by the processor, it implements the steps of the report generation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a report generation program, which, when executed by a processor, implements the steps of the report generation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

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

    CN113342821A

  • Data asset large screen construction method based on data hierarchical classification and related device

    CN116340399A