Report generation method and device based on business intelligence BI tool and electronic equipment

By parsing and generating structured query instructions using a large language model, the high complexity of using traditional BI tools is resolved, enabling non-technical users to generate complex reports, and improving user experience and data processing efficiency.

CN120670459APending Publication Date: 2025-09-19BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510786990.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Traditional business intelligence (BI) tools have a high threshold for non-technical users, the report generation process is cumbersome, the generated reports are relatively basic, and lack in-depth analysis and intelligent data processing capabilities.

Method used

Use the pre-deployed language model to perform semantic analysis on natural language query requests, generate structured query instructions, generate target query statements through the language model, load the data source and execute the query, analyze the data query results to determine the report generation strategy, and perform visual display to support users to modify reports and optimize model training.

Benefits of technology

It lowers the usage threshold for non-technical users, can generate complex multi-dimensional data analysis reports, improves user experience and data processing efficiency, provides intelligent data analysis and recommendation functions, and generates more accurate and usable reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670459A_ABST
    Figure CN120670459A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a report generation method and device based on a business intelligence BI tool and electronic equipment, and is used for solving the problems that a traditional BI tool is high in use threshold, tedious in process and low in data processing efficiency. The method comprises the following steps: in response to a query request based on a natural language, performing semantic analysis on the query request by utilizing a pre-deployed language large model, and generating a structured query instruction corresponding to the query request; generating a target query statement based on the language large model and the structured query instruction; loading a target data source based on the target query statement, and executing the target query statement based on the loaded target data source to generate a data query result; analyzing the data query result by utilizing a language large model, and determining a first report generation strategy; and based on the first report generation strategy, generating the first report and performing visual display, so that the use threshold of the user can be reduced, the process can be optimized, and the data processing efficiency can be improved.
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 and electronic device based on a business intelligence (BI) tool. Background Art

[0002] With the rapid development of big data technology, enterprises have an increasing demand for data analysis and visualization. Business Intelligence (BI) tools can display different business goals and stage results through a variety of charts. They are key technologies that help enterprises transform raw data into useful information and knowledge.

[0003] Currently, traditional BI tools usually require users to have knowledge of query languages ​​such as SQL, which limits their use by non-technical personnel. In addition, existing BI tools that support natural language report generation can only process simple queries. The creation of reports and charts often requires manual configuration, which is a cumbersome and time-consuming process. The generated analysis tables are relatively basic and lack in-depth analysis and intelligent data processing capabilities. Summary of the Invention

[0004] The embodiments of the present application provide a report generation method, device and electronic device based on a business intelligence (BI) tool, which are used to solve the problem that traditional business BI tools in the prior art have high usage threshold requirements for non-technical users, a cumbersome report generation process, relatively basic generated reports, and lack of in-depth analysis and intelligent data processing capabilities.

[0005] In a first aspect, the present application provides a report generation method based on a business intelligence (BI) tool, the method comprising:

[0006] In response to a query request based on natural language, a pre-deployed language model is used to perform semantic parsing on the query request to generate a structured query instruction corresponding to the query request;

[0007] Generate a target query statement based on the language model and the structured query instruction;

[0008] Based on the target query statement, a target data source is loaded, and based on the loaded target data source, the target query statement is executed to generate a data query result;

[0009] Analyzing the data query results using the language macro model to determine a first report generation strategy;

[0010] Based on the first report generation strategy, a first report is generated and visually displayed.

[0011] In some embodiments, using a pre-deployed large language model to semantically parse the query request to generate a structured query instruction corresponding to the query request includes:

[0012] Based on the query request, the semantic parsing module of the language large model is used to perform semantic parsing on the query request to identify various key elements in the query request; the various key elements include: some or all of time elements, space elements, product elements, measurement indicator elements, and condition elements;

[0013] Based on the various key elements and the database query fields corresponding to the various key elements, generating query clauses corresponding to the various key elements;

[0014] The generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request.

[0015] In some embodiments, generating a target query statement based on the language model and the structured query instruction includes:

[0016] Utilizing the sentence generation module of the language large model to parse the structured query instruction and determine the information of each field in the structured query instruction;

[0017] Determine each data table associated with the structured query instruction based on the field information, and construct a table connection structure based on the association relationship between the data tables;

[0018] Mapping the field information to a pre-built query statement format to generate query statement clauses corresponding to the field information;

[0019] The target query statement is generated based on the query statement clauses and the table connection structure.

[0020] In some embodiments, analyzing the data query results using the language macro model to determine a first report generation strategy includes:

