Analysis report generation method, analysis report generation device and electronic equipment

Generating scheduling plans through pre-trained target models, using subtasks and plug-ins for data analysis, solving the problem of poor answer quality in the existing technology, achieving the generation of high-quality analysis reports and improving user satisfaction.

CN118797004APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +3
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410829589.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing question and answer technology, the quality of the answers generated is poor, which affects the user's understanding experience, and the user's questions cannot be effectively analyzed, resulting in insufficient high-quality answers.

Method used

The target template information is inferred through the pre-trained target model, and a scheduling plan is generated, including subtasks and required plug-ins, which are used for data analysis and processing of the target answers, thereby generating high-quality analysis reports.

Benefits of technology

It realizes the automatic generation of analysis reports through user self-service dialogue, reduces the cost of customized analysis, improves the intuitiveness, scalability and user satisfaction of answers, and adapts to the data analysis needs in various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797004A_ABST
    Figure CN118797004A_ABST
Patent Text Reader

Abstract

The invention discloses an analysis report generation method, an analysis report generation device and electronic equipment, and the method comprises the steps: responding to a received target question, and determining at least one keyword and a target answer corresponding to the target question; target template information is reasoned through a pre-trained target model, a scheduling plan is generated, the target template information comprises the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, and the preset plug-in scheduling example comprises the target question, the at least one keyword, the target answer and the preset plug-in scheduling example. The scheduling plan comprises at least one subtask corresponding to the target question and at least one plug-in required for executing the at least one subtask, and the at least one subtask is used for performing data analysis processing on the target answer; and generating an analysis report corresponding to the target answer by executing the scheduling plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a method for generating an analysis report, a device for generating an analysis report, and an electronic device. Background Art

[0002] In the field of question-answering technology, natural language understanding and machine learning models are used to analyze user questions, and answers corresponding to the questions are generated based on the question-answering knowledge base. However, in related technologies, the generated answers are not further analyzed, resulting in poor answer quality and affecting the user's understanding experience. Therefore, how to generate high-quality analysis reports based on the retrieved answers has become a problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide a method for generating an analysis report, a device for generating an analysis report, and an electronic device, which can generate high-quality answers when interacting with a user.

[0004] In the first aspect, an embodiment of the present application provides a method for generating an analysis report, the method comprising: in response to a received target question, determining at least one keyword and a target answer corresponding to the target question; inferring the target template information through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer; by executing the scheduling plan, an analysis report corresponding to the target answer is generated.

[0005] In the second aspect, an embodiment of the present application provides a device for generating an analysis report, which includes: a determination module, used to determine at least one keyword and a target answer corresponding to the target question in response to a received target question; an inference module, used to infer the target template information through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer; a generation module, used to generate an analysis report corresponding to the target answer by executing the scheduling plan.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0009] In an embodiment of the present application, by responding to the received target question, at least one keyword and a target answer corresponding to the target question are determined, and then the target template information is inferred through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, at least one keyword, the target answer and a preset plug-in scheduling example, and the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute at least one subtask, and at least one subtask is used to perform data analysis and processing on the target answer. Finally, by executing the scheduling plan, an analysis report corresponding to the target answer is generated, and the analysis report is automatically generated through user self-service dialogue. The whole process no longer relies on manual data analysis professional skills. At the same time, by parsing the target template information to schedule the corresponding plug-in, it can adapt to the analysis needs of various types of data in various scenarios, and is no longer limited to fixed templates, thereby reducing the cost of customized analysis; in addition, on the basis of ensuring the accuracy of the final result, high-quality answers can be output, thereby improving the intuitiveness, scalability and user satisfaction of the answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flow chart of a method for generating an analysis report provided in an embodiment of the present application;

[0011] Figure 2 It is a flowchart of a keyword determination provided by an embodiment of the present application;

[0012] Figure 3 It is a schematic diagram of an application of a question-answering model provided in an embodiment of the present application;

[0013] Figure 4 is a schematic diagram of the structure of a target template provided in an embodiment of the present application;

