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

By receiving report generation requests, obtaining and configuring data sources, converting them into report data sets, and displaying data according to the selected report style, the inefficient processing efficiency caused by data dispersion in multiple business systems in traditional methods is solved, and more efficient report generation and data application is achieved.

CN112861496BActive Publication Date: 2025-05-02PING AN COMMERCIAL FACTORING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110303843.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-22
Publication Date
2025-05-02
Estimated Expiration
2041-03-22

AI Technical Summary

Technical Problem

In traditional methods, due to multiple independent business systems, the business data is dispersed, and users need to enter different systems to query data, which is less efficient in processing and makes it difficult to effectively apply enterprise data.

Method used

Provide a report generation and display method. By receiving a report generation request, obtaining the data source of the corresponding service and configuring it, converting it into a data set for the report to be generated, and selecting instructions based on the received report style to determine the target report style to display the data set.

Benefits of technology

The process of processing between different business systems is simplified, the efficiency of report generation and processing is improved, and the convenience of data application is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861496B_ABST
    Figure CN112861496B_ABST
Patent Text Reader

Abstract

The present application relates to the field of big data technology, and in particular to a report generation and display method, device, computer equipment and readable storage medium, including: receiving a report generation request, the report generation request carries a business identifier and report generation requirements of the corresponding business; based on the business identifier, obtaining the data source of the corresponding business, and configuring the obtained data source to obtain a configured data source; based on the report generation requirements, converting the configured data source to obtain a data set corresponding to the report to be generated; obtaining an initial report style for displaying the data set; based on the received report style selection instruction, determining a target report style from the initial report style, and displaying the data set through the target report style. The use of this method can improve the processing efficiency of business reports on the web side. The present application also relates to the field of blockchain technology, and report generation requests, data sources, data sets, and initial report styles can all be uploaded to the blockchain.
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 and display method, apparatus, computer equipment and readable storage medium. Background Art

[0002] In the process of informatization, more and more enterprise applications are being used, and the amount of business data of various businesses is also increasing. Enterprise data is a huge asset for the company. Generating business reports from enterprise data and conducting business analysis and business control can realize the effective application of enterprise data.

[0003] In the traditional way, a general enterprise has multiple business systems, such as Customer Relationship Management (CRM), Enterprise Resource Planning (ERP), and Office Automation (OA). Each system is closed and runs independently, and business data is scattered in different systems. When users query data through the web, they need to enter different systems to query. The application of business data is very difficult, which makes the processing efficiency low when generating business reports based on business data. Summary of the invention

[0004] Based on this, it is necessary to provide a report generation and display method, device, computer equipment and readable storage medium that can improve the processing efficiency of business reports on the web in response to the above technical problems.

[0005] A report generation and display method, the method comprising:

[0006] receiving a report generation request, the report generation request carrying a business identifier of a business corresponding to a report to be generated and a report generation requirement;

[0007] Based on the business identifier, the data source of the corresponding business is obtained, and the obtained data source is configured to obtain a configured data source;

[0008] Based on the report generation requirements, the configured data source is converted to obtain the data set corresponding to the report to be generated;

[0009] Get the initial report style for displaying the data set;

[0010] Based on the received report style selection instruction, a target report style is determined from the initial report style, and the data set is displayed through the target report style.

[0011] In one embodiment, configuring the acquired data source to obtain a configured data source includes:

[0012] According to the acquired data source, determine the version type of the data source;

[0013] Determine the corresponding target driver according to the version type;

[0014] The data source connection information is obtained, and based on the data source connection information, the data source is configured through the target driver to obtain a configured data source.

[0015] In one embodiment, determining a corresponding target driver according to the version type includes:

[0016] According to the version type, determine the target driver of the corresponding data source from the candidate driver list;

[0017] The list of candidate drivers is established in the following ways:

[0018] Get the driver file corresponding to the version type of the data source;

[0019] The driver files are stored in the driver management directory, and the driver files in the driver management directory are parsed based on a preset parsing method to obtain corresponding file information;

[0020] According to the file information, the target driver corresponding to the data source is added to the initial candidate driver list to obtain the candidate driver list.

[0021] In one embodiment, the configured data source is converted to obtain a data set corresponding to the report to be generated, including:

[0022] Based on the configured data source, obtain the corresponding query data and configuration data;

[0023] Verify the configuration data to determine whether there is an injection risk;

[0024] When there is no injection risk in the configuration data, the variable assignment data is filtered out from the query data, and based on the variable assignment data, the corresponding variable to be replaced in the configuration data is replaced to obtain the replaced configuration data;

[0025] Obtain the configuration information of the data source, and generate a data source connection instance based on the configuration information;

[0026] According to the connection instance and the replaced configuration data, the configured data source is converted to obtain a data set corresponding to the report to be generated.

[0027] In one of the embodiments, the report style selection instruction carries a style identifier of the selected target report style;

[0028] The data set is presented in the target report style, including:

[0029] Based on the style identifier, determine the data display requirements corresponding to the target report style;

[0030] According to the data display requirements, the data set is processed to obtain the horizontal coordinate, vertical coordinate and data content of the corresponding data set;

[0031] Render the horizontal axis, vertical axis and data content.

[0032] In one embodiment, the method further comprises:

[0033] Get business update data;

[0034] Update the data source based on business update data;

[0035] Based on the report generation requirements, the configured data source is converted to obtain the corresponding data set for the report to be generated, including:

[0036] Based on the report generation requirements, the updated data source after configuration is converted to obtain an updated data set for the report to be generated;

[0037] The data set is presented in the target report style, including:

[0038] The updated data set is displayed using the target report style.

[0039] In one embodiment, the method further comprises:

[0040] According to the scheduled task method, a report that displays the data set in the target report style is obtained, and report prompt information is generated and sent to the user terminal.

[0041] A report generation and display device, the device comprising:

[0042] A report generation request receiving module, used for receiving a report generation request, wherein the report generation request carries a business identifier of a business corresponding to a report to be generated and a report generation requirement;

[0043] The data source acquisition and configuration module is used to acquire the data source of the corresponding business based on the business identifier, and configure the acquired data source to obtain a configured data source;

[0044] The data source conversion module is used to convert the configured data source based on the report generation requirements to obtain the data set corresponding to the report to be generated;

[0045] An initial report style acquisition module is used to acquire an initial report style for displaying a data set;

[0046] The display module is used to determine a target report style from the initial report style based on the received report style selection instruction, and display the data set through the target report style.

[0047] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.

[0048] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0049] The report generation and display method, device, computer equipment and readable storage medium described above receive a report generation request, the report generation request carries the business identifier of the business corresponding to the report to be generated and the report generation requirements, obtains the data source of the corresponding business based on the business identifier, configures the obtained data source to obtain the configured data source, and then converts the configured data source based on the report generation requirements to obtain the data set of the report to be generated, further determines the initial report style for displaying the data set, and based on the received selection instruction for the target report style in the initial report style, displays the data set by selecting the target report style determined by the instruction. Thus, according to the obtained business identifier and report generation requirements, the data source of the corresponding business can be obtained, the data source can be configured, and then the corresponding data set can be extracted from it, and the report can be displayed according to the determined target style. Compared with the traditional method of entering different business systems to query data and making reports based on the queried data, the process of processing between different business systems is simplified and the processing efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 An application scenario diagram of a report generation and display method in an embodiment;

[0051] Figure 2 A flowchart of a report generation and display method in one embodiment;

[0052] Figure 3 A structural block diagram of a report generation and display device in one embodiment;

[0053] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The report generation and display method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The user can generate a report generation request through the terminal and send it to the server 104. The report generation request carries the business identifier of the business corresponding to the report to be generated and the report generation requirement. After receiving the report generation request, the server 104 obtains the data source of the corresponding business based on the business identifier, and configures the obtained data source to obtain a configured data source. Then, the server 104 can convert the configured data source based on the report generation requirement to obtain a data set corresponding to the report to be generated. Further, the server 104 can obtain an initial report style for displaying the data set, and determine the target report style from the initial report style based on the received report style selection instruction, and display the data set through the target report style. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0056] In one embodiment, Figure 2 As shown, a report generation and display method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0057] Step S202: receiving a report generation request, wherein the report generation request carries a service identifier of a service corresponding to a report to be generated and a report generation requirement.

[0058] The report generation request refers to a request for generating a web-side report, and the report generation request carries a business identifier of the business corresponding to the report to be generated, such as a business name or a business ID.

[0059] In this embodiment, the business may be various businesses in the operation of an enterprise, such as financial business, attendance business or workload statistics business, etc. Those skilled in the art will appreciate that this is only an example, and in other embodiments, the business may include more content, and this application does not limit this.

[0060] The report generation requirements may include specific report requirements, such as monthly reports, quarterly reports or daily reports, etc., or may also include specific report contents, such as attendance reports only for a certain person or a department of a company, or absence reports for all employees of the company, etc.

[0061] In this embodiment, the user can log in to the web-based report generation and display system using a user name and password, and then generate a report generation request by inputting or selecting a business identifier of the corresponding business, and send it to the server for subsequent processing.

[0062] Step S204: based on the service identifier, obtain the data source corresponding to the service, and configure the obtained data source to obtain a configured data source.

[0063] The data source refers to the original data corresponding to the business, which may include specific data content for a business, such as attendance data corresponding to the attendance business, financial data corresponding to the financial business, etc.

[0064] In this embodiment, the data source may include data sources in various formats, including but not limited to mysql, oracle, sqlserver, h2, phoenix, mongodb, elasticSearch, presto, moonbox, cassandra, clickhouse, kylin, vertica, hana, impala, etc.

[0065] In this embodiment, the server may query the data source according to the service identifier carried in the acquired report generation request, and obtain the queried data source corresponding to the service identifier.

