Report logic capture and report generation method, system and application

Through natural language processing and dynamic SQL generation technology, financial statement data is automatically extracted and processed, solving the problems of cumbersome and insufficient security in the traditional report generation process, and achieving efficient, flexible, secure and intelligent report generation, suitable for large enterprises Complex demand.

CN118940734APending Publication Date: 2024-11-12YUE JIN SHU ZI KE JI (SHANG HAI) GU FEN YOU XIAN GONG SI
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202410847112.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The traditional financial statement generation process is complicated and prone to errors, it is difficult to flexibly adapt to new needs, it is not friendly to non-professional personnel, insufficient data processing efficiency and security, and lack of intelligent analysis support, resulting in low efficiency, poor flexibility, insufficient security and difficult decision-making. .

Method used

Using natural language processing technology to write report logic, automatically extract data through dynamic SQL generation and database adaptation layer, combined with intelligent checks and data flow processing, provides visual interaction design, reduces technical thresholds, enhances report flexibility and security, and realizes End-to-end intelligent life cycle management.

Benefits of technology

It significantly improves the efficiency and accuracy of report processing, reduces the error rate, enhances flexibility and security, reduces the work burden of financial personnel, and provides intelligent decision-making support, suitable for complex report preparation scenarios in large enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004915968940000021
    Figure BDA0004915968940000021
  • Figure HDA0004915968950000011
    Figure HDA0004915968950000011
  • Figure HDA0004915968950000021
    Figure HDA0004915968950000021
Patent Text Reader

Abstract

The invention discloses a report logic capturing and report generating method, which is characterized by comprising the following steps of: 1, designing a calculation function for configuring a report, configuring a report template and a data source, and establishing a framework and a data structure of the report; 2, writing report logic by using a natural language, analyzing the report logic, and configuring an automatic extraction task to obtain corresponding data from a database; and step 3, generating report data according to the logic defined by the user, performing data verification and adjustment by the user through a report filling function, performing auditing and summarizing after the data verification and adjustment are completed, and exporting the report in a required format. The invention further discloses a system for implementing the method and application of the method or the system, and the system and the method have wide application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of report supervision and submission, and relates to a report logic capture and report generation method, system and application. Background Art

[0002] In the traditional financial report generation process, it is usually necessary to write complex formulas and functions to capture and calculate the specified report data from the original data.

[0003] This approach has the following limitations:

[0004] Writing formulas and functions is cumbersome and prone to errors: The formulas and functions involved in financial statements are often very complex and require processing a large number of data sources and logical relationships. Manually writing these formulas and functions is not only time-consuming, but also prone to human errors. Once an error occurs, it often takes a lot of time to troubleshoot and correct it, affecting work efficiency and the accuracy of the report.

[0005] Inflexible support for new report types or requirements: Existing technical reporting tools have fixed functions and are difficult to flexibly adapt to changing reporting requirements. When new report types need to be generated or new regulatory requirements need to be met, it is usually necessary to rely on the IT department for customized development and configuration, resulting in a long development cycle and slow response speed. It is impossible to quickly meet the needs of business departments, affecting the operational efficiency and flexibility of the enterprise.

[0006] Unfriendly to non-professionals: The existing reporting tools have a high threshold for use, requiring users to have a certain technical background and professional knowledge to correctly write and configure the report logic. This is a big challenge for financial personnel and other business department staff, increasing their workload and limiting the widespread application of reporting tools in enterprises.

[0007] Insufficient efficiency and security of data processing: When processing large amounts of data, traditional report generation methods often rely on manual operations, which is inefficient and prone to data omissions and errors. At the same time, there is a lack of effective security measures during data transmission and storage, and there is a risk of data leakage, especially when processing sensitive financial data. This risk is more serious and may lead to legal and regulatory penalties for the company.

[0008] Lack of intelligent data analysis and decision support: Traditional report generation methods mainly focus on data capture and display, lack in-depth analysis and mining of data, and cannot provide intelligent decision support. When reviewing reports, management often needs to conduct additional data analysis and interpretation, which increases the difficulty and time cost of decision-making, and cannot respond to market changes and business needs in a timely manner, affecting the competitiveness of the enterprise.

[0009] To sum up, the traditional financial report generation method has significant deficiencies in efficiency, flexibility, ease of use, security and intelligence, and it is difficult to meet the high requirements of modern enterprises for report generation and data analysis. There is an urgent need for a more efficient, flexible, secure and intelligent report generation method and system. Summary of the invention

[0010] In order to solve the deficiencies in the prior art, the purpose of the present invention is to provide a report logic capture and report generation method, system and application. The present invention uses natural language to implement the function of report logic capture to simplify the financial report generation process, reduce the user's workload, and improve the flexibility and maintainability of report logic.

[0011] The present invention provides a report logic capture and report generation method, the method comprising the following steps:

[0012] Step 1: Design and configure the calculation function for the report, configure the report template and data source, and establish the report framework and data structure;

[0013] Step 2: Use natural language to write report logic, parse the report logic and configure automatic extraction tasks to obtain corresponding data from the database;

[0014] Step 3: Generate report data based on user-defined logic. Users can verify and adjust data through the report filling function. After completion, they can review and summarize the data and export the report in the required format.

[0015] In step 1, design calculation functions for reports (such as sum, end of last month, monthly average, etc.), implement corresponding Java methods to generate SQL statements adapted to different databases; configure data tables to generate mapping relationships between entity tables and their fields as natural language dictionary items; import report templates through the template management module and configure report template related parameters;

[0016] Implementing the corresponding Java method refers to writing Java code to implement the pre-designed built-in calculation function, ensuring that the built-in calculation function can interact with different database systems, integrating the built-in calculation function into the report system, and facilitating the user to call it when defining the report logic for processing the report logic;

[0017] According to the report logic defined by the user, dynamic SQL generation technology is used to be compatible with different database systems and automatically generate SQL query statements that are suitable for different database systems; the query statements include paging, joins, aggregate functions, etc.

