CN107451109B - Report generation method and system - Google Patents

Report generation method and system Download PDF

Info

Publication number
CN107451109B
CN107451109B CN201710544972.0A CN201710544972A CN107451109B CN 107451109 B CN107451109 B CN 107451109B CN 201710544972 A CN201710544972 A CN 201710544972A CN 107451109 B CN107451109 B CN 107451109B
Authority
CN
China
Prior art keywords
real
time data
report
storing
time
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.)
Active
Application number
CN201710544972.0A
Other languages
Chinese (zh)
Other versions
CN107451109A (en
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710544972.0A priority Critical patent/CN107451109B/en
Publication of CN107451109A publication Critical patent/CN107451109A/en
Application granted granted Critical
Publication of CN107451109B publication Critical patent/CN107451109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • 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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a report generation method, which includes: acquiring target report elements, wherein the target report elements are generated by self-defining report elements for displaying real-time data in a report generation template, and the report generation template can self-define report development; acquiring real-time data to be displayed based on the target report elements; and injecting the acquired real-time data to be displayed into a target report element to generate a target report for displaying the real-time data to be displayed. The present disclosure also provides a report generating system, a computer readable medium and a computer system.

Description

Report generation method and system
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a report generation method and system, a computer-readable medium, and a computer system.
Background
At present, with the continuous deep development of big data technology, daily business operation of each large-scale internet enterprise increasingly depends on big data, especially real-time data. Due to timeliness, the business value of real-time data generation is far greater than that of offline data.
Business personnel use the support that data can not be separated from reports, offline data reports can be configured and developed in a user-defined mode through a BI tool, and real-time data reports can only be developed in a personalized and customized mode at present.
In the process of implementing the inventive concept, the inventor finds that at least the following problems exist in the prior art: the development period of the personalized real-time data report is long, the manpower consumption is high, and particularly for enterprises with fast business development, the requirement of business personnel on fast response of the real-time data report cannot be met.
Disclosure of Invention
In view of the above, the present disclosure provides a report generation method and system capable of defining and developing a real-time data report to meet the requirement of business personnel on quick response of the real-time data report.
One aspect of the present disclosure provides a report generation method, including: acquiring target report elements, wherein the target report elements are generated by self-defining report elements for displaying real-time data in a report generation template, and the report generation template can self-define report development; acquiring real-time data to be displayed based on the target report elements; and injecting the acquired real-time data to be displayed into the target report element to generate a target report for displaying the real-time data to be displayed.
According to an embodiment of the present disclosure, based on the target report element, acquiring real-time data to be displayed includes: determining a self-defined model of the target report element; querying a cache for caching the real-time data or a database for storing the real-time data based on the determined custom model to return a query result; and taking the real-time data contained in the returned query result as the real-time data to be displayed.
According to an embodiment of the present disclosure, the manner of querying the cache for caching the real-time data or the database for storing the real-time data includes at least one of: the content which is obtained by converting a preset SQL query script and can be executed by a target query engine is queried, wherein the target query engine is used for querying the real-time data in the cache and the database; and inquiring through a preset JAVA inquiry script.
According to an embodiment of the present disclosure, the method further includes: receiving a message in real time; analyzing the received message to obtain corresponding real-time data; generating a fact table based on the corresponding real-time data; and storing the fact table into a database for storing real-time data.
According to an embodiment of the present disclosure, storing the fact table into a database for storing real-time data includes: determining a self-defined model of the target report element; determining a corresponding broad table generation rule based on the self-defined model; acquiring a dimension table associated with the fact table based on the wide table generation rule, wherein the fact table is a real-time single table; generating a corresponding real-time wide table based on the real-time single table and the dimension table; and storing the real-time broad table into the database for storing real-time data.
According to an embodiment of the present disclosure, the database for storing real-time data includes: a distributed database.
Another aspect of the present disclosure provides a report generation system, including: the system comprises a first acquisition module, a first display module and a second acquisition module, wherein the first acquisition module is used for acquiring target report elements, the target report elements are generated by self-defining report elements for displaying real-time data in a report generation template, and the report generation template can self-define a developed report; the second acquisition module is used for acquiring real-time data to be displayed based on the target report element; and the first generation module is used for injecting the acquired real-time data to be displayed into the target report element so as to generate a target report for displaying the real-time data to be displayed.
According to an embodiment of the present disclosure, the second obtaining module includes: the first determining unit is used for determining the custom model of the target report element; the query unit is used for querying a cache for caching the real-time data or a database for storing the real-time data based on the determined custom model so as to return a query result; and the second determining unit is used for taking the real-time data contained in the returned query result as the real-time data to be displayed.
According to an embodiment of the present disclosure, the query unit includes at least one of: the first query subunit is used for querying the content which is obtained by converting a preset SQL query script and can be executed by a target query engine, wherein the target query engine is used for querying the real-time data in the cache and the database; and the second query subunit is used for querying through a preset JAVA query script.
According to an embodiment of the present disclosure, the above system further includes: the receiving module is used for receiving the message in real time; the analysis module is used for analyzing the received message to obtain corresponding real-time data; the second generation module is used for generating a fact table based on the corresponding real-time data; and the storage module is used for storing the fact table into a database for storing real-time data.
According to an embodiment of the present disclosure, the storage module includes: the third determining unit is used for determining the custom model of the target report element; a fourth determining unit, configured to determine a corresponding broad table generation rule based on the custom model; an obtaining unit, configured to obtain a dimension table associated with the fact table based on the wide table generation rule, where the fact table is a real-time single table; the generating unit is used for generating a corresponding real-time wide table based on the real-time single table and the dimension table; and the storage unit is used for storing the real-time wide table into the database for storing the real-time data.
According to an embodiment of the present disclosure, the database for storing real-time data includes: a distributed database.
Another aspect of the present disclosure provides a computer-readable medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement any one of the above report generating methods.
Another aspect of the present disclosure provides a computer system comprising: one or more processors; and one or more storage devices for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the report generation methods.
According to the embodiment of the disclosure, because the technical means of self-defining the report generation template for developing the real-time data report is adopted, the technical problems that the development period is long, the manpower consumption is high, and particularly for enterprises with fast business development, the requirement of business personnel for fast response of the real-time data report cannot be met due to the fact that the personalized real-time data report needs to be customized independently each time in the related technology are at least partially overcome, so that the technical effects that the development period is short, the manpower consumption is low, and the requirement of the business personnel for fast response of the real-time data report can be met are achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the report generation methods and systems of the present disclosure may be applied;
FIG. 2 schematically illustrates an application scenario of the report generation method and system according to the embodiment of the present disclosure;
FIG. 3A schematically illustrates a flow chart of a report generation method according to an embodiment of the present disclosure;
FIG. 3B schematically illustrates a diagram of a report generation template according to an embodiment of the present disclosure;
FIG. 4A schematically illustrates a flow chart of a method of acquiring real-time data according to an embodiment of the present disclosure;
FIG. 4B schematically illustrates a schematic diagram of a manner of acquiring real-time data according to an embodiment of the present disclosure;
FIG. 4C schematically illustrates a flow chart of a method of storing real-time data according to an embodiment of the present disclosure;
FIG. 4D schematically illustrates a flow chart of a method of storing real-time data according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a report generation system according to an embodiment of the present disclosure;
FIG. 6A schematically illustrates a block diagram of a second acquisition module according to an embodiment of the disclosure;
FIG. 6B schematically shows a block diagram of a query unit according to an embodiment of the disclosure;
FIG. 6C schematically illustrates a schematic diagram of a report generation system according to another embodiment of the present disclosure;
FIG. 6D schematically illustrates a block diagram of a memory module according to an embodiment of the disclosure; and
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing report generation methods and systems according to embodiments of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The words "a", "an" and "the" and the like as used herein are also intended to include the meanings of "a plurality" and "the" unless the context clearly dictates otherwise. Furthermore, the terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
The embodiment of the disclosure provides a report generation method for rapidly generating a real-time data report aiming at real-time data and a report generation system capable of applying the method. The method comprises a report element definition stage and a real-time data injection stage. In the report element definition stage, the report elements required by the target report are customized based on the report generation template capable of customizing the developed report, for example, the target report elements (also called wide-form model) used for displaying real-time data are customized. And in the real-time data injection stage, according to the characteristics of the target report form elements, acquiring the real-time data matched with the target report form elements. And after the real-time data acquisition is finished, performing real-time data injection, and injecting the acquired real-time data serving as data to be displayed into the target report element to generate a target report for displaying the real-time data so as to meet the requirement of business personnel on the real-time data report.
FIG. 1 schematically illustrates an exemplary system architecture to which the report generation methods and systems of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having display screens and supporting report making, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., data obtained according to the user request, etc.) to the terminal device.
It should be noted that the report generation method provided by the embodiment of the present disclosure may be generally executed by the terminal devices 101, 102, and 103. Accordingly, the report generation system provided by the embodiment of the present disclosure may be generally disposed in the terminal devices 101, 102, and 103. The report generation method provided by the embodiment of the present disclosure may also be executed by a terminal device different from the terminal devices 101, 102, and 103 and capable of communicating with the terminal devices 101, 102, and 103 and/or the server 105. Accordingly, the report generation system provided by the embodiment of the present disclosure may also be disposed in a terminal device different from the terminal devices 101, 102, and 103 and capable of communicating with the terminal devices 101, 102, and 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates an application scenario of the report generation method and system according to the embodiment of the present disclosure.
In the whole data processing and analyzing field, graph drawing (i.e. report generation) and display are widely used, and forms of generating reports and displaying are increasingly diversified, for example, various forms of graphs such as bar charts, line charts, and graph charts. The report generation method and the report generation system can be used in an application scene for drawing reports in various forms aiming at real-time data. As shown in fig. 2, may be used to plot a line graph of the real-time data. For example, A, B, C, D corresponds to real-time data of 1200, 1400, 1600, 1800, respectively, and under the numerical axis configuration of the report shown in fig. 2, A, B, C, D can be displayed as 1K, 2K, respectively, due to rounding up in the digital display.
The invention provides a report generation method which can develop a real-time data report in a self-defined mode so as to meet the requirement of business personnel on quick response of the real-time data report.
FIG. 3A schematically shows a flowchart of a report generation method according to an embodiment of the present disclosure.
As shown in fig. 3A, the method includes operations S301 to S303, in which:
operation S301 is to obtain a target report element, where the target report element is generated by self-defining a report element for displaying real-time data in a report generation template, and the report generation template can self-define a development report.
In the disclosed embodiments, the report elements used to present real-time data may also be referred to as a wide-list model. Besides the wide-form model, other report form elements can be set in one report form generation template, and the report form elements can be specifically set according to actual requirements. For example, report dimensions, report indices, filter terms, chart types, data display settings, other settings, etc. may also be set, as shown in FIG. 3B. For each report element, the user can customize according to business requirements, for example, for the target report element, the user can customize the relevant fields.
It should be noted that, in the embodiment of the present disclosure, the report generation template configuration process is as follows: determining a wide-form model, a report dimension, a report index and a filtering condition selected by a report; determining the type of a chart (a pie chart, a bar chart, a line chart, a table and the like) selected by the report, data display settings (a date format, a percentage format and the like), and other settings (the size and the color of the chart, the refreshing time of the report and the like); and after the user-defined report element is confirmed, storing the report (setting the ID and the name of the report), and releasing the report to an application market for the user to define the real-time data report.
Operation S302 is performed to obtain real-time data to be displayed based on the target report element.
The real-time data can be stored in the database in a real-time single table or a real-time wide table mode, and the real-time single table or the real-time wide table contains one or more fields for correspondingly storing the corresponding real-time data. Therefore, when the real-time data is acquired, the real-time single table or the real-time broad table in the database can be matched based on the self-defined field in the target report element, so that the purpose of acquiring the real-time data is achieved.
When the method is implemented, the real-time single table is directly stored as a wide table without being associated with other tables (join operation); the real-time wide table needs to be associated with other tables (such as an offline table or other real-time wide tables) (join operation), and data also needs to be calculated and processed according to rules.
In operation S303, the obtained real-time data to be displayed is injected into the target report element, so as to generate a target report for displaying the real-time data to be displayed.
According to the embodiment of the disclosure, because the technical means of self-defining the report generation template for developing the real-time data report is adopted, the technical problems that the development period is long, the manpower consumption is high, and particularly for enterprises with fast business development, the requirement of business personnel for fast response of the real-time data report cannot be met due to the fact that the personalized real-time data report needs to be customized independently each time in the related technology are at least partially overcome, so that the technical effects that the development period is short, the manpower consumption is low, and the requirement of the business personnel for fast response of the real-time data report can be met are achieved.
Moreover, according to the embodiment of the disclosure, the real-time data report can be realized in a customized manner, so that the access of a new data source can be quickly supported, the new requirements of the business can be met, and the actual effect requirements and the visualization requirements of the business party can be supported under the condition of not modifying any code.
The method shown in fig. 3A is further described with reference to fig. 4A-4D in conjunction with specific embodiments.
Fig. 4A schematically illustrates a flow chart of a method of acquiring real-time data according to an embodiment of the present disclosure. As shown in fig. 4A, based on the target report element, acquiring the real-time data to be displayed may include the following operations:
operation S401, determining a custom model of the target report element;
operation S402, querying a cache for caching the real-time data or a database for storing the real-time data based on the determined custom model to return a query result; and
in operation S403, the real-time data included in the returned query result is used as the real-time data to be displayed.
Wherein, determining the custom model of the target report element comprises: determine which fields are customized in the target report element, what each field is specific, and so on. Because the real-time data is stored in a real-time single table or a real-time wide table, and corresponding fields are defined in the two tables, after the user-defined model of the target report element is determined, the corresponding real-time single table or the corresponding real-time wide table can be matched in a database or a cache, so that the data in the real-time single table or the corresponding real-time wide table can be read to serve as the finally acquired real-time data.
It should be noted that, in order to improve the query efficiency of real-time data, if data in a real-time single table or a real-time wide table is operated, the data may be cached in the cache. When data is queried, the cache can be queried first, if the data to be queried exists in the cache, the data can be read from the cache, and if the data does not exist, the data needs to be read from the database.
Through the embodiment of the disclosure, the corresponding real-time data can be acquired based on the target report form element defined by the user, so that the method is more targeted and can acquire the corresponding real-time data more accurately.
Fig. 4B schematically illustrates a schematic diagram of a manner of acquiring real-time data according to an embodiment of the present disclosure. As shown in fig. 4B, the manner of querying the cache for caching the real-time data or the database for storing the real-time data may include at least one of: querying content which is obtained by converting a preset Structured Query Language (SQL) Query script and can be executed by a target Query engine, wherein the target Query engine is used for querying real-time data in a cache and a database; and inquiring through a preset JAVA inquiry script.
Since the database storing the real-time data does not support the SQL query script, the SQL query script needs to be converted. The reason why the database storing the real-time data does not support the SQL query script is as follows: the SQL structured query language mainly aims at querying a relational database (e.g., common mysql, SQL server, oracle), but the relational database is not well expanded, and there is a bottleneck in the amount of stored data, but the distributed database is easily expanded, so that real-time data with large data volume is generally stored by selecting a non-relational distributed database (e.g., Hbase, ES, etc.). Therefore, the SQL query script cannot be directly queried on the real-time data storage, and needs to be converted into a script supported by storage for the storage query engine to execute, so as to achieve the purpose of querying the real-time data.
In addition, JAVA language may be used to write JAVA query script, such as an Open Pluggable Specification (OPS) interface, to achieve the purpose of querying real-time data. The SQL query script is used for WEB application.
Further, the SQL query script may be obtained by direct editing, or may be automatically generated by executing a drag operation on a control component such as a configuration dimension option, an index option, a screening condition, and the like.
The conversion of the SQL query script may be implemented by SQL for ES, which can convert SQL statements into contents that a search server (ES) query engine can execute, and automatically generate ES mapping to query real-time data. Further, ES is a Lucene-based search server.
When real-time data is queried, SQL query scripts can be used to convert the SQL query scripts into ES executable content, and the ES executes the ES executable content and returns a query result; alternatively, the query result may be returned by a program calling the OPS interface.
By the embodiment of the disclosure, the static data query script (namely, the SQL query script) can be converted into the corresponding dynamic data query content, or the dynamic data query interface (namely, the JAVA query script) is directly set, so that the report generation template capable of developing the report by self definition can obtain the real-time data.
Fig. 4C schematically shows a flow chart of a method of storing real-time data according to an embodiment of the present disclosure. As shown in fig. 4C, the report generation method may further include the following operations:
operation S404, receiving a message in real time;
operation S405, parsing the received message to obtain corresponding real-time data;
operation S406, generating a fact table based on the corresponding real-time data; and
in operation S407, the fact table is stored in a database for storing real-time data.
In embodiments of the present disclosure, the data source of the message may include, but is not limited to: mysql, SQL Server, Oracle, log files, etc. Messages from these data sources all go into the messaging system (e.g., kafka, a high throughput distributed publish-subscribe messaging system). Further, the data of the message entering the message system is analyzed, and the corresponding real-time data can be obtained. Data in Mysql, SQL Server and Oracle are structured data, and data in log files are unstructured data.
Specifically, during message parsing, a streaming processing architecture may be adopted to perform streaming computation, and finally, parsed real-time data is obtained. If the real-time data does not need to be associated with data in other data tables in the service requirement (join operation), a fact table (real-time single table) is generated directly based on the field when the real-time data is analyzed and the real-time data obtained through analysis, and the fact table is stored in the database.
It should be noted that, the operations S404 to S407 may be performed in real time throughout the entire report generation process.
Through the embodiment of the disclosure, the message can be received and analyzed in real time, and the corresponding analysis data, namely the real-time data, can be stored, so that the method has more effectiveness.
Fig. 4D schematically shows a flow chart of a method of storing real-time data according to another embodiment of the present disclosure. As shown in FIG. 4D, storing fact tables in a database for storing real-time data may include the following operations:
operation S408, determining a custom model of the target report element;
operation S409, determining a corresponding broad table generation rule based on the custom model;
operation S410, obtaining a dimension table associated with a fact table based on a wide table generation rule, wherein the fact table is a real-time single table;
operation S411, generating a corresponding real-time wide table based on the real-time single table and the dimension table; and
in operation S412, the real-time wide table is stored in a database for storing real-time data.
The self-defining model of the target report element is also called a wide table model, and the wide table can self-define the field of the target report element, and the wide table is generated by setting the corresponding field in the data table, so that when the service requirement indicates that the current real-time data needs to be associated with other data, such as data in other dimension tables, the wide table generation rule can be determined based on the self-defining model, and then the dimension table associated with the fact table is obtained by the wide table generation rule, so that the real-time wide table is generated based on the fact table and the dimension table and stored in the database.
It should be noted that, here, the system of the database may adopt a plug-in type architecture mode, so that it can flexibly support the storage of multiple wide table data (i.e. data in a real-time wide table).
Specifically, the calculation flow of the real-time broad table is as follows: analyzing the received message, and simultaneously performing stream type calculation to form a data table in a wide table mode; association (join operation) with other tables (offline tables (also called dimension tables) or other real-time wide tables) is required, and data also needs to be calculated and processed according to rules; defining a wide table data model (related relevant fields) and a wide table processing rule (data processing rule and algorithm) according to actual service requirements, controlling the calculation of flow type data through a wide table scheduling task, and storing a final result after calculation in a real-time wide table model to obtain a real-time wide table.
Through the embodiment of the disclosure, the relevant information in the corresponding dimension table can be associated with the real-time data so as to meet different business requirements. Moreover, the design of the real-time wide table provides a prerequisite for report customization, and the technology of inquiring data and calculating from the real-time wide table is also the key for determining the realization of report customization.
According to an embodiment of the present disclosure, a database for storing real-time data includes: a distributed database.
It should be noted that, in the embodiment of the present disclosure, the real-time wide table may be calculated by a real-time wide table calculation engine and stored in a distributed database, such as the ES database and the Hbase database. In addition, the real-time data calculation part can adopt a Storm architecture, so that Storm nodes can be added horizontally, and the calculation capacity of the system is improved; the data query service part can horizontally add application nodes, and improves the concurrent query capability of the system.
Through the embodiment of the disclosure, the distributed database can respond to read-write operation more quickly, so that the requirement of real-time data on effectiveness can be met more effectively.
The invention also provides a report generation system, which is used for realizing the report generation method and can develop the real-time data report in a self-defined manner so as to meet the requirement of business personnel on quick response of the real-time data report.
FIG. 5 schematically shows a block diagram of a report generation system according to an embodiment of the present disclosure. As shown in fig. 5, the report generation system 500 includes: a first acquisition module 510, a second acquisition module 520, and a first generation module 530. The first obtaining module 510 is configured to obtain a target report element, where the target report element is generated by customizing a report element for displaying real-time data in a report generation template, and the report generation template is capable of developing a report by self-defining; the second obtaining module 520 is configured to obtain real-time data to be displayed based on the target report element; and the first generating module 530 is configured to inject the acquired real-time data to be displayed into a target report element, so as to generate a target report for displaying the real-time data to be displayed.
According to the embodiment of the disclosure, because the technical means of self-defining the report generation template for developing the real-time data report is adopted, the technical problems that the development period is long, the manpower consumption is high, and particularly for enterprises with fast business development, the requirement of business personnel for fast response of the real-time data report cannot be met due to the fact that the personalized real-time data report needs to be customized independently each time in the related technology are at least partially overcome, so that the technical effects that the development period is short, the manpower consumption is low, and the requirement of the business personnel for fast response of the real-time data report can be met are achieved.
Moreover, according to the embodiment of the disclosure, the real-time data report can be realized in a customized manner, so that the access of a new data source can be quickly supported, the new requirements of the business can be met, and the actual effect requirements and the visualization requirements of the business party can be supported under the condition of not modifying any code.
Fig. 6A schematically illustrates a block diagram of a second obtaining module according to an embodiment of the disclosure, and as shown in fig. 6A, the second obtaining module 520 includes: the first determination unit 521 is used for determining a custom model of the target report element; a query unit 522, configured to query, based on the determined custom model, a cache for caching real-time data or a database for storing the real-time data, so as to return a query result; and a second determining unit 523, configured to use the real-time data included in the returned query result as the real-time data to be displayed.
Through the embodiment of the disclosure, the corresponding real-time data can be acquired based on the target report form element defined by the user, so that the method is more targeted and can acquire the corresponding real-time data more accurately.
Fig. 6B schematically illustrates a block diagram of a query unit according to an embodiment of the disclosure, and as shown in fig. 6B, the query unit 522 includes at least one of: a first query subunit 5221, configured to query, through converting a preset SQL query script, content that is available for a target query engine to execute, where the target query engine is configured to query real-time data in a cache and a database; and a second query subunit 5222 for querying by a preset JAVA query script.
By the embodiment of the disclosure, the static data query script (namely, the SQL query script) can be converted into the corresponding dynamic data query content, or the dynamic data query interface (namely, the JAVA query script) is directly set, so that the report generation template capable of developing the report by self definition can obtain the real-time data.
Fig. 6C schematically illustrates a schematic diagram of a report generating system according to another embodiment of the present disclosure, and as shown in fig. 6C, the report generating system 500 further includes: a receiving module 540, configured to receive a message in real time; the parsing module 550 is configured to parse the received message to obtain corresponding real-time data; a second generating module 560 for generating a fact table based on the corresponding real-time data; and a storage module 570 for storing the fact table in a database for storing real-time data.
Through the embodiment of the disclosure, the message can be received and analyzed in real time, and the corresponding analysis data, namely the real-time data, can be stored, so that the method has more effectiveness.
Fig. 6D schematically shows a block diagram of a memory module according to an embodiment of the present disclosure, and as shown in fig. 6D, the memory module 570 includes: a third determining unit 571, configured to determine a custom model of the target report element; a fourth determining unit 572, configured to determine a corresponding broad table generation rule based on the custom model; the obtaining unit 573 is used for obtaining the dimension table associated with the fact table based on the broad table generation rule, wherein the fact table is a real-time single table; a generating unit 574, configured to generate a corresponding real-time wide table based on the real-time single table and the dimension table; and a storage unit 575 for storing the real-time bandwidth table in a database for storing real-time data.
Through the embodiment of the disclosure, the relevant information in the corresponding dimension table can be associated with the real-time data so as to meet different business requirements. Moreover, the design of the real-time wide table provides a prerequisite for report customization, and the technology of inquiring data and calculating from the real-time wide table is also the key for determining the realization of report customization.
According to an embodiment of the present disclosure, wherein the database for storing real-time data comprises: a distributed database.
Through the embodiment of the disclosure, the distributed database can respond to read-write operation more quickly, so that the requirement of real-time data on effectiveness can be met more effectively.
It should be noted that, in the embodiment of the present disclosure, a system portion (i.e., an apparatus portion) corresponds to a method portion in the embodiment of the present disclosure, and a detailed description of the method portion may be referred to for a related description of the system portion, which is not repeated herein.
The present disclosure also provides a computer system comprising: one or more processors; and one or more storage devices for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the report generation method according to any of the embodiments.
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing report generation methods and systems according to embodiments of the present disclosure. The computer system illustrated in FIG. 7 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 7, a computer system 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 710 may also include on-board memory for caching purposes. Processor 710 may include a single processing unit or multiple processing units for performing the different actions of the method flows described with reference to fig. 3A, 4A-4D in accordance with embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the computer system 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations described above with reference to fig. 3A, 4A to 4D by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform the various operations described above with reference to fig. 3A, 4A-4D by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the computer system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to an embodiment of the present disclosure, the method described above with reference to the flow chart may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing. According to embodiments of the present disclosure, a computer-readable medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As another aspect, the present disclosure also provides a computer-readable medium having stored thereon executable instructions, which when executed by a processor, cause the processor to implement the report generation method described in any one of the above embodiments. The computer readable medium may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform: acquiring target report elements, wherein the target report elements are generated by self-defining report elements for displaying real-time data in a report generation template, and the report generation template can self-define report development; acquiring real-time data to be displayed based on the target report elements; and injecting the acquired real-time data to be displayed into a target report element to generate a target report for displaying the real-time data to be displayed.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A report generation method comprises the following steps:
acquiring a target report element, wherein the target report element is generated by self-defining the report element for displaying real-time data in a report generation template, and the report generation template can self-define a developed report;
acquiring real-time data to be displayed based on the target report element; and
injecting the acquired real-time data to be displayed into the target report element to generate a target report for displaying the real-time data to be displayed;
wherein, based on the target report element, acquiring real-time data to be displayed comprises:
determining a custom model of the target report element;
querying a cache for caching the real-time data or a database for storing the real-time data based on the determined custom model to return a query result; and
taking real-time data contained in the returned query result as the real-time data to be displayed;
the method for querying the cache for caching the real-time data or the database for storing the real-time data comprises at least one of the following steps:
the method comprises the steps that contents which are obtained by converting a preset SQL query script and can be executed by a target query engine are queried, wherein the target query engine is used for querying real-time data in a cache and a database; and
and querying through a preset JAVA query script.
2. The method of claim 1, wherein the method further comprises:
receiving a message in real time;
analyzing the received message to obtain corresponding real-time data;
generating a fact table based on the corresponding real-time data; and
and storing the fact table into a database for storing real-time data.
3. The method of claim 2, wherein storing the fact table in a database for storing real-time data comprises:
determining a custom model of the target report element;
determining a corresponding broad table generation rule based on the custom model;
obtaining a dimension table associated with the fact table based on the wide table generation rule, wherein the fact table is a real-time single table;
generating a corresponding real-time wide table based on the real-time single table and the dimension table; and
and storing the real-time broad table into the database for storing real-time data.
4. A method according to claim 2 or 3, wherein the database for storing real-time data comprises: a distributed database.
5. A report generation system comprising:
the system comprises a first acquisition module, a first display module and a second acquisition module, wherein the first acquisition module is used for acquiring target report elements, the target report elements are generated by self-defining report elements for displaying real-time data in a report generation template, and the report generation template can self-define a developed report;
the second acquisition module is used for acquiring real-time data to be displayed based on the target report element; and
the first generation module is used for injecting the acquired real-time data to be displayed into the target report element so as to generate a target report for displaying the real-time data to be displayed;
wherein the second obtaining module comprises:
the first determination unit is used for determining a custom model of the target report element;
the query unit is used for querying a cache for caching the real-time data or a database for storing the real-time data based on the determined custom model so as to return a query result; and
the second determining unit is used for taking the real-time data contained in the returned query result as the real-time data to be displayed;
wherein the query unit comprises at least one of:
the first query subunit is used for querying the content which is obtained by converting a preset SQL query script and can be executed by a target query engine, wherein the target query engine is used for querying the real-time data in the cache and the database; and
and the second query subunit is used for querying through a preset JAVA query script.
6. The system of claim 5, wherein the system further comprises:
the receiving module is used for receiving the message in real time;
the analysis module is used for analyzing the received message to obtain corresponding real-time data;
a second generation module for generating a fact table based on the corresponding real-time data; and
and the storage module is used for storing the fact table into a database for storing real-time data.
7. The system of claim 6, wherein the storage module comprises:
the third determining unit is used for determining the self-defined model of the target report element;
a fourth determining unit, configured to determine a corresponding broad table generation rule based on the custom model;
the obtaining unit is used for obtaining a dimension table associated with the fact table based on the wide table generating rule, wherein the fact table is a real-time single table;
the generating unit is used for generating a corresponding real-time wide table based on the real-time single table and the dimension table; and
and the storage unit is used for storing the real-time broad table into the database for storing the real-time data.
8. The system of claim 6 or 7, wherein the database for storing real-time data comprises: a distributed database.
9. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the report generating method according to any of claims 1 to 4.
10. A computer system, comprising:
one or more processors; and
one or more storage devices for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the report generation method of any of claims 1-4.
CN201710544972.0A 2017-07-05 2017-07-05 Report generation method and system Active CN107451109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710544972.0A CN107451109B (en) 2017-07-05 2017-07-05 Report generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710544972.0A CN107451109B (en) 2017-07-05 2017-07-05 Report generation method and system

