CN112347748A - Data report generation method and device, computer equipment and readable storage medium - Google Patents

Data report generation method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112347748A
CN112347748A CN202011351403.2A CN202011351403A CN112347748A CN 112347748 A CN112347748 A CN 112347748A CN 202011351403 A CN202011351403 A CN 202011351403A CN 112347748 A CN112347748 A CN 112347748A
Authority
CN
China
Prior art keywords
report
data
target
parent
theme
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
CN202011351403.2A
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.)
Beijing Baijia Technology Group Co ltd
Original Assignee
Beijing Baijia Technology Group 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 Beijing Baijia Technology Group Co ltd filed Critical Beijing Baijia Technology Group Co ltd
Priority to CN202011351403.2A priority Critical patent/CN112347748A/en
Publication of CN112347748A publication Critical patent/CN112347748A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for generating a data report, computer equipment and a readable storage medium, wherein the method comprises the steps of determining a pre-obtained parent report matched with a target report theme and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by a user; determining target display data of the target report based on the basic data in the parent report and the transformation rule; and generating the target report based on the target report theme and the target display data. In the embodiment of the disclosure, the target display data can be determined based on the target report topic required by the user and the parent report which is obtained in advance and matched with the target report topic, and the corresponding target report is generated. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.

Description

Data report generation method and device, computer equipment and readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for generating a data report, a computer device, and a readable storage medium.
Background
With the rapid development of the internet industry, more and more users directly view or download data reports from a webpage (web) end, so that the data acquisition time is saved, and the working efficiency is improved. Currently, the data report can be obtained by using a Python (Python) or a Java web page (Java web) or other development programs.
However, in the prior art, taking Python as an example, although a plurality of special data report templates are configured in Python, in the process of processing and integrating data, developers are still required to write program files to complete the generation work of data reports; similarly, in the Java web, because the content expressed by each data report is different, a front-end developer, a back-end developer, or two developers are required to assist, and the characteristics of each data report, including, for example, the header, the format, etc., are configured one by one, that is, each data report needs to be developed once. No matter which way of generating the report forms is adopted, in the prior art, the report forms related to the data are configured in advance by background personnel under most conditions, so that various report form templates are obtained, when a large number of templates needing to be configured exist, especially when various requirements of a user are required to be met, the background personnel are required to configure or program one by one, the workload is large, and a large amount of manpower, material resources and time cost are consumed.
Disclosure of Invention
The embodiment of the disclosure at least provides a method and a device for generating a data report, computer equipment and a readable storage medium.
In a first aspect, an embodiment of the present disclosure provides a method for generating a data report, where the method includes:
determining a parent report matched with the target report theme and obtained in advance and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by the user;
determining target display data of the target report based on the basic data in the parent report and the transformation rule;
and generating the target report based on the target report theme and the target display data.
In this embodiment, the display data in the report is determined based on the preconfigured parent report and the data transformation rules included in the report topic, and a corresponding report is generated, so that report development work does not need to be performed for each user requirement, and manpower resources are saved.
In an optional implementation manner, the determining, according to the obtained target report topic of the target report required by the user, a parent report matched with the target report topic and obtained in advance includes:
extracting data identification parameters in the target report theme;
and acquiring a parent report corresponding to the data identification parameters according to the data identification parameters.
In an optional implementation manner, the obtaining, according to the data identification parameter, a parent report corresponding to the data identification parameter includes:
acquiring a pre-stored parent report set;
detecting whether the parent report set has a prestored parent report matched with the data identification parameters;
and if so, determining the pre-stored parent report matched with the data identification parameters as the parent report.
In the optional embodiment, the parent report generated by history is used, so that the processing efficiency is improved.
In an optional implementation manner, after the detecting whether the pre-stored parent report matching the data identification parameter exists in the parent report set, the method further includes:
if not, acquiring original report data corresponding to the data identification parameters;
and obtaining the parent report based on a preset abstract parent template and the original report data.
In the optional embodiment, a parent report is obtained based on the abstract parent template and the original report data, so as to prepare for a subsequent report generation process.
In an optional implementation manner, the method for determining the transformation rule of the data in the target report topic includes:
extracting transformation rule parameters in the target report theme;
and determining a data transformation rule corresponding to the transformation rule parameter based on a preset mapping relation between the transformation rule and the transformation rule parameter according to the transformation rule parameter.
In an optional embodiment, the determining target display data of the target report based on the basic data in the parent report and the transformation rule includes:
performing data processing on the basic data in the parent report based on the transformation rule to obtain result data to be displayed;
and determining the result data to be displayed and the basic data as target display data of the target report, or determining the result data to be displayed as the target display data of the target report.
In an optional implementation manner, the generating the target report based on the target report topic and the target presentation data includes:
determining the subject of the target report as the report name, the report structure and the report structure of the target report;
and splicing the report name, the report structure and the target display data based on a preset data splicing rule to obtain the target report.
In an optional implementation, the generating method further includes:
distributing an identity identifier corresponding to the target report form based on the obtained target report form;
the identity is used for the user to obtain a target report corresponding to the identity.
In the optional embodiment, the identifier is added to the target report, so that the user can conveniently download the target report subsequently.
In a second aspect, an embodiment of the present disclosure further provides a device for generating a data report, where the device includes:
the system comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a parent report matched with a target report theme required by a user and obtained in advance and a transformation rule of data in the target report theme according to the target report theme of the target report;
the second determination module is used for determining target display data of the target report based on basic data in the parent report and the transformation rule;
and the generating module is used for generating the target report based on the target report theme and the target display data.
In an alternative embodiment, the first determining module includes:
the first extraction unit is used for extracting the data identification parameters in the target report topic;
and the acquisition unit is used for acquiring a parent report corresponding to the data identification parameter according to the data identification parameter.
In an optional implementation manner, the obtaining unit is specifically configured to:
acquiring a pre-stored parent report set;
detecting whether the parent report set has a prestored parent report matched with the data identification parameters;
and if so, determining the pre-stored parent report matched with the data identification parameters as the parent report.
In an optional implementation, the obtaining unit is further configured to:
if not, acquiring original report data corresponding to the data identification parameters;
and obtaining the parent report based on a preset abstract parent template and the original report data.
In an optional implementation manner, the first determining module further includes:
the second extraction unit is used for extracting the transformation rule parameters in the target report theme;
and the determining unit is used for determining a data transformation rule corresponding to the transformation rule parameter based on a preset mapping relation between the transformation rule and the transformation rule parameter according to the transformation rule parameter.
In an optional implementation manner, the second determining module is specifically configured to:
performing data processing on the basic data in the parent report based on the transformation rule to obtain result data to be displayed;
and determining the result data to be displayed and the basic data as target display data of the target report, or determining the result data to be displayed as the target display data of the target report.
In an optional implementation manner, the generating module is specifically configured to:
determining the subject of the target report as the report name and the report structure of the target report;
and splicing the report name, the report structure and the target display data based on a preset data splicing rule to obtain the target report.
In an optional implementation manner, the generating device further includes:
the distribution module is used for distributing the identity corresponding to the target report form based on the obtained target report form;
the identity is used for the user to obtain a target report corresponding to the identity.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
The method, the device, the computer equipment and the readable storage medium for generating the data report comprise the steps of determining a parent report matched with a target report theme and obtained in advance and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by a user; determining target display data of the target report based on the basic data in the parent report and the transformation rule; and generating the target report based on the target report theme and the target display data.
Therefore, the target display data can be determined based on the target report theme required by the user and the parent report which is obtained in advance and matched with the target report theme, and the corresponding target report can be generated. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1 is a flowchart illustrating a method for generating a data report according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method for determining a pre-obtained parent report matching a target report topic according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating another method for generating a data report according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating an apparatus for generating a data report according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram illustrating a first determining module in a data report generating apparatus according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another apparatus for generating a data report according to an embodiment of the present disclosure;
fig. 7 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
Research shows that, at present, data reports are mostly obtained by Python (Python) or Java web pages (Java web) and other development programs. However, taking Python as an example, although a plurality of special data report templates are configured in Python, in the process of processing and integrating data, developers are still required to write program files to complete the generation work of data reports; similarly, in the Java web, because the content expressed by each data report is different, but most report development methods currently develop report generation programs by means of front-end and back-end collaboration, that is, by means of front-end or back-end dying of a header, so as to generate data reports correspondingly, but each data report is different in data header or format, so that assistance is required by front-end developers, back-end developers, or both developers, and configuration is performed one by one for the features of each data report, such as header, format, and the like, that is, development work is performed once for each data report.
No matter what current report generation mode is adopted, most of the situations are that background personnel are used for pre-configuring reports related to data so as to obtain various report templates, when a large number of templates needing to be configured exist, especially when various requirements of a user are required to be met, the background personnel are required to configure or program one by one, the workload is large, and a large amount of manpower, material resources and time cost are consumed.
Based on the research, the method for generating the data report provided by the embodiment of the disclosure includes determining a parent report matched with a target report theme and obtained in advance and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by a user; determining target display data of the target report based on the basic data in the parent report and the transformation rule; and generating the target report based on the target report theme and the target display data.
Therefore, the target display data can be determined based on the target report theme required by the user and the parent report which is obtained in advance and matched with the target report theme, and the corresponding target report can be generated. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
To facilitate understanding of the present embodiment, first, a method for generating a data report disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the method for generating a data report provided in the embodiments of the present disclosure is generally a computer device with a certain computing capability, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle mounted device, a wearable device, or a server or other processing device. In some possible implementations, the data report generation method may be implemented by a processor calling computer-readable instructions stored in a memory.
The following describes a method for generating a data report according to the embodiment of the present disclosure by taking an execution subject as a terminal device as an example.
Referring to fig. 1, a flowchart of a method for generating a data report provided in the embodiment disclosed in fig. 1 includes steps S101 to S103, where:
s101: according to the acquired target report theme of the target report required by the user, determining a parent report matched with the target report theme and obtained in advance, and a transformation rule of data in the target report theme.
In this step, a target report topic of a required target report requested by a user may be obtained first, where the user may be a person requesting the target report, or an operation and maintenance person corresponding to the report generation system, or another person performing cooperation between the person requesting the target report and the operation and maintenance person.
For example, the objective report requested by the user may be "net business data table of company a per day", "net business data table of company a nearly seven days", or "net business increase rate data table of company a nearly seven days", etc. Since the user may not be able to determine the standard table name, only the target report topic corresponding to the target report needs to be input, which may be "company a, daily, net turnover," "company a, near seven days, net turnover," or "company a, near seven days, net turnover growth rate," taking the above as an example.
After the target report theme of the target report required by the user is obtained, the target report theme input by the user can be analyzed, so that the corresponding target report is generated according to the target report theme. Taking the generated target report as a "net turnover increase rate data table of company a in near seven days" as an example, wherein "net turnover increase rate data table of company a in near seven days" represents data source information of original report data, i.e. a parent report, and "net turnover increase rate" represents an acquisition method of target display information of the data report, i.e. a transformation rule of data.
And then, respectively explaining the determination of a parent report which is matched with the target report theme and is obtained in advance and the determination of the transformation rule of the data in the target report theme.
In the process of determining a pre-obtained parent report matched with the target report theme according to the obtained target report theme of the target report required by the user, the data identification parameter in the target report theme can be extracted, and then the parent report corresponding to the data identification parameter is obtained according to the data identification parameter.
Specifically, since the computer can only recognize a certain computer language, the target report topic input by the user needs to be converted, so that the computer can recognize and execute the corresponding action. For example, the data identification parameters may include: the attribute characteristics of name, time, category, etc. take the above example as an example, and the corresponding data identification parameters are: "A, 7days, sales" and the like.
In this disclosure, the parent report is a report corresponding to the same data source, and includes all data corresponding to the data source. Since many current report development methods depend on the same data source in many cases, in the above examples, "net business volume of each branch in nearly seven days" and "net business volume increase rate of each branch in nearly seven days", etc., the corresponding underlying data sources are calculated according to "net business volume of each branch per day", but with the current report generation methods, two corresponding data reports are generated by performing two report development works. Therefore, in the embodiment of the present disclosure, a data report generation method is provided, which can dynamically generate a data report according to a requirement without multiple additional development works, and a series of data reports corresponding to different user requirements are generated based on a parent report corresponding to the same data source.
Compared with the conventional generation method, only one report with a specified header can be returned every time one new class is added, if a plurality of data reports with the same data source are required to be generated, a plurality of classes are required to be created, and then, when a report requirement is added every time, a developer needs to perform programming development work once, so that the developer is undoubtedly heavy. In addition, the current generation method needs to be released to the online environment after each development, and the developed data report can be used, which also causes a certain workload for operation and maintenance personnel, and needs to consume more online configuration resources. In the embodiment of the present disclosure, each newly added class may not only return a data report, but may also be counted into the same class corresponding to the same data source, and perform subsequent data report generation according to the class.
In an embodiment of the present disclosure, the generation process of the parent report may include the following methods: the method includes the steps that a header of a data report and all original report data to be included in a parent report are returned by a back end, all the original report data are processed based on a preset delegation mode of inheriting an abstract class, and an abstract parent report which inherits the preset abstract parent class is obtained.
After the corresponding data identification parameters are obtained, the parent report corresponding to the data identification parameters can be obtained based on the data identification parameters.
Specifically, referring to fig. 2, fig. 2 is a flowchart of a method for determining a parent report that is matched with a target report topic and is obtained in advance according to an embodiment of the present disclosure.
As shown in fig. 2, after the data identification parameters are acquired, a pre-stored set of parent reports needs to be acquired. The parent report set is a plurality of parent reports generated in history, and specifically, the parent report set may be stored in a local database or a cloud server or the like for a subsequent calling process.
After the pre-stored parent report set is obtained, whether the pre-stored parent report matched with the data identification parameters exists in the parent report set can be detected. Taking the above as an example, the data identification parameters are "a, 7days, and sales", and correspondingly, it is necessary to detect whether there is a pre-stored parent report with the data identification parameters "a, 7days, and sales" in the parent report set. And if so, determining the pre-stored parent report matched with the data identification parameters as the parent report, namely determining the parent report with the corresponding data identification parameters in the parent report set as the parent report required by the data report generation. If the data identification parameter does not exist, a corresponding parent report needs to be created according to the data identification parameter.
How to create the corresponding parent report according to the data identification parameter is explained below.
When detecting that there is no pre-stored parent report matched with the data identification parameter in the parent report set, first obtaining original report data corresponding to the data identification parameter, for example, the data identification parameter is "a, 7days, sales", and can correspondingly obtain "sales of company a in nearly seven days". After the corresponding original report data is obtained, the parent report can be obtained based on a preset abstract parent template and the original report data.
The parent abstract template refers to a framework for designing a common function which can provide consistent implementation for a group of related classes. Abstract methods have no concrete implementation, and a class with one or more abstract methods becomes an abstract class. In the embodiment of the present disclosure, based on the same original report data, that is, the data source, when the abstract parent template is utilized to combine the data, a parent report corresponding to the original report data may be obtained.
In the embodiment of the disclosure, the method further comprises determining a transformation rule of the data in the target report topic. The method for determining the transformation rule of the data in the target report topic comprises the following steps: extracting transformation rule parameters in the target report theme; and determining a data transformation rule corresponding to the transformation rule parameter based on a preset mapping relation between the transformation rule and the transformation rule parameter according to the transformation rule parameter.
For example, if the transformation rule corresponding to the target report topic may be "Average", and the transformation rule parameter may be "Average", then the mapping relationship between the transformation rule and the transformation rule parameter may be based on, for example, XX value of a row or a column is calculated, and the corresponding data transformation rule is to calculate the Average value of a row or a column.
S102, determining target display data of the target report based on the basic data in the parent report and the transformation rule.
In this step, after determining the parent report, that is, after acquiring the basic data in the parent report, the target display data of the target report may be determined in combination with the determined data transformation rule. The method specifically comprises the following steps: performing data processing on the basic data in the parent report based on the transformation rule to obtain result data to be displayed; and determining the result data to be displayed and the basic data as target display data of the target report, or determining the result data to be displayed as the target display data of the target report.
For example, the basic data in the parent report may be subjected to data processing based on the transformation rule, for example, calculation is performed by using the basic data in the parent report, and a corresponding value is calculated as result data to be displayed based on the transformation rule required by the user, such as an average, a variance, a mode, or other operation rule. And then, based on the corresponding requirements of the target report theme, determining the result data to be displayed and the basic data as the target display data of the target report, or determining the result data to be displayed as the target display data of the target report. For example, only the calculated result data to be displayed is displayed, that is, only the average, variance, mode or the corresponding value calculated according to other operation rules is displayed; or, the result data to be displayed is displayed, and the corresponding original data, that is, the result data to be displayed is displayed, and the common data corresponding to the result data to be displayed in the parent report is displayed, for example, when the average number is displayed, the common data adopted when the average number is obtained is also displayed.
S103, generating the target report based on the target report theme and the target display data.
In this step, the target report usually includes a report name and a corresponding report structure, and specifically includes a header and display data corresponding to the header. Corresponding to the header part, the subject of the target report can be determined to be the report name and the report structure of the target report, for example: "the business amount of company a is about seven days", "the business amount increase rate of company a is about seven days", or alternatively, the expression manner of the report name may be changed, for example, "statistical table of business amount of company a is about seven days", "statistical table of business amount increase rate of company a is about seven days", or the like, so as to better express the contents included in the data report.
For example, for the header and the presentation data corresponding to the header, since in the parent report, header information corresponding to the presentation data is already determined, for example: the name, age, score and the like, so that the header and the display data corresponding to the header can be obtained only by exporting the corresponding content of the parent report. Specifically, the viewing and exporting of the header and the presentation data corresponding to the header are actually a composition manner in which the header and the presentation data corresponding to the header can be configured in a cache (redis or nosql) or an Apollo configuration center (Apollo).
In the embodiment of the present disclosure, the report name, the report structure, and the target display data may be spliced based on a preset data splicing rule to obtain the target report.
Illustratively, the report name, the report structure and the target display data may be spliced according to a preset table splicing manner or based on a certain splicing template, so that a target report including the report name, the report structure and the target display data may be obtained.
According to the method and the device, a parent report matched with a target report theme and obtained in advance and a transformation rule of data in the target report theme are determined according to the obtained target report theme of the target report required by a user; determining target display data of the target report based on the basic data in the parent report and the transformation rule; and generating the target report based on the target report theme and the target display data.
Therefore, the target display data is determined according to the target report theme required by the user and the previously obtained parent report matched with the target report theme, and the corresponding target report is generated. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.
Referring to fig. 3, fig. 3 is a flowchart illustrating another data report generating method according to an embodiment of the present disclosure. As shown in fig. 3, the page loading method includes:
s301, according to the acquired target report theme of the target report required by the user, determining a parent report matched with the target report theme and obtained in advance, and a transformation rule of data in the target report theme.
S302, determining target display data of the target report based on the basic data in the parent report and the transformation rule.
S303, generating the target report based on the target report theme and the target display data.
The descriptions of step S301 to step S303 may refer to the descriptions of step S101 to step S103, and the same technical effects may be achieved, and are not described herein again.
S304, distributing an identity corresponding to the target report based on the obtained target report; the identity is used for the user to obtain a target report corresponding to the identity.
In this step, after the generation of the data report corresponding to the above steps S301 to S303 is completed, since the data reports corresponding to the same parent report inherit the same parent information, a same report interface or a download interface can be written, and the data reports corresponding to the same parent report interface and the same parent report interface all have the same parent information. Therefore, the downloading and the checking of each data report corresponding to the same parent report can be realized only by one uniform interface and component, and the data report of the corresponding parent report can be obtained without excessive work.
Specifically, the user may input different identification information, and may search for a data report corresponding to the identification information for the parameter information. Therefore, only a uniform interface for downloading the data report and displaying the webpage needs to be provided, and a user can acquire the corresponding report of the same parent class, namely each data report of the data source, by inputting the identity of different parameters, and download and check the data report.
In the embodiment of the disclosure, the target display data can be determined based on the target report topic required by the user and the parent report which is obtained in advance and matched with the target report topic, and the corresponding target report is generated. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, the embodiment of the present disclosure further provides a device for generating a data report corresponding to the method for generating a data report, and since the principle of solving the problem of the device in the embodiment of the present disclosure is similar to that of the method for generating a data report in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
Referring to fig. 4, 5 and 6, fig. 4 is a schematic diagram of a data report generation apparatus according to an embodiment of the present disclosure; fig. 5 is a schematic structural diagram of a first determining module in a data report generating device according to an embodiment of the present disclosure; fig. 6 is a schematic diagram of another data report generation apparatus according to an embodiment of the present disclosure. The generation device of the data report comprises: a first determining module 410, a second determining module 420, and a generating module 430, wherein:
the first determining module 410 is configured to determine, according to an acquired target report topic of a target report required by a user, a parent report which is matched with the target report topic and is obtained in advance, and a transformation rule of data in the target report topic;
a second determining module 420, configured to determine target display data of the target report based on the basic data in the parent report and the transformation rule;
a generating module 430, configured to generate the target report based on the target report topic and the target display data.
In an alternative embodiment, as shown in fig. 5, the first determining module 410 includes:
the first extraction unit 411 is configured to extract a data identification parameter in the target report topic;
an obtaining unit 412, configured to obtain, according to the data identification parameter, a parent report corresponding to the data identification parameter.
In an optional implementation manner, the obtaining unit 412 is specifically configured to:
acquiring a pre-stored parent report set;
detecting whether the parent report set has a prestored parent report matched with the data identification parameters;
and if so, determining the pre-stored parent report matched with the data identification parameters as the parent report.
In an optional implementation, the obtaining unit 412 is further configured to:
if not, acquiring original report data corresponding to the data identification parameters;
and obtaining the parent report based on a preset abstract parent template and the original report data.
In an optional implementation, the first determining module 410 further includes:
the second extraction unit 413 is used for extracting the transformation rule parameters in the target report topic;
the determining unit 414 is configured to determine, according to the transformation rule parameter, a data transformation rule corresponding to the transformation rule parameter based on a mapping relationship between a preset transformation rule and the transformation rule parameter.
In an optional implementation manner, the second determining module 420 is specifically configured to:
performing data processing on the basic data in the parent report based on the transformation rule to obtain result data to be displayed;
and determining the result data to be displayed and the basic data as target display data of the target report, or determining the result data to be displayed as the target display data of the target report.
In an optional implementation manner, the generating module 430 is specifically configured to:
determining the subject of the target report as the report name and the report structure of the target report;
and splicing the report name, the report structure and the target display data based on a preset data splicing rule to obtain the target report.
In an optional implementation, as shown in fig. 6, the generating device further includes:
the allocating module 440 is configured to allocate, based on the obtained target report, an identity identifier corresponding to the target report;
the identity is used for the user to obtain a target report corresponding to the identity.
The target display data can be determined and the corresponding target report can be generated based on the target report theme required by the user and the parent report which is obtained in advance and matched with the target report theme. In the process, development and configuration of each data report do not need to be carried out by developers, so that the consumption of human resources is saved, and the time required by report generation is saved.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 7, a schematic structural diagram of a computer device 700 provided in the embodiment of the present disclosure includes a processor 701, a memory 702, and a bus 703. The memory 702 is used for storing execution instructions and includes a memory 7021 and an external memory 7022; the memory 7021 is also referred to as an internal memory, and is used to temporarily store operation data in the processor 701 and data exchanged with an external memory 7022 such as a hard disk, the processor 701 exchanges data with the external memory 7022 through the memory 7021, and when the computer apparatus 700 is operated, the processor 701 communicates with the memory 702 through the bus 703, so that the processor 701 executes the following instructions:
determining a parent report matched with the target report theme and obtained in advance and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by the user;
determining target display data of the target report based on the basic data in the parent report and the transformation rule;
and generating the target report based on the target report theme and the target display data.
The embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for generating a data report in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product bears a computer-readable storage medium of a program code, where instructions included in the program code may be used to execute steps of the method for generating a data report in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several 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 disclosure. 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.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. A method for generating a data report is characterized in that the method comprises the following steps:
determining a parent report matched with the target report theme and obtained in advance and a transformation rule of data in the target report theme according to the obtained target report theme of the target report required by the user;
determining target display data of the target report based on the basic data in the parent report and the transformation rule;
and generating the target report based on the target report theme and the target display data.
2. The method for generating a data report according to claim 1, wherein the step of determining a pre-obtained parent report matched with the target report theme according to the obtained target report theme of the target report required by the user comprises:
extracting data identification parameters in the target report theme;
and acquiring a parent report corresponding to the data identification parameters according to the data identification parameters.
3. The method for generating a data report according to claim 2, wherein the obtaining a parent report corresponding to the data identification parameter according to the data identification parameter includes:
acquiring a pre-stored parent report set;
detecting whether the parent report set has a prestored parent report matched with the data identification parameters;
and if so, determining the pre-stored parent report matched with the data identification parameters as the parent report.
4. The method for generating a data report according to claim 3, further comprising, after said detecting whether there is a pre-stored parent report matching the data identification parameter in the parent report set:
if not, acquiring original report data corresponding to the data identification parameters;
and obtaining the parent report based on a preset abstract parent template and the original report data.
5. The method of generating a data report according to claim 1 wherein the step of determining transformation rules for data in the target report topic comprises:
extracting transformation rule parameters in the target report theme;
and determining a data transformation rule corresponding to the transformation rule parameter based on a preset mapping relation between the transformation rule and the transformation rule parameter according to the transformation rule parameter.
6. The method for generating a data report according to claim 1, wherein said determining target display data of the target report based on the basic data in the parent report and the transformation rules comprises:
performing data processing on the basic data in the parent report based on the transformation rule to obtain result data to be displayed;
and determining the result data to be displayed and the basic data as target display data of the target report, or determining the result data to be displayed as the target display data of the target report.
7. The method for generating a data report according to claim 1, wherein said generating the target report based on the target report topic and the target presentation data comprises:
determining the subject of the target report as the report name and the report structure of the target report;
and splicing the report name, the report structure and the target display data based on a preset data splicing rule to obtain the target report.
8. A method of generating a data report as claimed in claim 1 further comprising:
distributing an identity identifier corresponding to the target report form based on the obtained target report form; the identity is used for the user to obtain a target report corresponding to the identity.
9. A data report generation apparatus, comprising:
the system comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a parent report matched with a target report theme required by a user and obtained in advance and a transformation rule of data in the target report theme according to the target report theme of the target report;
the second determination module is used for determining target display data of the target report based on basic data in the parent report and the transformation rule;
and the generating module is used for generating the target report based on the target report theme and the target display data.
10. A computer device, comprising: processor, memory and bus, said memory storing machine-readable instructions executable by said processor, said processor and said memory communicating over the bus when a computer device is running, said machine-readable instructions when executed by said processor performing the steps of the method of generating a data report according to any of claims 1 to 8.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for generating a data report according to any one of claims 1 to 8.
CN202011351403.2A 2020-11-26 2020-11-26 Data report generation method and device, computer equipment and readable storage medium Pending CN112347748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011351403.2A CN112347748A (en) 2020-11-26 2020-11-26 Data report generation method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011351403.2A CN112347748A (en) 2020-11-26 2020-11-26 Data report generation method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112347748A true CN112347748A (en) 2021-02-09