[0018] The built-in calculation functions involved in the present invention include but are not limited to those shown in Table 1 below:

[0019] Table 1 Built-in calculation function table

[0020]

[0021] In step 2, the user writes the report logic in the report logic management module, and uses natural language to write calculation rules and data screening conditions through NLP technology; the user configures the automatic extraction task of the report; after the automatic extraction scheduled task is triggered, the system loops through the reports to be extracted, parses the logic of each cell through keyword matching and logical relationships and context dependency understanding, and converts through the mapping relationship in the natural language dictionary table, calls the calculation method and accesses the database;

[0022] Pre-built vocabulary and grammar models for mapping user input to calculation logic and database queries.

[0023] The construction of the mapping relationship includes the following steps:

[0024] Step i: establish a correspondence between a table (including fields) in a physical database and a logical table in a business logic layer; the table in the physical database specifies a user name and assigns a label to each field in the table;

[0025] Step ii, according to the selected numerical type field, define the calculation logic for the numerical type field;

[0026] Step iii, identifying non-numeric or date type fields in the database table, setting default filtering conditions and allowing users to dynamically enter filtering values ​​at runtime;

[0027] Step iv, in the logic table configuration, identify the field used as the screening condition, and define the optional value range or default screening logic of the field;

[0028] Step v: automatically generate a series of dictionary items.

[0029] In step three, the calculation results of the cells are saved in the report data table T_REPORT_DATA; the user obtains the data in the report filling function and verifies and adjusts it. After submitting it for review and confirmation, the data enters the state of waiting to be summarized / exported; users with report summary authority summarize the data to be summarized by the subordinate institutions, and then verify, submit, review and review it; users with report export authority export the file in the format required by the review regulatory agency in the report export function for reporting.

[0030] In the process of realizing report logic capture and report generation of the present invention, the following technical means are applied, including:

[0031] Dynamic SQL generation and database adaptation layer: The Java method implementation mentioned in step 1 is not limited to basic calculation functions, but also involves dynamic SQL generation technology. This technology allows SQL query statements that adapt to different database systems to be automatically generated according to user-defined report logic, including but not limited to complex operations such as paging, joins, and aggregate functions. Through JDBC (Java Database Connectivity) or other ORM (Object-Relational Mapping) frameworks such as Hibernate or MyBatis, it ensures seamless connection with databases such as MySQL, Oracle, and SQL Server, improving the flexibility and scalability of the system.

[0032] Natural language processing (NLP) and logic parsing engine: In step 2, advanced natural language processing technologies, such as the BERT model or Transformer architecture, are introduced to achieve in-depth understanding of the report logic described by the user's natural language. This includes not only simple keyword matching, but also understanding complex logical relationships and contextual dependencies, such as "If the revenue of department A exceeds that of department B, then..." By building a vocabulary and grammar model for a specific field, the system can accurately map user input to the backend calculation logic and database queries.

[0033] Intelligent verification and data quality assurance: In step 3, machine learning algorithms are introduced to perform intelligent verification on the reported data. For example, an anomaly detection model based on historical data learning can automatically mark possible input errors or outliers. Combined with the business rule engine, the accuracy and consistency of the data are ensured. In addition, data lineage tracking technology is used to record the source, conversion process and responsible person of each piece of data to enhance transparency and audit capabilities.

[0034] Data stream processing and microservice architecture: The entire report generation process adopts a microservice architecture, with each step (logic analysis, data capture, calculation processing, audit summary, etc.) as an independent service, and efficient and loosely coupled communication is achieved through message queues (such as Kafka, RabbitMQ) or API Gateway. This enables the system to scale horizontally and cope with high concurrent requests, while simplifying fault isolation and upgrade maintenance.

[0035] Visualization and interactive design: Advanced visualization technology and interactive design concepts are integrated into the report design stage. Using front-end libraries such as D3.js and ECharts, not only static reports are generated, but also interactive dashboards are provided. Users can dynamically adjust views and drill down for analysis. Responsive layout is taken into consideration during the design to ensure good display effects on different devices. Innovative embodiment

[0036] ·Automated logic generation with NLP: Deeply integrating natural language processing technology into report logic configuration greatly reduces the technical threshold for report design, allowing non-technical personnel to define complex report requirements through everyday language, which is a capability that traditional reporting tools do not have.

[0037] Flexible cross-database adaptation and calculation function integration: Through dynamic SQL generation and Java method integration, it achieves wide compatibility with different database systems. At the same time, the built-in high-performance calculation function library can efficiently handle complex financial calculations, such as depreciation calculation, financial ratio analysis, etc., significantly improving the speed and accuracy of report processing.

[0038] End-to-end intelligent report lifecycle management: From logic definition, data capture, processing, verification to final export, the entire process is highly automated and intelligent, reducing human intervention and improving the efficiency and quality of report processing. It is particularly suitable for complex report preparation scenarios of large enterprises and multinational organizations.

[0039] The present invention also provides a report processing system for realizing the above report logic capture and report generation method, the system comprising: a report configuration module, a verification management module, a data management module, an automatic report management module, and a report processing module;

[0040] The report configuration module further includes a template import module and a template management module; external reports are imported into the system based on the template, and the report templates are managed;

[0041] The report configuration module is configured with one or more report templates, and both the standard Excel reports required by the regulatory agency and the user-defined Excel reports can be imported through the report templates;

[0042] The report template contains information such as report frequency, caliber, currency unit, version number, etc.;

[0043] The verification management module can configure verification formulas for reports, which are used for verification within the report and verification between reports.

[0044] The verification formula includes a regulatory verification formula and a custom verification formula; the intra-table verification refers to the verification of data from the same report, and the inter-table verification refers to the verification of data from different reports, which is performed across tables;

[0045] The data management module further includes a database management module and a data source management module, which are used to configure database connections and create mapping relationships between fields and condition fields in the data table;

[0046] The fields include numerical fields, which are used for subsequent report logic calculations; the conditional fields are used for data screening in report logic;

[0047] The automated report management module further includes a report logic management module and a report extraction management module;