Publications (2)

Publication Number Publication Date
CN107451109A CN107451109A (en) 2017-12-08
CN107451109B true CN107451109B (en) 2022-01-04

Family

ID=60487733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710544972.0A Active CN107451109B (en) 2017-07-05 2017-07-05 Report generation method and system

Country Status (1)

Country Link
CN (1) CN107451109B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019559A (en) * 2017-12-27 2019-07-16 航天信息股份有限公司 A kind of data query method and system
CN108427716A (en) * 2018-02-05 2018-08-21 深圳市资本在线金融信息服务有限公司 The implementation method and device of intelligent report forms
CN108595394A (en) * 2018-03-21 2018-09-28 上海蔚界信息科技有限公司 A kind of rapid build scheme of text analyzing report
CN108681674B (en) * 2018-04-23 2022-02-01 平安科技(深圳)有限公司 Report module creating method and device, computer device and storage medium
CN109189786B (en) * 2018-08-14 2020-10-13 武汉虹信通信技术有限责任公司 Method for periodically generating custom report form for network element management system
CN109189835B (en) * 2018-08-21 2021-09-03 北京京东尚科信息技术有限公司 Method and device for generating data wide table in real time
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
CN109740134A (en) * 2018-12-17 2019-05-10 泰康保险集团股份有限公司 Report generation method and device
CN110083624B (en) * 2019-03-18 2021-11-12 北京奇艺世纪科技有限公司 Stream data processing method, stream data processing apparatus, and computer medium
CN112100991A (en) * 2019-05-30 2020-12-18 北京奇虎科技有限公司 Data report generation method and device
CN110377633A (en) * 2019-06-21 2019-10-25 深圳壹账通智能科技有限公司 Method for processing report data, device, computer equipment and storage medium
CN110633459B (en) * 2019-07-23 2023-10-10 石化盈科信息技术有限责任公司 Automatic generation method and system of data report forms and computer readable storage medium
CN111026759B (en) * 2019-12-11 2024-03-12 中盈优创资讯科技有限公司 Report generation method and device based on Hbase
CN113127547A (en) * 2019-12-31 2021-07-16 新奥数能科技有限公司 Data processing method and device, intelligent terminal and storage medium
CN111292186B (en) * 2020-01-17 2023-08-29 中国建设银行股份有限公司 Data analysis method and data analysis device
CN111553133B (en) * 2020-04-21 2023-04-07 招商局金融科技有限公司 Report generation method and device, electronic equipment and storage medium
CN111639138B (en) * 2020-06-03 2023-04-25 中国联合网络通信集团有限公司 Data processing method, device, equipment and storage medium
CN112069218A (en) * 2020-11-16 2020-12-11 浙江岩华文化科技有限公司 Big data real-time processing method and device, electronic device and storage medium
CN113190581A (en) * 2021-04-30 2021-07-30 宝宝巴士股份有限公司 Method and terminal for dynamically generating report form based on big data
CN113626477B (en) * 2021-07-19 2023-10-10 浙江中控信息产业股份有限公司 Configurable report system and method based on water plant Internet of Things system
CN114036917A (en) * 2021-11-25 2022-02-11 北京达佳互联信息技术有限公司 Report generation method and device, computer equipment and storage medium
CN115062028B (en) * 2022-07-27 2023-01-06 中建电子商务有限责任公司 Method for multi-table join query in OLTP field
CN116048985B (en) * 2023-01-10 2023-10-20 睿智合创(北京)科技有限公司 Decision data measurement and viewing result report method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197876A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method and system for multi-dimensional analysis of message service data
CN101777079A (en) * 2010-03-11 2010-07-14 浙江鸿程计算机系统有限公司 System structural frame for fast generating electronic report forms and realization method thereof
CN103020158A (en) * 2012-11-26 2013-04-03 中兴通讯股份有限公司 Report form creation method, device and system
CN105426465A (en) * 2015-11-13 2016-03-23 中国建设银行股份有限公司 Method and device for online exporting statements
CN106528067A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 Method and device for generating report form
CN106649242A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Method and system for generating report

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050060307A1 (en) * 2003-09-12 2005-03-17 International Business Machines Corporation System, method, and service for datatype caching, resolving, and escalating an SQL template with references

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197876A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method and system for multi-dimensional analysis of message service data
CN101777079A (en) * 2010-03-11 2010-07-14 浙江鸿程计算机系统有限公司 System structural frame for fast generating electronic report forms and realization method thereof
CN103020158A (en) * 2012-11-26 2013-04-03 中兴通讯股份有限公司 Report form creation method, device and system
CN106528067A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 Method and device for generating report form
CN105426465A (en) * 2015-11-13 2016-03-23 中国建设银行股份有限公司 Method and device for online exporting statements
CN106649242A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Method and system for generating report

