Report generation method and device, computer device and computer readable storage medium

A report generation and computer program technology, applied in the field of data processing, can solve the problem of single display effect, achieve the effect of improving user experience and rich and diverse report display effect

Pending Publication Date: 2019-09-10
CHINA PING AN LIFE INSURANCE CO LTD
0 Cites 6 Cited by

AI-Extracted Technical Summary

Problems solved by technology

At present, there are various report systems in the industry. These report systems generally support the user ...
View more

Abstract

The invention provides a report generation method and device, a computer device and a computer readable storage medium. The report generation method comprises the steps that a report template is established, display logic information is configured for each display module in the report template, and the report template comprises a plurality of display modules of different display styles; a plurality of report query condition frames and query logics corresponding to the report query condition frames are configured; a report generation instruction is received, and input content of each report query condition frame is acquired according to the report generation instruction; and a target report corresponding to the report generation instruction is generated according to the obtained input content of the report query condition frame and the report template. The invention relates to a data display technology, which can realize a function of displaying multiple styles of mixed display in a report and improve the use experience of a user.

Application Domain

Text processingSpecial data processing applications

Technology Topic

Computer deviceData mining +2

Image

  • Report generation method and device, computer device and computer readable storage medium
  • Report generation method and device, computer device and computer readable storage medium
  • Report generation method and device, computer device and computer readable storage medium

Examples

  • Experimental program(2)

Example Embodiment