[0066] Furthermore, the server may configure the acquired data source so that the acquired data source may be processed subsequently.

[0067] Step S206: based on the report generation requirement, convert the configured data source to obtain a data set corresponding to the report to be generated.

[0068] The data set refers to the raw data used to generate web-based business reports.

[0069] In this embodiment, after completing the configuration of the data source, the server may perform data analysis on the configured data source and perform data conversion processing to extract data for generating a report, ie, a data set, from the configured data source.

[0070] Specifically, the server may process the configured data source according to the report generation requirement to extract the corresponding data set.

[0071] Step S208: obtaining an initial report style for displaying the data set.

[0072] Among them, the report style can be a style used for report display, for example, it can include but is not limited to tables, pivot tables, flip charts, line charts, bar charts, scatter charts, pie charts, funnel charts, radar charts, Sankey charts, maps, web page embeds, rich text, and fully custom configured charts, etc.

[0073] In this embodiment, after acquiring the data set, the server can determine the initial report style that can be used to display the data set based on the content of the data set. For example, for meteorological data, it can be determined that a more suitable initial report style is a radar chart, and for geography-related data, the corresponding initial report style can be a map, a scatter plot, etc.

[0074] Step S210: Based on the received report style selection instruction, a target report style is determined from the initial report styles, and the data set is displayed using the target report style.

[0075] In this embodiment, the server may determine an initial report style for displaying the data set according to the extracted data set, and send the initial report style to the web terminal for display.

[0076] In this embodiment, the user can determine the target report style by selecting the initial report style displayed on the web terminal.

[0077] In the above report generation and display method, by receiving a report generation request, the report generation request carries the business identifier of the business corresponding to the report to be generated and the report generation requirements, based on the business identifier, the data source of the corresponding business is obtained, and the obtained data source is configured to obtain the configured data source, and then based on the report generation requirements, the configured data source is converted to obtain the data set of the report to be generated, and further, the initial report style for displaying the data set is determined, and based on the received selection instruction for the target report style in the initial report style, the data set is displayed by selecting the target report style determined by the instruction. Thus, according to the obtained business identifier and report generation requirements, the data source of the corresponding business can be obtained, and the data source can be configured, and then the corresponding data set can be extracted from it, and the report can be displayed according to the determined target style. Compared with the traditional method of entering different business systems to query data and making reports based on the queried data, the process of processing between different business systems is simplified and the processing efficiency is improved.

[0078] In one of the embodiments, configuring the acquired data source to obtain a configured data source may include: determining a version type of the data source based on the acquired data source; determining a corresponding target driver based on the version type; acquiring data source connection information, and configuring the data source through the target driver based on the data source connection information to obtain a configured data source.

[0079] In this embodiment, after obtaining the data source, the server can parse the data source version of the obtained data source to determine the corresponding version type, for example, mysql, oracle, sqlserver, h2, phoenix, mongodb, elasticSearch, presto, moonbox, cassandra, clickhouse, kylin, vertica, hana, impala, etc. mentioned above.

[0080] Furthermore, the server may obtain a driver file of a corresponding version according to the obtained version type, and then establish a corresponding target driver and a candidate driver list according to the obtained driver file.

[0081] In this embodiment, the established target driver can be added to the driver candidate list and sent to the web terminal for display. The user generates a driver selection instruction and sends it to the server by selecting the target driver in the driver candidate list displayed by the web terminal.

[0082] In this embodiment, after receiving the driver selection instruction, the server can obtain a pre-configured data source connection information blank table template and send it to the web terminal to collect the data source connection information entered by the user in the data source connection information blank table template displayed on the web terminal.

[0083] Furthermore, the server may configure the data source through the target driver according to the acquired data source connection information to complete the connection configuration of the database.

[0084] In this embodiment, the data source connection information may also include tuning information, such as the maximum number of connections of the data source, the number of connections of a single user, and the like.

[0085] In the above embodiment, the version type of the data source is determined according to the acquired data source, and then the target driver corresponding to the data source is determined according to the version type, the data source connection information is further acquired, and the data source is configured through the target driver based on the data source connection information to obtain the configured data source. Thus, the data source of any business can be configured through the corresponding target driver, so that the configured data source can be used later, improving the efficiency of report generation.

[0086] In one embodiment, determining the corresponding target driver according to the version type may include: determining the target driver corresponding to the data source from a candidate driver list according to the version type.

[0087] In this embodiment, the method for establishing an alternative driver list may include: obtaining a driver file corresponding to the version type of the data source; storing the driver file in a driver management directory, and parsing the driver file in the driver management directory based on a preset parsing method to obtain corresponding file information; according to the file information, adding the target driver corresponding to the data source to the initial alternative driver list to obtain an alternative driver list.

[0088] In the present embodiment, the server may obtain a driver file of a corresponding version according to the obtained version type. For example, for a MySQL data source, the corresponding driver file may be "mysql-connector-java-5.1.46.ja".