[0021] Analyze the data query results using the report generation module of the language model to identify the change trend of the metrics in the data query results within the period corresponding to the query request;

[0022] If it is determined that the change trend of the measurement indicator is abnormal, obtaining target influencing factor information, wherein the target influencing factor information is external factor information that causes the abnormal change trend of the measurement indicator;

[0023] Based on the change trend and the target influencing factor information, generating a change trend analysis result of the measurement indicator;

[0024] The first report generation strategy is determined based on the analysis result and the data query result.

[0025] In some embodiments, after generating the first report and performing visual presentation, the method further includes:

[0026] receiving modification information of the target report from the user, wherein the modification information includes changing the chart type and / or adjusting the annotation content;

[0027] Based on the modification information, the first report generation strategy is updated to determine a second report generation strategy;

[0028] Based on the second report generation strategy, a second report is generated and visually displayed.

[0029] In some embodiments, after updating the first report generation strategy based on the modification information and determining the second report generation strategy, the method further includes:

[0030] constructing a feedback sample based on the modification information and the second report generation strategy;

[0031] The feedback sample is input into the language model, and the language model is optimized and trained to update the language model.

[0032] In a second aspect, the present application provides a report generation device based on a business intelligence (BI) tool, the device comprising:

[0033] A first generation module is configured to respond to a natural language-based query request, perform semantic parsing on the query request using a pre-deployed large language model, and generate a structured query instruction corresponding to the query request;

[0034] A second generation module is used to generate a target query statement based on the language model and the structured query instruction;

[0035] A query module, configured to load a target data source based on the target query statement, execute the target query statement based on the loaded target data source, and generate a data query result;

[0036] a determination module, configured to analyze the data query result using the language macro model and determine a first report generation strategy;

[0037] The third generating module is used to generate a first report based on the first report generating strategy and perform visual display.

[0038] In some embodiments, the first generating module is specifically configured to:

[0039] Based on the query request, the semantic parsing module of the language large model is used to perform semantic parsing on the query request to identify various key elements in the query request; the various key elements include: some or all of time elements, space elements, product elements, measurement indicator elements, and condition elements;

[0040] Based on the various key elements and the database query fields corresponding to the various key elements, generating query clauses corresponding to the various key elements;

[0041] The generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request.

[0042] In some embodiments, the second generating module is specifically configured to:

[0043] Utilizing the sentence generation module of the language large model to parse the structured query instruction and determine the information of each field in the structured query instruction;

[0044] Determine each data table associated with the structured query instruction based on the field information, and construct a table connection structure based on the association relationship between the data tables;

[0045] Mapping the field information to a pre-built query statement format to generate query statement clauses corresponding to the field information;

[0046] The target query statement is generated based on the query statement clauses and the table connection structure.

[0047] In some embodiments, the determining module is specifically configured to:

[0048] Analyze the data query results using the report generation module of the language model to identify the change trend of the metrics in the data query results within the period corresponding to the query request;

[0049] If it is determined that the change trend of the measurement indicator is abnormal, obtaining target influencing factor information, wherein the target influencing factor information is external factor information that causes the abnormal change trend of the measurement indicator;

[0050] Based on the change trend and the target influencing factor information, generating a change trend analysis result of the measurement indicator;

[0051] The first report generation strategy is determined based on the analysis result and the data query result.

[0052] In some embodiments, further comprising:

[0053] a modification module, configured to receive modification information of the target report from the user after the third generation module generates the first report and performs visual display, wherein the modification information includes changing the chart type and / or adjusting the annotation content;

[0054] Based on the modification information, the first report generation strategy is updated to determine a second report generation strategy;

[0055] Based on the second report generation strategy, a second report is generated and visually displayed.

[0056] In some embodiments, after updating the first report generation strategy based on the modification information and determining the second report generation strategy, the modification module is further configured to:

[0057] constructing a feedback sample based on the modification information and the second report generation strategy;

[0058] The feedback sample is input into the language model, and the language model is optimized and trained to update the language model.

[0059] In a third aspect, the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0060] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the above-mentioned report generation method based on the business intelligence (BI) tool.

[0061] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the above-mentioned report generation method based on the business intelligence (BI) tool.

[0062] In a fifth aspect, the present application provides a computer program product, which includes: computer program code, which, when running on a computer, enables the computer to execute the above-mentioned report generation method based on business intelligence (BI) tools.

