Method, system and terminal for realizing dynamic report generation through visual configuration

By using visual configuration and automatic parameter processing of dual engines, it solves the problems of low development efficiency, parameter matching difficulties and insufficient support for complex reports in the reporting system, and achieves efficient and accurate dynamic report generation, supporting enterprise-level multi-source data integration and real-time analysis applications.

CN121009129APending Publication Date: 2025-11-25SHENZHEN AISHIDA INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511084852.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing reporting systems suffer from low development efficiency, difficulty in adapting stored procedures, and insufficient support for complex reports. They also lack a unified mechanism for automated parameter processing and a collaborative table rendering system.

Method used

Dynamic report generation is achieved through visual configuration, with automatic parameter processing using dual engines. Placeholders are replaced in SQL mode, and parameter names are standardized and matched with edit distance algorithm in stored procedure mode. Multiple tables are rendered independently and script extensions are supported.

Benefits of technology

It improves development efficiency by 81%, achieves parameter matching accuracy exceeding 99%, supports complex reports and list association, enables configurations to take effect in real time, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009129A_ABST
    Figure CN121009129A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system and a terminal for generating a dynamic report through visual configuration, and the method comprises the following steps: metadata configuration: defining a report name and a code through a visual interface, and establishing a mapping relation between a query condition attribute name and a display name; engine binding is executed, wherein an SQL mode and a storage process mode are included; the SQL mode comprises the step of automatically replacing an SQL script containing an attribute name placeholder with an actual parameter value; the storage process mode comprises the steps of performing standardization processing on an interface attribute name and a storage process parameter name, and matching parameters by adopting an editing distance algorithm allowing 1-2 character differences; and multi-table rendering: independently rendering the master table and the slave table according to the bound query result serial number, and configuring a column display rule and an exclusive script. According to the method, the development efficiency and the parameter matching accuracy are improved, and complex structures such as listing are supported; configuration takes effect in real time, and the operation and maintenance cost of restarting service in a traditional scheme can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing and report generation, and particularly relates to a method, system and terminal for realizing dynamic report generation through visual configuration. BACKGROUND

[0002] At present, the existing report system has three bottlenecks:

[0003] (1) Low development efficiency: the traditional tool needs to manually write an SQL template, and needs to be recompiled and deployed when modified, and the average time consumption is more than 3 days, and 8 people are needed for a single report;

[0004] (2) Difficult storage process adaptation: the report needs to manually maintain a parameter mapping table when calling the storage process, and the matching error rate is more than 30% due to the difference in parameter name case and underscore (such as interface property user_name and storage process UserName);

[0005] (3) Insufficient support for complex reports: multi-table reports need to be hard-coded to assemble data in the backend, and mainstream solutions (such as sailsoft) cannot guarantee the consistency of master-slave table data.

[0006] Therefore, it is necessary to provide a method, system and terminal for realizing dynamic report generation through visual configuration to overcome the above-mentioned defects. SUMMARY

[0007] The present application aims to provide a method, system and terminal for realizing dynamic report generation through visual configuration, which aims to solve the problem that the current report generation system lacks a unified parameter automatic processing mechanism and table collaborative rendering system, improve development efficiency, reduce error rate, and support complex reports.

[0008] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for realizing dynamic report generation through visual configuration, comprising:

[0009] Step S10, metadata configuration: defining the report name and code through a visual interface, and establishing a mapping relationship between the query condition attribute name and the display name;

[0010] Step S20, execution engine binding, including SQL mode and storage process mode; wherein the SQL mode includes automatically replacing the SQL script containing the attribute name placeholder with the actual parameter value; the storage process mode includes standardizing the interface attribute name and the storage process parameter name, and matching the parameters by using an edit distance algorithm allowing 1-2 character differences;

[0011] Step S30, multi-table rendering: independently rendering the master table and the slave table according to the bound query result serial number, configuring the column display rule and the exclusive script.

[0012] In one preferred embodiment, the method further comprises:

[0013] Step S40, script extension: injecting pagination control and data encryption logic through open API.

[0014] In one preferred embodiment, the edit distance algorithm for matching the stored procedure mode parameters satisfies the following formula:

[0015] d(a,b) = min{d(a-1,b)+1,d(a,b-1)+1,d(a-1,b-1)+cost};

