Data report generation method and device, storage medium and electronic device

By automating the generation of indicator libraries and data reports, the problem of low efficiency in data report generation has been solved, enabling efficient, real-time data display and consistent updates, and supporting rapid business response.

CN121979883APending Publication Date: 2026-05-05QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO HAIER TECH
Filing Date
2025-12-29
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency in generating data reports, increased performance load due to direct database queries, and inconsistent computational logic that affects decision-making efficiency.

Method used

By generating an indicator library, an indicator set is generated based on indicator calculation rules and different data sources, and data reports are displayed in a visual interface. It supports indicator subscription and automatic updates, and realizes unified formatting and incremental updates of data.

Benefits of technology

It improves the efficiency of data report generation, ensures data consistency and real-time performance, reduces operation and maintenance costs, and supports business agility and rapid response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979883A_ABST
    Figure CN121979883A_ABST
Patent Text Reader

Abstract

The invention discloses a data report generation method and device, a storage medium and an electronic device, and relates to the technical field of data processing.The data report generation method comprises the steps that an index library is generated according to multiple index calculation rules and data of different data sources; a first index set is generated according to an index subscription request of the target object, the index subscription request comprises at least one index subscribed by the target object from the index library, and the first index set comprises all indexes subscribed by the target object; and in response to an index issuing instruction of the target object, obtaining first index data corresponding to the first index set from the index library, and generating a first data report according to the first index data. By adopting the technical scheme, the problem of how to improve the generation efficiency of the data report is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a data report generation apparatus, storage medium, and electronic device. Background Technology

[0002] In current enterprise data applications, the efficiency of data report generation is a key bottleneck restricting the timeliness of business insights. Existing technical approaches, whether through API calls or direct database queries, rely on the direct development and manipulation of underlying data tables. When report developers directly query large database tables that serve as a common data source, non-standard or high-concurrency queries can easily lead to a sharp increase in database performance load and slow response times. Performance tuning and isolation measures implemented to ensure system stability further increase the complexity and time cost of report development. Furthermore, due to the lack of unified indicator definitions and management, different reports may contain indicators with the same name but inconsistent calculation logic and numerical results. This phenomenon can lead to decision-making confusion and additional verification work, severely impacting efficiency. Therefore, the question remains: how to improve the efficiency of data report generation?

[0003] No effective solution has yet been proposed for improving the efficiency of data report generation in related technologies. Summary of the Invention

[0004] This application provides a data report generation apparatus, storage medium, and electronic device to at least address the problem of how to improve the generation efficiency of data reports in related technologies.

[0005] According to one embodiment of this application, a data report generation method is provided, comprising: generating an indicator library based on multiple indicator calculation rules and data from different data sources; generating a first indicator set based on an indicator subscription request of a target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object; and, in response to an indicator publishing instruction from the target object, obtaining first indicator data corresponding to the first indicator set from the indicator library, and generating a first data report based on the first indicator data.

[0006] In one exemplary embodiment, generating an indicator library based on multiple indicator calculation rules and data from different data sources includes: for any indicator in the indicator library, determining the indicator calculation rule for the given indicator, and determining the indicator monitoring parameters required by the indicator calculation rule when calculating the indicator data of the given indicator; determining different data sources associated with the indicator monitoring parameters, and obtaining the parameter values ​​of the indicator monitoring parameters from the different data sources; calculating the parameter values ​​of the indicator monitoring parameters according to the indicator calculation rules to obtain the indicator data of the given indicator; generating a set of data corresponding to the given indicator based on the different data sources and the indicator data according to the indicator calculation rules, and determining the indicator library based on multiple sets of data corresponding to multiple indicators.

[0007] In one exemplary embodiment, obtaining the parameter values ​​of the indicator monitoring parameters from the different data sources includes: obtaining raw data from each data source for each different data source; parsing the raw data according to a preset data parsing rule for each data source to obtain parsed data; and performing uniform formatting processing on the parsed data to obtain the parameter values ​​of the indicator monitoring parameters.