[0063] In an embodiment of the present application, in response to a query request based on natural language, a pre-deployed language big model is used to perform semantic analysis on the query request to generate a structured query instruction corresponding to the query request; based on the language big model and the structured query instruction, a target query statement is generated; based on the target query statement, a target data source is loaded, and based on the loaded target data source, the target query statement is executed to generate a data query result; using the language big model, the data query result is analyzed to determine a first report generation strategy; based on the first report generation strategy, a first report is generated and visually displayed. In this way, the problem of limited query complexity in the prior art is solved, so that users can generate complex multi-dimensional data analysis reports through simple natural language descriptions, while lowering the usage threshold for non-technical users and improving user experience. Through the deep learning and reasoning capabilities of the language big model, intelligent data analysis and recommendation functions are provided, making the generated reports more accurate and more usable. In addition, based on the language big model, the data processing process is optimized and the data processing efficiency is improved.

[0064] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0066] Figure 1 A flowchart of a report generation method based on a business intelligence (BI) tool provided in an embodiment of the present application;

[0067] Figure 2 A system architecture diagram of a business intelligence (BI) tool provided in an embodiment of the present application;

[0068] Figure 3 A schematic diagram of the structure of a report generation device based on a business intelligence (BI) tool provided in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing a report generation method based on a business intelligence (BI) tool, provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Unless there is a conflict, the embodiments in the present application and the features in the embodiments can be combined with each other in any way. In addition, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that here.

[0071] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of its variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in this application can mean at least two, for example, two, three or more, and the embodiments of this application are not limited thereto.

[0072] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope disclosed in this application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0073] In the technical solution of this application, the acquisition, transmission, storage, and use of data comply with the requirements of relevant national laws and regulations.

[0074] Before introducing the report generation method based on the business intelligence (BI) tool provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.

[0075] With the rapid development of big data technology, enterprises have an increasing demand for data analysis and visualization. Business Intelligence (BI) tools can display different business goals and stage results through a variety of charts. They are key technologies that help enterprises transform raw data into useful information and knowledge.

[0076] Currently, traditional BI tools usually require users to have knowledge of query languages ​​such as SQL, which limits their use by non-technical personnel. In addition, existing BI tools that support natural language report generation can only process simple queries. The creation of reports and charts often requires manual configuration, which is a cumbersome and time-consuming process. The generated analysis tables are relatively basic and lack in-depth analysis and intelligent data processing capabilities.

[0077] In view of this, and to address the problems in the prior art of traditional business BI tools, such as high entry requirements for non-technical users, cumbersome report generation processes, relatively basic generated reports, and a lack of in-depth analysis and intelligent data processing capabilities, the present application provides a report generation method, apparatus, and electronic device based on a business intelligence BI tool. The following describes some preferred embodiments of the present application in conjunction with the accompanying drawings.

[0078] It should be noted that the report generation method based on the business intelligence BI tool of the embodiment of the present application can be executed by the report generation device based on the business intelligence BI tool provided in the embodiment of the present application. The report generation device based on the business intelligence BI tool can be an electronic device, or can be configured in an electronic device, wherein the electronic device can be any stationary or mobile computing device capable of data processing, such as a mobile computing device such as a laptop, a smartphone, a wearable device, or a stationary computing device such as a desktop computer, or a server, or other types of computing devices, etc., and the embodiment of the present application does not limit this.

[0079] See Figure 1 , Figure 1 A flowchart of a report generation method based on a business intelligence (BI) tool is provided in an embodiment of the present application. The method includes the following steps.

[0080] In step 101, in response to a natural language-based query request, a pre-deployed language model is used to perform semantic parsing on the query request to generate a structured query instruction corresponding to the query request.

[0081] In specific implementation, based on the query request, the semantic parsing module of the language large model can be used to perform semantic parsing on the query request to identify various key elements in the query request; various key elements include: time elements, space elements, product elements, measurement indicator elements, and part or all of the condition elements; based on various key elements and the database query fields corresponding to each key element, query clauses corresponding to each key element are generated; the generated query clauses are synthesized according to a preset structured format to generate structured query instructions that match the query request.

[0082] Among them, the language large model can be DeepSeek, GPT series and other language large models.

[0083] For example, the user's query request based on natural language input is: "What is the sales volume of high-end products in East China in Q2 2023?", "Compare the sales volume of high-end products in East China in Q1 and Q2 2023, excluding promotional months." After that, the system calls the pre-deployed DeepSeekV3 model fine-tuned by Fewshot Learning to perform semantic analysis on the query request and identify various key elements. Here, the parsing process can include entity recognition steps, such as extracting business entities such as time granularity, regional level, and product category; intent understanding steps, such as distinguishing between comparative analysis, trend prediction, and other analysis types through the attention mechanism; context maintenance steps, maintaining dimension inheritance relationships and filter condition superposition in multiple rounds of dialogue.

[0084] Among them, the various key factors identified can be specifically time factors: "Q2 2023", "Q1 and Q2 2023", etc., spatial factors: "East China", "South China", etc., product factors: "high-end products", "mid-range products", "new category A", etc., measurement indicator factors: "sales", "order volume", etc., conditional factors: "excluding promotional months", "inventory greater than 100", etc.

[0085] Then, according to the mapping relationship between each key element and the database query field corresponding to each key element, each key element is converted into an independent query clause.

[0086] For example, the database query field corresponding to "2023" is "year", and the resulting query clause is: "year=2023";

[0087] The database query field corresponding to "Q1 and Q2" is "quarter", and the resulting query clause is: "quarter IN (1, 2)";

[0088] The database query field corresponding to "East China" is "region", and the resulting query clause is: "region = 'East China'";

[0089] The database query field corresponding to "high-end products" is "product_level", and the resulting query clause is: "product_level = 'high-end'";

[0090] The database query field corresponding to "sales amount" is "sales_amount", and the resulting query clause is: ""metrics":["sales_amount"]";

[0091] The database query field corresponding to "Exclude promotion months" is "is_promotion = false", and the resulting query clause is: "is_promotion = false";

[0092] In this way, the generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request, wherein the structured query instruction includes at least the following fields:

[0093] Metrics: used to specify the metrics to be calculated;

[0094] dimensions: used to specify data grouping dimensions;

[0095] Filters: used to specify data filtering conditions;

[0096] Therefore, for the query request "Compare the sales of high-end products in East China in Q1 and Q2 2023, excluding promotional months", the generated structured query instruction is as follows:

[0097]

[0098] In this way, the system will calculate the total sales (sales_amount) of all products marked as "high-end" sold in the "East China" region during these two quarters. These sales will be categorized according to the specified time range (Q1 and Q2 of 2023), geographic location (East China), and product type (high-end products). At the same time, the filtering conditions ensure that only data from non-promotional periods are included in the calculation.

[0099] It should be noted that multiple rounds of conversations can also be supported here, such as retaining the context when the user asks "split by quarter".

[0100] By leveraging the powerful contextual understanding and reasoning capabilities of the large language model, it can accurately identify multi-dimensional business elements in complex natural language and improve the accuracy of semantic understanding. Through a standardized structured instruction format, it supports multiple database types and table structures, has good scalability, and achieves fully automatic conversion from natural language to structured queries, lowering the usage threshold for non-professionals.

[0101] In step 102, a target query statement is generated based on the language model and the structured query instruction.

[0102] During specific implementation, the statement generation module of the language large model can be used to parse the structured query instructions to determine the field information in the structured query instructions; based on the field information, the data tables associated with the structured query instructions are determined, and a table connection structure is constructed based on the association relationship between the data tables; the field information is mapped with the pre-constructed query statement format to generate query statement clauses corresponding to the field information; based on the query statement clauses and the table connection structure, a target query statement is generated.

[0103] For example, the structured query instruction is parsed as follows: Field 1: "metrics":["sales_amount"], which determines that the metric to be calculated is sales; Field 2: "dimensions":["region","product_level"], which determines that the data dimensions used for grouping are region and product level; Field 3: "filters":["year=2023","quarter IN(1,2)","region='East China'","product_level='High-end'","is_promotion=false"], which determines that the conditions for filtering data are 2023, Q1 and Q2 quarters, East China region, high-end products, and excluding promotional months.

[0104] Assume that there are three data tables:

[0105] The orders table (order table o) contains order information, including sales_amount (sales amount), order_date (order time), customer_id (customer ID), product_id (product ID), etc.

[0106] The customers table (customer table c) contains customer information, including id, region, etc.

[0107] The products table (product table p) contains product information, including id, level (category), is_promotion (whether it is on promotion), etc.

[0108] Since region comes from the customers table, product_level comes from the products table, and sales_amount comes from the orders table, we can determine that the data tables associated with the structured query instruction are the orders table, customers table, and products table based on the information of each field. The table connection structure constructed based on the association relationship between the data tables is:

[0109]