[0048] The report logic management module is used to write and manage data processing logic and configure report logic;

[0049] The report extraction management module is used to set the report extraction function, and calculate the logic of each cell according to the frequency date of the report according to the set report extraction function;

[0050] The report processing module further includes a report filling module, a report summary module, and a report export module; which are used to verify and adjust report data, summarize one or more report data, and generate corresponding reports for uploading or exporting.

[0051] The present invention also provides the above-mentioned report logic capture and report generation method, or the application of the above-mentioned report processing system in report supervision and submission, enterprise financial report preparation, business performance analysis, etc.

[0052] The present invention also provides a hardware system for implementing the above-mentioned report logic capture and report generation method, the hardware system includes: a memory and a processor; a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned method is implemented.

[0053] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.

[0054] The beneficial effects of the present invention mainly include the following points, which significantly improve the efficiency, flexibility and accuracy of report processing compared with the prior art, which are specifically embodied in:

[0055] 1. Significantly improve work efficiency and reduce error rates: Traditional report generation methods rely on manual data collation and calculation, which is not only time-consuming but also prone to errors. This invention greatly shortens the report production cycle by automatically capturing data and applying preset report logic. At the same time, the built-in data verification mechanism can effectively avoid human errors and ensure the accuracy of data. This not only reduces the workload of financial personnel and analysts, but also improves the overall operational efficiency of the organization.

[0056] 2. Enhance the flexibility and customization of reports: Reporting tools in the prior art often have fixed functions and are difficult to adapt to the diverse reporting needs of enterprises. The present invention supports user-defined report templates and logic, allowing enterprises to flexibly design report structures and calculation rules according to actual business needs without relying on IT departments for customized development, reducing costs and accelerating the process of report innovation and iteration.

[0057] 3. Strengthen data security and compliance: When processing sensitive data, the present invention integrates advanced data encryption technology and permission management system to ensure the security of data during transmission and storage, in compliance with international data protection regulations such as GDPR and HIPAA. At the same time, for regulatory reports for specific industries, the system can automatically follow the corresponding format and verification specifications to ensure that the report output is fully compliant, reducing the risks and fines caused by non-compliance.

[0058] 4. Promote intelligent and data-driven decision-making: By integrating intelligent analysis functions, the present invention not only generates reports, but also conducts preliminary data analysis, such as trend forecasting, anomaly detection, etc., to provide management with instant business insights. This data-based decision support helps enterprises quickly respond to market changes, optimize resource allocation, and enhance competitiveness.

[0059] 5. Easy to maintain and upgrade: Compared with traditional reporting systems, the present invention adopts a modular design with loose coupling between components, which is convenient for subsequent system maintenance and functional upgrades. As technology develops and business needs change, the system can adapt quickly and continue to provide the latest functional support, ensuring long-term return on investment. In summary, the present invention solves the limitations of existing technologies in report processing through a series of innovations, brings significant benefits to enterprises, and promotes the depth and breadth of digital transformation. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0061] Figure 1 It is a schematic diagram of data processing of each data layer realized automatically by the present invention.

[0062] Figure 2 It is a logical diagram composed of natural language in a specific implementation scenario of the present invention. After entering the system, it will be disassembled one by one into the language recognized by the computer, and then combined with relevant business scenarios to generate SQL scripts that can be recognized by the database.

[0063] Figure 3 It is a flow chart showing the decomposition of report logic capture and report generation functions into various system modules in the present invention. DETAILED DESCRIPTION

[0064] The present invention is further described in detail with reference to the following specific examples and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art and are not particularly limited by the present invention.

[0065] The present invention proposes a report logic capture and report generation method, characterized in that the method comprises the following steps:

[0066] Step 1: Design and configure the calculation function for the report, configure the report template and data source, and establish the framework and data structure of the report; Step 2: Use natural language to write the report logic, parse the report logic and configure the automatic extraction task to obtain the corresponding data from the database; Step 3: Generate report data according to the user-defined logic, and the user verifies and adjusts the data through the report filling function. After completion, review and summarize, and export the report in the required format. The present invention also proposes a system for implementing the above method, as well as the application of the above method or system, which has wide application value.

[0067] The present invention provides a report logic capture and report generation method, the method comprising the following steps:

[0068] Step 1: Build a mature platform and environment system to support report logic capture and report generation methods, combined with the attached Figure 1 The following detailed description is given:

[0069] 1. After fully understanding the reporting requirements of financial institutions, a complete set of indicator libraries is designed on top of the product as a whole to provide a data source for subsequent logic capture; this approach can be further expanded and applied to various subsystems under the product, such as AML anti-money laundering, PBOC, CBRC, EAST, automated reporting, etc. These subsystems are managed by a unified permission platform

[0070] 2. In the data storage layer, it supports most of the current mainstream databases such as SQL SERVER, ORACLE, MYSQL, DB2, etc.

[0071] 3. Data collection layer: Use self-developed ETL tools to collect data from the DM layer to the business data layer through the following processes: data extraction, data filtering, data merging, data distribution, data loading, etc.

[0072] 4. Business data layer: This layer stores different types of source data pushed through ETL processing, including but not limited to the following types: TXT format source data, CSV format source data, EXCEL format source data, XML format source data, and direct web service

[0073] 5. Finally, these source data are supplied to the following business systems for application through report logic capture and report generation methods.

[0074] Step 2: Use natural language to write report logic, parse the report logic and configure automatic extraction tasks to obtain corresponding data from the database. Figure 2 The following detailed description is given:

[0075] 1. Users write natural language logic,

[0076] 2. Import the logic into the system, and the system will verify the logic and format of the natural language

[0077] 3. If the verification fails, an Excel result will be generated, including the reason for failure and details, so that users can modify the natural language logic for the next logic import.

[0078] 4. After successful verification, the system decomposes the natural language logic, analyzes it line by line, and converts it into SQL statements

[0079] 5. Through manual extraction / automated task extraction, call and execute the corresponding SQL to generate business detail data