[0008] In an exemplary embodiment, after generating a first data report based on the first indicator data, the method further includes: displaying the indicator data in the first data report on a visualization interface; determining a first updated indicator from the indicator library when the indicator data in the indicator library is updated, wherein the first updated indicator represents an updated indicator in the indicator library; determining a target indicator set from all indicator sets that includes any indicator from the first updated indicator; updating the first indicator data in the first data report when the target indicator set is determined to include the first indicator set, to obtain an updated first data report; and displaying the first indicator data in the updated first data report on the visualization interface.

[0009] In an exemplary embodiment, when it is determined that the target indicator set includes the first indicator set, updating the first indicator data in the first data report to obtain an updated first data report includes: determining a second updated indicator from the first updated indicators, wherein the second updated indicator represents an indicator belonging to the first indicator set among the first updated indicators; obtaining the second indicator data of the second updated indicator from the indicator library; and updating the first indicator data in the first data report according to the second indicator data to obtain the updated first data report.

[0010] In an exemplary embodiment, after generating a first data report based on the first indicator data, the method further includes: displaying the indicator data in the first data report on a visualization interface; editing the indicators in the first indicator set according to the indicator editing request of the target object to obtain a second indicator set; obtaining the second indicator data corresponding to the second indicator set from the indicator library, and generating a second data report based on the second indicator data; modifying the table structure of the first data report according to the table structure corresponding to the second indicator set to obtain a second data report; and displaying the indicator data in the second data report on the visualization interface.

[0011] In one exemplary embodiment, displaying the indicator data in the first data report on a visualization interface includes: when the visualization interface is determined to be the display interface of a reporting tool, obtaining a query statement written by the target object in the reporting tool, wherein the reporting tool has been connected to the database storing the first data report via a database connection protocol; executing the query statement in the database to obtain the indicator data in the first data report; and displaying the indicator data in the first data report on the display interface of the reporting tool.

[0012] According to another aspect of the embodiments of this application, a data report generation apparatus is also provided, comprising: a first generation module, configured to generate an indicator library based on multiple indicator calculation rules and data from different data sources; a second generation module, configured to generate a first indicator set based on an indicator subscription request of a target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object; and a third generation module, configured to, in response to an indicator publishing instruction from the target object, obtain first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the generation of the above-mentioned data report at runtime.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the generation of the aforementioned data report through the computer program.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0016] In this embodiment, an indicator library is first generated based on indicator calculation rules and data from different data sources. Then, an indicator set is generated based on the indicators subscribed to by the user in the indicator library. Next, the indicator data corresponding to the indicator set is obtained from the indicator library, and a data report is generated based on the obtained indicator data. This solves the problem of how to improve the efficiency of data report generation, thereby achieving the effect of improving the efficiency of data report generation. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the hardware environment for generating a data report according to an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating the generation of a data report according to an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of an indicator subscription according to an embodiment of this application;

[0022] Figure 4 This is a schematic diagram illustrating the generation of a data report according to an embodiment of this application;

[0023] Figure 5 This is a schematic diagram of an indicator update according to an embodiment of this application;

[0024] Figure 6 This is a structural block diagram of a data report generation apparatus according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0027] According to one aspect of the embodiments of this application, a method for generating data reports is provided. This data report generation is widely used in application scenarios such as software development. Optionally, in this embodiment, the above-mentioned data report generation can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0028] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0029] This embodiment provides a method for generating data reports. Figure 2 This is a flowchart illustrating the generation of a data report according to an embodiment of this application. The process includes the following steps:

[0030] Step S202: Generate an indicator library based on multiple indicator calculation rules and data from different data sources;

[0031] Step S204: Generate a first indicator set according to the indicator subscription request of the target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object;

[0032] Step S206: In response to the indicator release instruction of the target object, obtain the first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