[0110] It means to connect the orders table and the customers table. The connection condition is: the customer_id field in the orders table is equal to the id field in the customers table. It means to connect the orders table and the products table. The connection condition is: the product_id field in the orders table is equal to the id field in the products table.

[0111] At the same time, the metrics in the metrics field are mapped to the query statement SELECT expression to generate a SELECT clause, the dimension information in the dimensions field is mapped to the query statement GROUP BY expression to generate a GROUP BY clause, and the filter conditions in the filters field are mapped to the query statement WHERE expression to generate a WHERE clause.

[0112] For example, the generated SELECT clause is:

[0113]

[0114] The generated WHERE clause is:

[0115]

[0116]

[0117] The generated GROUP BY clause is:

[0118]

[0119] Finally, combined with the table connection structure, the generated target query statement is as follows:

[0120]

[0121] In this way, executable query statements can be automatically generated from natural language requests without manually writing SQL query statements, reducing the reliance on manual SQL writing in the BI system and supporting advanced query logic such as multi-table association, complex filtering, grouping and aggregation.

[0122] In step 103, based on the target query statement, the target data source is loaded, and based on the loaded target data source, the target query statement is executed to generate a data query result.

[0123] In specific implementation, after completing the generation of the target query statement, the system further dynamically loads the corresponding target data source based on the data source information involved in the query statement, and executes the target query statement on the data source, and finally obtains structured data results for subsequent analysis and report generation.

[0124] Among them, the system first parses the table reference information (such as orders, customers, products, etc.) in the target query statement, identifies the database objects that this query depends on, and determines the target data source that needs to be loaded accordingly. For example, the target data source can be a relational database or a local or remote data file. In response to the successful loading of the target data source, the system submits the generated target query statement to the corresponding database engine for execution. The system can temporarily cache the data query results, such as using Spark distributed execution query, and cache the results to Redis.

[0125] In step 104, the data query result is analyzed using the language model to determine the first report generation strategy.

[0126] During specific implementation, the report generation module of the language big model can be used to analyze the data query results and identify the change trend of the measurement indicators in the data query results within the period corresponding to the query request; if it is determined that the change trend of the measurement indicator is abnormal, the target influencing factor information is obtained, wherein the target influencing factor information is the external factor information that causes the abnormal change trend of the measurement indicator; wherein the external factor information includes part or all of the competitor activity data, market environment changes, policy adjustments or promotion strategy changes, and based on the change trend and the target influencing factor information, the change trend analysis results of the measurement indicator are generated; finally, based on the analysis results and the data query results, the first report generation strategy is determined.

[0127] In specific implementation, the language model can be used to identify the changing trends of various metrics (such as sales, order quantity, user activity, etc.) in the data query results within a specified time period. By comparing historical data or expected values, it can detect whether there are significant fluctuations, declines, or abnormal growth. If the changing trend of a certain metric is found to exceed the preset threshold (such as a 10% year-on-year decrease in Q2 sales), the external factor association mechanism is triggered to obtain information on the target influencing factors that may have caused the change. Then, based on the changing trend and the target influencing factor information, the changing trend analysis results of the metric are generated. For example, the analysis results can include a description of the trend change, the change amplitude and window information, an explanation of the main influencing factors, and preliminary response measures. For example, the generated analysis results are as follows:

[0128] Description of trend change: "Q2 sales of high-end products in East China decreased by 12% year-on-year");

[0129] Change magnitude and time window: "Down 8% month-over-month and down 12% year-over-year from Q2 last year";

[0130] Explanation of the main influencing factors: "Due to the influence of competitor A's '618 Mid-Year Sale', customer transfer was obvious";

[0131] Preliminary recommendations for countermeasures (e.g., “It is recommended to strengthen exclusive member discounts in the next quarter to increase repurchase rates”).

[0132] In specific implementation, report information can include visual chart types (such as stacked bar charts, line charts, area charts, heat maps, etc.), legend descriptions (such as: X-axis is time dimension, Y-axis is sales, and colors distinguish product grades), layout styles (such as: horizontal comparison, vertical trend, multi-dimensional combination), highlighted labels and annotated text (such as: highlighting decline points and attaching reasons), trend analysis summaries, and part or all of key indicator comparisons. In this way, it can meet the reading and decision-making needs of users at different levels.

