CN112527818A - Report generation method, device, equipment and storage medium - Google Patents

Report generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN112527818A
CN112527818A CN202011545206.4A CN202011545206A CN112527818A CN 112527818 A CN112527818 A CN 112527818A CN 202011545206 A CN202011545206 A CN 202011545206A CN 112527818 A CN112527818 A CN 112527818A
Authority
CN
China
Prior art keywords
configuration
reported
data
report
original data
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
CN202011545206.4A
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 Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011545206.4A priority Critical patent/CN112527818A/en
Publication of CN112527818A publication Critical patent/CN112527818A/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/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • G06F16/1794Details of file format conversion
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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/26Visual data mining; Browsing structured data

Abstract

The invention relates to the field of big data and discloses a report generation method, a report generation device, report generation equipment and a storage medium. The method comprises the following steps: mapping the configuration data to be reported to a configuration intermediate table; analyzing the configuration fields from the configuration intermediate table, and assembling the configuration fields into a standard configuration table based on the application scene to be reported; based on the standard configuration table, a plurality of original data tables to be reported are searched from a preset database, the standard configuration table is associated with each original data table, so that the standard configuration table is assigned by each associated original data table, and standardized processing is carried out to obtain a reported data table; and converting the file format of the reported data sheet based on the file format requirement to be reported to obtain a corresponding file format report and pushing the report. The invention also relates to a blockchain technique, the configuration data being stored in a blockchain. The invention realizes the dynamic generation of the report and improves the standardization degree of the report generation.

Description