[0080] 6. Business detail data can be processed by implementing relevant functions (such as summation, monthly average, etc.) in Java language to obtain the final result, and can also be used as a detailed display of the final result in the later stage

[0081] Step 3: Generate report data according to user-defined logic. Users can verify and adjust data through report filling function. After completion, they can review and summarize the report and export it in the required format. Figure 3 The following detailed description is given:

[0082] 1. Through report import or logical capture, the report data obtained will be concentrated in the waiting for supplementary recording state

[0083] 2. The user saves, verifies (there will be corresponding verification formulas to support verification functions), submits, reviews, exports and other process operations on the report data. Each process will be completed before the next process state is reached.

[0084] 3. If the verification / review fails, you need to fill in the reason for failure, and the report data status will directly return to the status of waiting for re-entry

[0085] 4. After the data report in the pending export state goes through the export process, it will enter the exported state and will be locked and cannot be modified.

[0086] The unlock function can be used to return the data report status to the waiting state.

[0087] The present invention also provides a system for implementing the above method, the system comprising: a report configuration module, a verification management module, a data management module, an automatic report management module, and a report processing module;

[0088] The report configuration module further includes a template import module and a template management module; external reports are imported into the system based on the template, and the report templates are managed;

[0089] The report configuration module is configured with one or more report templates, and both the standard Excel reports required by the regulatory agency and the user-defined Excel reports can be imported through the report templates;

[0090] The verification management module can configure verification formulas for reports, which are used for verification within the report and verification between reports.

[0091] The verification formula includes a regulatory verification formula and a custom verification formula;

[0092] The data management module further includes a database management module and a data source management module, which are used to configure database connections and create mapping relationships between fields and condition fields in the data table;

[0093] The automated report management module further includes a report logic management module and a report extraction management module;

[0094] The report logic management module is used to write and manage data processing logic and configure report logic;

[0095] The report extraction management module is used to set the report extraction function, and calculate the logic of each cell according to the frequency date of the report according to the set report extraction function;

[0096] The report processing module further includes a report filling module, a report summary module, and a report export module; which are used to verify and adjust report data, summarize one or more report data, and generate corresponding reports for uploading or exporting.

[0097] The specific instructions are as follows:

[0098] 1. Report configuration module, which further includes a template import module and a template management module, which are used to implement functions such as template import and template management.

[0099] a. Template import. The report template is the foundation of the entire system. All subsequent functions are based on specific report templates. This function allows users to import standard Excel reports required by regulatory agencies, as well as user-defined Excel reports. Users only need to configure some parameters on the relevant pages. Some of these parameters will have uniqueness verification, and the user-defined Excel report can be directly used as a template for subsequent reporting. When users subsequently capture data, they will match the report template in the system based on some of the above parameters, so that relevant data can be imported into the appropriate report template.

[0100] b. Template management. After the template is imported, you can manage the report template, including adding, deleting, modifying, querying, etc. You can also configure the report template's frequency, caliber, currency unit, version number and other information.

[0101] 2. Verification management module, which includes verification configuration function.

[0102] Verification configuration can configure the verification formula required for each report. The sources of verification formulas include regulatory verification formulas and custom verification formulas. Regulatory verification formulas are verification formulas required by regulatory agencies, and the system will preset the verification formulas of regulatory agencies in the system; for custom verification formulas, users can configure custom verification rules based on their own data quality. Verification types include intra-table verification and inter-table verification. Intra-table verification means that the data verified by the verification formula all come from the same report; inter-table verification means that the formula verified by the verification formula comes from different reports and needs to be verified across tables.

[0103] 3. Data management module, which includes database management and data source management.

[0104] a. Database management: Configuring database connections allows the system to access specific databases. Database management is the basis for subsequent data source management.

[0105] b. Data source management can create mapping relationships between data tables that will be used in report logic later:

[0106] b.1. Mapping from original data source to logical table:

[0107] Purpose: To establish a correspondence between the tables (including fields) in the physical database and the "logical tables" in the business logic layer. The logical table is an abstraction of the physical table, which is convenient for business understanding and use.

[0108] Calculation: Select a specific table in the physical database in the data source management interface and assign it an easy-to-understand Chinese name. At the same time, assign Chinese labels to each field in the table to make its business meaning clear.

[0109] b.2. Calculated field mapping:

[0110] Purpose: Define which fields will be included in the calculations in the report (such as sum, average, maximum, etc.).

[0111] Calculation: Users select numeric fields in the database table and define the calculation logic for these fields. For example, you can specify a field as sales and perform a summary calculation of total sales in the report logic.

[0112] b.3. Conditional field mapping:

[0113] Purpose: To determine which fields will be used for data screening to support dynamic query and filtering capabilities.

[0114] Calculations: Identify non-numeric or date-type fields in database tables, which are often used as filter conditions (such as time range, region, product category, etc.). When users configure these fields, they can set default filter conditions or allow users to dynamically enter filter values ​​at runtime.

[0115] Implementation steps

[0116] b.3.1. Database connection configuration: First, configure the database connection information in the system background, including database type, address, port, user name and password, so that the system can access the actual data source.

[0117] b.3.2. Data table mapping: Through the interface operation, select the specific table in the connected database, name it and define the Chinese explanation of the field. This step creates a mapping from the physical table to the logical table.

[0118] b.3.3. Calculation field settings: In the configuration interface of the logical table, mark which fields will participate in the numerical calculation of the report and specify the calculation method (if the system supports custom formulas, you also need to enter the calculation formula).

[0119] b.4. Conditional field configuration: Also in the logical table configuration, identify the fields that can be used as filtering conditions and define their optional value ranges or default filtering logic.

[0120] b.5. Generate dictionary items: After the above configuration is completed, the system automatically generates a series of dictionary items. These dictionary items serve as the basis for natural language processing, enabling the system to understand report requests made by users in natural language, such as "calculate this year's sales by region."

