Report generation method, device, equipment and storage medium

By receiving user-defined report requirement templates, analyzing and parsing the target caliber templates to obtain relevant table information, and generating target query information, the flexibility problem of RPA technology in complex scenarios is solved, and efficient and accurate report generation is achieved.

CN122197841APending Publication Date: 2026-06-12中原银行股份有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
中原银行股份有限公司
Filing Date
2026-02-03
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, Robotic Process Automation (RPA) technology cannot flexibly adapt to complex scenarios such as multi-table joins and nested queries when generating reports, resulting in low flexibility in report generation.

Method used

A report generation method is provided, which receives a user-defined report requirement template, analyzes and processes it to obtain an initial caliber template, parses and processes the target caliber template to obtain relevant table information, generates target query information based on query characteristics and relevant table information, and finally populates and processes the target requirement report to obtain the report. The method automatically identifies user requirements and determines the query object and database information.

🎯Benefits of technology

It improves the flexibility of report generation, lowers the technical threshold, ensures the consistency and accuracy of query results, and enhances generation efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197841A_ABST
    Figure CN122197841A_ABST
Patent Text Reader

Abstract

The application provides a report generation method and device, equipment and a storage medium. It relates to the technical field of artificial intelligence. The method comprises: receiving a report requirement template defined by a user; analyzing and processing the report requirement template to obtain an initial caliber template corresponding to the report requirement template, and obtaining a target caliber template corresponding to the initial caliber template; analyzing and processing the target caliber template to obtain a plurality of related table information corresponding to each to-be-queried object; determining target query information corresponding to each to-be-queried object according to the query characteristics of each to-be-queried object and the plurality of related table information; and filling a demand object corresponding to the target requirement according to the target query information corresponding to each to-be-queried object to obtain a target requirement report corresponding to the report requirement template. The method can improve the flexibility of report generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a report generation method, apparatus, device and storage medium. Background Technology

[0002] In finance, government affairs, and enterprise operations, where data reports need to be generated and distributed frequently, users typically need to extract, integrate, and present key indicators from multi-source heterogeneous data.

[0003] In existing technologies, the automated generation of data reports based on Robotic Process Automation (RPA) technology involves two main steps. First, technical personnel manually write indicator codes (such as Structured Query Language (SQL) statements or Extract-Transform-Load (ETL) scripts) according to business needs, defining data sources, filtering conditions, and calculation logic. Second, the RPA engine extracts data from the database according to preset rules and generates reports. However, traditional RPA solutions rely on preset rules and cannot flexibly adapt to complex scenarios such as multi-table joins and nested queries, limiting their application in dynamic business needs and resulting in low report generation flexibility. Summary of the Invention

[0004] This application provides a report generation method, apparatus, device, and storage medium to solve the problem of low flexibility in report generation in the prior art.

[0005] Firstly, this application provides a report generation method, including:

[0006] Receive a user-defined report requirement template, the report requirement template including the requirement objective and the requirement object corresponding to the requirement objective;

[0007] The report requirement template is analyzed and processed to obtain the initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and the query features corresponding to each object to be queried. The target caliber template corresponding to the initial caliber template is obtained. The target caliber template is obtained after the user fills in the feature parameters of the query features corresponding to each object to be queried.

[0008] The target caliber template is parsed to obtain multiple related table information corresponding to each query object;

[0009] Based on the query characteristics corresponding to each query object and information from multiple related tables, the target query information corresponding to each query object is determined;

[0010] Based on the target query information corresponding to each object to be queried, the requirement object corresponding to the target requirement is populated to obtain the target requirement report corresponding to the report requirement template.

[0011] Optionally, for any object to be queried; based on the query characteristics corresponding to each object to be queried and information from multiple related tables, determine the target query information corresponding to the object to be queried, including:

[0012] Based on the query features and the information from the multiple related tables, a query instruction corresponding to the object to be queried is generated;

[0013] By executing the query command through the database, the target query information corresponding to the object to be queried is obtained.

[0014] Optionally, the query instruction can be executed via a database to obtain target query information corresponding to the object to be queried, including:

[0015] The query instruction is subjected to syntax validation to obtain the target query instruction corresponding to the query instruction.

[0016] Based on the database, the target query instruction is executed to obtain the target query information corresponding to each object to be queried.

[0017] Optionally, the query instruction is subjected to syntax validation to obtain the target query instruction corresponding to the query instruction, including:

[0018] Detect syntax errors and field mapping errors in the requested query command;

[0019] The syntax errors in the query instruction are corrected to obtain a corrected query instruction.

[0020] Based on the private domain knowledge base, the field mapping errors in the corrected query instruction are corrected to obtain the target query instruction.

[0021] Optionally, the report requirement template includes multiple derived objects corresponding to each queried object; based on the target query information corresponding to each queried object, the requirement objects corresponding to the target requirement are populated to obtain the target requirement report corresponding to the report requirement template, including:

[0022] The target query information corresponding to each object to be queried is filled into the fill position corresponding to the report requirement template to obtain the intermediate requirement template;

[0023] Based on the target query information corresponding to each query object, determine multiple derived parameters of multiple derived objects corresponding to each query object;

[0024] The multiple derived parameters corresponding to each queried object are filled into the fill positions corresponding to each derived object in the intermediate requirement template to obtain the target requirement report.

[0025] Optionally, for any given object to be queried; based on the target query information corresponding to the object to be queried, determine multiple derived parameters of multiple derived objects corresponding to the object to be queried, including:

[0026] Obtain the historical query information corresponding to the object to be queried;

[0027] Based on the historical query information and the target query information, the derivative parameters corresponding to each derivative object are determined.

[0028] Optionally, the target caliber template is parsed to obtain multiple related table information corresponding to each queried object, including:

[0029] The query features of each object to be queried in the target caliber template are matched with the fields of the database table to obtain directly related fields;

[0030] The query features in the target caliber template are semantically similar to the fields in the database table to obtain indirectly related fields;

[0031] Based on the private domain knowledge base, the information of the multiple related tables is determined from the directly related fields and the indirectly related fields.

[0032] Optionally, the query features may be multiple; the report requirement template is analyzed and processed to obtain the initial caliber template corresponding to the report requirement template, including:

[0033] In the report requirement template, the plurality of objects to be queried are identified;

[0034] The initial caliber template is generated based on multiple query features and the multiple objects to be queried.

[0035] Secondly, embodiments of this application provide a report generation apparatus, including a receiving module, an analysis and processing module, an acquisition module, a parsing and processing module, a determining module, and a filling and processing module:

[0036] The receiving module is used to receive a user-defined report requirement template, the report requirement template including a requirement target and a requirement object corresponding to the requirement target;

[0037] The analysis and processing module is used to analyze and process the report requirement template to obtain an initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and query features corresponding to each object to be queried.

