Intelligent report generation method and system based on large model

By using large-scale model technology to analyze user needs, automatically build and optimize reports, the system solves the problem that existing systems cannot understand complex semantics and adjust layouts, achieving efficient and flexible report generation, and improving user experience and enterprise data analysis capabilities.

CN119026580APending Publication Date: 2024-11-26CHINA UNITECHS
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202410876062.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing natural language report generation systems cannot accurately understand complex semantic requirements, cannot automatically adjust report layout and views, and cannot achieve detailed style customization, which limits the system's practicality and flexibility.

Method used

We employ a large-model-based intelligent report generation method that uses pre-trained language models and knowledge graph technology to accurately analyze user needs, automatically build reports, and dynamically optimize them. This includes semantic understanding, knowledge base management, data retrieval and integration, template-driven report generation, and visualization optimization.

Benefits of technology

It improves the efficiency and flexibility of report generation, lowers the barrier to entry, can quickly respond to personalized needs, generate high-quality reports that meet user expectations, and enhances user experience and enterprise data analysis capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026580A_ABST
    Figure CN119026580A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent report generation method and system based on a large model, and the system comprises a semantic understanding module which is used for analyzing various semantic elements in user description, and forming structured semantic representation; the knowledge base management module is used for establishing a knowledge base of report templates, chart types and visual elements and organizing and managing the knowledge base; the data retrieval and integration module is used for forming a data source required by the report by using a keyword search and semantic similarity calculation method according to semantic requirements; the report generation module is used for dynamically assembling elements obtained from a knowledge base and a data source into an initial report by a template engine; and the style customization module is used for analyzing description of a report style by a user by utilizing a natural language understanding technology. According to the intelligent report generation method and system based on the large model, by means of a natural language interaction mode, a user only needs to simply describe requirements, the system can automatically complete most generation steps, and labor cost and time are greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication data, and in particular to a method and system for generating intelligent reports based on a large model. Background Art

[0002] In the current era of big data, the data produced and collected by enterprises and individuals is growing exponentially. How to efficiently extract valuable information from massive data and present it to users in a friendly and intuitive way has always been an important challenge in the field of data analysis. Traditional report generation methods usually require professional data analysts to manually select data sources, design report templates, draw charts, etc. The workflow is cumbersome and complex, and it is difficult to quickly respond to users' personalized needs.

[0003] In order to improve the efficiency and flexibility of report generation, some intelligent report generation technologies based on natural language understanding have emerged in the industry. Such systems allow users to describe report requirements in natural language, and the system automatically extracts relevant data from the data source, generates initial reports, and optimizes and adjusts based on user feedback. Compared with traditional methods, this method greatly shortens the report generation cycle and improves user experience.

[0004] However, existing natural language report generation systems still have some problems, such as the inability to accurately understand complex semantic requirements, the inability to automatically adjust report layouts and views, and the inability to achieve detailed-level style customization, etc. These limit the practicality and flexibility of the system. Summary of the invention

[0005] In order to solve the problems existing in the prior art, the present invention provides an intelligent report generation method and system based on a large model. Through natural language interaction, users only need to simply describe their requirements, and the system can automatically complete most of the generation steps, greatly saving labor costs and time.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] In one embodiment of the present invention, a method for generating an intelligent report based on a large model is proposed, the method comprising:

[0008] S01. Semantic understanding: accurately analyzing the report requirements described by users in natural language and extracting the semantic intent;

[0009] Further, the S01 includes:

[0010] S011. Pre-trained language model: Use transformer-based pre-trained language models, such as BERT or GPT, to encode the user's natural language input to obtain rich semantic feature representations;

[0011] These pre-trained models are pre-trained on large-scale general corpora and can capture complex semantic relationships in language.

[0012] S012. Fine-tuning the pre-trained language model in the reporting field;

[0013] Fine-tuning is model fine-tuning: targeted optimization of the pre-trained model through data in specific fields to improve its performance on specific tasks.

[0014] Furthermore, S012 includes: collecting a large amount of report-related corpus, including user descriptions of reports, dialogue interactions during report generation, etc., and then using the corpus data to fine-tune the pre-trained model.

[0015] In this way, the model can learn semantic knowledge specific to the reporting domain, such as concepts such as dimensions, indicators, view types, and the relationships between them;

[0016] S013. After the first two steps, the language model can accurately identify the semantic elements related to various reports, such as dimensions, indicators, view types, etc., from the user's natural language description, and extract the semantic relationship between the semantic elements to form a structured semantic representation.

[0017] This semantic representation can not only accurately capture user needs, but also facilitate knowledge retrieval and report generation in subsequent modules.

[0018] S02. Knowledge base maintenance and management report-related knowledge base, including report templates, chart types, visual elements, etc. The knowledge base is organized and managed in the form of knowledge graph, which can effectively express the semantic relationship between various report elements;

[0019] Further, the S02 includes:

[0020] S021. Knowledge graph construction: collect and organize a large amount of report-related knowledge, including the structure of various report templates, common chart types and their characteristics, commonly used visual elements and their attributes, etc., and construct the collected and organized knowledge into a report domain knowledge graph in the form of entity-relationship;

[0021] S022. Semantic matching: When the user's semantics is structured, the knowledge base uses semantic matching technology based on the knowledge graph to retrieve report elements that meet the user's needs.