[0133] During specific implementation, the first report generation strategy is determined based on the analysis results and data query results. The appropriate visualization chart type can be selected based on the identified trend characteristics and dimensional distribution. When there is a need to compare two or more time periods, it is recommended to use stacked bar charts or grouped bar charts to intuitively display the performance differences of each category item in different periods. Significant change points are highlighted in the chart, and text descriptions or icon prompts are attached to identify the key external factors that cause changes in indicators (such as "a competitor's 618 promotion leads to customer churn"). Automatic generation of chart titles, legend descriptions, and annotation text is supported.

[0134] In this way, with the help of the powerful time series modeling capabilities of the language big model, the changing trends of key indicators can be automatically identified. By introducing information on external influencing factors, users can understand the business motivations behind the data. The chart type and display method can be dynamically matched according to the analysis results to improve the accuracy and professionalism of the visual expression, reduce the time cost of manual judgment and chart selection, and effectively improve analysis efficiency.

[0135] In step 105, based on the first report generation strategy, a first report is generated and visually displayed.

[0136] Taking the application scenario of retail enterprises analyzing promotion effects as an example, the report generation method based on business intelligence BI tools proposed in this application is explained.

[0137] 1. User input:

[0138] "Analyze the sales of home appliances during the 618 promotion, compare it with the same period in 2023, and show the top 5 provinces."

[0139] 2. Processing based on business intelligence (BI) tools:

[0140] Analysis time range (2024.06.01-06.18), category (home appliances), comparison dimension (the same period in 2023), and spatial dimension (TOP5 provinces).

[0141] Generate SQL to associate the sales table, product table, and region table and calculate the year-on-year growth rate.

[0142] 3. Output results:

[0143] Map heat map (colored by province) + table (TOP5 provinces and growth rate).

[0144] Conclusion and Recommendation: "Province A saw a 25% increase, suggesting additional inventory; Province B saw an 8% decrease, suggesting the need to investigate logistics issues."

[0145] In an embodiment of the present application, in response to a query request based on natural language, a pre-deployed language big model is used to perform semantic analysis on the query request to generate a structured query instruction corresponding to the query request; based on the language big model and the structured query instruction, a target query statement is generated; based on the target query statement, a target data source is loaded, and based on the loaded target data source, the target query statement is executed to generate a data query result; using the language big model, the data query result is analyzed to determine a first report generation strategy; based on the first report generation strategy, a first report is generated and visually displayed. In this way, the problem of limited query complexity in the prior art is solved, so that users can generate complex multi-dimensional data analysis reports through simple natural language descriptions, while lowering the usage threshold for non-technical users and improving user experience. Through the deep learning and reasoning capabilities of the language big model, intelligent data analysis and recommendation functions are provided, making the generated reports more accurate and more usable. In addition, based on the language big model, the data processing process is optimized and the data processing efficiency is improved.

[0146] During specific implementation, the user's modification information for the target report can also be received, and the modification information includes changing the chart type and / or adjusting the annotation content; based on the modification information, the first report generation strategy is updated and the second report generation strategy is determined; based on the second report generation strategy, the second report is generated and visually displayed.

[0147] For example, if the user feedback is that "the impact of holidays is not taken into account", the system can readjust the query statement and add a new filtering condition: exclude holiday data. Based on the updated target query statement, a second report generation strategy is generated, and then the final generated report is updated and displayed.

[0148] During specific implementation, feedback samples can also be constructed based on the modification information and the second report generation strategy; the feedback samples are input into the language model, and the language model is optimized and trained to update the language model.

[0149] The training process can receive user feedback in real time and update the model cache immediately, or it can summarize feedback samples on a daily / weekly basis and perform model fine-tuning regularly.

[0150] This allows users to flexibly adjust chart types, annotation content, etc., improving the user experience. New versions of report strategies can be quickly generated based on user feedback, improving response speed and adaptability. Feedback samples enrich the diversity of training data, helping the model understand more business scenarios. Automated report generation and strategy updates reduce dependence on manual configuration and improve system deployment efficiency.

[0151] See Figure 2 , Figure 2This is a system architecture diagram of a business intelligence (BI) tool provided in an embodiment of the present application. The system includes a natural language processing module, a large model reasoning module, a data processing module, a visualization module, and a user interaction module.

[0152] The natural language processing module is used to receive user natural language input, parse semantics through a large language model such as the DeepSeekV3 model, and convert it into structured query instructions.

[0153] The large model reasoning module is used to convert structured query instructions into complex SQL query statements such as multi-table associations and subqueries based on the language large model, and to perform data analysis and logical reasoning to generate report logic and visualization suggestions.

