CN114218904A - Configurable report export design method and system - Google Patents

Configurable report export design method and system Download PDF

Info

Publication number
CN114218904A
CN114218904A CN202111524080.7A CN202111524080A CN114218904A CN 114218904 A CN114218904 A CN 114218904A CN 202111524080 A CN202111524080 A CN 202111524080A CN 114218904 A CN114218904 A CN 114218904A
Authority
CN
China
Prior art keywords
report
file
data
back end
file server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111524080.7A
Other languages
Chinese (zh)
Inventor
宝正敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111524080.7A priority Critical patent/CN114218904A/en
Publication of CN114218904A publication Critical patent/CN114218904A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a method and a system for configurable report export design. The method comprises the steps that a front end requests a back-end report export interface and sends a report ID to a back end; the back end acquires a data query class corresponding to the report ID according to the dynamic proxy and the reflection mechanism; the back end calls a data query method, confirms a data template corresponding to the report ID, and renders data to generate a report file; leading the generated report file into a file server by the back end; the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local. The method can realize the rapid development and assembly of the report exporting function and reduce the maintenance cost; and by means of data preposing batch processing and file asynchronous processing, the front-end request waiting response time is greatly reduced, network overtime is avoided, the efficiency is improved, and meanwhile, the customer experience degree is greatly improved.

Description