[0038] The acquisition module is used to acquire the target caliber template corresponding to the initial caliber template. The target caliber template is obtained after the user fills in the feature parameters of the query features corresponding to each query object.

[0039] The parsing and processing module is used to parse and process the target caliber template to obtain multiple related table information corresponding to each query object;

[0040] The determining module is used to determine the target query information corresponding to each query object based on the query characteristics corresponding to each query object and multiple related table information;

[0041] The filling processing module is used to fill the requirement object corresponding to the target requirement according to the target query information corresponding to each object to be queried, so as to obtain the target requirement report corresponding to the report requirement template.

[0042] Optionally, this can be applied to any single object to be queried; the determining module is specifically used for:

[0043] Based on the query features and the information from the multiple related tables, a query instruction corresponding to the object to be queried is generated;

[0044] By executing the query command through the database, the target query information corresponding to the object to be queried is obtained.

[0045] Optionally, the determining module is specifically used for:

[0046] The query instruction is subjected to syntax validation to obtain the target query instruction corresponding to the query instruction.

[0047] Based on the database, the target query instruction is executed to obtain the target query information corresponding to each queried object.

[0048] Optionally, the determining module is specifically used for:

[0049] Detect syntax errors and field mapping errors in the requested query command;

[0050] The syntax errors in the query instruction are corrected to obtain a corrected query instruction.

[0051] Based on the private domain knowledge base, the field mapping errors in the corrected query instruction are corrected to obtain the target query instruction.

[0052] Optionally, the report requirement template includes multiple derived objects corresponding to each object to be queried; the fill processing module is specifically used for:

[0053] The target query information corresponding to each object to be queried is filled into the fill position corresponding to the report requirement template to obtain the intermediate requirement template;

[0054] Based on the target query information corresponding to each query object, determine multiple derived parameters of multiple derived objects corresponding to each query object;

[0055] The multiple derived parameters corresponding to each queried object are filled into the fill positions corresponding to each derived object in the intermediate requirement template to obtain the target requirement report.

[0056] Optionally, for any object to be queried; the filling processing module is specifically used for:

[0057] Obtain the historical query information corresponding to the object to be queried;

[0058] Based on the historical query information and the target query information, the derivative parameters corresponding to each derivative object are determined.

[0059] Optionally, the parsing processing module is specifically used for:

[0060] The query features of each object to be queried in the target caliber template are matched with the fields of the database table to obtain directly related fields;

[0061] The query features in the target caliber template are semantically similar to the fields in the database table to obtain indirectly related fields;

[0062] Based on the private domain knowledge base, the information of the multiple related tables is determined from the directly related fields and the indirectly related fields.

[0063] Optionally, the query features can be multiple; the analysis and processing module is used for:

[0064] In the report requirement template, the plurality of objects to be queried are identified;

[0065] The initial caliber template is generated based on multiple query features and the multiple objects to be queried.

[0066] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect above and various possible designs of the first aspect.

[0067] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in the first aspect and various possible designs of the first aspect.

[0068] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect and various possible designs of the first aspect.

[0069] The report generation method, apparatus, device, and storage medium provided in this application receive a user-defined report requirement template, analyze and process the report requirement template to obtain an initial caliber template corresponding to the report requirement template, and obtain a target caliber template corresponding to the initial caliber template; parse the target caliber template to obtain multiple related table information corresponding to each query object; obtain target query information corresponding to each query object based on the query characteristics corresponding to each query object and the multiple related table information; and populate the requirement objects corresponding to the target requirements based on the target query information corresponding to each query object to obtain the target requirement report corresponding to the report requirement template. It can automatically identify multiple query objects to be queried based on the user's report requirement template, determine multiple related table information in the database based on the feature parameters of the query characteristics provided by the user, and then determine the target query information corresponding to the query objects to obtain the target requirement report. This allows for flexible querying based on user needs, improving the flexibility of report generation. Attached Figure Description

[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0071] Figure 1 A schematic diagram illustrating an application scenario provided in an embodiment of this application;

[0072] Figure 2 A flowchart illustrating a report generation method provided in an embodiment of this application;

[0073] Figure 3 A flowchart illustrating another report generation method provided in this application embodiment;

[0074] Figure 4 A schematic diagram of the architecture of a report generation method provided in an embodiment of this application;

[0075] Figure 5 A schematic diagram of the architecture of another report generation method provided in an embodiment of this application;

[0076] Figure 6 This application provides a schematic diagram of the structure of a report generation device according to an embodiment of the present application;

[0077] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0078] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0079] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0080] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. Please refer to [link / reference]. Figure 1 The application scenario includes user equipment 101, processing equipment 102, and database 103.

[0081] Users can input report requirement templates through an interactive input interface in user device 101. The report requirement template can include the requirement objective and the corresponding requirement object. Users can send the report requirement template to processing device 102 through user device 101.

[0082] The processing device 102 can receive the report requirement template sent by the user device 101, analyze and process the report requirement template, and obtain the initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and the query features corresponding to each object to be queried.

[0083] The processing device 102 can send an initial caliber template to the user device 101. The user can fill in the feature parameters of the query features corresponding to each query object in the initial caliber template through the user device 101 to obtain the target caliber template, and then send the target caliber template to the processing device 102.

[0084] The processing device 102 can parse the target specification template to obtain multiple related table information corresponding to each query object. Based on the multiple related table information corresponding to each query object, the processing device 102 can retrieve and determine the target query information corresponding to each query object in the database 103, and populate the requirement objects corresponding to the target requirements in the report requirement template according to the target query information corresponding to each query object, to obtain the target requirement report corresponding to the report requirement template.

[0085] In existing technologies, the automated generation of data reports based on RPA (Robotic Process Automation) technology involves two main steps. First, technical personnel manually write indicator codes (such as SQL statements or ETL scripts) according to business needs, defining data sources, filtering conditions, and calculation logic. Second, the RPA engine extracts data from the database and generates reports according to preset rules. However, traditional RPA solutions rely on fixed code / scripts written manually according to preset rules, which cannot flexibly adapt to complex scenarios such as multi-table joins and nested queries, limiting their application in dynamic business needs and resulting in low flexibility in report generation.

[0086] In the report generation method provided in this application embodiment, a user-defined report requirement template is received; the report requirement template is analyzed and processed to obtain an initial caliber template corresponding to the report requirement template; a target caliber template corresponding to the initial caliber template is obtained; the target caliber template is parsed to obtain multiple related table information corresponding to each query object; based on the multiple related table information corresponding to each query object, target query information corresponding to each query object is obtained; based on the target query information corresponding to each query object, the requirement object corresponding to the target requirement is populated to obtain the target requirement report corresponding to the report requirement template.

[0087] During the above execution process, the system can automatically identify multiple query objects based on the user's report requirement template. Based on the feature parameters of the query characteristics provided by the user, it can determine the information of multiple related tables in the database, and then determine the target query information corresponding to the query objects to obtain the target requirement report. This allows for flexible querying based on user needs, improving the flexibility of report generation.

[0088] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0089] Figure 2 This is a flowchart illustrating a report generation method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2The method may include:

[0090] S201. Receive user-defined report requirement templates.

[0091] The execution entity of this application embodiment can be a processing device or a report generation device installed in the processing device. The report generation device can be implemented by software or by a combination of software and hardware.

[0092] Before receiving user-defined report templates, data source preparation is required. Structured report data in the database (such as loan tables and deposit tables in a MySQL database) can be obtained through two methods: system interface calls (connecting to the internal database) or file uploads (manual uploads by the user). After obtaining the data source, the system automatically organizes and generates a list of accessible data sources, including table names, field names, data formats, and a list of candidate enumeration values ​​corresponding to the field names (e.g., candidate enumeration values ​​for the "Institution Name" field: first branch summary, second branch summary, third branch summary, etc.).

[0093] In some embodiments, the report requirement template may include a requirement target and a requirement object corresponding to the requirement target. The requirement target indicates the reporting agency in the report, and the requirement object indicates the reporting requirement of its corresponding reporting agency.

[0094] For example, the report requirement template can be a corporate agency indicator notification report. The requirement target is used to instruct the loan management institution (e.g., the first branch, the second branch, the third branch, etc.). See Table 1 for details. The requirement object can be the loan balance, compared to the previous day, the non-performing loan balance, the non-performing loan ratio, etc.

[0095] Table 1

[0096]

[0097] In some implementations, the report requirement template may only include the requirement object. For example, the report requirement template may include total loan balance and non-performing loan balance, as shown in Table 2.

[0098] Table 2

[0099]

[0100] In some embodiments, the report requirement template may include, in addition to the requirement target and the requirement object corresponding to the requirement target, at least one product type corresponding to each requirement target, as shown in Table 3.

[0101] Table 3

[0102]

[0103] It is worth noting that this application only provides examples of some report requirement templates and does not limit the specific content of the report requirement templates.

[0104] Report requirement templates can be received through an interactive input interface. The interactive input interface refers to a graphical or text-based interface through which users interact with the system to input and edit the required content, such as an online Excel template.

[0105] S202. Analyze and process the report requirement template to obtain the initial caliber template corresponding to the report requirement template, and obtain the target caliber template corresponding to the initial caliber template.

[0106] The initial caliber template can include multiple objects to be queried, as well as the query features corresponding to each object.

[0107] For example, the report requirement template can be found in Table 1. Multiple objects to be queried can be the loan management institution, loan balance, non-performing loan balance, and non-performing loan rate.

[0108] The query features corresponding to each query object are used to indicate the specific query content required. For example, the query features corresponding to the query object can be data table, filter conditions, association conditions, data retrieval methods, etc.

[0109] The initial template can be found in Table 4. The filtering and association conditions for the loan management institution do not need to be filled in by the user; they are filled in by default using the symbol " / ".

[0110] Table 4

[0111]

[0112] The target caliber template is obtained by the user filling in the feature parameters of the query features corresponding to each query object in the initial caliber template, as shown in Table 5. When filling in the initial caliber template (and the target caliber template), the user uses " / " to indicate content that is not filled or does not need to be filled.

[0113] Table 5

[0114]

[0115] S203. Parse the target caliber template to obtain multiple related table information corresponding to each queried object.

[0116] The target caliber template is structured and parsed to extract the query features corresponding to each query object. The query features may include data tables, filtering conditions, association conditions, and data caliber, and invalid information (such as fields marked with " / " that do not need to be filled in) is filtered out.

[0117] Because users may use different expressions when filling in the query features for each object to be queried, they may be indicating the same query requirement.

[0118] For any query object, the target caliber template is parsed to obtain the feature parameters of each query feature corresponding to the query object; the key fields of the feature parameters of each query feature are mapped to obtain information from multiple related tables.

[0119] Information from multiple related tables can include query requirements corresponding to the data table, query requirements corresponding to the filtering conditions, query requirements corresponding to the association conditions, and query requirements corresponding to the data retrieval criteria.

[0120] For any given feature parameter, when mapping its key fields, the corresponding related table information can be determined using at least one of the following methods:

[0121] Optionally, you can directly match the characteristic parameters of each queried object in the report requirement template with the table names and field names in the data source list using keywords to obtain directly related fields as the relevant table information. For example, "Loan Balance" matches "Loan Table - Balance".

[0122] Optionally, the most relevant fields can be retrieved from the fuzzy descriptions or abbreviations of the feature parameters of the query features (such as filter conditions) in the target caliber template, where N is an integer greater than or equal to 1 (e.g., N = 3). The semantically relevant fields obtained are determined as relevant table information. For example, the relevant field names retrieved for "overdue days greater than 90 days" are "overdue amount", "approval days", and "contract delay days".

[0123] Optionally, a private knowledge base refers to a database that stores business-specific knowledge. Within this database, the associated fields corresponding to characteristic parameters are identified as relevant table information. For example, "X points" corresponds to "XX branch." The terminology mapping table built into the private knowledge base can be used to supplement and improve search results, ensuring accuracy and relevance to business scenarios.

[0124] S204. Based on the query characteristics of each object to be queried and information from multiple related tables, obtain the target query information corresponding to each object to be queried.

[0125] In some embodiments, for any object to be queried, a query instruction can be generated based on various query features and information from multiple related tables; the query instruction is then executed through the database to obtain the target query information corresponding to the object to be queried.

[0126] The query command is a structured query language command (such as an SQL statement) that can be executed by the database. Before generating it, you need to ensure that the table names and field names in the command are consistent with the database's standardized naming, and the organization name needs to be converted into an organization number that the database can recognize.

[0127] For example, each query feature can be "Loan Table, Customer Type = Individual, Overdue Days > 90, Summary Balance, Institution Name". Multiple related table information can be "Overdue Date, Balance, Institution Number". Through a large language model, the query features and the corresponding multiple related table information are accurately semantically understood, and a structured query instruction can be generated as "SELECT Institution Number, SUM(Balance) AS Non-Performing Balance FROM Loan Table WHERE Customer Type = 'Individual' AND Overdue Days > 90 GROUP BY Institution Number".

[0128] A database refers to a database environment for storing and managing data, such as MySQL or Oracle. Internal database tables, such as loan tables and deposit tables, can be stored within the database. These tables have been organized and standardized during the data source preparation phase, with table names and field names standardized and unified. The mapping relationship between institution names and institution numbers is synchronously maintained in the institution mapping table, ensuring that the table names and field names in the query commands are consistent with the actual storage in the database.