[0022] Semantic matching technology, semantic matching technology based on knowledge graph is an existing technology. This technology uses knowledge graph to organize and manage report-related knowledge, and performs semantic matching through algorithms such as graph neural networks to quickly locate and retrieve report elements that meet user needs. This is an advanced application in the field of intelligent report generation.

[0023] The specific approach is to first convert the user's semantic representation into a query pattern in the knowledge graph, and then use the semantic matching algorithm based on the graph neural network to find the most relevant report templates, chart types, visual elements, etc. in the knowledge graph, and return them to the report generation module for use.

[0024] This semantic matching method based on knowledge graph can better understand the semantic characteristics of the reporting field and improve the accuracy and efficiency of retrieval.

[0025] S03, data retrieval and integration, based on the user needs of semantic extraction, using the data source information stored in the knowledge base, retrieve and obtain relevant data from the dataset warehouse;

[0026] A dataset warehouse is usually provided by an enterprise or the user himself. It contains all data sources that can be used for report generation. These data may be stored in different databases or cloud storage services.

[0027] Further, the S03 includes:

[0028] S031. Data source identification: using the knowledge base to retrieve data source information related to user needs, including the location, type, structure and other data of the data source;

[0029] S032. Semantic query generation: Generate corresponding query statements, such as SQL, NoSQL, etc., based on the semantic representation of user requirements and data source information, to accurately extract required data from the data source;

[0030] S033. Data acquisition and integration. Use the generated query statements to obtain raw data from the corresponding dataset warehouse.

[0031] Furthermore, if the data in S033 comes from multiple heterogeneous data sources, data conversion, merging and other processing are performed to form a unified normalized data set as a data source input for report generation.

[0032] Through this semantic-based intelligent data retrieval and integration method, the system can automatically identify the data source corresponding to user needs and generate efficient query methods to obtain data from it, providing high-quality data support for report generation and improving the overall intelligence level of data acquisition.

[0033] S04. Combine the demand information extracted by semantic understanding with the report elements retrieved from the knowledge base, as well as the data source retrieved and integrated, to automatically construct the initial report, and dynamically optimize it based on user feedback;

[0034] S05. The user customizes the visual style of the report through natural language and applies the customization to the report.

[0035] In one embodiment of the present invention, a large model-based intelligent report generation system is also proposed, and the device includes:

[0036] The semantic understanding module uses advanced natural language processing technology and a deep learning-based transformer model to accurately parse various semantic elements in user descriptions and extract the relationships between them to form a structured semantic representation.

[0037] Furthermore, the semantic elements include: dimensions, indicators, view types, etc.

[0038] Knowledge base management module, which builds a knowledge base of report templates, chart types, visual elements, etc., and uses knowledge graph technology to organize and manage the knowledge base;

[0039] Furthermore, the knowledge base management module retrieves report elements that meet user needs from the knowledge base through semantic matching;

[0040] The data retrieval and integration module uses keyword search, semantic similarity calculation and other methods to quickly find relevant data from the prepared data set according to semantic requirements, and performs necessary cleaning and integration to form the data source required for the report;

[0041] Furthermore, the semantic requirement is derived from a natural language description of the user.

[0042] The report generation module uses template engine technology and visualization engine. The template engine technology dynamically assembles the elements obtained from the knowledge base and data source into the initial report. At the same time, the visualization engine automatically optimizes the layout and view of the report based on user feedback.

[0043] The style customization module uses natural language understanding technology to parse the user's description of the report style.

[0044] In one embodiment of the present invention, a computer device is also proposed, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the aforementioned large model-based intelligent report generation method is implemented.

[0045] In one embodiment of the present invention, a computer-readable storage medium is also proposed, which stores a computer program for executing a large model-based intelligent report generation method.

[0046] Beneficial effects:

[0047] The present invention provides a large-model-based intelligent report generation method and system, which can accurately understand the natural language needs of users, intelligently obtain the required elements from the knowledge base and data source, automatically build an initial report, and continuously optimize according to user feedback, and finally generate report results that meet personalized needs. This greatly improves the efficiency of report generation and user experience, and brings significant practical value to enterprises and individual users.

[0048] The present invention greatly improves the efficiency of report generation. Through natural language interaction, users only need to simply describe their needs, and the system can automatically complete most of the generation steps, greatly saving labor costs and time. The present invention lowers the threshold for report generation and adopts natural language interaction. Ordinary users can also easily customize the required reports without having to master complex report tools, which significantly lowers the usage threshold.

[0049] The present invention improves the flexibility of report generation. Based on a unified knowledge base and data integration technology, it can quickly respond to report requirements of various dimensions and indicators. The generated report types, views and styles can also be dynamically adjusted according to the requirements, and the flexibility is greatly improved. The present invention optimizes the report visual experience system and has a built-in visualization optimization engine, which can automatically and intelligently adjust the layout, charts, etc. of the report to make it meet the needs described by the user and have professional visualization effects, thereby improving the user's visual experience. The present invention promotes the digital transformation of enterprises. It provides a powerful tool for efficient analysis and visualization of enterprise data assets, which can greatly improve the ability of enterprises to discover insights from massive data, promote the process of digital transformation of enterprises, and enhance competitiveness. The present invention breaks through the obstacles and bottlenecks of traditional report generation, and realizes the automation, intelligence and personalization of report generation through the innovative application of natural language interaction and intelligent technology, which brings significant practical value to enterprises and individual users and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flow chart of the intelligent report generation method based on a large model of the present invention;

[0051] Figure 2 It is a schematic diagram of the structure of the intelligent report generation system based on the big model of the present invention;

[0052] Figure 3 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0054] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0055] According to the implementation mode of the present invention, a method and system for intelligent report generation based on a large model are proposed. Through natural language interaction, users only need to simply describe their requirements, and the system can automatically complete most of the generation steps, greatly saving labor costs and time.

[0056] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.

[0057] like Figure 1 As shown, the present invention relates to a method for generating an intelligent report based on a large model, the method comprising:

[0058] S01. Semantic understanding: accurately analyzing the report requirements described by users in natural language and extracting the semantic intent;

[0059] The S01 includes:

[0060] S011. Pre-trained language model: Use transformer-based pre-trained language models, such as BERT or GPT, to encode the user's natural language input to obtain rich semantic feature representations;

[0061] These pre-trained models are pre-trained on large-scale general corpora and can capture complex semantic relationships in language.

[0062] S012. Fine-tuning the pre-trained language model in the reporting field;

[0063] Fine-tuning is model fine-tuning: targeted optimization of the pre-trained model through data in specific fields to improve its performance on specific tasks.

[0064] The S012 includes: collecting a large amount of report-related corpus, including user descriptions of reports, dialogue interactions during report generation, etc., and then using the corpus data to fine-tune the pre-trained model.

[0065] In this way, the model can learn semantic knowledge specific to the reporting domain, such as concepts such as dimensions, indicators, view types, and the relationships between them;

[0066] S013. After the first two steps, the language model can accurately identify the semantic elements related to various reports, such as dimensions, indicators, view types, etc., from the user's natural language description, and extract the semantic relationship between the semantic elements to form a structured semantic representation.

[0067] This semantic representation can not only accurately capture user needs, but also facilitate knowledge retrieval and report generation in subsequent modules.

[0068] S02. Knowledge base maintenance and management report-related knowledge base, including report templates, chart types, visual elements, etc. The knowledge base is organized and managed in the form of knowledge graph, which can effectively express the semantic relationship between various report elements;

[0069] The S02 includes:

[0070] S021. Knowledge graph construction: collect and organize a large amount of report-related knowledge, including the structure of various report templates, common chart types and their characteristics, commonly used visual elements and their attributes, etc., and construct the collected and organized knowledge into a report domain knowledge graph in the form of entity-relationship;

[0071] S022. Semantic matching: When the user's semantics is structured, the knowledge base uses semantic matching technology based on the knowledge graph to retrieve report elements that meet the user's needs.

[0072] Semantic matching technology, semantic matching technology based on knowledge graph is an existing technology. This technology uses knowledge graph to organize and manage report-related knowledge, and performs semantic matching through algorithms such as graph neural networks to quickly locate and retrieve report elements that meet user needs. This is an advanced application in the field of intelligent report generation.

[0073] The specific approach is to first convert the user's semantic representation into a query pattern in the knowledge graph, and then use the semantic matching algorithm based on the graph neural network to find the most relevant report templates, chart types, visual elements, etc. in the knowledge graph, and return them to the report generation module for use.

[0074] This semantic matching method based on knowledge graph can better understand the semantic characteristics of the reporting field and improve the accuracy and efficiency of retrieval.

[0075] S03, data retrieval and integration, based on the user needs of semantic extraction, using the data source information stored in the knowledge base, retrieve and obtain relevant data from the dataset warehouse;

[0076] A dataset warehouse is usually provided by an enterprise or the user himself. It contains all data sources that can be used for report generation. These data may be stored in different databases or cloud storage services.

[0077] The S03 includes:

[0078] S031. Data source identification: using the knowledge base to retrieve data source information related to user needs, including the location, type, structure and other data of the data source;

[0079] S032. Semantic query generation: Generate corresponding query statements, such as SQL, NoSQL, etc., based on the semantic representation of user requirements and data source information, to accurately extract required data from the data source;

[0080] S033. Data acquisition and integration. Use the generated query statements to obtain raw data from the corresponding dataset warehouse.

[0081] If the data in S033 comes from multiple heterogeneous data sources, data conversion, merging and other processing are performed to form a unified normalized data set as a data source input for report generation.

[0082] Through this semantic-based intelligent data retrieval and integration method, the system can automatically identify the data source corresponding to user needs and generate efficient query methods to obtain data from it, providing high-quality data support for report generation and improving the overall intelligence level of data acquisition.

[0083] S04. Combine the demand information extracted by semantic understanding with the report elements retrieved from the knowledge base, as well as the data source retrieved and integrated, to automatically construct the initial report, and dynamically optimize it based on user feedback;

[0084] S05. The user customizes the visual style of the report through natural language and applies the customization to the report.

[0085] It should be noted that, although the operations of the method of the present invention are described in a specific order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0086] In order to explain the above-mentioned large model-based intelligent report generation method more clearly, it is described in conjunction with a specific embodiment below. However, it is worth noting that this embodiment is only for better illustrating the present invention and does not constitute an improper limitation to the present invention.

[0087] S01. Semantic understanding: accurately analyzing the report requirements described by users in natural language and extracting the semantic intent;

[0088] The S01 includes:

[0089] S011. Pre-trained language model: Use transformer-based pre-trained language models, such as BERT or GPT, to encode the user's natural language input to obtain rich semantic feature representations;