[0121] b.6. Preliminary verification: Before the user configures the report logic, the system will perform a preliminary verification based on the above mapping relationship and configuration information to ensure that the selected field type is compatible with the predetermined calculation or filtering operation, and avoid errors such as performing mathematical operations on non-numeric fields. Through this series of steps, data source management not only builds a bridge between physical data and business logic, but also ensures the effectiveness and accuracy of report logic configuration, improving user experience and system stability.

[0122] Through the database connection configured in the database management, access the specific database, select the database table that needs to be used in the report logic later, configure the Chinese name of the database table and the Chinese name of the field. These mapping relationships will eventually generate dictionary items for natural language use; configure the fields used for calculation in the database table for the subsequent report logic module, which are generally numerical fields; configure the conditional fields used to filter data in the database table for the subsequent report logic module. The purpose of configuring this information is to perform preliminary verification of the report logic configured by the user in the future to prevent problems in calculating non-numerical fields.

[0123] 4. Automated report management module, which further includes report logic management module and report extraction management module, which are used to realize report logic management, report extraction management and other functions.

[0124] a. Report logic management, relying on template management function:

[0125] The template management function plays a core role in report logic management. It not only provides a standardized basic framework for report design and data presentation, but also realizes the efficiency and flexibility of report logic management. Specifically:

[0126] Template management function:

[0127] a.1. Standardized design: A series of predefined report layouts, style templates, and data display components are provided, such as tables, charts, indicator cards, etc. These templates follow the corporate visual identity system (VIS), ensuring the consistency and professionalism of all reports and reducing the design workload.

[0128] a.2. Reuse of logical fragments: Allows users to create and save commonly used data processing logic, filter conditions, and calculation formulas as templates. In this way, when designing new reports, these logical fragments can be directly referenced without repeatedly writing similar SQL queries or data processing codes, greatly improving development efficiency.

[0129] a.3. Dynamic parameter configuration: Supports definition of parameterized queries and dynamic fields in templates, so that the same report template can display different data views based on different parameter inputs, enhancing the adaptability and interactivity of the report.

[0130] a.4. Permissions and version control: Template management also involves permission allocation to ensure that only authorized users can edit specific templates. At the same time, the historical versions of the templates are maintained to facilitate tracking of changes and rollbacks, which is crucial for team collaboration and version management of report logic.

[0131] Implemented the management of report logic:

[0132] Integration of logic and presentation: Template management closely integrates data logic (such as SQL query and aggregate function application) with front-end presentation logic, making report logic management not only a backend operation for processing data, but also a process that runs through the entire report from data extraction to final presentation.

[0133] Simplify complex logic processing: Complex report logic, such as multi-table joint query, group summary, conditional filtering, etc., can be pre-set through templates. When creating a new report, users only need to select the corresponding template and configure a small number of parameters to quickly implement the deployment of complex data processing logic, which reduces the technical threshold for report development.

[0134] Improve maintenance efficiency: When the data source structure changes or business needs are adjusted, you only need to modify the relevant template or logic fragment, and all reports that rely on this template will be automatically inherited and updated, greatly improving the maintenance efficiency and response speed of the reporting system.

[0135] · Promote knowledge sharing: Templates have become a way to share report design experience and best practices within an organization. New members can quickly get started by learning and reusing existing templates, which promotes knowledge inheritance within the team and best practices for report logic management. In summary, the template management function not only simplifies the report design process by providing a series of preset building blocks, logic fragments, and configuration options, but also realizes effective management of report logic, ensuring the efficiency, consistency, and flexibility of report development.

[0136] The system provides two ways to configure report logic. One is to use the SpreadJS plug-in to write the logic of each cell on the web page through online Excel; the other is to download the previously uploaded report template, open it through Excel, edit the logic of each cell, and upload it to the system through the upload logic function. No matter which method is used to edit the report logic, the logic edited by the user will be verified and prompted.

[0137] The process of converting natural language into SQL statements involves multiple technical fields such as natural language processing (NLP), grammar rule parsing, and domain knowledge model construction. Taking the commonly used calculation functions in financial statements as an example, such as sum, average (avg), and last day of previous month, the following briefly describes how to use Java to implement this conversion process. The main technologies and steps involved include:

[0138] 1. Word segmentation and analysis

[0139] Technology: Use an open source NLP library such as Stanford NLP, Apache OpenNLP, or spaCy (if it is a language other than Java, such as Python) to tokenize and tag the input natural language.

[0140] Process: Segment the input sentence to identify noun phrases, verbs, adjectives, etc. This helps the subsequent steps to understand the sentence structure and intent.

[0141] 2. Syntax parsing and intent recognition

[0142] Technology: Use semantic parsing techniques, such as dependency parsing, to identify the main components of a sentence (subject, predicate, object, etc.) and their relationships.

[0143] Process: By analyzing the dependencies between words, identify the operations that the user wants to perform (such as summing, averaging) and the objects they want to perform (such as "sales", "balance at the end of last month").

[0144] 3. Domain Specific Language Transformation

[0145] Technology: Establish domain-specific vocabulary and conversion rules. For example, for the financial reporting domain, maintain a mapping table that maps "sales" to specific tables and field names in the database.

[0146] ·Process: Based on the results of intent recognition, search and replace the keywords in the vocabulary with table names and column names in the database. At the same time, according to the recognized operations (functions), construct the corresponding SQL keywords or functions.

[0147] 4. SQL statement generation

[0148] Technology: Use string concatenation or template engines (such as Apache Velocity, Freemarker) to generate SQL statements.

[0149] ·Process: Based on the results of the above steps, according to the SQL syntax specification, splice or fill in the template to generate a complete SQL query statement. For example, for "calculate the total sales of last month", the SQL that may be generated is:

[0150] SELECT SUM(sales_amount)FROM sales_table WHERE sales_date BETWEEN'2023-02-01'AND'2023-02-28';

[0151] 5. Safety and effectiveness verification

[0152] Techniques: Use parameterized queries or prepared statements to prevent SQL injection attacks and check the syntax correctness of SQL statements before and after generating SQL.

[0153] ·Process: Perform security review on the generated SQL to ensure that user input is not directly inserted into the SQL string. At the same time, you can use the API provided by the database driver for precompilation and parameter binding to increase security.