[0014] Figure 5 It is a training schematic diagram of a target model provided in an embodiment of the present application;

[0015] Figure 6 It is a flowchart of a corpus preparation provided in an embodiment of the present application;

[0016] Figure 7 is a schematic diagram of a knowledge base version controller provided in an embodiment of the present application;

[0017] Figure 8 It is a schematic diagram of a flow chart of generating an analysis report provided in an embodiment of the present application;

[0018] Fig. 9 It is a structural schematic diagram of a device for generating an analysis report provided in an embodiment of the present application;

[0019] Fig.10 It is a structural diagram of a private domain knowledge framework provided in an embodiment of the present application;

[0020] Fig.11 It is a structural diagram of a report generation framework provided in an embodiment of the present application;

[0021] Fig.12 This is an interactive schematic diagram of report generation provided by an embodiment of the present application;

[0022] Fig.13 It is a structural schematic diagram of another analysis report generating device provided in an embodiment of the present application;

[0023] Fig.14 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] In conjunction with the accompanying drawings, a method for generating an analysis report, a device for generating an analysis report, and an electronic device provided in an embodiment of the present application are described in detail through specific embodiments and their application scenarios.

[0026] Figure 1A method for generating an analysis report provided by an embodiment of the present application is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:

[0027] S110: In response to the received target question, determining at least one keyword and a target answer corresponding to the target question.

[0028] It should be noted that the target answer may include data in various formats, such as text, tables, lists, images, charts, links, code snippets, file attachments: such as PDF documents, Word documents, Excel tables, data tables, etc., interactive components, etc.

[0029] Optionally, S110 may include the following steps:

[0030] S112: In response to the received target question, determine at least one keyword corresponding to the target question.

[0031] The step of determining at least one keyword corresponding to the target question may include the following steps:

[0032] Step 1: Process the target question using a preset keyword extraction algorithm to obtain at least one initial keyword;

[0033] Step 2: for the at least one initial keyword, perform user role identification and user intention identification according to a preset corpus and a preset role library;

[0034] Step 3: Calculate the score value of each of the initial keywords according to the results of user role identification and user intent identification;

[0035] Step 4: According to the ranking result of the score values, a target number of initial keywords are selected from at least one initial keyword as the keywords.

[0036] For example, Figure 2 As shown in the figure, for the questions raised by the user, the word segmentation operation is performed, and the score value of each word in the question is calculated according to the local preset corpus and preset role library, and the top_k keywords are obtained in order from high to low, thereby realizing the intention recognition and role playing based on keywords. The score calculation formula is as follows:

[0037] score = α × TF × IDF

[0038] Among them, α is the role weight coefficient, α≥1. When it matches the role in the role library, α is any number greater than 1. When there is no match, α is 1.

[0039] TF term frequency refers to the number of times a word appears in the document. Its calculation formula is as follows:

[0040]

[0041] Among them, n id It refers to the number of times word i appears in document d, and the denominator is the sum of the number of times all k words appear in document d.

[0042] IDF inverse document frequency is a measure of the general importance of a word. The IDF of a word can be obtained by dividing the total number of documents by the number of documents containing the word and then taking the logarithm of the quotient. The calculation formula is as follows:

[0043]

[0044] Among them, |D| represents the total number of documents, and the denominator represents the total number of documents in which word i appears.

[0045] S114: Determine a target answer corresponding to the target question according to the target question and the at least one keyword.

[0046] Wherein, S114 may include the following steps:

[0047] Step 1: Input the target question and the at least one keyword into a pre-trained question-answering model.

[0048] Step 2: Obtain a vector representation by encoding the target question and the at least one keyword.

[0049] Step 3: Calculate the similarity between the vector representation and each knowledge index in the target knowledge base to obtain a target answer, wherein each of the knowledge indexes corresponds to a knowledge block, and the target answer is the knowledge block corresponding to the maximum similarity.