[0089] In this embodiment, after obtaining the driver file of the corresponding version, the server may copy the driver file to a fixed driver directory, for example, to a lib directory.

[0090] In this embodiment, the server may parse the driver file added to the fixed driver directory and generate file information of the corresponding driver file, such as the driver class file name and the physical address of the file.

[0091] Specifically, the server can obtain the driver class file name and the physical address of the file contained in the driver file, that is, the file information, by file parsing. For example, the server can use the Java file processing class to access the internal file to achieve the purpose of parsing and obtain the file information of the driver file.

[0092] Furthermore, the server can add file information to the static object file, thereby adding the target driver of the corresponding data source to the candidate driver list. For example, the driver class file name and the physical address of the file are added to the static map object to obtain the target driver added to the candidate driver list.

[0093] In one of the embodiments, converting a configured data source to obtain a data set corresponding to a report to be generated may include: obtaining corresponding query data and configuration data based on the configured data source; verifying the configuration data to determine whether the configuration data has an injection risk; when the configuration data does not have an injection risk, filtering out variable assignment data from the query data, and replacing the corresponding variables to be replaced in the configuration data based on the variable assignment data to obtain replaced configuration data; obtaining configuration information of the data source, and generating a data source connection instance based on the configuration information; converting the configured data source according to the connection instance and the replaced configuration data to obtain a data set corresponding to the report to be generated.

[0094] In this embodiment, the server can obtain corresponding configuration data according to the configured data source and send it to the web terminal. The user can input corresponding query variable parameters based on the configuration data displayed by the web terminal and generate query data to send to the server.

[0095] In this embodiment, the configuration data may be a SQL string, and the query data may be a variable information set.

[0096] Furthermore, after obtaining the query data and configuration data, the server can verify the configuration data to determine whether the configuration data has injection risks. For example, the server performs injection verification on the SQL string to avoid the risk of SQL string injection. Specifically, regular expressions can be used to remove the comment statements in the SQL string, and then the SQL string is matched to see whether it contains, but not limited to, risky operation instructions such as create, drop, delete, insert, update, truncate, etc., to ensure that the SQL statement only contains instructions for query statements related to select.

[0097] In this embodiment, when the server determines that there are risky instructions in the configuration data, it immediately generates an error message and returns it to the web terminal to prompt the user to modify the SQL string again.

[0098] In this embodiment, after the server passes the verification and there is no injection risk in the configuration data, the server can filter out the variable assignment data from the query data, and replace the variables in the configuration data according to the filtered variable assignment data.

[0099] Specifically, the variables corresponding to the variable assignment data can be divided into query variables and permission variables. The query variable is a variable field, which is assigned a specific value during the actual query to filter the configuration data. The permission variable is assigned a specific value based on the user role of the current web report system login user to filter the configuration data. The difference between the two is that the query variable needs to be assigned a value or use the default value each time it is queried, and all user values ​​are the same, while the permission variable has the same value for users with the same role.

[0100] In this embodiment, after obtaining the variable assignment data, the server can replace the corresponding variable to be replaced in the configuration data to obtain the replaced configuration data, that is, assign the variable assignment data to the configuration data to generate an executable query script. For example, a SQL string "select * from user where id = $id$", where $id$ is the query variable value, is 1, then after the replacement process, the SQL becomes "select * from user where id =?", "?" is a placeholder, and its value is 1. The use of placeholders is to avoid the risk of injection of the replaced value, and at the same time, it can reduce the hard parsing of data SQL and improve execution efficiency.

[0101] Furthermore, the server may obtain configuration information of the data source, ie, the data source connection information mentioned above, and generate a data source connection instance according to the data source connection information to connect to the data source.

[0102] Furthermore, the server may perform data query on the configured data source according to the replaced configuration data, that is, the generated executable query script, and perform data conversion processing to generate a data set corresponding to the report to be generated.

[0103] In one embodiment, the report style selection instruction carries a style identifier of the selected target report style.

[0104] In this embodiment, displaying a data set through a target report style may include: determining data display requirements corresponding to the target report style based on a style identifier; processing the data set according to the data display requirements to obtain the horizontal coordinate, vertical coordinate and data content of the corresponding data set; and rendering the horizontal coordinate, vertical coordinate and data content.

[0105] In this embodiment, the server may determine the selected target report style according to the report identifier carried in the selection instruction, and obtain the data display requirements corresponding to the preset target report style.

[0106] In this embodiment, the obtained data set may include column names and specific data content. The server may process the data set according to the data display requirements corresponding to the target report style, and process it into data corresponding to the report style, for example, data corresponding to a table style or data corresponding to a map style.

[0107] In this embodiment, the server may process the data set according to the data display requirements, and the obtained data may include horizontal coordinate data, vertical coordinate data and specific data content.