[0016] When the last characters are the same, cost = 0, otherwise cost = 1; when d(a,b) ≤ 1, it is determined that the match is successful, where d(a,b) represents the edit distance of the two strings after standardization, and a and b are the lengths of the interface attribute name and the stored procedure parameter name.

[0017] In one preferred embodiment, the implementation steps of the edit distance algorithm include:

[0018] Removing the underscores of the input strings and converting them to lowercase;

[0019] Calculating the Levenshtein distance of the two strings, and if the edit distance is less than or equal to 1, establishing a parameter mapping relationship.

[0020] In one preferred embodiment, in the step S30, a dynamic filtering condition is configured for the slave table: WHERE{master table field} = {master table.selected_value}, and the implementation steps include:

[0021] Querying the result serial number in the master table bound in the configuration layer; setting a condition expression parser for the slave table to capture the master table selected row data in real time; replacing the expression with the actual value before executing the slave table query.

[0022] In one preferred embodiment, the script extension includes asynchronous data encryption: calling registerEncryptHandler(field, algorithm) to register the encryption function, which is automatically triggered when the data is rendered, and the specific implementation steps include:

[0023] Injecting the encryption script in the extension layer; binding to the target field; automatically executing the encryption before the API is called in the rendering layer. The second aspect of the present application provides a system for generating dynamic reports through visual configuration, comprising:

[0024] A configuration layer for providing a report metadata definition interface, including name and code entry, query condition attribute name and display name mapping configuration, and multi-table query sequence index binding;

[0025] an execution engine layer for executing a user-selected SQL mode or a stored procedure mode; wherein in the SQL mode, script placeholders are automatically replaced by actual parameter values; and in the stored procedure mode, intelligent matching is achieved through parameter name standardization and an edit distance algorithm;

[0026] a rendering layer for independently rendering master table and slave table data according to a query sequence index bound by the configuration layer, and mounting script events; wherein each table can be independently configured to display columns and bind exclusive interactive scripts.

[0027] In a preferred embodiment, the system further comprises:

[0028] an extension layer for opening an API interface including data operation classes, event interception classes and interface control classes.

[0029] The third aspect of the present application provides a terminal, which comprises a memory, a processor and a computer program stored in the memory, and the computer program, when executed by the processor, implements each step of the method for generating a dynamic report through visual configuration according to any one of the above embodiments.

[0030] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements each step of the method for generating a dynamic report through visual configuration according to any one of the above embodiments.

[0031] The fifth aspect of the present application provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions, when executed by a processor, implement each step of the method for generating a dynamic report through visual configuration according to any one of the above embodiments.

[0032] The method, system and terminal for generating a dynamic report through visual configuration provided by the present application implement automatic processing through a double-engine parameter: in the SQL mode, a user-input #{start_date} placeholder is replaced by an actual value (such as '2025-01-01'), avoiding manual splicing; in the stored procedure mode, standardized processing is implemented, i.e., underscores are uniformly removed and converted to lowercase (such as user_name→username);

[0033] Meanwhile, the method also implements an edit distance algorithm, allowing a 1-2 character difference (such as the edit distance of username and usrname is 1), thereby achieving fuzzy matching; in addition, multi-table decoupling rendering is also implemented, rendering targets are allocated according to query result sequence numbers, so that each table is independently bound to a script event.

[0034] The present application has the following effects:

[0035] (1) Development efficiency is improved by 81%: from 8 people in the traditional scheme to 1.5 people;

[0036] (2) Parameter matching accuracy rate breaks 99%: intelligent fault-tolerant algorithm solves the historical matching problem;

[0037] (3) Parallel table association: support for parallel table structure;

[0038] (4) Configuration takes effect in real time: avoid the operation and maintenance cost of restarting the service in the traditional scheme. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, it should be understood that the following drawings only show some embodiments of the present application, therefore should not be regarded as a limitation on the scope, for those skilled in the art, without creative labor, other related drawings can also be obtained according to these drawings.

[0040] Figure 1 The framework diagram of the system for realizing dynamic report generation through visual configuration provided by the present application;

[0041] Figure 2 The flowchart of the method for realizing dynamic report generation through visual configuration provided by the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical scheme and beneficial technical effects of the present application more clear and clear, the following will be further described in detail in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described in the specification are only for the purpose of explaining the present application, and are not intended to limit the present application.