[0050] Among them, each knowledge block can include data in multiple formats, such as text, tables, lists, images, charts, links, code snippets, file attachments: such as PDF documents, Word documents, Excel tables, data tables, etc., interactive components, etc.

[0051] Optionally, before calculating the similarity, the method may further include the following steps: constructing a knowledge base.

[0052] Among them, building a knowledge base may include the following steps:

[0053] Step 1: Get the latest version of multi-source data.

[0054] Step 2: Extract data from the multi-source data to obtain multiple knowledge blocks.

[0055] Among them, data extraction includes two steps: data loading and data processing. Data loading is to extract PDF content, word content, csv content, database data and API results through the data loader. Data processing is to format the data, remove unrecognizable content and privacy data, etc. For long text content, it is divided into blocks, including: (1) a fixed-size block method, generally 256 or 512 tokens, depending on the restrictions of the target model input tokens. This method may lose certain semantic information. (2) Intent-based block method, which can be segmented by some marking symbols, such as periods, line breaks, etc. The present application can be based on (2) to segment according to the semantic differences of different parts of the target problem, so that the information in each block is relatively complete.

[0056] Step 3: Vectorize the multiple knowledge blocks and create a knowledge index for each knowledge block.

[0057] Among them, vectorization is the process of converting text, images, audio and video into vector matrices. The ability of the Embedding model will affect the quality of retrieval. The tool for vectorization representation in this application can be the BGE (Bidirectional Gated Encoder) Chinese Embedding model.

[0058] For example, Figure 3 As shown in the figure, vector retrieval is a retrieval module that calculates the similarity between the question vector and the knowledge index in the knowledge base. The BGE embedding model used to build the business knowledge base is used to vectorize the questions and keyword lists raised by the user, and the similarity is calculated with the vector index in the knowledge base to obtain the most matching knowledge block. The similarity retrieval algorithm is as follows:

[0059]

[0060] Among them, A+α is the combined vector of the target question and at least one keyword, B is the knowledge index in the knowledge base, |A| and |B| respectively represent the modulus of the two vectors A and B, that is, the length of the two vectors in the vector space, and the value range is between -1 and 1. If the cosine similarity of two vectors is 1, it means that they are exactly the same; if it is -1, it means that they are completely opposite; if it is 0, it means that they are perpendicular, that is, there is no similarity.

[0061] By calculating the cosine similarity between the question vector and the knowledge index in the knowledge base, several data blocks with the largest similarity values ​​are obtained, and the retrieval and matching of the target answer is completed.

[0062] S120: Inferring the target template information through the pre-trained target model to generate a scheduling plan.

[0063] Among them, the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer.

[0064] Among them, in one implementation, the target template information is inferred through the target model to generate a scheduling plan, including: decomposing the target problem into at least one sub-problem that meets the user's intention; selecting at least one plug-in for each sub-problem by referring to the plug-in scheduling example; and constructing at least one subtask corresponding to each sub-problem according to each sub-problem and at least one plug-in corresponding to the sub-problem. In another implementation, the plug-in includes at least one of the following: an SQL generation plug-in, an API interaction plug-in, and a chart visualization plug-in. Optionally, the plug-in can also include analysis plug-ins for different needs, such as a market analysis plug-in.

[0065] It is understandable that after determining the target answer, in order to ensure that users obtain high-quality information, it is necessary to perform data mining or data analysis on the target answer to better meet the different needs of users. The process of data mining or data analysis is to parse the user questions, keywords and target answers in the target template information to generate sub-questions covering multiple scenarios, and then determine the plug-ins required to solve each sub-question, and then construct the sub-task corresponding to the sub-question based on each sub-question and at least one plug-in corresponding to the sub-question, thereby generating a scheduling plan. The target template information can be prompt template information, which formats the user's question content, at least one keyword, the target answer and the plug-in scheduling example to generate standard template information. The template structure is as follows: Figure 4 shown.