[0108] Furthermore, the server can render the processed horizontal coordinates, vertical coordinates and data content, and then push them to the web side for display.

[0109] In this embodiment, corresponding to different report styles, the corresponding horizontal coordinates, vertical coordinates and data contents are different, and the server can process the data set according to the corresponding data display requirements.

[0110] In the above embodiment, by processing the data set according to the corresponding data display requirements, the processed data can be made more in line with the requirements of the corresponding report style, and the rendering display effect can be improved.

[0111] In one of the embodiments, the above method may further include: acquiring business update data; and updating the data source based on the business update data.

[0112] In this embodiment, each business system is updated in real time, and businesses are constantly added, deleted or changed. Each business system can generate business update data according to a preset time interval, for example, one week or one month.

[0113] Furthermore, the business system may send the generated business update data to the server, so that the server updates the data source according to the business update data.

[0114] In this embodiment, based on the report generation requirements, converting the configured data source to obtain a data set corresponding to the report to be generated may include: based on the report generation requirements, converting the configured updated data source to obtain an updated data set for the report to be generated.

[0115] In this embodiment, the server may perform conversion processing on the updated data source based on the report generation requirement to obtain an updated data set corresponding to the report to be generated.

[0116] In this embodiment, displaying the data set by using the target report style may include: displaying the updated data set by using the target report style.

[0117] Furthermore, the server may display the updated data set according to the determined target report style, so as to realize the updated display of the report.

[0118] In this embodiment, when there is a huge change in the data set, causing the specific data content to change in order of magnitude, for example, the previous data was "10", and due to the update of the data set, the data becomes 1000, then the server can update the data set and adjust the displayed report, for example, adjust the order of magnitude relationship of the vertical axis, etc.

[0119] In the above embodiment, by updating the data source based on the business update data and then updating the data set, the business report can be dynamically updated and displayed, thereby improving the timeliness of the report content.

[0120] In one of the embodiments, the method may further include: obtaining a report that displays the data set in a target report style in a scheduled task manner, and generating report prompt information and sending it to a user terminal.

[0121] In this embodiment, the server can configure a scheduled task, that is, through a scheduled task, obtain the report displayed by the target report rock, and generate corresponding report prompt information, such as email, etc., and send it to the user terminal to prompt the user to view the corresponding report.

[0122] In this embodiment, the email can be configured to be received by a specific person or dynamically. The email content, that is, the report, can be Excel or a picture. The timing expression can select a specific type such as a certain day, a certain month, etc., or it can be directly configured using a cron expression string. At the same time, after the timing task is configured, it can be executed immediately to verify the correctness of the configuration.

[0123] In the above embodiment, by obtaining reports and generating report prompt information and sending it to the user terminal in a scheduled task manner, the user can obtain reports regularly and view reports in a more flexible manner.

[0124] In one of the embodiments, the above method may further include: uploading at least one of the report generation request, the data source, the data set, and the initial report style to the blockchain node for storage.

[0125] Blockchain refers to a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block.

[0126] Specifically, blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0127] In this embodiment, the server can upload and store one or more data including the report generation request, data source, data set, and initial report style in the node of the blockchain to ensure the privacy and security of the data.

[0128] In the above embodiment, by uploading at least one of the report generation request, the data source, the data set, and the initial report style to the blockchain and storing them in the nodes of the blockchain, the privacy of the data stored in the blockchain node can be guaranteed, and the security of the data can be improved.

[0129] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0130] In one embodiment, Figure 3 As shown, a report generation and display device is provided, including a report generation request receiving module 100, a data source acquisition and configuration module 200, a data source conversion module 300, an initial report style acquisition module 400 and a display module 500, wherein:

[0131] The report generation request receiving module 100 is used to receive a report generation request, wherein the report generation request carries a service identifier of a service corresponding to a report to be generated and a report generation requirement.

[0132] The data source acquisition and configuration module 200 is used to acquire the data source of the corresponding business based on the business identifier, and configure the acquired data source to obtain a configured data source.

[0133] The data source conversion module 300 is used to convert the configured data source based on the report generation requirement to obtain a data set corresponding to the report to be generated.

[0134] The initial report style acquisition module 400 is used to acquire an initial report style for displaying a data set.

[0135] The display module 500 is used to determine a target report style from the initial report styles based on the received report style selection instruction, and display the data set through the target report style.

[0136] In one embodiment, the data source acquisition and configuration module 200 may include:

[0137] The version type acquisition submodule is used to determine the version type of the data source based on the acquired data source.

[0138] The target driver determination submodule is used to determine the corresponding target driver according to the version type.

[0139] The configuration submodule is used to obtain data source connection information, and configure the data source through the target driver based on the data source connection information to obtain a configured data source.

[0140] In one embodiment, the target driver determination submodule is used to determine the target driver corresponding to the data source from the candidate driver list according to the version type.

[0141] In this embodiment, the above device may further include:

[0142] The candidate driver list establishing module is used to establish the candidate driver list.