[0036] Example one:
[0037] figure 1 It is a flowchart of the steps of a preferred embodiment of the report generation method of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0038] Refer to figure 1 As shown, the report generation method specifically includes the following steps.
[0039] Step S11: Establish a report template, and configure display logic information for each display module in the report template, wherein the report template includes a plurality of display modules of different display styles.
[0040] In one embodiment, the report template includes a plurality of display modules, and the plurality of display modules have a plurality of different display styles. For example, the plurality of display modules include a table display module, a text display module, and a graphic display module, so that all The report template has a mixed display function of tables, graphics and text. The table display module is used to realize the table display function, the text display module is used to realize the static and dynamic text display function, and the image display module is used to realize the graphic display function. By configuring the display logic information of each display module, the display function of each display module is realized.
[0041] In one embodiment, when one of the plurality of display modules is configured as a table display function, that is, the data of this module is displayed through a table, and configuring display logic information for the display module includes configuring display for it Information such as location, database, and corresponding SQL logic, SQL query fields are not limited, and can be written according to actual needs.
[0042] In one embodiment, when one of the plurality of display modules is configured as a graphic display function, that is, the data of this module is displayed through graphics, and configuring display logic information for the display module includes configuring graphics for it The display position, graphic style, database and corresponding SQL logic and other information. The graphic style may be a pie chart, a bar chart, a bar chart, a ring chart, a line chart, a scatter chart, a trend chart, a radar chart, a bubble chart, an area chart, etc. SQL logic needs to be written in accordance with specific requirements. For example, in a line chart, the first column of the SQL statement needs to be the data set corresponding to the X axis, the second column needs to be the Y axis data set of the first polyline, and the third column It needs to be the Y-axis data set of the second polyline, and so on, so that the polyline chart can display multiple polylines.
[0043] In one embodiment, when one of the plurality of display modules is configured as a text display function, that is, the data of this module is displayed by text, and the display logic information configured for the display module includes text display position, Information such as text format content, database and corresponding SQL logic. The text format content can write text content and insert the table, the text content can set the font, color, size, alignment, etc., and the cells in the inserted table can also write text content. Various parameters can be set in the text format content, all parameters are queried through a SQL logic, the system recognizes the parameter symbol as p{*} or P{*}, and the "*" sign can be all English strings or Chinese characters String or numeric string, the "*" sign needs to be the same as the value of the first column of the SQL query logic; for example, when the text format content defines two parameters p{month} and p{statistics}, the corresponding SQL query logic needs to be select'month',201805union allselect'statistics',500, then the value corresponding to the parameter p{month} is 201805, and the value corresponding to p{statistics} is 500.
[0044] Step S12: Configure multiple report query condition boxes and query logic corresponding to the multiple report query condition boxes.
[0045] In one embodiment, by configuring multiple report query condition boxes, the user can input report export parameters according to actual needs to query specific data and generate corresponding target reports. For example, multiple report query condition boxes include eight configurable report query condition boxes, namely "single-value text box", "multi-value text box separated by commas", "multi-value text box separated by "|"", " Time control box", "Custom non-SQL radio box", "Custom SQL radio box", "Custom non-SQL multi box", "Custom SQL multi box". The "single-value text box", "multi-value text box separated by commas" and "multi-value text box separated by'|'" support direct input of text as query conditions. When the query condition is a single word, use the "single value text box" to enter a single word, such as "life insurance". When the query condition is multiple values, you can use "multi-value text box separated by commas" or "multi-value text box separated by'|" to enter multiple words, for example, enter "life insurance, car insurance" to "multi-value text The boxes are separated by commas, or enter “life insurance|auto insurance” to “multi-value text boxes separated by'|'”. "Multi-value text box separated by comma" has the same function as "Multi-value text box separated by'|'". The difference lies in the separator of words. The "time control box" indicates that the query condition is the time text format. When the user clicks, a time control will pop up for the user to select a specific time period. For example, select the query time through the "time control box": 2018-01-01~ 2018-01-31.
[0046] The "custom SQL single-select box" and "custom SQL multi-select box" indicate that the query condition is a drop-down box, and the source of the list of values ​​in the drop-down box can be customized through SQL language in another data source configuration interface Automatically queried from the database, the difference between "Custom SQL Single Select Box" and "Custom SQL Multiple Select Box" is that one is a single-select drop-down box, and the other is a multiple-select drop-down box. The "custom non-SQL single-selection box" and "custom non-SQL multi-selection box" also indicate that the style of the query condition is a drop-down box, and the source of the list of values ​​in the drop-down box is through text in another data source configuration interface The methods are separated by commas. The difference between "Custom Non-SQL Single Select Box" and "Custom Non-SQL Multiple Select Box" is that one is a single-select drop-down box and the other is a multiple-select drop-down box. The configuration in the data source configuration interface can be used in association with multiple report templates.
[0047] In one embodiment, the query logic defines two variables s{*} (or S{*}) and m{*} (or M{*}), s{*} (or S{*}) Means single choice, m{*} (or M{*}) means multiple choice. The "*" sign can be an English character string, a Chinese character string or a number string. By setting these two variables and each The corresponding relationship of the report condition query box makes the report query condition box correspond to the query logic.
[0048] Step S13: Receive a report generation instruction, and obtain the input content of each report query condition box according to the report generation instruction.
[0049] In one embodiment, the creation of the report template and the configuration of the report query condition box can be completed on the Web page. After completing the template creation and configuration, users can query and generate reports on the Web page. Can receive a report generation request, and perform authorization authentication on the report generation request (for example, the report generation request contains user login identity information, and the identity information is authenticated by authorization), and jump to the preset query interface after the authentication is passed , Wherein the preset query interface includes a plurality of query condition boxes for the report. The query condition content can be input or selected in the report query condition box, and the report generation button can be clicked to trigger the report generation instruction, and then the input content of each report query condition box can be obtained according to the report generation instruction.
[0050] In an embodiment, the report generation instruction includes report template identification information, and the report module selected for this report generation can be determined by the report template identification information. The report template identification information can uniquely determine a report template.
[0051] Step S14: Generate a target report corresponding to the report generation instruction according to the obtained input content of the report query condition box and the report template.
[0052] In one embodiment, in order to save report generation time, the obtained input content of the report query condition box may be sent to a preset database through multiple threads for parallel query, and then based on the query result and the identifier matching the report template The report template generates the target report.
[0053] In one embodiment, each thread corresponds to each display module one by one. For example, when the selected report module contains five display modules, five threads are used for parallel query, saving report generation time. When using multiple threads to query, the query results of each display module in the report template can be returned to a JSP page (JavaServer Pages), and the JSP page will format and merge the results. To generate the target report.
[0054] For example, when you need to generate a report, you can enter or select the content of the query conditions in the report query condition box, and click the report generation button. At this time, the report generation device generates the report through AJAX (Asynchronous Javascript AndXML, asynchronous JavaScript and XML) The instructions and the content in the query condition box of the report are sent to the SPRINGMVC framework. The SPRING MVC framework replaces the variables in the SQL of each display module with the value of the content in the query condition box of the report, and combines the SQL query logic of all the display modules Distributed to multiple threads, each thread sends the data query request to the MYBATIS framework, and performs parallel query through the preset database thread pool. After all threads such as the report generation device are executed, the query results are uniformly returned to the JSP page , And are formatted by the JSP page and combined and displayed together to form the target report.
[0055] The above report generation method can realize multi-style mixed display functions such as text description, tables, graphics, etc., so that the exported report looks more like a report, the report display effect is rich and diverse, and the user experience is improved.