Report generation method, device, equipment and storage medium
Technical Field
The invention relates to the field of big data, in particular to a report generation method, a report generation device, report generation equipment and a storage medium.
Background
In an enterprise, a plurality of development projects are often parallel, different research and development departments often need to report a project report form in each research and development flow, the report form is an important component of an information management system, and the report form not only has an internal report form for analysis, evaluation and prediction, but also has a supervision report form meeting the requirements of a supervision system and specifications. Due to the wide variety, frequent change and high timeliness of the report forms, the report forms need to be generated accurately in time.
For the existing report generation mode, different research and development flows or different research and development departments, the report formats are all different, each report needs to be independently researched and developed, and a large amount of research and development resources are consumed; the data volume reported by supervision is large, different supervision reporting main bodies adopt independent logic to generate reports, performance problems are easily caused, the pressure on a machine is high, and the requirement on the timeliness of supervision reporting cannot be met; the content of message data is complex, the data acquisition logic is not uniform, slow SQL (Structured Query Language) is easy to form, and the pressure on a database is very large; different supervision bodies report, different report generation logics are adopted, and codes are too bloated and not easy to manage; the requirement of supervision reporting is very urgent generally, and if report data is not generated in a pipeline mode, development workload is huge, reporting cannot be completed on time, and supervision penalty is easily caused. Therefore, the current report generation mode has insufficient standardization degree.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the existing report generation mode is insufficient in standardization degree.
The invention provides a report generation method in a first aspect, which comprises the following steps:
acquiring configuration data to be reported, and mapping the configuration data to a corresponding preset configuration intermediate table;
analyzing the configuration intermediate table to obtain a corresponding configuration field, and assembling the configuration field based on an application scene to be reported to obtain a corresponding standard configuration table;
based on the standard configuration table, searching a plurality of original data tables to be reported from a preset database, and associating the standard configuration table with each original data table to obtain a corresponding association relation;
based on the incidence relation, assigning values to the standard configuration table by adopting the original data tables, and carrying out standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
and acquiring a file format requirement to be reported, and performing file format conversion on the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
Optionally, in a first implementation manner of the first aspect of the present invention, the mapping the configuration data to the corresponding preset configuration intermediate table includes:
acquiring configuration conditions of a preset configuration intermediate table, and associating the configuration conditions with corresponding configuration data;
assembling the configuration data through preset assembly rules based on the configuration conditions to generate corresponding SQL statements;
and mapping the SQL statement to a storage page in the configuration intermediate table.
Optionally, in a second implementation manner of the first aspect of the present invention, the assembling the configuration fields based on the application scenario to be reported to obtain the corresponding standard configuration table includes:
inquiring the assembly code of the configuration field in an application scene to be reported, and matching a reporting node corresponding to the configuration field based on the assembly code;
and sequentially converting the configuration fields into corresponding JSON data based on the reporting node, assembling the JSON data, and generating a corresponding standard configuration table.
Optionally, in a third implementation manner of the first aspect of the present invention, the searching, based on the standard configuration table, for multiple original data tables to be reported from a preset database includes:
traversing the standard configuration table based on the assembling sequence of the JSON data in the standard configuration table to obtain a query key value of a field required for submission;
and traversing a preset database based on the query key value, searching a report field to be reported from the preset database, and determining a plurality of original data tables from which the report field comes.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the associating the standard configuration table with each original data table to obtain a corresponding association relationship includes:
generating a first SQL query statement corresponding to each original data table and generating a second SQL query statement of each reported field;
sequentially splicing the second SQL query statement of each reported field and the first SQL query statement of the original data table to obtain a final third SQL query statement of each reported field;
splicing the third SQL query sentences of the reported fields, and associating the third SQL query sentences with the query key values in the corresponding standard configuration table to obtain a corresponding query association table;
and determining the association relation between the standard configuration table and each original data table according to each query association table.
A second aspect of the present invention provides a report generating apparatus, including:
the mapping module is used for acquiring the configuration data to be reported and mapping the configuration data to a corresponding preset configuration intermediate table;
the assembly module is used for analyzing the configuration intermediate table to obtain a corresponding configuration field, and assembling the configuration field based on an application scene to be reported to obtain a corresponding standard configuration table;
the association module is used for searching a plurality of original data tables to be reported from a preset database based on the standard configuration table, and associating the standard configuration table with each original data table to obtain a corresponding association relation;
the assignment module is used for assigning the standard configuration table by adopting each original data table based on the incidence relation and carrying out standardized processing on the assigned standard configuration table to obtain a corresponding reported data table;
and the conversion module is used for acquiring the file format requirement to be reported, and converting the file format of the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
Optionally, in a first implementation manner of the second aspect of the present invention, the mapping module includes:
the device comprises an association unit, a configuration data acquisition unit and a configuration data processing unit, wherein the association unit is used for acquiring configuration conditions of a preset configuration intermediate table and associating the configuration conditions with corresponding configuration data;
the assembling unit is used for assembling the configuration data through a preset assembling rule based on the configuration condition to generate a corresponding SQL statement;
and the mapping unit is used for mapping the SQL statement to a storage page in the configuration intermediate table.
Optionally, in a second implementation manner of the second aspect of the present invention, the assembly module includes:
the matching unit is used for inquiring the assembly codes of the configuration fields in the application scene to be reported and matching the reporting nodes corresponding to the configuration fields based on the assembly codes;
and the conversion unit is used for sequentially converting the configuration fields into corresponding JSON data based on the report nodes, assembling the JSON data and generating a corresponding standard configuration table.
Optionally, in a third implementation manner of the second aspect of the present invention, the associating module includes:
the traversing unit is used for traversing the standard configuration table based on the assembling sequence of the JSON data in the standard configuration table to obtain a query key value of a field required for reporting;
and the searching unit is used for traversing a preset database based on the query key value, searching a report field to be reported from the preset database, and determining a plurality of original data tables from which the report field comes.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the associating module further includes:
a generating unit, configured to generate a first SQL query statement corresponding to each original data table, and generate a second SQL query statement for each reported field;
the splicing unit is used for sequentially splicing the second SQL query statement of each reported field and the first SQL query statement of the original data table to obtain a final third SQL query statement of each reported field;
the determining unit is used for splicing the third SQL query statements of the reported fields and associating the third SQL query statements with the query key values in the corresponding standard configuration table to obtain a corresponding query association table; and determining the association relation between the standard configuration table and each original data table according to each query association table.
A third aspect of the present invention provides a report generating apparatus, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instruction in the memory to enable the report generation equipment to execute the report generation method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-described report generation method.
In the technical scheme provided by the invention, the configuration data to be reported is mapped to a configuration intermediate table; then, analyzing the configuration intermediate table to obtain configuration fields, and assembling the configuration fields into a standard configuration table again; searching a plurality of original data tables to be reported from a database through a standard configuration table, and correlating the original data tables and the database; then, according to the incidence relation of the two data tables, assigning values to the standard configuration table by adopting each original data table, and carrying out standardization processing to obtain a corresponding reported data table; and finally, according to the file format requirement, converting the file format of the reported data table to obtain a corresponding report and pushing the report, so that the report with a uniform format is generated for different types of data, and the standardization degree of a report generation mode is improved.
Drawings
FIG. 1 is a diagram of an embodiment of a report generation method according to an embodiment of the present invention;
FIG. 2 is a diagram of another embodiment of a report generation method according to an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a report generating apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a report generating apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a report generating device in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a report generation method, a report generation device, equipment and a storage medium, wherein configuration data to be reported are mapped to a configuration intermediate table; analyzing the configuration fields from the configuration intermediate table, and assembling the configuration fields into a standard configuration table based on the application scene to be reported; based on the standard configuration table, a plurality of original data tables to be reported are searched from a preset database, the standard configuration table is associated with each original data table, so that the standard configuration table is assigned by each associated original data table, and standardized processing is carried out to obtain a reported data table; and converting the file format of the reported data sheet based on the file format requirement to be reported to obtain a corresponding report and pushing the report. The invention realizes the dynamic generation of the report and improves the standardization degree of the report generation.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of a report generating method in the embodiment of the present invention includes:
101. acquiring configuration data to be reported, and mapping the configuration data to a corresponding preset configuration intermediate table;
it is to be understood that the execution subject of the present invention may be a report generating apparatus, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject. It is emphasized that the configuration data may also be stored in a node of a blockchain in order to further ensure privacy and security of the configuration data.
In this embodiment, the configuration data to be reported includes various types of report data such as project development data, project supervision data, financial and newspaper data, and the like, and can be manually configured through a visual Web (Web page) page of the client, and since the configuration items of the configuration data are more, the data volume is also more, and the Web page is difficult to operate, the configuration can be performed by using Excel (form document) software; the configuration data can be quickly formulated by utilizing functions of dragging, copying, formula, background color, reference link and the like of Excel. And service personnel are usually more skilled in Excel operation and easy to operate.
The configuration data can be composed of a plurality of Excel configuration pages, such as a delivery field configuration page, a value field setting page, a delivery node maintenance page, a delivery node organization structure page and a drop-down list candidate value setting page, and can be manually modified by a service according to needs to generate the configuration data to be delivered.
102. Analyzing the configuration intermediate table to obtain a corresponding configuration field, and assembling the configuration field based on an application scene to be reported to obtain a corresponding standard configuration table;
in this embodiment, the configuration data of the configuration intermediate table is queried, data with a value mode of EXPRE can be obtained, and formula data is analyzed; for example, for formula data, a formula configuration file is firstly analyzed to obtain a corresponding formula, a special configuration formula is stored in a database formula template, and the formula to be calculated is determined as long as the formula is configured to the corresponding formula.
The standard configuration table contains JSON (JavaScript Object Notation) data in a configuration data fixed storage format, and is assembled according to an application scene to be reported and configuration data input by a serviceman and a fixed conversion rule.
103. Based on the standard configuration table, searching a plurality of original data tables to be reported from a preset database, and associating the standard configuration table with each original data table to obtain a corresponding association relation;
in this embodiment, the standard configuration table has query key values, and each query key value corresponds to one or more reporting fields in the multiple original data tables, so that the multiple original data tables can be searched from the preset database through the query key values in the standard configuration table to determine the original data table where the fields to be reported are located.
104. Based on the incidence relation, assigning values to the standard configuration table by adopting the original data tables, and carrying out standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
in this embodiment, according to the association relationship between the SQL query statement and the query key, the reporting field corresponding to the SQL query statement is obtained from the database, and then assigned to the location corresponding to the configuration data corresponding to the query key, which is specifically executable: (1) and assembling the reported fields in the original data tables into object classes, and sequentially performing cyclic assignment processing on the object classes by adopting a plurality of preset data assignment methods based on the query association table, wherein the data assignment methods comprise an array assignment method, a formula calculation assignment method, a constant replacement method, a variable replacement method and a dictionary conversion method. And the standard configuration table after the assignment processing is standardized and processed by the following steps: data desensitization processing, field length exceeding and intercepting, data format error screening and data assignment error screening.
105. And acquiring a file format requirement to be reported, and performing file format conversion on the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
In this embodiment, the reported data table may be converted into a corresponding data table format according to different file format requirements, and is pushed to the front end for display, where the specific file format includes XML (Extensible Markup Language), JSON (JavaScript Object Notation), TXT (text format), and the like.
In the embodiment of the invention, the configuration data to be reported is mapped to the configuration intermediate table; then, analyzing the configuration intermediate table to obtain configuration fields, and assembling the configuration fields into a standard configuration table again; searching a plurality of original data tables to be reported from a database through a standard configuration table, and correlating the original data tables and the database; then, according to the incidence relation of the two data tables, assigning values to the standard configuration table by adopting each original data table, and carrying out standardization processing to obtain a corresponding reported data table; and finally, according to the file format requirement, converting the file format of the reported data table to obtain a corresponding file format report and pushing the report, so that the report with a uniform format is generated for different types of data, and the standardization degree of a report generation mode is improved.
Referring to fig. 2, a second embodiment of the report generation method according to the embodiment of the present invention includes:
201. acquiring configuration data to be reported;
202. acquiring configuration conditions of a preset configuration intermediate table, and associating the configuration conditions with corresponding configuration data;
203. assembling the configuration data through preset assembly rules based on the configuration conditions to generate corresponding SQL statements;
204. mapping the SQL statement to a storage page in the configuration intermediate table;
in this embodiment, the configuration data content includes a query key value of a report field to be reported, a report condition, a mapping relationship between the configuration data and the report field, a mapping relationship between the configuration data and a preset configuration intermediate table, and the like; and subsequently setting the content of the configuration data as a configuration condition, then acquiring the configuration data, generating an SQL statement by adopting a general code according to an assembly rule if the configuration data meets the configuration condition, and storing the SQL statement to a corresponding storage page in a configuration intermediate table according to a preset SQL storage rule.
205. Analyzing the configuration intermediate table to obtain a corresponding configuration field;
206. inquiring the assembly code of the configuration field in an application scene to be reported, and matching a reporting node corresponding to the configuration field based on the assembly code;
207. based on the reporting node, sequentially converting the configuration fields into corresponding JSON data, assembling the JSON data, and generating a corresponding standard configuration table;
in this embodiment, the assembly codes of the same configuration fields in different application scenarios are different, and each assembly code corresponds to one reporting node. The method comprises the steps of inquiring an application scene (such as a scene identification code) to be reported, pre-configuring assembly codes of configuration fields, converting the configuration fields into JSON data according to the structural sequence of the assembly codes, and converting the configuration fields under the reporting nodes into corresponding JSON data by using reporting nodes corresponding to different assembly codes and preset data conversion rules.
208. Traversing the standard configuration table based on the assembling sequence of the JSON data in the standard configuration table to obtain a query key value of a field required for submission;
209. traversing a preset database based on the query key value, searching a report field to be reported from the preset database, and determining a plurality of original data tables of a report field source;
in this embodiment, for example, in the loan financial service, the query key may be an original data table in which contents such as the information of the security guarantee, the information of the contract, and the compensation information are recorded by querying the query key, such as a loan data number, a loan identity card number, and a mobile phone number.
Each original data table also contains identification information of the table itself and identification information of each reported field in the table, and each same or different reported field can be uniquely determined through the identification information of the table and the identification information of the reported field in the table.
210. Generating a first SQL query statement corresponding to each original data table and generating a second SQL query statement of each reported field;
211. sequentially splicing the second SQL query statement of each reported field and the first SQL query statement of the original data table to obtain a final third SQL query statement of each reported field;
212. splicing the third SQL query sentences of the reported fields, and associating the third SQL query sentences with the query key values in the corresponding standard configuration table to obtain a corresponding query association table;
213. determining the association relation between the standard configuration table and each original data table according to each query association table;
in this embodiment, a corresponding first SQL query statement may be generated according to the identification information of the original data table itself, and a corresponding second SQL query statement may be generated according to the identification information of each reporting field in the original data table; the third SQL query statement obtained by splicing may be used to identify each reporting field, and the association relationship between the standard configuration table and each original data table may be represented by the association relationship between the third SQL query statement of the reporting field and the query key value of the configuration data, and may be written into the query association table in the same way.
214. Based on the incidence relation, assigning values to the standard configuration table by adopting the original data tables, and carrying out standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
215. and acquiring a file format requirement to be reported, and performing file format conversion on the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
In the embodiment of the invention, corresponding original configuration data is subjected to a mapping process of a configuration intermediate table, an assembling process of a standard configuration table, a query and association process of the original data table and a generation process of an association relation, and finally, the standard configuration table is assigned through the original data table, and is converted into a corresponding file format according to requirements, so that a file format report to be reported can be obtained, the configuration data is subjected to uniform format processing, and a normalized report is generated for pushing.
In the above description of the report generating method in the embodiment of the present invention, referring to fig. 3, a report generating apparatus in the embodiment of the present invention is described below, where an embodiment of the report generating apparatus in the embodiment of the present invention includes:
a transmission module 301, configured to obtain configuration data to be reported, and map the configuration data to a corresponding preset configuration intermediate table;
an assembling module 302, configured to analyze the configuration intermediate table to obtain a corresponding configuration field, and assemble the configuration field based on an application scenario to be reported to obtain a corresponding standard configuration table;
the association module 303 is configured to search, based on the standard configuration table, a plurality of original data tables to be reported from a preset database, and associate the standard configuration table with each original data table to obtain a corresponding association relationship;
an assignment module 304, configured to assign values to the standard configuration table by using the original data tables based on the association relationship, and perform standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
the conversion module 305 is configured to obtain a file format requirement to be reported, and perform file format conversion on the reported data table based on the file format requirement, to obtain a corresponding file format report, and perform pushing.
In the embodiment of the invention, the configuration data to be reported is mapped to the configuration intermediate table; then, analyzing the configuration intermediate table to obtain configuration fields, and assembling the configuration fields into a standard configuration table again; searching a plurality of original data tables to be reported from a database through a standard configuration table, and correlating the original data tables and the database; then, according to the incidence relation of the two data tables, assigning values to the standard configuration table by adopting each original data table, and carrying out standardization processing to obtain a corresponding reported data table; and finally, according to the file format requirement, converting the file format of the reported data table to obtain a corresponding report and pushing the report, so that the report with a uniform format is generated for different types of data, and the standardization degree of a report generation mode is improved.
Referring to fig. 4, another embodiment of the report generating apparatus according to the embodiment of the present invention includes:
the mapping module 301 is configured to obtain configuration data to be reported, and map the configuration data to a corresponding preset configuration intermediate table;
an assembling module 302, configured to analyze the configuration intermediate table to obtain a corresponding configuration field, and assemble the configuration field based on an application scenario to be reported to obtain a corresponding standard configuration table;
the association module 303 is configured to search, based on the standard configuration table, a plurality of original data tables to be reported from a preset database, and associate the standard configuration table with each original data table to obtain a corresponding association relationship;
an assignment module 304, configured to assign values to the standard configuration table by using the original data tables based on the association relationship, and perform standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
the conversion module 305 is configured to obtain a file format requirement to be reported, and perform file format conversion on the reported data table based on the file format requirement, to obtain a corresponding file format report, and perform pushing.
Specifically, the mapping module 301 includes:
an association unit 3011, configured to obtain configuration conditions of a preset configuration intermediate table, and associate the configuration conditions with corresponding configuration data;
an assembling unit 3012, configured to assemble the configuration data according to preset assembling rules based on the configuration conditions, and generate corresponding SQL statements;
a mapping unit 3013, configured to map the SQL statement to a storage page in the configuration intermediate table.
Specifically, the assembly module 302 includes:
a matching unit 3021, configured to query an assembly code of the configuration field in an application scenario to be reported, and match a reporting node corresponding to the configuration field based on the assembly code;
and the conversion unit 3022 is configured to sequentially convert the configuration fields into corresponding JSON data based on the reporting node, and assemble the JSON data to generate a corresponding standard configuration table.
Specifically, the association module 303 includes:
a traversal unit 3031, configured to traverse the standard configuration table based on the assembly sequence of the JSON data in the standard configuration table to obtain a query key value of a field required for submission;
a searching unit 3032, configured to traverse a preset database based on the query key value, search a report field to be reported from the preset database, and determine multiple original data tables from which the report field originates.
Specifically, the associating module 303 further includes:
a generating unit 3033, configured to generate first SQL query statements corresponding to the original data tables and generate second SQL query statements of the reported fields;
the splicing unit 3034 is configured to splice the second SQL query statement of each reporting field and the first SQL query statement of the original data table in sequence to obtain a final third SQL query statement of each reporting field;
a determining unit 3035, configured to splice the third SQL query statements of the reported fields, and associate the third SQL query statements with the query key values in the corresponding standard configuration table to obtain a corresponding query association table; and determining the association relation between the standard configuration table and each original data table according to each query association table.
In the embodiment of the invention, how to convert the original configuration data into the report in the target file format is described in detail; and for original configuration data, performing a mapping process of a configuration intermediate table, an assembling process of a standard configuration table, a query and association process of an original data table and a generation process of an association relation, finally performing assignment on the standard configuration table through the original data table, converting the standard configuration table into a corresponding file format according to requirements to obtain a report to be reported, performing uniform format processing on the configuration data, and generating a normalized report for pushing.
Fig. 3 and fig. 4 describe the report generation apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the report generation apparatus in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a report generating device according to an embodiment of the present invention, where the report generating device 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations on the report generating apparatus 500. Still further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the report generating apparatus 500.
The report generating device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the report generating device architecture illustrated in FIG. 5 does not constitute a limitation of report generating devices and may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the report generating method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
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 embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A report generation method is characterized by comprising the following steps:
acquiring configuration data to be reported, and mapping the configuration data to a corresponding preset configuration intermediate table;
analyzing the configuration intermediate table to obtain a corresponding configuration field, and assembling the configuration field based on an application scene to be reported to obtain a corresponding standard configuration table;
based on the standard configuration table, searching a plurality of original data tables to be reported from a preset database, and associating the standard configuration table with each original data table to obtain a corresponding association relation;
based on the incidence relation, assigning values to the standard configuration table by adopting the original data tables, and carrying out standardization processing on the assigned standard configuration table to obtain a corresponding reported data table;
and acquiring a file format requirement to be reported, and performing file format conversion on the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
2. A report generation method according to claim 1, characterized in that said mapping said configuration data to a corresponding preset configuration intermediate table comprises:
determining configuration conditions of a preset configuration intermediate table, and associating the configuration conditions with corresponding configuration data;
assembling the configuration data through preset assembly rules based on the configuration conditions to generate corresponding SQL statements;
and mapping the SQL statement to a storage page in the configuration intermediate table.
3. A report generation method according to claim 1, wherein the assembling the configuration fields based on the application scenario to be reported to obtain the corresponding standard configuration table comprises:
inquiring the assembly code of the configuration field in an application scene to be reported, and matching a reporting node corresponding to the configuration field based on the assembly code;
and sequentially converting the configuration fields into corresponding JSON data based on the reporting node, assembling the JSON data, and generating a corresponding standard configuration table.
4. A report generation method according to claim 3, characterized in that said searching a plurality of original data tables to be reported from a preset database based on said standard configuration table comprises:
traversing the standard configuration table based on the assembling sequence of the JSON data in the standard configuration table to obtain a query key value of a field required for submission;
and traversing a preset database based on the query key value, searching a report field to be reported from the preset database, and determining a plurality of original data tables from which the report field comes.
5. The report generation method according to claim 4, wherein the associating the standard configuration table with each of the original data tables to obtain a corresponding association relationship comprises:
generating a first SQL query statement corresponding to each original data table and generating a second SQL query statement of each reported field;
sequentially splicing the second SQL query statement of each reported field and the first SQL query statement of the original data table to obtain a final third SQL query statement of each reported field;
splicing the third SQL query sentences of the reported fields, and associating the third SQL query sentences with the query key values in the corresponding standard configuration table to obtain a corresponding query association table;
and determining the association relation between the standard configuration table and each original data table according to each query association table.
6. A report generation apparatus, characterized by comprising:
the mapping module is used for acquiring the configuration data to be reported and mapping the configuration data to a corresponding preset configuration intermediate table;
the assembly module is used for analyzing the configuration intermediate table to obtain a corresponding configuration field, and assembling the configuration field based on an application scene to be reported to obtain a corresponding standard configuration table;
the association module is used for searching a plurality of original data tables to be reported from a preset database based on the standard configuration table, and associating the standard configuration table with each original data table to obtain a corresponding association relation;
the assignment module is used for assigning the standard configuration table by adopting each original data table based on the incidence relation and carrying out standardized processing on the assigned standard configuration table to obtain a corresponding reported data table;
and the conversion module is used for acquiring the file format requirement to be reported, and converting the file format of the reported data table based on the file format requirement to obtain a corresponding file format report and pushing the report.
7. A report generation apparatus according to claim 6, characterized in that said mapping module comprises:
the device comprises an association unit, a configuration data acquisition unit and a configuration data processing unit, wherein the association unit is used for acquiring configuration conditions of a preset configuration intermediate table and associating the configuration conditions with corresponding configuration data;
the assembling unit is used for assembling the configuration data through a preset assembling rule based on the configuration condition to generate a corresponding SQL statement;
and the mapping unit is used for mapping the SQL statement to a storage page in the configuration intermediate table.
8. A report generation apparatus according to claim 6, characterized in that said assembly module comprises:
the matching unit is used for inquiring the assembly codes of the configuration fields in the application scene to be reported and matching the reporting nodes corresponding to the configuration fields based on the assembly codes;
and the conversion unit is used for sequentially converting the configuration fields into corresponding JSON data based on the report nodes, assembling the JSON data and generating a corresponding standard configuration table.
9. A report generation apparatus, characterized by comprising: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the report generating device to perform the report generating method of any of claims 1-5.
10. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the report generating method according to any of claims 1-5.
CN202011545206.4A 2020-12-23 2020-12-23 Report generation method, device, equipment and storage medium Pending CN112527818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011545206.4A CN112527818A (en) 2020-12-23 2020-12-23 Report generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011545206.4A CN112527818A (en) 2020-12-23 2020-12-23 Report generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112527818A true CN112527818A (en) 2021-03-19

