Report data extraction method, device and computer equipment
By obtaining the data filtering conditions and initial reports configured by the user, generating and executing query statements, obtaining data from different data sources and correlation, the cumbersome and time-consuming problems in the existing technology are solved, and efficient report data extraction is achieved.
Patent Information
- Application Number
- CN202010360039.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-04-30
AI Technical Summary
The prior art is cumbersome and time-consuming to process table data associations of different data sources, and it is impossible to achieve simultaneous access and data associations between multiple data sources.
By obtaining the data filtering conditions and multiple initial reports configured by the user based on the preset report configuration template, a query statement is generated and executed, the report data is obtained from each data source, and the obtained data is associated to generate a target report.
It realizes that data from multiple reports can be obtained in one query, which reduces the cumbersome operation, saves user operation time, and improves report data extraction efficiency.
Smart Images

Figure CN111552712B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of big data processing technology, and in particular to a report data extraction device and computer equipment. Background Art
[0002] In existing products, only data reports under the same data source can be associated. When it is necessary to associate table data in different types of data sources, since the data comes from different data sources, for computer devices, it is often necessary to use the connection client provided by each data source for separate access. It is impossible to use one connection to access multiple data sources at the same time, and it is also impossible to associate data from different data sources in one connection.
[0003] The inventors of the present invention found in their research that the traditional access method requires users to compare the data of each data source in turn according to their own needs, and then manually operate to obtain the report content they need. This is not only cumbersome to operate, but also when the amount of data is very large, the workload and time cost are extremely high. Summary of the invention
[0004] In view of this, an object of the embodiments of the present invention is to provide a report data extraction method, apparatus, computer equipment and computer-readable storage medium, which are used to solve the problem that the traditional report data extraction method is cumbersome to operate and takes a lot of time.
[0005] To achieve the above object, an embodiment of the present invention provides a report data extraction method, comprising:
[0006] Obtain data filtering conditions and multiple initial reports configured by the user based on the preset report configuration template;
[0007] Generate a query statement according to the data screening condition and the multiple initial reports;
[0008] Executing the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports; and
[0009] The acquired multiple report data are associated with each other to generate a target report.
[0010] Optionally, before the step of obtaining the data screening conditions and multiple initial reports configured by the user based on a preset report configuration template, the step further includes:
[0011] In response to the report creation request, a data report is created according to the report configuration data carried in the report creation request, wherein the data report is at least one report among the multiple initial reports.
[0012] Optionally, before the step of responding to the report creation request and creating a data report according to the report configuration data carried in the report creation request, the method further includes:
[0013] Displaying a report configuration interface so that the user can configure the report configuration data based on the report configuration interface;
[0014] When a report configuration completion instruction triggered by a user is received, the report creation request is generated.
[0015] Optionally, generating a query statement according to the data screening condition and the multiple initial reports includes:
[0016] Get the data sets corresponding to each initial report;
[0017] Determine the query statements corresponding to each initial report according to the data screening condition and the data set;
[0018] The determined query statements are spliced using a preset splicing tool to generate the query statement.
[0019] Optionally, generating a target report by performing report association on the acquired plurality of report data includes:
[0020] Fill the first data information under the data field corresponding to the data screening condition into the blank report;
[0021] Fill the second data information under the data fields in the plurality of report data except the data fields corresponding to the data screening conditions into the corresponding positions of the first data information to generate the target report.
[0022] Optionally, after the step of generating a target report by performing report association on the plurality of report data obtained, the step further includes:
[0023] The target report is compressed, wherein the target report is stored in a blockchain node.
[0024] Optionally, after the step of generating a target report by performing report association on the plurality of report data obtained, the step further includes:
[0025] A reminder message is sent to the user to remind the user to view the target report, wherein the reminder message carries a link to the target report.
[0026] To achieve the above purpose, an embodiment of the present invention further provides a report data extraction device, comprising:
[0027] The acquisition module is used to obtain the data screening conditions and multiple initial reports configured by the user based on the preset report configuration template;
[0028] A generating module, used for generating a query statement according to the data screening condition and the multiple initial reports;
[0029] An execution module, used for executing the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports; and
[0030] The association module is used to associate the acquired multiple report data to generate a target report.
[0031] To achieve the above objectives, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the report data extraction method as described above when executing the computer program.
[0032] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the report data extraction method as described above.
[0033] The report data extraction method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present invention obtain data screening conditions and multiple initial reports configured by the user based on a preset report configuration template; generate query statements according to the data screening conditions and the multiple initial reports; execute the query statements to obtain corresponding report data from the data sources corresponding to each of the initial reports; and generate a target report by associating the obtained multiple report data. The embodiments of the present invention can obtain data of multiple reports through one query without querying each report data in sequence, thereby reducing the complexity of report data extraction operations, saving user operation time, and improving report data extraction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The figure is a schematic diagram of the steps of an implementation method of the report data extraction method of the present invention.
[0035] Figure 2 The present invention is a flowchart of the detailed steps of generating query statements according to the data screening conditions and the multiple initial reports in one embodiment of the present invention.
[0036] Figure 3 The present invention is a flowchart of the detailed steps of generating a target report by associating the acquired multiple report data in one embodiment of the present invention.
[0037] Figure 4It is a schematic diagram of program modules of a report data extraction device according to an embodiment of the present invention.
[0038] Figure 5 The figure is a schematic diagram of the hardware structure of a computer device according to one embodiment of the present invention.
[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] The advantages of the present invention are further described below in conjunction with the accompanying drawings and specific embodiments.
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0042] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0043] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0044] In the description of the present invention, it should be understood that the numerical labels before the steps do not identify the order of executing the steps, but are only used to facilitate the description of the present invention and distinguish each step, and therefore cannot be understood as a limitation of the present invention.
[0045] See also Figure 1, showing a flow chart of the report data extraction method of the first embodiment of the present invention. It can be understood that the flow chart in the embodiment of the present method is not used to limit the order of executing the steps. The following is an exemplary description of a report data extraction device (hereinafter referred to as "extraction device") as the execution subject. The extraction device can be applied to a computer device, and the computer device can be a mobile phone, a tablet personal computer, a laptop computer, a server, and other devices with data transmission functions. The details are as follows:
[0046] Step S10, obtaining data screening conditions and multiple initial reports configured by the user based on a preset report configuration template.
[0047] Specifically, the user can configure data screening conditions and multiple initial reports through a report configuration template, wherein the initial report is a report to be extracted.
[0048] The report configuration template is a configuration interface provided by the front end for configuring data screening conditions and the multiple initial reports.
[0049] The data screening condition is a data field contained in each initial report. For example, if there are three initial reports A, B, and C, and if the three reports A, B, and C all have an organization field, the organization field can be used as the data screening condition. Similarly, if the three reports A, B, and C all have channel and product fields, the channel and product fields can also be used as the data screening condition. If the A and B reports have an organization field, but the C report does not have an organization field, the organization field cannot be used as the data screening condition for the three initial reports.
[0050] In this embodiment, there are many ways for the user to configure the data screening conditions and the multiple initial reports, for example, through a drop-down option, a checkbox, or a text field in the configuration interface. In one embodiment, when configuring through a drop-down option, the front end is required to display each initial report in a list in the configuration interface, and then the user can drag out the initial table in the displayed list to complete the configuration of the initial report.
[0051] It should be noted that when configuring data filtering conditions, the user needs to complete the configuration of the initial report first before determining the configurable data filtering conditions based on the initial report configured by the user. When configuring data filtering conditions, the configurable data fields can also be displayed to the user in a list so that the user can select the corresponding data field in the list as the data filtering condition. After the user drags the corresponding data field in the displayed list, the configuration of the data filtering condition is completed.
[0052] In one embodiment, when configuring the data screening conditions and the initial report, the format of the target report can also be configured through the report configuration template, such as excel, csv, txt format, etc.
[0053] Furthermore, in order to configure the initial report, in one embodiment, before the step of obtaining the data screening conditions and multiple initial reports configured by the user based on the preset report configuration template, the method further includes:
[0054] In response to the report creation request, a data report is created according to the report configuration data carried in the report creation request, wherein the data report is at least one report among the multiple initial reports.
[0055] Specifically, the report configuration data may include format information of the data report, such as excel, csv, or txt format information. In this embodiment, the report configuration data also includes configuration item information such as cell format, header format, and data field information contained in the data report.
[0056] When a data report needs to be created, the user may first configure the report configuration data, and then trigger a report creation request based on the configured report configuration data, so that a data report may be created according to the report creation request.
[0057] It should be noted that in this embodiment, when creating a data report, multiple data reports can be created at one time, or one data report can be created at one time, that is, the report creation request can include report configuration data of one data report, or report configuration data of multiple data reports.
[0058] In one embodiment, in order to improve the efficiency of creating data reports, the data reports to be created can be preprocessed in advance to obtain a data set. The specific preprocessing operations are as follows: first, the report developer provides the data source corresponding to the report data, and the query statement corresponding to the correct query of the data in the data source, such as SQL (Structured Query Language, SQL) query statement; then, the query operation can be executed based on the SQL to obtain all the data field names of the data included in the data source; then, aliases can be added to the obtained data fields to facilitate business personnel to identify them when submitting data collection tasks; finally, the association relationship between these SQL, data sources, data fields, and corresponding field aliases can be saved in a table to obtain a data set.
[0059] After obtaining the data set, when configuring report configuration data, the user can quickly complete the configuration operation of the report configuration data by obtaining the data fields contained in the data set, and at the same time associate the created data report with the data set and save it.
[0060] Furthermore, in one embodiment, before the step of responding to a report creation request and creating a data report according to the report configuration data carried in the report creation request, it also includes: displaying a report configuration interface for the user to configure the report configuration data based on the report configuration interface; and generating the report creation request when receiving a report configuration completion instruction triggered by the user.
[0061] Specifically, in order to facilitate the configuration of report configuration data, a report configuration interface can be displayed. Based on the report configuration interface, the user can configure the report configuration data by dragging, checking boxes, etc. After the user completes the configuration of the report data, the user can trigger a report configuration completion instruction. For example, the user triggers a report configuration completion instruction by clicking a report creation button. When the report configuration completion instruction is received, a report creation request can be generated according to the instruction.
[0062] Step S11, generating a query statement according to the data screening condition and the multiple initial reports.
[0063] Specifically, different data screening conditions correspond to different query statements for the query target report, and different initial reports also correspond to different query statements for the query target report. In this embodiment, after obtaining the data screening conditions and the initial report, the query statement for the query target report can be obtained from the corresponding data set based on this information, wherein the data set is pre-established by the user and saved in association with the report to be extracted, and the data source, data field, and field alias corresponding to the data field are stored in the data set, as well as the query statement corresponding to the data information under each data field.
[0064] Further, in one embodiment, referring to Figure 2 , the generating of query statements according to the data screening conditions and the multiple initial reports includes:
[0065] Step S20, obtaining data sets corresponding to each initial report.
[0066] Specifically, the user may associate and save the initial report with the data set in advance, so that the corresponding data set may be obtained according to each initial report.
[0067] Step S21, determining the query statements corresponding to each initial report according to the data screening condition and the data set.
[0068] Specifically, since the data set stores query statements corresponding to querying various data fields, after obtaining the data screening condition and the corresponding data set, the query statement corresponding to the initial report can be determined from the data set.
[0069] Step S22: Use a preset splicing tool to splice the determined query statements to generate the query statements.
[0070] Specifically, the splicing tool is a toolkit for SQL parsing and splicing. In this embodiment, the splicing tool is preferably Druid, which is open sourced by Alibaba. Through Druid, multiple determined query statements can be spliced to obtain the query statement of the final query target report.
[0071] In one embodiment, when generating a query statement SQL for querying a target report, a real-time or scheduled method can be used, wherein the real-time method means that after obtaining the data configured by the user through the report configuration template, the query statement SQL for querying multiple report data will be immediately generated according to the user's configuration data; the scheduled method means that the system scans the data configured by the user through the report configuration template through a scheduled task. When it is found that there is data configured by the user based on the report configuration template, the query statement SQL for querying multiple report data can be generated according to the user's configured data.
[0072] Step S12: executing the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports.
[0073] Specifically, when executing the query statement, it is necessary to obtain a database connection according to the data source corresponding to each initial report, and then execute the query statement through the obtained database connection to obtain the report data corresponding to the query statement from each data source.
[0074] Step S13: performing report association on the acquired multiple report data to generate a target report.
[0075] Specifically, after a plurality of report data are acquired, report association is performed on the acquired report data so as to fill the plurality of report data into a blank report to generate a target report.
[0076] Further, refer to Figure 3 , the step of associating the acquired multiple report data to generate the target report includes:
[0077] Step S30, filling the first data information under the data field corresponding to the data screening condition into the blank report;
[0078] Step S31, filling the second data information under the data fields except the data fields corresponding to the data screening conditions in the plurality of report data into the corresponding positions of the first data information, to generate the target report.
[0079] Specifically, since the multiple report data obtained all have data fields corresponding to the data filtering conditions, when generating the target report, the first data information under the data field corresponding to the data filtering conditions can be first filled into the blank report. After that, the second data information under the data field in each report data except the data field corresponding to the data filtering conditions can be filled into the corresponding position of the first data information. After all the data are filled in, the obtained report is the target report.
[0080] For example, report data A is the data of data report A under a company's data source A, and report data B is the data of data report B under the company's data source B. Data report A is the product information of each organization, and data report B is the channel information of each organization. Both product information and channel information correspond to the organization ID of each organization, wherein the organization field is used as a data screening condition. Therefore, when generating a target report, you can first fill in each organization ID under the organization field into a blank report, and then fill in the data information associated with each organization ID under the product information field in report data A into the blank report in turn. For example, if the organization field has ID1, ID2, and ID3, you can first fill in the data information associated with ID1 under the product information field in report data A into the blank report, and then fill in the data information associated with ID2 under the product information field in report data A into the blank report, and finally fill in the data information associated with ID3 under the product information field in report data A into the blank report. Similarly, after completing filling the target report with the data in report data A, fill the blank report with the data in report data B according to the above method. After completing filling all the data, the resulting report is the target report.
[0081] It should be noted that the blank report mentioned above is a report without any report data.
[0082] The report data extraction method proposed in this embodiment of the present invention obtains data screening conditions and multiple initial reports configured by the user based on a preset report configuration template; generates query statements according to the data screening conditions and the multiple initial reports; executes the query statements to obtain corresponding report data from the data sources corresponding to each of the initial reports; and generates a target report by associating the obtained multiple report data. The embodiment of the present invention can obtain data of multiple reports through one query without querying each report data in sequence, thereby reducing the complexity of report data extraction operations, saving user operation time, and improving report data extraction efficiency.
[0083] Furthermore, in one embodiment, after the step of generating a target report by associating the acquired multiple report data, the method further includes:
[0084] The target report is compressed, wherein the target report is stored in a blockchain node.
[0085] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target report, the above-mentioned target report can also be stored in a node of a blockchain.
[0086] Specifically, after the target report is generated, the generated target report may be compressed in order to save data storage space.
[0087] Furthermore, in one embodiment, after the step of generating a target report by associating the acquired multiple report data, the method further includes:
[0088] A reminder message is sent to the user to remind the user to view the target report, wherein the reminder message carries a link to the target report.
[0089] Specifically, after the target report is generated, in order to enable the user to know the target report and its generation in time, a reminder message can be sent to the user after the target report is generated to remind the user to view the target report. In this embodiment, the reminder message can be sent in the form of text messages or emails.
[0090] In this embodiment, in order to facilitate the user to view the target report, when sending a reminder message to the user, a link to download the target report can be carried in the reminder message, so that the user can conveniently download the target report through the link.
[0091] See also Figure 4, showing a program module schematic diagram of a report data extraction device 400 (hereinafter referred to as "extraction device" 400) according to an embodiment of the present invention. The extraction device 400 can be applied to a computer device, and the computer device can be a mobile phone, a tablet personal computer, a laptop computer, a server, or other device with a data transmission function. In this embodiment, the extraction device 400 may include or be divided into one or more program modules, and one or more program modules are stored in a storage medium and executed by one or more processors to complete the present invention and implement the above-mentioned report data extraction method. The program module referred to in the embodiment of the present invention refers to a series of computer program instruction segments that can complete specific functions, and is more suitable for describing the execution process of the report data extraction method in a storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment:
[0092] The acquisition module 401 is used to acquire data screening conditions and multiple initial reports configured by the user based on a preset report configuration template.
[0093] Specifically, the user can configure data screening conditions and multiple initial reports through a report configuration template, wherein the initial report is a report to be extracted.
[0094] The report configuration template is a configuration interface provided by the front end for configuring data screening conditions and the multiple initial reports.
[0095] The data screening condition is a data field contained in each initial report. For example, if there are three initial reports A, B, and C, and if the three reports A, B, and C all have an organization field, the organization field can be used as the data screening condition. Similarly, if the three reports A, B, and C all have channel and product fields, the channel and product fields can also be used as the data screening condition. If the A and B reports have an organization field, but the C report does not have an organization field, the organization field cannot be used as the data screening condition for the three initial reports.
[0096] In this embodiment, there are many ways for the user to configure the data screening conditions and the multiple initial reports, for example, through a drop-down option, a checkbox, or a text field in the configuration interface. In one embodiment, when configuring through a drop-down option, the front end is required to display each initial report in a list in the configuration interface, and then the user can drag out the initial table in the displayed list to complete the configuration of the initial report.
[0097] It should be noted that when configuring data filtering conditions, the user needs to complete the configuration of the initial report first before determining the configurable data filtering conditions based on the initial report configured by the user. When configuring data filtering conditions, the configurable data fields can also be displayed to the user in a list so that the user can select the corresponding data field in the list as the data filtering condition. After the user drags the corresponding data field in the displayed list, the configuration of the data filtering condition is completed.
[0098] In one embodiment, when configuring the data screening conditions and the initial report, the format of the target report can also be configured through the report configuration template, such as excel, csv, txt format, etc.
[0099] Furthermore, in one embodiment, the extraction device 400 further includes a response module.
[0100] The response module is used to respond to the report creation request and create a data report according to the report configuration data carried in the report creation request, wherein the data report is at least one report among the multiple initial reports.
[0101] Specifically, the report configuration data may include format information of the data report, such as excel, csv, or txt format information. In this embodiment, the report configuration data also includes configuration item information such as cell format, header format, and data field information contained in the data report.
[0102] When a data report needs to be created, the user may first configure the report configuration data, and then trigger a report creation request based on the configured report configuration data, so that a data report may be created according to the report creation request.
[0103] It should be noted that in this embodiment, when creating a data report, multiple data reports can be created at one time, or one data report can be created at one time, that is, the report creation request can include report configuration data of one data report, or report configuration data of multiple data reports.
[0104] In one embodiment, in order to improve the efficiency of creating data reports, the data reports to be created can be preprocessed in advance to obtain a data set. The specific preprocessing operations are as follows: first, the report developer provides the data source corresponding to the report data, and the query statement corresponding to the correct query of the data in the data source, such as SQL (Structured Query Language, SQL) query statement; then, the query operation can be executed based on the SQL to obtain all the data field names of the data included in the data source; then, aliases can be added to the obtained data fields to facilitate business personnel to identify them when submitting data collection tasks; finally, the association relationship between these SQL, data sources, data fields, and corresponding field aliases can be saved in a table to obtain a data set.
[0105] After obtaining the data set, when configuring report configuration data, the user can quickly complete the configuration operation of the report configuration data by obtaining the data fields contained in the data set, and at the same time associate the created data report with the data set and save it.
[0106] Furthermore, in one embodiment, the response module is also used to display a report configuration interface for the user to configure the report configuration data based on the report configuration interface; and to generate the report creation request when receiving a report configuration completion instruction triggered by the user.
[0107] Specifically, in order to facilitate the configuration of report configuration data, a report configuration interface can be displayed. Based on the report configuration interface, the user can configure the report configuration data by dragging, checking boxes, etc. After the user completes the configuration of the report data, the user can trigger a report configuration completion instruction. For example, the user triggers a report configuration completion instruction by clicking a report creation button. When the report configuration completion instruction is received, a report creation request can be generated according to the instruction.
[0108] The generating module 402 is used to generate a query statement according to the data screening condition and the multiple initial reports.
[0109] Specifically, different data screening conditions correspond to different query statements for the query target report, and different initial reports also correspond to different query statements for the query target report. In this embodiment, after obtaining the data screening conditions and the initial report, the query statement for the query target report can be obtained from the corresponding data set based on this information, wherein the data set is pre-established by the user and saved in association with the report to be extracted, and the data source, data field, and field alias corresponding to the data field are stored in the data set, as well as the query statement corresponding to the data information under each data field.
[0110] In one implementation, the generating module 402 is further configured to obtain a data set corresponding to each initial report.
[0111] Specifically, the user may associate and save the initial report with the data set in advance, so that the corresponding data set may be obtained according to each initial report.
[0112] The generating module 402 is further configured to determine the query statements corresponding to each initial report according to the data screening condition and the data set.
[0113] Specifically, since the data set stores query statements corresponding to querying various data fields, after obtaining the data screening condition and the corresponding data set, the query statement corresponding to the initial report can be determined from the data set.
[0114] The generating module 402 is further configured to use a preset splicing tool to splice the determined query statements to generate the query statements.
[0115] Specifically, the splicing tool is a toolkit for SQL parsing and splicing. In this embodiment, the splicing tool is preferably Druid, which is open sourced by Alibaba. Through Druid, multiple determined query statements can be spliced to obtain the query statement of the final query target report.
[0116] In one embodiment, when generating a query statement SQL for querying a target report, a real-time or scheduled method can be used, wherein the real-time method means that after obtaining the data configured by the user through the report configuration template, the query statement SQL for querying multiple report data will be immediately generated according to the user's configuration data; the scheduled method means that the system scans the data configured by the user through the report configuration template through a scheduled task. When it is found that there is data configured by the user based on the report configuration template, the query statement SQL for querying multiple report data can be generated according to the user's configured data.
[0117] The execution module 403 is used to execute the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports.
[0118] Specifically, when executing the query statement, it is necessary to obtain a database connection according to the data source corresponding to each initial report, and then execute the query statement through the obtained database connection to obtain the report data corresponding to the query statement from each data source.
[0119] The association module 404 is used to perform report association on the acquired multiple report data to generate a target report.
[0120] Specifically, after a plurality of report data are acquired, report association is performed on the acquired report data so as to fill the plurality of report data into a blank report to generate a target report.
[0121] Furthermore, the association module 404 is also used to fill the first data information under the data field corresponding to the data filtering condition into a blank report; and to fill the second data information under the data field other than the data field corresponding to the data filtering condition in the multiple report data into the corresponding position of the first data information to generate the target report.
[0122] Specifically, since the multiple report data obtained all have data fields corresponding to the data filtering conditions, when generating the target report, the first data information under the data field corresponding to the data filtering conditions can be first filled into the blank report. After that, the second data information under the data field in each report data except the data field corresponding to the data filtering conditions can be filled into the corresponding position of the first data information. After all the data are filled in, the obtained report is the target report.
[0123] For example, report data A is the data of data report A under a company's data source A, and report data B is the data of data report B under the company's data source B. Data report A is the product information of each organization, and data report B is the channel information of each organization. Both product information and channel information correspond to the organization ID of each organization, wherein the organization field is used as a data screening condition. Therefore, when generating a target report, you can first fill in each organization ID under the organization field into a blank report, and then fill in the data information associated with each organization ID under the product information field in report data A into the blank report in turn. For example, if the organization field has ID1, ID2, and ID3, you can first fill in the data information associated with ID1 under the product information field in report data A into the blank report, and then fill in the data information associated with ID2 under the product information field in report data A into the blank report, and finally fill in the data information associated with ID3 under the product information field in report data A into the blank report. Similarly, after completing filling the target report with the data in report data A, fill the blank report with the data in report data B according to the above method. After completing filling all the data, the resulting report is the target report.
[0124] It should be noted that the blank report mentioned above is a report without any report data.
[0125] The report data extraction method proposed in this embodiment of the present invention obtains data screening conditions and multiple initial reports configured by the user based on a preset report configuration template; generates query statements according to the data screening conditions and the multiple initial reports; executes the query statements to obtain corresponding report data from the data sources corresponding to each of the initial reports; and generates a target report by associating the obtained multiple report data. The embodiment of the present invention can obtain data of multiple reports through one query without querying each report data in sequence, thereby reducing the complexity of report data extraction operations, saving user operation time, and improving report data extraction efficiency.
[0126] Furthermore, in one embodiment, the extraction device 400 further includes: a compression module.
[0127] The compression module is used to compress the target report, wherein the target report is stored in a blockchain node.
[0128] Specifically, after generating the target report, in order to save data storage space, the generated target report can be compressed.
[0129] Furthermore, in one embodiment, the extraction device 400 further includes: a reminder module.
[0130] The reminder module is used to send a reminder message to the user to remind the user to view the target report, wherein the reminder message carries a link to the target report.
[0131] Specifically, after the target report is generated, in order to enable the user to know the target report and its generation in time, a reminder message can be sent to the user after the target report is generated to remind the user to view the target report. In this embodiment, the reminder message can be sent in the form of text messages or emails.
[0132] In this embodiment, in order to facilitate the user to view the target report, when sending a reminder message to the user, a link to download the target report can be carried in the reminder message, so that the user can conveniently download the target report through the link.
[0133] See also Figure 5 , is a schematic diagram of the hardware architecture of a computer device 500 according to an embodiment of the present invention. In this embodiment, the computer device 500 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. As shown in the figure, the computer device 500 at least includes, but is not limited to, a memory 501, a processor 502, and a network interface 503 that can communicate with each other through a device bus. Among them:
[0134] In this embodiment, the memory 501 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 501 can be an internal storage unit of the computer device 500, such as a hard disk or memory of the computer device 500. In other embodiments, the memory 501 can also be an external storage device of the computer device 500, such as a plug-in hard disk equipped on the computer device 500, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 501 can also include both the internal storage unit of the computer device 500 and its external storage device. In this embodiment, the memory 501 is generally used to store operating devices and various application software installed in the computer device 500, such as the program code of the report data extraction device 400, etc. In addition, the memory 501 can also be used to temporarily store various types of data that have been output or are to be output.
[0135] In some embodiments, the processor 502 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 502 is generally used to control the overall operation of the computer device 500. In this embodiment, the processor 502 is used to run the program code stored in the memory 501 or process data, such as running the report data extraction device 400 to implement the report data extraction method in each of the above embodiments.
[0136] The network interface 503 may include a wireless network interface or a wired network interface, and the network interface 503 is generally used to establish a communication connection between the computer device 500 and other electronic devices. For example, the network interface 503 is used to connect the computer device 500 to an external terminal through a network, and to establish a data transmission channel and a communication connection between the computer device 500 and the external terminal. The network may be a wireless or wired network such as an Intranet, the Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.
[0137] It should be pointed out that Figure 5 Computer device 500 is shown only with components 501 - 503 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0138] In this embodiment, the report data extraction device 400 stored in the memory 501 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 501 and executed by one or more processors (processor 502 in this embodiment) to complete the report data extraction method or report data extraction method of the present invention.
[0139] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program implements corresponding functions when executed by a processor. The computer-readable storage medium of this embodiment is used to store the report data extraction device 400, so as to implement the report data extraction method or the report data extraction method of the present invention when executed by the processor.
[0140] The blockchain referred to in this invention is a new application mode 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 its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0141] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0143] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A report data extraction method, characterized in that: include: Obtain data filtering conditions and multiple initial reports configured by the user based on the preset report configuration template; Generate a query statement according to the data screening condition and the multiple initial reports; Executing the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports; and Perform report association on the acquired multiple report data to generate a target report; The step of generating a query statement according to the data screening condition and the multiple initial reports includes: Get the data sets corresponding to each initial report; Determine the query statements corresponding to each initial report according to the data screening condition and the data set; Using a preset splicing tool to splice the determined query statements to generate the query statements; Wherein, before the step of obtaining the data screening conditions and multiple initial reports configured by the user based on the preset report configuration template, it also includes: In response to a report creation request, and according to report configuration data carried in the report creation request, a data report is created, wherein the data report is at least one of the multiple initial reports; Wherein, before the step of responding to the report creation request and creating a data report according to the report configuration data carried in the report creation request, the step further includes: Displaying a report configuration interface so that the user can configure the report configuration data based on the report configuration interface; Upon receiving a report configuration completion instruction triggered by a user, generating the report creation request; The step of generating a target report by associating the acquired report data with each other includes: Fill the first data information under the data field corresponding to the data screening condition into the blank report; Filling second data information under data fields other than the data fields corresponding to the data screening conditions in the plurality of report data into corresponding positions of the first data information to generate the target report; Wherein, after the step of generating a target report by associating the obtained multiple report data, the step further includes: The target report is compressed, wherein the target report is stored in a blockchain node.
2. The report data extraction method according to claim 1, characterized in that: After the step of generating a target report by associating the obtained multiple report data, the method further includes: A reminder message is sent to the user to remind the user to view the target report, wherein the reminder message carries a link to the target report.
3. A report data extraction device, characterized in that: include: The acquisition module is used to obtain the data screening conditions and multiple initial reports configured by the user based on the preset report configuration template; A generating module, used for generating a query statement according to the data screening condition and the multiple initial reports; An execution module, used for executing the query statement to obtain corresponding report data from the data source corresponding to each of the initial reports; and An association module, used for generating a target report by associating the acquired multiple report data; The step of generating a query statement according to the data screening condition and the multiple initial reports includes: Get the data sets corresponding to each initial report; Determine the query statements corresponding to each initial report according to the data screening condition and the data set; Using a preset splicing tool to splice the determined query statements to generate the query statements; Wherein, before the step of obtaining the data screening conditions and multiple initial reports configured by the user based on the preset report configuration template, it also includes: In response to a report creation request, and according to report configuration data carried in the report creation request, a data report is created, wherein the data report is at least one of the multiple initial reports; Wherein, before the step of responding to the report creation request and creating a data report according to the report configuration data carried in the report creation request, the step further includes: Displaying a report configuration interface so that the user can configure the report configuration data based on the report configuration interface; Upon receiving a report configuration completion instruction triggered by a user, generating the report creation request; The step of generating a target report by associating the acquired report data with each other includes: Fill the first data information under the data field corresponding to the data screening condition into the blank report; Filling second data information under data fields other than the data fields corresponding to the data screening conditions in the plurality of report data into corresponding positions of the first data information to generate the target report; Wherein, after the step of generating a target report by associating the obtained multiple report data, the step further includes: The target report is compressed, wherein the target report is stored in a blockchain node.
4. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the report data extraction method according to any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the report data extraction method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Method for generating report file, terminal device and medium
CN109471890A