Report generation method and device, electronic equipment and storage medium

Through a report generation method, visual plug-ins and data processing rules are used to solve the flexibility, efficiency and real-time data of report generation in the prior art, and efficient and personalized report generation and data integration are achieved.

CN119829650APending Publication Date: 2025-04-15BEIJING BAILONG MAYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411748256.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing report generation system has problems such as fixed template limitations, heavy manual editing, difficulty in data integration and update, lack of visualization and user-friendliness, insufficient adaptability and scalability.

Method used

Provides a report generation method, by obtaining data sources and creating templates including visual plug-ins, querying data sources based on mapping relationships and variables, rendering visual plug-ins, generating initial reports, and selecting character formatting to generate final reports.

Benefits of technology

It realizes intelligent data integration and automated report generation, supports real-time integration and update of multi-source data, reduces the workload of manual operations, improves the efficiency and speed of report generation, and enhances the personalization and aesthetics of reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829650A_ABST
    Figure CN119829650A_ABST
Patent Text Reader

Abstract

The invention discloses a report generation method and device, electronic equipment and a storage medium. The method comprises the steps that a data source comprises indexes, a template comprises a visual plug-in, the display form of the visual plug-in is a chart, an image or a table, the visual plug-in comprises a data processing rule, and the data processing rule comprises variables and a mapping relation between the variables and the indexes; calling the data source and the template, querying the data source according to the mapping relation and the variable in any visual plug-in, and rendering according to the display form of the visual plug-in; after all the visual plug-ins are rendered, an initial report is generated; and selecting characters in the initial report, formatting the format of the selected characters, and generating a final report. By directly setting the visual plug-in in the form of the chart, the image or the table in the template, the operation is simple, direct preview can be realized, and the template meeting the customization requirement can be conveniently created.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more specifically, to a report generation method, device, electronic device and storage medium. Background Art

[0002] In the current technical environment, the common practice of report generation mainly relies on pre-defined fixed templates and manual editing, but this approach has many problems:

[0003] Fixed template limitations: Relying on pre-designed fixed templates, users are strictly restricted by the template structure and style when generating reports. This fixedness leads to insufficient report customization capabilities and the inability to flexibly respond to changing needs of different users and scenarios.

[0004] Large amount of manual editing work: Report generation usually requires a lot of manual editing, including text input, format adjustment, and data insertion, which is not only time-consuming and labor-intensive, but also prone to errors, especially when dealing with large amounts of data or complex report structures.

[0005] Difficulties in data integration and updating: Existing report generation systems face challenges in data integration, especially when it is necessary to extract information from multiple data sources or perform real-time data updates. These systems often lack flexible data processing and integration capabilities, leading to problems with the timeliness and accuracy of information during the report generation process.

[0006] Lack of visualization and user-friendliness: Existing report generation systems lack an intuitive visual interface. Users often need to have high technical skills or expertise when designing and editing reports, which makes it difficult for non-technical personnel to get started quickly and limits the widespread application of the report generation process.

[0007] Insufficient adaptability and scalability: With the development of business needs and technological advances, the adaptability and scalability of existing report generation systems face challenges. They are unable to effectively cope with emerging technologies and new data processing requirements, limiting the long-term sustainability and development space of the system.

[0008] In view of this, the present invention provides a report generation method, device, electronic device and storage medium. Summary of the invention

[0009] In view of this, the present invention provides a report generation method, device, electronic device and storage medium to meet users' diverse requirements for report content, format and presentation method, and solve problems such as heavy workload, difficulty in data integration and updating caused by large amounts of data.

[0010] In one aspect, the present invention provides a report generation method, comprising:

[0011] Acquire a data source, where the data source includes at least one indicator;

[0012] Creating a template, wherein the template includes a visualization plug-in, wherein the visualization plug-in is displayed in the form of a chart, an image, or a table, wherein the visualization plug-in includes a data processing rule, wherein the data processing rule includes at least one variable, and a mapping relationship between the variable and the indicator is configured;

[0013] Retrieving the data source and the template, in any of the visualization plug-ins, after querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; after all the visualization plug-ins are rendered, an initial report is generated;

[0014] Select characters in the initial report, format the selected characters, and generate a final report.

[0015] Optionally, in any of the visualization plug-ins, after querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in includes:

[0016] The indicator includes corresponding fields;