Configurable report export design method and system
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for configurable report export design.
Background
At present, most service integration systems relate to a large number of report query and export functions and are used for analyzing data such as input and output, operation efficiency, hot products, bills and the like, so that system operators can continuously optimize and perfect the systems and quickly adapt to continuously developing market services.
The traditional report exporting method is to inquire data in real time through an interface, generate an Excel file according to corresponding template rendering data, return corresponding streams to the front end, newly add a corresponding data inquiry interface and template and generate Excel logic at the back end every new type of report, and a developer needs to write a specific back end interface aiming at each report exporting type, so that the time cost and the resource cost of the developer are greatly increased; meanwhile, because data is queried in real time, data sources can be different systems and different databases, multi-table combined query is possibly needed, and cross-system query can also exist, so that a plurality of network interaction processes need to be designed, which causes the problems of low query efficiency, overlong waiting response time and even overtime; secondly, the problem of complicated verification of the accuracy of the derived data is also brought because of the wide sources of the data.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method and a system for configurable report export design.
In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps:
a method for configurable report export design, comprising the steps of:
step S1, the front end requests the back end report export interface and sends the report ID to the back end;
step S2, the back end obtains the data query class corresponding to the report ID according to the dynamic proxy and the reflection mechanism;
step S3, the back end calls a data query method, confirms the data template corresponding to the report ID, and renders the data to generate a report file;
step S4, the back end imports the generated report file into a file server;
and step S5, the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
Further, the report file is preferably an Excel file.
Further, in the step S2, the dynamic proxy is a Java dynamic proxy, the reflection mechanism is a reflection mechanism of Java language, and the data query class is a data query Java class.
Further, the dynamic proxy includes implementing indirect access through a proxy class.
Further, the step S3 includes the back end aggregating the required data into the database in advance in the form of batch jobs.
Further, the step S3 includes the backend processing the data in the form of DOS batch processing or PS batch processing.
Further, the step 3 further includes acquiring data to be exported by a method of invoke executing reportData, and rendering the data to generate an Excel file.
The invention also relates to a system capable of configuring report export design, which is characterized by comprising the following steps:
the request module requests the back-end report export interface by the front end and sends the report ID to the back end;
the acquisition module acquires a data query class corresponding to the report ID by the back end according to the dynamic proxy and the reflection mechanism;
the data rendering module calls a data query method at the back end, confirms a data template corresponding to the report ID, and renders the data to generate an Excel file;
the back end of the import module imports the generated Excel file into a file server;
and the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
The invention also relates to a computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned method.
The invention also relates to an electronic device, characterized in that it comprises a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method by calling the operation instruction.
The invention also relates to a computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the above-mentioned method.
The invention has the beneficial effects that:
by adopting the method and the system for configuring the report export design, the unique report ID and the corresponding unique data template are configured for each report type, the Java instance corresponding to the queried report ID is obtained through the dynamic proxy and the reflection mechanism, and the data is queried and rendered to generate the Excel file, so that the rapid development and assembly of the report export function are realized, and the maintenance cost is reduced; secondly, by means of data preposing batch processing and file asynchronous processing, the waiting response time of a front-end request is greatly reduced, network overtime is avoided, efficiency is improved, and meanwhile customer experience is greatly improved.
Drawings
FIG. 1 is a flow chart of a configurable report export design method of the present invention.
FIG. 2 is a schematic diagram of a system architecture for configurable report export design according to the present invention.
Detailed Description
For a clearer understanding of the contents of the present invention, reference will be made to the accompanying drawings and examples.
The first aspect of the invention relates to a method for designing a configurable report export, which comprises the following steps:
step S1, the front end requests the back end report export interface and sends the report ID to the back end;
step S2, the back end obtains the data query class corresponding to the report ID according to the dynamic proxy and the reflection mechanism;
step S3, the back end calls a data query method, confirms the data template corresponding to the report ID, and renders the data to generate a report file;
step S4, the back end imports the generated report file into a file server;
and step S5, the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
In this embodiment, the report file is preferably an Excel file.
In this embodiment, each report type corresponds to a unique report ID and a unique data template, and the data template is named in the form of "report ID +. xsls".
Optionally, in step S2, the dynamic proxy is a Java dynamic proxy, the reflection mechanism is a reflection mechanism of Java language, and the data query class is a data query Java class.
In this embodiment, the Java dynamic proxy provides an interface proxy class for a certain original object, and the client does not directly access the object but indirectly accesses the object through the proxy class, which is obtained through a Java reflection mechanism.
Optionally, in this embodiment, the Java dynamic agent includes a call handler that creates itself by implementing an invoke handler interface; creating a dynamic Proxy class by specifying a ClassLoader object and a group of interfaces for the Proxy class; obtaining a constructor of the dynamic proxy class through a reflection mechanism, wherein the only parameter type is a calling processor interface type; the dynamic proxy class instance is created by a constructor, which calls the processor object as a parameter when constructed.
Optionally, in this embodiment, the Java reflection mechanism may be implemented to know all attributes and methods of any class; any method and property can be called for any object.
Optionally, the step S3 further includes the back end aggregating the required data into the database in advance in the form of batch jobs.
Optionally, the step S3 further includes the backend processing the data in the form of DOS batch processing or PS batch processing.
The PS batch processing is based on a script of PowerShell batch processing of some tasks; DOS batch processing is a script that automatically executes DOS commands in batches based on DOS commands to achieve a particular operation.
In the practical operation process, because the data of the statistical report is from a plurality of different business data tables, if the data of the business data tables are inquired by the inquiry report each time, huge pressure is brought to the database, the efficiency is very low, and even the problems of overtime, memory overflow and the like can occur, so that the required data is processed and summarized to the database (business data preprocessing) in advance through batch operation, the pressure of the database can be reduced, and the inquiry timeliness can be effectively improved.
Optionally, step 3 further includes acquiring data to be exported by a method of invoke executing reportData, and rendering the data to generate an Excel file.
The report ID and the proxied class are in one-to-one correspondence, the proxied class is designed to be in a form of report ID + report Do.
By adopting the method and the system for configuring the report export design, the unique report ID and the corresponding unique data template are configured for each report type, the Java instance corresponding to the queried report ID is obtained through the dynamic proxy and the reflection mechanism, and the data is queried and rendered to generate the Excel file, so that the rapid development and assembly of the report export function are realized, and the maintenance cost is reduced; secondly, by means of data preposing batch processing and file asynchronous processing, the waiting response time of a front-end request is greatly reduced, network overtime is avoided, efficiency is improved, and meanwhile customer experience is greatly improved.
Another aspect of the present invention also relates to a system for configurable report export design, whose structure is shown in fig. 2, including:
the request module requests the back-end report export interface by the front end and sends the report ID to the back end;
the acquisition module acquires a data query class corresponding to the report ID by the back end according to the dynamic proxy and the reflection mechanism;
the data rendering module calls a data query method at the back end, confirms a data template corresponding to the report ID, and renders the data to generate an Excel file;
the back end of the import module imports the generated Excel file into a file server;
and the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
By using this system, the above-described arithmetic processing method can be executed and a corresponding technical effect can be achieved.
Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments, the computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps of the method in the above embodiments.
Embodiments of the present invention also provide an electronic device for executing the method, as an implementation apparatus of the method, the electronic device at least has a processor and a memory, in particular, the memory stores data required for executing the method and related computer programs, such as the like, and all steps of the implementation method are executed by calling the data and programs in the memory by the processor, and corresponding technical effects are obtained.
Preferably, the electronic device may comprise a bus architecture, which may include any number of interconnected buses and bridges linking together various circuits including one or more processors and memory. The bus may also link various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a means for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used for storing data used by the processor in performing operations.
Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power source, and the like. The processor (or controller, operational controls) employed may include a microprocessor or other processor device and/or logic device that receives input and controls the operation of various components of the electronic device; the memory may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store the above-mentioned related data information, and may also store a program for executing the related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used for providing input to the processor, and can be a key or a touch input device; the power supply is used for supplying power to the electronic equipment; the display is used for displaying display objects such as images and characters, and may be an LCD display, for example. The communication module is a transmitter/receiver that transmits and receives signals via an antenna. The communication module (transmitter/receiver) is coupled to the processor to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal. Based on different communication technologies, a plurality of communication modules, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be disposed in the same electronic device. The communication module (transmitter/receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone to implement the usual telecommunication functions. The audio processor may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor is also coupled to the central processor, so that recording on the local machine can be realized through the microphone, and sound stored on the local machine can be played through the loudspeaker.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A method for configurable report export design, comprising the steps of:
step S1, the front end requests the back end report export interface and sends the report ID to the back end;
step S2, the back end obtains the data query class corresponding to the report ID according to the dynamic proxy and the reflection mechanism;
step S3, the back end calls a data query method, confirms the data template corresponding to the report ID, and renders the data to generate a report file;
step S4, the back end imports the generated report file into a file server;
and step S5, the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
2. The method of claim 1, wherein the reporting file is an Excel file.
3. The method according to claim 1, wherein the dynamic agent in step S2 is a Java dynamic agent, the reflection mechanism is a reflection mechanism of Java language, and the data query class is a data query Java class.
4. The method of claim 1, wherein the dynamic proxy comprises implementing indirect access through a proxy class.
5. The method of claim 1, wherein the step S3 further comprises the back end aggregating the required data into the database by means of batch job in advance.
6. The method of claim 5, wherein the step S3 further comprises the backend processing the data in the form of DOS batch or PS batch.
7. The method according to any one of claims 2 to 6, wherein the step 3 further comprises acquiring data needing to be exported by the method of invoke executing reportData, and rendering the data to generate an Excel file.
8. A system for configurable report export design, comprising:
the request module requests the back-end report export interface by the front end and sends the report ID to the back end;
the acquisition module acquires a data query class corresponding to the report ID by the back end according to the dynamic proxy and the reflection mechanism;
the data rendering module calls a data query method at the back end, confirms a data template corresponding to the report ID, and renders data to generate a report file;
the back end of the import module imports the generated report file into a file server;
and the front end requests the file server according to the file downloading address of the file server, acquires the asynchronously generated file information and downloads the file information to the local.
9. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method of any one of claims 1 to 7 by calling the operation instruction.
11. A computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the method of any one of claims 1 to 7.
CN202111524080.7A 2021-12-14 2021-12-14 Configurable report export design method and system Pending CN114218904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111524080.7A CN114218904A (en) 2021-12-14 2021-12-14 Configurable report export design method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111524080.7A CN114218904A (en) 2021-12-14 2021-12-14 Configurable report export design method and system

Publications (1)

Publication Number Publication Date
CN114218904A true CN114218904A (en) 2022-03-22

Family

ID=80701885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111524080.7A Pending CN114218904A (en) 2021-12-14 2021-12-14 Configurable report export design method and system

Country Status (1)

Country Link
CN (1) CN114218904A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093800A (en) * 2023-08-23 2023-11-21 上海螣龙科技有限公司 PDF batch output method and device for network asset data report and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093800A (en) * 2023-08-23 2023-11-21 上海螣龙科技有限公司 PDF batch output method and device for network asset data report and electronic equipment
CN117093800B (en) * 2023-08-23 2024-04-19 上海螣龙科技有限公司 PDF batch output method and device for network asset data report and electronic equipment

Similar Documents

Publication Publication Date Title
CN110851253B (en) Remote operation and maintenance method, system, storage medium and electronic equipment
CN110990420B (en) Data query method and device
JP2021096857A (en) Data processing method, device, electronic apparatus, and storage medium
CN108363741B (en) Big data unified interface method, device, equipment and storage medium
CN112860798B (en) Data processing method and device, electronic equipment and storage medium
CN111090666A (en) Data processing method, device and system and computer readable storage medium
CN111125064A (en) Method and device for generating database mode definition statement
CN115168398A (en) Data query method and device, electronic equipment and storage medium
CN115630835A (en) Activity-based workflow general parameter configuration method and system
CN111885177A (en) Biological information analysis cloud computing method and system based on cloud computing technology
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN114218904A (en) Configurable report export design method and system
CN110807056A (en) Excel-based report processing method, Excel-based report processing device, Excel-based report processing medium and electronic equipment
KR20210040322A (en) Scheduling method and apparatus, device and storage medium
CN111897849A (en) Data query method and device
CN112506961A (en) Method for improving data query efficiency
CN114676113A (en) Heterogeneous database migration method and system based on task decomposition
CN115407981A (en) Front-end data mock method and system based on middleware adaptation
CN115545639A (en) Financial business processing method and device, electronic equipment and storage medium
CN113779122A (en) Method and apparatus for exporting data
CN113596164A (en) Data access method, device, system, equipment and medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN111078736A (en) Data aggregation processing method and device, terminal and storage medium
US11888937B2 (en) Domain specific provider contracts for core data services
CN116301869B (en) Front-end page configuration management and control system, method, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination