Report generation method, device, equipment and storage medium

By building a data warehouse, generating task knowledge graphs and data extraction logic, and performing anomaly detection and optimization, the complexity of data integration and report generation in existing technologies is solved, efficient and visual report generation is achieved, and accuracy and accuracy are improved. Credibility.

CN118012916BActive Publication Date: 2024-09-20SHENZHEN XUTAI INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410229996.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2024-09-20
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

Existing automated report generation methods are difficult to achieve efficient integration and preparation when faced with diverse and complex data sources, and are difficult to generate highly visual and interactive reports according to different business needs. Moreover, there is a lack of accurate and intelligent methods in the report generation process. Anomaly detection and optimization strategies.

Method used

Build a data warehouse by acquiring internal and external data sources, generate task knowledge maps and data extraction logic, dynamically generate reports, perform anomaly detection and strategy optimization, calculate interactive elements based on preset templates, and generate visual online reports.

Benefits of technology

It improves the accuracy and credibility of report generation, reduces manual processing workload, reduces the risk of manual errors, meets various business needs, and supports data analysis and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118012916B
    Figure CN118012916B
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and discloses a report generation method, device, equipment and storage medium. The method includes: constructing an internal data warehouse and an external data warehouse, and generating a task knowledge graph for each data processing task; creating data extraction logic; generating multiple report data to be filled in for report generation request; filling and publishing the report data to obtain an initial online report; performing anomaly detection on the report data filling and publishing process of the initial online report to obtain a target filling and publishing anomaly value set, and inputting the target filling and publishing anomaly value set into a report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy; generating multiple visual online reports corresponding to the report data to be filled in according to the target report optimization strategy and the task report template. The present application realizes the intelligent generation of online reports and improves the accuracy of report generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a report generation method, device, equipment and storage medium. Background Art

[0002] With the explosive growth of data, organizations and enterprises need to analyze and utilize internal and external data more effectively to support business decisions and strategic planning. Traditional report generation methods usually rely on manual data extraction and report design, but this approach becomes unfeasible under large-scale data and complex requirements. Therefore, automated report generation methods have become a hot topic in research and application.

[0003] However, there are still some challenges and problems in the current automated report generation methods. The diversity and complexity of data sources make data integration and preparation difficult, requiring effective data warehouses and data extraction logic. Secondly, how to generate highly visual and interactive reports based on different business needs and data characteristics remains a challenge, requiring comprehensive consideration of report structure, layout, style, and data relevance. Anomaly detection and optimization strategies in the report generation process require more precise and intelligent algorithms to ensure the quality and decision-making value of the generated reports. Summary of the invention

[0004] The present application provides a report generation method, apparatus, device and storage medium, which are used to realize the intelligent generation of online reports and improve the accuracy of report generation.

[0005] In a first aspect, the present application provides a method for generating a report, the method comprising:

[0006] Acquire multiple internal data sources and construct an internal data warehouse through the multiple internal data sources, and at the same time, acquire multiple external data sources and construct an external data warehouse through the multiple external data sources;

[0007] Acquire multiple data processing tasks, and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse;

[0008] Obtaining task entities and attribute relationships of the task knowledge graph, and creating data extraction logic for each data processing task based on the task entities and the attribute relationships;

[0009] Querying a pending report generation request, and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic;

[0010] Calculate the target report interactive element of each report data to be filled according to the preset task report template, and fill and publish the report data of the multiple report data to be filled based on the target report interactive element to obtain an initial online report;

[0011] Performing anomaly detection on the report data filling and publishing process of the initial online report to obtain a target filling and publishing anomaly value set, and inputting the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy;

[0012] Generate a visualized online report corresponding to the plurality of report data to be filled according to the target report optimization strategy and the task report template.

[0013] In a second aspect, the present application provides a report generation device, the report generation device comprising:

[0014] An acquisition module is used to acquire multiple internal data sources and construct an internal data warehouse through the multiple internal data sources, and at the same time, acquire multiple external data sources and construct an external data warehouse through the multiple external data sources;

[0015] A processing module, used to obtain multiple data processing tasks, and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse;

[0016] A creation module is used to obtain the task entities and attribute relationships of the task knowledge graph, and create data extraction logic for each data processing task based on the task entities and the attribute relationships;

[0017] A query module, used for querying a pending report generation request and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic;

[0018] A calculation module, used for calculating the target report interactive element of each report data to be filled according to the preset task report template, and filling and publishing the report data of the multiple report data to be filled respectively based on the target report interactive element to obtain an initial online report;

[0019] An analysis module is used to perform anomaly detection on the report data filling and publishing process of the initial online report, obtain a target filling and publishing anomaly value set, and input the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy;

[0020] A generating module is used to generate a visual online report corresponding to the plurality of report data to be filled according to the target report optimization strategy and the task report template.

[0021] The third aspect of the present application provides a report generation device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the report generation device executes the above-mentioned report generation method.

[0022] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned report generation method.

[0023] In the technical solution provided by this application, by acquiring and integrating multiple internal and external data sources, internal and external data warehouses are constructed, which helps to realize centralized management and unified access to data and improve the availability and consistency of data. By generating task knowledge graphs and data extraction logic, the automated description and planning of data processing tasks are realized, and the efficiency and accuracy of data processing are improved. Reports are dynamically generated according to preset task report templates, and the report content is automatically adjusted according to data changes, making report generation more flexible and adaptive. Through anomaly detection and report generation strategy optimization, data anomalies can be identified and processed in a timely manner, improving the credibility and data quality of reports. By calculating the interactive elements of the target report, visual online reports are generated, which enhances the readability and user experience of the report and makes it easier for decision makers to understand the data. The workload of manual data processing and report generation is reduced, efficiency is improved, and the risk of manual errors is reduced. According to different task requirements and data source characteristics, the report generation process and rules are customized to meet the needs of various business scenarios. By automatically generating high-quality reports, it helps enterprises to better analyze data, support decision making and strategic planning, and thus realize the intelligent generation of online reports and improve the accuracy of report generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0025] Figure 1 A schematic diagram of an embodiment of a method for generating a report in an embodiment of the present application;

[0026] Figure 2 It is a schematic diagram of an embodiment of a report generation device in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The present application embodiment provides a method, device, equipment and storage medium for generating a report. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In one embodiment of the report generation method of the present application, the report generation method includes:

[0029] Step S101, obtaining multiple internal data sources and constructing an internal data warehouse through the multiple internal data sources, and at the same time, obtaining multiple external data sources and constructing an external data warehouse through the multiple external data sources;

[0030] It is understandable that the execution subject of the present application may be a report generating device, or a terminal or a server, which is not limited here. The present application embodiment is described by taking a server as the execution subject as an example.

[0031] Specifically, internal data is obtained from internal systems such as enterprise resource planning (ERP) systems, customer relationship management (CRM) systems, and other business management systems through various data collection technologies and interfaces, such as API calls, database connections, and file transfers. These data include sales records, customer interaction data, financial information, etc., involving various formats such as structured data tables, text files, or real-time streaming data. For external data sources, pay attention to market trends, social media information, public databases, and industry reports. These data come from third-party data providers, public data sets, or online social platforms, and are in the form of unstructured or semi-structured data, such as text, images, videos, or data obtained by web crawlers. Data preprocessing is performed, including data cleaning, format conversion, data deduplication, and normalization, to ensure data quality and consistency. Using modern data warehouse technologies, such as big data platforms such as Apache Hadoop or Apache Spark, design a reasonable data model based on the characteristics and usage requirements of the data, select an appropriate storage format (such as HDFS, Parquet, or NoSQL database), and implement effective data partitioning and indexing strategies to improve data access efficiency. These data warehouses not only need to support efficient data reading and writing operations, but also provide good scalability and fault tolerance to adapt to the growing and changing data volume. After building internal and external data warehouses, regular or real-time data synchronization mechanisms are used to keep the data warehouse data updated to ensure that the report generation system can access the latest and most complete data resources.

[0032] Step S102: Acquire multiple data processing tasks, and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse;

[0033] Specifically, multiple data processing tasks are obtained, which involve data classification, aggregation, prediction or other forms of data operations. Data processing feature analysis is performed on each data processing task, including identifying the data type, data source, data volume, processing frequency and expected output required for the task, and a comprehensive and detailed data processing feature set is constructed. Based on the feature set, the internal data warehouse and the external data warehouse are analyzed for relationship strength to evaluate and quantify the correlation between the data processing task and the data in the data warehouse. For example, a task needs to focus on customer transaction data, and the proportion and relevance of this data in the internal data warehouse will determine its relationship strength, thereby obtaining a set of target relationship strength data, which characterizes the degree of correlation between the data processing task and different data sets in the data warehouse. Based on the target relationship strength data, a graph database algorithm is used to generate a corresponding task knowledge graph for each data processing task. At this stage, the algorithm constructs a graph structure in which nodes represent data entities (such as specific data sets, data fields, etc.) and edges represent the relationships between them (such as associations, dependencies, etc.). In this way, the knowledge graph of each task not only reflects the data entities and their attributes required for the task, but also reveals the complex relationships between these entities.

[0034] Step S103: Obtain task entities and attribute relationships of the task knowledge graph, and create data extraction logic for each data processing task based on the task entities and attribute relationships;

[0035] Specifically, the task knowledge graph is parsed for entities and relationships. The nodes (task entities) and their attributes in the graph are identified, and the relationships between the nodes, such as data dependencies, association rules, etc., are clarified to obtain a clear structure diagram that contains all relevant entities and their interactions. Based on these parsed task entities and attribute relationships, the initial extraction logic is matched for each data processing task. The entities and relationships in the task knowledge graph are mapped to specific data operations. For example, if an entity represents specific customer data and has a strong association with sales data, the corresponding data extraction logic will include extracting these two types of data from the database and performing association analysis. For each data processing task, a data extraction impact score is performed according to its initial extraction logic. The effectiveness and efficiency of the initial extraction logic are evaluated, that is, how the logic performs in actual operations and whether it can accurately and quickly extract the required data. This scoring process involves multiple indicators, including the accuracy, speed, and resource consumption of data extraction. In this way, an objective and quantitative data extraction impact score is obtained, which provides a basis for further logic optimization. According to the data extraction impact score, the initial extraction logic is optimized. This includes adjusting data query parameters, optimizing data processing procedures, improving data extraction algorithms, etc. For example, if the score of a data extraction logic shows that its processing speed is slow, it is necessary to increase the speed by introducing more efficient data indexes, using faster query algorithms, or adjusting data processing procedures. In this way, the data extraction logic of each data processing task is repeatedly tested and optimized, and finally an efficient, accurate and reliable data extraction strategy is formed.

[0036] Step S104, querying the report generation request to be processed, and generating a plurality of report data to be filled in the report generation request according to the data extraction logic;

[0037] Specifically, query and identify pending report generation requests, and obtain requests from the user interface, automated task scheduling, or API calls. Perform request parsing to determine the target request address. The target request address contains important information about the required report type, data range, time interval, etc., which will directly affect the subsequent data extraction logic. According to the parsed target request address, determine the data extraction logic associated with the report generation request. This logic is customized based on the task knowledge graph created earlier, and is designed to ensure that the most relevant and accurate data is extracted from internal and external data warehouses. For example, if the report is about sales analysis for a specific time period, the data extraction logic will focus on extracting sales data and related customer information within the corresponding time range. According to the data extraction logic, classify the data involved in the report generation request and generate multiple initial data streams. These initial data streams include structured data such as database tables, semi-structured data such as log files, or unstructured data such as text descriptions. Perform data formatting and preprocessing on the initial data stream to generate multiple report data to be filled in the report generation request. By cleaning, converting, and standardizing data, we ensure that the data format meets the requirements of the report template and that the data quality is sufficient to support accurate analysis and decision-making. For example, data cleaning includes removing duplicate records and correcting incorrect input, while data conversion involves converting text dates into a unified format or refining unstructured data into structured data.

[0038] Step S105: Calculate the target report interactive element of each report data to be filled according to the preset task report template, and fill and publish the report data of multiple report data to be filled based on the target report interactive element to obtain an initial online report;

[0039] Specifically, obtain the pre-configured report structure, layout, and style. These configurations determine the appearance and user interaction of the report and are the basis of the entire report design. The report structure defines how the data is organized, for example, it specifies which data is displayed as a table, chart, or text block; the report layout determines the position and size of these elements on the page; and the report style involves color schemes, font selection, and other visual elements to ensure that the report is both beautiful and easy to read. Calculate the data relevance of each report data to be filled. Analyze the relationship between the data and how to effectively present the data in the report. For example, if a data set shows the change in sales over time, the interactive element related to it is a time series chart. The calculation of data relevance is based not only on the nature of the data itself, but also on the needs of users and the expected use of the report to ensure that the selected interactive elements can effectively convey the required information. According to the target report interactive elements, fill and publish data for multiple report data to be filled respectively to obtain the initial online report. Inject the processed data into the previously defined report template to ensure that each data element is correctly displayed in its predetermined position. While filling the data, apply preset styles, such as adjusting the color of the chart or changing the font of the text, to improve the overall appearance and readability of the report. In addition, interactive elements such as drop-down menus, sliders or data filters will also be integrated into the report to provide a richer user interaction experience.

[0040] Step S106: perform anomaly detection on the report data filling and publishing process of the initial online report to obtain a target filling and publishing anomaly value set, and input the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy;

[0041] Specifically, anomaly detection is performed on the report data filling and publishing process of the initial online report. Data analysis technology is used to monitor and identify any abnormal patterns or data inconsistencies that occur during data filling and publishing, thereby obtaining initial anomaly detection data. Time series information association processing is performed on the initial anomaly detection data to identify the time series relationship between the abnormal data, as well as the time point and duration of the anomaly. Deep learning-driven anomaly detection is performed on the time series anomaly detection data through a preset cyclic variational autoencoder. The cyclic variational autoencoder is an advanced machine learning model that is suitable for processing time series data and can effectively identify abnormal patterns and data inconsistencies, thereby obtaining a target filling and publishing anomaly value set. The target filling and publishing anomaly value set is encoded and mapped, and the anomaly data is converted into multiple target filling and publishing anomaly encoding values, and the anomaly data is converted into a format that is more suitable for processing by the machine learning model. The anomaly encoding value is vectorized to generate a target filling and publishing anomaly state vector. These vectors are mathematical representations of the anomaly and provide actionable input data for the subsequent optimization analysis. The anomaly state vector is input into a preset report generation strategy optimization model, which includes multiple decision trees and genetic algorithm layers. This model combines decision tree analysis and genetic algorithms to form a composite policy optimization framework. Through multiple decision trees, the target filling and release abnormal state vectors are analyzed in detail. Each decision tree examines the data from a different perspective, resulting in a series of preliminary report generation policy optimization solutions, which are considered as the first report optimization strategy. The first report optimization strategy is input into the genetic algorithm layer for further optimization. In the genetic algorithm layer, each strategy is regarded as an individual, and through the population initialization and strategy optimization process, natural selection and genetic mechanisms are imitated to produce more adaptive strategies. This process includes crossover, mutation and selection of strategies, and the effectiveness of strategies is continuously improved through an iterative process, and finally a series of optimized second report optimization strategies are generated. The second report optimization strategy is solved for policy optimization to find the best solution from a series of optimization strategies. This involves evaluating the effectiveness of each strategy, such as accuracy, efficiency and feasibility, and comparing them.

[0042] Step S107: Generate multiple visualized online reports corresponding to the report data to be filled according to the target report optimization strategy and the task report template.

[0043] Specifically, according to the target report optimization strategy and task report template, each report data to be filled is optimized. This includes adjusting and optimizing the format, arrangement, and display mode of the report data to ensure that the data can be presented in the report in the most suitable way. For example, the optimization process involves changing the display position of certain data blocks, or adjusting the size and type of charts to better display data trends. The optimized target filling report data is dynamically adjusted and the report is visualized. Dynamic adjustment is to ensure that the report data can reflect the latest information and trends, which involves updating charts or adjusting the format of data display according to real-time data. Report visualization analysis converts this data into intuitive and easy-to-understand charts and graphs to help users better analyze and understand the data. When performing report visualization analysis, consider the impact of data presentation on user understanding, and use various charts, color coding and interactive elements to enhance the readability and interactivity of the report. Generate multiple visual online reports corresponding to the report data to be filled. These reports not only accurately reflect the guiding ideology of the optimization strategy, but also make the reports both information-rich and easy for users to understand and operate through carefully designed layouts and visualization elements.

[0044] In the embodiment of the present application, by acquiring and integrating multiple internal and external data sources, internal and external data warehouses are constructed, which helps to realize centralized management and unified access of data and improves the availability and consistency of data. By generating task knowledge graphs and data extraction logic, the automated description and planning of data processing tasks are realized, and the efficiency and accuracy of data processing are improved. Reports are dynamically generated according to preset task report templates, and the report content is automatically adjusted according to data changes, making report generation more flexible and adaptive. Through anomaly detection and report generation strategy optimization, data anomalies can be identified and processed in a timely manner, improving the credibility and data quality of reports. By calculating the interactive elements of the target report, visual online reports are generated, which enhances the readability and user experience of the report and makes it easier for decision makers to understand the data. The workload of manual data processing and report generation is reduced, efficiency is improved, and the risk of manual errors is reduced. According to different task requirements and data source characteristics, the report generation process and rules are customized to meet the needs of various business scenarios. By automatically generating high-quality reports, it helps enterprises to better analyze data, support decision making and strategic planning, and thus realize the intelligent generation of online reports and improve the accuracy of report generation.

[0045] In a specific embodiment, the process of executing step S102 may specifically include the following steps:

[0046] (1) obtaining multiple data processing tasks, and performing data processing feature analysis on each data processing task to obtain a data processing feature set for each data processing task;

[0047] (2) According to the data processing feature set of each data processing task, the relationship strength analysis is performed on the internal data warehouse and the external data warehouse to obtain the target relationship strength data;

[0048] (3) Based on the target relationship strength data, the graph database algorithm is used to generate the task knowledge graph for each data processing task.

[0049] Specifically, multiple data processing tasks are obtained from various data sources, ranging from simple data queries to complex data analysis and prediction. Each task requires detailed feature analysis to determine its key parameters, such as data source, data type, processing frequency, required processing algorithm, and expected output format. For example, a data processing task involves extracting sales data for a specific time period from an internal database and combining it with market trend data from an external data source to predict future sales trends. The feature set of the task includes the time range of sales data, data granularity, associated market trend indicators, etc. The relationship strength analysis is performed on the data in the internal data warehouse and the external data warehouse based on the feature set. The correlation and importance between the task features and the data in the data warehouse are evaluated to determine which data is most critical to completing the task. For example, this includes analyzing the correlation between sales data and market trend indicators, and determining the importance of these data in the prediction model. This analysis helps to optimize the data extraction process and ensure that only the most important data sets are focused on to complete the task. Based on the relationship strength data, a graph database algorithm is used to generate a task knowledge graph for each data processing task. The task knowledge graph is presented in a graphical form, where nodes represent data entities, such as specific data sets or data fields, and edges represent relationships between entities, such as dependencies or correlations between data. For example, the knowledge graph contains nodes representing different sales data sets, and edges representing the association of these data sets with market trend indicators.

[0050] In a specific embodiment, the process of executing step S103 may specifically include the following steps:

[0051] (1) Perform entity and relationship analysis on the task knowledge graph to obtain task entities and attribute relationships;

[0052] (2) According to the task entities and attribute relationships, the initial extraction logic of each data processing task is matched;

[0053] (3) Performing a data extraction impact score on each data processing task according to the initial extraction logic to obtain a data extraction impact score value of the initial extraction logic;

[0054] (4) The initial extraction logic is optimized according to the data extraction impact score to obtain the data extraction logic for each data processing task.

[0055] Specifically, perform entity and relationship analysis on the task knowledge graph. The task knowledge graph is a data structure containing a large number of entities and complex relationships between these entities. Entities refer to nodes in the graph, which can be any specific data points, such as individuals, places, events, etc. Relationships are edges connecting these entities, representing various connections between entities. Use natural language processing (NLP) technology and graph database technology to identify and understand these entities and the attribute relationships between them. Use algorithms such as entity recognition and relationship extraction to ensure that each entity and relationship can be accurately identified and understood. Match the initial extraction logic of each data processing task based on the entity and attribute relationships in the task knowledge graph. Map the entities and relationships in the graph to specific data processing tasks. Clarify the specific requirements of each data processing task, and then extract relevant entities and relationships from the graph based on these requirements. Perform data extraction impact scoring on each data processing task. The scoring process usually involves a comprehensive evaluation of the accuracy, completeness and efficiency of the extraction logic. Simulate the data extraction process or run the extraction logic on a real data set, and then evaluate its performance through a series of quantitative indicators (such as accuracy, recall, response time, etc.). Finally. The initial extraction logic is optimized according to the data extraction impact score to obtain the data extraction logic for each data processing task. The extraction logic is adjusted and improved based on the scoring results and task requirements. The optimization measures include adjusting the entity recognition algorithm to improve accuracy, redefining the relationship between entities to reflect more complex or hidden connections, or optimizing the query strategy to improve the efficiency and response speed of data extraction. This process requires multiple iterations, each time adjusting and improving the logic based on the previous scoring results.

[0056] In a specific embodiment, the process of executing step S104 may specifically include the following steps:

[0057] (1) Query the pending report generation request, and perform request parsing on the report generation request to obtain the target request address;

[0058] (2) Determine the data extraction logic corresponding to the report generation request based on the target request address;

[0059] (3) According to the data extraction logic, the report generation request is classified to obtain multiple initial data streams;

[0060] (4) Performing data formatting and preprocessing on the multiple initial data streams to generate multiple report data to be filled in for the report generation request.

[0061] Specifically, query and identify all pending report generation requests. These requests come from different users or systems and contain specific requirements for generating reports. Each request usually contains a target request address, which determines the data source and related parameters corresponding to the request. In order to process these requests, request parsing is performed to extract the target request address and other related information from each request, such as the time range of the request, data classification, etc. According to the target request address, the corresponding data extraction logic is determined. Different request addresses correspond to different data sources and even different types of data processing logic. For example, one request address points to an internal sales database, while another points to an external market research report. Each data source has its own specific data structure and access method. According to the data extraction logic, data is classified for report generation requests. Based on the information in the request and the characteristics of the data source, the data is divided into different categories for more efficient processing. For example, for a request to generate a sales report, the data is classified into sales, customer type, region, etc. After completing the data classification, data formatting and preprocessing are performed. Data formatting refers to converting data from different data sources into a unified format for easy processing and display. Preprocessing includes steps such as cleaning data, handling missing values, and data normalization to ensure data quality and consistency. These formatted and preprocessed data streams will become the basis for generating reports. These data will be filled into the corresponding reports according to the report template and user needs to generate the final report.

[0062] In a specific embodiment, the process of executing step S105 may specifically include the following steps:

[0063] (1) Obtaining a pre-configured report structure, report layout, and report style, and defining a task report template according to the report structure, report layout, and report style;

[0064] (2) Calculate the data relevance corresponding to each report data to be filled, and determine the corresponding target report interactive element according to the data relevance;

[0065] (3) Based on the interactive elements of the target report, multiple report data to be filled are filled and published respectively to obtain an initial online report.

[0066] Specifically, get the pre-configured report structure, report layout, and report style. These configurations are the basis of report design, and they define the basic framework and visual presentation of the report. Report structure involves how data is organized and displayed, such as whether to organize data by time series, geographic location, or other dimensions. Report layout refers to how data and charts are arranged on the page and the spatial relationship between them. Report style involves color schemes, font selection, and other visual elements. Calculate the data relevance corresponding to each report data to be filled. Data relevance refers to the degree and pattern of association between data, which helps determine which information in the report should be highlighted and how to display this information. For example, if the data shows that there is a strong correlation between sales and a marketing campaign, then this relationship should be displayed in the report. Calculating data relevance usually involves complex statistical analysis and data mining techniques to find important patterns and trends in the data. Based on the calculated data relevance, determine the corresponding target report interactive elements. These interactive elements include charts, sliders, drop-down menus, etc., which not only make the information display of the report more intuitive, but also allow users to interact with the report, such as filtering specific data views or deepening a data point. Based on the interactive elements of the target report, the report data to be filled is populated and published to generate the initial online report. The processed data is filled into the report according to the structure and style defined in the report template. Data filling must not only ensure the accuracy and completeness of the data, but also ensure that the data is displayed in a way that is consistent with the user's expectations and the design goals of the report. For example, the system will display sales data in the form of a time series graph, and provide an interactive element so that users can choose to view sales trends in different time periods. After filling, the report will be published as an online version, and users can access these reports through the network to view and interact with them.

[0067] In a specific embodiment, the process of executing step S106 may specifically include the following steps:

[0068] (1) Perform anomaly detection on the report data filling and publishing process of the initial online report to obtain initial anomaly detection data;

[0069] (2) performing time series information association processing on the initial anomaly detection data to obtain time series anomaly detection data;

[0070] (3) Perform anomaly detection on the time series anomaly detection data through a preset cyclic variational autoencoder to obtain a target filling and release anomaly value set;

[0071] (4) performing coding mapping on the target filling and publishing abnormal value sets to obtain multiple target filling and publishing abnormal coding values;

[0072] (5) performing vector conversion on multiple target filling and publishing abnormal coding values ​​to generate target filling and publishing abnormal state vectors;

[0073] (6) inputting the target filling and publishing abnormal state vectors into a preset report generation strategy optimization model, wherein the report generation strategy optimization model includes: multiple decision trees and a genetic algorithm layer;

[0074] (7) performing report generation strategy optimization analysis on target filling and release abnormal state vectors respectively through multiple decision trees, and obtaining a first report optimization strategy for each decision tree;

[0075] (8) performing group initialization and strategy optimization on the first report optimization strategy of each decision tree through a genetic algorithm layer to generate multiple second report optimization strategies;

[0076] (9) Optimizing the strategies of multiple second report optimization strategies to obtain a target report optimization strategy.

[0077] Specifically, anomaly detection is performed on the report data filling and publishing process of the initial online report to obtain initial anomaly detection data. Any anomalies that occur during the data filling and publishing process, such as data inconsistency, missing or error, are identified. Anomaly detection can be achieved through various statistical methods and machine learning algorithms, for example, using the standard deviation method to identify numerical anomalies, or using classification algorithms to detect deviations in data patterns. After obtaining the initial anomaly detection data, time series information association processing is performed on these data to obtain time series anomaly detection data. The root cause of data anomalies is understood by considering the characteristics of data changing over time. For example, in financial statements, abnormal sales figures in a certain quarter are closely related to market activities in the previous quarter. Time series information association processing usually involves time series analysis and pattern recognition technology. The time series anomaly detection data is further anomaly detected by a preset cyclic variational autoencoder (CVAE). CVAE is a machine learning model that can effectively process and analyze time series data and performs well in identifying implicit patterns and outliers. Through the analysis of CVAE, a target filling and publishing outlier set is obtained, which represents the most problematic part of the report data. After obtaining the set of abnormal values, these values ​​are coded and mapped to obtain target filling and publishing abnormal code values. Code mapping is a process of converting raw data into a format that is easier to handle. For example, in the code mapping process, different types of abnormal values ​​are assigned to different codes so that subsequent analysis can be performed more efficiently. These abnormal code values ​​are vectorized to generate target filling and publishing abnormal state vectors. Vector conversion is a process of converting data into a mathematically manipulable form, which allows the data to be used in various algorithms and models. Through this process, the abnormal data is converted into a set of numerical vectors that can be used in machine learning models. The abnormal state vector is input into a preset report generation strategy optimization model, which includes multiple decision trees and a genetic algorithm layer. Decision tree is a commonly used machine learning method that analyzes data by creating a series of decision paths based on specific conditions. In this embodiment, each decision tree will analyze the abnormal state vector to generate a first report optimization strategy. These strategies are based on specific features of the data and known abnormal patterns, and are intended to identify the most effective data processing and report generation methods. The first report optimization strategy generated by each decision tree is further optimized by the genetic algorithm layer. Genetic algorithm is an optimization technique that imitates natural selection. It iteratively improves the solution by simulating the process of gene mutation and crossover. In this process, the strategy of each decision tree is regarded as an "individual". By combining and mutating these strategies, a series of improved solutions are obtained. This process is repeated until the optimal report optimization strategy is found. The strategy optimization solution is performed on multiple second report optimization strategies to determine which strategies most effectively solve the initial anomaly problem and optimize the overall quality and accuracy of the report.For example, if the system identifies that certain types of data often result in anomalies, the optimization strategy involves more rigorous validation and cleaning of such data. Or, if certain data patterns are found to behave inconsistently at different points in time, the strategy involves adjusting the time frame of data collection or processing.

[0078] In a specific embodiment, the process of executing step S107 may specifically include the following steps:

[0079] (1) According to the target report optimization strategy and the task report template, each report data to be filled is optimized to obtain multiple target filled report data;

[0080] (2) Dynamically adjust multiple target filling report data and perform report visualization analysis to generate multiple visualized online reports corresponding to the report data to be filled.

[0081] Specifically, each report data to be filled is optimized according to the target report optimization strategy and task report template to ensure that the report data is not only accurate but also closely corresponds to the final goal and format of the report. Report optimization strategy includes multiple elements, such as data cleaning, error correction, data conversion, etc., with the purpose of improving the quality and adaptability of data. At the same time, the task report template defines the structure and layout of the report, which guides how the data is displayed in the report. Then, the data of multiple target filled reports are dynamically adjusted and visualized. Dynamic adjustment refers to updating and adjusting the report content according to real-time data and user feedback to ensure that the report can reflect the latest data trends and user needs, and improve the practicality and interactivity of the report. Report visualization analysis involves displaying data in the form of graphics and charts, which not only makes the data easier to understand, but also helps users discover patterns and trends in the data. For example, the system uses a bar chart to show the sales volume of different products, or a heat map to show sales hotspots. The data that has been dynamically adjusted and visualized is filled into the corresponding online report. These reports are interactive, allowing users to explore and analyze according to their needs.

[0082] The above describes the method for generating a report in the embodiment of the present application. The following describes the device for generating a report in the embodiment of the present application. Figure 2 In one embodiment of the report generation device of the present application, an embodiment includes:

[0083] An acquisition module 201 is used to acquire multiple internal data sources and construct an internal data warehouse through the multiple internal data sources, and at the same time, acquire multiple external data sources and construct an external data warehouse through the multiple external data sources;

[0084] A processing module 202 is used to obtain multiple data processing tasks and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse;

[0085] A creation module 203 is used to obtain the task entities and attribute relationships of the task knowledge graph, and create data extraction logic for each data processing task according to the task entities and the attribute relationships;

[0086] A query module 204, used for querying a pending report generation request and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic;

[0087] The calculation module 205 is used to calculate the target report interactive element of each report data to be filled according to the preset task report template, and fill and publish the report data of the multiple report data to be filled based on the target report interactive element to obtain an initial online report;

[0088] The analysis module 206 is used to perform anomaly detection on the report data filling and publishing process of the initial online report, obtain a target filling and publishing anomaly value set, and input the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy;

[0089] The generating module 207 is used to generate a visualized online report corresponding to the plurality of report data to be filled according to the target report optimization strategy and the task report template.

[0090] Through the collaboration of the above components, internal and external data warehouses are built by acquiring and integrating multiple internal and external data sources, which helps to achieve centralized management and unified access to data and improve the availability and consistency of data. By generating task knowledge graphs and data extraction logic, the automatic description and planning of data processing tasks are realized, and the efficiency and accuracy of data processing are improved. Reports are dynamically generated according to the preset task report templates, and the report content is automatically adjusted according to the changes in data, making report generation more flexible and adaptive. Through anomaly detection and report generation strategy optimization, data anomalies can be identified and processed in a timely manner, improving the credibility and data quality of reports. By calculating the interactive elements of the target report, visual online reports are generated, which enhances the readability and user experience of the reports and makes it easier for decision makers to understand the data. The workload of manual data processing and report generation is reduced, efficiency is improved, and the risk of manual errors is reduced. According to different task requirements and data source characteristics, the report generation process and rules are customized to meet the needs of various business scenarios. The automatic generation of high-quality reports helps enterprises to better conduct data analysis, support decision making and strategic planning, and thus realize the intelligent generation of online reports and improve the accuracy of report generation.

[0091] The present application also provides a report generation device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the report generation method in the above-mentioned embodiments.

[0092] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the report generation method.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0095] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating a report, characterized in that: The report generation method includes: Acquire multiple internal data sources and construct an internal data warehouse through the multiple internal data sources, and at the same time, acquire multiple external data sources and construct an external data warehouse through the multiple external data sources; Acquire multiple data processing tasks, and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse; specifically including: acquire multiple data processing tasks, and perform data processing feature analysis on each data processing task to obtain a data processing feature set for each data processing task; perform relationship strength analysis on the internal data warehouse and the external data warehouse based on the data processing feature set for each data processing task to obtain target relationship strength data; and generate a task knowledge graph for each data processing task based on the target relationship strength data and using a graph database algorithm; Obtaining task entities and attribute relationships of the task knowledge graph, and creating data extraction logic for each data processing task based on the task entities and the attribute relationships; Querying a pending report generation request, and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic; Calculate the target report interactive element of each report data to be filled in according to the preset task report template, and fill and publish the report data of the multiple report data to be filled in respectively based on the target report interactive element to obtain the initial online report; specifically including: obtain the pre-configured report structure, report layout and report style, and define the task report template according to the report structure, the report layout and the report style; calculate the data correlation corresponding to each report data to be filled in, and determine the corresponding target report interactive element according to the data correlation; fill and publish the report data of the multiple report data to be filled in respectively based on the target report interactive element to obtain the initial online report; Performing anomaly detection on the report data filling and publishing process of the initial online report to obtain a target filling and publishing anomaly value set, and inputting the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy; A visual online report corresponding to the plurality of report data to be filled is generated according to the target report optimization strategy and the task report template.

2. The report generation method according to claim 1, characterized in that: The step of obtaining the task entities and attribute relationships of the task knowledge graph, and creating data extraction logic for each data processing task according to the task entities and the attribute relationships, includes: Perform entity and relationship analysis on the task knowledge graph to obtain task entities and attribute relationships; According to the task entity and the attribute relationship, respectively matching the initial extraction logic of each data processing task; Performing a data extraction impact score on each data processing task according to the initial extraction logic to obtain a data extraction impact score value of the initial extraction logic; The initial extraction logic is optimized according to the data extraction impact score value to obtain the data extraction logic of each data processing task.

3. The report generation method according to claim 1, characterized in that: The querying of the pending report generation request and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic includes: Querying pending report generation requests, and performing request parsing on the report generation requests to obtain a target request address; Determining, according to the target request address, a data extraction logic corresponding to the report generation request; According to the data extraction logic, data classification is performed on the report generation request to obtain multiple initial data streams; The multiple initial data streams are formatted and preprocessed to generate multiple report data to be filled in the report generation request.

4. The report generation method according to claim 1, characterized in that: The process of filling and publishing the report data of the initial online report is subjected to anomaly detection to obtain a target filling and publishing anomaly value set, and the target filling and publishing anomaly value set is input into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy, including: Performing anomaly detection on the report data filling and publishing process of the initial online report to obtain initial anomaly detection data; Performing time series information association processing on the initial anomaly detection data to obtain time series anomaly detection data; Performing anomaly detection on the time series anomaly detection data through a preset cyclic variational autoencoder to obtain a target filling and release anomaly value set; Performing encoding mapping on the target filling and publishing abnormal value set to obtain a plurality of target filling and publishing abnormal encoding values; Performing vector conversion on the plurality of target filling and publishing exception code values ​​to generate a target filling and publishing exception state vector; Inputting the target filling and publishing abnormal state vector into a preset report generation strategy optimization model, wherein the report generation strategy optimization model includes: multiple decision trees and a genetic algorithm layer; Performing report generation strategy optimization analysis on the target filling and release abnormal state vectors respectively through the multiple decision trees to obtain a first report optimization strategy for each decision tree; Performing population initialization and strategy optimization on the first report optimization strategy of each decision tree through the genetic algorithm layer to generate multiple second report optimization strategies; The multiple second report optimization strategies are solved by strategy optimization to obtain a target report optimization strategy.

5. The report generation method according to claim 1, characterized in that: The generating of the plurality of visualized online reports corresponding to the report data to be filled according to the target report optimization strategy and the task report template includes: According to the target report optimization strategy and the task report template, each report data to be filled is optimized to obtain multiple target filled report data; Dynamically adjust the multiple target filling report data and perform report visualization analysis to generate visualized online reports corresponding to the multiple report data to be filled.

6. A report generation device, characterized in that: The report generating device comprises: An acquisition module is used to acquire multiple internal data sources and construct an internal data warehouse through the multiple internal data sources, and at the same time, acquire multiple external data sources and construct an external data warehouse through the multiple external data sources; A processing module is used to obtain multiple data processing tasks, and generate a task knowledge graph for each data processing task based on the internal data warehouse and the external data warehouse; specifically comprising: obtaining multiple data processing tasks, and performing data processing feature analysis on each data processing task to obtain a data processing feature set for each data processing task; performing a relationship strength analysis on the internal data warehouse and the external data warehouse based on the data processing feature set of each data processing task to obtain target relationship strength data; and generating a task knowledge graph for each data processing task based on the target relationship strength data and using a graph database algorithm; A creation module is used to obtain the task entities and attribute relationships of the task knowledge graph, and create data extraction logic for each data processing task based on the task entities and the attribute relationships; A query module, used for querying a pending report generation request and generating a plurality of to-be-filled report data of the report generation request according to the data extraction logic; A calculation module, used to calculate the target report interactive element of each report data to be filled in according to a preset task report template, and fill and publish the report data of the multiple report data to be filled in based on the target report interactive element to obtain an initial online report; specifically including: obtaining a pre-configured report structure, report layout and report style, and defining a task report template according to the report structure, the report layout and the report style; calculating the data correlation corresponding to each report data to be filled in, and determining the corresponding target report interactive element according to the data correlation; filling and publishing the report data of the multiple report data to be filled in based on the target report interactive element to obtain an initial online report; An analysis module is used to perform anomaly detection on the report data filling and publishing process of the initial online report, obtain a target filling and publishing anomaly value set, and input the target filling and publishing anomaly value set into a preset report generation strategy optimization model to perform report generation strategy optimization analysis to obtain a target report optimization strategy; A generating module is used to generate a visual online report corresponding to the plurality of report data to be filled according to the target report optimization strategy and the task report template.

7. A report generation device, characterized in that: The report generation device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the report generation device to execute the report generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the report generation method according to any one of claims 1 to 5 is implemented.