Also Published As

Publication number Publication date
CN107451109A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN107451109B (en) Report generation method and system
US11243704B2 (en) Data pipeline architecture for analytics processing stack
AU2016273909B2 (en) Data pipeline architecture for cloud processing of structured and unstructured data
US9396448B2 (en) Distributed and open schema interactions management system and method
CN108363741B (en) Big data unified interface method, device, equipment and storage medium
US10102239B2 (en) Application event bridge
CN110689268B (en) Method and device for extracting indexes
CN112947919A (en) Method and device for constructing service model and processing service request
US9201938B2 (en) Parameter driven data format conversion in client/server architectures
CN113190517A (en) Data integration method and device, electronic equipment and computer readable medium
CN113672671A (en) Method and device for realizing data processing
CN113127335A (en) System testing method and device
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN115248735A (en) Log data output control method, device, equipment and storage medium
CN112000323B (en) Data processing method and device
CN113760240B (en) Method and device for generating data model
CN114625763A (en) Information analysis method and device for database, electronic equipment and readable medium
CN111291254A (en) Information processing method and device
CN112784195A (en) Page data publishing method and system
CN117194463A (en) Method and device for inquiring report data
CN113779374B (en) Page query management method and device
CN111723088B (en) Method and device for pushing summary layer table
CN117648086A (en) Script file conversion method and device
CN115599573A (en) Event processing method, device, equipment and storage medium
CN114331497A (en) Questionnaire information management method, system, electronic device 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
GR01 Patent grant
GR01 Patent grant