[0154] The data processing module is used to extract and preprocess data from the database, supporting the efficient execution of complex queries, such as using Spark to process massive data aggregation and storing high-frequency query results in Redis to reduce repeated calculations.

[0155] The visualization module is used to render the analysis results into interactive charts, and supports users to drag and drop to adjust chart parameters (such as time range filtering).

[0156] The user interaction module is used to provide a natural language interaction interface and collect user feedback to optimize the model. For example, when a user marks a chart as "inaccurate", the SQL generation logic is automatically corrected.

[0157] Based on the same inventive concept, the present application embodiment provides a report generation device based on a business intelligence BI tool, please refer to Figure 3 , the device comprises:

[0158] A first generation module 301 is configured to respond to a natural language query request, perform semantic analysis on the query request using a pre-deployed language model, and generate a structured query instruction corresponding to the query request;

[0159] A second generation module 302 is configured to generate a target query statement based on the language model and the structured query instruction;

[0160] The query module 303 is configured to load a target data source based on the target query statement, execute the target query statement based on the loaded target data source, and generate a data query result;

[0161] A determination module 304 is configured to analyze the data query result using the language macro model and determine a first report generation strategy;

[0162] The third generating module 305 is configured to generate a first report based on the first report generating strategy and perform visual display.

[0163] In some embodiments, the first generating module 301 is specifically configured to:

[0164] Based on the query request, the semantic parsing module of the language large model is used to perform semantic parsing on the query request to identify various key elements in the query request; the various key elements include: some or all of time elements, space elements, product elements, measurement indicator elements, and condition elements;

[0165] Based on the various key elements and the database query fields corresponding to the various key elements, generating query clauses corresponding to the various key elements;

[0166] The generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request.

[0167] In some embodiments, the second generating module 302 is specifically configured to:

[0168] Utilizing the sentence generation module of the language large model to parse the structured query instruction and determine the information of each field in the structured query instruction;

[0169] Determine each data table associated with the structured query instruction based on the field information, and construct a table connection structure based on the association relationship between the data tables;

[0170] Mapping the field information to a pre-built query statement format to generate query statement clauses corresponding to the field information;

[0171] The target query statement is generated based on the query statement clauses and the table connection structure.

[0172] In some embodiments, the determining module 304 is specifically configured to:

[0173] Analyze the data query results using the report generation module of the language model to identify the change trend of the metrics in the data query results within the period corresponding to the query request;

[0174] If it is determined that the change trend of the measurement indicator is abnormal, obtaining target influencing factor information, wherein the target influencing factor information is external factor information that causes the abnormal change trend of the measurement indicator;

[0175] Based on the change trend and the target influencing factor information, generating a change trend analysis result of the measurement indicator;

[0176] The first report generation strategy is determined based on the analysis result and the data query result.

[0177] In some embodiments, further comprising:

[0178] A modification module 306 is configured to receive modification information of the target report from the user after the third generation module 305 generates the first report and performs visual display, wherein the modification information includes changing the chart type and / or adjusting the annotation content;

[0179] Based on the modification information, the first report generation strategy is updated to determine a second report generation strategy;

[0180] Based on the second report generation strategy, a second report is generated and visually displayed.

[0181] In some embodiments, after updating the first report generation strategy based on the modification information and determining the second report generation strategy, the modification module 306 is further configured to:

[0182] constructing a feedback sample based on the modification information and the second report generation strategy;

[0183] The feedback sample is input into the language model, and the language model is optimized and trained to update the language model.

[0184] Based on the same inventive concept, the embodiment of the present application provides an electronic device that can realize the functions of the report generation device based on the business intelligence BI tool discussed above. Please refer to Figure 4 , the device includes a memory 401 , one or more processors 402 , and a bus 403 .

[0185] Memory 401 is used to store computer programs executed by processor 401. Memory 401 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.

[0186] Memory 401 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 401 may be a combination of the above memories.

[0187] The processor 402 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 402 is configured to implement the report generation method based on the business intelligence (BI) tool in the above embodiment when calling the computer program stored in the memory 402 .

[0188] The specific connection medium between the memory 401 and the processor 402 is not limited in the embodiment of the present application. Figure 4 In the embodiment, the memory 401 and the processor 402 are connected via a bus 403. Figure 4 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus 403 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0189] Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium, a computer program product comprising: computer program code, which, when executed on a computer, causes the computer to execute any of the aforementioned methods for generating reports based on business intelligence (BI) tools. Because the principles underlying the problems solved by the computer-readable storage medium are similar to those of the method for generating reports based on business intelligence (BI) tools, the implementation of the computer-readable storage medium can be referenced to the implementation of the method, and any repetitive details will not be repeated.

