A report generation method and device and electronic equipment

By acquiring business requirements information and database table field codes, reports are automatically generated using a preset data processing model. This solves the problem of low efficiency in manual report generation, achieves automated report generation, improves efficiency, and saves manpower.

CN113190562BActive Publication Date: 2026-07-28BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BANK OF CHINA
Filing Date
2021-06-03
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

In existing technologies, report generation mainly relies on manual operation, which leads to low efficiency and increased labor costs.

Method used

By acquiring business requirement information described in a preset requirement format, the data source and database table field codes are determined, and a preset data processing model is used to automatically generate report data, including SQL query statements and report headers.

Benefits of technology

It enables automatic report generation without manual intervention, improving generation efficiency and saving labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113190562B_ABST
    Figure CN113190562B_ABST
Patent Text Reader

Abstract

The application provides a report generation method and device and electronic equipment. Business requirement information generated by using a preset requirement description method is acquired, and a data source corresponding to the business requirement information is determined. A field code table corresponding to each database table in the data source is acquired. Report generation data used for generating a report is determined according to the business requirement information, the data source, and the field code table corresponding to each database table. A report corresponding to the report generation data is generated. In the application, a processor can automatically generate a report without manual operation, thereby improving efficiency and saving manpower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of report generation, and more specifically, to a report generation method, apparatus, and electronic device. Background Technology

[0002] Reports, as an important source of data, present data stored in the database to users in the form of report files. In practical applications, different business scenarios require different report types and content, necessitating the generation of corresponding reports for different business scenarios, resulting in numerous report generation demands.

[0003] Currently, reports are mainly generated manually, which is inefficient and increases labor costs. Summary of the Invention

[0004] In view of this, the present invention provides a report generation method, apparatus and electronic device to solve the problem of low efficiency in manually generating reports.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A report generation method, applied to a processor, the report generation method comprising:

[0007] Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information;

[0008] Obtain the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and related fields in other database tables of the data source.

[0009] Based on the business requirement information, the data source, and the field code table corresponding to each database table, determine the report generation data used to generate the report.

[0010] Generate a report corresponding to the data generated in the report generation process.

[0011] Optionally, obtain business requirement information generated using a preset requirement description method, including:

[0012] Obtain the private key information input by the user;

[0013] Determine whether the private key information is valid, and if valid, display the business segment information corresponding to the private key information;

[0014] Obtain the target business segment information selected by the user from the displayed business segment information, and display the data entry interface corresponding to the target business segment information;

[0015] Obtain the business requirement information entered by the user in the data entry interface using a preset requirement description method.

[0016] Optionally, determining the data source corresponding to the business requirement information includes:

[0017] Obtain the mapping relationship between the private key and the data source, and find the data source corresponding to the private key information from the mapping relationship;

[0018] The source data found will be used as the source data corresponding to the business requirement information.

[0019] Optionally, based on the business requirement information, the data source, and the field code tables corresponding to each database table, the report generation data used to generate the report is determined, including:

[0020] A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers;

[0021] The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

[0022] Optionally, the generation process of the preset data processing model includes:

[0023] Acquire training data; the training data includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample;

[0024] The preset data processing model is trained using the training data until the preset training stopping condition is met.

[0025] Optionally, after determining the report generation data for generating the report based on the business requirement information, the data source, and the field code tables corresponding to each database table, the method further includes:

[0026] The report generation data is determined as the report generation template data, and identification information corresponding to the report generation template data is determined so that the report generation template data is displayed when the user selects the identification information or the report generation template data.

[0027] Optionally, generating a report corresponding to the report generation data includes:

[0028] Retrieve each database table from the data source;

[0029] Use SQL query statements to query each database table to obtain the field information corresponding to the report header;

[0030] The report is composed of the report header and the field information.

[0031] A report generation device, applied to a processor, the report generation device comprising:

[0032] The first data acquisition module is used to acquire business requirement information generated using a preset requirement description method, and to determine the data source corresponding to the business requirement information;