[0033] Through the above steps, an indicator library is first generated based on indicator calculation rules and data from different data sources. Then, an indicator set is generated based on the indicators subscribed to by users in the indicator library. Next, the indicator data corresponding to the indicator set is retrieved from the indicator library, and finally, a data report is generated based on the retrieved indicator data. This solves the problem of how to improve the efficiency of data report generation, thereby achieving the effect of improving the efficiency of data report generation.

[0034] In an optional embodiment, such as Figure 3 As shown, users select bound device data, active device data, online device data, and bound user data from the indicator library as an indicator set. Each indicator set has a unique ID code, and users can add, delete, and adjust the indicators in the indicator set.

[0035] In one exemplary embodiment, generating an indicator library based on multiple indicator calculation rules and data from different data sources includes: for any indicator in the indicator library, determining the indicator calculation rule for the given indicator, and determining the indicator monitoring parameters required by the indicator calculation rule when calculating the indicator data of the given indicator; determining different data sources associated with the indicator monitoring parameters, and obtaining the parameter values ​​of the indicator monitoring parameters from the different data sources; calculating the parameter values ​​of the indicator monitoring parameters according to the indicator calculation rules to obtain the indicator data of the given indicator; generating a set of data corresponding to the given indicator based on the different data sources and the indicator data according to the indicator calculation rules, and determining the indicator library based on multiple sets of data corresponding to multiple indicators.

[0036] Optionally, in the above embodiments, the indicator calculation rule is the definition of the indicator's scope. For example, the calculation rule for the mobile phone sales revenue indicator is "SUM(order amount) WHERE Product category = 'mobile phone'". The "indicator monitoring parameters" are the specific data fields or condition values ​​required to execute the rule, such as "order amount" and "product category". The system needs to determine which data sources these parameters come from, which may be internal database tables or external APIs. For external data sources, corresponding plugins can be configured for data acquisition and parsing. After obtaining the raw parameter values, the calculation engine (such as a custom function) is called to execute the rule and obtain the indicator data. Ultimately, the indicator's definition (rule), source (data source), and result (data) are stored together, forming the complete metadata and dataset of the indicator library. For example, the rule for the mobile phone sales revenue indicator is explicit SQL logic, and its monitoring parameters come from the order amount and product category in the order topic table. The calculation results are updated and stored daily.

[0037] The above embodiments achieve standardization and manageability of the indicator generation process. It condenses disparate business logic into reusable indicator definitions and supports unified access to heterogeneous data sources, laying the foundation for unified presentation of cross-platform indicators. This structured storage method makes indicator traceability, verification, and reuse extremely convenient, improving the management efficiency of data assets.

[0038] In one exemplary embodiment, obtaining the parameter values ​​of the indicator monitoring parameters from the different data sources includes: obtaining raw data from each data source for each different data source; parsing the raw data according to a preset data parsing rule for each data source to obtain parsed data; and performing uniform formatting processing on the parsed data to obtain the parameter values ​​of the indicator monitoring parameters.

[0039] Optionally, in the above embodiments, for example, data source A is an internal MySQL database, data source B is an HTTP API providing JSON format, and data source C is an HTML page obtained through web crawling. The system processes these raw data using pre-configured data parsing rules for each data source: for the JSON returned by the API, specific fields are parsed according to its structure; for the crawled HTML, table data is extracted according to rules. Subsequently, the parsed data is uniformly formatted into a standard format agreed upon internally by the system (such as a unified date format, numeric format, code enumeration, etc.), thereby obtaining usable parameter values ​​for metric monitoring parameters.

[0040] Through the above embodiments, the heterogeneity of the underlying data source is shielded by configurable parsing and formatting rules, so that the upstream indicator calculation logic does not need to care about where the data comes from or its format. This greatly enhances the system's scalability and adaptability, enabling rapid access to various new data sources, and is a key technical guarantee for achieving cross-system data integration.