[0017] The variable is selected in any of the visualization plug-ins, the indicator corresponding to the selected variable is searched in the data source according to the mapping relationship, reference data corresponding to the queried indicator is obtained from the field corresponding to the queried indicator, and the selected variable is replaced by the reference data;

[0018] After traversing all the variables, rendering is performed according to the display format of the visualization plug-in.

[0019] Optionally, obtaining a data source includes:

[0020] Get the original data;

[0021] Preprocessing the original data to obtain preprocessed data;

[0022] The index is extracted from the preprocessed data, the index is associated with the corresponding field and stored, and the data source is generated.

[0023] Optionally, the formatting of the selected characters includes:

[0024] Format the digital type of the selected character, format the font of the selected character, format the font size of the selected character, format the font color of the selected character, format the background color of the selected character, or bold the selected character.

[0025] Optionally, after generating the final report, the method further includes: selecting an output format;

[0026] When the selected output format is a document format, the final report is output according to the selected output format;

[0027] When the selected output format is a table format, the data source is downloaded for output.

[0028] On the other hand, the present invention also provides a report generation device, comprising:

[0029] A data source management unit, used to store a data source, wherein the data source includes at least one indicator;

[0030] Component library units, including layout components, style components, and data binding components;

[0031] A template creation unit, connected to the component library unit, is used to create a blank interface, call the layout component to add a visualization plug-in to the blank interface, the visualization plug-in is displayed in the form of a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes a variable, call the data binding component to configure the mapping relationship between the variable and the indicator, and obtain the template after configuration;

[0032] A template library unit, connected to the template creation unit, and used to store the template;

[0033] A calling unit is connected to the data source management unit, the component library unit and the template library unit respectively, and is used to call the data source and the template, and in any of the visualization plug-ins, after querying the data source according to the mapping relationship and the variable, render it according to the display form of the visualization plug-in; after all the visualization plug-ins are rendered, an initial report is generated; and the style component is called to format the format of at least part of the characters in the initial report to generate a final report.

[0034] Optionally, the calling unit, the data source management unit, the component library unit and the template library unit are all provided with an application programming interface;

[0035] The calling unit is respectively connected with the data source management unit, the component library unit and the template library unit through the application programming interface.

[0036] Optionally, it also includes:

[0037] The output and notification unit is connected to the calling unit and the client, respectively, and is used to output the final report to a preset location according to the selected output format and send a notification to the client when the selected output format is a document format, or to download the data source and output it to the preset location and send a notification to the client when the selected output format is a table format.

[0038] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the report generation method as described in any one of the above items.

[0039] In yet another aspect, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the report generation methods described above.

[0040] Compared with the prior art, the report generation method, device, electronic device and storage medium provided by the present invention achieve at least the following beneficial effects:

[0041] The report generation method, device, electronic device and storage medium provided by the present invention include: creating a template, the template includes a visualization plug-in, the display form of the visualization plug-in is a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes at least one variable, and the mapping relationship between the configuration variable and the indicator; calling the data source and the template, in any visualization plug-in, after querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; generating an initial report after all visualization plug-ins are rendered; selecting characters in the initial report, formatting the format of the selected characters, and generating a final report. The visualization plug-in is directly dragged and dropped into the template through an intuitive and easy-to-use visualization design tool, and the operation is simple, so that non-technical personnel can also easily create and edit templates, and it is convenient to create templates that meet customized needs. After querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; generating an initial report after all visualization plug-ins are rendered, realizing intelligent data integration and automatic report generation, supporting real-time integration and updating of multi-source data, ensuring that the data in the report is always up-to-date and accurate, providing reliable data support for decision-making, reducing the workload of manual operations, improving the efficiency and speed of report generation, and reducing the risk of human error. By selecting characters in the initial report, formatting the selected characters, and generating the final report, you can also adjust the style of the report after the automated report is generated, thereby better meeting the personalized needs of different business scenarios.

[0042] Of course, any product implementing the present invention does not necessarily need to achieve all of the technical effects described above at the same time.

[0043] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0045] Figure 1 It is a flow chart of the report generation method provided by the present invention.

[0046] Figure 2 It is an interface diagram of the final report.

[0047] Figure 3 It is another flow chart of the report generation method provided by the present invention.

[0048] Figure 4 It is a structural diagram of the report generation device provided by the present invention.

[0049] Figure 5 This is another structural diagram of the report generation device provided by the present invention.