[0090] These pre-trained models are pre-trained on large-scale general corpora and can capture complex semantic relationships in language.

[0091] S012. Fine-tuning the pre-trained language model in the reporting field;

[0092] Fine-tuning is model fine-tuning: targeted optimization of the pre-trained model through data in specific fields to improve its performance on specific tasks.

[0093] The S012 includes: collecting a large amount of report-related corpus, including user descriptions of reports, dialogue interactions during report generation, etc., and then using the corpus data to fine-tune the pre-trained model.

[0094] In this way, the model can learn semantic knowledge specific to the reporting domain, such as concepts such as dimensions, indicators, view types, and the relationships between them;

[0095] S013. After the first two steps, the language model can accurately identify the semantic elements related to various reports, such as dimensions, indicators, view types, etc., from the user's natural language description, and extract the semantic relationship between the semantic elements to form a structured semantic representation.

[0096] This semantic representation can not only accurately capture user needs, but also facilitate knowledge retrieval and report generation in subsequent modules.

[0097] For example, if the user inputs "put the quarter dimension in the row, the product category in the column, and display the profit margin indicator", the semantic understanding module will recognize that "quarter" is a dimension, "product category" is another dimension, and "profit margin" is an indicator, and extract the arrangement relationship between them. Finally, the following structured semantic representation is formed:

[0098]

[0099]

[0100] S02. Knowledge base maintenance and management report-related knowledge base, including report templates, chart types, visual elements, etc. The knowledge base is organized and managed in the form of knowledge graph, which can effectively express the semantic relationship between various report elements;

[0101] The S02 includes:

[0102] S021. Knowledge graph construction: collect and organize a large amount of report-related knowledge, including the structure of various report templates, common chart types and their characteristics, commonly used visual elements and their attributes, etc., and construct the collected and organized knowledge into a report domain knowledge graph in the form of entity-relationship;

[0103] For example, a knowledge graph can have chart type entities such as "bar chart" and "line chart", as well as visual element entities such as "x-axis", "y-axis", and "legend", which are connected through semantic relationships such as "applicable to" and "contains".

[0104] S022. Semantic matching: When the user's semantics is structured, the knowledge base uses semantic matching technology based on the knowledge graph to retrieve report elements that meet the user's needs.

[0105] Semantic matching technology, semantic matching technology based on knowledge graph is an existing technology. This technology uses knowledge graph to organize and manage report-related knowledge, and performs semantic matching through algorithms such as graph neural networks to quickly locate and retrieve report elements that meet user needs. This is an advanced application in the field of intelligent report generation.

[0106] The specific approach is to first convert the user's semantic representation into a query pattern in the knowledge graph, and then use the semantic matching algorithm based on the graph neural network to find the most relevant report templates, chart types, visual elements, etc. in the knowledge graph, and return them to the report generation module for use.

[0107] This semantic matching method based on knowledge graph can better understand the semantic characteristics of the reporting field and improve the accuracy and efficiency of retrieval.

[0108] S03, data retrieval and integration, based on the user needs of semantic extraction, using the data source information stored in the knowledge base, retrieve and obtain relevant data from the dataset warehouse;

[0109] A dataset warehouse is usually provided by an enterprise or the user himself. It contains all data sources that can be used for report generation. These data may be stored in different databases or cloud storage services.

[0110] The S03 includes:

[0111] S031. Data source identification: using the knowledge base to retrieve data source information related to user needs, including the location, type, structure and other data of the data source;

[0112] S032. Semantic query generation: Generate corresponding query statements, such as SQL, NoSQL, etc., based on the semantic representation of user requirements and data source information, to accurately extract required data from the data source;

[0113] S033. Data acquisition and integration. Use the generated query statements to obtain raw data from the corresponding dataset warehouse.

[0114] If the data in S033 comes from multiple heterogeneous data sources, data conversion, merging and other processing are performed to form a unified normalized data set as a data source input for report generation.

[0115] Through this semantic-based intelligent data retrieval and integration method, the system can automatically identify the data source corresponding to user needs and generate efficient query methods to obtain data from it, providing high-quality data support for report generation and improving the overall intelligence level of data acquisition.

[0116] S04. Combine the demand information extracted by semantic understanding with the report elements retrieved from the knowledge base, as well as the data source retrieved and integrated, to automatically construct the initial report, and dynamically optimize it based on user feedback;

[0117] Template-driven report generation uses template-based report generation technology. Specifically, it retrieves the appropriate report template from the knowledge base based on the structured demand information provided by semantic understanding, and then dynamically fills the data source provided by data retrieval and integration into the template to generate the initial report.

[0118] Report templates are pre-defined in a structured format (such as XML or JSON), and contain the basic framework of the report, such as row and column structure, chart types, visual elements, etc. The report generation module parses these templates and uses template engine technology, such as Jinja2 or Handlebars, to dynamically insert data into the template to generate the final report presentation.

[0119] This template-based approach has the following advantages:

[0120] Strong flexibility: The report template can define various commonly used report structures in advance, and the report generation module only needs to dynamically select the appropriate template according to user needs, reducing development costs.

[0121] Good scalability: When new reporting requirements arise, you only need to add the corresponding report template without modifying the core algorithm for report generation.

[0122] High execution efficiency: Template-driven report generation has low computational overhead and can quickly respond to user needs.

[0123] Automatically optimize report layout and view In addition to generating initial reports based on templates, the report generation module also integrates a visualization engine that can dynamically optimize the report layout and view based on user feedback.