[0143] In this embodiment, the candidate driver list establishing module may include:

[0144] The driver file acquisition submodule is used to obtain the driver file corresponding to the version type of the data source.

[0145] The parsing submodule is used to store the driver files in the driver management directory, and parse the driver files in the driver management directory based on a preset parsing method to obtain corresponding file information.

[0146] The candidate driver list generation submodule is used to add the target driver corresponding to the data source to the initial candidate driver list according to the file information to obtain the candidate driver list.

[0147] In one embodiment, the data source conversion module 300 may include:

[0148] The acquisition submodule is used to obtain the corresponding query data and configuration data based on the configured data source.

[0149] The verification submodule is used to verify the configuration data and determine whether there is an injection risk in the configuration data.

[0150] The replacement submodule is used to filter out variable assignment data from the query data when there is no injection risk in the configuration data, and replace the corresponding variables to be replaced in the configuration data based on the variable assignment data to obtain the replaced configuration data.

[0151] The connection instance generation submodule is used to obtain the configuration information of the data source and generate a data source connection instance based on the configuration information.

[0152] The conversion submodule is used to convert the configured data source according to the connection instance and the replaced configuration data to obtain the data set corresponding to the report to be generated.

[0153] In one embodiment, the report style selection instruction carries a style identifier of the selected target report style.

[0154] In this embodiment, the display module 500 may include:

[0155] The data display requirement determination submodule is used to determine the data display requirements corresponding to the target report style based on the style identifier.

[0156] The processing submodule is used to process the data set according to the data display requirements to obtain the horizontal coordinate, vertical coordinate and data content of the corresponding data set.

[0157] The rendering submodule is used to render the horizontal axis, vertical axis and data content.

[0158] In one embodiment, the above device may further include:

[0159] The update data acquisition module is used to obtain business update data.

[0160] The update module is used to update the data source based on the business update data.

[0161] In this embodiment, the data source conversion module 300 is used to convert the updated data source after the configuration is completed based on the report generation requirement to obtain an updated data set for the report to be generated.

[0162] In this embodiment, the display module 500 is used to display the updated data set through the target report style.

[0163] In one embodiment, the above device further comprises:

[0164] The report prompt sending module is used to obtain a report that displays a data set in a target report style in a scheduled task manner, and generate report prompt information and send it to the user terminal.

[0165] In one embodiment, the above device may further include:

[0166] The storage module is used to upload at least one of the report generation request, data source, data set and initial report style to the blockchain node for storage.

[0167] The specific definition of the report generation and display device can be found in the definition of the report generation and display method above, which will not be repeated here. Each module in the above report generation and display device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0168] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as report generation requests, data sources, data sets, and initial report styles. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a report generation and display method is implemented.

[0169] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0170] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: receiving a report generation request, wherein the report generation request carries a business identifier of a business corresponding to a report to be generated and a report generation requirement; based on the business identifier, obtaining a data source of the corresponding business, and configuring the obtained data source to obtain a configured data source; based on the report generation requirement, converting the configured data source to obtain a data set corresponding to the report to be generated; obtaining an initial report style for displaying the data set; based on the received report style selection instruction, determining a target report style from the initial report style, and displaying the data set through the target report style.

[0171] In one of the embodiments, when the processor executes the computer program, configuring the acquired data source to obtain a configured data source may include: determining a version type of the data source based on the acquired data source; determining a corresponding target driver based on the version type; acquiring data source connection information, and configuring the data source through the target driver based on the data source connection information to obtain a configured data source.

[0172] In one embodiment, the processor determines the corresponding target driver according to the version type when executing the computer program, which may include: determining the target driver corresponding to the data source from the candidate driver list according to the version type.

[0173] In this embodiment, the method for establishing an alternative driver list when the processor executes a computer program may include: obtaining a driver file corresponding to the version type of the data source; storing the driver file in a driver management directory, and parsing the driver file in the driver management directory based on a preset parsing method to obtain corresponding file information; and adding a target driver corresponding to the data source to the initial alternative driver list based on the file information to obtain an alternative driver list.

[0174] In one of the embodiments, when the processor executes the computer program, it converts the configured data source to obtain a data set corresponding to the report to be generated, which may include: based on the configured data source, obtaining corresponding query data and configuration data; verifying the configuration data to determine whether there is an injection risk in the configuration data; when the configuration data does not have an injection risk, filtering out variable assignment data from the query data, and replacing the corresponding to-be-replaced variables in the configuration data based on the variable assignment data to obtain the replaced configuration data; obtaining configuration information of the data source, and generating a data source connection instance based on the configuration information; converting the configured data source according to the connection instance and the replaced configuration data to obtain a data set corresponding to the report to be generated.

[0175] In one embodiment, the report style selection instruction carries a style identifier of the selected target report style.