[0033] The second data acquisition module is used to acquire the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and the related fields in other database tables of the data source.

[0034] The data determination module is used to determine the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table.

[0035] The report generation module is used to generate reports corresponding to the report generation data.

[0036] Optionally, the first data acquisition module includes:

[0037] The private key retrieval submodule is used to retrieve the private key information input by the user.

[0038] The module display submodule is used to determine whether the private key information is valid, and if valid, to display the business module information corresponding to the private key information;

[0039] The interface display submodule is used to obtain the target business segment information selected by the user in the displayed business segment information, and to display the data entry interface corresponding to the target business segment information;

[0040] The requirement acquisition submodule is used to acquire business requirement information entered by the user in the data entry interface using a preset requirement description method.

[0041] An electronic device includes: a memory and a processor;

[0042] The memory is used to store programs;

[0043] The processor calls the program and uses it for:

[0044] Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information;

[0045] Obtain the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and related fields in other database tables of the data source.

[0046] Based on the business requirement information, the data source, and the field code table corresponding to each database table, determine the report generation data used to generate the report.

[0047] Generate a report corresponding to the data generated in the report generation process.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] This invention provides a report generation method, apparatus, and electronic device. The method involves acquiring business requirement information generated using a preset requirement description, determining the data source corresponding to the business requirement information, acquiring field code tables corresponding to each database table in the data source, determining report generation data for generating the report based on the business requirement information, the data source, and the field code tables of each database table, and generating a report corresponding to the report generation data. In this invention, the processor can automatically generate reports without manual operation, improving efficiency and saving labor costs. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0051] Figure 1 A flowchart of a report generation method provided in an embodiment of the present invention;

[0052] Figure 2 A flowchart of another report generation method provided in an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of a report generation device provided in an embodiment of the present invention. Detailed Implementation

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

[0055] Reports, as an important source of data, present data stored in the database to users in the form of report files. In practical applications, different business scenarios require different report types and content, necessitating the generation of corresponding reports for different business scenarios, resulting in numerous report generation demands.

[0056] Currently, reports are mainly generated manually. Generating reports requires SQL query statements and report headers, both of which are currently entered manually. The reports are then generated based on these SQL query statements and report headers. This method of manually entering SQL query statements and report headers is inefficient, resulting in low report generation efficiency and increased labor costs.

[0057] To solve this technical problem, the inventors discovered through research that if SQL query statements and report headers could be automatically generated, the low efficiency caused by manually entering SQL query statements and report headers could be avoided, thereby improving efficiency and saving manpower.

[0058] Specifically, in this invention, business requirement information generated using a preset requirement description method is obtained, and the data source corresponding to the business requirement information is determined. Field code tables corresponding to each database table in the data source are obtained. Based on the business requirement information, the data source, and the field code tables corresponding to each database table, report generation data for generating reports is determined, and a report corresponding to the report generation data is generated. In this invention, the processor can automatically generate reports without manual operation, improving efficiency and saving labor.

[0059] Based on the above, this embodiment of the invention provides a report generation method applied to a processor, which may be a server or other device.

[0060] Reference Figure 1 Report generation methods may include:

[0061] S11. Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information.

[0062] In practical applications, if a user enters business requirements information on the interface and clicks the confirmation button, the processor can obtain the business requirements information. In this embodiment, the business requirements information is described in text form. This information includes a detailed textual description of which specific function of the report needs to be generated. Detailed business requirements information is as follows:

[0063] We need a detailed report of deductions for the first quarter of 2021, showing the accounts that have been deducted and are still pending. The report fields to be displayed include ETC card number, front-end transaction number, pending date, deduction code, deduction amount, deduction date, customer name, customer ID number, and customer mobile phone number.

[0064] The report fields included in the business requirements information can be used as the basis for determining the report header. For example, the report field "front-end serial number" corresponds to the report header "serial number". That is, the report header is a standardized version of the report fields.

