Report generation method and related device

By obtaining and parsing report generation information, querying table name and column name mapping tables, and generating and executing report generation statements, the problems of poor flexibility in existing report generation methods and high dependence on database resources are solved, and flexible report generation and performance improvements are achieved.

CN119669266APending Publication Date: 2025-03-21CHINA CONSTR BANK CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853500.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing report generation methods are poor in flexibility, difficult to meet the needs of actual applications, and have high dependence on database resources, resulting in performance bottlenecks.

Method used

By obtaining report generation information, including data processing logic, the table name of the target original report and the column name of the target original column, query the preset table name and column name mapping table, generate report generation statements and execute to generate the result report.

Benefits of technology

It realizes improving the flexibility of report generation, reducing database memory pressure, improving system performance, and more flexibly meeting business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669266A_ABST
    Figure CN119669266A_ABST
Patent Text Reader

Abstract

The invention discloses a report generation method and a related device, and relates to the technical field of big data, and the method comprises the steps: obtaining report generation information, querying a preset table name mapping table based on a table name of a target original report, and obtaining a table parameter identifier of the target original report; and querying a preset column name mapping table based on the column name of the target original column, and obtaining a column parameter identifier of the target original column. And generating a report generation statement based on the data processing logic, the table parameter identifier of the target original report and the column parameter identifier of the target original column. And executing the report generation statement to generate a result report. According to the report generation method, the user-defined report generation rule in the report generation information is analyzed, the user-defined rule is converted into the recognizable report generation statement, and the result report meeting the user-defined rule is generated based on the report generation statement, so that the flexibility of report generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a report generation method and related devices. Background Art

[0002] With the continuous advancement of the construction of intensive operation system, the products of intensive operation platform are constantly enriched, and the key indicator data of key products and business processes are urgently needed to support management decision-making. Therefore, in the banking system, data extraction, statistics, and classification are realized by generating various reports to facilitate the visualization of key indicator data of key products and business processes.

[0003] The current report generation method is limited to using pre-configured fixed generation rules, which has poor flexibility and is difficult to meet the report generation needs in actual applications. Summary of the invention

[0004] In view of the above problems, the present application provides a report generation method and related devices to achieve the purpose of improving the flexibility of report generation. The specific scheme is as follows:

[0005] The first aspect of the present application provides a report generation method, comprising:

[0006] Acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column;

[0007] Based on the table name of the target original report, query a preset table name mapping table to obtain a table parameter identifier of the target original report, wherein the table name mapping table is used to record the correspondence between the preset table name of the original report and the table parameter identifier;

[0008] Based on the column name of the target original column, a preset column name mapping table is queried to obtain a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier;

[0009] Generate a report generation statement based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column;

[0010] Execute the report generation statement to generate a result report.

[0011] In a possible implementation, the report generation method further includes:

[0012] Receive an upload request for an original report identified by a table name;

[0013] Parse the original report to obtain the column name of each original column in the original report;

[0014] Using the table parameter identifier as the table identifier and the column parameter identifier as the column identifier, storing each original report in a preset database;

[0015] Record the table name and the table parameter identifier in correspondence with each other in the first preset relationship table to obtain a table name mapping table;

[0016] The column names and column parameter identifiers are recorded correspondingly in the second preset relationship table to obtain a column name mapping table.

[0017] In a possible implementation, the data processing logic includes at least one basic logic, wherein the basic logic includes statistical operations and detailed operations;

[0018] The generating a report generation statement based on the data processing logic, the table parameter identifier of the target original report and the column parameter identifier of the target original column includes:

[0019] Parsing the data processing logic to obtain table parameter identifiers and column parameter identifiers corresponding to each target basic logic;

[0020] Obtaining a statement template corresponding to the target basic logic;

[0021] Filling the table parameter identifier and the column parameter identifier corresponding to the target basic logic into the statement template corresponding to the target basic logic to obtain a target statement for executing the target basic logic;

[0022] According to the logical relationship between each of the target basic logics in the data processing logic, each of the target statements is combined to obtain the report generation statement.