[0066] Optionally, before S120, the method may further include: training the target model. Figure 5 As shown, the training process of the target model may include corpus preparation and algorithm fine-tuning. The corpus preparation is implemented based on the knowledge base version controller, and the algorithm fine-tuning is implemented based on the fine-tuner.

[0067] (1) Corpus preparation

[0068] Corpus preparation is a module that cleans the data in the knowledge base and then generates instruction data. The instruction data generated by this module includes instruction, input, and output. The flow chart is as follows: Figure 6 As shown, the step-by-step process is as follows:

[0069] Step 1: Get multiple types of source data from the repository version controller.

[0070] Among them, the knowledge base version controller is a module that performs version control on open source data and enterprise private domain data, such as Figure 7 As shown, the knowledge base version controller can include different versions of data, and can provide corresponding versions of data for training or for answer retrieval for question-and-answer models. The principle of version control is to establish version control based on the timestamp of each internal knowledge base update, which is composed of eight digits of year, month, and day. At the same time, historical version data can be traced back to facilitate tracking and reviewing of data changes. Since the cost of fine-tuning training for large models is relatively high, it can be based on quarters, and the latest version of data at the end of each quarter can be used as the input of the fine-tuner to train large models. At the same time, since the data is constantly updated and iterated, using the current latest version of data as the input of the question-and-answer model can make up for the lack of knowledge in the question-and-answer model and improve model performance. It should be noted that this application does not limit the fine-tuning cycle of the target model.

[0071] Step 2: Use regularization and other methods to clean the source data and remove sensitive information.

[0072] Step 3: Divide the data into blocks to keep the contents of the data blocks intact.

[0073] Step 4: Generate instructions for each block, add relevant background information to the input, and use the data block information as the output.

[0074] Step 5: Combine the data of each block in the previous step into JSON format and finally concatenate them into a list.

[0075] The corpus generated according to the above process can be in the following form: [

[0077] {"instruction":"XXX","input":"XXX","output":"XXX"},

[0078] … ]

[0080] The corpus includes business data, product data, market data, business knowledge, and business policies. These data provide all-round and multi-dimensional information, so that the target model generated by subsequent fine-tuning can better understand the product and business logic. For example, the collected data can be shown in the following table:

[0081]

[0082] (2) Algorithm fine-tuning

[0083] Algorithm fine-tuning is to further train the open source large model through the algorithm to solve the defect that the open source large model cannot accurately identify the problem. Among them, algorithm fine-tuning is to add the weight parameters of two matrices on the basis of the LoRA algorithm. Its formula can be:

[0084] H=W0X+βMNX=(W0+βMN)X

[0085] Among them, β represents the adaptive coefficient of the fine-tuning task, balancing the importance of the parameters of the open source large model, X represents the input matrix, that is, the fine-tuning data, M represents the Gaussian function initialization, N represents the initialization zero matrix, and W0 represents the weight matrix of the open source large model. The matrix product MN after training is added to W0 as the weight parameter of the target model.

[0086] S130: Generate an analysis report corresponding to the target answer by executing the scheduling plan.

[0087] The above S110 - S130 are explained below by using an example.

[0088] The target question is: For the company's XX product, please analyze the market potential of the product and predict the user and revenue growth in the next three months. At least one keyword includes: XX product, market potential, user growth rate, revenue growth rate. The target answer is: XX product is the company's deep cultivation in the XX industry, serving... Then, the target template information includes:

[0089] Task: For the company's XX product, please analyze the market potential of the product and predict the user and revenue growth in the next three months.

[0090] Keywords: XX product, market potential, user growth rate, revenue growth rate.

[0091] Context (target answer): XX product is the company’s in-depth development in XX industry, serving…

[0092] Exemplars (plugin scheduling examples):

[0093] (1) Market analysis plug-in call example:

[0094] {url:'http: / / api.example.com / market_analysis'

[0095] "input":{"product_name":"XX product","market_region":"XX market"},

[0096] "output":{"plug_name":"market_analysis","result":"Market analysis results"}}

[0097] (2) Database query plug-in example