[0190] Based on the same inventive concept, embodiments of the present application further provide a computer program product comprising: computer program code, which, when executed on a computer, causes the computer to execute any of the aforementioned methods for generating reports based on business intelligence (BI) tools. Because the principles underlying the problems solved by the aforementioned computer program products are similar to those of the methods for generating reports based on business intelligence (BI) tools, the implementation of the aforementioned computer program products can be referenced to the implementation of the methods, and any repetitions will not be repeated.

[0191] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0192] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0193] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of user-operated steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0195] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A report generation method based on business intelligence (BI) tools, characterized in that: include: In response to a query request based on natural language, a pre-deployed language model is used to perform semantic parsing on the query request to generate a structured query instruction corresponding to the query request; Generate a target query statement based on the language model and the structured query instruction; Based on the target query statement, a target data source is loaded, and based on the loaded target data source, the target query statement is executed to generate a data query result; Analyzing the data query results using the language macro model to determine a first report generation strategy; Based on the first report generation strategy, a first report is generated and visually displayed.

2. The method according to claim 1, wherein The method of using a pre-deployed large language model to semantically parse the query request and generate a structured query instruction corresponding to the query request includes: Based on the query request, the semantic parsing module of the language large model is used to perform semantic parsing on the query request to identify various key elements in the query request; the various key elements include: some or all of time elements, space elements, product elements, measurement indicator elements, and condition elements; Based on the various key elements and the database query fields corresponding to the various key elements, generating query clauses corresponding to the various key elements; The generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request.

3. The method according to claim 1, wherein Generating a target query statement based on the language large model and the structured query instruction includes: Utilizing the sentence generation module of the language large model to parse the structured query instruction and determine the information of each field in the structured query instruction; Determine each data table associated with the structured query instruction based on the field information, and construct a table connection structure based on the association relationship between the data tables; Mapping the field information to a pre-built query statement format to generate query statement clauses corresponding to the field information; The target query statement is generated based on the query statement clauses and the table connection structure.

4. The method according to claim 1, wherein The step of analyzing the data query results using the language macro model to determine a first report generation strategy includes: Analyze the data query results using the report generation module of the language model to identify the change trend of the metrics in the data query results within the period corresponding to the query request; If it is determined that the change trend of the measurement indicator is abnormal, obtaining target influencing factor information, wherein the target influencing factor information is external factor information that causes the abnormal change trend of the measurement indicator; Based on the change trend and the target influencing factor information, generating a change trend analysis result of the measurement indicator; The first report generation strategy is determined based on the analysis result and the data query result.

5. The method according to claim 1, wherein After generating the first report and performing visual display, the method further includes: receiving modification information of the target report from the user, wherein the modification information includes changing the chart type and / or adjusting the annotation content; Based on the modification information, the first report generation strategy is updated to determine a second report generation strategy; Based on the second report generation strategy, a second report is generated and visually displayed.

6. The method according to claim 5, wherein After the first report generation strategy is updated based on the modification information and the second report generation strategy is determined, the method further includes: constructing a feedback sample based on the modification information and the second report generation strategy; The feedback sample is input into the language model, and the language model is optimized and trained to update the language model.

7. A report generation device based on business intelligence (BI) tools, characterized in that: include: A first generation module is configured to respond to a natural language-based query request, perform semantic parsing on the query request using a pre-deployed large language model, and generate a structured query instruction corresponding to the query request; A second generation module is used to generate a target query statement based on the language model and the structured query instruction; A query module, configured to load a target data source based on the target query statement, execute the target query statement based on the loaded target data source, and generate a data query result; a determination module, configured to analyze the data query result using the language macro model and determine a first report generation strategy; The third generating module is used to generate a first report based on the first report generating strategy and perform visual display.

8. The device according to claim 7, wherein The first generating module is specifically configured to: Based on the query request, using the semantic parsing module of the language model to perform semantic parsing on the query request to identify various key elements in the query request; The various key elements include: part or all of the time elements, space elements, product elements, measurement index elements, and condition elements; Based on the various key elements and the database query fields corresponding to the various key elements, generating query clauses corresponding to the various key elements; The generated query clauses are synthesized according to a preset structured format to generate a structured query instruction that matches the query request.

9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Intelligent interaction data processing method and device based on multiple modes, equipment and medium

    CN121614498A