[0041] In an exemplary embodiment, after generating a first data report based on the first indicator data, the method further includes: displaying the indicator data in the first data report on a visualization interface; determining a first updated indicator from the indicator library when the indicator data in the indicator library is updated, wherein the first updated indicator represents an updated indicator in the indicator library; determining a target indicator set from all indicator sets that includes any indicator from the first updated indicator; updating the first indicator data in the first data report when the target indicator set is determined to include the first indicator set, to obtain an updated first data report; and displaying the first indicator data in the updated first data report on the visualization interface.

[0042] Optionally, in the above embodiments, an automatic synchronization and update mechanism for data from the indicator library to the reports is constructed. After the reports are displayed on the interface, their data is not static. Once a certain indicator in the underlying indicator library is updated (e.g., a daily scheduled task calculates new data), the system immediately captures this "update event" and identifies the updated indicator (the first updated indicator). Then, the system queries the subscription relationships of all indicator sets to find all "target indicator sets" that contain these updated indicators. If the "first indicator set" corresponding to the currently displayed "first data report" has also subscribed to the first updated indicator, the system automatically triggers data synchronization, pushes the latest indicator data to the report, and refreshes the visualization interface in real time. For example, when the "sales" indicator is calculated and updated at 2 AM, all dashboards that have subscribed to this indicator will automatically display the latest data within a few minutes.

[0043] The above embodiments achieve near real-time synchronization and publishing of report data, ensuring that users always see the latest data and improving the timeliness of decision-making. More importantly, it guarantees data consistency through an event-driven proactive push mode. All reports subscribed to the same metric will be updated simultaneously, completely avoiding the problem of different values ​​for the same metric on different dashboards due to manual updates or task scheduling delays. Furthermore, this process requires no intervention from report development or maintenance personnel, reducing operational costs.

[0044] In an exemplary embodiment, when it is determined that the target indicator set includes the first indicator set, updating the first indicator data in the first data report to obtain an updated first data report includes: determining a second updated indicator from the first updated indicators, wherein the second updated indicator represents an indicator belonging to the first indicator set among the first updated indicators; obtaining the second indicator data of the second updated indicator from the indicator library; and updating the first indicator data in the first data report according to the second indicator data to obtain the updated first data report.

[0045] Optionally, the targeted update process is refined in the above embodiments. When the "first indicator set" needs to be updated, instead of refreshing all data, a precise incremental update is performed. First, a comparison is made to select those indicators (second update indicators) that exactly belong to the report's subscription from all updated indicators (first update indicators). Then, only the latest data of these specific indicators (second indicator data) is retrieved from the indicator library and used to update the corresponding old data in the report. For example, if a report subscribes to three indicators A, B, and C, and indicator libraries A and D are updated in a certain update, the system will accurately identify that only A is the relevant "second update indicator" for this update, and then only retrieve and update the data of A, while the data of B and C remain unchanged.

[0046] Through the above embodiments, this incremental update mechanism greatly improves the efficiency and performance of data synchronization. It reduces unnecessary data transmission, especially in scenarios with numerous indicators and complex reports, effectively reducing system load and network overhead.

[0047] In an exemplary embodiment, after generating a first data report based on the first indicator data, the method further includes: displaying the indicator data in the first data report on a visualization interface; editing the indicators in the first indicator set according to the indicator editing request of the target object to obtain a second indicator set; obtaining the second indicator data corresponding to the second indicator set from the indicator library, and generating a second data report based on the second indicator data; modifying the table structure of the first data report according to the table structure corresponding to the second indicator set to obtain a second data report; and displaying the indicator data in the second data report on the visualization interface.

[0048] Optionally, in the above embodiments, users can submit indicator editing requests at any time after the report is published, such as adding a new indicator to the existing set, deleting an unnecessary indicator, or changing the analysis dimensions. Based on the edited new definition (the second indicator set), the system will automatically perform two operations: first, retrieve the new indicator dataset (the second indicator data) from the indicator library; and second, automatically perform data report structure changes based on the new field structure. Finally, a second data report with updated structure and synchronized data will be generated and displayed.