[0098] {url:'http: / / api.example.com / database_query'

[0099] "input":{"query":"SELECT*FROM products WHERE product_name=XX"},

[0100] "output":{"plug_name":"database_query","result":"Database query results"}}

[0101] Then, the generation of the analysis report can include the following steps:

[0102] Step 1: The target model splits the user question into at least one sub-question based on the target template information.

[0103] For example, what are the user and revenue figures for product XX in the past five months? What is the market potential for product XX? What are the user and revenue growth figures for product XX in the next three months?

[0104] Step 2: Then match plugins for each sub-problem based on the plugin dispatch example.

[0105] For example, "Users and revenue of XX product in the last five months" can be matched with the database query plug-in, and "What is the market potential of XX product?" can be matched with the market analysis plug-in.

[0106] Step 3: Generate a scheduling plan.

[0107] For example, the subtasks may include:

[0108] Task A: Call the database query plug-in to query the user data and revenue data of XX product in the past five months. Task B: Call the market analysis plug-in to query the potential of XX product in the local market. Task C: Output the user and revenue data of XX product in the next three months.

[0109] The task sequence is: Task B->Task A->Task C.

[0110] Step 4: Generate an analysis report by executing the scheduling plan.

[0111] After Task B is executed, the result in the market analysis plug-in return is obtained by summarizing and refining the target answer according to the plug_name result identifier in the return; similarly, after Task A is executed, the corresponding data queried from the target answer is directly displayed in the table through the parsing tool according to the result identifier, and the market analysis plug-in summarizes the operation status of the past five months based on the target answer; finally, the target model predicts and generates the user and revenue changes in the next three months based on the results of Task B and Task A, and generates a line chart of the data changes in the next three months through the parsing tool.

[0112] It should be noted that in the embodiment of the present application, at least one subtask can be executed sequentially, or multiple subtasks can be executed simultaneously, or they can be executed in any order. The embodiment of the present application does not make specific limitations, and the execution method can be selected according to actual conditions. At the same time, the above example is only an example, and the present application is not limited to this example.

[0113] In an embodiment of the present application, by responding to the received target question, at least one keyword and a target answer corresponding to the target question are determined, and then the target template information is inferred through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, at least one keyword, the target answer and a preset plug-in scheduling example, and the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute at least one subtask, and at least one subtask is used to perform data analysis and processing on the target answer. Finally, by executing the scheduling plan, an analysis report corresponding to the target answer is generated, and the analysis report is automatically generated through user self-service dialogue. The whole process no longer relies on manual data analysis professional skills. At the same time, by parsing the target template information to schedule the corresponding plug-in, it can adapt to the analysis needs of various types of data in various scenarios, and is no longer limited to fixed templates, thereby reducing the cost of customized analysis; in addition, on the basis of ensuring the accuracy of the final result, high-quality answers can be output, thereby improving the intuitiveness, scalability and user satisfaction of the answers.

[0114] In one implementation, the generating of the analysis report corresponding to the target answer by executing the scheduling plan includes: obtaining the plug-in execution result of each of the plug-ins by executing the scheduling plan; and generating the analysis report corresponding to the target answer based on the plug-in execution result of each of the plug-ins.

[0115] It is understandable that each plug-in will generate a plug-in execution result when executing the corresponding task. In another implementation, the scheduling plan also includes the execution order of each plug-in; the plug-in execution result of each plug-in is obtained by executing the scheduling plan, including: based on the execution order, calling each plug-in in turn to execute the corresponding subtask, and obtaining the plug-in execution result of each plug-in. That is to say, while determining the plug-in corresponding to each task, the execution order of the plug-in will also be determined. In this way, during the task execution process, each plug-in is scheduled in turn according to the execution order of the plug-in, so as to complete the task. Optionally, the scheduling plan can also include scheduling parameters, that is, parameters used to schedule each plug-in.