[0023] In a possible implementation, the report generation method further includes: storing the data processing logic and the logic operation result identifier in a preset rule table in correspondence;

[0024] The obtaining of report generation information includes:

[0025] Receiving a report generation request sent by a requester, the report generation request including an identifier of a result data item, a table name of the target original report, and a column name of the target original column;

[0026] Based on the identifier of the result data item, a preset rule table is queried to obtain the data processing logic.

[0027] In a possible implementation, the report generation information further includes a report export rule, and the report export rule includes a data export logic;

[0028] The method further comprises:

[0029] Based on the data export logic, generating a data export instruction, the data export instruction comprising a data export statement that executes the data export logic;

[0030] Execute the data export statement, obtain the target report based on the result report and export it.

[0031] A second aspect of the present application provides a report generation device, comprising:

[0032] A generation information acquisition unit, used to acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column;

[0033] A table identifier acquisition unit, configured to query a preset table name mapping table based on the table name of the target original report to acquire a table parameter identifier of the target original report, wherein the table name mapping table is used to record a correspondence between a preset table name of the original report and a table parameter identifier;

[0034] A column identifier acquisition unit, used to query a preset column name mapping table based on the column name of the target original column to acquire a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier;

[0035] A statement generating unit, configured to generate a report generating statement based on the data processing logic, a table parameter identifier of the target original report and a column parameter identifier of the target original column;

[0036] The result report generating unit is used to execute the report generating statement to generate a result report.

[0037] In a possible implementation, the report generating device further includes:

[0038] The original table storage unit is used to receive an upload request of an original report identified by a table name; parse the original report to obtain the column name of each original column in the original report; store each original report in a preset database using a table parameter identifier as a table identifier and a column parameter identifier as a column identifier;

[0039] A first relationship table storage unit is used to record the table name and the table parameter identifier in a first preset relationship table in correspondence to obtain a table name mapping table;

[0040] The second relational table storage unit is used to record the column names and column parameter identifiers in the second preset relational table in correspondence to obtain a column name mapping table.

[0041] A third aspect of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the report generation method of the first aspect or any implementation of the first aspect.

[0042] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0043] The memory is used to store computer programs;

[0044] The processor is used to execute the computer program so that the electronic device can implement the report generation method of the first aspect or any implementation manner of the first aspect.

[0045] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can generate a report according to the first aspect or any implementation method of the first aspect.

[0046] By means of the above technical solution, the present application provides a report generation method and related device, which obtains report generation information, the report generation information includes report generation rules, and the report generation rules include data processing logic, the table name of the target original report, and the column name of the target original column. Based on the table name of the target original report, a preset table name mapping table is queried to obtain the table parameter identifier of the target original report, and the table name mapping table is used to record the correspondence between the table name and the table parameter identifier of the preset original report. Based on the column name of the target original column, a preset column name mapping table is queried to obtain the column parameter identifier of the target original column, and the column name mapping table is used to record the correspondence between the column name and the column parameter identifier of the preset original column. A report generation statement is generated based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column. The report generation statement is executed to generate a result report. By parsing the custom report generation rules in the report generation information, the custom rules are converted into recognizable report generation statements, and a result report that meets the custom rules is generated based on the report generation statement, thereby improving the flexibility of report generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0048] Figure 1 A schematic diagram of the report generation system architecture provided for this application;

[0049] Figure 2 A schematic diagram of the hardware structure of a terminal provided in this application;

[0050] Figure 3 A schematic diagram of the hardware structure of a server provided for this application;

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

[0052] Figure 5 A structural diagram of a report generation system provided in an embodiment of the present application

[0053] Figure 6 A specific implementation flow chart of a report generation system provided in an embodiment of the present application;

[0054] Figure 7 A structural diagram of a report generation device provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0057] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0058] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0059] At present, the traditional report generation method is to first extract data from the database, and then use fixed templates and preset calculation logic to generate reports. This process often requires a large number of intermediate results or final reports to be stored in the database for subsequent analysis or reference. On the one hand, this method is limited to fixed report templates and calculation logic, and has poor flexibility. On the other hand, as the amount of data grows, it will lead to excessive consumption of database memory, affecting the overall performance of the system.