[0154] In the specific implementation process, users can write logic such as the following pattern:

[0155] Logical case 1: Sum (Account data table. Current RMB balance) | Data source equals GL; RK account equals 40090501

[0156] In this logic, sum() belongs to the preset calculation function; the content after the vertical line is the screening condition; the account data table is the Chinese mapping name of the T_ODS_BASE_GL table configured by the user in the data source management, and the current RMB balance is the Chinese mapping name of the CURR_RMB_BAL field of the table; the data source is the Chinese mapping name of the DATA_SOURCE field of the table; and the RK account is the Chinese mapping name of the RK_GLCODE field of the table.

[0157] This logic will eventually generate select sum(GL.CURR_RMB_BAL)from T_ODS_BASE_GL GLwhere DATA_SOURCE='GL'and RK_GLCODE='40090501', and use this SQL statement to obtain the final result from the database.

[0158] Logical case 2: Sum (corporate customer information table. credit limit) | data source equals ONLINE

[0159] <+>

[0160] Total (Private Customer Information Table. Credit Limit) | Data Source Equals ONLINE

[0161] In this logic, sum() is a preset calculation function; the content after the vertical line is the screening condition; <+> can add the results of two logic segments; the corporate customer information table is the Chinese mapping name of the T_ODS_BASE_CUST_C table configured by the user in the data source management; the credit limit is the Chinese mapping name of the CREDIT_LIMIT field in the table; the data source is the Chinese mapping name of the DATA_SOURCE field in the table; the private customer information table is the Chinese mapping name of the T_ODS_BASE_CUST_P table configured by the user in the data source management; the credit limit is the Chinese mapping name of the CREDIT_LIMIT field in the table; the data source is the Chinese mapping name of the DATA_SOURCE field in the table.

[0162] This logic will eventually generate two SQL statements

[0163] Select sum(CUST.CREDIT_LIMIT) from T_ODS_BASE_CUST_C CUST where DATA_SOURCE='ONLINE';

[0164] Select sum(CUST.CREDIT_LIMIT) from T_ODS_BASE_CUST_P CUST where DATA_SOURCE='ONLINE';

[0165] Finally, add the results of the two SQL statements.

[0166] b. Report extraction management. After configuring the logic of the report, you can configure automatic extraction in this function to perform the operation of extracting the data of each report cell. You can execute the SQL generated by the above logic to obtain detailed data, and then use Java code to implement the function according to the function (such as the sum function) to calculate the detailed data. At the same time, you can also configure the scheduled task of automatic extraction according to the frequency of the report. After the configuration is completed, the task also supports manual execution. When the scheduled task is automatically executed, it will calculate the logic of each cell according to the frequency date of the report.

[0167] 5. Report processing module, including report filling, report summary and report export functions.

[0168] a. Report filling: data will be entered into the report extraction function through automatic extraction or manual extraction. Users can check and adjust the data on this page and submit the data to the review / review post after confirmation. After the review / review post confirms, the report data can be summarized, generated and reported.

[0169] b. Report summary: Users with this function can summarize the data that has been reviewed and approved by subordinate institutions. Generally, this function is given to users of top-level institutions to generate report data that ultimately needs to be reported to regulatory agencies.

[0170] c. Report export: This function generates a file in a specific format according to the requirements of different regulatory agencies, which users can download and report to the regulatory agency.

[0171] The overall process of report logic capture and report generation in the present invention is as follows:

[0172] 1. Design and configure built-in calculation functions used in financial statements, such as sum, end of previous month, monthly average, etc., and implement specific Java methods according to the functions of the functions. The functions correspond to Java methods, input the fields and screening conditions to be calculated, and output SQL statements that can adapt to different databases according to the mapping relationship between the entity table and its fields.

[0173] 2. The user configures the data table in the data source management. After the configuration is completed, the mapping relationship between the entity table and its fields is generated as a natural language dictionary item; the template is imported through the template management module and the template related parameters are configured.

[0174] 3. The user writes the logic of the report in the report logic management. For example, in the balance sheet (G0100), in cell C6 (cash in RMB), write "Add (account data table. Current RMB balance) | Data source = 'GL'; RK account = '10010000'; local and foreign currencies = '0'", and in cell D6 (cash in foreign currency converted into RMB), write "Add (account data table. Current RMB balance) | Data source = 'GL'; RK account = '10010000'; local and foreign currencies = '1'". The logic of other cells is similar.

[0175] 4. Users configure automatic report extraction tasks in report extraction management.

[0176] The specific implementation of automatic extraction involves multiple technical links, including task scheduling, SQL execution, data processing and aggregation, and result storage and display. The following is a summary implementation solution based on the Java technology stack:

[0177] 4.1. Task Scheduling

[0178] Technology selection: Use a mature task scheduling framework such as Quartz, Spring Scheduler, or a third-party scheduling service such as Apache Airflow, XXL-JOB, etc.

[0179] ·Process: Create a scheduled task and set a trigger based on the update frequency of the report (such as daily, weekly, monthly). The task scheduler will automatically trigger the data extraction process at the scheduled time.

[0180] 4.2.SQL execution and data acquisition

[0181] Technology: Use JDBC (Java Database Connectivity) or other ORM (Object-Relational Mapping) frameworks such as Hibernate and MyBatis to execute SQL statements.

[0182] ·Process: Encapsulate the SQL statements generated in the logic into executable code blocks, and execute SQL to obtain data through database connection. For the two SQL statements in this example, execute them separately and obtain the result sets.

[0183] 4.3. Data processing and aggregation

[0184] Technology: Collections framework in the Java standard library, Streams (Stream API), or third-party data processing libraries such as Apache Commons Math.

[0185] · Process: Process the result set returned by each SQL query. If the SQL has completed the aggregation operation (such as SUM), directly read the aggregate value; if detailed data is returned, use Java code to implement the necessary aggregation logic (such as traversing the result set and accumulating the value of the CREDIT_LIMIT field).