[0050] Figure 6 This is an architecture diagram of the report generation device provided by the present invention.

[0051] Figure 7 This is another architecture diagram of the report generation device provided by the present invention.

[0052] In the figure: 1. Data source management unit; 2. Component library unit; 3. Template creation unit; 4. Template library unit; 5. Calling unit; 6. Output and notification unit. DETAILED DESCRIPTION

[0053] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0054] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0055] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0056] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0057] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0058] Example 1

[0059] Reference Figure 1 and Figure 2 , Figure 1 is a flow chart of the report generation method provided by the present invention, Figure 2 This is an interface diagram of a final report, which illustrates a specific embodiment of the report generation method provided by the present invention, including:

[0060] S101: Acquire a data source, where the data source includes at least one indicator;

[0061] S102: creating a template, the template including a visualization plug-in, the visualization plug-in is displayed in the form of a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes at least one variable, and a mapping relationship between the configuration variable and the indicator;

[0062] S103: Retrieve the data source and template, and in any visualization plug-in, query the data source according to the mapping relationship and variables, and render according to the display form of the visualization plug-in; after all visualization plug-ins are rendered, generate an initial report;

[0063] S104: Select characters in the initial report, format the selected characters, and generate a final report.

[0064] It should be noted that in step S102, the template includes a visualization plug-in, and the display form of the visualization plug-in is a chart, an image, or a table, etc., of course, it is not limited to this, so the display form of the visualization plug-in can be directly previewed in the template, which is convenient for designing the template. For any visualization plug-in, the corresponding data processing rules can be set according to its display form and the index to be evaluated, and this embodiment does not make specific restrictions on this.

[0065] It can be understood that the report generation method provided in this embodiment directly drags and drops the visualization plug-in into the template through an intuitive and easy-to-use visualization design tool, which is simple to operate, so that non-technical personnel can easily create and edit templates, and it is convenient to create templates that meet customized needs. After querying the data source according to the mapping relationship and variables, it is rendered according to the display form of the visualization plug-in; after all visualization plug-ins are rendered, the initial report is generated to achieve intelligent data integration and automatic report generation, support real-time integration and updating of multi-source data, ensure that the data in the report is always up-to-date and accurate, provide reliable data support for decision-making, and reduce the workload of manual operations. Improve the efficiency and speed of report generation, while reducing the risk of human error. By selecting the characters in the initial report, formatting the format of the selected characters, and generating the final report, the style of the report can be adjusted after the automatic report is generated, so as to better meet the personalized needs of different business scenarios.

[0066] Example 2

[0067] Reference Figure 3 , Figure 3 1 is another flow chart of the report generation method provided by the present invention, to illustrate another specific embodiment of the report generation method provided by the present invention, including:

[0068] S201: Acquire original data, preprocess the original data to obtain preprocessed data; extract indicators from the preprocessed data, associate the indicators with corresponding fields for storage, and generate a data source; the data source includes at least one indicator, and the indicator includes corresponding fields.

[0069] S202: Create a template, the template includes a visualization plug-in, the visualization plug-in is displayed in the form of a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes at least one variable, and a mapping relationship between the configuration variable and the indicator.

[0070] S203: Retrieve the data source and template, and in any visualization plug-in, after querying the data source according to the mapping relationship and the variables, render according to the display form of the visualization plug-in, including: in any visualization plug-in, select a variable, query the indicator corresponding to the selected variable in the data source according to the mapping relationship, obtain the reference data corresponding to the queried indicator from the field corresponding to the queried indicator, and replace the selected variable with the reference data; after traversing all variables, render according to the display form of the visualization plug-in.

[0071] S204: Select characters in the initial report, format the selected characters, and generate a final report.

[0072] S205: Select an output format; when the selected output format is a document format, output the final report in accordance with the selected output format; when the selected output format is a table format, download the data source for output.

[0073] It should be noted that in step S201, the raw data is preprocessed to avoid the presence of abnormal values ​​that affect the accuracy of the data. The method for preprocessing the raw data can adopt the data cleaning method, data integration method, data conversion method, etc. in the prior art, of course, but not limited to this. In step S204, the format of the selected characters is formatted, including: formatting the digital type of the selected characters, formatting the font of the selected characters, formatting the font size of the selected characters, formatting the font color of the selected characters, formatting the background color of the selected characters, or bolding the selected characters, of course, but not limited to this. The data type of the formatted selected characters can be: if the selected characters are multiple decimals, the selected characters are formatted, and the multiple decimals are formatted into corresponding multiple percentages, of course, but not limited to this.