[0116] In one implementation, generating an analysis report corresponding to the target answer based on the plug-in execution results of each of the plug-ins includes: parsing the plug-in execution results corresponding to each of the plug-ins through a parsing tool corresponding to each of the plug-ins to obtain a parsing result corresponding to each of the plug-in execution results; integrating each of the parsing results according to preset rules to obtain the analysis report.

[0117] In this embodiment, by parsing the plug-in execution result, it can be ensured that the final output result can meet the specific user needs.

[0118] Alternatively, if Figure 8 As shown, the present application provides a flow chart of the generation of an analysis report, which may include the following contents: the plug-in scheduling engine calls different types of plug-ins according to the scheduling plan, and identifies the plug-in push results; according to the plug-in push result identification, different tools are used to parse the results pushed by different plug-ins; the parsed results are assembled and synthesized in a specific order; and a graphic analysis report with rich content and complete structure is displayed.

[0119] To better understand Figure 1 In the embodiment shown, the present application also provides a schematic diagram of the structure of a device for generating an analysis report, such as Fig. 9 As shown in Figure 1, it includes a demand analysis module, a private domain knowledge framework, and a report generation framework. The demand analysis module is a module that performs in-depth processing and analysis of user demand content through keyword extraction algorithms and role-playing capabilities; the private domain knowledge framework is a functional module that can give accurate answers based on user needs. The structural diagram of the private domain knowledge framework is shown in Figure 1. Fig.10 As shown in FIG. 1 , the private domain knowledge framework includes a question-answering model and a target model; the report generation framework is a module that sorts out the answer results to generate a graphic report, wherein the schematic diagram of the report generation framework is as shown in FIG. Fig.11 As shown in the report generation framework, the plug-in scheduling engine is a module that executes scheduling tasks according to the scheduling plan given by the large model. Its timing diagram is shown in Fig.12 As shown, the plug-in scheduling engine receives the scheduling plan pushed by the large model, and calls the SQL generation plug-in, API interaction plug-in, chart visualization plug-in, etc. according to the task requirements in the scheduling plan, and finally pushes the result data to the element construction module to assemble into an analysis report. In this embodiment, the role-playing ability is introduced through the demand analysis module to improve the model's ability to understand user needs, which is the basis for obtaining accurate graphic reports; through the fine-tuner and version controller in the private domain knowledge framework, a relatively balanced framework is provided for the rapid iteration of computer resources and information, which will not consume more resources, but also ensure the timeliness of information updates, thereby providing an analysis report that is more in line with the current development trend, and a report generation framework; through the plug-in scheduling engine and prompt templates, multiple rounds of interaction with the private domain knowledge framework can be carried out, and assembled into a graphic report through the element builder. Compared with traditional solutions, it provides more scalability for the generated answers, allowing users to obtain more intuitive report information.

[0120] Fig.13 A schematic diagram showing the structure of a device for generating an analysis report provided by an embodiment of the present application is shown as follows: Fig.13 As shown, the analysis report generation device 1300 may include: an acquisition module 1310 , a reasoning module 1320 and a generation module 1330 .

[0121] In this embodiment, a determination module 1310 is used to determine at least one keyword and a target answer corresponding to the target question in response to a received target question; an inference module 1320 is used to infer the target template information through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, and the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer; a generation module 1330 is used to generate an analysis report corresponding to the target answer by executing the scheduling plan.

[0122] In one implementation, the target template information is inferred through a target model to generate a scheduling plan, including: decomposing the target problem into at least one sub-problem that meets the user's intention; selecting at least one plug-in for each sub-problem by referring to the plug-in scheduling example; and constructing at least one subtask corresponding to each sub-problem based on each sub-problem and at least one plug-in corresponding to the sub-problem.

[0123] In one implementation, the generating of the analysis report corresponding to the target answer by executing the scheduling plan includes: obtaining the plug-in execution result of each of the plug-ins by executing the scheduling plan; and generating the analysis report corresponding to the target answer based on the plug-in execution result of each of the plug-ins.