[0186] 4.4. Result storage and display

[0187] Technology: For storage, you can use a database, file system, or in-memory database (such as Redis) to temporarily store calculation results; the presentation layer can be a web application or reporting tool (such as JasperReports, ECharts integration).

[0188] · Process: Store the processed data for quick access or display later. If the report system is designed for real-time display, the calculation results can be directly passed to the front-end display layer; if it is an offline report, the results are saved and read from the storage and displayed when the user requests.

[0189] 4.5. Error handling and logging

[0190] Technology: Use Java's exception handling mechanism to capture and handle errors that may occur during execution, and combine it with a logging framework (such as log4j, slf4j+logback) to record key information and error logs.

[0191] ·Process: Ensure that there is exception capture logic in key links such as SQL execution and data processing, and record sufficient log information to facilitate problem troubleshooting.

[0192] 5. After the automatic extraction timer task is triggered, loop through the reports that need to be extracted. In a single report, loop through each cell and divide the logic in the cell into two sections by a vertical line. The first section is the behavior, and the second section is the data screening condition. Take the logic of cell C6 in the G01 report as an example. After the division, the first section is the total (account data table. Current RMB balance), and the second section is data source = 'GL'; RK account = '10010000'; local and foreign currency = '0'. Then, the mapping relationship in the natural language dictionary table is used to map and convert the first and second sections respectively. After conversion, the first segment is fun_sum(T_ODS_BASE_GL.CURR_RMB_BAL), and the second segment is T_ODS_BASE_GL.DATA_SOURCE='GL';T_ODS_BASE_GL.RK_GLCODE='10010000';T_ODS_BASE_GL.BKG_IND='0'. The fun_sum method is called through Java reflection, and the calculated fields and filter conditions are passed into the method. The return will eventually output a "select sum(GL.CURR_RMB_BAL) from T_ODS_BASE_GL GL where GL.DATA_SOURCE='GL'ANDGL.RK_GLCODE='10010000'AND BKG_IND='0'".

[0193] 6. Call the calculation method, access the database, and obtain the result of "select sum(GL.CURR_RMB_BAL)from T_ODS_BASE_GL GL where GL.DATA_SOURCE='GL'AND GL.RK_GLCODE='10010000'AND BKG_IND='0'"

[0194] 7. Finally, save the results of all cells in the report data table T_REPORT_DATA

[0195] 8. In the report filling function, the user obtains data from the report data table and renders the page, and finally displays the balance sheet data in the online Excel format. The user verifies the data (calls the regulatory inspection formula and custom verification formula configured in the system) and submits it to the review / audit post after adjustment. The review / audit post confirms the data, and the data enters the state of waiting to be summarized / exported.

[0196] 9. Users with report aggregation authority can aggregate the data to be aggregated by subordinate organizations, and then verify, submit, review, and double-check the data.

[0197] 10. Users with report export permissions can use the report export function to export files in the format required by the review regulatory agency for reporting.

[0198] Example 1

[0199] Application scenarios for automated financial report generation and analysis:

[0200] A multinational company needs to prepare consolidated financial statements regularly, involving multiple subsidiaries and different currencies, and hopes to improve the efficiency and accuracy of report preparation through automated logic. Implementation process:

[0201] 1. Data collection and standardization: Automatically extract financial data from the ERP system of each subsidiary, including but not limited to revenue, cost, assets, liabilities, etc., and ensure data format consistency through data cleaning and standardization.

[0202] 2. Automated report preparation: Design automated logic to automatically prepare balance sheets, income statements, and cash flow statements in accordance with International Financial Reporting Standards (IFRS) or local accounting standards. The system can handle multi-currency conversions and automatically adjust exchange rate differences.

[0203] 3. Key indicator analysis: While generating reports, financial ratios such as gross profit margin, net profit margin, debt-to-asset ratio, current ratio and other key performance indicators (KPIs) are automatically calculated, and trend analysis and comparison with the same industry are performed.

[0204] 4. Visual reports and early warnings: Generate interactive financial reports with charts and annotations to intuitively display financial status and operating results. Set thresholds to automatically issue early warnings for abnormal data or potential risk points to assist management in making quick decisions.

[0205] Example 2

[0206] Background of automated preparation of consolidated financial statements:

[0207] A multinational company needs to prepare consolidated financial statements regularly, involving multiple subsidiaries, different currencies and accounting standards. Manual processing is time-consuming and prone to errors. Implementation process:

[0208] 1. Design and configuration phase (step 1):

[0209] ·Report template configuration: The design team created a standardized consolidated financial report template, including the balance sheet, income statement, and cash flow statement. The template design takes into account the differences in accounting subjects of different subsidiaries, as well as the conversion requirements of accounting standards such as IFRS and GAAP.

[0210] ·Calculation function design: The development team writes Java methods to implement functions such as currency conversion, consolidation and offset, and financial ratio calculation, ensuring that these calculation logics are compatible with multiple databases such as Oracle and MySQL, and generating corresponding SQL statements.

[0211] ·Data source configuration: Configure the database connection of each subsidiary and establish entity table mapping. For example, map "Sales" to "Sales Revenue" as a natural language dictionary item to facilitate subsequent logic writing.

[0212] 2. Report logic writing and data extraction (step 2):

[0213] ·Logic writing: Financial analysts use natural language to define calculation rules in the report logic management module, such as "consolidate the sales revenue of all subsidiaries and convert them into US dollars at the current exchange rate."

[0214] Automatic extraction settings: Set automatic extraction tasks to trigger the system to extract required data from the databases of each subsidiary company at a fixed time. The system automatically executes the corresponding calculation methods and database queries by parsing natural language logic.

[0215] 3. Data generation and verification (step three):

[0216] · Calculation and storage: The system automatically fills the corresponding cells in the report template with the results of the above logical calculations and saves the calculation results to the T_REPORT_DATA table.

[0217] Data verification and adjustment: Finance department staff log in to the report filling system, view the automatically generated data, adjust the questionable data, and submit for review after completing data verification.