[0043] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0044] It should be further understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0045] Embodiment one

[0046] In the embodiments of the present application, the present application provides a system 100 for realizing dynamic report generation through visual configuration, which forms a complete technical closed loop through double-engine dynamic routing, parameter fault-tolerant algorithm, master-slave table linkage and extensible script, and fully covers the efficiency, accuracy and flexibility requirements of enterprise-level report system.

[0047] As shown in Figure 1 The system 100 for realizing dynamic report generation through visual configuration is divided into four layers for cooperative work, including a configuration layer 10, an execution engine layer 20, a rendering layer 30 and an extension layer 40.

[0048] The configuration layer 10 is configured to provide a report metadata definition interface, including name and code entry, query condition attribute name and display name mapping configuration, and multi-table query sequence index binding.

[0049] The execution engine layer 20 is configured to execute a SQL mode or a stored procedure mode selected by a user.

[0050] In the SQL mode, the script placeholder is automatically replaced by an actual parameter value, and the SQL script with the placeholder input by the user is automatically converted into an executable statement, and the built-in syntax check is used to prevent error propagation. In the stored procedure mode, intelligent matching is realized through parameter name standardization (removal of underscores and uniformity of case) and edit distance algorithm (allowing 1-2 character differences, and preferably configured to allow 1 character difference), and the matching accuracy is more than 99%.

[0051] The rendering layer 30 is configured to independently render master table and slave table data according to the query sequence index bound by the configuration layer, and mount script events. For example, the first query result is mapped to the master table, and the second query result is mapped to the slave table, and each table can be independently configured to display columns and bind exclusive interactive scripts.

[0052] The extension layer 40 is configured to open API interfaces, open page data acquisition, export interception and other API interfaces, and the API interfaces include data operation classes (current page data set acquisition, full data export), event interception classes (export pre-processing, page jump callback) and interface control classes (dynamic modification of table DOM elements, addition of custom buttons). For example, the page control is set to set the data page parameters, and the script example is registered to realize data desensitization or encryption setting data page parameters.

[0053] Embodiment two

[0054] The present application provides a method for realizing dynamic report generation through visual configuration, which forms a complete technical closed loop through double-engine dynamic routing, parameter fault-tolerant algorithm, master-slave table linkage and extensible script, and fully covers the efficiency, accuracy and flexibility requirements of enterprise-level report system.

[0055] As shown inFigure 2 As shown, the method for dynamic report generation through visual configuration comprises steps S10-S30.

[0056] Step S10, metadata configuration: define report name and coding through visual interface, and establish mapping relationship between query condition attribute name (such as start_date) and display name (such as "statistical start date").

