Question and answer-based report generation method and device, medium and product
By parsing user query requests using a semantic parsing model, determining the target dimension table and optional business indicators, and generating accurate target reports, this solves the problem of inaccurate report data in existing technologies and achieves efficient report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE GRP GUANGDONG CO LTD
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the data obtained by users in querying and retrieving business status analysis reports is inaccurate, resulting in low report generation efficiency.
By parsing user query requests based on a semantic parsing model, the target dimension table and optional business indicators are determined, and a precise target report is generated using a report template.
It improves the efficiency and accuracy of report generation, quickly matches business indicator information that meets user needs, and enhances the efficiency and accuracy of report generation.
Smart Images

Figure CN121920334A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data analytics, and in particular to a question-and-answer-based report generation method, device, medium, and product. Background Technology
[0002] In the production and operation of various industries, business performance analysis is an important means to enhance corporate competitiveness and optimize resource allocation; among them, obtaining business performance reports through user queries is a common method of business performance analysis.
[0003] In related technologies, when users query and obtain business performance analysis reports, the business performance analysis reports containing target data that users need can be obtained by asking user questions.
[0004] However, the solutions for obtaining business status analysis reports based on user queries provided in related technologies often suffer from inaccurate data in the obtained business status analysis reports. Summary of the Invention
[0005] This disclosure was made in view of the above-mentioned problems. This disclosure provides a question-and-answer based report generation method, device, medium, and product that can improve report generation efficiency and accuracy.
[0006] According to a first aspect of this disclosure, a question-and-answer based report generation method is provided, the method being applied to a server, comprising: After receiving a query request from a user terminal, the query request is parsed using a semantic parsing model to obtain multiple keywords; Based on the first keyword among the multiple keywords, a target dimension table is determined from multiple candidate dimension tables. The multiple candidate dimension tables each contain different business scenario information related to different business types. Each candidate dimension table uniquely corresponds to an indicator information table. The indicator information table is constructed based on business operation information under the business scenario and is an information table of multiple business indicators related to the business scenario. The first keyword is the keyword among the multiple keywords used to characterize the business type. In the target indicator information table associated with the target dimension table, determine the optional business indicators that match at least one second keyword, and obtain the field values of each optional business indicator; Based on the first keyword, at least one of the second keywords, the field values of each optional business indicator, and the report template, a target report is generated and the target report is sent to the user terminal.
[0007] According to a second aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of the first aspect.
[0008] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method of the first aspect.
[0009] According to a fourth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the first aspect.
[0010] The question-and-answer based report generation method, device, medium, and product disclosed herein can, on the one hand, quickly match the target dimension table related to the business type queried by the user based on the first keyword, so as to quickly obtain the field values of the business indicators that the user needs based on the target indicator information table that uniquely corresponds to the target dimension table, thereby improving the efficiency of generating the target report; on the other hand, since each candidate dimension table uniquely corresponds to one indicator information table, the field values of the optional business indicators that match the second keyword can be accurately obtained from the target indicator information table associated with the target dimension table based on the second keyword, thereby improving the accuracy of the generated target report.
[0011] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0012] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0013] Figure 1 This is a schematic diagram illustrating an implementation scenario of a question-and-answer-based report generation scheme according to an embodiment of this disclosure.
[0014] Figure 2 This is a flowchart of a question-and-answer based report generation method according to an embodiment of this disclosure.
[0015] Figure 3 This is a server system architecture diagram of a question-and-answer based report generation scheme according to an embodiment of this disclosure.
[0016] Figure 4 This is an interactive flowchart of a question-and-answer based report generation method according to an embodiment of this disclosure.
[0017] Figure 5 This is a block diagram of the functional modules of a question-and-answer based report generation device according to an embodiment of this disclosure.
[0018] Figure 6 This is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure.
[0019] Figure 7 This is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0021] To address the aforementioned problems, embodiments of this disclosure provide a question-and-answer based report generation scheme, such as... Figure 1 As shown, Figure 1 This illustration shows a schematic diagram of an implementation scenario for a question-and-answer-based report generation scheme provided by an exemplary embodiment of this disclosure. For example... Figure 1 As shown, the implementation scenario 100 includes a server 101 and a user terminal 102. The server 101 is a server used by a production and operation enterprise, such as a server of a telecommunications operator or a server of an e-commerce enterprise; the user terminal 102 is a terminal device used by a user, which can be a computer, laptop, tablet, mobile phone or wearable device, etc.
[0022] A communication link can be established between the server 101 and the user terminal 102 to implement the question-and-answer-based report generation scheme provided in this embodiment.
[0023] Figure 2 The flowchart illustrates an exemplary embodiment of the present disclosure of a question-and-answer based report generation method, which can be applied to a server, such as... Figure 2 As shown, the method in this embodiment of the disclosure may include: Step S201: After receiving the query request sent by the user terminal, the query request is parsed based on the semantic parsing model to obtain multiple keywords; Step S202: Based on the first keyword among multiple keywords, determine the target dimension table from multiple candidate dimension tables; Among them, multiple candidate dimension tables contain different business scenario information related to different business types. Each candidate dimension table uniquely corresponds to an indicator information table. The indicator information table is constructed based on business operation information under the business scenario. It is an information table of multiple business indicators related to the business scenario. The first keyword is the keyword used to represent the business type among multiple keywords. Step S203: In the target indicator information table associated with the target dimension table, determine the optional business indicators that match at least one second keyword, and obtain the field values of each optional business indicator. Step S204: Based on the first keyword, at least one second keyword, the field value of each optional business indicator, and the report template, generate a target report and send the target report to the user terminal. In summary, the question-and-answer-based report generation method provided in this disclosure can, after receiving a query request from a user, firstly filter target dimension tables related to the user's queried business type from multiple candidate dimension tables using a first keyword representing the business type in the query request. Then, based on a second keyword, read data matching the user's intent from a target indicator information table uniquely associated with the target dimension table, and generate a target report based on a report template. On the one hand, it can quickly match target dimension tables related to the user's queried business type based on the first keyword, so as to quickly obtain the field values of the business indicators that the user needs based on the target indicator information table uniquely corresponding to the target dimension table, thereby improving the efficiency of generating the target report. On the other hand, since each candidate dimension table uniquely corresponds to one indicator information table, it can accurately obtain the field values of optional business indicators matching the second keyword from the target indicator information table associated with the target dimension table, thereby improving the accuracy of the generated target report.
[0024] The following are Figure 2 The specific implementation methods of each step in the illustrated embodiment are described in detail below: In step S201, after receiving the query request sent by the user terminal, the server parses the query request based on the semantic parsing model to obtain multiple keywords.
[0025] In this embodiment of the disclosure, multiple keywords are used to characterize the user's query purpose. Specifically, they can be determined based on actual needs, and this embodiment of the disclosure does not limit this. The semantic parsing model is a large language model. For example, the large language model can be a neural network model based on the BERT architecture.
[0026] In one optional implementation, the process of training a neural network model on the server may include: acquiring an industry information set associated with each business type; then, performing preliminary iterative training on the semantic parsing model to be trained based on the industry information set to obtain an initial semantic parsing model; further, performing iterative training again on the initial semantic parsing model based on a user history question-and-answer information set associated with each business type to obtain the semantic parsing model. Preliminary training of the semantic parsing model can be based on different industry information associated with different business types, enabling the semantic parsing model to more accurately understand the key information of different industries. Furthermore, after retraining the initially trained semantic parsing model using the user history question-and-answer information set, the accuracy of the trained semantic parsing model in extracting keywords from query requests can be improved.
[0027] It should be noted that, in the embodiments disclosed herein, the industry information sets associated with each business type are usually different based on the actual situation of different industries. For example, for telecommunications operation business, industry information may include industry reports, technical documents, customer service records, etc.
[0028] Optionally, the semantic parsing model includes: a Transformer backbone layer, a text encoder, and an output layer connected in sequence. The output layer includes a bottleneck classification unit for predicting the type of bottleneck during business operation, a resource prediction unit for predicting the resource demand during business operation, a text-metric matching unit for evaluating the correlation between text information and business operation metric data, and a semantic prediction unit for identifying the semantic content in the text information.
[0029] The process of the server performing preliminary iterative training on the semantic parsing model to be trained based on the industry information set to obtain the initial semantic parsing model may include: inputting text information from the industry information set into the semantic parsing model to obtain predicted semantic vectors; then, adjusting the model weights of the text encoder based on the predicted semantic vectors, the semantic labels of the industry information set, and a first loss function, while keeping the model weights of the Transformer backbone layer fixed until the convergence condition of the text encoder is met; further, inputting text information from the industry information set and business operation indicator data into the semantic parsing model to obtain predicted business evaluation indicator values, and adjusting the model weights of the text encoder and the Transformer backbone layer based on the predicted business evaluation indicator values, the business evaluation label values of the industry information set, and a second loss function until the convergence condition of the semantic parsing model is met; wherein, the convergence condition of the text encoder and the convergence condition of the semantic parsing model can be determined based on actual needs, and this embodiment of the disclosure does not limit this; the business evaluation indicators may include bottleneck classification indicators, resource prediction indicators, and text-indicator matching indicators.
[0030] For example, the part of the server-side code that adjusts the weights of the text encoder is as follows: for text,label in telecom_text_data; loss1 = model.update(text_encoder_only=True, labels=label); In the code section where the server adjusts the weights of the text encoder, "text" represents text information concentrated in the industry, such as user inquiry records ("How to apply for a 5G package"), fault descriptions ("Frequent network lag in a certain community"), business document fragments ("Base station coverage optimization plan"), etc. The core is to expose the model to telecommunications-specific terminology and basic text scenarios.
[0031] The label represents the semantic tag corresponding to the text information and is used to guide the model in learning domain semantics. For example, "text type: fault complaint", "business category: 5G service", "term tag: base station coverage", etc. It is the "standard answer" to judge whether the semantic encoding of the model is accurate.
[0032] `text_encoder_only=True` means only the text encoder is updated, the Transformer backbone layer is frozen, and `loss1` is the first loss function, which can be the cross-entropy loss function.
[0033] Additionally, the server-side code that adjusts the model weights of the text encoder and the Transformer backbone layer is as follows: for (text, metrics), label in full_dataset; loss2 = model.update(all_params=True, labels=label); In the code section where the server adjusts the model weights of the text encoder and the Transformer backbone layer, metrics represent business operation indicator data, forming joint data of "text information + business operation indicators". For example, if the text is a user complaint about network lag in a certain area, then the metrics are the bandwidth utilization rate of 85%, base station latency of 42ms, and 5G user penetration rate of 60% in that area. The core is to let the model learn the relationship between text description information and business operation data.
[0034] `all_params=True` indicates a full model parameter update, unfreezing the Transformer backbone layer; `loss2` represents the second loss function. (Formula 1) In Formula 1, α, β, and γ are weight values that can be determined based on actual needs. CrossEntropy represents the difference between the predicted value and the label value of the bottleneck classification indicator. MSE represents the difference between the predicted value and the label value of the resource prediction indicator. ContrastiveLoss represents the difference between the predicted value and the label value of the text-indicator matching.
[0035] Optionally, the server can iteratively train the initial semantic parsing model again based on the user's historical question and answer information set associated with each business type to obtain the semantic parsing model. This process can be implemented based on deep learning frameworks such as TensorFlow and PyTorch.
[0036] In one optional implementation, after receiving a query request from a user terminal, the process of parsing the query request to obtain multiple keywords based on a semantic parsing model in the server includes: after receiving the query request from the user terminal, inputting the query request into the semantic parsing model to obtain a semantic vector; then, matching the semantic vector with the keyword vector of each keyword in the keyword library to obtain multiple keywords from the query request.
[0037] In step S202, the server determines the target dimension table from multiple candidate dimension tables based on the first keyword among the multiple keywords.
[0038] In this embodiment of the disclosure, there are multiple business scenarios under different businesses. For example, the business of monthly performance evaluation data may include monthly performance evaluation data for City A, monthly performance evaluation data for City B, and monthly performance evaluation data for County A1 under City A, etc. The multiple candidate dimension tables each contain different business scenario information related to different business types. Each candidate dimension table uniquely corresponds to an indicator information table. The indicator information table is constructed based on the business operation information under the business scenario and is an information table of multiple business indicators related to the business scenario. The first keyword is the keyword used to characterize the business type among the multiple keywords.
[0039] In one optional implementation, the process of the server constructing business scenario information tables for different business scenarios may include: for each business scenario, obtaining business operation information associated with the business scenario; then, according to the data structure associated with the business type to which the business scenario belongs, extracting indicator information of each business indicator associated with the business type from the business operation information to obtain the indicator information table for the business scenario; business indicators are indicators that characterize the business features of different business types, and the data structure associated with different business types and business indicators can be determined based on the actual business type, which is not limited in this embodiment; since the business indicators of the same business type are the same, for different business scenarios under different business types, data can be extracted from the business operation information according to the pre-determined data structure associated with the business type to which the business scenario belongs, and the business indicators, to obtain indicator information tables for various business scenarios, and constructing a dimension table containing business scenario information that uniquely corresponds to the indicator information table to obtain information data under the business scenario, thereby achieving the goal of data summarization under different business scenarios based on a two-dimensional relationship table of dimension table and indicator data table, improving the data storage organization of the original data table used for report construction, so as to improve the efficiency of report generation.
[0040] For example, if the business type is monthly monitoring data business, the dimension table and indicator information table constructed based on the data structure associated with the monthly monitoring data business are shown in Table 1. Table 1 shows the monthly monitoring dimension table of chatBI City in 2024 and the monthly monitoring indicator information table of chatBI City in 2024.
[0041] Table 1
[0042] Table 2
[0043] As another example, if the business type is monthly performance evaluation monitoring data, then the dimension table and indicator information table built based on the data structure associated with the monthly performance evaluation monitoring data are shown in Table 2. Table 2 shows the chatBI district and county monthly performance evaluation monitoring dimension table and the chatBI district and county monthly performance evaluation monitoring indicator information table.
[0044] It should be noted that, in this embodiment of the disclosure, the field values of the business scenario field and the business indicator field in Tables 1 and 2 can be determined based on the actual needs of the business type and / or business scenario, and this embodiment of the disclosure does not limit this.
[0045] In an optional implementation, the process by which the server determines the target dimension table from multiple candidate dimension tables based on a first keyword among the plurality of keywords may include: determining at least one optional dimension table based on the first keyword and a first string matching value between the business type strings in each of the candidate dimension tables, wherein the first string matching value associated with the optional dimension table is greater than or equal to a string matching threshold; then, if the number of optional dimension tables includes multiple ones, determining a second string matching value between the plurality of keywords and the full name string of the business scenario in each of the optional dimension tables, obtaining multiple second string matching values; further, determining the optional dimension table associated with the largest second string matching value among the multiple second string matching values as the target dimension table; the string matching threshold can be determined based on actual needs, and this disclosure does not limit it. When multiple optional dimension tables are filtered based on business type, the target dimension table can be determined more accurately by further using the matching degree between all keywords and the full name string of the business scenario in each optional dimension table.
[0046] For example, if the query request is to query the monthly revenue of the city companies in chatBI in the second quarter of 2024, the server can determine that the first keyword is: city company monthly, and the second keyword includes: chatBI city, 2024, second quarter, monthly and revenue. Then, after filtering out multiple monthly monitoring dimension tables of city companies in multiple years based on the first keyword, the server can filter out the monthly monitoring dimension table of chatBI city companies in 2024 based on all keywords in the multiple monthly monitoring dimension tables.
[0047] Optionally, if the number of optional dimension tables includes a single one, the server will determine the optional dimension table as the target dimension table.
[0048] In step S203, the server determines optional business indicators that match at least one second keyword in the target indicator information table associated with the target dimension table, and obtains the field value of each optional business indicator.
[0049] In this embodiment of the disclosure, optional business metrics refer to business metrics associated with the information that the user needs to obtain.
[0050] In one optional implementation, the process by which the server determines optional business indicators that match at least one second keyword in the target indicator information table associated with the target dimension table may include: for each second keyword, determining the matching value between the second keyword and each business indicator in the target indicator information table, and determining the business indicator with the highest matching value as the optional business indicator. The process of determining the matching degree between the second keyword and the business indicator can be implemented based on a matching degree algorithm. The specific algorithm selection can be determined based on actual needs, and this disclosure does not limit this aspect.
[0051] In an optional implementation, when the number of second keywords includes multiple options, before obtaining the field value of each optional business indicator, the server may further: generate indicator verification information based on the optional business indicators matching each second keyword, and send the indicator verification information to the user terminal; then, in response to receiving the indicator verification result returned by the user terminal, parse the indicator verification result to obtain at least one target business indicator, wherein the target business indicator is the business indicator selected by the user from the multiple optional business indicators after the user terminal displays multiple optional business indicators. Optional business indicators determined based on keywords in the query request can be sent to the user terminal for the user to further filter the business indicators that require information. Through secondary interaction with the user terminal, the reliability of the determined target business indicators used to filter the information needed by the user is further improved.
[0052] It is understandable that, after determining the target business metrics, the process by which the server obtains the field values of each of the optional business metrics includes: obtaining the field values of each target business metric.
[0053] Step S204: Based on the first keyword, at least one second keyword, the field value of each optional business indicator, and the report template, generate a target report and send the target report to the user terminal. In this embodiment of the disclosure, the server can be designed with report templates associated with various different business types, as well as report generation rules for each report template, so as to quickly generate the report that the user needs after obtaining the field values of business indicators in the business scenario associated with the business type.
[0054] For example, report templates may include monthly reports, quarterly reports, annual reports, etc., and template content may include text descriptions, data charts (such as line charts, bar charts, pie charts, etc.), tables, and key indicators, etc. Specifically, they can be defined based on business types and actual situations, and this disclosure does not limit them.
[0055] In one optional implementation, the process of generating a target report based on the first keyword, at least one second keyword, the field values of each optional business indicator, and a report template may include: filling the first keyword, the at least one second keyword, and the field values of each optional business indicator into the target report template according to the report generation rules of the target report template to obtain the target report, wherein the target report template is a report template associated with the business type represented by the first keyword; a target report containing the information queried by the user can be quickly generated based on the target report template associated with the target business type represented by the first keyword.
[0056] Optionally, to further enhance the richness of information in the reports obtained by users during information retrieval, the server can also analyze the business operation information under each business scenario to obtain business operation information analysis results. During the user's information retrieval process, the server can match relevant operation information analysis results based on the keywords in the query request sent by the user terminal to further enhance the richness of information in the reports obtained in the information question and answer scenario.
[0057] It should be noted that business operation information includes operational status information during the business operation process. The specific information can be determined based on the business type, and this disclosure does not limit this. For example, for communication service business, business operation information may include user behavior data, network data, and business service data. Among them, user behavior data may include call records, internet access data, and SMS data, etc.; network data may include network performance indicators, traffic data, and network resource data, etc.; business service data may include business subscription information, billing data, and after-sales data, etc.
[0058] In an optional implementation, the server may further: for each business scenario, acquire business operation information associated with the business scenario; then, analyze the business operation information according to an analysis algorithm of at least one operational analysis indicator associated with the business scenario to obtain the analysis result of each operational analysis indicator; further, determine the analysis result of each operational analysis indicator as a subset of business analysis result information for the business scenario; and combine subsets of business analysis result information from multiple business scenarios to obtain a set of business analysis result information. Business operation information under each business scenario can be analyzed based on an analysis algorithm of at least one operational analysis indicator associated with the business scenario to mine the analysis results of operational analysis indicators used to indicate business operation status. This allows the relevant analysis results to be populated into the report template according to the user's query needs during the report generation process, thereby improving the information richness of the target report provided to the user.
[0059] It should be noted that at least one operational analysis indicator associated with the business scenario, as well as the analysis algorithm for the operational analysis indicator, can be determined based on the actual business scenario, and this disclosure embodiment does not limit this.
[0060] For example, for communication service businesses, the operational analysis indicators corresponding to user behavior data are user tags. The analysis algorithms associated with user tags can include clustering algorithms, such as cluster analysis (e.g., K-means clustering algorithm, or DBSCAN clustering algorithm). User tags can be high-value, office workers, college students, and elderly groups, etc.
[0061] Operational analysis metrics corresponding to network data and business service data include market demand and user group matching degree, as well as network performance bottlenecks and optimization suggestions. Among them, the analysis algorithm associated with market demand and user group matching degree is a time series analysis algorithm, such as the ARIMA model or the XGBoost model; and the analysis algorithm associated with network performance bottlenecks and optimization suggestions is an association rule algorithm, such as the Apriori algorithm, the PCY algorithm, or the FP-Tree algorithm.
[0062] For example, information related to network performance bottlenecks and optimization suggestions could include: A network performance bottleneck is high latency when submitting reports using the analytics management page at the end of the month; the relevant optimization suggestion is to increase caching or implement load balancing for the analytics management page at the end of the month. Alternatively, a network performance bottleneck is network latency when both processor and memory are under high usage; the relevant optimization suggestion is to expand capacity before both processor and memory approach their usage thresholds. Or, a network performance bottleneck is high memory consumption and latency caused by Class A search queries; the relevant optimization suggestion is to optimize the Class A search algorithm or add query caching for the Class A search algorithm.
[0063] In an optional implementation, the process of generating a target report based on the first keyword, at least one second keyword, field values of each optional business indicator, and a report template includes: determining the analysis results of target operational analysis indicators related to the first keyword and at least one second keyword in the business analysis result information set; then, filling the first keyword, the at least one second keyword, field values of each optional business indicator, and the analysis results of the target operational analysis indicators into the target report template according to the report generation rules of the target report template to obtain the target report, wherein the target report template is a report template associated with the business type represented by the first keyword. Target business analysis result information can be queried according to the user's query needs in the analysis result information set of operational analysis indicators used to indicate business operation status, and the target business analysis result information can also be filled into the report template to generate the target report, thereby improving the information richness of the target report provided to the user.
[0064] The server can pre-establish a relationship table between keywords and operational analysis indicators. The process by which the server determines the analysis results of target operational analysis indicators related to the first keyword and at least one second keyword in the business analysis result information set may include: determining a subset of target business analysis results associated with the target business scenario represented by the first keyword in the business analysis result information set; then querying the target operational analysis indicators related to the multiple keywords in the relationship table between keywords and operational analysis indicators; and querying the analysis results of the target operational analysis indicators in the subset of target business analysis results.
[0065] Optionally, before sending the target report to the user terminal, the server can also verify the content of the target report to obtain a corrected target report, so as to ensure the accuracy and logic of the report content. The verification process of the target report can be implemented by combining a rule engine and a machine learning model. The verification content can include data consistency checks to prevent irrelevant data from being included in the target report; logic checks to prevent discrepancies in text logic or data in the target report; and format checks to prevent the report format from not conforming to business regulations.
[0066] It should be noted that, in this embodiment of the disclosure, the server can also: read user feedback information on the report, and update the large language model and report generation rules based on the feedback information. In the process of updating the large language model, the industry information set can be updated based on the user feedback information to further improve the semantic understanding accuracy of the trained large language model.
[0067] The user feedback information on the server can be obtained through online questionnaires, user reviews, email feedback, or user interviews; optionally, the user feedback information on the server can be systematic feedback data categorized according to the case's functional requirements, content accuracy, format aesthetics, ease of use, etc., to improve the convenience of data processing.
[0068] For example, such as Figure 3 As shown, Figure 3 The diagram illustrates a server system architecture for a question-and-answer-based report generation scheme provided in this embodiment. The data acquisition module 301 is used to collect business operation information related to the business scenario using data acquisition tools such as Kafka and Flume based on the data interface, and to perform data cleaning and normalization processing on the collected business operation information through ETL (Extract, Transform, Load) tools (such as Talend and Informatica).
[0069] The data storage and management module 302 is used to store the data processed by the data acquisition module in a data management system (such as Hadoop HDFS, HBase) or a distributed database (such as Cassandra, MongoDB), and to perform data backup and data recovery to support fast access and reliable management of large-scale data. The big data processing module 303 is used to analyze the data in the data storage and management module using data mining algorithms such as MapReduce and Spark SQL to obtain a set of business analysis results.
[0070] Specifically, after receiving a query request sent by a user terminal, the semantic parsing model application module 304 is used to parse the query request based on the semantic parsing model to obtain multiple keywords, and based on the first keyword among the multiple keywords, to determine the target dimension table in multiple candidate dimension tables, and in the target indicator information table associated with the target dimension table, to determine the optional business indicator that matches at least one second keyword, and to obtain the field value of each optional business indicator.
[0071] The intelligent report generation module 305 is used to determine the analysis results of target operational analysis indicators related to the first keyword and at least one second keyword in the business analysis result information set; and to fill the first keyword, the at least one second keyword, the field value of each optional business indicator, and the analysis results of the target operational analysis indicators into the target report template according to the report generation rules of the target report template to obtain the target report.
[0072] The result verification and optimization module 306 is used to verify the content of the target report and obtain the corrected target report.
[0073] In one optional implementation, the server may include a front-end server and a data server. The front-end server can directly interact with the user and verify relevant user permissions to ensure the reliability and security of data interaction; the data server is used for request processing and report generation. Figure 4 As shown, Figure 4 The diagram illustrates an interactive flowchart of a question-and-answer based report generation method provided in this disclosure, including: Step S401: The user terminal generates a query request in response to the user's operation and sends the query request to the front-end server; In step S402, the front-end server sends the query request to the data server; Step S403: The data server parses the query request based on the semantic parsing model to obtain multiple keywords; Step S404: The data server determines the target dimension table from multiple candidate dimension tables based on the first keyword among multiple keywords. Step S405: The data server determines, in the target indicator information table associated with the target dimension table, optional business indicators that match at least one second keyword. Step S406: The data server generates a verification request based on optional business indicators and sends the verification request to the front-end server. Step S407: The front-end server verifies the optional business metrics; It should be noted that the front-end server can verify optional business indicators and user permissions based on the verification strategy. The specific verification strategy can be determined based on the actual business scenario. This embodiment does not limit this, which can further ensure the data security and reliability of information query.
[0074] For example, the verification strategies include: verifying whether the user is an authorized user, verifying whether the time range for the user's query information is reasonable, and verifying whether the user is a local user.
[0075] Step S408: If the verification fails, the front-end server sends a verification failure message to the user terminal. Step S409: If the verification passes, the front-end server sends verification pass information to the data server; In step S410, the data server responds to receiving the verification pass information by obtaining the field value of each optional business indicator and generating a target report based on the first keyword, at least one second keyword, the field value of each optional business indicator, and the report template. Step S411: The data server sends the target report to the front-end server; In step S412, the front-end server sends the target report to the user terminal.
[0076] An exemplary embodiment of this disclosure provides a question-and-answer based report generation apparatus, which can be a server or a chip applied to a server. Figure 5 A schematic block diagram of the functional modules of a question-and-answer based report generation apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 5 As shown, the question-and-answer based report generation device 500 includes: The parsing module 501 is configured to, after receiving a query request sent by a user terminal, parse the query request based on a semantic parsing model to obtain multiple keywords; The first determining module 502 is configured to determine a target dimension table from multiple candidate dimension tables based on a first keyword among the multiple keywords. The multiple candidate dimension tables contain different business scenario information related to different business types. Each candidate dimension table uniquely corresponds to an indicator information table. The indicator information table is constructed based on business operation information under the business scenario and is an information table of multiple business indicators related to the business scenario. The first keyword is the keyword among the multiple keywords used to characterize the business type. The second parsing module 503 is configured to determine, in the target indicator information table associated with the target dimension table, optional business indicators that match at least one second keyword, and obtain the field value of each optional business indicator; The report generation module 504 is configured to generate a target report based on the first keyword, at least one second keyword, the field value of each optional business indicator, and the report template, and send the target report to the user terminal.
[0077] Optionally, in cases where the number of the second keywords includes multiple keywords, such as... Figure 5 As shown, the device further includes a verification module 505, configured to: Based on the optional business indicators that match each of the second keywords, indicator verification information is generated and sent to the user terminal. In response to receiving the indicator verification result returned by the user terminal, the indicator verification result is parsed to obtain at least one target business indicator, wherein the target business indicator is the business indicator selected by the user from the multiple optional business indicators after the user terminal displays multiple optional business indicators.
[0078] Optionally, the business scenario information includes a full name string of the business scenario and a business type string to which the business scenario belongs. The first determining module 502 is configured as follows: Based on the first keyword and the first string matching value between the business type strings in each of the candidate dimension tables, at least one optional dimension table is determined, wherein the first string matching value associated with the optional dimension table is greater than or equal to the string matching threshold. When the number of optional dimension tables includes multiple ones, determine the second string matching value between the multiple keywords and the full name string of the business scenario in each of the optional dimension tables to obtain multiple second string matching values; The optional dimension table associated with the largest second string matching value among the plurality of second string matching values is determined as the target dimension table.
[0079] Optional, such as Figure 5 As shown, the device further includes a data analysis module 506, configured to: For each business scenario, obtain the business operation information associated with that scenario; The business operation information is analyzed based on the analysis algorithm of at least one operational analysis indicator associated with the business scenario, and the analysis results of each operational analysis indicator are obtained. The analysis results of each of the aforementioned operational analysis indicators are determined as a subset of the business analysis result information for the business scenario. By combining subsets of business analysis results from various business scenarios, a business analysis results information set is obtained.
[0080] Optionally, the report generation module 504 is configured as follows: In the business analysis result information set, the analysis results of the target operational analysis indicators related to the first keyword and at least one of the second keywords are determined; The first keyword, the at least one second keyword, the field values of each optional business indicator, and the analysis results of the target operation analysis indicator are filled into the target report template according to the report generation rules of the target report template to obtain the target report. The target report template is a report template associated with the business type represented by the first keyword.
[0081] Optional, such as Figure 5 As shown, the device further includes a model training module 507, configured as follows: Obtain the industry information set associated with each business type; Based on the industry information set, the semantic parsing model to be trained is subjected to preliminary iterative training to obtain the initial semantic parsing model; Based on the user's historical question and answer information set associated with each business type, the initial semantic parsing model is iteratively trained again to obtain the semantic parsing model.
[0082] Optionally, the data analysis module 506 is further configured to: For each business scenario, obtain the business operation information associated with that scenario; Based on the data structure associated with the business type to which the business scenario belongs, the indicator information of each business indicator associated with the business type is extracted from the business operation information to obtain the indicator information table of the business scenario.
[0083] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0084] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0085] like Figure 6 As shown, an exemplary embodiment of this disclosure also provides a computer program product 600, including a computer program 601, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0086] refer to Figure 7 The present invention describes a structural block diagram of an electronic device 700 that can serve as a server or user terminal of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0087] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0088] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0089] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. In some embodiments, the computing unit 701 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0090] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0091] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0092] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0094] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0095] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0096] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A question-and-answer based report generation method, characterized in that, The method, when applied to a server, includes: After receiving a query request from a user terminal, the query request is parsed using a semantic parsing model to obtain multiple keywords; Based on the first keyword among the multiple keywords, a target dimension table is determined from multiple candidate dimension tables. The multiple candidate dimension tables each contain different business scenario information related to different business types. Each candidate dimension table uniquely corresponds to an indicator information table. The indicator information table is constructed based on business operation information under the business scenario and is an information table of multiple business indicators related to the business scenario. The first keyword is the keyword among the multiple keywords used to characterize the business type. In the target indicator information table associated with the target dimension table, determine the optional business indicators that match at least one second keyword, and obtain the field values of each optional business indicator; Based on the first keyword, at least one of the second keywords, the field values of each optional business indicator, and the report template, a target report is generated and the target report is sent to the user terminal.
2. The question-and-answer based report generation method as described in claim 1, characterized in that, When the number of the second keywords includes multiple instances, the method further includes, before obtaining the field value of each of the optional business metrics: Based on the optional business indicators that match each of the second keywords, indicator verification information is generated and sent to the user terminal. In response to receiving the indicator verification result returned by the user terminal, the indicator verification result is parsed to obtain at least one target business indicator, wherein the target business indicator is the business indicator selected by the user from the multiple optional business indicators after the user terminal displays multiple optional business indicators.
3. The question-and-answer based report generation method as described in claim 1, characterized in that, The business scenario information includes a full name string for the business scenario and a business type string to which the business scenario belongs. The step of determining the target dimension table from multiple candidate dimension tables based on the first keyword among the multiple keywords includes: Based on the first keyword and the first string matching value between the business type strings in each of the candidate dimension tables, at least one optional dimension table is determined, wherein the first string matching value associated with the optional dimension table is greater than or equal to the string matching threshold. When the number of optional dimension tables includes multiple ones, determine the second string matching value between the multiple keywords and the full name string of the business scenario in each of the optional dimension tables to obtain multiple second string matching values; The optional dimension table associated with the largest second string matching value among the plurality of second string matching values is determined as the target dimension table.
4. The question-and-answer based report generation method as described in claim 1, characterized in that, The method further includes: For each business scenario, obtain the business operation information associated with that scenario; The business operation information is analyzed based on the analysis algorithm of at least one operational analysis indicator associated with the business scenario, and the analysis results of each operational analysis indicator are obtained. The analysis results of each of the aforementioned operational analysis indicators are determined as a subset of the business analysis result information for the business scenario. By combining subsets of business analysis results from various business scenarios, a business analysis results information set is obtained.
5. The question-and-answer based report generation method as described in claim 4, characterized in that, The step of generating a target report based on the first keyword, at least one of the second keywords, the field values of each optional business indicator, and the report template includes: In the business analysis result information set, the analysis results of the target operational analysis indicators related to the first keyword and at least one of the second keywords are determined; The first keyword, the at least one second keyword, the field values of each optional business indicator, and the analysis results of the target operation analysis indicator are filled into the target report template according to the report generation rules of the target report template to obtain the target report. The target report template is a report template associated with the business type represented by the first keyword.
6. The question-and-answer based report generation method as described in claim 1, characterized in that, The method further includes: Obtain the industry information set associated with each business type; Based on the industry information set, the semantic parsing model to be trained is subjected to preliminary iterative training to obtain the initial semantic parsing model; Based on the user's historical question and answer information set associated with each business type, the initial semantic parsing model is iteratively trained again to obtain the semantic parsing model.
7. The question-and-answer based report generation method as described in claim 1, characterized in that, The method further includes: For each business scenario, obtain the business operation information associated with that scenario; Based on the data structure associated with the business type to which the business scenario belongs, the indicator information of each business indicator associated with the business type is extracted from the business operation information to obtain the indicator information table of the business scenario.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.