[0065] In another implementation of the present invention, the specific implementation process of step S11 is given, referring to... Figure 2 It can include:

[0066] S21. Obtain the private key information input by the user.

[0067] In practical applications, data sources are established according to the province where the data belongs, and a private key is set for each data source. The correspondence between the private key and the data source is also saved.

[0068] The private key is distributed to authorized tellers in each province, who can then access data for that province using the private key. In this embodiment, the private key is stored in the blockchain for timely access.

[0069] Furthermore, the private key information in this embodiment can be used to determine which data source the user is accessing. In practical applications, typically only data from a single province's data source is used when generating reports.

[0070] If a user needs to access data, they can enter their private key information on the login screen, at which point the processor will receive the private key information entered by the user.

[0071] S22. Determine whether the private key information is valid, and if valid, display the business segment information corresponding to the private key information.

[0072] Specifically, after receiving the private key information entered by the user, the system retrieves all private key information from the blockchain and determines whether the private key information retrieved from the blockchain includes the private key information entered by the user. If it does, the private key verification is considered valid.

[0073] After verifying its legitimacy, the province information corresponding to the private key is determined, and the information of each business segment in the data source corresponding to that province is obtained and displayed. In this embodiment, the business segment information can be a wealth management segment, a shopping segment, a business introduction segment, etc.

[0074] S23. Obtain the target business segment information selected by the user in the displayed business segment information, and display the data entry interface corresponding to the target business segment information.

[0075] After viewing the information on the various business sections displayed on the interface, users can select the appropriate section based on their needs. For example, if they wish to purchase wealth management products, they can click on the Wealth section.

[0076] After a user clicks on any business segment information, they will be redirected to the data entry interface corresponding to that business segment information.

[0077] In this embodiment, the data entry interface may have a business requirement information entry area, where users can enter their desired business requirement information.

[0078] S24. Obtain the business requirement information entered by the user in the data entry interface using a preset requirement description method.

[0079] If a user fills in their business requirements and clicks the confirmation button, the processor can obtain the business requirements information.

[0080] After the business requirements are determined, the corresponding data source is determined.

[0081] Specifically, in the above embodiments, the correspondence between private keys and data sources has been saved. At this time, it is only necessary to obtain the correspondence between private keys and data sources, find the data source corresponding to the private key information from the correspondence, and then use the found data source as the data source corresponding to the business requirement information.

[0082] S12. Obtain the field code table corresponding to each database table in the data source.

[0083] In this embodiment, the shared area in the blockchain can store field code tables corresponding to various database tables stored in various data sources (such as Oracle, SQL Server, Access, etc.). Furthermore, database table data from various data sources and report generation template data can also be stored in the database. In other words, the shared area in the blockchain stores the following three types of data:

[0084] 1. Field code tables corresponding to each database table stored in each data source;

[0085] 2. Database table data;

[0086] 3. Report generation template data.

[0087] The report generation template data is optional. If the user creates the report generation template data, it will be stored. If the user does not create it, there is no report generation template data in the blockchain.

[0088] Database table data can be synchronized to the blockchain daily by the data source system. By combining database tables with blockchain technology, the problem of frequent database I / O operations affecting database performance can be solved.

[0089] In this embodiment, the field code table includes the meaning of each field in the database table and the association relationship between the fields and related fields in other database tables of the data source.

[0090] For example, data source A contains 5 database tables, namely database table AE. Each database table has a corresponding field code table. For database table A, its corresponding field code table includes:

[0091] 1) The meaning of each field;

[0092] For example, if a database table A has a field for "name", then the meaning of this field is the user's legal name.

[0093] 2) The relationship between the field and related fields in other database tables of the data source.

[0094] Suppose that the field "Name" in database table A is related to the field "ID Number" in database table B, which belongs to the same data source. In this embodiment, the relationship is that they both represent the same user.

[0095] Then a relationship can be established between the "Name" field in database table A and the "ID Number" field in database table B.