[0176] In this embodiment, when the processor executes a computer program, it realizes displaying the data set through the target report style, which may include: determining the data display requirements corresponding to the target report style based on the style identifier; processing the data set according to the data display requirements to obtain the horizontal coordinate, vertical coordinate and data content of the corresponding data set; rendering the horizontal coordinate, vertical coordinate and data content.

[0177] In one of the embodiments, when the processor executes the computer program, the following steps may also be implemented: obtaining business update data; and updating the data source based on the business update data.

[0178] In this embodiment, when the processor executes the computer program, based on the report generation requirements, the configured data source is converted to obtain a data set corresponding to the report to be generated, which may include: based on the report generation requirements, the configured updated data source is converted to obtain an updated data set for the report to be generated.

[0179] In this embodiment, the processor executes the computer program to display the data set in the target report style, which may include: displaying the updated data set in the target report style.

[0180] In one of the embodiments, when the processor executes the computer program, the following steps are further implemented: obtaining a report that displays the data set in a target report style in a scheduled task manner, and generating report prompt information to send to the user terminal.

[0181] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a report generation request, the report generation request carrying a business identifier of a business corresponding to a report to be generated and a report generation requirement; based on the business identifier, obtaining a data source of the corresponding business, and configuring the obtained data source to obtain a configured data source; based on the report generation requirement, converting the configured data source to obtain a data set corresponding to the report to be generated; obtaining an initial report style for displaying the data set; based on the received report style selection instruction, determining a target report style from the initial report style, and displaying the data set through the target report style.

[0182] In one of the embodiments, when the computer program is executed by the processor, configuring the acquired data source to obtain a configured data source may include: determining a version type of the data source based on the acquired data source; determining a corresponding target driver based on the version type; obtaining data source connection information, and configuring the data source through the target driver based on the data source connection information to obtain a configured data source.

[0183] In one embodiment, when the computer program is executed by the processor, determining the corresponding target driver according to the version type may include: determining the target driver corresponding to the data source from the candidate driver list according to the version type.

[0184] In this embodiment, the method for establishing an alternative driver list when the computer program is executed by the processor may include: obtaining a driver file corresponding to the version type of the data source; storing the driver file in a driver management directory, and parsing the driver file in the driver management directory based on a preset parsing method to obtain corresponding file information; and adding the target driver corresponding to the data source to the initial alternative driver list based on the file information to obtain an alternative driver list.

[0185] In one of the embodiments, when the computer program is executed by the processor, it is implemented to convert the configured data source to obtain a data set corresponding to the report to be generated, which may include: based on the configured data source, obtaining corresponding query data and configuration data; verifying the configuration data to determine whether there is an injection risk in the configuration data; when the configuration data does not have an injection risk, filtering out variable assignment data from the query data, and replacing the corresponding to-be-replaced variables in the configuration data based on the variable assignment data to obtain the replaced configuration data; obtaining configuration information of the data source, and generating a data source connection instance based on the configuration information; converting the configured data source according to the connection instance and the replaced configuration data to obtain a data set corresponding to the report to be generated.

[0186] In one embodiment, the report style selection instruction carries a style identifier of the selected target report style.

[0187] In this embodiment, when the computer program is executed by the processor, it realizes displaying the data set through the target report style, which may include: determining the data display requirements corresponding to the target report style based on the style identifier; processing the data set according to the data display requirements to obtain the horizontal coordinate, vertical coordinate and data content of the corresponding data set; rendering the horizontal coordinate, vertical coordinate and data content.

[0188] In one of the embodiments, when the computer program is executed by the processor, the following steps may also be implemented: obtaining business update data; and updating the data source based on the business update data.

[0189] In this embodiment, when the computer program is executed by the processor, based on the report generation requirements, the configured data source is converted to obtain a data set corresponding to the report to be generated, which may include: based on the report generation requirements, the configured updated data source is converted to obtain an updated data set for the report to be generated.

[0190] In this embodiment, when the computer program is executed by the processor, presenting the data set through the target report style may include: presenting the updated data set through the target report style.

[0191] In one of the embodiments, when the computer program is executed by the processor, the following steps are also implemented: obtaining a report that displays the data set in a target report style in a scheduled task manner, and generating report prompt information and sending it to the user terminal.