[0129] The target query information refers to the structured data results returned by the database after executing the query command. It must include the core field values ​​(such as organization name, indicator summary value), data dimensions (such as time dimension, organization dimension), and field mapping relationships corresponding to the queried object, providing basic data support for subsequent data backfilling and derived indicator calculation. If the organization name needs to be displayed, the organization number must be converted into a user-understandable organization name through the organization mapping table after the query results are returned.

[0130] For example, the data table may include a user-specified organization mapping table and a target data storage table. The organization mapping table indicates the mapping relationship between the user-input organization name (e.g., "XX Branch") and the organization number / unified organization code (e.g., "001") stored in the database; the target data storage table is the storage table for data extraction. A large language model can be used to understand the filtering conditions, association conditions, and data retrieval criteria. First, based on the retrieval (recall) matching results, the valid fields in the target data storage table are determined. Then, the required data types are filtered based on the filtering conditions. Based on the association conditions (combined with the organization mapping table), the organization number and organization name in the target data storage table are associated. Based on the data retrieval criteria (e.g., SUM, COUNT), the required data is extracted, and the object parameters of the corresponding required objects are determined through the required data.

[0131] In this application, users do not need to write code or manually write SQL statements. They can directly define their requirements through an interactive input interface. The system automatically parses keywords, matches data sources, and generates requirement query instructions. This not only lowers the technical threshold but also ensures the consistency between the query results and the requirements of the target template through standardized query instruction generation logic, avoiding query deviations caused by manual coding.

[0132] S205. Based on the target query information corresponding to each object to be queried, populate the requirement object corresponding to the target requirement to obtain the target requirement report corresponding to the report requirement template.

[0133] The report requirement template can include at least one derived object corresponding to each object to be queried. The derived object is used to indicate the object to be filled in without querying the database, but can be calculated by the current target query information and historical information of the object to be queried (such as historical data for the same period, data from the previous day / month / beginning of the year, which needs to be retrieved from the database or called historical report cache data). It belongs to the category of derived comparison indicators.

[0134] For example, the report requirement template can be found in Table 1. Multiple objects to be queried are the loan management institution, loan balance, non-performing loan balance and non-performing loan ratio. At least one derivative object corresponding to the loan balance is compared to the previous day, compared to the previous month, and compared to the beginning of the year. At least one derivative object corresponding to the non-performing loan balance is compared to the previous day, compared to the previous month, and compared to the beginning of the year. At least one derivative object corresponding to the non-performing loan ratio is compared to the previous day.

[0135] In some embodiments, the target query information corresponding to each query object is filled into the fill position corresponding to the report requirement template to obtain an intermediate requirement template; based on the target query information corresponding to each query object, multiple derivative parameters of multiple derivative objects corresponding to each query object are determined; the multiple derivative parameters corresponding to each query object are filled into the fill position corresponding to each derivative object in the intermediate requirement template to obtain the target requirement report.

[0136] In this application, the precise data filling and complete report generation of the report requirement template can be achieved through the query of atomic indicators and the calculation of derived indicators. This not only eliminates the need for manual intervention in the data retrieval, calculation and filling process, reducing the technical threshold and operating costs, but also ensures the consistency, accuracy and timeliness of the report data. It solves the problems of data filling misalignment, chaotic calculation logic and cumbersome acquisition of historical comparison data in traditional solutions, and greatly improves the efficiency and reliability of report generation.

[0137] The data interaction method provided in this application can analyze and process a report requirement template to obtain an initial caliber template and a target caliber template corresponding to the initial caliber template; parse the target caliber template to obtain multiple related table information corresponding to each query object; obtain target query information corresponding to each query object based on the multiple related table information; and populate the requirement objects corresponding to the target requirements based on the target query information to obtain the target requirement report corresponding to the report requirement template. It can automatically identify user requirements and determine multiple query objects based on the user's report requirement template. Based on the feature parameters of the query characteristics provided by the user, it can determine multiple related table information in the database, and then determine the target query information corresponding to the query objects, thus obtaining the target requirement report. This allows for flexible querying based on user requirements, improving the flexibility of report generation.

[0138] Figure 3 This is a flowchart illustrating another report generation method provided in an embodiment of this application. Please refer to... Figure 3 The method may include:

[0139] S301, Receive user-defined report requirement templates.

[0140] The execution process of S310 can be found in the execution process of S201, and will not be repeated here.

[0141] S302. In the report requirement template, identify multiple objects to be queried.

[0142] The received report requirement template is structured and parsed to extract the core column name set. Pre-filled value columns (fixed value columns that do not require subsequent query / calculation) and Excel formula columns (derived columns with clearly defined calculation logic) are excluded to obtain the column name set to be processed.

[0143] Then, the classification model is invoked to make a preliminary judgment on the enumerability and indicator type of the column names in the set, and finally the core column names that need to be queried through the database (atomic indicators) or calculated based on other columns (derived indicators) are selected as multiple query objects.

[0144] The objects to be queried must contain two core types: one is dimension objects (used for data grouping and statistics, such as "loan management institution" and "data date"), and the other is indicator objects (used for numerical statistics or calculations, such as "loan balance", "non-performing balance", and "non-performing rate"). Among them, dimension objects are usually enumerable columns, while indicator objects can be divided into enumerable columns or non-enumerable columns.

[0145] For example, referring to Table 1 (Corporate Loan Indicator Report), the column names of the report requirement template include "Loan Account Management Institution, Loan Balance, Compared to Previous Day, Non-Performing Balance, Non-Performing Rate". After excluding the pre-filled value columns and Excel formula columns, the identified multiple objects to be queried are "Loan Account Management Institution, Loan Balance, Non-Performing Balance, Non-Performing Rate" ("Compared to Previous Day" is a derived object and does not belong to the objects to be queried. It is calculated later based on the current data and historical data of the objects to be queried).

[0146] S303. Generate an initial caliber template based on multiple query features and multiple objects to be queried.

[0147] Query features are key information used to define the data retrieval / calculation rules for the object to be queried, including the data table, filtering conditions, association conditions, and data retrieval scope (the table header structure that adapts to the target scope template).

[0148] Based on multiple objects to be queried, and combined with the results of enumerability judgment, a corresponding default configuration of query features is assigned to each object to be queried, and an initial caliber template is generated.

[0149] Specifically, the initial template header is fixed as "Column Name, Data Table, Filter Condition, Link Condition, Data Retrieval Scope". The "Column Name" column is directly filled with multiple query objects. For enumerable query objects (such as "Loan Account Management Institution"), the filter condition and link condition are filled with the symbol " / " by default (no need for user input), and the data table and data retrieval scope are left blank, waiting for the user to fill in. For non-enumerable query objects (such as "Loan Balance", "Non-performing Balance", "Non-performing Rate"), the data table, filter condition, link condition, and data retrieval scope are all left blank, waiting for the user to fill in.

