CN111552712A - Report data extraction method and device and computer equipment - Google Patents

Report data extraction method and device and computer equipment Download PDF

Info

Publication number
CN111552712A
CN111552712A CN202010360039.XA CN202010360039A CN111552712A CN 111552712 A CN111552712 A CN 111552712A CN 202010360039 A CN202010360039 A CN 202010360039A CN 111552712 A CN111552712 A CN 111552712A
Authority
CN
China
Prior art keywords
report
data
target
initial
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010360039.XA
Other languages
Chinese (zh)
Inventor
陈文端
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010360039.XA priority Critical patent/CN111552712A/en
Publication of CN111552712A publication Critical patent/CN111552712A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Abstract

The embodiment of the invention relates to the field of big data processing, and provides a report data extraction method, which comprises the following steps: acquiring a data screening condition configured by a user based on a preset report configuration template and a plurality of initial reports; generating a query statement according to the data screening condition and the plurality of initial reports; executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and performing report association on the obtained report data to generate a target report. The embodiment of the invention can reduce the operation complexity of report data extraction and save the operation time of a user. In addition, the invention also relates to a block chain technology, and the target report can be stored in the block chain node.

Description

Report data extraction method and device and computer equipment
Technical Field
The embodiment of the invention relates to the technical field of big data processing, in particular to report data extraction and device and computer equipment.
Background
In the existing product, only each data report under the same data source can be correlated, when table data in different types of data sources needs to be correlated and managed, because data comes from different data sources, for computer equipment, a connection client provided by each data source is often required to be used for independent access, one connection cannot be used for simultaneously accessing a plurality of data sources, and data in different data sources cannot be correlated in one connection.
The inventor of the invention finds that in a traditional access mode, a user needs to sequentially compare data of each data source according to own requirements, and then manually operates to obtain the required report content, so that the operation is complex, and when the data volume is very large, the workload and the time cost are extremely high.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method and an apparatus for extracting report data, a computer device, and a computer-readable storage medium, which are used to solve the problems that the conventional report data extraction method is complicated in operation and needs to consume a large amount of time.
In order to achieve the above object, an embodiment of the present invention provides a report data extraction method, including:
acquiring a data screening condition configured by a user based on a preset report configuration template and a plurality of initial reports;
generating a query statement according to the data screening condition and the plurality of initial reports;
executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and
and performing report association on the obtained report data to generate a target report.
Optionally, before the step of obtaining the data filtering condition configured by the user based on the preset report configuration template and the plurality of initial reports, the method further includes:
responding to a report creating request, and creating a data report according to report configuration data carried in the report creating request, wherein the data report is at least one report in the plurality of initial reports.
Optionally, before the step of responding to the report creation request and creating the data report according to the report configuration data carried in the report creation request, the method further includes:
displaying a report configuration interface for a user to configure the report configuration data based on the report configuration interface;
and when a report configuration completion instruction triggered by a user is received, generating the report creation request.
Optionally, the generating a query statement according to the data filtering condition and the plurality of initial reports includes:
acquiring a data set corresponding to each initial report;
determining query statements corresponding to each initial report according to the data screening conditions and the data set;
and splicing the determined query sentences by adopting a preset splicing tool to generate the query sentences.
Optionally, the generating a target report by performing report association on the obtained multiple report data includes:
filling first data information under the data field corresponding to the data screening condition into a blank report;
and filling second data information under data fields except the data field corresponding to the data screening condition in the report data into the corresponding position of the first data information to generate the target report.
Optionally, after the step of performing report association on the obtained plurality of report data to generate a target report, the method further includes:
compressing the target report, wherein the target report is stored in the block chain link points.
Optionally, after the step of performing report association on the obtained plurality of report data to generate a target report, the method further includes:
and sending a reminding message to the user to remind the user to check the target report, wherein the reminding message carries the link of the target report.
In order to achieve the above object, an embodiment of the present invention further provides a report data extraction apparatus, including:
the system comprises an acquisition module, a data screening module and a plurality of initial reports, wherein the acquisition module is used for acquiring data screening conditions configured by a user based on a preset report configuration template and the plurality of initial reports;
the generating module is used for generating query statements according to the data screening conditions and the initial reports;
the execution module is used for executing the query statement so as to obtain corresponding report data from the data source corresponding to each initial report; and
and the association module is used for performing report association on the acquired report data to generate a target report.
In order to achieve the above object, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the report data extraction method described above when executing the computer program.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor, so as to cause the at least one processor to execute the steps of the report data extraction method described above.
The report data extraction method, the report data extraction device, the computer equipment and the computer readable storage medium provided by the embodiment of the invention have the advantages that data screening conditions configured by a user based on a preset report configuration template and a plurality of initial reports are obtained; generating a query statement according to the data screening condition and the plurality of initial reports; executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and performing report association on the obtained report data to generate a target report. The embodiment of the invention can obtain the data of a plurality of reports through one-time query without sequentially querying each report data, thereby reducing the operation complexity of report data extraction, saving the operation time of a user and improving the efficiency of report data extraction.
Drawings
FIG. 1 is a flowchart illustrating steps of an embodiment of a report data extraction method according to the present invention.
Fig. 2 is a flowchart illustrating a detailed process of generating query statements according to the data filtering conditions and the initial reports according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a detailed process of performing report association on a plurality of acquired report data to generate a target report according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of program modules of a report data extraction apparatus according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The advantages of the invention are further illustrated in the following description of specific embodiments in conjunction with the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the description of the present invention, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present invention and to distinguish each step, and thus should not be construed as limiting the present invention.
Referring to fig. 1, a flowchart of a report data extracting method according to a first embodiment of the invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description will exemplarily refer to a report data extraction apparatus (hereinafter, referred to as "extraction apparatus") as an execution subject, where the extraction apparatus may be applied to a computer device, and the computer device may be a mobile phone, a tablet personal computer (tablet personal computer), a laptop computer (laptop computer), a server, or other devices having a data transmission function. The method comprises the following specific steps:
step S10, acquiring data filtering conditions configured by the user based on a preset report configuration template and a plurality of initial reports.
Specifically, a user may configure the data screening condition and the plurality of initial reports through the report configuration template, where the initial report is a report to be extracted.
The report configuration template is a configuration interface which is provided by the front end and used for configuring data screening conditions and the plurality of initial reports.
The data screening condition is a data field included in each initial report, for example, A, B, C initial reports exist, and if A, B, C mechanism fields exist in all the three reports, the mechanism fields can be used as the data screening condition. Similarly, if A, B, C all have channels and product fields, the channels and product fields can also be used as the data screening condition. If A, B report has mechanism field, and C report has no mechanism field, then the mechanism field may not be used as the data screening condition of the three initial reports.
In this embodiment, there are various ways for the user to configure the data filtering condition and the initial reports, for example, the configuration is performed in a configuration interface by using a pull-down option, a checkbox (check box), or a text field. In an embodiment, when configuration is performed through a pull-down option, each initial report needs to be displayed in a configuration interface by the front end in a list manner, and then a user can drag out the initial report from the displayed list, thereby completing configuration of the initial report.
It should be noted that, when configuring the data filtering condition, the user needs to complete the configuration of the initial report before determining the configurable data filtering condition according to the initial report configured by the user. When the data screening conditions are configured, the configurable data fields can also be displayed to the user in a list mode, so that the user can select the corresponding data fields in the list as the data screening conditions, and the configuration of the data screening conditions is completed after the user drags the corresponding data fields in the displayed list.
In an embodiment, when the data filtering condition and the initial report are configured, the format of the target report, such as excel, csv, txt format, etc., may also be configured through the report configuration template.
Further, in order to configure the initial report, in an embodiment, before the step of obtaining the data filtering condition configured by the user based on the preset report configuration template and the plurality of initial reports, the method further includes:
responding to a report creating request, and creating a data report according to report configuration data carried in the report creating request, wherein the data report is at least one report in the plurality of initial reports.
Specifically, the report configuration data may include format information of the data report, such as format information of excel, csv, or txt. In this embodiment, the report configuration data further includes configuration item information such as a cell format and a header format, and data field information included in the data report.
When a data report needs to be created, a user can configure report configuration data first, and then trigger a report creation request based on the configured report configuration data, so that the data report can be created according to the report creation request.
It should be noted that, in this embodiment, when creating a data report, multiple data reports may be created at one time, or one data report may be created at one time, that is, the report creation request may include report configuration data of one data report, or may include report configuration data of multiple data reports.
In an embodiment, in order to improve the creation efficiency of the data report, a pre-processing operation may be performed on the data report to be created in advance to obtain a data set, where the specific pre-processing operation is as follows: firstly, a report developer provides a data source corresponding to report data and a query statement corresponding to data in the data source, such as a Structured Query Language (SQL) query statement; then, a query operation may be performed based on the SQL to obtain all data field names of the data included in the data source; then, alias names can be added to the acquired data fields, so that business personnel can conveniently identify the acquired data fields when the data tasks are extracted; finally, the association relationship between the SQL, the data source, the data field, and the corresponding field alias can be stored in a table to obtain a data set.
After the data set is obtained, when a user configures report configuration data, the user can quickly complete configuration operation of the report configuration data by acquiring the data fields contained in the data set, and simultaneously associate and store the created data report with the data set.
Further, in an embodiment, before the step of creating a data report according to report configuration data carried in the report creation request in response to the report creation request, the method further includes: displaying a report configuration interface for a user to configure the report configuration data based on the report configuration interface; and when a report configuration completion instruction triggered by a user is received, generating the report creation request.
Specifically, in order to conveniently configure the report configuration data, a report configuration interface may be provided and displayed, based on the report configuration interface, the user may configure the report configuration data in a dragging mode, a checkbox mode, or the like, and after the user completes the configuration of the report data, the user may trigger a report configuration completion instruction, for example, the user triggers a report configuration completion instruction in a mode of clicking a report creation button. When the report configuration completion instruction is received, a report creation request can be generated according to the instruction.
And step S11, generating a query statement according to the data screening condition and the initial reports.
Specifically, the query statements of the query target report corresponding to different data screening conditions are different, and different initial reports also correspond to different query statements of the query target report. In this embodiment, after the data screening condition and the initial report are obtained, the query statement for querying the target report may be obtained from the corresponding data set according to the information, where the data set is pre-established for the user and is stored in association with the report to be extracted, and the data source, the data field, the field alias corresponding to the data field, and the query statement corresponding to the data information in each data field are stored in the data set.
Further, in an embodiment, referring to fig. 2, the generating a query statement according to the data filtering condition and the initial reports includes:
and step S20, acquiring a data set corresponding to each initial report.
Specifically, the user may store the initial reports and the data sets in association in advance, so that the corresponding data sets may be obtained according to each initial report.
And step S21, determining the query statement corresponding to each initial report according to the data screening condition and the data set.
Specifically, since the data set stores query statements for querying each data field, after the data screening condition and the corresponding data set are obtained, the query statement corresponding to the initial report can be determined from the data set.
And step S22, splicing the determined query sentences by adopting a preset splicing tool to generate the query sentences.
Specifically, the splicing tool is a toolkit for SQL parsing and splicing, and in this embodiment, the splicing tool is preferably a Druid sourced by the company alibaba. Through the Druid, the determined query statements can be spliced to obtain the query statement of the final query target report.
In an embodiment, a real-time or timing mode may be adopted when generating the query statement SQL for querying the target report, where the real-time mode refers to that after data configured by a user through a report configuration template is obtained, the query statement SQL for querying multi-report data is immediately generated according to the configuration data of the user; the timing mode refers to that the system scans data configured by a user through a report configuration template through a timing task, and when the data configured by the user based on the report configuration template is found, an inquiry statement SQL for inquiring multi-report data can be generated according to the data configured by the user.
Step S12, the query statement is executed to obtain corresponding report data from the data source corresponding to each initial report.
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, so as to obtain the report data corresponding to the query statement from each data source.
And step S13, performing report association on the obtained report data to generate a target report.
Specifically, after a plurality of report data are acquired, report association is performed on the acquired report data, so that the plurality of report data are filled into a blank report, and a target report is generated.
Further, referring to fig. 3, performing report association on the obtained multiple report data to generate the target report includes:
step S30, filling the first data information under the data field corresponding to the data screening condition into a blank report;
step S31, filling the second data information in the data fields of the report data except the data fields corresponding to the data filtering conditions into the corresponding positions of the first data information, and generating the target report.
Specifically, since the acquired report data all have the data fields corresponding to the data screening conditions, when the target report is generated, first data information under the data fields corresponding to the data screening conditions may be filled into a blank report, then second data information under the data fields except the data fields corresponding to the data screening conditions in each report data may be filled into corresponding positions of the first data information, and after filling of all data is completed, the obtained report is the target report.
For example, the report data a is data of a data report a under a certain company data source a, the report data B is data of a data report B under the company data source B, the data report a is product information of each organization, the data report B is channel information of each organization, the product information and the channel information correspond to organization IDs of each organization, wherein the organization fields are used as data screening conditions, therefore, when generating a target report, the organization IDs under the organization fields can be first filled into a blank report, and then data information associated with the organization IDs under the product information fields in the report data a is sequentially filled into the blank report, for example, the organization fields have IDs 1, 2 and 3, then the data information associated with the ID1 under the product information fields in the report data a can be first filled into the blank report, and then filling the data information related to the ID2 under the product information field in the report data A into a blank report, and finally filling the data information related to the ID3 under the product information field in the report data A into the blank report. Similarly, after the data in the report data A is filled into the target report, the data in the report data B is filled into the blank report according to the method, and after the filling of all the data is completed, the obtained report is the target report.
It should be noted that the blank report is a report without report data.
The report data extraction method provided by the embodiment of the invention comprises the steps of obtaining a data screening condition configured by a user based on a preset report configuration template and a plurality of initial reports; generating a query statement according to the data screening condition and the plurality of initial reports; executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and performing report association on the obtained report data to generate a target report. The embodiment of the invention can obtain the data of a plurality of reports through one-time query without sequentially querying each report data, thereby reducing the operation complexity of report data extraction, saving the operation time of a user and improving the efficiency of report data extraction.
Further, in an embodiment, after the step of performing report association on the obtained plurality of report data to generate a target report, the method further includes:
compressing the target report, wherein the target report is stored in the block chain link points.
It is emphasized that, in order to further ensure the privacy and security of the target report, the target report may also be stored in a node of a block chain.
Specifically, after the target report is generated, in order to save the data storage space, the generated target report can be compressed.
Further, in an embodiment, after the step of performing report association on the obtained plurality of report data to generate a target report, the method further includes:
and sending a reminding message to the user to remind the user to check the target report, wherein the reminding message carries the link of the target report.
Specifically, after the target report is generated, in order to enable the user to know the target report and generate the target report in time, a reminding message may be sent to the user after the target report is generated, so as to remind the user to view the target report. In this embodiment, the reminding message may be sent in a form of a short message or an email.
In this embodiment, in order to facilitate the user to view the target report, when the reminding message is sent to the user, the link for downloading the target report may be carried in the reminding message, so that the user may conveniently download the target report through the link.
Referring to fig. 4, a schematic diagram of program modules of a report data extracting apparatus 400 (hereinafter, referred to as "extracting apparatus" 400) according to an embodiment of the invention is shown. The extracting apparatus 400 may be applied to a computer device, which may be a mobile phone, a tablet personal computer (tablet personal computer), a laptop computer (laptop computer), a server, or other devices having a data transmission function. In this embodiment, the extracting apparatus 400 may include or be divided into one or more program modules, and the one or more program modules are stored in the storage medium and executed by one or more processors to implement the present invention and implement the above-mentioned report data extracting method. The program module referred to in the embodiment of the invention is a series of computer program instruction segments capable of completing specific functions, and is more suitable for describing the execution process of the report data extraction method in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
the obtaining module 401 is configured to obtain a data filtering condition configured by a user based on a preset report configuration template and a plurality of initial reports.
Specifically, a user may configure the data screening condition and the plurality of initial reports through the report configuration template, where the initial report is a report to be extracted.
The report configuration template is a configuration interface which is provided by the front end and used for configuring data screening conditions and the plurality of initial reports.
The data screening condition is a data field included in each initial report, for example, A, B, C initial reports exist, and if A, B, C mechanism fields exist in all the three reports, the mechanism fields can be used as the data screening condition. Similarly, if A, B, C all have channels and product fields, the channels and product fields can also be used as the data screening condition. If A, B report has mechanism field, and C report has no mechanism field, then the mechanism field may not be used as the data screening condition of the three initial reports.
In this embodiment, there are various ways for the user to configure the data filtering condition and the initial reports, for example, the configuration is performed in a configuration interface by using a pull-down option, a checkbox (check box), or a text field. In an embodiment, when configuration is performed through a pull-down option, each initial report needs to be displayed in a configuration interface by the front end in a list manner, and then a user can drag out the initial report from the displayed list, thereby completing configuration of the initial report.
It should be noted that, when configuring the data filtering condition, the user needs to complete the configuration of the initial report before determining the configurable data filtering condition according to the initial report configured by the user. When the data screening conditions are configured, the configurable data fields can also be displayed to the user in a list mode, so that the user can select the corresponding data fields in the list as the data screening conditions, and the configuration of the data screening conditions is completed after the user drags the corresponding data fields in the displayed list.
In an embodiment, when the data filtering condition and the initial report are configured, the format of the target report, such as excel, csv, txt format, etc., may also be configured through the report configuration template.
Further, in an embodiment, the extraction device 400 further comprises a response module.
And the response module is used for responding to a report establishing request and establishing a data report according to report configuration data carried in the report establishing request, wherein the data report is at least one report in the plurality of initial reports.
Specifically, the report configuration data may include format information of the data report, such as format information of excel, csv, or txt. In this embodiment, the report configuration data further includes configuration item information such as a cell format and a header format, and data field information included in the data report.
When a data report needs to be created, a user can configure report configuration data first, and then trigger a report creation request based on the configured report configuration data, so that the data report can be created according to the report creation request.
It should be noted that, in this embodiment, when creating a data report, multiple data reports may be created at one time, or one data report may be created at one time, that is, the report creation request may include report configuration data of one data report, or may include report configuration data of multiple data reports.
In an embodiment, in order to improve the creation efficiency of the data report, a pre-processing operation may be performed on the data report to be created in advance to obtain a data set, where the specific pre-processing operation is as follows: firstly, a report developer provides a data source corresponding to report data and a query statement corresponding to data in the data source, such as a Structured Query Language (SQL) query statement; then, a query operation may be performed based on the SQL to obtain all data field names of the data included in the data source; then, alias names can be added to the acquired data fields, so that business personnel can conveniently identify the acquired data fields when the data tasks are extracted; finally, the association relationship between the SQL, the data source, the data field, and the corresponding field alias can be stored in a table to obtain a data set.
After the data set is obtained, when a user configures report configuration data, the user can quickly complete configuration operation of the report configuration data by acquiring the data fields contained in the data set, and simultaneously associate and store the created data report with the data set.
Further, in an embodiment, the response module is further configured to display a report configuration interface, so that a user configures the report configuration data based on the report configuration interface; and the report creating module is used for generating the report creating request when receiving a report configuration finishing instruction triggered by a user.
Specifically, in order to configure the report configuration data conveniently, a report configuration interface may be displayed, and based on the report configuration interface, a user may configure the report configuration data in a dragging manner, a checkbox manner, and the like. When the report configuration completion instruction is received, a report creation request can be generated according to the instruction.
A generating module 402, configured to generate a query statement according to the data screening condition and the multiple initial reports.
Specifically, the query statements of the query target report corresponding to different data screening conditions are different, and different initial reports also correspond to different query statements of the query target report. In this embodiment, after the data screening condition and the initial report are obtained, the query statement for querying the target report may be obtained from the corresponding data set according to the information, where the data set is pre-established for the user and is stored in association with the report to be extracted, and the data source, the data field, the field alias corresponding to the data field, and the query statement corresponding to the data information in each data field are stored in the data set.
In an embodiment, the generating module 402 is further configured to obtain a data set corresponding to each initial report.
Specifically, the user may store the initial reports and the data sets in association in advance, so that the corresponding data sets may be obtained according to each initial report.
The generating module 402 is further configured to determine query statements corresponding to each initial report according to the data screening conditions and the data set.
Specifically, since the data set stores query statements for querying each data field, after the data screening condition and the corresponding data set are obtained, the query statement corresponding to the initial report can be determined from the data set.
The generating module 402 is further configured to splice the determined query statements by using a preset splicing tool to generate the query statements.
Specifically, the splicing tool is a toolkit for SQL parsing and splicing, and in this embodiment, the splicing tool is preferably a Druid sourced by the company alibaba. Through the Druid, the determined query statements can be spliced to obtain the query statement of the final query target report.
In an embodiment, a real-time or timing mode may be adopted when generating the query statement SQL for querying the target report, where the real-time mode refers to that after data configured by a user through a report configuration template is obtained, the query statement SQL for querying multi-report data is immediately generated according to the configuration data of the user; the timing mode refers to that the system scans data configured by a user through a report configuration template through a timing task, and when the data configured by the user based on the report configuration template is found, an inquiry statement SQL for inquiring multi-report data can be generated according to the data configured by the user.
The executing module 403 is configured to execute the query statement to obtain corresponding report data from the data source corresponding to each initial report.
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, so as to obtain the report data corresponding to the query statement from each data source.
And the associating module 404 is configured to perform report association on the obtained multiple report data to generate a target report.
Specifically, after a plurality of report data are acquired, report association is performed on the acquired report data, so that the plurality of report data are filled into a blank report, and a target report is generated.
Further, the association module 404 is further configured to fill the first data information in the data field corresponding to the data screening condition into a blank report; and the second data information under the data fields except the data fields corresponding to the data screening conditions in the report data is filled into the corresponding positions of the first data information, so that the target report is generated.
Specifically, since the acquired report data all have the data fields corresponding to the data screening conditions, when the target report is generated, first data information under the data fields corresponding to the data screening conditions may be filled into a blank report, then second data information under the data fields except the data fields corresponding to the data screening conditions in each report data may be filled into corresponding positions of the first data information, and after filling of all data is completed, the obtained report is the target report.
For example, the report data a is data of a data report a under a certain company data source a, the report data B is data of a data report B under the company data source B, the data report a is product information of each organization, the data report B is channel information of each organization, the product information and the channel information correspond to organization IDs of each organization, wherein the organization fields are used as data screening conditions, therefore, when generating a target report, the organization IDs under the organization fields can be first filled into a blank report, and then data information associated with the organization IDs under the product information fields in the report data a is sequentially filled into the blank report, for example, the organization fields have IDs 1, 2 and 3, then the data information associated with the ID1 under the product information fields in the report data a can be first filled into the blank report, and then filling the data information related to the ID2 under the product information field in the report data A into a blank report, and finally filling the data information related to the ID3 under the product information field in the report data A into the blank report. Similarly, after the data in the report data A is filled into the target report, the data in the report data B is filled into the blank report according to the method, and after the filling of all the data is completed, the obtained report is the target report.
It should be noted that the blank report is a report without report data.
The report data extraction method provided by the embodiment of the invention comprises the steps of obtaining a data screening condition configured by a user based on a preset report configuration template and a plurality of initial reports; generating a query statement according to the data screening condition and the plurality of initial reports; executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and performing report association on the obtained report data to generate a target report. The embodiment of the invention can obtain the data of a plurality of reports through one-time query without sequentially querying each report data, thereby reducing the operation complexity of report data extraction, saving the operation time of a user and improving the efficiency of report data extraction.
Further, in an embodiment, the extraction apparatus 400 further includes: and a compression module.
The compression module is used for compressing the target report, wherein the target report is stored in the block link points.
Specifically, after the target report is generated, the generated target report can be compressed in order to save the data storage space.
Further, in an embodiment, the extraction apparatus 400 further includes: and a reminding module.
And the reminding module is used for sending a reminding message to the user so as to remind the user to check the target report, wherein the reminding message carries the link of the target report.
Specifically, after the target report is generated, in order to enable the user to know the target report and generate the target report in time, a reminding message may be sent to the user after the target report is generated, so as to remind the user to view the target report. In this embodiment, the reminding message may be sent in a form of a short message or an email.
In this embodiment, in order to facilitate the user to view the target report, when the reminding message is sent to the user, the link for downloading the target report may be carried in the reminding message, so that the user may conveniently download the target report through the link.
Fig. 5 is a schematic diagram of a hardware architecture of a computer device 500 according to an embodiment of the present invention. In the present embodiment, the computer device 500 is a device capable of automatically performing numerical calculation and/or information processing according to an instruction set or stored in advance. As shown, the computer apparatus 500 includes, but is not limited to, at least a memory 501, a processor 502, and a network interface 503 communicatively coupled to each other via a device bus. Wherein:
in this embodiment, the memory 501 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., 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 magnetic disk, an optical disk, and the like. In some embodiments, the storage 501 may be an internal storage unit of the computer device 500, such as a hard disk or a memory of the computer device 500. In other embodiments, the memory 501 may also be an external storage device of the computer device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 500. Of course, the memory 501 may also include both internal and external memory units of the computer device 500. In this embodiment, the memory 501 is generally used for storing the operating device and various application software installed in the computer device 500, such as the program code of the report data extracting device 400. Further, the memory 501 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 502 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 502 generally operates to control the overall operation of the computer device 500. In this embodiment, the processor 502 is configured to run a program code stored in the memory 501 or process data, for example, run the report data extracting apparatus 400, so as to implement the report data extracting method in each of the above embodiments.
The network interface 503 may include a wireless network interface or a wired network interface, and the network interface 503 is generally used for establishing a communication connection between the computer apparatus 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, establish a data transmission channel and a communication connection between the computer device 500 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or the like.
It is noted that fig. 5 only shows the computer device 500 with components 501 and 503, but it is understood that not all of the shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the report data extracting apparatus 400 stored in the memory 501 may be further 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 (in this embodiment, the processor 502) to complete the report data extracting method or the report data extracting method of the present invention.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., 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 magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer readable storage medium of this embodiment is used for storing the report data extracting apparatus 400, so that when being executed by a processor, the report data extracting method or the report data extracting method of the present invention is implemented.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A report data extraction method is characterized by comprising the following steps:
acquiring a data screening condition configured by a user based on a preset report configuration template and a plurality of initial reports;
generating a query statement according to the data screening condition and the plurality of initial reports;
executing the query statement to acquire corresponding report data from the data source corresponding to each initial report; and
and performing report association on the obtained report data to generate a target report.
2. The report data extracting method according to claim 1, wherein before the step of obtaining the data filtering condition configured by the user based on the preset report configuration template and the plurality of initial reports, the method further comprises:
responding to a report creating request, and creating a data report according to report configuration data carried in the report creating request, wherein the data report is at least one report in the plurality of initial reports.
3. The report data extracting method according to claim 2, wherein before the step of creating a data report according to the report configuration data carried in the report creating request in response to the report creating request, further comprising:
displaying a report configuration interface for a user to configure the report configuration data based on the report configuration interface;
and when a report configuration completion instruction triggered by a user is received, generating the report creation request.
4. The report data extraction method of claim 1, wherein the generating query statements according to the data filtering conditions and the plurality of initial reports comprises:
acquiring a data set corresponding to each initial report;
determining query statements corresponding to each initial report according to the data screening conditions and the data set;
and splicing the determined query sentences by adopting a preset splicing tool to generate the query sentences.
5. The report data extraction method according to claim 1, wherein the generating a target report by performing report association on the acquired plurality of report data comprises:
filling first data information under the data field corresponding to the data screening condition into a blank report;
and filling second data information under data fields except the data field corresponding to the data screening condition in the report data into the corresponding position of the first data information to generate the target report.
6. The report data extraction method according to any one of claims 1 to 5, wherein after the step of performing report association on the acquired plurality of report data to generate the target report, the method further comprises:
compressing the target report, wherein the target report is stored in the block chain link points.
7. The report data extraction method according to any one of claims 1 to 5, wherein after the step of performing report association on the acquired plurality of report data to generate the target report, the method further comprises:
and sending a reminding message to the user to remind the user to check the target report, wherein the reminding message carries the link of the target report.
8. A report data extraction device is characterized by comprising:
the system comprises an acquisition module, a data screening module and a plurality of initial reports, wherein the acquisition module is used for acquiring data screening conditions configured by a user based on a preset report configuration template and the plurality of initial reports;
the generating module is used for generating query statements according to the data screening conditions and the initial reports;
the execution module is used for executing the query statement so as to obtain corresponding report data from the data source corresponding to each initial report; and
and the association module is used for performing report association on the acquired report data to generate a target report.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the report data extraction method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor to cause the at least one processor to perform the steps of the report data extraction method according to any of claims 1-7.
CN202010360039.XA 2020-04-30 2020-04-30 Report data extraction method and device and computer equipment Pending CN111552712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010360039.XA CN111552712A (en) 2020-04-30 2020-04-30 Report data extraction method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010360039.XA CN111552712A (en) 2020-04-30 2020-04-30 Report data extraction method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN111552712A true CN111552712A (en) 2020-08-18