[0049] The above embodiments provide strong business agility. When business needs change, there is no need to go through the traditional long-cycle process of submitting requirements, developing, and modifying reports. Report users or developers can directly make adjustments on the interface, and the system automatically completes the adaptation of underlying data and structure. This greatly shortens the report iteration cycle, enables rapid response to business needs, and avoids errors and risks that may be introduced by manually modifying database table structures and data conversion scripts.

[0050] In one exemplary embodiment, displaying the indicator data in the first data report on a visualization interface includes: when the visualization interface is determined to be the display interface of a reporting tool, obtaining a query statement written by the target object in the reporting tool, wherein the reporting tool has been connected to the database storing the first data report via a database connection protocol; executing the query statement in the database to obtain the indicator data in the first data report; and displaying the indicator data in the first data report on the display interface of the reporting tool.

[0051] Optionally, in the above embodiments, the generated first data report is physically represented as one or more tables in a database (a database specifically used to store data reports, not the original data source). Mainstream third-party BI tools or custom front-ends connect directly to this database via standard database connection protocols. Report developers in these tools only need to write extremely simple query statements (e.g., SELECT). By using the query `FROM indicator_set_tableWHERE date='2023-10-01'`, you can retrieve data for chart creation. Because the query retrieves a pre-aggregated table of indicators, the statement is typically very simple and does not involve complex joins or calculations.

[0052] The above embodiments avoid the database performance risks associated with reporting tools directly querying large tables in the production environment or performing complex queries, resulting in fast and stable query speeds. Secondly, it isolates the operational permissions of report developers on a read-only metric result table, adhering to the principle of least privilege and enhancing system security.

[0053] To better understand the process of generating the above data reports, the implementation method of the above clothing matching will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.

[0054] In an optional embodiment, Figure 4 This is a schematic diagram illustrating the data report generation process according to an embodiment of this application, such as... Figure 4 As shown, in the indicator generation phase, an indicator library is created and continuously updated from multiple data sources using predefined calculation rules, while a subscription interface is provided externally. In the indicator subscription phase, users can select specific indicators and dimensions from the indicator library based on business needs to create logical indicator sets. After publishing the set, the system automatically executes the table creation process, generating the corresponding physical storage structure in the database. In the final report update and visualization phase, reporting tools or front-end applications directly access these automatically generated physical tables to obtain data and achieve visualization. To ensure data real-time performance and consistency, when any indicator in the indicator library is updated, the system verifies in real time whether the indicator has been subscribed to by downstream indicator sets. If subscribed, a data synchronization task is automatically triggered, updating the latest indicator value level by level to all associated indicator set physical tables, thereby driving the synchronous refresh of related report content. The entire process achieves closed-loop automated management from indicator definition and aggregation subscription to data delivery and synchronization.

[0055] In an optional embodiment, Figure 5 This is a schematic diagram of an indicator update process according to an embodiment of this application, such as... Figure 5 As shown, cross-system indicator data collection begins with the acquisition of heterogeneous data from multiple sources (such as API interfaces, database tables, and web pages). The system adapts different synchronization strategies based on the characteristics of each data source, such as timed retrieval or real-time monitoring based on Change Data Capture (CDC). The acquired raw data is standardized by the rule parsing module and converted into a unified format recognizable by the system. Subsequently, the system calls predefined indicator calculation logic to process the data, generate indicator values, and update the core indicator library. After the update, the system automatically checks whether the indicator has been subscribed to by downstream reports. If it has been subscribed to, the subsequent data distribution process is triggered, pushing and updating the latest indicator data to all indicator sets that have subscribed to the indicator, thus ensuring data consistency; if it has not been subscribed to, the process terminates. The entire process achieves an automated closed loop from multi-source data access and standardized calculation to subscription-based distribution.

[0056] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0057] Figure 6 This is a structural block diagram of a data report generation apparatus according to an embodiment of this application; as shown... Figure 6 As shown, it includes:

[0058] The first generation module 62 is used to generate an indicator library based on multiple indicator calculation rules and data from different data sources;