[0096] S13. Based on the business requirement information, the data source, and the field code tables corresponding to each database table, determine the report generation data used to generate the report.

[0097] In this embodiment, a preset data processing model can be invoked to determine the report generation data for generating the report based on the business requirement information, the data source, and the field code tables corresponding to each database table. The report generation data includes SQL query statements and report headers.

[0098] The preset data processing model in this embodiment can be a GA-BP neural network model. The GA-BP neural network model combines the advantages of BP neural network and genetic algorithm. The genetic algorithm is introduced into the optimization of the weights and thresholds of the BP neural network to construct the GA-BP neural network model.

[0099] The GA-BP neural network model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

[0100] In another implementation of the present invention, a process for generating a preset data processing model is provided, specifically including:

[0101] Acquire training data; the training data includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample. Use the training data to train the preset data processing model until the preset training stop condition is met.

[0102] Specifically, detailed business requirement sample information, the data source corresponding to the business requirement sample information, and the field code table corresponding to each database table in the data source are collected. Then, the report corresponding to the business requirement sample information is manually input to generate a data sample. The data sample generated using the business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report corresponding to the business requirement sample is used to train the preset data processing model until the preset training stopping condition is met (the loss function is less than the preset threshold) is met.

[0103] The business requirement sample information, the data source corresponding to the business requirement sample information, and the field code table corresponding to each database table in the data source are used as inputs to the GA-BP neural network model, and the report generation data sample corresponding to the business requirement sample is used as the output of the GA-BP neural network model.

[0104] In this embodiment, during training, the BP neural network structure is determined based on the number of network inputs and outputs, thereby determining the number of parameters to be optimized in the genetic algorithm. According to the Kolmogorov principle, a three-layer BP neural network is sufficient to complete any n-dimensional to m-dimensional mapping; generally, only one hidden layer is needed. The number of hidden layer nodes is determined using a trial-and-error method, thus determining the GA-BP neural network structure. The optimal individual output by the genetic algorithm is used as the initial weights and thresholds for BP neural network training and learning. Based on historical data analysis, the GA-BP neural network model is trained, and the prediction accuracy of the model is verified using test samples.

[0105] S14. Generate a report corresponding to the report generation data.

[0106] In practical applications, step S14 may include:

[0107] 1) Obtain each database table from the data source.

[0108] 2) Use SQL query statements to query each database table to obtain the field information corresponding to the report header.

[0109] In this embodiment, the processor can directly access various database tables in the blockchain. In addition, it can send SQL query statements and report headers to a device that stores the blockchain smart contract, so that the device can generate reports based on the SQL query statements and report headers.

[0110] 3) Combine the report header and the field information to form a report.

[0111] In this embodiment, the final generated report is the report generated according to the user's business requirements.

[0112] In this embodiment, business requirement information generated using a preset requirement description method is obtained, and the data source corresponding to the business requirement information is determined. The field code tables corresponding to each database table in the data source are obtained. Based on the business requirement information, the data source, and the field code tables corresponding to each database table, report generation data for generating reports is determined, and a report corresponding to the report generation data is generated. In this invention, the processor can automatically generate reports without manual operation, saving the process of manually writing code and inputting data, improving efficiency and saving labor.

[0113] Furthermore, in this invention, corresponding reports can be obtained simply by inputting business requirements, making the operation simple and convenient. Storing the database tables in the blockchain ensures data privacy.

[0114] In addition, the field code table stores the association relationships between the field and related fields in other database tables of the data source. Therefore, when performing data queries, data can be queried directly based on the association relationships, avoiding the situation where blind queries cause excessive pressure on the data source.

[0115] Finally, the method of implementing front-end input business requirements in this invention directly converts business requirements into back-end program logic execution, reducing redundant development of requirements and increasing the reusability of business scenarios.