[0150] At the same time, based on the title information of the report requirement template, the system automatically identifies and marks the default data date and monetary unit of the initial caliber template (such as "Data Date: XXXX Year XX Month XX Day" "Unit: Ten Thousand Yuan") to assist users in filling in the caliber information later.

[0151] S304. Obtain the target caliber template corresponding to the initial caliber template.

[0152] After the initial caliber template is generated, it is pushed to the "caliber" sheet page of the online spreadsheet plugin on the user's device, allowing the user to further refine the specific parameters of the query features (such as filling in the data table, filtering conditions, etc.) to form the target caliber template.

[0153] S305. Parse the target caliber template to obtain multiple related table information corresponding to each queried object.

[0154] By combining the data source list (including table names, field names, and candidate field enumeration values) with the private domain knowledge base (term mapping table), relevant table information corresponding to each queried object is generated through keyword matching and semantic similarity retrieval.

[0155] For each object to be queried, extract the feature parameters of the query features in the target caliber template. For example, the feature parameters corresponding to "non-performing balance" are "data table = loan table, filter condition = customer type is individual and overdue days > 90 days, data caliber = summary balance".

[0156] The extracted query features (such as data retrieval criteria and table names) are matched with the table names and field names in the data source list using precise keywords to obtain directly related query requirements (such as "loan table", "summary balance", and "customer type").

[0157] For vague expressions and business abbreviations (such as "X points" or "personal loan") in the filtering criteria, semantic conversion is performed based on the term mapping table of the private domain knowledge base to generate standardized query requirements (such as "Zhengfen" → "XX branch" and "personal loan" → "personal loan").

[0158] The directly matched query requirements and the standardized query requirements after semantic mapping are integrated with the candidate enumeration values ​​of the fields (such as the candidate values ​​"First Branch" and "Second Branch" for "Institution Name"). After removing duplicates, multiple related table information corresponding to each query object is formed. The keywords must cover the core search elements such as table name, field name, filter condition value, and data dimension.

[0159] For example, the relevant table information for the object to be queried, "Non-performing Balance", is: "Loan Table, Summary Balance, Customer Type = Individual, Overdue Days > 90 Days, Institution Name, XX Branch, First Sub-branch" (including data table, field name, filter conditions, dimension fields, and candidate enumeration values).

[0160] S306. For any object to be queried, generate the corresponding query instruction based on the query characteristics and information from multiple related tables.

[0161] Based on the query characteristics of the object to be queried and information from multiple related tables, and combined with the query rules (data retrieval criteria, association conditions) and atomic indicator determination rules (the object to be queried in a non-empty data table is an atomic indicator) in the target caliber template, the database-executable query instructions (such as SQL statements) are generated according to the logical reasoning capabilities of the Large Language Model (LLM). The generation process must ensure that the instructions conform to the data query logic and database syntax specifications.

[0162] Filter out the atomic index class objects to be queried in the target caliber template whose "data table" is not empty, and generate query commands only for atomic indicators.

[0163] Based on the data table name in the relevant table information, the data source table for the query instruction can be determined; the keywords corresponding to the data retrieval criteria can be mapped to the actual field names in the database table, and the query fields of the query instruction can be determined by combining the data dimension keywords; the filter condition values ​​in the keywords can be concatenated into valid query conditions according to the database syntax; for the metric-type query objects, aggregate functions can be added according to the summary requirements of the data retrieval criteria, and grouping conditions can be configured according to the data dimension keywords to ensure that dimensional summary results are obtained and the required query instruction is obtained.

[0164] For example, combining the relevant table information of the object to be queried, "Non-performing Balance," with the target caliber template query rules, the generated query instruction is: "SELECT Institution Name, SUM(Summary Balance) AS Non-performing Balance FROM Loan Table WHERE Customer Type = 'Individual' AND Overdue Days > 90 GROUP BY Institution Name."

[0165] S307. Perform syntax validation on the demand query instruction to obtain the target query instruction corresponding to the demand query instruction.

[0166] In some embodiments, syntax errors and field mapping errors in the demand query command are detected; syntax errors in the demand query command are corrected to obtain a corrected query command; and field mapping errors in the corrected query command are corrected based on a private domain knowledge base to obtain a target query command.

[0167] Syntax errors refer to errors that do not conform to database syntax standards, such as conflicting field aliases, non-standard statement format, incorrect use of keywords, incorrect table / field names, and improper use of conditional operators;

[0168] Field mapping errors refer to errors that do not conform to the business data retrieval logic and the actual storage in the database, such as aliases conflicting with MySQL keywords, aggregation field errors caused by missing grouping conditions, data retrieval caliber fields not matching the actual fields in the data table, and filter condition fields not having corresponding data table associations.

[0169] When performing syntax error detection, you can call the syntax validation interface of the corresponding database (MySQL / Oracle, etc.) or rely on the preset syntax rule library to scan for format errors, keyword conflicts, operator misuse and other problems in the query command (such as unclosed quotation marks, missing commas, illegal field aliases).

[0170] When performing field mapping error detection, the data source list can be compared to verify whether the table names and field names in the command actually exist and match (e.g., does "Loan Table" exist, and is "Summary Balance" a valid field of "Loan Table"); the rationality of aggregation logic can also be verified (e.g., if aggregate functions such as SUM and AVG exist, are the corresponding GROUP BY grouping conditions missing); finally, relying on the private domain knowledge base, the business rationality of field mapping can be verified (e.g., whether the field value corresponding to "Zhengfen" is consistent with the storage format of "Institution Name" in the database).

[0171] When performing syntax error correction, detected syntax errors are automatically corrected, such as automatically completing missing sentence components and standardizing sentence format; for aliases that conflict with database keywords (such as "defect rate" and "order"), suffix identifiers (such as "_1" and "_tmp") are automatically added for renaming to avoid execution errors.

[0172] When correcting field mapping errors, for issues such as field mismatch or confusing mapping logic, the system automatically replaces them with valid fields / values ​​by combining the mapping relationship between the private domain knowledge base and the data source (e.g., replacing "individual customer" with "individual" stored in the database); for aggregate queries with missing grouping conditions, the system automatically adds GROUP BY clauses that match the data dimensions (e.g., adding "GROUP BY organization name" based on the "organization name" dimension).

[0173] After the correction is completed, the syntax and logic checks are performed again to ensure that the corrected query command not only conforms to the database execution specifications but also meets the data retrieval requirements of the target template. Finally, the target query command is output.

