A method and related device for report generation
By automatically generating data processing codes and flexible report display templates, the problems of low data report generation efficiency and monotonous display form in the big data era are solved, and efficient and diversified data report generation is achieved.
Patent Information
- Application Number
- CN202210762795.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-06-30
AI Technical Summary
In the era of big data, professionals have high cost and slow speed in writing data processing codes, and fixed report display templates make the data report generation efficiency low and the display form monotonous.
The data to be processed is obtained through the target data table and the target field, and the processing code is automatically generated based on the target processing strategies determined by the target user from multiple candidate processing strategies, and the processing data is processed. Then, the target data report is generated using the target processing data and the target report display template that meets the target user's display needs.
There is no need for professionals to write processing code, automate data processing, and generate diverse data reports based on the display needs of different users, which improves the generation efficiency of data reports and the richness of display forms.
Smart Images

Figure CN115130449B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method for generating reports and related devices. Background Art
[0002] With the rapid development of the big data era, data presents characteristics such as large volume, variety, and fast update speed. In order to better provide data analysis services for strategic deployment within the bank, etc., it is crucial to generate data reports for data.
[0003] Currently, it is usually necessary for professionals to write corresponding processing codes based on the processing requirements of data, use the processing codes to process the data to obtain processed data, and generate data reports with the processed data and a fixed report display template.
[0004] However, based on the characteristics of large data volume, variety, and fast update speed of data, it is costly and slow for professionals to write processing codes, and the fixed report display template limits the display form. In summary, the generation efficiency of data reports is low and the display form is monotonous. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method for generating reports and related devices, which can generate data reports efficiently, quickly, and diversely, thereby improving the generation efficiency of data reports and enriching the display forms of data reports.
[0006] In a first aspect, embodiments of this application provide a method for generating reports, the method including:
[0007] Obtain data to be processed according to a target data table and target fields;
[0008] Generate a processing code for the data to be processed according to a target processing strategy of the data to be processed; the target processing strategy is determined by a target user from multiple candidate processing strategies;
[0009] Process the data to be processed according to the processing code to obtain target processed data;
[0010] Generate a target data report according to the target processed data and a target report display template; the target report display template meets the display requirements of the target user for the data report.
[0011] Optionally, the target report display template is obtained by the target user adjusting a preset report display template according to the display requirements.
[0012] Optionally, the target report display template is obtained by the target user customizing and generating a report display template according to the display requirements.
[0013] Optionally, the method further includes:
[0014] If the target user has a preset permission, store the target processing strategy and the target report display template in the data dictionary.
[0015] Optionally, generating the target data report according to the target processed data and the target report display template includes:
[0016] Obtain the target report display dimension according to the target processing strategy and the report display dimension model; the report display dimension model is obtained by training a preset neural network based on the historical processing strategies in the data dictionary, the report display dimensions of the corresponding historical report display templates.
[0017] Generate the target data report according to the target report display dimension, the target processed data, and the target report display template.
[0018] In a second aspect, an embodiment of the present application provides a report generation device, which includes: an acquisition unit, a generation unit, and a processing unit;
[0019] The acquisition unit is configured to obtain the data to be processed according to the target data table and the target field;
[0020] The generation unit is configured to generate the processing code of the data to be processed according to the target processing strategy of the data to be processed; the target processing strategy is determined by the target user from multiple candidate processing strategies;
[0021] The processing unit is configured to process the data to be processed according to the processing code to obtain the target processed data;
[0022] The generation unit is further configured to generate a target data report according to the target processed data and the target report display template; the target report display template meets the display requirements of the target user for the data report.
[0023] Optionally, the target report display template is obtained by the target user adjusting a preset report display template according to the display requirements.
[0024] Optionally, the target report display template is obtained by the target user customizing and generating a report display template according to the display requirements.
[0025] Optionally, the device further includes: a storage unit;
[0026] The storage unit is configured to store the target processing strategy and the target report display template in the data dictionary if the target user has a preset permission.
[0027] Optionally, the generating unit includes: an obtaining subunit and a generating subunit;
[0028] The obtaining subunit is configured to obtain a target report display dimension according to the target processing strategy and the report display dimension model; the report display dimension model is obtained by training a preset neural network based on historical processing strategies in the data dictionary, corresponding report display dimensions of historical report display templates;
[0029] The generating subunit is configured to generate the target data report according to the target report display dimension, the target processed data, and the target report display template.
[0030] In a third aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory:
[0031] The memory is used to store program code and transmit the program code to the processor;
[0032] The processor is configured to execute the method for generating a report described in the first aspect according to the instructions in the program code.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the method for generating a report described in the first aspect.
[0034] Compared with the prior art, the present application has at least the following advantages:
[0035] By adopting the technical solution of the embodiment of the present application, first, the data to be processed is obtained through the target data table and the target fields; second, the processing code of the data to be processed is automatically generated through the target processing strategy of the data to be processed determined by the target user from multiple candidate processing strategies; then, the data to be processed is processed by using the processing code to obtain the target processed data; finally, the target data report is generated with the target processed data and the target report display template that meets the display requirements of the target user for the data report. It can be seen that this method does not require professionals to write processing codes. By determining the target processing strategy from multiple candidate processing strategies, the processing code can be automatically generated to complete the automated processing of data; and for different display requirements of different users for data reports, data reports can be generated efficiently, quickly, and diversely with report display templates that meet the display requirements, thereby improving the generation efficiency of data reports and enriching the display forms of data reports. Description of the Drawings
[0036] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 It is a schematic diagram of the system framework involved in an application scenario in the embodiments of the present application;
[0038] Figure 2 It is a schematic flowchart of a method for generating a report provided by the embodiments of the present application;
[0039] Figure 3 It is a schematic structural diagram of a device for generating a report provided by the embodiments of the present application. Detailed implementation manners
[0040] In order to enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0041] At the present stage, in order for banks to better provide data analysis services for strategic deployments within the bank, etc., it is crucial to generate data reports for data. Generally, professionals need to write corresponding processing codes based on the processing requirements of the data, use the processing codes to process the data to obtain processed data, and generate data reports with the processed data and a fixed report display template. However, through research, it is found that based on the characteristics of large data volume, diverse data, and fast update speed of the data, it is costly and slow for professionals to write processing codes, and the fixed report display template limits the display form. In summary, the generation efficiency of data reports is low and the display form is monotonous.
[0042] To solve this problem, in the embodiments of the present application, the data to be processed is obtained through the target data table and the target field; the target processing strategy of the data to be processed determined by the target user from multiple candidate processing strategies is used to automatically generate the processing code of the data to be processed; the data to be processed is processed using the processing code to obtain the target processed data; and the target data report is generated using the target processed data and the target report display template that meets the display requirements of the target user for the data report. It can be seen that this method does not require professionals to write processing code. By determining the target processing strategy from multiple candidate processing strategies, the processing code can be automatically generated to complete the automated processing of data; and for the different display requirements of different users for the data report, using the report display template that meets the display requirements, the data report can be generated efficiently, quickly, and diversely, thereby improving the generation efficiency of the data report and enriching the display form of the data report.
[0043] For example, one of the scenarios of the embodiments of the present application can be applied to the scenario as Figure 1 shown. This scenario includes the terminal device 101 and the server 102. The terminal device 101 and the server 102 interact with each other. The target user selects the target data table and the target field through the terminal device 101 and sends them to the server 102. The server 102 executes the implementation provided by the embodiments of the present application to generate the target data report and sends it to the terminal device 101 so that the terminal device 101 can display the target data report.
[0044] First, in the above application scenario, although the action description of the implementation provided by the embodiments of the present application is described as being executed by the server 102; however, the embodiments of the present application are not limited in terms of the execution subject, as long as the actions disclosed in the implementation provided by the embodiments of the present application are executed.
[0045] Second, the above scenario is only a scenario example provided by the embodiments of the present application, and the embodiments of the present application are not limited to this scenario.
[0046] It should be noted that a method and related device for generating a report provided by the present application can be used in the field of big data. The above is only an example and does not limit the application field of a method and related device for generating a report provided by the present application.
[0047] Next, in conjunction with the accompanying drawings, the specific implementation manners of the method and related device for generating a report in the embodiments of the present application will be described in detail through embodiments.
[0048] Exemplary method
[0049] See Figure 2 , which shows a schematic flowchart of a method for generating a report in the embodiments of the present application. In this embodiment, the method may include the following steps, for example:
[0050] Step 201: Obtain the data to be processed according to the target data table and target fields.
[0051] In the embodiment of the present application, in order to generate a data table report, it is first necessary to obtain the data to be processed with processing requirements. In order to automatically obtain the data to be processed, the target user can select the required data tables and fields on the front-end page, determine them as the target data table and target fields, and obtain the data to be processed corresponding to the target fields in the target data table through the target data table and target fields.
[0052] Step 202: Generate the processing code for the data to be processed according to the target processing strategy of the data to be processed; the target processing strategy is determined by the target user from multiple candidate processing strategies.
[0053] In the related art, professionals need to write corresponding processing codes based on the processing requirements of the data to be processed, and use the processing codes to process the data to be processed to obtain the processed data. Based on the characteristics of the large amount of data, diverse data, and fast update speed presented by the data to be processed, it is costly and slow for professionals to write processing codes, resulting in low generation efficiency of subsequent data reports based on the processed data.
[0054] Therefore, in the embodiment of the present application, after obtaining the data to be processed in step 201, in order to avoid professionals writing corresponding processing codes based on the processing requirements of the data to be processed, multiple candidate processing strategies can be provided on the front-end page, and the target user selects the processing strategy that matches the processing requirements of the data to be processed from the multiple candidate processing strategies, and determines it as the target processing strategy of the data to be processed, so as to automatically generate the processing code of the data to be processed through the target processing strategy of the data to be processed.
[0055] For example, multiple candidate processing strategies include processing links, lineage relationships, processing calibers, and so on.
[0056] Step 203: Process the data to be processed according to the processing code to obtain the target processed data.
[0057] In the embodiment of the present application, after generating the processing code of the data to be processed in step 202, the data to be processed can be processed by using the processing code of the data to be processed to obtain the processed data to be processed as the target processed data.
[0058] Based on the implementation manners of steps 202 - 203, there is no need for professionals to write the processing code of the data to be processed. By determining the target processing strategy of the data to be processed from multiple candidate processing strategies, the processing code of the data to be processed can be automatically generated to complete the automated processing of the data to be processed; so as to be able to generate data reports efficiently and quickly subsequently, thereby improving the generation efficiency of data reports.
[0059] Step 204: Generate a target data report according to the target processing data and the target report display template; the target report display template meets the display requirements of the target user for the data report.
[0060] In the related art, on the basis of the target processing data, a data report is usually generated with the target processing data and a fixed report display template. The fixed report display template limits the display form, resulting in a monotonous display form of the generated data report.
[0061] Therefore, in the embodiment of the present application, after obtaining the target processing data representing the processed data to be processed in step 203, considering the different display requirements of different users for the data report, on the basis of the target processing data, a target data report is generated with a target report display template that meets the display requirements of the target user for the data report.
[0062] Based on the implementation manner of step 204, for the different display requirements of different users for the data report, a report display template that meets the display requirements is used, so as to be able to generate data reports diversely for different users, thereby enriching the display form of the data report.
[0063] Among them, the target report display template can be obtained, for example, through any one of the following two implementation manners:
[0064] The first implementation manner: On the basis of the preset report display template, the target user adjusts the preset report display template according to his display requirements for the data report, and the adjusted preset report display template is determined as the target report display template. Therefore, in an optional implementation manner of the embodiment of the present application, the target report display template is obtained by the target user adjusting the preset report display template according to the display requirements.
[0065] The second implementation manner: The front-end page provides various display elements and display effects for generating a report display template. The target user custom-selects the required display elements and display effects according to his display requirements for the data report to generate a target report display template. Therefore, in an optional implementation manner of the embodiment of the present application, the target report display template is obtained by the target user custom-generating a report display template according to the display requirements.
[0066] In addition, in the embodiments of the present application, in order to uniformly manage the relevant data corresponding to the data report, for example, the processing strategy and the report display template corresponding to the data report, a data dictionary for storing the processing strategy and the report display template may also be set; and considering the security and reliability of the relevant data, a preset permission for managing users also needs to be set; when the target user has the preset permission, the target processing strategy and the target report display template corresponding to the target data report can be stored in the data dictionary, indicating that the target user shares the target processing strategy and the target report display template corresponding to the target data report to the data dictionary, and other users with the preset permission can query the target processing strategy and the target report display template corresponding to the target data report. Therefore, in an optional implementation manner of the embodiments of the present application, the method may further include the following step A, for example: if the target user has the preset permission, store the target processing strategy and the target report display template in the data dictionary.
[0067] In addition, it should be noted that in the process of generating the target data report according to the target processing data and the target report display template in step 204, the report display dimension may be further considered, and the report display dimension is closely related to the target processing strategy corresponding to the target processing data; on the basis of the above description, the data dictionary stores the historical processing strategy and the corresponding historical report display template, and it is necessary to machine-learn the association relationship between the historical processing strategy and the report display dimension of the corresponding historical report display template, so as to automatically obtain the report display dimension corresponding to the target processing strategy based on this. That is, taking the historical processing strategy as the input and the report display dimension of the historical report display template as the output, training a preset neural network can obtain a report display dimension model; inputting the target processing strategy into the report display dimension model, the report display dimension corresponding to the target processing strategy can be output and determined as the target report display dimension; then, through the target report display dimension, the target processing data and the target report display template, the target data report is automatically generated. Therefore, in an optional implementation manner of the embodiments of the present application, step 204 may include the following steps 2041-2042, for example:
[0068] Step 2041: Obtain the target report display dimension according to the target processing strategy and the report display dimension model; the report display dimension model is trained according to the historical processing strategy in the data dictionary, the report display dimension of the corresponding historical report display template and a preset neural network.
[0069] Step 2042: Generate the target data report according to the target report display dimension, the target processing data and the target report display template.
[0070] Based on the implementation manners of steps 2041 - 2042, it helps to provide idea suggestions for the report display dimensions of data reports, making the report display dimensions of data reports more rich and sound.
[0071] Through the various implementation manners provided in this embodiment, first, the data to be processed is obtained through the target data table and target fields; second, the processing code for the data to be processed is automatically generated through the target processing strategy for the data to be processed determined by the target user from multiple candidate processing strategies; then, the data to be processed is processed using the processing code to obtain the target processed data; finally, a target data report is generated using the target processed data and a target report display template that meets the display requirements of the target user for the data report. It can be seen that this method does not require professionals to write processing code. By determining the target processing strategy from multiple candidate processing strategies, the processing code can be automatically generated to complete the automated processing of data; and for different display requirements of different users for data reports, using a report display template that meets the display requirements, the data report can be generated efficiently, quickly, and diversely, thereby improving the generation efficiency of data reports and enriching the display forms of data reports.
[0072] Exemplary device
[0073] See Figure 3 , which shows a schematic structural diagram of a report generation device in an embodiment of the present application. In this embodiment, the device may specifically include, for example: an acquisition unit 301, a generation unit 302, and a processing unit 303;
[0074] The acquisition unit 301 is configured to obtain the data to be processed according to the target data table and target fields;
[0075] The generation unit 302 is configured to generate the processing code for the data to be processed according to the target processing strategy for the data to be processed; the target processing strategy is determined by the target user from multiple candidate processing strategies;
[0076] The processing unit 303 is configured to process the data to be processed according to the processing code to obtain the target processed data;
[0077] The generation unit 304 is further configured to generate a target data report according to the target processed data and a target report display template; the target report display template meets the display requirements of the target user for the data report.
[0078] In an optional implementation manner of an embodiment of the present application, the target report display template is obtained by the target user adjusting a preset report display template according to the display requirements.
[0079] In an alternative implementation of the embodiment of the present application, the target report display template is obtained by the target user customizing and generating a report display template according to the display requirements.
[0080] In an alternative implementation of the embodiment of the present application, the device further includes: a storage unit;
[0081] The storage unit is configured to store the target processing strategy and the target report display template into a data dictionary if the target user has a preset permission.
[0082] In an alternative implementation of the embodiment of the present application, the generating unit 304 includes: an obtaining subunit and a generating subunit;
[0083] The obtaining subunit is configured to obtain a target report display dimension according to the target processing strategy and a report display dimension model; the report display dimension model is obtained by training a preset neural network based on historical processing strategies in the data dictionary, report display dimensions of corresponding historical report display templates.
[0084] The generating subunit is configured to generate the target data report according to the target report display dimension, the target processing data, and the target report display template.
[0085] Through various implementations provided in this embodiment, first, the data to be processed is obtained through a target data table and target fields; second, a processing code for the data to be processed is automatically generated through a target processing strategy for the data to be processed determined by the target user from multiple candidate processing strategies; then, the data to be processed is processed using the processing code to obtain target processing data; finally, a target data report is generated using the target processing data and a target report display template that meets the display requirements of the target user for the data report. It can be seen that this method does not require professionals to write processing code. By determining a target processing strategy from multiple candidate processing strategies, the processing code can be automatically generated to complete the automated processing of data; and for different users' different display requirements for data reports, a report display template that meets the display requirements is used to generate data reports efficiently, quickly, and diversely, thereby improving the generation efficiency of data reports and enriching the display forms of data reports.
[0086] In addition, an embodiment of the present application further provides a computer device, where the computing device includes a processor and a memory:
[0087] The memory is used to store program code and transmit the program code to the processor;
[0088] The processor is configured to execute the method for generating a report described in the method embodiment above according to the instructions in the program code.
[0089] An embodiment of the present application further provides a computer-readable storage medium, which is used to store program codes for executing the method for generating a report described in the above method embodiment.
[0090] The various embodiments in this specification are described in a progressive manner. The key point of each embodiment is the difference from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.
[0091] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0092] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. The term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitations, the element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0093] The above is only a preferred embodiment of the present application and does not impose any form of limitation on the present application. Although the present application has been disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make many possible changes and modifications to the technical solution of the present application by using the methods and technical content disclosed above without departing from the scope of the technical solution of the present application, or modify it into equivalent embodiments with equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still fall within the scope of the protection of the technical solution of the present application.
Claims
1. A method for generating a report, characterized in that, comprising: obtaining data to be processed according to a target data table and target fields; generating a processing code for the data to be processed according to a target processing strategy of the data to be processed; the target processing strategy is determined by a target user from multiple candidate processing strategies; processing the data to be processed according to the processing code to obtain target processed data; generating a target data report according to the target processed data and a target report display template; the target report display template meets the display requirements of the target user for the data report; the method further comprises: if the target user has a preset permission, storing the target processing strategy and the target report display template in a data dictionary; the generating the target data report according to the target processed data and the target report display template includes: obtaining a target report display dimension according to the target processing strategy and a report display dimension model; the report display dimension model is obtained by training a preset neural network based on historical processing strategies in the data dictionary, report display dimensions of corresponding historical report display templates; generating the target data report according to the target report display dimension, the target processed data and the target report display template.
2. The method according to claim 1, characterized in that, the target report display template is obtained by the target user adjusting a preset report display template according to the display requirements.
3. The method according to claim 1, characterized in that, the target report display template is obtained by the target user customizing and generating a report display template according to the display requirements.
4. A device for generating a report, characterized in that, comprising: an obtaining unit, a generating unit and a processing unit; the obtaining unit is configured to obtain data to be processed according to a target data table and target fields; the generating unit is configured to generate a processing code for the data to be processed according to a target processing strategy of the data to be processed; the target processing strategy is determined by a target user from multiple candidate processing strategies; the processing unit is configured to process the data to be processed according to the processing code to obtain target processed data; the generating unit is further configured to generate a target data report according to the target processed data and a target report display template; the target report display template meets the display requirements of the target user for the data report; the device further comprises: a storage unit; the storage unit is configured to store the target processing strategy and the target report display template in a data dictionary if the target user has a preset permission; the generating unit includes: an obtaining subunit and a generating subunit; the obtaining subunit is configured to obtain a target report display dimension according to the target processing strategy and a report display dimension model; the report display dimension model is obtained by training a preset neural network based on historical processing strategies in the data dictionary, report display dimensions of corresponding historical report display templates; The generating subunit is configured to generate the target data report according to the target report display dimension, the target processed data, and the target report display template.
5. A computer device, characterized in that the computer device includes a processor and a memory: the memory is configured to store program code and transmit the program code to the processor; the processor is configured to execute the report generation method according to any one of claims 1-3 based on the instructions in the program code.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium is configured to store program code, and the program code is used to execute the report generation method according to any one of claims 1-3.
Citation Information
Patent Citations
Report generation method and device, terminal and storage medium
CN109657214A
Feature processing method and device
CN110096266A