[0218] · Review and summary: After multiple layers of approval process, the manager with summary authority will finally summarize the data of all subsidiaries for final verification and review.

[0219] Export and reporting: After verification, the report is exported to the format specified by the regulatory agency (such as Excel, PDF), including necessary comments and notes, to complete the reporting process.

[0220] Example 3

[0221] Profit Center Performance Analysis Report Background:

[0222] The company needs to regularly analyze the performance of different profit centers to optimize resource allocation and support decision making.

[0223] 1. Configuration and logic definition:

[0224] ·Configure data tables related to profit centers and design calculation functions to calculate key indicators such as gross profit and operating profit margin.

[0225] Define analytical logic through natural language, such as "calculate the gross profit of each profit center's monthly revenue minus costs, and compare the rate of change from the previous month."

[0226] 2. Data capture and processing:

[0227] Set up automatic tasks, and the system will automatically capture sales, cost and other data, use natural language parsing logic, and call corresponding calculation functions for data analysis.

[0228] 3. Report generation and decision support:

[0229] The generated reports not only display the performance data of each profit center, but also include trend analysis and outlier annotation, helping management to quickly identify areas of outstanding performance or areas for improvement.

[0230] ·Users can adjust data in the report filling module, such as correcting erroneous records, and then go through the review and summary process to ensure the accuracy of the data.

[0231] The final report can be exported in PPT or PDF format to facilitate sharing and discussion in management meetings, directly supporting strategic decision-making.

[0232] The above scenarios all demonstrate how to apply the above invention to actual financial statement processing, significantly improving the efficiency and accuracy of statement preparation, while also enhancing the depth and breadth of data analysis.

[0233] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the present invention, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the attached claims.

Claims

1. A report logic capture and report generation method, characterized in that: The method comprises the following steps: Step 1: Design and configure the calculation function for the report, configure the report template and data source, and establish the report framework and data structure; Step 2: Use natural language to write report logic, parse the report logic and configure automatic extraction tasks to obtain corresponding data from the database; Step 3: Generate report data based on user-defined logic. Users can verify and adjust data through the report filling function. After completion, they can review and summarize the data and export the report in the required format.

2. The method according to claim 1, characterized in that In step one, design the built-in calculation function for the report, implement the corresponding Java method, and generate SQL statements adapted to different databases; configure the data table to generate the mapping relationship between the entity table and its fields as a natural language dictionary item; import the report template and configure the report template related parameters.

3. The method according to claim 2, characterized in that Implementing the corresponding Java method refers to writing Java code to implement the pre-designed built-in calculation function, ensuring that the built-in calculation function can interact with different database systems, integrating the built-in calculation function into the report system, and facilitating the user to call it when defining the report logic for processing the report logic; According to the report logic defined by the user, dynamic SQL generation technology is used to be compatible with different database systems and automatically generate SQL query statements that are suitable for different database systems; the query statements include paging, joins, and aggregation functions.

4. The method according to claim 1, characterized in that In step 2, the user writes the report logic in the report logic management module, and uses natural language to write calculation rules and data screening conditions; the user configures the automatic extraction task of the report; after the automatic extraction scheduled task is triggered, the system loops through the reports to be extracted, parses the logic of each cell through keyword matching, logical relationships and context dependency understanding, and converts through the mapping relationship in the natural language dictionary table, calls the calculation method and accesses the database; Pre-built vocabulary and grammar models for mapping user input to calculation logic and database queries.

5. The method according to claim 1, characterized in that In step 3, the calculation results of the cells are saved in the report data table T_REPORT_DATA; the user obtains the data in the report filling function and verifies and adjusts it. After submitting for review and confirmation, the data enters the state of waiting for aggregation / export; Users with report summary authority can summarize the data to be summarized by subordinate institutions, and then verify, submit, review and recheck; Users with report export permissions can use the report export function to export files in the format required by the review regulatory agency for submission.

6. A system for implementing the method according to any one of claims 1 to 5, characterized in that: The system includes: a report configuration module, a verification management module, a data management module, an automated report management module, and a report processing module; The report configuration module further includes a template import module and a template management module; external reports are imported into the system based on the template, and the report templates are managed; The report configuration module is configured with one or more report templates, and the standard Excel reports required by the regulatory agency and the user-defined Excel reports are imported through the report templates; The verification management module can configure verification formulas for reports, which are used for verification within the report and verification between reports. The verification formula includes a regulatory verification formula and a custom verification formula; The data management module further includes a database management module and a data source management module, which are used to configure database connections and create mapping relationships between fields and condition fields in the data table; The automated report management module further includes a report logic management module and a report extraction management module; The report logic management module is used to write and manage data processing logic and configure report logic; The report extraction management module is used to set the report extraction function, and calculate the logic of each cell according to the frequency date of the report according to the set report extraction function; The report processing module further includes a report filling module, a report summary module, and a report export module; which are used to verify and adjust report data, summarize one or more report data, and generate corresponding reports for uploading or exporting.

7. The system according to claim 6, characterized in that In the report configuration module, the report template includes report frequency, caliber, currency unit, and version number information; In the verification management module, the intra-table verification refers to the data to be verified coming from the same report, and the inter-table verification refers to the data to be verified coming from different reports, and the verification is performed across tables; In the data management module, the fields include numerical fields for subsequent report logic calculations; and the conditional fields are used for data screening in the report logic.

8. Application of the method according to any one of claims 1 to 5, or the system according to claims 6 and 7, in report supervision submission, enterprise financial report preparation, and business performance analysis.

9. A hardware system for implementing the method according to any one of claims 1 to 5, characterized in that: The hardware system comprises: a memory and a processor; a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Report generation method and system for multi-source data fusion

    CN119476233A

  • Reasonable drug use report generation method and system combined with artificial intelligence

    CN119940322A

  • A method and system for generating a rational drug use report combined with artificial intelligence

    CN119940322B

  • Profit report generation method and system

    CN120723227A

  • Cross-border accounting compliance processing system based on federated learning and trusted computing

    CN120952992A