[0174] For example, the initial draft of the query instruction had two issues: "alias conflict with MySQL keyword" and "missing grouping conditions". The initial draft was: "SELECT Institution Name, SUM(Summary Balance) AS Non-Performing Loan Rate FROM Loan Table WHERE Customer Type = 'Individual' AND Overdue Days > 90". After verification and correction, the alias "Non-Performing Loan Rate" which conflicted with the keyword was changed to "Non-Performing Loan Rate_1", and the corresponding grouping conditions were added. The final executable SQL statement (target query instruction) with no syntax errors and no logical errors was generated: "SELECT Institution Name, SUM(Summary Balance) AS Non-Performing Loan Rate_1 FROM Loan Table WHERE Customer Type = 'Individual' AND Overdue Days > 90 GROUP BY Institution Name".

[0175] In this application, full-dimensional error detection can be used to achieve precise optimization and compliant conversion of query commands. This not only avoids database execution failures caused by command errors, but also ensures that the target query command and the data retrieval requirements of the target specification template are highly consistent, guaranteeing the accuracy and usability of subsequent query results, further reducing the cost of manual intervention, and improving the stability and efficiency of the report generation process.

[0176] S308. Based on the database, execute the target query instruction to obtain the target query information corresponding to the object to be queried.

[0177] It can batch submit and execute target query commands with no dependencies (such as SQL statements corresponding to "loan balance" and "non-performing balance"), thereby improving query efficiency.

[0178] If a target query command fails to execute (e.g., due to temporary network fluctuations or data row locking), a retry mechanism of 1-3 times will be automatically triggered. The retry interval will increase according to preset rules, and an exception log will be recorded to facilitate subsequent troubleshooting.

[0179] During execution, strict database query permission control is followed, and only explicitly defined field data from the target caliber template is retrieved to avoid the extraction and leakage of irrelevant data.

[0180] After the database execution is complete, it will return the original query result set (such as a two-dimensional data table or a set of data rows). The processing device will then receive the result set and perform structured parsing and cleaning.

[0181] The structured data after classification and association is integrated to form the target query information corresponding to each query object. This information is a standardized structured data set.

[0182] The target query information includes core data items, data element information, and field mapping relationships.

[0183] The core data items are the indicator values ​​and dimension field values ​​corresponding to the object to be queried (such as "Institution Name = First Branch" and "Non-performing Balance = RMB 1.205 million"); the data element information includes the data query time, database source, and data caliber description (which is consistent with the data caliber of the target caliber template); the field mapping relationship is the correspondence between the query result fields and the column names of the report requirement template (such as "Non-performing Rate_1" corresponding to the "Non-performing Balance" column in the report).

[0184] S309. Fill the target query information corresponding to each object to be queried into the fill position corresponding to the report requirement template to obtain the intermediate requirement template.

[0185] Extract core data items (specific values ​​for institution name, loan balance, and non-performing loan balance) from the target query information, filter out non-filling data such as metadata and mapping relationships, and retain only valid data corresponding to the column names in the report requirement template.

[0186] Based on the field mapping relationship, the core data items of each queried object are precisely matched with the corresponding fill columns and rows in the report requirement template (e.g., the "Loan Balance" of "First Branch" corresponds to the cell in the "First Branch" row and "Loan Balance" column of the report). Among them, the dimension-type queried objects (e.g., "Loan Account Management Institution") are filled first, as the row benchmark for subsequent indicator data filling.

[0187] Batch backfilling and single-cell calibration are used for the matched data to batch fill the target query information of the object to be queried into the corresponding cells; for positions with missing data, a preset default label (such as "-") is marked to avoid blank or invalid cells in the report.

[0188] After the data is filled, the system automatically verifies the completeness (no large areas of missing data in core columns) and accuracy (no obvious abnormalities in values). Once the verification is successful, an intermediate requirement template is generated. This template only fills the current query data of the atomic indicators. Derivative objects (such as "compared to the previous day" and "compared to the previous month") are still in a state of pending filling and are temporarily stored in the processing device, waiting for subsequent derivative parameters to be filled.

[0189] Example: Based on Table 1 (Corporate Loan Indicator Report), fill the target query information such as "First Branch", "Loan Balance = 50 million yuan", and "Non-performing Balance = 1.205 million yuan" into the corresponding rows and columns to generate the intermediate requirement template. At this time, the columns such as "Compared to Previous Day" and "Compared to Previous Month" are still blank.

[0190] S310. Based on the target query information corresponding to each query object, determine multiple derived parameters of multiple derived objects corresponding to each query object.

[0191] Specifically, for any object to be queried, obtain the historical query information corresponding to the object to be queried; and determine the derivative parameters corresponding to each derivative object based on the historical query information and the target query information.

[0192] Based on the column structure of the report requirement template, compile a list of derived objects corresponding to each object to be queried.

[0193] For example, "Loan Balance" corresponds to the derivative objects "Compared to Previous Day (Loan Balance)", "Compared to Previous Month (Loan Balance)", and "Compared to Beginning of Year (Loan Balance)", "Non-performing Balance" corresponds to the derivative object "Compared to Previous Day (Non-performing Balance)", and "Non-performing Ratio" is a cross-indicator derivative object that corresponds to both "Loan Balance" and "Non-performing Balance".

[0194] For time-dependent objects (such as "compared to the previous day" or "compared to the previous month"), retrieve the historical query information of the corresponding object to be queried from the system's historical report cache or the database's historical data partition (the information must be consistent with the dimensions of the current target query information, such as the loan balance of "First Branch" on the previous day, the loan balance of the previous month, and the loan balance at the beginning of the year). The historical data must be standardized in format and consistent with the current data units and precision.

[0195] For cross-indicator derived objects (such as "non-performing loan ratio"), extract the target query information (such as the current values ​​of "non-performing loan balance" and "loan balance") of the related objects from the current intermediate demand template, without needing to obtain historical data.

[0196] Based on the type of the derived object, the pre-defined standardized calculation rules are invoked to automatically calculate the derived parameters.

[0197] For example, for difference-type calculations (such as "difference from previous day's balance"): Derived parameter = current target query information value - corresponding historical query information value; for growth rate-type calculations (such as "growth rate from previous day's balance"): Derived parameter = (current target query information value - corresponding historical query information value) / corresponding historical query information value × 100% (rounded to 2 decimal places); for cross-indicator ratio-type calculations (such as "non-performing loan ratio"): Derived parameter = value of associated query object 1 (non-performing loan balance) / value of associated query object 2 (loan balance) × 100% (rounded to 2 decimal places).

[0198] Afterwards, the reasonableness of the derived parameters is verified (e.g., the growth rate has no extreme outliers and the ratio is within a reasonable business range), and invalid calculation results (e.g., the inability to calculate due to missing historical data) are marked with a default label (e.g., "--").