Family

ID=74365770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011351403.2A Pending CN112347748A (en) 2020-11-26 2020-11-26 Data report generation method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112347748A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420194A (en) * 2021-05-07 2021-09-21 上海汇付数据服务有限公司 Method and system for displaying data
CN114817267A (en) * 2022-05-16 2022-07-29 通联支付网络服务股份有限公司 Method, apparatus and medium for generating data report
CN114970480A (en) * 2021-12-23 2022-08-30 广东轻工职业技术学院 Method for generating report and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344178A (en) * 2018-09-18 2019-02-15 杭州安恒信息技术股份有限公司 A kind of data sheet real-time statistical method, device, equipment and readable storage medium storing program for executing
CN109657214A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Report form generation method, device, terminal and storage medium
CN110597896A (en) * 2019-09-10 2019-12-20 深圳证券交易所 Data display method, data display device and terminal equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344178A (en) * 2018-09-18 2019-02-15 杭州安恒信息技术股份有限公司 A kind of data sheet real-time statistical method, device, equipment and readable storage medium storing program for executing
CN109657214A (en) * 2018-09-27 2019-04-19 深圳壹账通智能科技有限公司 Report form generation method, device, terminal and storage medium
CN110597896A (en) * 2019-09-10 2019-12-20 深圳证券交易所 Data display method, data display device and terminal equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420194A (en) * 2021-05-07 2021-09-21 上海汇付数据服务有限公司 Method and system for displaying data
CN114970480A (en) * 2021-12-23 2022-08-30 广东轻工职业技术学院 Method for generating report and electronic equipment
CN114817267A (en) * 2022-05-16 2022-07-29 通联支付网络服务股份有限公司 Method, apparatus and medium for generating data report