[0116] In the above embodiments, a GA-BP neural network model can be used to determine the report generation data used to generate the report. The report generation data includes SQL query statements and report headers. To facilitate user operation, the report generation data can be designated as report generation template data, and corresponding identifier information (such as 1, 2, etc.) can be determined. An association between the report generation template data and the relevant business segment is established. Subsequently, when the user clicks on the corresponding business segment, they can select either the identifier information or the report generation template data within that segment, at which point the report generation template data is displayed.

[0117] To enable those skilled in the art to better understand the present invention, examples are provided below.

[0118] Business personnel or tellers can log in to the visual interface using their private key and select the business module they need to query. After selection, they enter the business module and input the business requirements for the report, such as what business functions need to be displayed in the report. This description, along with the data source corresponding to the login private key, is used as input to the trained neural network model. The neural network calculates and outputs the SQL query statement and report header to generate the report, which serves as the condition for triggering the smart contract. The report is then generated according to the report header and SQL statement in the specified report format. After successful generation, the business personnel or tellers can download the report from the front-end page. Customers can choose to save this business requirement as a template, which generates a report number. The business requirement, query SQL, and report header are stored in the report generation template data on the blockchain. When a customer selects to use a template, the database returns the number of parameters required for that template (referring to the number of customized parameters needed to generate the report, such as the date of the report data to be generated) to the front-end for input. After inputting the parameters, the front-end adjusts the query SQL accordingly, for example, changing the date of the generated report data in the SQL from June to July.

[0119] Then, the SQL and report headers are used as conditions to trigger the smart contract, which in turn triggers the smart contract to generate the report.

[0120] In this embodiment, the template can be saved for quick access to input parameters for querying in the future, making the operation convenient and more efficient.

[0121] Optionally, based on the above embodiments of the report generation method, another embodiment of the present invention provides a report generation apparatus applied to a processor, with reference to... Figure 3 The report generation device includes:

[0122] The first data acquisition module 11 is used to acquire business requirement information generated using a preset requirement description method, and to determine the data source corresponding to the business requirement information;

[0123] The second data acquisition module 12 is used to acquire the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and the related fields in other database tables of the data source.

[0124] The data determination module 13 is used to determine the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table.

[0125] The report generation module 14 is used to generate a report corresponding to the report generation data.

[0126] Furthermore, the first data acquisition module includes:

[0127] The private key retrieval submodule is used to retrieve the private key information input by the user.

[0128] The module display submodule is used to determine whether the private key information is valid, and if valid, to display the business module information corresponding to the private key information;

[0129] The interface display submodule is used to obtain the target business segment information selected by the user in the displayed business segment information, and to display the data entry interface corresponding to the target business segment information;

[0130] The requirement acquisition submodule is used to acquire business requirement information entered by the user in the data entry interface using a preset requirement description method.

[0131] Furthermore, the first data acquisition module also includes:

[0132] The data source lookup submodule is used to obtain the correspondence between private keys and data sources, and to find the data source corresponding to the private key information from the correspondence.

[0133] The data source determination submodule is used to identify the data source found as the data source corresponding to the business requirement information.

[0134] Furthermore, the data determination module 13 is specifically used for:

[0135] A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers;

[0136] The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

[0137] Furthermore, it also includes a model generation module, which is specifically used for:

[0138] Acquire training data; the training data includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample;

[0139] The preset data processing model is trained using the training data until the preset training stopping condition is met.

[0140] Furthermore, it also includes:

[0141] The template determination module is used to determine the report generation data as report generation template data and determine the identification information corresponding to the report generation template data, so as to display the report generation template data when the user selects the identification information or the report generation template data.

[0142] Furthermore, the report generation module 14 is specifically used for:

[0143] Retrieve each database table from the data source;

[0144] Use SQL query statements to query each database table to obtain the field information corresponding to the report header;

[0145] The report is composed of the report header and the field information.