[0192] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0193] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0194] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A report generation and display method, characterized in that: The method comprises: Receiving a report generation request, wherein the report generation request carries a service identifier of a service corresponding to a report to be generated and a report generation requirement; Based on the service identifier, obtaining a data source corresponding to the service, and determining a version type of the data source according to the obtained data source; Determine a corresponding target driver according to the version type; Acquire data source connection information, and configure the data source through the target driver based on the data source connection information to obtain a configured data source; Based on the report generation requirement, convert the configured data source to obtain a data set corresponding to the report to be generated; Obtaining an initial report style for displaying the data set; Based on the received report style selection instruction, determine a target report style from the initial report style, and display the data set by using the target report style; The step of converting the configured data source to obtain a data set corresponding to the report to be generated includes: Based on the configured data source, obtain corresponding query data and configuration data; Verifying the configuration data to determine whether the configuration data has an injection risk; When the configuration data does not have an injection risk, the variable assignment data is screened out from the query data, and based on the variable assignment data, the corresponding to-be-replaced variable in the configuration data is replaced to obtain the replaced configuration data; Acquire configuration information of the data source, and generate a data source connection instance based on the configuration information; According to the connection instance and the replaced configuration data, the configured data source is converted to obtain a data set corresponding to the report to be generated; The determining a corresponding target driver according to the version type includes: Determining a target driver corresponding to the data source from a list of candidate drivers according to the version type; The method of establishing the candidate driver list includes: Get the driver file corresponding to the version type of the data source; The driver file is stored in a driver management directory, and the driver file in the driver management directory is parsed based on a preset parsing method to obtain corresponding file information; According to the file information, the target driver corresponding to the data source is added to the initial candidate driver list to obtain the candidate driver list.

2. The method according to claim 1, characterized in that The report style selection instruction carries a style identifier of a selected target report style; The presenting the data set by using the target report style includes: Based on the style identifier, determining data display requirements corresponding to the target report style; According to the data display requirements, the data set is processed to obtain the horizontal coordinate, the vertical coordinate and the data content corresponding to the data set; The horizontal coordinate, the vertical coordinate and the data content are rendered.

3. The method according to claim 1, characterized in that The method further comprises: Get business update data; updating the data source based on the business update data; The step of converting the configured data source based on the report generation requirement to obtain a data set corresponding to the report to be generated includes: Based on the report generation requirement, the configured updated data source is converted to obtain an updated data set for the report to be generated; The presenting the data set by using the target report style includes: The updated data set is presented using the target report style.

4. The method according to claim 3, characterized in that The method further comprises: In a timed task manner, a report that displays the data set in the target report style is obtained, and report prompt information is generated and sent to a user terminal.

5. A report generation and display device, characterized in that: The device comprises: A report generation request receiving module, used to receive a report generation request, wherein the report generation request carries a business identifier of a business corresponding to a report to be generated and a report generation requirement; A data source acquisition and configuration module, used to acquire the data source of the corresponding business based on the business identifier, and determine the version type of the data source according to the acquired data source; determine the corresponding target driver according to the version type; acquire data source connection information, and configure the data source through the target driver based on the data source connection information to obtain a configured data source; A data source conversion module, used to convert the configured data source based on the report generation requirements to obtain a data set corresponding to the report to be generated; An initial report style acquisition module, used to acquire an initial report style for displaying the data set; A display module, configured to determine a target report style from the initial report style based on the received report style selection instruction, and display the data set by using the target report style; The data source conversion module includes: An acquisition submodule is used to acquire corresponding query data and configuration data based on the configured data source; A verification submodule, used to verify the configuration data to determine whether the configuration data has an injection risk; A replacement submodule, for, when the configuration data does not have an injection risk, filtering out variable assignment data from the query data, and replacing the corresponding to-be-replaced variables in the configuration data based on the variable assignment data, to obtain replaced configuration data; A connection instance generation submodule, used to obtain configuration information of the data source and generate a data source connection instance based on the configuration information; A conversion submodule, configured to convert the configured data source according to the connection instance and the replaced configuration data to obtain a data set corresponding to the report to be generated; The data source acquisition and configuration module includes: A target driver determination submodule, used to determine a target driver corresponding to the data source from a candidate driver list according to the version type; A driver file acquisition submodule is used to acquire a driver file corresponding to the version type of the data source; The parsing submodule is used to store the driver file in the driver management directory, and parse the driver file in the driver management directory based on a preset parsing method to obtain corresponding file information; The candidate driver list generation submodule is used to add the target driver corresponding to the data source to the initial candidate driver list according to the file information to obtain the candidate driver list.

6. The device according to claim 5, characterized in that The report style selection instruction carries a style identifier of a selected target report style; The display module comprises: A data display requirement determination submodule, used to determine the data display requirement corresponding to the target report style based on the style identifier; A processing submodule, used to process the data set according to the data display requirements to obtain the horizontal coordinate, vertical coordinate and data content corresponding to the data set; The rendering submodule is used to render the horizontal coordinate, the vertical coordinate and the data content.

7. The device according to claim 5, characterized in that The device also includes: Update data acquisition module, used to acquire business update data; An updating module, used for updating the data source based on the business update data; The data source conversion module is used to convert the updated data source after the configuration is completed based on the report generation requirement to obtain the updated data set for the report to be generated; The display module is used to display the updated data set through the target report style.

8. The device according to claim 7, characterized in that The device also includes: The report prompt sending module is used to obtain a report that displays the data set in the target report style in a scheduled task manner, and generate report prompt information and send it to the user terminal.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

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

Citation Information

Patent Citations

  • Method and device for generating report

    CN108132945A

  • Financial detail data generation method and device, computer equipment and storage medium

    CN109816503A