[0124] For example, when a user puts forward the requirement of "putting the quarter dimension in the rows and the product category in the columns", the report generation module will adjust the row and column structure of the report, putting the "quarter" dimension in the rows and the "product category" dimension in the columns.

[0125] Or when the user requests to "show the profit margin in the bar chart as well", the report generation module will add a graphical display of the profit margin indicator on the existing bar chart view.

[0126] This automatic optimization capability is achieved by integrating a rule-based or machine learning visualization engine, which maintains layout rules and optimization strategies for various report views and can dynamically adjust the appearance and interaction of reports according to user needs.

[0127] For example, if you need to adjust the row and column structure, the visualization engine will find the matching relationship between the dimensions and views in the knowledge base and reorganize the report layout according to the dimensions specified by the user. If you need to add a new view, the engine will retrieve the applicable chart types in the knowledge base and integrate them into the report.

[0128] Through this automatic optimization mechanism, the report generation module can continuously improve the presentation effect and interactive experience of the report based on user feedback, thereby enhancing the user experience.

[0129] S05. Users can customize the visual style of the report, such as font, color, title, etc., through natural language, and automatically apply the personalized customization to the report.

[0130] Natural language style description understanding, first use natural language understanding technology to accurately parse the style requirements described by users in natural language. For example, when a user says "change the title font to Times New Roman, size 14, bold", the style customization module needs to identify style attributes such as "font", "size", "weight" and extract specific values.

[0131] We can use rule-based pattern matching methods or deep learning-based text classification models to achieve this function. The former defines a series of matching patterns, such as "(font|font type).*Times New Roman", etc., which can accurately extract the user's style requirements. The latter uses pre-trained language models, such as BERT, to map natural language descriptions to predefined style attribute categories, thereby achieving semantic understanding.

[0132] Automatic style application: After the user's style requirement description is obtained, it will be automatically applied to the report. We use CSS or other visual control technologies to dynamically generate the corresponding style code based on the extracted style attributes and embed it into the report's markup language such as HTML / SVG.

[0133] For example, for the requirement "Change the title font to Times New Roman, size 14, bold", the style customization module will generate the following CSS code and insert it into the report <style>标签中:

[0134] .report-title{

[0135] font-family:'Times New Roman',serif;

[0136] font-size:14px;

[0137] font-weight:bold;

[0138] }

[0139] 可以自动将用户指定的样式应用到报表的各个元素上,实现个性化定制。

[0140] 基于同一发明构思,本发明还提出一种基于大模型的智能报表生成系统。该装置的实施可以参见上述方法的实施,重复之处不再赘述。以下所使用的术语"模块”,可以是实现预定功能的软件和 / 或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。

[0141] 图2是本发明基于大模型的智能报表生成系统结构示意图。如图2所示,该系统包括:

[0142] 语义理解模块110,采用先进的自然语言处理技术,基于深度学习的transformer模型,准确解析用户描述中的各类语义元素,并提取它们之间的关系,形成结构化的语义表示;

[0143] 所述语义元素包括:维度、指标、视图类型等。

[0144] 预训练语言模型,该模块使用基于transformer的预训练语言模型,如BERT或GPT,对用户的自然语言输入进行编码,得到丰富的语义特征表示。这些预训练模型是在大规模通用语料上进行预训练的,能够捕捉到语言中的复杂语义关系。

[0145] 将上述预训练语言模型进行报表领域的fine-tuning,具体做法是,收集大量的报表相关语料,包括用户对报表的描述、报表生成过程中的对话交互等,然后利用这些数据对预训练模型进行微调训练。通过这种方式,模型能够学习到报表领域特有的语义知识,如维度、指标、视图类型等概念,以及它们之间的关系。

[0146] 语义理解模块110能够从用户的自然语言描述中准确识别出各类报表相关的语义元素,如维度、指标、视图类型等,并提取它们之间的语义关系,形成一种结构化的语义表示。这种语义表示不仅能够精确地捕捉用户的需求,还便于后续模块进行知识检索和报表生成。

[0147] 举个例子,如果用户输入"把季度维度放在行,产品类别放在列,并显示利润率指标",语义理解模块110将识别出"季度"是维度,"产品类别"是另一个维度,"利润率"是指标,并提取出它们之间的排列关系。

[0148] 知识库管理模块120,建立报表模板、图表类型、视觉元素等的知识库,并使用知识图谱技术对才知识库进行组织和管理;

[0149] 所述知识库管理模块120通过语义匹配,快速从知识库中检索出满足用户需求的报表元素;

[0150] 知识图谱构建,我们首先收集和整理大量的报表相关知识,包括各类报表模板的结构、常见的图表类型及其特点、常用的视觉元素及其属性等。然后,我们将这些知识以实体-关系的形式构建成一个报表领域知识图谱。

[0151] 例如,知识图谱中可以有"柱状图"、"折线图"等图表类型实体,以及"x轴"、"y轴"、"图例"等视觉元素实体,它们之间通过"适用于"、"包含"等语义关系进行连接。

[0152] 语义匹配,有了这样的报表领域知识图谱后,当语义理解模块提供了用户的结构化语义表示时,知识库管理模块120就可以利用基于知识图谱的语义匹配技术,快速检索出满足用户需求的报表元素。

[0153] 具体做法是,首先将用户的语义表示转化为知识图谱中的查询模式,然后利用基于图神经网络的语义匹配算法,在知识图谱中找到最相关的报表模板、图表类型、视觉元素等,返回给报表生成模块使用。

[0154] 这种基于知识图谱的语义匹配方法,能够更好地理解报表领域的语义特点,提高检索的准确性和效率。

[0155] 数据检索与集成模块130,根据语义需求,使用关键词搜索、语义相似度计算等方法,从准备好的数据集中快速找到相关数据,并进行必要的清洗、整合等处理,形成报表所需的数据源;

[0156] 所述语义需求来源于用户的自然语言描述。

[0157] 用户通过自然语言输入他们对报表的具体需求,比如"把季度维度放在行,产品类别放在列”,这些描述中蕴含了报表的维度、指标以及其他布局要求,系统中的语义理解模块会分析并提取这些信息,形成结构化的语义表示,即所谓的语义需求。

[0158] 数据源识别,该模块首先利用知识库管理模块120检索出与用户需求相关的数据源信息,包括数据源的位置、类型、结构等元数据。

[0159] 语义查询生成,根据用户需求的语义表示和数据源信息,该模块自动生成相应的查询语句,如SQL、NoSQL等,用于从数据源中精准提取所需数据。

[0160] 数据获取与集成,利用生成的查询语句,从对应的数据集仓库中获取原始数据。如果数据来自多个异构数据源,该模块会进行必要的数据转换、合并等处理,形成统一的规范化数据集,作为报表生成的数据源输入。

[0161] 通过这种基于语义的智能数据检索与集成方法,系统能够自动识别用户需求所对应的数据源,并生成高效的查询方式从中获取数据,为报表生成提供高质量的数据支撑,提高了整体数据获取的智能化水平。

[0162] 报表生成模块140,采用模板引擎技术与可视化引擎,模板引擎技术将从知识库和数据源中获取的元素动态组装成初始报表,同时可视化引擎,根据用户反馈自动优化报表的布局和视图,如"把季度维度放在行,产品类别放在列"、"将利润率也显示在柱状图中";

[0163] 报表生成模块140采用基于模板的报表生成技术,具体来说,它会根据语义理解模块提供的结构化需求信息,从知识库管理模块120检索出合适的报表模板,然后动态地将数据检索与集成模块130提供的数据源填充到模板中,生成初始的报表。

[0164] 报表模板是以一种结构化的格式(如XML或JSON)预先定义好的,包含了报表的基本框架,如行列结构、图表类型、视觉元素等。报表生成模块140会解析这些模板,并使用模板引擎技术,如Jinja2或Handlebars,将数据动态插入到模板中,生成最终的报表呈现形式。

[0165] 这种基于模板的方式具有以下优点:

[0166] 灵活性强:报表模板可以事先定义好各种常用的报表结构,报表生成模块140只需根据用户需求动态选择合适的模板即可,减少了开发成本;

[0167] 可扩展性好:当有新的报表需求出现时,只需要增加对应的报表模板即可,无需修改报表生成的核心算法;

[0168] 执行效率高:模板驱动的报表生成方式计算开销小,能够快速响应用户需求。

[0169] 自动优化报表布局和视图除了根据模板生成初始报表,报表生成模块140还集成了可视化引擎,能够根据用户的反馈动态优化报表的布局和视图。

[0170] 比如,当用户提出"把季度维度放在行,产品类别放在列"的需求时,报表生成模块140会调整报表的行列结构,将"季度"维度放在行上,"产品类别"维度放在列上。

[0171] 又或者当用户要求"将利润率也显示在柱状图中"时,报表生成模块140会在现有的柱状图视图上,添加利润率指标的图形展示。

[0172] 这种自动优化能力是通过集成基于规则或机器学习的可视化引擎实现的。该引擎内部维护有各类报表视图的布局规则和优化策略,能够根据用户需求动态调整报表的外观和交互。

[0173] 例如,对于调整行列结构的需求,可视化引擎会查找知识库中维度与视图的适配关系,并根据用户指定的维度重新组织报表布局。对于添加新视图的需求,引擎会检索知识库中可适用的图表类型,并将其集成到报表中。

[0174] 通过这种自动优化机制,报表生成模块140能够不断根据用户反馈,提升报表的呈现效果和交互体验,增强用户的使用感受。

[0175] 样式定制模块150,利用自然语言理解技术,解析用户对报表样式的描述,如"将标题字体改为Times New Roman,14号,加粗",并自动将这些样式应用到报表中。

[0176] 自然语言样式描述理解该模块首先使用自然语言理解技术,准确解析用户以自然语言描述的样式需求。例如,当用户说"将标题字体改为Times New Roman,14号,加粗"时,样式定制模块150需要识别出"字体"、"大小"、"粗细"等样式属性,并提取出具体的值。

[0177] 我们可以采用基于规则的模式匹配方法,或基于深度学习的文本分类模型,来实现这一功能。前者定义一系列匹配模式,如"(字体|字型).*Times New Roman"等,能够较为准确地提取出用户的样式需求。后者则利用预训练的语言模型,如BERT,将自然语言描述映射到预定义的样式属性类别上,从而实现语义理解。

[0178] (2)样式自动应用有了用户的样式需求描述后,样式定制模块150需要将其自动应用到报表中。我们采用CSS或其他可视化控制技术,根据提取的样式属性动态生成对应的样式代码,并将其嵌入到报表的HTML / SVG等标记语言中。