[0146] In this embodiment, business requirement information generated using a preset requirement description method is obtained, and the data source corresponding to the business requirement information is determined. Field code tables corresponding to each database table in the data source are obtained. Based on the business requirement information, the data source, and the field code tables corresponding to each database table, report generation data for generating reports is determined, and a report corresponding to the report generation data is generated. In this invention, the processor can automatically generate reports without manual operation, improving efficiency and saving labor.

[0147] It should be noted that the working process of each module and sub-module in this embodiment is described in the corresponding descriptions in the above embodiments, and will not be repeated here.

[0148] Optionally, based on the embodiments of the above-described report generation method and apparatus, another embodiment of the present invention provides an electronic device, including: a memory and a processor;

[0149] The memory is used to store programs;

[0150] The processor calls the program and uses it for:

[0151] Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information;

[0152] Obtain the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and related fields in other database tables of the data source.

[0153] Based on the business requirement information, the data source, and the field code table corresponding to each database table, determine the report generation data used to generate the report.

[0154] Generate a report corresponding to the data generated in the report generation process.

[0155] Furthermore, obtain business requirement information generated using a preset requirement description method, including:

[0156] Obtain the private key information input by the user;

[0157] Determine whether the private key information is valid, and if valid, display the business segment information corresponding to the private key information;

[0158] Obtain the target business segment information selected by the user from the displayed business segment information, and display the data entry interface corresponding to the target business segment information;

[0159] Obtain the business requirement information entered by the user in the data entry interface using a preset requirement description method.

[0160] Furthermore, the data source corresponding to the business requirement information is determined, including:

[0161] Obtain the mapping relationship between the private key and the data source, and find the data source corresponding to the private key information from the mapping relationship;

[0162] The source data found will be used as the source data corresponding to the business requirement information.

[0163] Furthermore, based on the business requirement information, the data source, and the field code tables corresponding to each database table, the report generation data used to generate the report is determined, including:

[0164] A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers;

[0165] The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

[0166] Furthermore, the generation process of the preset data processing model includes:

[0167] Acquire training data; the training data includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample;

[0168] The preset data processing model is trained using the training data until the preset training stopping condition is met.

[0169] Furthermore, after determining the report generation data for generating the report based on the business requirement information, the data source, and the field code tables corresponding to each database table, the process further includes:

[0170] The report generation data is determined as the report generation template data, and identification information corresponding to the report generation template data is determined so that the report generation template data is displayed when the user selects the identification information or the report generation template data.

[0171] Further, generating a report corresponding to the report generation data includes:

[0172] Retrieve each database table from the data source;

[0173] Use SQL query statements to query each database table to obtain the field information corresponding to the report header;

[0174] The report is composed of the report header and the field information.

[0175] In this embodiment, business requirement information generated using a preset requirement description method is obtained, and the data source corresponding to the business requirement information is determined. Field code tables corresponding to each database table in the data source are obtained. Based on the business requirement information, the data source, and the field code tables corresponding to each database table, report generation data for generating reports is determined, and a report corresponding to the report generation data is generated. In this invention, the processor can automatically generate reports without manual operation, improving efficiency and saving labor.

[0176] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A report generation method, characterized in that, Applied to a processor, the report generation method includes: Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information; Obtain the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and related fields in other database tables of the data source. The shared area in the blockchain stores three types of data: the field code table corresponding to each database table stored in each data source, the database table data, and the report generation template data. The database table data is synchronized to the blockchain daily by the data source system. Based on the business requirement information, the data source, and the field code table corresponding to each database table, determine the report generation data used to generate the report. Generate a report corresponding to the report generation data; Obtain business requirement information generated using a preset requirement description method, including: Obtain the private key information input by the user; Determine whether the private key information is valid, and if valid, display the business segment information corresponding to the private key information; Obtain the target business segment information selected by the user from the displayed business segment information, and display the data entry interface corresponding to the target business segment information; Obtain business requirement information input by the user in the data entry interface using a preset requirement description method; the business requirement information is a business requirement described in text form, including a text description of the need to generate reports that display specific functions; Based on the business requirement information, the data source, and the field code tables corresponding to each database table, the report generation data used to generate the report is determined, including: A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers; The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