Family

ID=74976089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011545206.4A Pending CN112527818A (en) 2020-12-23 2020-12-23 Report generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527818A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114741393A (en) * 2022-04-19 2022-07-12 四川大学 Material genetic engineering data conversion and retrieval method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114741393A (en) * 2022-04-19 2022-07-12 四川大学 Material genetic engineering data conversion and retrieval method
CN114741393B (en) * 2022-04-19 2023-04-28 四川大学 Material genetic engineering data conversion and retrieval method

Similar Documents

Publication Publication Date Title
US11138252B2 (en) System for organizing and fast searching of massive amounts of data
US10587461B2 (en) Incrementally managing distributed configuration data
CN108563768B (en) Data conversion method, device, equipment and storage medium for different data models
US20180074852A1 (en) Compact Task Deployment for Stream Processing Systems
GB2362969A (en) Message transformation selection
CN111512315A (en) Block-wise extraction of document metadata
US20210319039A1 (en) Extraction of a nested hierarchical structure from text data in an unstructured version of a document
CN112667697A (en) Method and device for acquiring real estate information by combining RPA and AI
CN112667720A (en) Conversion method, device, equipment and storage medium of interface data model
CN112380278A (en) Financial data report generation method, device, equipment and storage medium
CN107133233B (en) Processing method and device for configuration data query
CN115335821A (en) Offloading statistics collection
US20150106279A1 (en) Compliance as a service for an organization
CN112579578A (en) Metadata-based data quality management method, device and system and server
US20150169379A1 (en) Information processing method, information processing device, and recording medium
CN112527818A (en) Report generation method, device, equipment and storage medium
CN114035789A (en) Log analysis template generation method, log analysis device and log analysis equipment
CN112860954A (en) Real-time computing method and real-time computing system
CN113296752A (en) Method, system, device and storage medium for generating API document
JP2021140430A (en) Database migration method, database migration system, and database migration program
US20130262662A1 (en) Methods and systems for smart adapters in a social media content analytics environment
CN112633761A (en) Index data query method, device, equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
Falkenthal et al. Requirements and enforcement points for policies in industrial data sharing scenarios
CN115544089A (en) Data processing method, device, 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