[0179] 例如,对于"将标题字体改为Times New Roman,14号,加粗"这个需求,样式定制模块150会生成如下的CSS代码,并插入到报表的<style>标签中:

[0180] .report-title{

[0181] font-family:'Times New Roman',serif;

[0182] font-size:14px;

[0183] font-weight:bold;

[0184] }

[0185] 整体工作流程如下:

[0186] 用户通过自然语言描述报表需求,如"把季度维度放在行,产品类别放在列,并显示利润率指标"。

[0187] 语义理解模块分析用户输入,提取出维度、指标等结构化的语义表示。

[0188] 知识库管理模块120根据语义表示,从报表模板、图表类型等知识库中检索出满足需求的元素。

[0189] 数据检索与集成模块130根据语义需求,从数据源中找到相关数据,进行清洗和集成。

[0190] 报表生成模块140使用模板引擎技术,将知识库和数据源中的元素组装成初始报表。

[0191] 报表生成模块140还集成可视化引擎,根据用户反馈动态优化报表的布局和视图。

[0192] 用户可以通过自然语言描述报表样式需求,如字体、颜色等。

[0193] 样式定制模块150解析用户需求,并自动生成相应的样式代码应用到报表中。

[0194] 实施例:

[0195] 用户使用自然语言描述报表需求:

[0196] "我需要一个显示去年按季度和产品类型分列的销售额报表,其中包括柱状图视图。"

[0197] 语义理解模块分析输入,提取语义表示:

[0198] {"dimensions":[{"name":"季度","timeLevel":"quarter","granularity":"year"},{"name":"产品类型","entity":"product"}],"metrics":[{"name":"销售额","aggregation":"sum"}],"visualizations":[{"type":"bar"}],"filters":[{"dimension":"时间","operator":"last","value":"1year"}]}

[0199] 知识库管理模块120检索匹配元素:

[0200] 报表模板:交叉列表模板

[0201] 视图类型:柱状图

[0202] 数据检索与集成模块130:

[0203] 识别数据源:公司销售数据库

[0204] 生成SQL查询:SELECT DATE_TRUNC('quarter',order_date)AS季度,product_category AS产品类型,SUM(sales_amount)AS销售额FROM orders WHERE order_date>=DATE_TRUNC('year',CURRENT_DATE)-INTERVAL'1year'GROUP BY 1,2

[0205] 获取并转换数据为规范化数据集;

[0206] 报表生成模块140:

[0207] 基于交叉列表模板生成初始报表,填入数据集;

[0208] 集成柱状图视图,显示销售额指标;

[0209] 系统展示初始报表给用户;

[0210] 用户优化:"把季度维度放在列,产品类型维度放在行"

[0211] 报表生成模块140根据反馈优化行列结构;

[0212] 用户继续:"将柱状图的标题字体改为Arial,16号,蓝色加粗"

[0213] 样式定制模块150解析需求,生成CSS代码:

[0214] #sales-chart.chart-title{

[0215] font-family:Arial;

[0216] font-size:16px;

[0217] font-weight:bold;

[0218] color:#0070C0;

[0219] }

[0220] 将CSS代码插入HTML的style标签中,应用柱状图标题样式;

[0221] 系统输出最终报表给用户。

[0222] 应当注意,尽管在上文详细描述中提及了基于大模型的智能报表生成系统的若干模块,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块的特征和功能可以在一个模块中具体化。反之,上文描述的一个模块的特征和功能可以进一步划分为由多个模块来具体化。

[0223] 基于前述发明构思,如图3所示,本发明还提出一种计算机设备200,包括存储器210、处理器220及存储在存储器210上并可在处理器220上运行的计算机程序230,处理器220执行计算机程序230时实现前述基于大模型的智能报表生成方法。

[0224] 基于前述发明构思,本发明还提出一种计算机可读存储介质,计算机可读存储介质存储有执行前述基于大模型的智能报表生成方法的计算机程序。

[0225] 本发明一种基于大模型的智能报表生成方法及系统,能够准确理解用户的自然语言需求,智能地从知识库和数据源中获取所需元素,自动构建出初始报表,并根据用户反馈不断优化,最终生成满足个性化需求的报表成果。这大大提高了报表生成的效率和用户体验,为企业和个人用户带来了显著的实用价值。

[0226] 本发明大幅提高报表生成效率,通过自然语言交互方式,用户只需简单描述需求,系统就能自动完成绝大部分生成步骤,极大地节省了人力成本和时间;本发明降低报表生成门槛,采用自然语言交互,无需掌握复杂的报表工具,普通用户也能方便地定制所需报表,显著降低了使用门槛。

[0227] 本发明提升报表生成灵活性,基于统一的知识库和数据集成技术,能够快速响应各种不同维度和指标的报表需求,生成的报表类型、视图和样式也可以根据需求动态调整,灵活性大幅提升;本发明优化报表视觉体验系统,内置可视化优化引擎,能够自动对报表的布局、图表等进行智能调整,使其既符合用户描述的需求,又具备专业的可视化效果,提升了用户的视觉体验;促进企业数字化转型本发明为企业数据资产的高效分析和可视化提供了有力工具,能够极大提高企业从海量数据中发现洞见的能力,推动企业数字化转型进程,提升竞争力;本发明突破了传统报表生成的障碍和瓶颈,通过自然语言交互和智能技术的创新应用,实现了报表生成的自动化、智能化和个性化,为企业和个人用户带来了显著的实用价值,具有广阔的应用前景。