2. The report generation method according to claim 1, characterized in that, Determining the data source corresponding to the business requirement information includes: Obtain the mapping relationship between the private key and the data source, and find the data source corresponding to the private key information from the mapping relationship; The source data found will be used as the source data corresponding to the business requirement information.

3. The report generation method according to claim 1, characterized in that, The generation process of the preset data processing model includes: Acquire training data; the training data includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample; The preset data processing model is trained using the training data until the preset training stopping condition is met.

4. The report generation method according to claim 1, characterized in that, After determining the report generation data for generating the report based on the business requirement information, the data source, and the field code tables corresponding to each database table, the process further includes: The report generation data is determined as the report generation template data, and identification information corresponding to the report generation template data is determined so that the report generation template data is displayed when the user selects the identification information or the report generation template data.

5. The report generation method according to claim 1, characterized in that, Generating a report corresponding to the report generation data includes: Retrieve each database table from the data source; Use SQL query statements to query each database table to obtain the field information corresponding to the report header; The report is composed of the report header and the field information.

6. A report generation device, characterized in that, Applied to a processor, the report generation device includes: The first data acquisition module is used to acquire business requirement information generated using a preset requirement description method, and to determine the data source corresponding to the business requirement information; The second data acquisition module is used to acquire the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and the related fields in other database tables of the data source. The shared area in the blockchain stores three types of data: the field code table corresponding to each database table stored in each data source, the database table data, and the report generation template data. The database table data is synchronized to the blockchain daily by the data source system. The data determination module is used to determine the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table. The report generation module is used to generate reports corresponding to the report generation data. The first data acquisition module includes: The private key retrieval submodule is used to retrieve the private key information input by the user. The module display submodule is used to determine whether the private key information is valid, and if valid, to display the business module information corresponding to the private key information; The interface display submodule is used to obtain the target business segment information selected by the user in the displayed business segment information, and to display the data entry interface corresponding to the target business segment information; The requirement acquisition submodule is used to acquire business requirement information input by the user in the data entry interface using a preset requirement description method; the business requirement information is a business requirement described in text form, including a text description of the need to generate a report that displays specific functions; The data determination module is specifically used for: A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers; The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.

7. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor calls the program and uses it for: Obtain business requirement information generated using a preset requirement description method, and determine the data source corresponding to the business requirement information; Obtain the field code table corresponding to each database table in the data source. The field code table includes the meaning of each field in the database table and the association relationship between the field and related fields in other database tables of the data source. The shared area in the blockchain stores three types of data: the field code table corresponding to each database table stored in each data source, the database table data, and the report generation template data. The database table data is synchronized to the blockchain daily by the data source system. Based on the business requirement information, the data source, and the field code table corresponding to each database table, determine the report generation data used to generate the report. Generate a report corresponding to the report generation data; Obtain business requirement information generated using a preset requirement description method, including: Obtain the private key information input by the user; Determine whether the private key information is valid, and if valid, display the business segment information corresponding to the private key information; Obtain the target business segment information selected by the user from the displayed business segment information, and display the data entry interface corresponding to the target business segment information; Obtain business requirement information input by the user in the data entry interface using a preset requirement description method; the business requirement information is a business requirement described in text form, including a text description of the need to generate reports that display specific functions; Based on the business requirement information, the data source, and the field code tables corresponding to each database table, the report generation data used to generate the report is determined, including: A preset data processing model is invoked so that the preset data processing model determines the report generation data for generating the report based on the business requirement information, the data source, and the field code table corresponding to each database table; the report generation data includes SQL query statements and report headers; The preset data processing model is trained based on training data, which includes business requirement sample information, the data source corresponding to the business requirement sample information, the field code table corresponding to each database table in the data source, and the report generation data sample corresponding to the business requirement sample.