Example Embodiment

[0056] Embodiment two:
[0057] figure 2 It is a functional module diagram of a preferred embodiment of the report generation device of the present invention.
[0058] Refer to figure 2 As shown, the report generation device 10 may include an establishment module 101, a configuration module 102, a receiving module 103, and a generating module 104.
[0059] The establishment module 101 is used to establish a report template, and configure display logic information for each display module in the report template, wherein the report template includes a plurality of display modules of different display styles.
[0060] In one embodiment, the report template includes a plurality of display modules, and the plurality of display modules have a plurality of different display styles. For example, the plurality of display modules include a table display module, a text display module, and a graphic display module, so that all The report template has a mixed display function of tables, graphics and text. The table display module is used to realize the table display function, the text display module is used to realize the static and dynamic text display function, and the image display module is used to realize the graphic display function. By configuring the display logic information of each display module, the display function of each display module is realized.
[0061] In one embodiment, when one of the plurality of display modules is configured as a table display function, that is, the data of this module is displayed through a table, and configuring display logic information for the display module includes configuring display for it Information such as location, database, and corresponding SQL logic, SQL query fields are not limited, and can be written according to actual needs.
[0062] In one embodiment, when one of the plurality of display modules is configured as a graphic display function, that is, the data of this module is displayed through graphics, and configuring display logic information for the display module includes configuring graphics for it The display position, graphic style, database and corresponding SQL logic and other information. The graphic style may be a pie chart, a bar chart, a bar chart, a ring chart, a line chart, a scatter chart, a trend chart, a radar chart, a bubble chart, an area chart, etc. SQL logic needs to be written in accordance with specific requirements. For example, in a line chart, the first column of the SQL statement needs to be the data set corresponding to the X axis, the second column needs to be the Y axis data set of the first polyline, and the third column It needs to be the Y-axis data set of the second polyline, and so on, so that the polyline chart can display multiple polylines.
[0063] In one embodiment, when one of the plurality of display modules is configured as a text display function, that is, the data of this module is displayed by text, and the display logic information configured for the display module includes text display position, Information such as text format content, database and corresponding SQL logic. The text format content can write text content and insert the table, the text content can set the font, color, size, alignment, etc., and the cells in the inserted table can also write text content. Various parameters can be set in the text format content, all parameters are queried through a SQL logic, the system recognizes the parameter symbol as p{*} or P{*}, and the "*" sign can be all English strings or Chinese characters String or numeric string, the "*" sign needs to be the same as the value of the first column of the SQL query logic; for example, when the text format content defines two parameters p{month} and p{statistics}, the corresponding SQL query logic needs to be select'month',201805union allselect'statistics',500, then the value corresponding to the parameter p{month} is 201805, and the value corresponding to p{statistics} is 500.
[0064] The configuration module 102 is used to configure multiple report query condition boxes and query logic corresponding to the multiple report query condition boxes.
[0065] In one embodiment, multiple report query condition boxes are configured through the configuration module 102, so that users can input report export parameters according to actual needs to query specific data and generate corresponding target reports. For example, multiple report query condition boxes include eight configurable report query condition boxes, namely "single-value text box", "multi-value text box separated by commas", "multi-value text box separated by "|"", " Time control box", "Custom non-SQL radio box", "Custom SQL radio box", "Custom non-SQL multi box", "Custom SQL multi box". The "single-value text box", "multi-value text box separated by commas" and "multi-value text box separated by'|'" support direct input of text as query conditions. When the query condition is a single word, use the "single value text box" to enter a single word, such as "life insurance". When the query condition is multiple values, you can use "multi-value text box separated by commas" or "multi-value text box separated by'|" to enter multiple words, for example, enter "life insurance, car insurance" to "multi-value text The boxes are separated by commas, or enter “life insurance|auto insurance” to “multi-value text boxes separated by'|'”. "Multi-value text box separated by comma" has the same function as "Multi-value text box separated by'|'". The difference lies in the separator of words. The "time control box" indicates that the query condition is the time text format. When the user clicks, a time control will pop up for the user to select a specific time period. For example, select the query time through the "time control box": 2018-01-01~ 2018-01-31.
[0066] The "custom SQL single-select box" and "custom SQL multi-select box" indicate that the query condition is a drop-down box, and the source of the list of values ​​in the drop-down box can be customized through SQL language in another data source configuration interface Automatically queried from the database, the difference between "Custom SQL Single Select Box" and "Custom SQL Multiple Select Box" is that one is a single-select drop-down box, and the other is a multiple-select drop-down box. The "custom non-SQL single-selection box" and "custom non-SQL multi-selection box" also indicate that the style of the query condition is a drop-down box, and the source of the list of values ​​in the drop-down box is through text in another data source configuration interface The methods are separated by commas. The difference between "Custom Non-SQL Single Select Box" and "Custom Non-SQL Multiple Select Box" is that one is a single-select drop-down box and the other is a multiple-select drop-down box. The configuration in the data source configuration interface can be used in association with multiple report templates.
[0067] In one embodiment, the query logic defines two variables s{*} (or S{*}) and m{*} (or M{*}), s{*} (or S{*}) Means single choice, m{*} (or M{*}) means multiple choice. The "*" sign can be an English character string, a Chinese character string or a number string. By setting these two variables and each The corresponding relationship of the report condition query box makes the report query condition box correspond to the query logic.
[0068] The receiving module 103 is configured to receive a report generation instruction, and obtain the input content of each report query condition box according to the report generation instruction.
[0069] In one embodiment, the report generation device 10 can complete the establishment of the report template and the configuration of the report query condition box on the Web page. After completing the template creation and configuration, users can query and generate reports on the Web page. The receiving module 103 can receive a report generation request, and perform authorization authentication on the report generation request (for example, the report generation request contains user login identity information, and the identity information is authenticated by authorization), and jump after the authentication is passed To a preset query interface, where the preset query interface includes a plurality of query condition boxes for the report. In the report query condition box, you can enter or select the query condition content, click the report generation button to trigger the report generation instruction, and then the receiving module 103 can obtain the input of each report query condition box according to the report generation instruction content.
[0070] In an embodiment, the report generation instruction includes report template identification information, and the report module selected for this report generation can be determined by the report template identification information. The report template identification information can uniquely determine a report template.
[0071] The generating module 104 is configured to generate a target report corresponding to the report generation instruction according to the obtained input content of the report query condition box and the report template.
[0072] In one embodiment, in order to save report generation time, the generation module 104 may send the obtained input content of the report query condition box to a preset database through multiple threads for parallel query, and then according to the query result and the query The report template matching the report template identifier generates the target report.
[0073] In one embodiment, each thread corresponds to each display module one by one. For example, when the selected report module contains five display modules, five threads are used for parallel query, saving report generation time. When the generating module 104 uses multiple threads to perform a query, it can return the query result of each display module in the report template to a JSP page (Java Server Pages), and the JSP page performs the query. Format and merge processing to generate the target report.
[0074] For example, when you need to generate a report, you can enter or select the content of the query conditions in the report query condition box, and click the report generation button. At this time, the generation module 104 uses AJAX (Asynchronous Javascript And XML, asynchronous JavaScript and XML) to convert The report generation instruction and the content in the report query condition box are sent to the SPRING MVC framework, and the SPRING MVC framework replaces the variables in the SQL of each display module with the value of the content in the report query condition box, and changes the values ​​of all display modules SQL query logic is distributed to multiple threads, and each thread sends data query requests to the MYBATIS framework, and performs parallel query through the preset database thread pool. After all threads are executed by the generation module 104, the query is unified The result is returned to the JSP page, and the JSP page is formatted and combined and displayed together to form the target report.
[0075] The above-mentioned report generation device can realize multi-style mixed display functions such as text description, tables, graphics, etc., so that the exported report looks more like a report, the report display effect is rich and diverse, and the user experience is improved.
[0076] image 3 It is a schematic diagram of a preferred embodiment of the computer device of the present invention.
[0077] The computer device 1 includes a memory 20, a processor 30, and a computer program 40 stored in the memory 20 and running on the processor 30, such as a report generation program. When the processor 30 executes the computer program 40, the steps in the foregoing report generation method embodiment are implemented, for example figure 1 Steps S11 to S14 shown. When the processor 30 executes the computer program 40, the function of each module in the above-mentioned report generation device embodiment is realized, for example figure 2 Modules 101 to 104 in.
[0078] Exemplarily, the computer program 40 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 20 and executed by the processor 30 to complete this invention. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 40 in the computer device 1. For example, the computer program 40 can be divided into figure 2 The establishment module 101, the configuration module 102, the receiving module 103 and the generating module 104 in For specific functions of each module, refer to the second embodiment.
[0079] The computer device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. Those skilled in the art can understand that the schematic diagram is only an example of the computer device 1 and does not constitute a limitation on the computer device 1. It may include more or less components than those shown in the figure, or a combination of certain components, or different components. Components, for example, the computer device 1 may also include input and output devices, network access devices, buses, and the like.
[0080] The so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor 30 may also be any conventional processor, etc. The processor 30 is the control center of the computer device 1 and connects the entire computer device 1 with various interfaces and lines. Parts.
[0081] The memory 20 may be used to store the computer program 40 and/or modules/units. The processor 30 runs or executes the computer programs and/or modules/units stored in the memory 20, and calls the computer programs and/or modules/units stored in the memory. The data in 20 realizes various functions of the computer device 1. The memory 20 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; The data (such as audio data, phone book, etc.) created according to the use of the computer device 1 and the like are stored. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD). Card, Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
[0082] When the integrated modules/units of the computer device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the foregoing method embodiments. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Method and system for controlling air conditioner

Owner:GD MIDEA AIR-CONDITIONING EQUIP CO LTD +1

Video photographing control device and method, and unmanned aerial vehicle

PendingCN106027896AImprove user experience
Owner:ZEROTECH (BEIJING) INTELLIGENCE TECH CO LTD

Automobile air conditioner control method, controller and automobile air conditioner control system

ActiveCN105857011AComfortable temperature inside the carImprove user experience
Owner:BEIJING CHANGAN AUTOMOBILE ENG TECH RES

Classification and recommendation of technical efficacy words

  • Improve user experience

Method, device and equipment for displaying multiple application windows on mobile terminal

InactiveCN102968243AImprove information acquisition efficiency and ease of operationImprove user experience
Owner:SHENZHEN YUNYINGGU TECH CO LTD

Content recommending method and device based on user characteristics

ActiveCN101957834AFacilitate the dissemination of informationImprove user experience
Owner:BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products