[0060] For example, the existing report generation method uses a pre-configured report engine combined with a database query, and the specific steps are as follows:

[0061] 1. Data extraction: First, extract the required data from the database according to the preset SQL query statement. The query statement targets different data tables and fields to meet specific reporting requirements.

[0062] 2. Data transformation and aggregation: The extracted data will be further processed, for example, data cleaning, data type conversion, and necessary aggregation operations (such as summation, average, etc.) to form the basic elements of the report.

[0063] 3. Report rendering: After completing data processing, the report engine will convert the processed data into a visual report format according to the pre-set template and style parameters. This process involves complex layout adjustments and chart generation.

[0064] 4. Report display and storage: Visualize reports for front-end viewing. At the same time, store report result data in a database or other persistent storage medium for query.

[0065] Existing report generation methods are highly dependent on database resources. Frequent data reading and storage operations can easily lead to performance bottlenecks, especially when faced with massive amounts of data. In addition, once the report generation rules are fixed, it is difficult to adapt to changing business needs, resulting in the use of preset statistical methods to generate reports, which limits the depth and breadth of data analysis. A large amount of intermediate data or pre-calculated results need to be stored in order to quickly respond to user query requests. This not only takes up valuable database space, but may also increase the burden on the server, resulting in resource waste and low operating efficiency. Due to the need to extract information from a large amount of raw data and perform complex calculations, the traditional report generation process is usually time-consuming and difficult to achieve true real-time updates.

[0066] In summary, the existing report generation methods applied to big data scenarios still have certain limitations in terms of high performance requirements and flexible customization requirements.

[0067] Based on this, an embodiment of the present application provides a report generation method. The present application can be applied to the field of big data technology, and specifically can be applied to scenarios for custom generation of various types of reports. A report generation method provided in an embodiment of the present application can be applied to a report generation system, and the report generation method can be implemented through a terminal or a server in the report generation system, or the report generation method can be implemented through the interaction between a terminal and a server in the report generation system.

[0068] See also Figure 1 , Figure 1 A schematic diagram of a report generation system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0069] Among them, a query application can be installed on the terminal 100, and the above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the query interface and send the above parameters to the server 200. The server 200 can obtain processing results based on the received parameters and return the processing results to the terminal 100.

[0070] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.

[0071] Next describe Figure 1 The product form of the mid-terminal 100;

[0072] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0073] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0074] refer to Figure 2As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0075] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0076] Among them, the input device 132 can receive input data and the like.

[0077] The display unit 140 can be used to display information input by the user or provided to the user, various menus of the terminal 100, interactive interfaces, file display and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 can be used to display the interface of report generation, processing results, etc.

[0078] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0079] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0080] The memory 120 may be used to store software codes related to the report generation method, the processor 170 may execute the steps of the report generation method, and may also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.

[0081] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0082] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0083] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0084] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0085] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0086] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0087] Next describe Figure 1 The product form of the server 200;

[0088] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0089] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0090] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0091] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0092] The memory 204 may be used to store software codes related to the report generation method, and the processor 202 may execute the steps of the report generation method of the chip, and may also schedule other units to implement corresponding functions.

[0093] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0094] In order to solve the above problems, the embodiment of the present application provides a report generation method, the purpose of which is to improve the flexibility of report generation and reduce database memory pressure. The report generation method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0095] Reference Figure 4 , Figure 4 A flow chart of a report generation method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, a report generation method provided in an embodiment of the present application may include the following steps:

[0096] S401: Obtain report generation information.

[0097] In this embodiment, the report generation information includes report generation rules, and the report generation rules include data processing logic, the table name of the target original report, and the column name of the target original column;

[0098] S402: Based on the table name of the target original report, query a preset table name mapping table to obtain a table parameter identifier of the target original report.

[0099] In this embodiment, the table name mapping table is used to record the correspondence between the table name of the preset original report and the table parameter identifier;