[0199] This application enables rapid derivation and accurate calculation of derived object data, eliminating the need for manual calculation and ensuring consistency between derived parameters and current target query information and historical data. This avoids errors caused by manual calculation, further improving the completeness and accuracy of report data and accelerating the efficiency of the entire report generation process.

[0200] S311. Fill the corresponding fill positions of each derived object in the intermediate requirement template with the multiple derived parameters corresponding to each queried object to obtain the target requirement report.

[0201] Each derived parameter can be precisely matched with the corresponding cell in the intermediate requirement template. For example, the derived parameter "First Branch - Loan Balance - Compared to Previous Day" corresponds to the cell in the "First Branch" row and the "Compared to Previous Day (Loan Balance)" column in the intermediate template.

[0202] Numerical parameters (such as difference, ratio, growth rate) can be directly derived and filled into the corresponding cells using a batch backfilling method.

[0203] If the derived parameters of the calculation logic need to be retained, the Excel formula fill module can be called to expand the calculation logic of a single derived parameter into a formula array of the corresponding column (such as expanding "=B3-C3" into "=B4-C4" and "=B5-C5"), and then fill it back into the intermediate requirement template, which will be rendered into specific values ​​by the built-in engine of Excel.

[0204] After the data is populated, a full-dimensional validation can be performed to verify data integrity (no missing data in core columns and rows), data logic consistency (e.g., no contradictions between derived parameters and the calculation logic of current and historical data), and report format standardization (uniformity of units, decimal places, and symbols).

[0205] It can automatically correct problems found during verification or mark abnormalities.

[0206] After successful verification, a complete target requirement report is generated. This report contains the current data of all objects to be queried, the derived parameters of all derived objects, and the format conforms to the user's preset requirements.

[0207] Simultaneously, the target requirement reports are stored in multiple formats (such as Excel and PDF) and pushed to the online Excel plugin on the user's device for viewing, downloading, and secondary editing. The report traceability log (including data source, calculation rules, and generation time) is also retained to facilitate subsequent business verification and problem investigation.

[0208] For example, the derived parameters such as "First Branch - Loan Balance - Compared to Previous Day" of RMB 1 million and 2.04%, and "Non-Performing Loan Ratio" of 2.41% can be filled into the corresponding positions in the intermediate demand template to generate a complete corporate loan indicator reporting report (target demand report), which users can download and use directly.

[0209] The report generation method provided in this application can automatically identify multiple query objects to be queried based on the user's report requirement template. Based on the feature parameters of the query features provided by the user, it can determine multiple related table information in the database, and then determine the target query information corresponding to the query object to obtain the target requirement report. It can flexibly perform queries based on user needs, thereby improving the flexibility of report generation.

[0210] Figure 4 This is a schematic diagram illustrating the architecture of a report generation method provided in an embodiment of this application. Please refer to [link / reference]. Figure 4The process begins with business personnel initiating the data preparation phase. This involves receiving reports / local data from business users, storing it in a physical database, and simultaneously organizing the data in the physical database to create a list of accessible data sources (including table names, field names, and candidate enumeration values).

[0211] In the requirement definition, data information is synchronized from the physical database to the online editing module for the notification template / caliber. Business personnel use the online Excel plugin to edit the "template" sheet (defining report titles, column names, etc.), and generate the initial caliber template for the "caliber" sheet based on the template, and obtain the complete target caliber template, thus completing the semi-structured definition of the requirements.

[0212] In the requirements understanding process, the system calls an LLM-based report generation service to understand the requirements of the online editing templates / standards. This includes parsing template column names, identifying enumerable / non-enumerable query objects, and extracting relevant table information. At the same time, relying on the logical reasoning capabilities of LLM, it completes core processing such as Text2SQL generation, SQL error correction, and Text2Python generation.

[0213] After completing the data query and data backfilling, the final notification report is generated and pushed to the business personnel's operating terminal, completing the entire process loop.

[0214] Figure 5 This is a schematic diagram illustrating the architecture of another report generation method provided in an embodiment of this application. Please refer to... Figure 5 Business personnel use interactive interfaces such as online Excel plugins to edit basic structural information of reports, such as titles, column names, and pre-filled values, to create a report requirement template. The report requirement template is then subjected to structured parsing, extracting template column names, excluding pre-filled value columns / formula columns, and identifying enumerable / non-enumerable query objects. Based on the understanding of the template content, the system automatically generates an initial definition template. Business personnel then supplement the initial definition template with information such as data tables, filter conditions, and data retrieval criteria, ultimately forming a target definition template containing complete query rules.

[0215] The system automatically validates user-edited target specification templates, verifying the existence of data tables and the matching of tables and fields to ensure the legality and business rationality of the specification content. Based on the validated specification content, intent understanding is used to clarify the data retrieval logic (atomic indicators / derived indicators) for each queried object. Based on the intent understanding results, a hybrid retrieval method (i.e., keyword matching, semantic mapping, and private domain knowledge base) is used to recall relevant data tables and fields, generating a retrieval set of candidate data tables and fields. Based on the hybrid retrieval results and specification content, an executable SQL statement is generated using LLM, transforming business requirements into database query instructions. The generated SQL statement undergoes syntax and logic validation and correction, resolving issues such as alias conflicts and grouping errors, and outputting a valid target query instruction. After executing the SQL instruction to retrieve data, the atomic indicator results and derived indicator calculation results (including Excel formula extensions) are populated into the report requirement template, achieving data alignment and template filling. After data backfilling is completed, the system generates the final structured target requirement report and pushes it to the user.

[0216] Figure 6 This is a schematic diagram of a report generation device provided in an embodiment of this application. Please refer to [link / reference]. Figure 6 The report generation device 600 includes a receiving module 601, an analysis and processing module 602, an acquisition module 603, a parsing and processing module 604, a determination module 605, and a filling module 606.

[0217] The receiving module 601 is used to receive a user-defined report requirement template, which includes a requirement target and a requirement object corresponding to the requirement target.

[0218] The analysis and processing module 602 is used to analyze and process the report requirement template to obtain the initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and the query features corresponding to each object to be queried.

[0219] The acquisition module 603 is used to acquire the target caliber template corresponding to the initial caliber template. The target caliber template is obtained after the user fills in the feature parameters of the query features corresponding to each query object.

[0220] The parsing and processing module 604 is used to parse and process the target caliber template to obtain multiple related table information corresponding to each query object;

[0221] The determination module 605 is used to determine the target query information corresponding to each query object based on the query characteristics corresponding to each query object and information from multiple related tables.

[0222] The fill processing module 606 is used to fill the requirement object corresponding to the target requirement according to the target query information corresponding to each object to be queried, so as to obtain the target requirement report corresponding to the report requirement template.

[0223] Optionally, for any object to be queried; the determination module 605 is specifically used for:

[0224] Based on the query characteristics and information from multiple related tables, generate the required query instructions corresponding to the object to be queried;

[0225] By using the database, execute the query command to obtain the target query information corresponding to the object to be queried.

[0226] Optionally, module 605 is specifically used for:

[0227] Perform syntax validation on the request query command to obtain the target query command corresponding to the request query command;

[0228] Based on the database, execute the target query command to obtain the target query information corresponding to the object to be queried.

[0229] Optionally, module 605 is specifically used for:

[0230] Detect syntax errors and field mapping errors in the query command;

[0231] Correcting syntax errors in the query command results in a corrected query command.

[0232] Based on the private domain knowledge base, the field mapping errors in the correct query command are corrected to obtain the target query command.

[0233] Optionally, the report requirement template may include multiple derived objects corresponding to each object to be queried; the population module 606 is specifically used for:

[0234] Fill the target query information corresponding to each object to be queried into the fill position corresponding to the report requirement template to obtain the intermediate requirement template;

[0235] Based on the target query information corresponding to each query object, determine multiple derived parameters of multiple derived objects corresponding to each query object;

[0236] Fill the multiple derived parameters corresponding to each queried object into the corresponding fill positions of each derived object in the intermediate requirement template to obtain the target requirement report.

[0237] Optionally, for any object to be queried; the fill processing module 606 is specifically used for:

[0238] Retrieve historical query information for the object to be queried;

[0239] Based on historical query information and target query information, determine the derivative parameters corresponding to each derivative object.

[0240] Optionally, the parsing processing module 604 is specifically used for:

[0241] The query features of each object to be queried in the target caliber template are matched with the fields of the database table to obtain the directly related fields;

[0242] The query features in the target caliber template are semantically similar to the fields in the database table to obtain indirectly related fields;

[0243] Based on the private domain knowledge base, multiple related table information is determined from directly related fields and indirectly related fields.

[0244] Optionally, there can be multiple query features; the analysis and processing module 602 is used for:

[0245] In the report requirement template, specify multiple objects to be queried;

[0246] An initial caliber template is generated based on multiple query features and multiple objects to be queried.

[0247] The report generation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0248] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 7 The electronic device 700 may include a processor 701 and a memory 702. Exemplarily, the processor 701 and the memory 702 are interconnected via a bus 703.

[0249] Memory 702 stores instructions executed by the computer;

[0250] The processor 701 executes computer execution instructions stored in the memory 702, causing the processor 701 to execute the report generation method as shown in the above method embodiment.

[0251] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the report generation method of the above method embodiments when executed by a processor.

[0252] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the report generation method shown in the above method embodiments.

[0253] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0254] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0255] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0256] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0257] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0258] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0259] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0260] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0261] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A report generation method, characterized in that, include: Receive a user-defined report requirement template, the report requirement template including the requirement objective and the requirement object corresponding to the requirement objective; The report requirement template is analyzed and processed to obtain the initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and the query features corresponding to each object to be queried. The target caliber template corresponding to the initial caliber template is obtained. The target caliber template is obtained after the user fills in the feature parameters of the query features corresponding to each object to be queried. The target caliber template is parsed to obtain multiple related table information corresponding to each query object; Based on the query characteristics corresponding to each query object and information from multiple related tables, the target query information corresponding to each query object is determined; Based on the target query information corresponding to each object to be queried, the requirement object corresponding to the target requirement is populated to obtain the target requirement report corresponding to the report requirement template.

2. The method according to claim 1, characterized in that, For any given object to be queried; based on the query characteristics corresponding to the object to be queried and information from multiple related tables, determine the target query information corresponding to the object to be queried, including: Based on the query features and the information from the multiple related tables, a query instruction corresponding to the object to be queried is generated; By executing the required query instruction through the database, the target query information corresponding to each query object is obtained.

3. The method according to claim 2, characterized in that, By executing the query instruction through the database, the target query information corresponding to the object to be queried is obtained, including: The query instruction is subjected to syntax validation to obtain the target query instruction corresponding to the query instruction. Based on the database, the target query instruction is executed to obtain the target query information corresponding to each object to be queried.

4. The method according to claim 3, characterized in that, The query instruction is subjected to syntax validation to obtain the target query instruction corresponding to the query instruction, including: Detect syntax errors and field mapping errors in the requested query command; The syntax errors in the query instruction are corrected to obtain a corrected query instruction. Based on the private domain knowledge base, the field mapping errors in the corrected query instruction are corrected to obtain the target query instruction.

5. The method according to claim 1, characterized in that, The report requirement template includes multiple derived objects corresponding to each queried object; based on the target query information corresponding to each queried object, the requirement objects corresponding to the target requirement are populated to obtain the target requirement report corresponding to the report requirement template, including: The target query information corresponding to each object to be queried is filled into the fill position corresponding to the report requirement template to obtain the intermediate requirement template; Based on the target query information corresponding to each query object, determine multiple derived parameters of multiple derived objects corresponding to each query object; The multiple derived parameters corresponding to each queried object are filled into the fill positions corresponding to each derived object in the intermediate requirement template to obtain the target requirement report.

6. The method according to claim 5, characterized in that, For any object to be queried; Based on the target query information corresponding to the object to be queried, determine multiple derived parameters of multiple derived objects corresponding to the object to be queried, including: Obtain the historical query information corresponding to the object to be queried; Based on the historical query information and the target query information, the derivative parameters corresponding to each derivative object are determined.

7. The method according to claim 1, characterized in that, The query features are multiple; The report requirement template is analyzed and processed to obtain the initial caliber template corresponding to the report requirement template, including: In the report requirement template, the plurality of objects to be queried are identified; The initial caliber template is generated based on multiple query features and the multiple objects to be queried.

8. A report generation device, characterized in that, It includes a receiving module, an analysis and processing module, an acquisition module, a parsing and processing module, a determination module, and a filling processing module. The receiving module is used to receive a user-defined report requirement template, the report requirement template including a requirement target and a requirement object corresponding to the requirement target; The analysis and processing module is used to analyze and process the report requirement template to obtain an initial caliber template corresponding to the report requirement template. The initial caliber template includes multiple objects to be queried and query features corresponding to each object to be queried. The acquisition module is used to acquire the target caliber template corresponding to the initial caliber template. The target caliber template is obtained after the user fills in the feature parameters of the query features corresponding to each query object. The parsing and processing module is used to parse and process the target caliber template to obtain multiple related table information corresponding to each query object; The determining module is used to determine the target query information corresponding to each query object based on the query characteristics corresponding to each query object and multiple related table information; The filling processing module is used to fill the requirement object corresponding to the target requirement according to the target query information corresponding to each object to be queried, so as to obtain the target requirement report corresponding to the report requirement template.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 7.