[0228] 虽然已经参考若干具体实施方式描述了本发明的精神和原理,但是应该理解,本发明并不限于所公开的具体实施方式,对各方面的划分也不意味着这些方面中的特征不能组合以进行受益,这种划分仅是为了表述的方便。本发明旨在涵盖所附权利要求的精神和范围内所包含的各种修改和等同布置。

[0229] 本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和 / 或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和 / 或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。

[0230] 用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和 / 或框图中所规定的功能 / 操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。

[0231] 在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。

[0232] 为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。

[0233] 可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。

[0234] 计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。

[0235] 应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。

[0236] 上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。

[0237] 对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。< / style>

Claims

1. A method for generating intelligent reports based on a large model. It is characterized in that The method includes: S01. Semantic understanding: accurately analyzing the report requirements described by users in natural language and extracting the semantic intent; S02. Knowledge base maintenance and management report-related knowledge base, including report templates, chart types, visual elements, etc. The knowledge base is organized and managed in the form of knowledge graph, which can effectively express the semantic relationship between various report elements; S03, data retrieval and integration, based on the user needs of semantic extraction, using the data source information stored in the knowledge base, retrieve and obtain relevant data from the dataset warehouse; S04. Combine the demand information extracted by semantic understanding with the report elements retrieved from the knowledge base, as well as the data source retrieved and integrated, to automatically construct the initial report, and dynamically optimize it based on user feedback; S05. The user customizes the visual style of the report through natural language and applies the customization to the report.

2. According to the big model-based intelligent report generation method of claim 1, It is characterized in that The S01 includes: S011, pre-trained language model, using the transformer-based pre-trained language model to encode the user's natural language input to obtain rich semantic feature representation; S012. Fine-tuning the pre-trained language model in the reporting field; S013. After the first two steps, the language model can accurately identify the semantic elements related to various reports from the user's natural language description, and extract the semantic relationship between the semantic elements to form a structured semantic representation.

3. According to the large model-based intelligent report generation method of claim 2, It is characterized in that The fine-tuning in S012 is model fine-tuning: targeted optimization of the pre-trained model through specific domain data to improve its performance on specific tasks.

4. According to the method for generating intelligent reports based on a large model as described in claim 2, It is characterized in that The S012 includes: collecting a large amount of report-related corpus, including user descriptions of the report and dialogue interactions during the report generation process, and then using the corpus data to fine-tune the pre-trained model.

5. According to the big model-based intelligent report generation method of claim 1, It is characterized in that The S02 includes: S021. Knowledge graph construction: collect and organize a large amount of report-related knowledge, including the structure of various report templates, common chart types and their characteristics, common visual elements and their attributes, and construct the collected and organized knowledge into a report domain knowledge graph in the form of entity-relationship; S022. Semantic matching: When the user's semantics is structured, the knowledge base uses semantic matching technology based on the knowledge graph to retrieve report elements that meet the user's needs.

6. According to the big model-based intelligent report generation method of claim 1, It is characterized in that The S03 includes: S031. Data source identification: using the knowledge base to retrieve data source information related to user needs, including the location, type, and structure of the data source; S032, semantic query generation, generating corresponding query statements based on the semantic representation of user requirements and data source information, for accurately extracting required data from the data source; S033. Data acquisition and integration. Use the generated query statements to obtain raw data from the corresponding dataset warehouse.

7. According to the method for generating intelligent reports based on a large model as claimed in claim 6, It is characterized in that If the data in S033 comes from multiple heterogeneous data sources, data conversion and merging are performed to form a unified normalized data set as a data source input for report generation.

8. An intelligent report generation system based on a large model, It is characterized in that The device includes: The semantic understanding module uses natural language processing technology and a deep learning-based transformer model to parse various semantic elements in user descriptions and extract the relationships between them to form a structured semantic representation. The knowledge base management module builds a knowledge base of report templates, chart types, and visual elements, and uses knowledge graph technology to organize and manage the knowledge base; The data retrieval and integration module uses keyword search, semantic similarity calculation and other methods to quickly find relevant data from the prepared data set according to semantic requirements, and performs necessary cleaning and integration to form the data source required for the report; The report generation module uses template engine technology and visualization engine. The template engine technology dynamically assembles the elements obtained from the knowledge base and data source into the initial report. At the same time, the visualization engine automatically optimizes the layout and view of the report based on user feedback. The style customization module uses natural language understanding technology to parse the user's description of the report style.

9. The intelligent report generation system based on a large model according to claim 8, It is characterized in that The semantic elements include: dimension, indicator, and view type.

10. The intelligent report generation system based on a large model according to claim 8, It is characterized in that The knowledge base management module retrieves report elements that meet the requirements from the knowledge base through semantic matching.

11. The intelligent report generation system based on a large model according to claim 8, It is characterized in that The semantic requirements are derived from the user's natural language description.

12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Method and system for generating chart through question and answer dialogue and storage medium

    CN119578392A

  • Method, system and storage medium for generating charts through question-answer dialogue

    CN119578392B

  • Intelligent cockpit interaction method and system based on multi-modal artificial intelligence

    CN119883005A

  • Chart generation method, multi-modal data platform, computing equipment and computer readable storage medium

    CN119903215A

  • Visual data processing method and device based on large language model, equipment and medium

    CN119938855A