[0074] It can be understood that the report generation method provided in this embodiment directly drags and drops the visualization plug-in into the template through an intuitive and easy-to-use visualization design tool, which is simple to operate, so that non-technical personnel can easily create and edit templates, and it is convenient to create templates that meet customized needs. After querying the data source according to the mapping relationship and variables, it is rendered according to the display form of the visualization plug-in; after all visualization plug-ins are rendered, the initial report is generated. When the field corresponding to the indicator changes, that is, the input data of the variable corresponding to the indicator changes, the visualization plug-in changes accordingly, thereby supporting real-time integration and updating of multi-source data, ensuring that the data in the report is always up to date and accurate, and providing reliable data support for decision-making. The generated accurate, timely and high-quality reports can also effectively improve the ability and effect of application enterprises and organizations in decision-making and strategic planning, and promote business development and enhancement of competitive advantages. After querying the data source according to the mapping relationship and variables, it is rendered according to the display form of the visualization plug-in, which can also effectively reduce the workload of manual operations, improve the efficiency and speed of report generation, and reduce the risk of human errors. By selecting characters in the initial report and formatting the selected characters, the final report can be generated. After the automated report is generated, the report style can also be adjusted to better meet the personalized needs of different business scenarios and improve the aesthetics of the report.

[0075] Example 3

[0076] Combination Figure 4 , Figure 4 1 is a structural diagram of the report generation device provided by the present invention, to illustrate a specific structural diagram of the report generation device provided by the present invention, including:

[0077] A data source management unit 1, used to store a data source, where the data source includes at least one indicator;

[0078] Component library unit 2, including layout components, style components and data binding components;

[0079] The template creation unit 3 is connected to the component library unit 2 and is used to create a blank interface, call the layout component to add a visualization plug-in to the blank interface, the display form of the visualization plug-in is a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes a variable, call the data binding component to configure the mapping relationship between the variable and the indicator, and obtain the template after the configuration;

[0080] The template library unit 4 is connected to the template creation unit 3 and is used to store templates;

[0081] The calling unit 5 is connected to the data source management unit 1, the component library unit 2 and the template library unit 4 respectively, and is used to call the data source and the template. In any visualization plug-in, after querying the data source according to the mapping relationship and the variables, it is rendered according to the display form of the visualization plug-in; after all the visualization plug-ins are rendered, an initial report is generated; the style component is called to format the format of at least part of the characters in the initial report to generate a final report.

[0082] It should be noted that calling the layout component to add a visualization plug-in to the blank interface specifically involves calling the layout component to drag and drop the visualization plug-in to the blank interface, realizing the layout of the template through a simple drag-and-drop operation, and being able to directly preview the full picture of the template during the entire process, making it easy to adjust and modify the layout and style of the template. After calling the layout component to add a visualization plug-in to the blank interface, you can also preview the full picture of the current template, and call the style component to adjust the style. The template library unit 4 also supports template classification, search, and version control, but is not limited to this. For the calling unit 5, in any visualization plug-in, after querying the data source according to the mapping relationship and variables, rendering is performed in accordance with the display form of the visualization plug-in, including: in any visualization plug-in, selecting a variable, querying the indicator corresponding to the selected variable in the data source according to the mapping relationship, obtaining the reference data corresponding to the queried indicator from the field corresponding to the queried indicator, and replacing the selected variable with the reference data; after traversing all variables, rendering is performed in accordance with the display form of the visualization plug-in.

[0083] It can be understood that the report generation device provided in this embodiment adopts a modular setting to enhance the flexibility and scalability of the device, supports the rapid integration and deployment of new technologies and functions, and in the process of modular design, data security and privacy information protection are also considered. Before running the report generation device provided in this embodiment, the data source is registered to the data source management unit 1, and each unit is not connected to an external device, so that information leakage will not occur. Through the intuitive and easy-to-use layout component, the visualization plug-in is directly dragged and dropped into the template, and the operation is simple, so that non-technical personnel can easily create and edit templates, which is convenient for creating templates that meet customized needs. After querying the data source according to the mapping relationship and variables, it is rendered according to the display form of the visualization plug-in; after all visualization plug-ins are rendered, the initial report is generated, intelligent data integration and automatic report generation are realized, and real-time integration and updating of multi-source data are supported, ensuring that the data in the report is always up to date and accurate, providing reliable data support for decision-making, and reducing the workload of manual operations. , Improve the efficiency and speed of report generation, while reducing the risk of human errors. By selecting the characters in the initial report, formatting the format of the selected characters, and generating the final report, the style of the report can be adjusted after the automatic report is generated, so as to better meet the personalized needs of different business scenarios.