Similar Documents

Publication Publication Date Title
CN112347748A (en) Data report generation method and device, computer equipment and readable storage medium
CN110286974B (en) Application configuration method, device, equipment and storage medium based on H5 page
CN112613917A (en) Information pushing method, device and equipment based on user portrait and storage medium
CN111078776A (en) Data table standardization method, device, equipment and storage medium
CN110795697A (en) Logic expression obtaining method and device, storage medium and electronic device
US20200034481A1 (en) Language agnostic data insight handling for user application data
CN112882699A (en) Business processing method, device, equipment and medium based on process configuration engine
CN112463154A (en) Page generation method, device and system and electronic equipment
CN113268500A (en) Service processing method and device and electronic equipment
CN114610372A (en) Processing method and device for review file, storage medium, processor and terminal
CN114328632A (en) User data analysis method and device based on bitmap and computer equipment
CN117236624A (en) Issue repairer recommendation method and apparatus based on dynamic graph
CN109949090B (en) Client recommendation method and device, electronic equipment and medium
US20220284371A1 (en) Method, device and medium for a business function page
CN109120783A (en) Information acquisition method and device, mobile terminal and computer readable storage medium
CN115080616A (en) Dictionary data acquisition method and device, storage medium and electronic equipment
CN114741392A (en) Data query method and device, electronic equipment and storage medium
CN114298699A (en) Non-homogeneous token generation method, non-homogeneous token acquisition method and non-homogeneous token acquisition device
CN108984318B (en) Message delivery method and device based on driving model and readable storage medium
CN114116877B (en) Data conversion method, device, computer equipment and medium
CN114817793B (en) Page generation method, device, equipment and storage medium
CN115238660B (en) Form dynamic generation method, device, equipment and storage medium
CN111126015B (en) Report form compiling method and equipment
CN112307019B (en) Data processing method, device and non-transitory computer readable storage medium
CN116339733B (en) Application page generation method, system, electronic device and 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