[0057] Step S20, execution engine binding, including SQL mode and stored procedure mode. The SQL mode includes automatic replacement of SQL script containing attribute name placeholder (such as #{prop}) with actual parameter value, avoiding manual coding. The stored procedure mode includes standardized processing of interface attribute name and stored procedure parameter name (for example, removing underscore / unifying lowercase), matching parameters by using edit distance algorithm allowing 1-2 character difference (preferably allowing 1 character difference), and realizing fault-tolerant matching. The development efficiency can be improved by 81% (8 people to 1.5 people), the matching fault-tolerant threshold is defined mathematically, and the parameter matching accuracy is >99%.

[0058] Further, the executable engine selector: automatically recommends the stored procedure mode based on the SQL script complexity (such as nested level >3 or JOIN table >2).

[0059] Step S30, multi-table rendering: independently render the main table and the sub-table according to the bound query result sequence number, specify the query result sequence number bound to each table (such as the main table bound to the first query and the sub-table bound to the second query), configure column display rules and exclusive scripts, and realize consistency of complex report data through real-time expression analysis.

[0060] Further, the method further comprises: step S40, script extension: inject page control and data encryption logic through open API.

[0061] In one embodiment, the edit distance algorithm for parameter matching of the stored procedure mode satisfies the following formula:

[0062] d(a,b) = min{d(a-1,b)+1,d(a,b-1)+1,d(a-1,b-1)+cost};

[0063] When the last characters are the same, cost = 0, otherwise cost = 1; when d(a,b) ≤1, it is determined that the matching is successful, wherein d(a,b) represents the edit distance of the two strings after standardization, and a and b are the lengths of the interface attribute name and the stored procedure parameter name.

[0064] Further, the implementation steps of the edit distance algorithm include: removing the underscores of the input string and converting it to lowercase; calculating the Levenshtein distance of the two strings, and if the edit distance is less than or equal to 1, establishing a parameter mapping relationship. Wherein, the calculation of the Levenshtein distance can be realized by the following python code:

[0065] if len(a) == 0: return len(b) if len(b) == 0: return len(a)

[0066] cost = 0 if a[-1] == b[-1] else 1 return min(edit_distance(a[:-1], b) + 1,

[0067] edit_distance(a, b[:-1]) + 1,

[0068] edit_distance(a[:-1], b[:-1]) + cost).

[0069] In one embodiment, in step S30, the dynamic filtering condition from the table configuration is WHERE {master table field} = {master table.selected_value}, and the implementation steps include:

[0070] Query the result sequence number (such as result[0]) in the master table bound in advance in the configuration layer; set the condition expression parser for the slave table, and capture the master table selected row data in real time; replace the expression with the actual value (such as order_id = 1001) before executing the slave table query.

[0071] In one embodiment, the script extension includes asynchronous data encryption: register the encryption function by calling registerEncryptHandler(field, algorithm), and automatically trigger it when rendering data, and the specific implementation steps include: injecting encryption scripts in the extension layer; bind to the target field (such as bank_card); automatically execute encryption before the rendering layer calls the API.

[0072] Wherein, the encryption script injected in the extension layer can be realized by the following js code:

[0073] function encryptHandler(data) {return AES.encrypt(data, secret_key);}.

[0074] Specifically, for example, the js code of the asynchronous data encryption API can be: registerEncryptHandler(field, algorithm='AES-256'); and the js code of the real-time calculation column API can be: addComputed-Column(tableId, formula='price*quantity').

[0075] Embodiment Three

[0076] The present application provides a terminal, comprising a memory, a processor and a computer program stored in the memory, the computer program is executed by the processor to realize the steps of the method for generating dynamic report by visual configuration according to any one of the above embodiments.

[0077] Embodiment Four

[0078] The present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is executed by the processor to realize the steps of the method for generating dynamic report by visual configuration according to any one of the above embodiments.

[0079] Embodiment Five

[0080] The fifth aspect of the present application provides a computer program product, comprising a computer program or instructions, the computer program or instructions are executed by the processor to realize the steps of the method for generating dynamic report by visual configuration according to any one of the above embodiments.

[0081] In summary, the present application realizes automatic processing of double-engine parameters: in the SQL mode, the user input placeholder #{start_date} is replaced by the actual value (such as '2025-01-01'), avoiding manual splicing; in the stored procedure mode, standardized processing is implemented, that is, the underscores are uniformly removed and converted to lowercase (such as user_name→username);

[0082] At the same time, the present application also implements the edit distance algorithm, allowing 1-2 character differences (such as the edit distance of username and usrname is 1), thereby realizing fuzzy matching; in addition, multi-table decoupling rendering is also implemented, and the rendering target is allocated according to the query result serial number, so that each table is independently bound to a script event.

[0083] The present application has the following effects:

[0084] (1) Development efficiency is improved by 81%: from 8 people for a single report in the traditional scheme to 1.5 people;

[0085] (2) Parameter matching accuracy rate breaks through 99%: intelligent fault-tolerant algorithm solves the historical matching problem;

[0086] (3) Parallel list association: support for parallel list and other structures;

[0087] (4) Real-time configuration takes effect: Avoid the operation and maintenance cost of traditional solution restart service.

[0088] Therefore, the above technical solutions can cover four core scenarios:

[0089] I. Enterprise-level multi-source data integration: support unified report building across databases and API services;

[0090] II. Zero-code development requirements: replace traditional coding with interface operation to reduce report development technical threshold;

[0091] III. High scalability business support: Provide script engine to realize data encryption, asynchronous loading and other customized function injection;

[0092] IV. Real-time analysis application: Dual-execution engine dynamic adaptation capability meets real-time report scenarios such as financial transactions and logistics tracking.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the system is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically independent, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific name of each functional unit and module is only for easy distinction, and does not limit the protection scope of the present application. The specific working process of the unit and module in the above system can be referred to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0094] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.