[0059] The second generation module 64 is configured to generate a first indicator set based on the indicator subscription request of the target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object.

[0060] The third generation module 66 is used to respond to the indicator release instruction of the target object, obtain the first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

[0061] The aforementioned device first generates an indicator library based on indicator calculation rules and data from different data sources. Then, it generates an indicator set based on indicators subscribed to by users in the indicator library. Next, it retrieves the corresponding indicator data from the indicator library and generates a data report based on the retrieved indicator data. This solves the problem of how to improve the efficiency of data report generation, thereby achieving the effect of improving data report generation efficiency.

[0062] In an exemplary embodiment, the first generation module 62 is configured to: determine, for any one indicator in the indicator library, the indicator calculation rule for the given indicator, and the indicator monitoring parameters required by the indicator calculation rule when calculating the indicator data of the given indicator; determine different data sources associated with the indicator monitoring parameters, and obtain the parameter values ​​of the indicator monitoring parameters from the different data sources; calculate the parameter values ​​of the indicator monitoring parameters according to the indicator calculation rule to obtain the indicator data of the given indicator; generate a set of data corresponding to the given indicator based on the different data sources and the indicator data according to the indicator calculation rule, and determine the indicator library based on multiple sets of data corresponding to multiple indicators.

[0063] In an exemplary embodiment, the first generation module 62 is configured to: obtain raw data from each of the different data sources; parse the raw data according to a preset data parsing rule for each data source to obtain parsed data; and perform uniform formatting on the parsed data to obtain the parameter values ​​of the indicator monitoring parameters.

[0064] In an exemplary embodiment, the apparatus is further configured to display indicator data in the first data report on a visualization interface; when the indicator data in the indicator library is updated, determine a first updated indicator from the indicator library, wherein the first updated indicator represents an updated indicator in the indicator library; determine a target indicator set from all indicator sets that includes any indicator from the first updated indicator; when it is determined that the target indicator set includes the first indicator set, update the first indicator data in the first data report to obtain an updated first data report; and display the first indicator data in the updated first data report on the visualization interface.

[0065] In an exemplary embodiment, the apparatus is further configured to determine a second update indicator from the first update indicator, wherein the second update indicator represents an indicator belonging to the first indicator set among the first update indicators; obtain second indicator data of the second update indicator from the indicator library; and update the first indicator data in the first data report according to the second indicator data to obtain the updated first data report.

[0066] In an exemplary embodiment, the device is further configured to display indicator data in the first data report on a visualization interface; edit the indicators in the first indicator set according to the indicator editing request of the target object to obtain a second indicator set; obtain the second indicator data corresponding to the second indicator set from the indicator library, and generate a second data report according to the second indicator data; modify the table structure of the first data report according to the table structure corresponding to the second indicator set to obtain a second data report; and display the indicator data in the second data report on the visualization interface.

[0067] In an exemplary embodiment, the apparatus is further configured to, when determining that the visualization interface is the display interface of a reporting tool, obtain a query statement written by the target object in the reporting tool, wherein the reporting tool has been connected to a database storing the first data report via a database connection protocol; execute the query statement in the database to obtain indicator data in the first data report; and display the indicator data in the first data report in the display interface of the reporting tool.

[0068] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0069] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0070] S1 generates an indicator library based on multiple indicator calculation rules and data from different data sources;

[0071] S2, Generate a first indicator set based on the indicator subscription request of the target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object;

[0072] S3, in response to the indicator release instruction of the target object, obtain the first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

[0073] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0074] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0075] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0076] S1 generates an indicator library based on multiple indicator calculation rules and data from different data sources;

[0077] S2, Generate a first indicator set based on the indicator subscription request of the target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object;

[0078] S3, in response to the indicator release instruction of the target object, obtain the first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

[0079] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0080] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0081] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0082] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.