[0100] S403: query a preset column name mapping table based on the column name of the target original column to obtain a column parameter identifier of the target original column.

[0101] In this embodiment, the column name mapping table is used to record the correspondence between the column name of the preset original column and the column parameter identifier;

[0102] S404: Generate a report generation statement based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column.

[0103] S405: Execute the report generation statement to generate a result report.

[0104] As can be seen from the above technical solution, a report generation method provided by an embodiment of the present application obtains report generation information, the report generation information includes report generation rules, and the report generation rules include data processing logic, the table name of the target original report, and the column name of the target original column. Based on the table name of the target original report, a preset table name mapping table is queried to obtain the table parameter identifier of the target original report, and the table name mapping table is used to record the correspondence between the table name and the table parameter identifier of the preset original report. Based on the column name of the target original column, a preset column name mapping table is queried to obtain the column parameter identifier of the target original column, and the column name mapping table is used to record the correspondence between the column name and the column parameter identifier of the preset original column. A report generation statement is generated based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column. The report generation statement is executed to generate a result report. By parsing the custom report generation rules in the report generation information, the custom rules are converted into recognizable report generation statements, and a result report that meets the custom rules is generated based on the report generation statement, thereby improving the flexibility of report generation.

[0105] It should be noted that the report generation method provided in the embodiment of the present application can be applied to the report generation system. Figure 5 A specific structural diagram of a report generation system provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the report generation system 500 specifically includes a front-end portal client 501 and a back-end application client 502, wherein the front-end portal client configures a report generation interface for users to upload original reports through the report generation interface and send report generation requests to the back-end application client, and a database and a quality and efficiency intelligent management and control system are built in the back-end application client. The quality and efficiency intelligent management and control system is used to generate and export the target report to the front-end portal client after receiving the report generation request, and the database is used to store the original report data and the configuration data, thereby realizing flexible generation of reports.

[0106] It should be noted that the quality and efficiency intelligent management and control system is developed based on multiple technologies such as Vue, Spring boot and Oracle database, allowing users to customize report formats and statistical rules according to real-time needs without modifying the underlying code or redeploying the system. This not only improves the flexibility of report generation, but also simplifies maintenance work, allowing non-technical personnel to participate in the report design process, further improving managers' data analysis and application capabilities, improving quality and efficiency while strengthening risk prevention and control and enabling business development.

[0107] Figure 6 A specific implementation flow chart of a report generation method provided in an embodiment of the present application is specifically applied to a quality and efficiency intelligent management and control system, such as Figure 6 As shown, this method specifically includes:

[0108] S601: Receive a portal client's upload request for an original report identified by a table name.

[0109] S602: Parse the original report to obtain the column name of each original column in the original report.

[0110] S603: Store each original report in a preset database using the table parameter identifier as the table identifier and the column parameter identifier as the column identifier.

[0111] S604: Record the table name and the table parameter identifier in correspondence in the first preset relationship table to obtain a table name mapping table, and store the table name mapping in the database.

[0112] S605: Record the column names and column parameter identifiers in correspondence in the second preset relationship table to obtain a column name mapping table, and store the column name mapping in a database.

[0113] S601~S605 is an optional method for storing the original report, which parses the original report, stores the original report in a structured form, stores the mapping relationship between the table name of the original report and the structured table identifier in the table name mapping table, and stores the mapping relationship between the column name of the original column in the original report and the structured column identifier in the column name mapping table, thereby realizing report storage and mapping relationship storage.

[0114] S606: Receive a report generation request sent by the requesting party.

[0115] In this embodiment, the report generation request includes the identifier of the result data item, the table name of the target original report, and the column name of the target original column.

[0116] S607: Based on the identifier of the result data item, query the preset rule table to obtain the data processing logic.

[0117] In this embodiment, the data processing logic includes at least one basic logic, and the basic logic includes statistical operations and detailed operations. For example, the statistical operations include addition operations, ratio operations, etc., and the detailed operations include extracting detailed data.

[0118] S606 to S607 are an optional method for obtaining report generation information. In other optional embodiments, the report generation request sent by the requesting party includes data processing logic and no query is required.

[0119] S608: Based on the table name of the target original report, query the preset table name mapping table to obtain a table parameter identifier of the target original report.

[0120] S609: Query a preset column name mapping table based on the column name of the target original column to obtain a column parameter identifier of the target original column.

[0121] S610: Analyze the data processing logic to obtain table parameter identifiers and column parameter identifiers corresponding to each target basic logic.

[0122] S611. Obtain a statement template corresponding to the target basic logic.

[0123] In this embodiment, the statement template corresponding to the target basic logic can be pre-written, and the statement template is an atomic code. It should be noted that the configuration method of the statement template corresponding to the target basic logic can refer to the prior art.

[0124] S612: Fill the table parameter identifier and column parameter identifier corresponding to the target basic logic into the statement template corresponding to the target basic logic to obtain a target statement for executing the target basic logic.

[0125] S613. According to the logical relationship between each target basic logic in the data processing logic, each target statement is combined to generate an operation instruction.

[0126] In this embodiment, the operation instruction includes a report generation statement for executing data processing logic. By decomposing complex data processing logic into a combination of basic logics, the automatic generation of statements for executing data processing logic can be achieved.

[0127] S614: Execute the report generation statement to generate a result report.

[0128] S615. Generate an export instruction based on the data export logic.

[0129] In this embodiment, the report generation request also includes data export rules, the data export rules include data export logic, which is used to indicate the workbook number of each result report, and the export instruction includes a data export statement for executing the data export logic. The data export statement is used to insert each result report into a workbook according to the workbook number indicated by the data export rule to obtain a target report.

[0130] S616. Execute the data export statement, obtain the target report based on the result report, and export it to the portal client.

[0131] In this embodiment, the data export rules in the report generation request include workbooks and workbook serial numbers. After querying the result report through the report generation statement, the obtained result report is written into a temporary EXCEL file in a fixed directory in sequence and the download command is executed. Different reports are integrated into a temporary Excel file to obtain the target report. When the target report is exported, the temporary Excel file is deleted.

[0132] It can be seen from the above technical solutions that a report generation method provided in the embodiment of the present application can achieve the following technical effects:

[0133] The original report data is processed in a structured manner. After parsing the original report data, the table name mapping relationship and the column name mapping relationship are respectively inserted into the corresponding table of the relational database, thereby obtaining the table name mapping table and the column name mapping table to ensure the accurate storage of the data. It can be seen that the application has the metadata management capability to flexibly define or update the original report naming specifications and column identifiers, thereby enhancing the flexibility and adaptability of the original report data import.

[0134] By parsing the custom report generation rules in the report generation information, the custom rules are converted into operation instructions recognizable by Oracle, and reports that meet the custom rules are generated based on the operation instructions and exported to the front end, thereby supporting the front-end to customize the report generation rules and query the corresponding result data.

[0135] By parsing the custom report export rules in the report export request, the custom rules are converted into export instructions recognizable by Oracle, the report result data is integrated based on the export instructions, and the data sets from different reports are merged into a temporary memory area to realize the export of user-defined combined reports.

[0136] Use performance optimization mechanisms such as asynchronous processing and concurrency control to process large amounts of data or complex reports, reducing waiting time and resource consumption.

[0137] In summary, this solution integrates the current mainstream technology stack, applies Vue, Spring boot, Oracle database and other technologies, and uses the programmatic characteristics of operation rules to achieve real-time query and export of reports at different levels and time periods. Considering the needs of business diversity, it provides a highly flexible data import mechanism and report generation rule setting function. The front-end portal client can customize the content and format of the report according to specific business scenarios and needs to ensure that the output report accurately meets the requirements of business analysis and decision-making. Through the automated report generation function, the system greatly reduces the tediousness and time-consumingness of traditional manual report preparation, and significantly improves work efficiency.

[0138] A report generation method provided in an embodiment of the present application is introduced above, and a device for executing the above report generation method will be introduced below.

[0139] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a report generation device provided in an embodiment of the present application. Figure 7 As shown, the report generating device 700 includes:

[0140] A generation information acquisition unit, used to acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column;

[0141] A table identifier acquisition unit, configured to query a preset table name mapping table based on the table name of the target original report to acquire a table parameter identifier of the target original report, wherein the table name mapping table is used to record a correspondence between a preset table name of the original report and a table parameter identifier;

[0142] A column identifier acquisition unit, used to query a preset column name mapping table based on the column name of the target original column to acquire a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier;

[0143] A statement generating unit, configured to generate a report generating statement based on the data processing logic, a table parameter identifier of the target original report and a column parameter identifier of the target original column;

[0144] The result report generating unit is used to execute the report generating statement to generate a result report.

[0145] In a possible implementation, the report generating device further includes:

[0146] The original table storage unit is used to receive an upload request of an original report identified by a table name; parse the original report to obtain the column name of each original column in the original report; store each original report in a preset database using a table parameter identifier as a table identifier and a column parameter identifier as a column identifier;

[0147] A first relationship table storage unit is used to record the table name and the table parameter identifier in a first preset relationship table in correspondence to obtain a table name mapping table;

[0148] The second relational table storage unit is used to record the column names and column parameter identifiers in the second preset relational table in correspondence to obtain a column name mapping table.

[0149] In a possible implementation, the data processing logic includes at least one basic logic, and the basic logic includes statistical operations and detailed operations;

[0150] The statement generating unit is used to generate a report generating statement based on the data processing logic, the table parameter identifier of the target original report and the column parameter identifier of the target original column, specifically to:

[0151] Parsing the data processing logic to obtain table parameter identifiers and column parameter identifiers corresponding to each target basic logic;

[0152] Obtaining a statement template corresponding to the target basic logic;

[0153] Filling the table parameter identifier and the column parameter identifier corresponding to the target basic logic into the statement template corresponding to the target basic logic to obtain a target statement for executing the target basic logic;

[0154] According to the logical relationship between each of the target basic logics in the data processing logic, each of the target statements is combined to obtain the report generation statement.

[0155] In a possible implementation, the report generating device further includes:

[0156] A rule table generating unit, used for storing the data processing logic and the logic operation result identifier in a preset rule table in correspondence;

[0157] When the generation information acquisition unit is used to acquire report generation information, it is specifically used to:

[0158] Receiving a report generation request sent by a requester, the report generation request including an identifier of a result data item, a table name of the target original report, and a column name of the target original column;

[0159] Based on the identifier of the result data item, a preset rule table is queried to obtain the data processing logic.

[0160] In a possible implementation, the report generation information further includes a report export rule, and the report export rule includes a data export logic;

[0161] The report generating device further comprises: a report exporting unit, which is used to:

[0162] Based on the data export logic, generating a data export instruction, the data export instruction comprising a data export statement that executes the data export logic;

[0163] Execute the data export statement, obtain the target report based on the result report and export it.

[0164] The present application also provides an electronic device in an embodiment. Figure 8As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0165] like Figure 8 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0166] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0167] The present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any report generation method provided in the present application, as follows:

[0168] Acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column;

[0169] Based on the table name of the target original report, query a preset table name mapping table to obtain a table parameter identifier of the target original report, wherein the table name mapping table is used to record the correspondence between the preset table name of the original report and the table parameter identifier;

[0170] Based on the column name of the target original column, a preset column name mapping table is queried to obtain a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier;

[0171] Generate a report generation statement based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column;

[0172] Execute the report generation statement to generate a result report.

[0173] The present application also provides a computer-readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any report generation method provided in the present application, as follows:

[0174] Acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column;

[0175] Based on the table name of the target original report, query a preset table name mapping table to obtain a table parameter identifier of the target original report, wherein the table name mapping table is used to record the correspondence between the preset table name of the original report and the table parameter identifier;

[0176] Based on the column name of the target original column, a preset column name mapping table is queried to obtain a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier;

[0177] Generate a report generation statement based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column;

[0178] Execute the report generation statement to generate a result report.