[0095] Those skilled in the art can understand that the units and method steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0096] In the embodiments of the present application, it should be understood that the disclosed system or device / terminal equipment and method can be implemented in other ways. For example, the above-described system or device / terminal equipment embodiments are merely illustrative. For example, the division of the modules or units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, and can be electrical, mechanical or in other forms.

[0097] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0098] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0099] The present application is not limited to the description and embodiments described in the specification, and therefore those skilled in the art can easily implement other advantages and modifications, and therefore the present application is not limited to specific details, representative devices and examples of the drawings shown and described herein. The spirit and scope of the general concept defined by the claims and their equivalents are not limited.

Claims

1. A method for dynamic report generation through visual configuration, characterized in that, Comprise: Step S10, metadata configuration: define report name and code through visual interface, and establish mapping relationship between query condition attribute name and display name; Step S20, execution engine binding, including SQL mode and stored procedure mode; wherein, the SQL mode includes automatically replacing SQL script containing attribute name placeholder with actual parameter value; the stored procedure mode includes standardizing interface attribute name and stored procedure parameter name, and matching parameters by using edit distance algorithm allowing 1-2 character difference; Step S30, multi-table rendering: independently rendering main table and sub-table according to bound query result sequence number, and configuring column display rule and exclusive script.

2. The method for dynamic report generation through visual configuration of claim 1, wherein, Further comprise: Step S40, script extension: injecting paging control and data encryption logic through open API.

3. The method for dynamic report generation through visual configuration as claimed in claim 1 wherein, The edit distance algorithm of the stored procedure mode parameter matching satisfies the following formula: d(a,b) = min{d(a-1,b)+1,d(a,b-1)+1,d(a-1,b-1)+cost}; When the last character is the same, cost = 0, otherwise cost = 1; when d(a,b) ≤ 1, it is judged that the matching is successful, wherein d(a,b) represents the edit distance of the two standardized strings, and a and b are the lengths of the interface attribute name and the stored procedure parameter name.

4. The method for dynamic report generation through visual configuration of claim 3, wherein, The implementation steps of the edit distance algorithm include: Removing the underscores of the input strings and converting them to lowercase; Calculating the Levenshtein distance of the two strings, if the edit distance is less than or equal to 1, the parameter mapping relationship is established.

5. The method for dynamic report generation through visual configuration as claimed in claim 1 wherein, In the step S30, the dynamic filtering condition is configured for the sub-table: WHERE{main table field}={main table.selected_value}, the implementation steps include: Querying the result sequence number in the bound main table in the configuration layer; setting condition expression parser for the sub-table, capturing the main table selected row data in real time; replacing the expression with actual value before executing the sub-table query.

6. The method for dynamic report generation through visual configuration as claimed in claim 2 wherein, The script extension includes asynchronous data encryption: calling registerEncryptHandler(field, algorithm) to register encryption function, which is automatically triggered during data rendering, and the specific implementation steps include: Injecting encryption script in the extension layer; binding to the target field; automatically executing encryption before calling API in the rendering layer.

7. A system for dynamic report generation through visual configuration, characterized by, Comprise: The configuration layer is used for providing a report metadata definition interface, including name and code input, query condition attribute name and display name mapping configuration, and multi-table query sequence index binding; The execution engine layer is used for executing the SQL mode or the stored procedure mode selected by a user; wherein, in the SQL mode, script placeholders are automatically replaced with actual parameter values; in the stored procedure mode, intelligent matching is realized through parameter name standardization and edit distance algorithm; The rendering layer is used for independently rendering main table and sub-table data according to the query sequence index bound by the configuration layer, and mounting script events; wherein, each table can be independently configured to display columns and bind exclusive interaction scripts.

8. The system for dynamic report generation through visual configuration of claim 7, wherein, Further comprise: The extension layer is used for opening API interfaces, and the API interfaces include data operation classes, event interception classes and interface control classes.

9. A terminal, characterized by comprising: The terminal comprises a memory, a processor, and a computer program stored in the memory, which, when executed by the processor, implements the steps of the method for generating dynamic reports through visual configuration according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for generating dynamic reports through visual configuration according to any one of claims 1-8.