Family

ID=72004239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010360039.XA Pending CN111552712A (en) 2020-04-30 2020-04-30 Report data extraction method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN111552712A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527868A (en) * 2020-12-23 2021-03-19 东莞市盟大塑化科技有限公司 Data acquisition method, device, equipment and storage medium
CN113282283A (en) * 2021-06-11 2021-08-20 北京拓课网络科技有限公司 Method and device for operating database table and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN108052676A (en) * 2017-12-28 2018-05-18 广东金赋科技股份有限公司 The collocation method and device of multi-data source data
CN109471890A (en) * 2018-10-16 2019-03-15 深圳壹账通智能科技有限公司 Generation method, terminal device and the medium of report file
CN109508338A (en) * 2018-11-23 2019-03-22 成都四方伟业软件股份有限公司 Data sheet correlating method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN108052676A (en) * 2017-12-28 2018-05-18 广东金赋科技股份有限公司 The collocation method and device of multi-data source data
CN109471890A (en) * 2018-10-16 2019-03-15 深圳壹账通智能科技有限公司 Generation method, terminal device and the medium of report file
CN109508338A (en) * 2018-11-23 2019-03-22 成都四方伟业软件股份有限公司 Data sheet correlating method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527868A (en) * 2020-12-23 2021-03-19 东莞市盟大塑化科技有限公司 Data acquisition method, device, equipment and storage medium
CN113282283A (en) * 2021-06-11 2021-08-20 北京拓课网络科技有限公司 Method and device for operating database table and electronic equipment
CN113282283B (en) * 2021-06-11 2022-03-22 北京拓课网络科技有限公司 Method and device for operating database table and electronic equipment

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
CN110162544B (en) Heterogeneous data source data acquisition method and device
CN110969001B (en) Feedback information generation method and device, storage medium, processor and terminal
US20200286100A1 (en) Payment complaint method, device, server and readable storage medium
CN108259533B (en) Data transmission method and device
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
CN110751550A (en) Account checking method and device, computer equipment and storage medium
CN105450705A (en) Service data processing method and apparatus
CN111694565A (en) Data visualization application development method and system
CN111552712A (en) Report data extraction method and device and computer equipment
CN111723077A (en) Data dictionary maintenance method and device and computer equipment
CN110806866A (en) Generation method and device of front-end management system
CN109213782B (en) Search interface configuration and display method and device and communication equipment
CN115905371A (en) Data trend analysis method, device and equipment and computer readable storage medium
US9621424B2 (en) Providing a common interface for accessing and presenting component configuration settings
CN106570004B (en) Data management method and device
CN113296785A (en) Document generation method, system, device and readable storage medium
CN114153910A (en) Data acquisition method and device, electronic device and computer program product
CN113761005A (en) Metadata configuration method and device, electronic equipment and storage medium
CN113641678A (en) Dynamic service configuration method and system based on multi-dimensional form
CN111506644B (en) Application data processing method and device and electronic equipment
CN112417012A (en) Data processing method and system
CN108595924B (en) Business authority management method and device, computer equipment and storage medium

Legal Events

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