[0179] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0180] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0181] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0182] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A report generation method, characterized in that: include: Acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column; Based on the table name of the target original report, query a preset table name mapping table to obtain a table parameter identifier of the target original report, wherein the table name mapping table is used to record the correspondence between the preset table name of the original report and the table parameter identifier; Based on the column name of the target original column, a preset column name mapping table is queried to obtain a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier; Generate a report generation statement based on the data processing logic, the table parameter identifier of the target original report, and the column parameter identifier of the target original column; Execute the report generation statement to generate a result report.

2. The report generation method according to claim 1, characterized in that: The report generation method further includes: Receive an upload request for an original report identified by a table name; Parse the original report to obtain the column name of each original column in the original report; Using the table parameter identifier as the table identifier and the column parameter identifier as the column identifier, storing each original report in a preset database; Record the table name and the table parameter identifier in correspondence with each other in the first preset relationship table to obtain a table name mapping table; The column names and column parameter identifiers are recorded correspondingly in the second preset relationship table to obtain a column name mapping table.

3. The report generation method according to claim 2, characterized in that: The data processing logic includes at least one basic logic, and the basic logic includes statistical calculation and detailed calculation; The generating a report generation statement based on the data processing logic, the table parameter identifier of the target original report and the column parameter identifier of the target original column includes: Parsing the data processing logic to obtain table parameter identifiers and column parameter identifiers corresponding to each target basic logic; Obtaining a statement template corresponding to the target basic logic; Filling the table parameter identifier and the column parameter identifier corresponding to the target basic logic into the statement template corresponding to the target basic logic to obtain a target statement for executing the target basic logic; According to the logical relationship between each of the target basic logics in the data processing logic, each of the target statements is combined to obtain the report generation statement.

4. The report generation method according to claim 1, characterized in that: The report generation method further includes: storing the data processing logic and the logic operation result identifier in a preset rule table in correspondence; The obtaining of report generation information includes: Receiving a report generation request sent by a requester, the report generation request including an identifier of a result data item, a table name of the target original report, and a column name of the target original column; Based on the identifier of the result data item, a preset rule table is queried to obtain the data processing logic.

5. The report generation method according to claim 4, characterized in that: The report generation information also includes report export rules, and the report export rules include data export logic; The method further comprises: Based on the data export logic, generating a data export instruction, the data export instruction comprising a data export statement that executes the data export logic; Execute the data export statement, obtain the target report based on the result report and export it.

6. A report generation device, characterized in that: include: A generation information acquisition unit, used to acquire report generation information, wherein the report generation information includes report generation rules, and the report generation rules include data processing logic, a table name of a target original report, and a column name of a target original column; A table identifier acquisition unit, configured to query a preset table name mapping table based on the table name of the target original report to acquire a table parameter identifier of the target original report, wherein the table name mapping table is used to record a correspondence between a preset table name of the original report and a table parameter identifier; A column identifier acquisition unit, used to query a preset column name mapping table based on the column name of the target original column to acquire a column parameter identifier of the target original column, wherein the column name mapping table is used to record the correspondence between the preset column name of the original column and the column parameter identifier; A statement generating unit, configured to generate a report generating statement based on the data processing logic, a table parameter identifier of the target original report and a column parameter identifier of the target original column; The result report generating unit is used to execute the report generating statement to generate a result report.

7. The report generation device according to claim 6, characterized in that: The report generating device also includes: The original table storage unit is used to receive an upload request of an original report identified by a table name; parse the original report to obtain the column name of each original column in the original report; store each original report in a preset database using a table parameter identifier as a table identifier and a column parameter identifier as a column identifier; A first relationship table storage unit is used to record the table name and the table parameter identifier in a first preset relationship table in correspondence to obtain a table name mapping table; The second relational table storage unit is used to record the column names and column parameter identifiers in the second preset relational table in correspondence to obtain a column name mapping table.

8. A computer program product, characterized in that The method comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the report generating method as claimed in any one of claims 1 to 5.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the report generation method as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the report generation method as described in any one of claims 1 to 5.