Intelligent report generation method and device, equipment and medium
By building a business indicator data pool and analyzing business query requests to generate data query scripts, the problems of low report generation efficiency and insufficient personalized support in the existing technology are solved, and the effect of quickly responding to large-scale and diversified report needs is achieved.
Patent Information
- Application Number
- CN202411494323.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-18
AI Technical Summary
When facing large-scale and diversified reporting needs, the existing technology has low processing efficiency, high manual dependence, insufficient personalized support, and cannot quickly respond to users' data acquisition and decision-making needs.
By building a business indicator data pool, analyzing business query requests, generating data query scripts, executing scripts to extract data from the data pool, determining the report format based on user needs, processing data to generate target reports.
It realizes automatic identification of query intent, reduces the user's manual input of complex query conditions, improves report generation efficiency, supports personalized needs, and can quickly respond to large-scale and diversified report needs.
Smart Images

Figure CN119474124A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence technology and financial technology, and in particular to an intelligent report generation method, device, equipment and storage medium. Background Art
[0002] In the financial industry, report generation and data analysis are the core links to support business decision-making. The existing report development process usually relies on manual operations, including the demand side raising requirements, data developers developing, verifying and publishing according to schedule. This process can respond relatively efficiently to simple or single report requirements, but under large-scale and complex report requirements, the system cannot quickly generate personalized reports, making it difficult for users to obtain data in a timely manner to support business decisions.
[0003] In addition, in the existing technology, the traditional report generation process lacks automation and intelligent support, making it difficult to quickly respond to diverse query needs. The user's personalized analysis needs cannot be met by fixed-format reports. Whenever a user needs a new analysis, the developer must rewrite the query script and manually process it, which increases the workload of development and maintenance, reduces the efficiency of report generation, is prone to errors, and has a long response time.
[0004] Therefore, when faced with large-scale and diversified reporting needs, existing technologies have problems such as low processing efficiency, high dependence on manual labor, and insufficient personalized support. They are unable to achieve rapid data acquisition and report generation, affecting timely decision-making in the financial industry. Summary of the invention
[0005] The main purpose of the present invention is to provide an intelligent report generation method, device, equipment and storage medium, aiming to solve the technical problems in the prior art that the report generation process cannot quickly respond to large-scale and complex business needs, the data extraction efficiency is low, and the speed at which users obtain data and make decisions is affected.
[0006] To achieve the above object, the present invention provides an intelligent report generation method, comprising:
[0007] Build a business indicator data pool, which includes key business indicators and common business indicators;
[0008] Obtaining a business query request, parsing the business query request, and determining the query intent of the business query request;
[0009] Generate a data query script for querying business indicator data according to the query intention;
[0010] Execute the data query script to extract target business indicator data matching the query intent from the business indicator data pool;
[0011] Determine a target report format based on the business query request and the preset report format;
[0012] The target business indicator data is processed based on the target report format to generate a target report.
[0013] Furthermore, to achieve the above-mentioned purpose, the present invention provides an intelligent report generation device, comprising:
[0014] A data management module builds a business indicator data pool, which includes key business indicators and common business indicators;
[0015] A query parsing module, used to obtain a business query request, parse the business query request, and determine the query intent of the business query request;
[0016] A script generation module, used to generate a data query script for querying business indicator data according to the query intention;
[0017] A data extraction module, used to execute the data query script and extract target business indicator data matching the query intent from the business indicator data pool;
[0018] A report format determination module, used to determine a target report format based on the business query request and the preset report format;
[0019] The report generation module is used to process the target business indicator data based on the target report format to generate a target report.
[0020] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor, and an intelligent report generation program stored in the memory and executable on the processor, and the intelligent report generation program, when executed by the processor, implements the steps of the intelligent report generation method as described above.
[0021] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which is stored an intelligent report generation program, which implements the steps of the intelligent report generation method as described above when executed by a processor.
[0022] Beneficial effects: The present invention relates to the fields of artificial intelligence technology and financial technology, and discloses an intelligent report generation method, which includes building a business indicator data pool, including key business indicators and common business indicators; parsing business query requests, determining query intent; generating a query script for querying business indicator data; executing the query script, extracting target business indicator data that matches the query intent from the data pool; determining the target report format according to the business query request and the preset report format; processing the target business indicator data, and generating a target report. The present invention automatically identifies the query intent by parsing the user's query request, thereby avoiding the user from manually entering complex query conditions and simplifying user operations. At the same time, query scripts are automatically generated and data is efficiently extracted, reducing the process of manual script writing and significantly improving the efficiency of report generation. In addition, it supports the generation of reports according to the personalized needs of users, solves the problems of low report generation efficiency and insufficient personalized support in the prior art, and can quickly respond to large-scale and diversified report needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0024] Figure 1 A schematic diagram of an application environment of an intelligent report generation method in an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a flow chart of an embodiment of an intelligent report generation method of the present invention;
[0026] Figure 3 This is a functional module diagram of a preferred embodiment of the intelligent report generation device of the present invention;
[0027] Figure 4 A schematic diagram of the structure of a computer device in one embodiment of the present invention;
[0028] Figure 5 FIG. 4 is another schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0029] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0030] The intelligent report generation method provided by the embodiment of the present invention can be applied in Figure 1In an application environment, the user end communicates with the server end through a network. The server end can build a business indicator data pool through the user end, including key business indicators and common business indicators; parse business query requests to determine query intent; generate a query script for querying business indicator data; execute the query script to extract target business indicator data matching the query intent from the data pool; determine the target report format according to the business query request and the preset report format; process the target business indicator data and generate a target report. The present invention automatically identifies the query intent by parsing the user's query request, avoids the user from manually entering complex query conditions, and simplifies the user operation. At the same time, the query script is automatically generated and data is efficiently extracted, which reduces the process of manual script writing and significantly improves the efficiency of report generation. In addition, it supports the generation of reports according to the personalized needs of users, solves the problems of low report generation efficiency and insufficient personalized support in the prior art, and can quickly respond to large-scale and diversified report requirements. Among them, the user end can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server end can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0031] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of the intelligent report generation method provided by the present invention. It should be noted that although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0032] like Figure 2 As shown, the intelligent report generation method proposed by the present invention includes the following steps:
[0033] S10, constructing a business indicator data pool, wherein the data indicator pool includes key business indicators and common business indicators;
[0034] In this embodiment, the construction of the business indicator data pool is a structured database designed by the system to store and manage various business indicator data. The content stored in the data pool includes two main types of business indicators: key business indicators and common business indicators.
[0035] Key business indicators: refers to indicators that play a core role in corporate or financial decision-making, such as revenue, profit margin, customer churn rate, etc. These indicators usually need to be frequently queried and analyzed and are crucial to corporate strategic decision-making.
[0036] Common business indicators: refers to indicators that are often used in daily operations and analysis, but have relatively small influence, such as the number of orders, number of user registrations, etc.
[0037] The construction of the data pool is realized through a database system (such as a relational database or a distributed database). Different tables or views can be defined for each type of business indicator to store key and common business indicators respectively. Each table contains metadata related to the indicator, such as name, type, update time, etc. The data pool can be updated through batch import, real-time data streaming, regular synchronization, etc.
[0038] In the data indicator pool, data is stored by category, including key business indicators and common business indicators. The system can prioritize key business indicators when querying, or adjust the priority of different indicators according to different business scenarios in a classified and structured manner.
[0039] Key business indicators: Mainly used for high-priority data analysis. The system will classify these indicators in a high-priority data pool based on the frequency of data use and business scenarios to ensure the efficiency of query and analysis.
[0040] Common business indicators: Although these indicators are used frequently, they do not require high real-time performance and are usually classified as ordinary priority data pools.
[0041] The system can classify indicators into key and common indicators by means of labels or field markings. When querying, the system automatically selects appropriate data tables or views from the data pool for retrieval based on the query conditions. In terms of implementation, key indicators may use high-performance data storage structures (such as in-memory databases), while common indicators can be stored in traditional databases.
[0042] Example: In the financial field, the key business indicator data pool may include indicators such as net profit margin and return on capital that have a direct impact on the company's operating conditions. These data must be acquired and analyzed in real time to support investment decisions. Common business indicators may include daily transaction volume, number of registered users, etc. Although these indicators are important in daily operations, they do not require real-time analysis. Therefore, when building a business indicator data pool, the system can prioritize the storage and processing of key business indicators to ensure that financial institutions can obtain key data support in a timely manner when making decisions. The data pool can be implemented based on a distributed database (such as Hadoop, Cassandra). Key business indicators can be placed on distributed storage nodes with higher query performance to ensure fast access; while common indicators are distributed on storage nodes with general performance.
[0043] By building a data pool containing key and common business indicators, the system can achieve efficient query and response when processing query requests. Prioritizing key business indicators ensures the timeliness of decision-making, while the classified storage of common business indicators reduces the occupation of system resources, thereby improving the operating efficiency of the entire system, especially in the scenario of financial data analysis, which can obtain important business data faster to support decision-making.
[0044] S20, obtaining a business query request, parsing the business query request, and determining the query intent of the business query request;
[0045] In this embodiment, a service query request from a user or system is received through an interface. This request can be input in a variety of forms, including data in the form of text, voice, image, etc. The purpose of this step is to structure the information input by the user into a standard query request for subsequent parsing and processing.
[0046] The system designs an input interface to handle various forms of user input. For text input, the text information can be directly extracted; for voice data, speech recognition technology (such as ASR) is used to convert it into text; for image data, optical character recognition technology (OCR) is used to extract the text content. All of these data are finally unified into text format and enter the next step of the parsing process.
[0047] Parsing business query requests means that the system extracts meaningful query conditions or structured information from the acquired text data. For example, if a user queries "view sales in the second quarter of 2023", the system needs to identify the subject of the query (sales), time range (second quarter of 2023), and construct the corresponding query intent. This step ensures that the system can understand the user's query needs.
[0048] The system can use natural language processing (NLP) technology to parse text. Specifically, it includes syntactic analysis and keyword extraction to parse the user's intention. Syntactic analysis can be achieved through deep learning models (such as BERT, GPT) to identify the core elements of the query, such as the subject, time range, and geographic location. Match and map this information to a pre-defined business indicator data structure.
[0049] Query intent is a structured query request generated by the system based on the parsing results, which usually includes the query target (such as sales, profit, etc.), query scope (such as time, region, etc.) and query conditions. The goal of determining query intent is to provide clear input for subsequent data query and report generation.
[0050] The system determines the final query intent through parsed structured data. This process includes: identifying the query object (business indicator data), determining the time and space scope, parsing other limiting conditions proposed by the user, etc. Then, the system converts these conditions into internal standardized query statements or query structures to prepare for the generation of data query scripts.
[0051] Example: In the financial field, users may issue query requests such as "Query the total amount of loans issued in the fourth quarter of last year" or "View the rate of new customers in the past three months." The system first receives the user's input and converts it into text data (if the input is voice or image). Through natural language processing, the system parses the query target and limiting conditions from the query request.
[0052] For example, for "query the total amount of loans issued in the fourth quarter of last year", the system recognizes the query intent as "total amount of loans issued" (query target) and extracts "fourth quarter of last year" (time range) as a limiting condition. The system generates a query intent based on these parsing results: the user wants to query loan data within a specific time range. After being processed by the system, the query intent is automatically converted into a subsequent data query task, enabling the system to extract the loan data required by the user from the business data pool and display the corresponding report.
[0053] By automatically parsing business query requests and identifying query intent, the system can reduce reliance on manual operations and improve the processing efficiency of business queries. At the same time, the system can accurately identify user needs and generate structured query requests, making subsequent query and report generation processes more efficient. Especially when facing large-scale and complex query requests, automatic parsing and intent recognition functions can significantly improve user experience and data acquisition speed.
[0054] S30, generating a data query script for querying business indicator data according to the query intention;
[0055] In this embodiment, according to the determined query intent, the system needs to generate a query script for extracting data from the business indicator data pool. The query script can be an SQL script, or a suitable query statement can be generated according to different database types. The core of this step is to convert structured query conditions (such as query targets, time ranges, etc.) into executable database query scripts.
[0056] The query intent parsed by the system is mapped to specific database tables, fields, and filter conditions. For example, if the system recognizes from the query intent that the user wants to query "the total amount of loans issued in the fourth quarter of last year", it is necessary to map "the total amount of loans issued" to the corresponding table field in the database (such as loans_issued), map "the fourth quarter of last year" to a specific time range (such as 2022-10-01 to 2022-12-31), and automatically generate an SQL query script based on this information.
[0057] The query target refers to the data content that the user wants to obtain (such as the total amount of loans issued), and the query conditions include time range, geographical location, etc. These conditions are the basis for generating query scripts. The system extracts this information based on the query intent and maps it to specific fields in the database.
[0058] The system first extracts core elements from the parsed query intent, such as query indicators, time limits, etc. Then, the system maps these elements to tables and fields in the database according to the database structure. For example, "total amount of loans issued" is mapped to the loans_issued field in the database, and "last year's fourth quarter" is mapped to the time range from 2022-10-01 to 2022-12-31. Finally, these conditions are combined into SQL query statements for subsequent data extraction.
[0059] Generating query statements means converting the parsed query targets and query conditions into query scripts that meet database standards. This step converts query intent into database operation commands that can be directly executed.
[0060] The system can predefine a set of templates and generate the final query statement through template replacement technology. For example, the system predefines a SQL query template: SELECT{field}FROM{table name}WHERE{time condition}; then replace the placeholders in the template according to the fields (such as loans_issued), table names (such as financial_data) and time conditions in the query intent to generate a complete SQL query statement. This method can flexibly handle different query requests and quickly generate query scripts.
[0061] By automatically generating query scripts based on query intent, the system can efficiently extract data from the business indicator data pool, reducing the steps of manually writing SQL scripts. This not only improves query speed, but also reduces error rates, and is particularly suitable for complex query requirements and large data processing scenarios in the financial field. Users can obtain the required business data without having to master the database query language, which greatly simplifies the operation process.
[0062] S40, executing the data query script to extract target business indicator data matching the query intention from the business indicator data pool;
[0063] In this embodiment, after the query script is generated, the system enters the execution phase. The purpose of executing the data query script is to extract data that matches the query intent from the business indicator data pool. This step involves submitting SQL or other query scripts to the database engine for processing. The database engine retrieves the corresponding tables and fields and extracts matching data based on the query targets and conditions in the query script.
[0064] The system submits the generated query script to the database server through a database connection interface (such as JDBC or ODBC). The database engine parses the SQL query, finds the relevant data tables in the business indicator data pool, and performs data extraction through indexes and optimized query strategies. During the execution process, the system may also optimize the query script to improve the efficiency of data extraction.
[0065] The system extracts target data that matches the query intent from the business indicator data pool. The target data usually includes the specific business indicators queried by the user (such as sales, profit margin, etc.) and data under limited conditions (such as time range, geographic location, etc.). The system needs to ensure that the extracted data fully matches the user's query request.
[0066] Data extraction is controlled by the filter conditions (such as WHERE clause) in the query script, and the database engine extracts data based on these conditions. During the query execution, the system optimizes the data reading process based on indexes, table structures, etc. to reduce query time. The extracted data will be temporarily stored or directly transferred to the subsequent report generation module for further processing.
[0067] The system needs to ensure that the extracted data accurately matches the query intent. This means not only retrieving the correct data tables and fields, but also ensuring that query conditions such as time and space are met. For example, if the query intent is "sales in the first quarter of 2023", the system needs to extract sales data that meets this time range from the sales table and ignore other irrelevant time periods.
[0068] The system gradually filters the business indicator data pool through the structured query script generated by the query intent. For example, it filters out data related to the target time, geographic location and other business conditions, and then verifies the extracted results to ensure that the extracted data meets the query intent.
[0069] Example description: In the financial field, users may query "net profit data for the fourth quarter of last year". The system submits the query script generated by parsing to the database for execution. The query script specifies that the field net_profit needs to be extracted from the financial_metrics table and limits the time range to 2022-10-01 to 2022-12-31. During the execution process, the database engine extracts the net profit data that matches the query intent from the data pool through indexing and optimized query paths, and returns it for use by the report generation module. This ensures that financial analysts can quickly obtain accurate data for decision-making.
[0070] By executing the generated query script, the system can quickly and accurately extract data that matches the query intent from the business indicator data pool. This reduces the burden of manually writing and executing queries. At the same time, the use of optimized query strategies can improve data extraction efficiency, which is especially suitable for large-scale data processing scenarios in the financial field. This achieves a rapid response to complex business queries and ensures the accuracy and real-time nature of data extraction.
[0071] S50, determining a target report format based on the business query request and the preset report format;
[0072] In this embodiment, the system automatically identifies the user's query content and needs based on the user's business query request, and determines the appropriate data display format (such as table, graph, pie chart, etc.) according to the specific type of query. The query request may include time dimension, indicator selection, geographic dimension, etc. The system needs to select an appropriate report structure based on these contents to display the query results.
[0073] The system parses the key information in the business query request (such as the type of query indicator, time range, data volume, etc.), and maps these elements to the preset report template. The system may contain multiple preset report templates, which can be optimized for different data display requirements. Based on the specific content of the query request, the system automatically selects a suitable template. For example, for summary data, the system selects a table format, and for time series data, the system may choose a line chart or bar chart to display.
[0074] The system is not only based on the user's query request, but also refers to the preset report format in the system. The preset report format is usually a report structure defined in advance based on business needs, suitable for different data display scenarios. The report format may include various charts (such as line charts, bar charts), data tables, indicator comparisons, etc. The system automatically matches the most suitable data display format according to the needs in the business query request.
[0075] The system selects the most suitable data display format from multiple preset report formats through rules or algorithms. For example, for analytical queries, the system selects reports in the form of charts; for summary and comparison queries, the system selects data table formats. After the report format is determined, the system maps the data extracted by the query to the report format.
[0076] When determining the target report format, the system integrates the user's query requirements and preset templates to ensure that the final report structure can clearly and accurately display the data content required by the user. Different types of query requests (such as time series data, regional comparison data, etc.) will trigger different report structures.
[0077] The system can use rule-based decision trees or preset condition matching templates to select report formats. According to the indicator types and display requirements (such as overview, comparison, etc.) in the query content, different types of reports preset by the system are matched. Specific report display modes can be configured for different business scenarios to meet diverse business needs.
[0078] Example: In the financial field, users may query "profit growth rate in the four quarters of last year". After parsing the query request, the system recognizes that the query content is time series data, so it selects a line chart as the report format. In addition, if the user's query involves regional comparison data (such as "comparison of loan issuance in different regions"), the system will automatically select a bar chart format to display this data. By automatically selecting the target report format, financial analysts can quickly obtain reports that meet the display requirements and flexibly apply them in different business scenarios.
[0079] By combining business query requests with preset report formats, the system can provide the most suitable data display format while meeting user query needs. This not only ensures the efficiency of report generation, but also improves the accuracy and ease of use of data display. Users do not need to manually adjust the report format, the system can intelligently select, reducing the complexity of operation, especially in the financial industry, where a large amount of data needs to be displayed quickly. The system's automatic report generation function can significantly improve efficiency and decision support capabilities.
[0080] S60: Process the target business indicator data based on the target report format to generate a target report.
[0081] In this embodiment, after determining the target report format, the system needs to process the extracted target business indicator data according to the report format so as to adapt the data to a specific report structure. This processing step ensures that the format, content, and display method of the data are consistent with the report format to meet the needs of users.
[0082] The system first organizes the extracted business indicator data into a structured form, such as sorting, summarizing or calculating the data. The system can filter, aggregate and perform other operations on the data according to the fields and content required by the target report format. If the target report format is a line chart, the system will ensure that the data is sorted according to the time axis; if it is in table format, the data will be classified and summarized according to the preset dimensions to ensure that the data structure meets the requirements of the table.
[0083] The step of generating a target report is to fill the processed target business indicator data into the preset report template to generate the final visual report. Report generation usually involves visual display of data, including generating charts, tables, etc., and finally presenting it to users in graphical or tabular form.
[0084] The system can use a report generation engine (such as JasperReports, Tableau, etc.) to inject the processed data into the report template. According to the report format, the system maps the data to the corresponding graph or table. For example, for a bar chart, the system maps each business indicator data to the height of the bar chart; for a table, the system fills the data in columns and rows. The report generation engine automatically generates the target report based on the template and data, and the report can be exported to PDF, Excel or displayed through the user interface.
[0085] Before generating a report, the system needs to ensure that the format and content of the data can be adapted to the report structure. For example, for summary reports, the system needs to summarize the extracted data to ensure that the results displayed in the report meet the user's business needs. In addition, the system needs to adapt the data according to the report format to meet the display requirements of charts or tables.
[0086] The system can perform different data processing methods according to different report formats. For example, for time series data, the system sorts the data by time axis; for aggregate queries, the system calculates summary indicators such as sum and average. These processed data are filled into the target report format and generate the final report for users to view.
[0087] By processing the target business indicator data based on the target report format, the system can automatically generate reports that meet business needs, ensuring the accuracy and readability of data display. The process of automatically processing and generating reports simplifies user operations, especially when faced with complex data query and display requirements. The system can flexibly adjust the report format and automatically generate reports that meet user needs. It not only improves the efficiency of report generation, but also greatly reduces the complexity of users manually adjusting reports. It is particularly suitable for scenarios such as financial data analysis that require frequent report generation.
[0088] The present invention relates to the fields of artificial intelligence technology and financial technology, and discloses an intelligent report generation method, which includes building a business indicator data pool, including key business indicators and common business indicators; parsing business query requests, determining query intent; generating a query script for querying business indicator data; executing the query script, extracting target business indicator data matching the query intent from the data pool; determining the target report format according to the business query request and a preset report format; processing the target business indicator data, and generating a target report. The present invention automatically identifies the query intent by parsing the user's query request, thereby avoiding the user from manually inputting complex query conditions and simplifying user operations. At the same time, query scripts are automatically generated and data are efficiently extracted, reducing the process of manual script writing and significantly improving the efficiency of report generation. In addition, it supports the generation of reports according to the personalized needs of users, solves the problems of low report generation efficiency and insufficient personalized support in the prior art, and can quickly respond to large-scale and diversified report needs.
[0089] In one embodiment, in the above S20, parsing the service query request to determine the query intent of the service query request includes:
[0090] S201, analyzing the sentence structure of the business query request to determine the query operation type;
[0091] S202, extracting a query target from the business query request;
[0092] S203, identifying a query limiting condition from the business query request, wherein the query limiting condition includes a time range limit, a geographic area limit, and a quantity limit;
[0093] S204: Generate a structured query intent based on the query operation type, query target, and query restriction condition.
[0094] In this embodiment, the system first performs sentence structure analysis on the user's business query request to determine the operation type of the user's query. The query operation type can be "view", "statistics", "comparison" and other operations. The system identifies these operation types through grammatical analysis tools (such as natural language processing models) to ensure correct understanding of the query requirements.
[0095] The system uses natural language processing (NLP) technology to perform syntactic analysis on the input query request. Common technologies include part-of-speech tagging and dependency syntax analysis to identify the operation verbs in the request (such as "query", "analyze", "compare", etc.). The system determines the user's operation type based on these verbs and selects subsequent processing strategies based on the operation type. For example, the system recognizes that "view" in "view last year's sales" is a query operation type, and infers that the query intent is data extraction.
[0096] The system extracts the target content of the query from the parsed query request, which is usually the business indicators that the user is interested in (such as sales, profit margin, customer growth rate, etc.). The purpose of this step is to clarify what core business data the user wants to query.
[0097] The system uses keyword extraction or entity recognition technology to identify the query target. The query target is usually a noun or a noun phrase, which represents the business indicator that the user is concerned about. For example, in "Query the net profit in the fourth quarter of last year", the system identifies "net profit" as the query target. This query target is mapped to a specific business indicator in the system (such as the field net_profit in the database).
[0098] Query restrictions refer to the constraints that users attach when querying, which may include time range, geographical area, data quantity, etc. The system needs to identify these restrictions so that they can be used when generating query scripts later.
[0099] The system identifies specific query restrictions by parsing adverbial phrases, time expressions and other elements in the query request. Common restrictions include:
[0100] Time range: for example, "the fourth quarter of last year", "January to March 2023".
[0101] Geographical region: For example, "North American market", "China region".
[0102] Quantity limit: for example, "top 10", "maximum value".
[0103] The system can extract these conditions through regular expressions or predefined rules and use them as screening criteria for subsequent queries. For example, the system recognizes that the time limit in "sales in the fourth quarter of last year" is "October 1, 2022 to December 31, 2022".
[0104] Based on the query operation type, query target, and query qualification conditions, the system structures this information into query intent. Query intent is a structured object containing the core information of the query, which is used to generate query scripts later.
[0105] The system generates structured data objects based on the extracted operation type, query target, and limiting conditions. For example, the system may generate the following structured query intent for the user query "Query the net profit in the fourth quarter of last year":
[0106] {
[0107] "Operation Type":"Query",
[0108] "Query Target":"Net Profit",
[0109] "Time range": "2022-10-01 to 2022-12-31"
[0110] }. This structured object is used to generate data query scripts later and ensure that the query process is accurate and efficient.
[0111] This embodiment automatically parses the user's business query request and generates a structured query intent. The system can accurately understand the user's query needs and quickly convert them into a standardized query process. This reduces the complexity of user input and improves the system's response speed. Especially in the financial field, a large number of complex queries can be quickly parsed and executed, significantly improving data acquisition efficiency.
[0112] In one embodiment, the above S30 includes:
[0113] S301, parsing the structured information of the query intent, extracting the query target and query limiting conditions;
[0114] S302, mapping the query target to a corresponding table and a corresponding field in the business indicator database;
[0115] S303, generating a screening criterion according to the query limiting condition, and converting the screening criterion into a screening condition in an SQL query;
[0116] S304, based on the mapped tables and fields and the screening conditions, generate an SQL query script for extracting data from the business indicator database.
[0117] In this embodiment, the system first parses the structured information in the query intent and extracts the core query objectives (i.e., the business indicators that the user wants to obtain) and query limiting conditions (such as time range, geographical area, etc.). The purpose of this step is to convert the high-level business requirements in the query intent into specific query conditions, which are then mapped to specific tables and fields in the database.
[0118] The system extracts the query target and limiting conditions by analyzing the fields in the structured query intent object. For example, the system parses that the query target is "net profit" and the limiting condition is "first quarter of 2023". This information will serve as the basis for generating the query script. The system can use regular expressions, natural language processing technology, or predefined rules to extract key information from structured information.
[0119] The system needs to map the parsed query targets (such as "net profit" and "sales") to specific tables and fields in the database. Different query targets correspond to different database tables and fields. The purpose of this step is to match business indicators with the actual data storage location in the database.
[0120] The system maintains a mapping table to store the correspondence between business indicators and database tables and fields. For example, "net profit" may be mapped to the net_profit field in the financial_data table, and the system looks up the corresponding table and field in the mapping table based on the query target. The mapping table can be dynamically generated by the database metadata management system or manually configured through predefined rules.
[0121] Based on the limiting conditions in the query intent (such as time, geographic location, data range), the system generates corresponding screening criteria and converts these criteria into screening conditions in the SQL query (such as the WHERE clause). The purpose of this step is to ensure that the query script can filter out the correct data according to the user's needs.
[0122] The system analyzes the query restrictions and converts them into filter conditions in SQL syntax. For example, if the restriction is "first quarter of 2023", the system will convert it into an SQL filter condition: WHERE date>='2023-01-01'AND date<='2023-03-31'. The system combines the query restrictions with SQL statements through template replacement or dynamic SQL generation technology to generate precise filter conditions.
[0123] After obtaining the mapped tables, fields, and generated filter conditions, the system finally integrates this information to generate a complete SQL query script, which will be used to extract data that meets the query intent from the business indicator database.
[0124] The system generates a complete SQL query statement by inserting table names, field names, filter conditions and other elements into a standardized SQL template through a templated SQL generation tool or a custom SQL script generation module. For example: SELECTnet_profit
[0125] FROM financial_data
[0126] WHERE date>='2023-01-01'AND date<='2023-03-31'; This SQL query script can be directly submitted to the database for execution and return the target business data that meets the query conditions.
[0127] This embodiment analyzes query intent and automatically generates SQL query scripts, so that the system can quickly and efficiently extract the data required by users from the business indicator database. This reduces the burden of manually writing query scripts and improves the accuracy and response speed of data queries. Especially when processing large-scale and complex business queries, the function of automatically generating query scripts significantly improves the efficiency of the system and user experience.
[0128] In one embodiment, in the above S20, obtaining the service query request includes:
[0129] S205, receiving user input data, and identifying the type of the user input data;
[0130] S206, when the user input data is voice data, converting the voice data into text data by using voice recognition technology;
[0131] S207, when the user input data is image data, extracting text data from the image data by using optical character recognition technology;
[0132] S208, matching the text data based on a predefined query keyword list to extract preliminary business query content;
[0133] S209, filtering out business query requests from the preliminary business query content through context analysis.
[0134] In this embodiment, the system receives input data from the user, and the input form may include multiple types such as text, voice, image, etc. After receiving the input data, the system first identifies the type of the input data to determine which processing method to use to parse the data.
[0135] The system receives user data through the input interface and automatically detects the format of the input data through the data type recognition algorithm. For example, it determines whether the input data is text, voice or image through metadata analysis, file header information recognition or based on the source of user input (text box, microphone, picture upload, etc.). The system can use the multimedia input management module to process data in different formats.
[0136] When the system recognizes that the user input is voice data, it uses speech recognition technology (such as ASR: automatic speech recognition) to convert the voice into text. The purpose of this step is to convert the voice content into structured data that can be used for subsequent text processing.
[0137] The system converts user voice data into corresponding text data by calling a speech recognition engine (such as Google ASR, Microsoft Azure Speech, or a custom speech recognition model). During the conversion process, the system performs speech segmentation, phoneme recognition, and language modeling to convert speech into text. The speech recognition results are stored in a standard text format for use by subsequent text processing modules.
[0138] If the input data is an image, the system uses optical character recognition (OCR) technology to extract the text information contained in the image. The purpose of this step is to extract the text content in the image as the basis for subsequent business query analysis.
[0139] The system recognizes and extracts text information in image data into a processable text format by calling an OCR engine (such as Tesseract OCR, Google Vision, etc.). The OCR engine first preprocesses the image (such as denoising, binarization, etc.), then extracts characters in the image through a character recognition algorithm, and finally converts the extracted character information into structured text data.
[0140] The system performs keyword matching on the processed text data, identifies key business terms in the text, and thus preliminarily extracts content that may be related to the business query. The keyword matching list contains common business query terms, and the system finds preliminary query content from the text based on these terms.
[0141] The system uses a predefined query keyword list to process text data through regular expressions, keyword matching, or a keyword extraction module based on natural language processing technology. For example, the keyword list may include common business query terms such as "sales", "profit", and "quarter". The system scans the text content, extracts the parts that match these keywords, and forms preliminary query content.
[0142] After completing the keyword matching, the system further screens the initially extracted query content through context analysis technology to identify the final business query request. Context analysis can help the system understand the semantic associations in the text and ensure that the extracted query content is highly matched with business needs.
[0143] The system uses natural language processing (NLP) tools (such as BERT, GPT and other language models) to perform contextual semantic analysis on the preliminary query content, identifying the syntactic structure in the text, the dependency relationship between words, etc. The system can filter out irrelevant content through context information to ensure that the identified query requests are consistent with business needs. For example, the system can ensure that the identified query requests are specific and executable by analyzing the time, location and indicators in the query.
[0144] By receiving various types of user input data (such as voice, image, text, etc.) and automatically identifying the business query requests therein, the system can simplify user operations and improve the flexibility of data input. At the same time, through voice recognition and OCR technology, the system can convert non-text data into structured text, improving the system's parsing ability and adaptability. Combined with context analysis technology, the system can accurately filter out the final business query request from the preliminary query content, thereby improving the accuracy and efficiency of the query.
[0145] In one embodiment, the above S40 includes:
[0146] S401, loading the data query script into the query processing node to execute the query task;
[0147] S402, decomposing the query task into multiple sub-query tasks, and executing the multiple sub-query tasks in parallel;
[0148] S403, extracting sub-business indicator data matching the query intent from the business indicator data pool according to the screening conditions in each sub-query task;
[0149] S404: Merge all sub-business indicator data to generate target business indicator data.
[0150] In this embodiment, the system first loads the generated SQL query script to a processing node, which can be a database server or an execution unit of a distributed query processing system. The purpose of this step is to assign the query task to the system's processor so that it can execute the query and obtain data.
[0151] The system submits the SQL query script to the database engine through the database connection interface (such as JDBC, ODBC). After receiving the query task, the database engine parses the query script and allocates resources for executing the query task. For a distributed environment, the system can allocate query tasks to multiple processing nodes through the scheduler to improve the efficiency of task execution.
[0152] When a query task involves a large amount of data or a complex query, the system breaks it down into multiple subquery tasks. Each subquery task is responsible for querying a specific part of the data set, and multiple subquery tasks can be executed in parallel, thereby improving query efficiency.
[0153] The system decomposes the entire query task into multiple subtasks based on the query conditions and the database sharding or partitioning strategy. Each subtask performs a portion of the data extraction work of the original query task. Distributed database systems such as Hadoop and Spark support decomposing query tasks into subtasks, and executing these tasks in parallel by different nodes. The system uses the task scheduling module to ensure that these subquery tasks run in parallel on multiple processing nodes to maximize the use of computing resources.
[0154] Each subquery task extracts data from the business indicator data pool according to pre-defined filtering conditions. The filtering conditions are generated based on the constraints of the query intent (such as time, location, etc.), and each subquery task is responsible for retrieving data fragments that meet the conditions.
[0155] Each subquery task extracts data from a specified data partition or table based on its corresponding filtering conditions (such as time period, geographic location, etc.). The system speeds up data extraction through indexing technology. Each subquery task processes a smaller subset of data, so it can be completed faster. The system ensures that the task is completed in the shortest time through an efficient data retrieval mechanism.
[0156] After all sub-query tasks executed in parallel are completed, the system merges the data extracted by all sub-tasks to generate complete target business indicator data. This step ensures that the data extracted from multiple nodes can be integrated into a complete query result.
[0157] The system merges the result sets from each subquery task through aggregation operations. The specific merging method depends on the type of query, such as data summation, average calculation, etc. For complex distributed queries, the system aggregates the results of each subquery into complete business indicator data through MapReduce or other parallel computing frameworks.
[0158] Example description: In the financial field, users may query "customer growth rate in each quarter of the past three years". The system first generates the corresponding query script and loads it to the distributed query processing node. The system decomposes the query task into multiple sub-query tasks, each task is responsible for querying data in different years and quarters. Each sub-task extracts customer growth rate data from the business indicator data pool according to the time filter condition. Finally, the system merges the data extracted by all sub-tasks to generate complete business indicator data, showing the quarterly customer growth rate trend in the past three years.
[0159] In this embodiment, by decomposing the query task into multiple sub-query tasks for parallel execution, the system can greatly improve the query efficiency, especially when processing large-scale data. Parallel query tasks can make full use of computing resources and reduce query time. By merging the data of sub-query tasks, the system can generate complete target business indicator data to ensure the integrity and accuracy of the query results.
[0160] In one embodiment, in the above S60, before generating the target report, the following step is further included:
[0161] S601, defining input parameters and output parameters of the data interface, wherein the input parameters are used to set the screening conditions when the report module calls data, and the output parameters are used to set the data type and format of the transmission;
[0162] S602, encapsulating the processed target business indicator data into a standardized interface format, and organizing the target business indicator data according to a preset data transmission protocol;
[0163] S603, generating a standardized data interface based on the parameters of the data interface and the data transmission protocol, wherein the standardized data interface enables the report module to obtain the encapsulated target business indicator data through a unified protocol and data format, and is used to generate a target report.
[0164] In this embodiment, before generating a report, the system first needs to define the input and output parameters of the data interface. The input parameters are used to set the screening conditions (such as time range, data type, etc.) required when the report module calls data, and the output parameters are used to specify the data type and format (such as data field, data format, encoding method, etc.) of the transmission. This step ensures that the report module can call and receive data correctly.
[0165] The system defines a set of input parameters based on the report generation requirements, which can be time range, user ID, region, etc. The system defines these input parameters through configuration files or API interfaces and passes them to the report module. The output parameters define the data format required for report generation, which may include JSON, XML or other formats. The system ensures that data can be transmitted in the correct format and type by defining standardized data interfaces.
[0166] The system encapsulates the processed target business indicator data and converts it into a format that conforms to the standardized interface so that the data can be transmitted through a unified protocol. The standardized interface format ensures the compatibility of data between different modules or systems and ensures that data can be transmitted seamlessly.
[0167] The system encapsulates business indicator data into a format that complies with the preset data transmission standard. Common encapsulation formats include JSON, XML, or CSV. The system uses serialization tools to encapsulate data in a standard format for subsequent data transmission and call. The encapsulation process also includes data compression, encoding, and encryption to ensure data security and efficient transmission.
[0168] The data transmission protocol defines how data is transmitted between different systems or modules. The system organizes business indicator data according to the preset transmission protocol (such as HTTP, WebSocket, REST, etc.) and ensures that the data format, type and order during transmission meet the protocol requirements. The transmission protocol can be synchronous or asynchronous, depending on the system requirements.
[0169] The system organizes business indicator data according to the transmission protocol of the data interface. For HTTP transmission, the system can encapsulate the data in the response body of the HTTP request; for WebSocket transmission, the system transmits the data to the target module through real-time communication. During the transmission process, the data needs to comply with the format specifications of the protocol, such as the message header, message body, status code, etc.
[0170] The system generates a standardized data interface based on the previously defined interface parameters (input, output) and data transmission protocol. The standardized data interface ensures that data calls within the system or across systems can be made through a unified protocol and format, reducing compatibility issues between modules.
[0171] The system generates standardized data interfaces that conform to the transmission protocol and parameter definitions through interface generation tools or API definition tools. For example, the system can generate RESTful APIs, allowing the reporting module to call business indicator data through GET and POST requests. The generation of standardized interfaces uses interface description languages (such as OpenAPI, WSDL, etc.) to describe the interface's functions, data formats, and calling methods.
[0172] Finally, the report module obtains the encapsulated target business indicator data through a unified data interface. This step ensures that the data can be accurately passed to the report generation module to generate the final target report.
[0173] The report module obtains the encapsulated data by initiating API calls, interface requests or through Web services. The system can transmit the encapsulated business data through HTTP protocol, WebSocket connection, etc. After receiving the data, the report module decapsulates the data, converts it into an internal format, and uses it to generate reports.
[0174] Example description: In the financial field, the system needs to generate a report on "Customer growth rate in Q1 2023". First, the system defines the input parameter of the data interface as "time range (Q1 2023)" and the output parameter as "customer growth rate data, formatted as JSON". Then, the system encapsulates the processed customer growth rate data into JSON format and organizes the data according to the HTTP protocol. The generated standardized data interface is transmitted to the report module through the REST API. After the report module decapsulates the data, it generates a target report that meets customer needs.
[0175] In this embodiment, by defining the input and output parameters of the data interface and generating a standardized interface, the system ensures the correct transmission of data and the consistency of calling the report generation module. The standardized interface reduces compatibility issues between modules and improves the efficiency and accuracy of data transmission. The system can automatically adapt to different data formats and transmission protocols to ensure that the report module can obtain the encapsulated business indicator data and smoothly generate the target report. Especially in complex business scenarios, this automated interface encapsulation and transmission mechanism greatly improves the efficiency of data processing and report generation.
[0176] In one embodiment, in the above S60, after generating the target report, the following step is further included:
[0177] S701, recording the user's historical query data, wherein the historical query data includes the query report type, query condition, and query frequency;
[0178] S702, analyzing the historical query data to generate a user query behavior model;
[0179] S703, when the query interface is accessed, predicting the user's query content based on the user's query behavior model;
[0180] S704: Generate and display a recommendation report based on the predicted query content.
[0181] In this embodiment, after generating the target report, the system will record the user's historical query data, which includes the report type selected by the user, specific query conditions (such as time range, indicator selection, etc.) and query frequency. The historical query data is used for subsequent user behavior analysis to help the system provide personalized services based on the user's usage habits.
[0182] The system creates a query log for each user, recording the detailed information of each query operation. The information stored in the log includes the type of report queried (such as time series graphs, bar charts, etc.), the specific conditions of the query (such as "query sales in Q1 2023"), and the frequency of the query. The log can be stored in a database or distributed log management system (such as Elasticsearch, Kafka, etc.) for subsequent analysis.
[0183] The system generates a user query behavior model by analyzing the user's historical query data. This model is used to predict the user's future query needs. Based on the user's past query habits, the system can automatically identify the user's preferences and common query patterns.
[0184] The system can analyze historical query data through machine learning models (such as collaborative filtering, rule-based models, etc.) to extract the characteristics of user behavior. For example, the system can generate a personalized query behavior model by analyzing the user's query frequency, query target, query conditions and other data. The model is trained based on the user's query habits and continuously updated to improve the accuracy of the prediction.
[0185] When the user visits the query interface again, the system predicts the user's possible query content by calling the user's query behavior model. The system analyzes the user's query target, time range or other conditions based on the model and automatically generates possible query suggestions.
[0186] When a user logs in or accesses the query interface, the system calls the query behavior model in real time to predict future query needs based on the user's behavior history. The predicted query content may include the report type, time range, or business indicators that the user frequently uses. The system calculates the user's most likely query content based on the model and generates recommended query suggestions or directly executes the query.
[0187] The system automatically generates recommendation reports based on the prediction results of the user behavior model and displays these reports when users visit. These reports are based on user preferences and historical behaviors, and do not require users to manually enter query conditions, and can directly display the data that users care about most.
[0188] The system automatically generates the corresponding query script and executes the query task based on the predicted query content. The generated data is displayed to the user through the system's report generation module, and the user can directly view the reports recommended by the system. The recommended reports can be the types of reports that users often query, or the report content inferred by the system based on historical behavior.
[0189] Example: In the financial field, users often query quarterly financial reports. The system records the user's historical query data, analyzes the user's query behavior each quarter, and generates a user query behavior model. The next time the user accesses the system, the system predicts that the user may query the latest quarter's financial data based on the model, and automatically generates the financial report of that quarter as a recommended report to display to the user. In this way, users do not need to manually enter query conditions, and the system can intelligently generate and display the reports they are interested in, significantly improving query efficiency and user experience.
[0190] By recording the user's historical query data and generating a query behavior model, this embodiment enables the system to intelligently predict the user's query needs and automatically generate a recommendation report. This reduces the frequency of users manually entering query conditions and improves the efficiency of query and report generation. The system makes personalized recommendations based on the user's historical behavior, which improves the user experience. Especially when processing large amounts of data, users can quickly obtain the information they need, significantly improving the efficiency of business decision-making.
[0191] In one embodiment, an intelligent report generation device is provided, and the intelligent report generation device corresponds one-to-one to the intelligent report generation method in the above embodiment. Figure 3 , Figure 3 This is a functional module diagram of a preferred embodiment of the intelligent report generation device of the present invention. Data management module 10, query analysis module 20, script generation module 30, data extraction module 40, report format determination module 50 and report generation module 60. The detailed description of each functional module is as follows:
[0192] A data management module 10 is used to construct a business indicator data pool, wherein the data indicator pool includes key business indicators and common business indicators;
[0193] The query parsing module 20 is used to obtain a business query request, parse the business query request, and determine the query intent of the business query request;
[0194] A script generation module 30, used to generate a data query script for querying business indicator data according to the query intention;
[0195] A data extraction module 40 is used to execute the data query script and extract target business indicator data matching the query intention from the business indicator data pool;
[0196] A report format determination module 50, configured to determine a target report format based on the business query request and the preset report format;
[0197] The report generation module 60 is used to process the target business indicator data based on the target report format to generate a target report.
[0198] In one embodiment, the query parsing module 20 is specifically configured to:
[0199] Analyze the sentence structure of the business query request to determine the query operation type;
[0200] Extracting a query target from the business query request;
[0201] Identifying a query restriction condition from the business query request, wherein the query restriction condition includes a time range restriction, a geographic area restriction, and a quantity restriction;
[0202] Based on the query operation type, query target and query restriction conditions, a structured query intent is generated.
[0203] In one embodiment, the script generation module 30 is specifically used to:
[0204] Parsing the structured information of the query intent, extracting the query target and query limiting conditions;
[0205] Mapping the query target to a corresponding table and a corresponding field in the business indicator database;
[0206] Generating screening criteria according to the query limiting conditions, and converting the screening criteria into screening conditions in the SQL query;
[0207] Based on the mapped tables and fields and the screening conditions, an SQL query script is generated to extract data from the business indicator database.
[0208] In one embodiment, the query parsing module 20 is specifically configured to:
[0209] Receiving user input data and identifying the type of the user input data;
[0210] When the user input data is voice data, the voice data is converted into text data by using voice recognition technology;
[0211] When the user input data is image data, extracting text data from the image data by optical character recognition technology;
[0212] Match text data based on a predefined list of query keywords to extract preliminary business query content;
[0213] Through context analysis, business inquiry requests are filtered out from preliminary business inquiry content.
[0214] In one embodiment, the data extraction module 40 is specifically used for:
[0215] Loading the data query script into the query processing node to execute the query task;
[0216] Decomposing the query task into multiple sub-query tasks, and executing the multiple sub-query tasks in parallel;
[0217] Extracting sub-business indicator data matching the query intent from the business indicator data pool according to the screening conditions in each sub-query task;
[0218] Merge all sub-business indicator data to generate target business indicator data.
[0219] In one embodiment, the report generation module 60 is specifically used to:
[0220] Define the input parameters and output parameters of the data interface. The input parameters are used to set the screening conditions when the report module calls data, and the output parameters are used to set the data type and format of the transmission;
[0221] Encapsulate the processed target business indicator data into a standardized interface format and organize the target business indicator data according to a preset data transmission protocol;
[0222] A standardized data interface is generated based on the parameters of the data interface and the data transmission protocol. The standardized data interface enables the report module to obtain encapsulated target business indicator data through a unified protocol and data format, and is used to generate a target report.
[0223] In one embodiment, the report generation module 60 is specifically used to:
[0224] Record the user's historical query data, including the query report type, query conditions and query frequency;
[0225] Analyze the historical query data to generate a user query behavior model;
[0226] When the query interface is accessed, the user's query content is predicted based on the user's query behavior model;
[0227] Generate and display recommended reports based on the predicted query content.
[0228] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external user terminal through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of the server side of an intelligent report generation method.
[0229] In one embodiment, a computer device is provided. The computer device may be a user terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of a user side of an intelligent report generation method
[0230] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0231] Build a business indicator data pool, which includes key business indicators and common business indicators;
[0232] Obtaining a business query request, parsing the business query request, and determining the query intent of the business query request;
[0233] Generate a data query script for querying business indicator data according to the query intention;
[0234] Execute the data query script to extract target business indicator data matching the query intent from the business indicator data pool;
[0235] Determine a target report format based on the business query request and the preset report format;
[0236] The target business indicator data is processed based on the target report format to generate a target report.
[0237] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0238] Build a business indicator data pool, which includes key business indicators and common business indicators;
[0239] Obtaining a business query request, parsing the business query request, and determining the query intent of the business query request;
[0240] Generate a data query script for querying business indicator data according to the query intention;
[0241] Execute the data query script to extract target business indicator data matching the query intent from the business indicator data pool;
[0242] Determine a target report format based on the business query request and the preset report format;
[0243] The target business indicator data is processed based on the target report format to generate a target report.
[0244] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the user side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0245] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0246] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0247] It should be noted that if software tools or components other than those of the Company appear in the embodiments of the present application, they are only used for illustration and do not represent actual use. The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the above-mentioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An intelligent report generation method, characterized in that: The following steps are involved: Build a business indicator data pool, which includes key business indicators and common business indicators; Obtaining a business query request, parsing the business query request, and determining the query intent of the business query request; Generate a data query script for querying business indicator data according to the query intention; Execute the data query script to extract target business indicator data matching the query intent from the business indicator data pool; Determine a target report format based on the business query request and the preset report format; The target business indicator data is processed based on the target report format to generate a target report.
2. The intelligent report generation method according to claim 1, characterized in that: Parsing the business query request to determine the query intent of the business query request includes: Analyze the sentence structure of the business query request to determine the query operation type; Extracting a query target from the business query request; Identifying a query restriction condition from the business query request, wherein the query restriction condition includes a time range restriction, a geographic area restriction, and a quantity restriction; Based on the query operation type, query target and query restriction conditions, a structured query intent is generated.
3. The intelligent report generation method according to claim 1, characterized in that: Generate a data query script for querying business indicator data according to the query intent, including: Parsing the structured information of the query intent, extracting the query target and query limiting conditions; Mapping the query target to a corresponding table and a corresponding field in the business indicator database; Generating screening criteria according to the query limiting conditions, and converting the screening criteria into screening conditions in the SQL query; Based on the mapped tables and fields and the screening conditions, an SQL query script is generated to extract data from the business indicator database.
4. The intelligent report generation method according to claim 1, characterized in that: Get business query request, including: Receiving user input data and identifying the type of the user input data; When the user input data is voice data, the voice data is converted into text data by using voice recognition technology; When the user input data is image data, extracting text data from the image data by optical character recognition technology; Match text data based on a predefined list of query keywords to extract preliminary business query content; Through context analysis, business inquiry requests are filtered out from preliminary business inquiry content.
5. The intelligent report generation method according to claim 1, characterized in that: Executing the data query script to extract target business indicator data matching the query intent from the business indicator data pool includes: Loading the data query script into the query processing node to execute the query task; Decomposing the query task into multiple sub-query tasks, and executing the multiple sub-query tasks in parallel; Extracting sub-business indicator data matching the query intent from the business indicator data pool according to the screening conditions in each sub-query task; Merge all sub-business indicator data to generate target business indicator data.
6. The intelligent report generation method as claimed in claim 1, characterized in that: Before generating the target report, it also includes: Define the input parameters and output parameters of the data interface. The input parameters are used to set the screening conditions when the report module calls data, and the output parameters are used to set the data type and format of the transmission; Encapsulate the processed target business indicator data into a standardized interface format and organize the target business indicator data according to a preset data transmission protocol; A standardized data interface is generated based on the parameters of the data interface and the data transmission protocol. The standardized data interface enables the report module to obtain encapsulated target business indicator data through a unified protocol and data format, and is used to generate a target report.
7. The intelligent report generation method according to claim 1, characterized in that: After generating the target report, it also includes: Record the user's historical query data, including the query report type, query conditions and query frequency; Analyze the historical query data to generate a user query behavior model; When the query interface is accessed, the user's query content is predicted based on the user's query behavior model; Generate and display recommended reports based on the predicted query content.
8. An intelligent report generation device, characterized in that: The intelligent report generation device comprises: A data management module is used to build a business indicator data pool, which includes key business indicators and common business indicators; A query parsing module, used to obtain a business query request, parse the business query request, and determine the query intent of the business query request; A script generation module, used to generate a data query script for querying business indicator data according to the query intention; A data extraction module, used to execute the data query script and extract target business indicator data matching the query intent from the business indicator data pool; A report format determination module, used to determine a target report format based on the business query request and the preset report format; The report generation module is used to process the target business indicator data based on the target report format to generate a target report.
9. A computer device, characterized in that: The computer device includes a memory, a processor, and an intelligent report generation program stored in the memory and executable on the processor. When the intelligent report generation program is executed by the processor, the steps of the intelligent report generation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The storage medium stores an intelligent report generation program, and when the intelligent report generation program is executed by the processor, the steps of the intelligent report generation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Electronic map generation system and method for characteristic agricultural economy
CN119807323A
Data processing method and system, storage medium and electronic equipment
CN120873021A
Data query method and device, equipment and storage medium
CN121117062A