[0084] Example 4

[0085] Reference Figure 5 , Figure 6 and Figure 7 , Figure 5 is another structural diagram of the report generation device provided by the present invention, Figure 6 is an architecture diagram of the report generation device provided by the present invention. Figure 7 1 is another architecture diagram of the report generation device provided by the present invention, to illustrate a specific structure diagram of the report generation device provided by the present invention, including:

[0086] A data source management unit 1, used to store a data source, where the data source includes at least one indicator;

[0087] Component library unit 2, including layout components, style components and data binding components;

[0088] The template creation unit 3 is connected to the component library unit 2 and is used to create a blank interface, call the layout component to add a visualization plug-in to the blank interface, the display form of the visualization plug-in is a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes a variable, call the data binding component to configure the mapping relationship between the variable and the indicator, and obtain the template after the configuration;

[0089] The template library unit 4 is connected to the template creation unit 3 and is used to store templates;

[0090] The calling unit 5 is connected to the data source management unit 1, the component library unit 2 and the template library unit 4 respectively, and is used to call the data source and the template, and in any visualization plug-in, after querying the data source according to the mapping relationship and the variable, render it according to the display form of the visualization plug-in; after all the visualization plug-ins are rendered, an initial report is generated; the style component is called to format the format of at least part of the characters in the initial report, and a final report is generated;

[0091] The output and notification unit 6 is connected to the calling unit 5 and the client, respectively, and is used to output the final report to a preset location according to the selected output format and send a notification to the client when the selected output format is a document format, or to download the data source and output it to a preset location and send a notification to the client when the selected output format is a table format.

[0092] It should be noted that the calling unit 5, the data source management unit 1, the component library unit 2 and the template library unit 4 are all provided with an application programming interface; the calling unit 5 is connected to the data source management unit 1, the component library unit 2 and the template library unit 4 through the application programming interface. The application programming interface is also called the API interface. The calling unit 5 is connected to the data source management unit 1, the component library unit 2 and the template library unit 4 through the API interface and adopts a real-time data calling mechanism to ensure the consistency and integrity of the data in the process of applying the data source and the template to generate the report. Of course, the component library unit 2 and the template creation unit 3 can also be connected through the API interface and adopt a real-time data calling mechanism, and the template library unit 4 and the template creation unit 3 can also be connected through the API interface and adopt a real-time data calling mechanism, which can also ensure the consistency and integrity of the data during the creation, editing and storage of the template.

[0093] It can be understood that the report generation device provided in this embodiment queries the data source according to the mapping relationship and variables, and then renders it according to the display form of the visualization plug-in; after all visualization plug-ins are rendered, an initial report is generated to achieve intelligent data integration and automatic report generation, support real-time integration and update of multi-source data, ensure that the data in the report is always up-to-date and accurate, provide reliable data support for decision-making, reduce the workload of manual operations, improve the efficiency and speed of report generation, and reduce the risk of human error. By selecting characters in the initial report, formatting the format of the selected characters, and generating the final report, the style of the report can be adjusted after the automatic report generation, so as to better meet the personalized needs of different business scenarios. After the final report is generated, the report or report-related files are output to the preset location according to the selected output format, and the user can be notified through the message center.

[0094] Example 5

[0095] Based on the same inventive concept, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements a report generation method as described in any one of the above embodiments.

[0096] Example 6

[0097] Based on the same inventive concept, the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the report generation method as described in any one of the above embodiments is implemented.

[0098] It can be seen from the above embodiments that the report generation method, device, electronic device and storage medium provided by the present invention achieve at least the following beneficial effects:

[0099] The report generation method, device, electronic device and storage medium provided by the present invention include: creating a template, the template includes a visualization plug-in, the display form of the visualization plug-in is a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes at least one variable, and the mapping relationship between the configuration variable and the indicator; calling the data source and the template, in any visualization plug-in, after querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; generating an initial report after all visualization plug-ins are rendered; selecting characters in the initial report, formatting the format of the selected characters, and generating a final report. The visualization plug-in is directly dragged and dropped into the template through an intuitive and easy-to-use visualization design tool, and the operation is simple, so that non-technical personnel can also easily create and edit templates, and it is convenient to create templates that meet customized needs. After querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; generating an initial report after all visualization plug-ins are rendered, realizing intelligent data integration and automatic report generation, supporting real-time integration and updating of multi-source data, ensuring that the data in the report is always up-to-date and accurate, providing reliable data support for decision-making, reducing the workload of manual operations, improving the efficiency and speed of report generation, and reducing the risk of human error. By selecting characters in the initial report, formatting the selected characters, and generating the final report, you can also adjust the style of the report after the automated report is generated, thereby better meeting the personalized needs of different business scenarios.

[0100] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A report generation method, characterized in that: include: Acquire a data source, where the data source includes at least one indicator; Creating a template, wherein the template includes a visualization plug-in, wherein the visualization plug-in is displayed in the form of a chart, an image, or a table, wherein the visualization plug-in includes a data processing rule, wherein the data processing rule includes at least one variable, and a mapping relationship between the variable and the indicator is configured; Retrieving the data source and the template, and in any of the visualization plug-ins, after querying the data source according to the mapping relationship and the variable, rendering according to the display form of the visualization plug-in; After all the visualization plug-ins are rendered, an initial report is generated; Select characters in the initial report, format the selected characters, and generate a final report.

2. The report generation method according to claim 1, characterized in that: The step of querying the data source according to the mapping relationship and the variable in any one of the visualization plug-ins and rendering the data in the display form of the visualization plug-in includes: The indicator includes corresponding fields; The step of selecting the variable in any of the visualization plug-ins, querying the indicator corresponding to the selected variable in the data source according to the mapping relationship, obtaining reference data corresponding to the queried indicator from the field corresponding to the queried indicator, and replacing the selected variable with the reference data; After traversing all the variables, rendering is performed according to the display format of the visualization plug-in.

3. The report generation method according to claim 2, characterized in that: The obtaining of the data source comprises: Get the original data; Preprocessing the original data to obtain preprocessed data; The index is extracted from the preprocessed data, the index is associated with the corresponding field and stored, and the data source is generated.

4. The report generation method according to claim 1, characterized in that: The format of the characters selected by the formatting includes: Format the digital type of the selected character, format the font of the selected character, format the font size of the selected character, format the font color of the selected character, format the background color of the selected character, or bold the selected character.

5. The report generation method according to claim 1, characterized in that: After generating the final report, the steps include: selecting an output format; When the selected output format is a document format, the final report is output according to the selected output format; When the selected output format is a table format, the data source is downloaded for output.

6. A report generation device, characterized in that: include: A data source management unit, used to store a data source, wherein the data source includes at least one indicator; Component library units, including layout components, style components, and data binding components; A template creation unit, connected to the component library unit, is used to create a blank interface, call the layout component to add a visualization plug-in to the blank interface, the visualization plug-in is displayed in the form of a chart, an image or a table, the visualization plug-in includes a data processing rule, the data processing rule includes a variable, call the data binding component to configure the mapping relationship between the variable and the indicator, and obtain the template after configuration; A template library unit, connected to the template creation unit, and used to store the template; A calling unit, connected to the data source management unit, the component library unit and the template library unit respectively, for calling the data source and the template, and in any one of the visualization plug-ins, after querying the data source according to the mapping relationship and the variable, rendering in accordance with the display form of the visualization plug-in; After all the visualization plug-ins are rendered, an initial report is generated; The style component is called to format at least part of the characters in the initial report to generate a final report.

7. The report generation device according to claim 6, characterized in that: The calling unit, the data source management unit, the component library unit and the template library unit are all provided with an application programming interface; The calling unit is respectively connected with the data source management unit, the component library unit and the template library unit through the application programming interface.

8. The report generation device according to claim 6, characterized in that: Also includes: The output and notification unit is connected to the calling unit and the client, respectively, and is used to output the final report to a preset location according to the selected output format and send a notification to the client when the selected output format is a document format, or to download the data source and output it to the preset location and send a notification to the client when the selected output format is a table format.

9. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the report generating method according to any one of claims 1 to 5.

10. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the report generation method according to any one of claims 1 to 5 is implemented.