[0083] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0084] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0085] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for generating a data report, characterized in that, include: An indicator library is generated based on multiple indicator calculation rules and data from different data sources; A first set of metrics is generated based on the metric subscription request of the target object, wherein the metric subscription request includes at least one metric subscribed by the target object from the metric library, and the first set of metrics includes all metrics subscribed by the target object; In response to the indicator release instruction of the target object, the first indicator data corresponding to the first indicator set is obtained from the indicator library, and a first data report is generated based on the first indicator data.

2. The method for generating data reports according to claim 1, characterized in that, An indicator library is generated based on multiple indicator calculation rules and data from different data sources, including: For any one indicator in the indicator library, determine the indicator calculation rule for that one indicator, and determine the indicator monitoring parameters required by the indicator calculation rule when calculating the indicator data of that one indicator. Identify different data sources associated with the indicator monitoring parameters, and obtain the parameter values ​​of the indicator monitoring parameters from the different data sources; The parameter values ​​of the monitoring parameters of the indicators are calculated according to the indicator calculation rules to obtain the indicator data of any one indicator. According to the indicator calculation rules, the different data sources and the indicator data generate a set of data corresponding to any one of the indicators, and the indicator library is determined based on multiple sets of data corresponding to multiple indicators.

3. The method for generating data reports according to claim 2, characterized in that, The parameter values ​​of the metric monitoring parameters are obtained from the different data sources, including: For each of the different data sources, obtain the raw data; The original data is parsed according to the preset data parsing rules for each data source to obtain parsed data; The parsed data is formatted in a uniform manner to obtain the parameter values ​​of the indicator monitoring parameters.

4. The method for generating data reports according to claim 1, characterized in that, After generating the first data report based on the first indicator data, the method further includes: The indicator data in the first data report is displayed in a visual interface; When the indicator data in the indicator library is updated, a first updated indicator is determined from the indicator library, wherein the first updated indicator represents the updated indicator in the indicator library; Determine the target indicator set, which includes any indicator from the first updated indicator, from all indicator sets; If it is determined that the target indicator set includes the first indicator set, the first indicator data in the first data report is updated to obtain the updated first data report. The visualization interface displays the first indicator data from the updated first data report.

5. The method for generating data reports according to claim 4, characterized in that, If it is determined that the target indicator set includes the first indicator set, the first indicator data in the first data report is updated to obtain an updated first data report, including: A second update indicator is determined from the first update indicator, wherein the second update indicator represents the indicator in the first update indicator that belongs to the first indicator set; Obtain the second indicator data of the second updated indicator from the indicator library; The first indicator data in the first data report is updated based on the second indicator data to obtain the updated first data report.

6. The method for generating data reports according to claim 1, characterized in that, After generating the first data report based on the first indicator data, the method further includes: The indicator data in the first data report is displayed in a visual interface; Edit the indicators in the first indicator set according to the indicator editing request of the target object to obtain the second indicator set; Obtain the second indicator data corresponding to the second indicator set from the indicator library, generate a second data report based on the second indicator data, modify the table structure of the first data report based on the table structure corresponding to the second indicator set, and obtain the second data report. The visualization interface displays the indicator data from the second data report.

7. The method for generating data reports according to claim 6, characterized in that, The visualization interface displays the indicator data from the first data report, including: If the visualization interface is determined to be the display interface of the reporting tool, the query statement written by the target object in the reporting tool is obtained, wherein the reporting tool has been connected to the database storing the first data report through a database connection protocol. Execute the query statement in the database to obtain the indicator data in the first data report; The indicator data in the first data report is displayed on the display interface of the reporting tool.

8. A data report generation device, characterized in that, include: The first generation module is used to generate an indicator library based on multiple indicator calculation rules and data from different data sources. The second generation module is used to generate a first indicator set based on the indicator subscription request of the target object, wherein the indicator subscription request includes at least one indicator subscribed by the target object from the indicator library, and the first indicator set includes all indicators subscribed by the target object. The third generation module is used to respond to the indicator release instruction of the target object, obtain the first indicator data corresponding to the first indicator set from the indicator library, and generate a first data report based on the first indicator data.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.