[0124] In one implementation, the scheduling plan also includes the execution order of each of the plug-ins; the plug-in execution result of each of the plug-ins is obtained by executing the scheduling plan, including: based on the execution order, calling each of the plug-ins in turn to execute the corresponding subtask, and obtaining the plug-in execution result of each of the plug-ins.

[0125] In one implementation, generating an analysis report corresponding to the target answer based on the plug-in execution results of each of the plug-ins includes: parsing the plug-in execution results corresponding to each of the plug-ins through a parsing tool corresponding to each of the plug-ins to obtain a parsing result corresponding to each of the plug-in execution results; integrating each of the parsing results according to preset rules to obtain the analysis report.

[0126] In one implementation, the plug-in includes at least one of the following: an SQL generation plug-in, an API interaction plug-in, and a chart visualization plug-in.

[0127] An analysis report generation device provided in an embodiment of the present application can implement each process implemented in the analysis report generation method embodiment, and will not be described again here to avoid repetition.

[0128] The analysis report generation device in the embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in an electronic device. The embodiment of the present application does not specifically limit this.

[0129] The analysis report generation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0130] Optional, such as Fig.14As shown, an embodiment of the present application also provides an electronic device 1400, including a processor 1410, a memory 1420, and a program or instruction stored in the memory 1420 and executable on the processor 1410. When the program or instruction is executed by the processor 1410, each process of the above-mentioned analysis report generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0131] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned analysis report generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0132] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0133] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned analysis report generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0134] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0135] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for generating an analysis report, characterized in that: The method comprises: In response to the received target question, determining at least one keyword and a target answer corresponding to the target question; The target template information is inferred by a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, and the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer; By executing the scheduling plan, an analysis report corresponding to the target answer is generated.

2. The method according to claim 1, characterized in that: The target template information is inferred by the target model to generate a scheduling plan, including: Decomposing the target problem into at least one sub-problem that meets the user's intention; By referring to the plug-in scheduling example, selecting at least one plug-in for each of the sub-problems; At least one subtask corresponding to each subproblem is constructed according to each subproblem and at least one plug-in corresponding to the subproblem.

3. The method according to claim 1, characterized in that The step of generating an analysis report corresponding to the target answer by executing the scheduling plan includes: Obtaining a plug-in execution result of each plug-in by executing the scheduling plan; An analysis report corresponding to the target answer is generated according to the plug-in execution results of each of the plug-ins.

4. The method according to claim 3, characterized in that The scheduling plan also includes the execution order of each of the plug-ins; Obtaining the plug-in execution result of each plug-in by executing the scheduling plan includes: Based on the execution order, each of the plug-ins is called in turn to execute the corresponding subtask, and the plug-in execution result of each plug-in is obtained.

5. The method according to claim 3, characterized in that: The generating of an analysis report corresponding to the target answer according to the plug-in execution results of each plug-in includes: Parsing the plug-in execution result corresponding to each plug-in by using a parsing tool corresponding to each plug-in to obtain a parsing result corresponding to each plug-in execution result; The analysis results are integrated according to preset rules to obtain the analysis report.

6. The method according to any one of claims 1 to 5, characterized in that: The plug-in includes at least one of the following: an SQL generation plug-in, an API interaction plug-in, and a chart visualization plug-in.

7. A device for generating an analysis report, characterized in that: The device comprises: a determination module, configured to determine, in response to the received target question, at least one keyword and a target answer corresponding to the target question; An inference module, configured to infer the target template information through a pre-trained target model to generate a scheduling plan, wherein the target template information includes the target question, the at least one keyword, the target answer and a preset plug-in scheduling example, and the scheduling plan includes at least one subtask corresponding to the target question and at least one plug-in required to execute the at least one subtask, and the at least one subtask is used to perform data analysis and processing on the target answer; A generation module is used to generate an analysis report corresponding to the target answer by executing the scheduling plan.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for generating an analysis report as described in any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method for generating an analysis report according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer implements the steps of the method for generating an analysis report as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Report generation method and device based on multi-agent large model, medium and product

    CN119046456A