Report analysis method and device, electronic equipment and storage medium
By breaking down complex report analysis tasks into multiple sub-tasks and utilizing pre-trained language models and domain knowledge, the flexibility and accuracy issues of large models in complex query scenarios are solved, achieving efficient and accurate report analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-10
AI Technical Summary
Existing report analysis methods based on large models struggle to handle complex queries and multi-round interactions in complex query scenarios, lacking flexibility and accuracy. In particular, they exhibit biases in understanding data in specialized fields, leading to inaccurate analysis results.
By using an AI agent to call a pre-trained language model, complex analysis tasks are broken down into multiple sub-tasks. Based on the sequential relationship between the sub-tasks, query interfaces are called. Combining domain knowledge and context management, query results are gradually acquired and analyzed to generate the final analysis results.
It improves the accuracy and flexibility of report analysis in complex query scenarios, reduces the illusion phenomenon of pre-trained language models, and ensures the accuracy and security of analysis results.
Smart Images

Figure CN121636587A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and particularly relates to a report analysis method and device, an electronic device, and a storage medium. BACKGROUND
[0002] At present, a report analysis program based on an artificial intelligence large model (referred to as a "large model") can perform a data analysis task in a natural language processing manner without deep understanding of a complex query language or programming skills. The report analysis program can convert a natural language instruction into a specific data operation, such as an application programming interface (API) call, a database query, and a specially written data analysis script, to realize extraction, analysis, and visualization of data. The underlying architecture and working principle of the above method can combine the powerful capabilities of artificial intelligence (AI) with data analysis needs, reduce the use threshold of business intelligence (BI) tools, and accelerate the acquisition speed of insights.
[0003] At present, a report analysis method based on a large model mainly performs report analysis in an NL2API or NL2SQL manner. The NL2API manner depends on the completeness and accuracy of an API library, and has the problem of limited flexibility and expansion capability. The NL2SQL manner depends on the stability of a database structure and SQL statement generation. The two manners are difficult to handle complex queries and multi-round interactions. Therefore, how to improve the accuracy of report analysis in a complex query scenario has become a technical subject to be solved in the field. SUMMARY
[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a report analysis method, device, electronic device, and storage medium, which can improve the accuracy of report analysis in a complex query scenario.
[0005] In a first aspect, the present application provides a report analysis method, which comprises: receiving a target analysis task through a front-end interaction layer; calling a pre-trained language model through an artificial intelligence agent to split the target analysis task into a plurality of subtasks; each subtask corresponds to a business requirement; querying a target report through a query interface corresponding to each subtask based on a sequence relationship between the plurality of subtasks to obtain a query result corresponding to the subtask through the artificial intelligence agent; The artificial intelligence agent calls the pre-trained language model to analyze the query results corresponding to each subtask and obtain an analysis result for the target analysis task.
[0006] According to the report analysis method, the report analysis is performed by the artificial intelligence agent, the pre-trained language model is called by the artificial intelligence agent to plan and gradually decompose a complex analysis task, relevant data is obtained by automatic planning and execution, and analysis and decision are performed by using the data and domain knowledge, so that automatic planning of a complex report analysis task can be implemented, the pre-trained language model is automatically executed by gradual decomposition, the ability of the pre-trained language model to cope with a complex report analysis task is improved, and therefore the accuracy of report analysis in a complex query scenario can be improved.
[0007] According to an embodiment of the present application, before the calling of the query interface corresponding to each subtask based on the sequence relationship between the plurality of subtasks, the querying of the target report, and the obtaining of the analysis result for the target analysis task, the method further comprises: determining the fields corresponding to each business requirement based on the domain knowledge of the domain to which the target report belongs and the database schema definition language corresponding to the target report; generating the query interface corresponding to each business requirement based on the fields corresponding to each business requirement.
[0008] According to an embodiment of the present application, the calling of the query interface corresponding to each subtask based on the sequence relationship between the plurality of subtasks by the artificial intelligence agent, the querying of the target report, and the obtaining of the query result corresponding to the subtask comprise: rewriting the current question corresponding to the subtask based on the context information of the historical dialogue to obtain a semantic complete search question; the historical dialogue is a dialogue generated in the process of the subtask before the execution of the subtask; calling the query interface corresponding to the subtask, generating at least one round of dialogue based on the search question, querying the target report, obtaining the query result corresponding to the subtask, and updating the context information based on the at least one round of dialogue.
[0009] According to an embodiment of the present application, the calling of the pre-trained language model by the artificial intelligence agent, the analysis of the query results corresponding to each subtask, and the obtaining of the analysis result for the target analysis task comprise: The artificial intelligence agent calls the pre-trained language model to analyze the query results corresponding to each subtask and obtain an analysis result for the target analysis task. The response result output by the pre-trained language model is obtained based on the response result.
[0010] According to an embodiment of the present application, the obtaining the analysis result for the target analysis task based on the response result comprises: obtaining consistency between the response result and premise data; the premise data comprises the target analysis task and the context information; in a case where the consistency is greater than or equal to a target threshold, taking the response result as the analysis result.
[0011] According to an embodiment of the present application, after the obtaining the consistency between the response result and the premise data, the method further comprises: in a case where the consistency is less than the target threshold, outputting prompt information; the prompt information is used to trigger manual review.
[0012] In a second aspect, the present application provides a report analysis device, which comprises: an interaction module, configured to receive a target analysis task through a front-end interaction layer; a splitting module, configured to split the target analysis task into a plurality of sub-tasks by calling a pre-trained language model through an artificial intelligence agent; each of the sub-tasks corresponds to a business requirement; a query module, configured to query a target report to obtain a query result corresponding to each of the sub-tasks by calling a query interface corresponding to each of the sub-tasks based on an order relationship between the plurality of sub-tasks through the artificial intelligence agent; an analysis module, configured to analyze the query result corresponding to each of the sub-tasks to obtain an analysis result for the target analysis task by calling the pre-trained language model through the artificial intelligence agent.
[0013] According to the report analysis device of the present application, the report analysis is performed through the artificial intelligence agent, the pre-trained language model is called through the artificial intelligence agent to plan and gradually split the complex analysis task, the relevant data is obtained through automatic planning and execution, and the analysis and decision are made by using the data and the domain knowledge, so that the automatic planning of the complex report analysis task can be realized, the pre-trained language model is automatically executed through gradual splitting, the ability of the pre-trained language model to cope with the complex report analysis task is improved, and thus the accuracy of the report analysis in the complex query scene can be improved.
[0014] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the report analysis method of the first aspect when executing the computer program.
[0015] In a fourth aspect, the present application provides a non-volatile computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the report analysis method according to the first aspect.
[0016] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a program or an instruction, and implement the report analysis method according to the first aspect.
[0017] In a sixth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the report analysis method according to the first aspect.
[0018] Additional aspects and advantages of the present application will be made apparent by the following description of embodiments thereof, given as a non-restrictive example, with reference to the attached drawings wherein: BRIEF DESCRIPTION OF DRAWINGS
[0019] The above and / or additional aspects and advantages of the present application will become apparent and be more readily understood from the following description, by way of example, with reference to the drawings, in which: Figure 1 is a flowchart of the report analysis method provided by the embodiments of the present application; Figure 2 is a schematic diagram of the system architecture of the report analysis method provided by the embodiments of the present application; Figure 3 is a structural schematic diagram of the report analysis device provided by the embodiments of the present application; Figure 4 is a structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / " generally indicates that the objects before and after are in an "or" relationship.
[0022] In the related art, although there is an AI question and answer system and method based on a large language model (LLM) and fusing NL2API and NL2SQL, in this method, the large language model directly operates the database, which has a high security risk, and for complex business systems, the output SQL statement is not optimized, which may lead to a high long query ratio, poor performance, and even cause query service exceptions.
[0023] And other report analysis methods based on large models, such as using vector retrieval methods to locate and analyze topics to obtain target report data and other means, although they can avoid the instability of large models generating SQL statements, they have limited processing capacity in complex scenarios and poor flexibility, and it is difficult to meet the analysis requirements in a case where a problem includes multiple analysis topics.
[0024] In summary, on the one hand, report analysis programs based on large models can reduce the data usage threshold by using natural language processing (NLP) technology to understand and analyze user input natural language, but when dealing with complex query problems, directly using large models for processing, the large model has poor ability to directly process reports, the efficiency of generating analysis results is low, and the performance is unstable. On the other hand, large models have understanding bias for professional domain data, and are difficult or unable to understand domain-specific nouns and indicators, etc., which can easily produce hallucination, and the quality of the generated analysis results is poor, making it difficult to output accurate professional report analysis results in a specific field.
[0025] The report analysis method, report analysis device, electronic device and readable storage medium provided by the embodiments of the present application will be described in detail below in conjunction with the drawings and specific embodiments and their application scenarios.
[0026] The report analysis method can be applied to a terminal and can be executed by hardware or software in the terminal.
[0027] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet having a touch-sensitive surface (e.g., a touchscreen display and / or a touchpad). It will also be appreciated that, in some embodiments, the terminal can not be a portable communication device, but rather a desktop computer having a touch-sensitive surface (e.g., a touchscreen display and / or a touchpad).
[0028] In the following embodiments, a terminal including a display and a touch-sensitive surface is described. However, it will be appreciated that the terminal can include one or more other physical user interface devices such as physical keyboards, mice, and joysticks.
[0029] The report analysis method provided by the embodiments of the present application can be executed by an electronic device or a functional module or functional entity capable of implementing the report analysis method in the electronic device. The electronic device mentioned in the embodiments of the present application includes but is not limited to a mobile phone, a tablet computer, a computer, a camera, a wearable device, and the like. The report analysis method provided by the embodiments of the present application will be described below taking the electronic device as an example.
[0030] Figure 1 is a flowchart of the report analysis method provided by the embodiments of the present application. As shown in Figure 1 , the report analysis method includes steps 110, 120, 130, and 140.
[0031] Step 110 receives a target analysis task through a front-end interaction layer.
[0032] In actual execution, the front-end interaction layer can be used to interact with the user. The target analysis task input by the user can be received through the front-end interaction layer.
[0033] In some embodiments, the target analysis task input by the user can be in the form of text or voice. The target analysis task in the form of text can include at least one of a question and a description.
[0034] Step 120 splits the target analysis task into a plurality of sub-tasks by calling a pre-trained language model through an artificial intelligence agent; each sub-task corresponds to one business requirement.
[0035] In actual execution, the execution of the target analysis task is implemented based on an artificial intelligence agent (AI Agent) in the embodiments of the present application to perform report analysis.
[0036] The artificial intelligence agent is a system driven by a large language model as a brain, which has the ability of autonomous understanding, perception, planning, memory, and tool use, and can automatically execute complex tasks.
[0037] In actual implementation, the embodiments of the present application can specifically adopt the manner of calling a pre-trained language model by an artificial intelligence agent to implement execution of a target analysis task and perform report analysis.
[0038] In some embodiments, the pre-trained language model can be a large language model (which can be referred to as a “large model” for short, Large Language Model, LLM). The pre-trained language model refers to a deep learning model that is pre-trained using a large amount of text data, so that the model can generate natural language text or understand the meaning of language text. The pre-trained language model can provide in-depth knowledge and language production about various topics by being trained on a large dataset.
[0039] In some embodiments, the pre-trained language model can be called by an artificial intelligence agent, the target analysis task can be split based on business requirements involved in the target analysis task, the target analysis task can be split into multiple subtasks, and each subtask can correspond to a business requirement. In the process of splitting, the order relationship between the subtasks can also be determined based on the logical relationship between the subtasks.
[0040] In some embodiments, the artificial intelligence agent can be mainly responsible for planning and decision-making, and can be used for task splitting, task execution, and task reasoning.
[0041] In some embodiments, the subtasks can be defined in advance. Based on each query interface constructed or generated in advance, a subprogram or function corresponding to the query interface can be designed. The subprogram or function can include a task description and required parameters of the corresponding subtask. The task description can describe the subtask from the perspectives of the function, dimension, and correlation of the index. The required parameters include the description, format, and whether it is necessary, and the like. By introducing prior knowledge through the construction of the subprogram, the understanding and planning capabilities of the pre-trained language model can be improved.
[0042] It should be noted that the query interface can be used to query basic indexes in a database or a data table. In some embodiments, the query interface can be constructed in advance according to domain knowledge of a domain to which the target analysis task belongs. The specific method of constructing or generating the query interface is not limited in the embodiments of the present application.
[0043] In some embodiments, task decomposition can be performed using a pre-trained language model. Through the pre-trained language model, according to the target analysis task of the user input such as the user question, in combination with the preset business scenarios in the task description of each subtask and the business index functions and dimensions involved in the subtask, etc., it is determined whether the target analysis task is complex enough to be decomposed into multiple subtasks. For a query-specific task (usually does not need to be decomposed into multiple subtasks), the query of the basic index can be directly performed. For a query-unclear task (needs to be decomposed into multiple subtasks), the target analysis task needs to be attributed and similar index recommended, etc., so as to be split into multiple subtasks. For example, the target analysis task input by the user is "the passenger flow of subway line 4", which can be directly queried using the query interface of the "passenger flow query" index to obtain the analysis result. For example, the target analysis task input by the user is "whether line 4 is crowded yesterday", which needs to analyze the relationship between crowded and passenger flow, and recommend the query interface of the "passenger flow query" index to query, so as to split into two subtasks.
[0044] In some embodiments, the pre-trained language model is also needed to analyze the dependency relationship between the subtasks and plan the execution order of the subtasks. For example, the subtask of "querying the passenger flow of the subway line" must be executed after the subtask of "querying the stations contained in the line".
[0045] It should be noted that in the construction and splitting of the subtasks, the prior knowledge (such as the non-standard functions in the industry, the functions of the indexes, and the correlation of the indexes, etc.) can be introduced into artificial intelligence through the task description and parameter description of the query interface of the index, which helps to improve the understanding of artificial intelligence for business data and indexes, and reduces or even avoids the generation of pre-trained language model hallucinations.
[0046] Step 130, based on the sequence relationship between the multiple subtasks, the artificial intelligence entity respectively calls the query interface corresponding to each subtask to query the target report and obtains the query result corresponding to the subtask.
[0047] In actual execution, after the multiple subtasks are split and the sequence relationship between the multiple subtasks is determined, the artificial intelligence entity can execute each subtask in sequence based on the sequence relationship between the multiple subtasks. For each subtask, executing the subtask includes calling the query interface corresponding to the subtask, querying the target report, and querying the basic index involved in the subtask, thereby obtaining the query result corresponding to the subtask.
[0048] In some embodiments, the target report in the database can be determined based on the target analysis task. For example, the target analysis task is "analyze the passenger flow of subway line 10", and the target report can be a report storing the operation data of subway line 10. For another example, the target analysis task is "analyze the passenger flow of all subway lines (including lines 1-10) from 7-9 am", and the target report can include 10 reports respectively storing the operation data of 10 subway lines (including lines 1-10).
[0049] In some embodiments, the subtask execution is performed, the pre-trained language model can parse the target analysis task input by the user, and the query interface alignment is performed. The query interface alignment can include format alignment and parameter alignment.
[0050] The format alignment can be used to extract the key information required for executing the subtask, format the key information into a format (generally json data format) that the model can understand. The above-mentioned key information can include the query interface to be called by the subtask and the parameters required by the query interface. The parameter alignment is to align and standardize the parameters according to the requirements of the query interface and the business data. The above-mentioned parameters can include time information and domain entities. Through parameter alignment, the time information (for example, "last week") can be converted into a standard format (for example, from "Year-Month-Day to Year-Month-Day"). Through parameter alignment, entities such as "Xiaoman waist" can be converted into "Guangzhou Tower" represented by them.
[0051] In some embodiments, the call to the query interface can be performed in sequence according to the subtask disassembly order, and the required data can be extracted to obtain the query result. For subtasks that are independent of each other, parallel execution can be performed; for subtasks that have a sequence, serial execution can be performed.
[0052] Step 140, calling the pre-trained language model by the artificial intelligence agent, analyzing the query results corresponding to each subtask, and obtaining the analysis result for the target analysis task.
[0053] In actual execution, after obtaining the query results corresponding to each subtask, task reasoning can be finally performed to obtain the analysis result for the target analysis task.
[0054] In some embodiments, the pre-trained language model can be called by the artificial intelligence agent, and the pre-trained language model can summarize and analyze the target analysis task input by the user in the form of a question and the basic information (i.e., the corresponding query result) queried by each subtask to obtain the analysis result for the target analysis task.
[0055] In some embodiments, performing the summary analysis can include first performing data profiling, and then performing index analysis. Moreover, the summary and suggestion can be performed in combination with the domain knowledge related to the target analysis task, and the final report analysis report can be completed as the analysis result of the target analysis task.
[0056] In some embodiments, the index analysis can include, but is not limited to, index formula factor attribution analysis, index dimension attribution analysis, and index correlation attribution analysis, etc.
[0057] In some embodiments, in combination with the domain knowledge related to the target analysis task, the summary and suggestion can be performed, for example, in the operation and maintenance scene, the maintenance suggestion and the spare parts guide can be generated in combination with the usage time of the device, the failure rate and the life cycle of the key components, as part of the analysis result of the target analysis task.
[0058] It can be understood that by decomposing the complex report analysis problem into subtasks such as data extraction and analysis, the data extraction problem is converted into multiple subtask query tasks, the complex report analysis problem is analyzed by the understanding and extraction ability of the pre-trained language model, and the format and parameter alignment is performed to form a standardized subtask execution format, and the artificial intelligence agent automatically completes the subtask query task. In some embodiments, the query result corresponding to the subtask and the related domain knowledge can be introduced into the pre-trained language model in combination with the context management, the pre-trained language model can perform data profiling and related index analysis, and the related domain knowledge can be combined to form the final report analysis result.
[0059] According to the report analysis method provided in the embodiments of the present application, the report analysis is performed by the artificial intelligence agent, the pre-trained language model is called by the artificial intelligence agent to plan and gradually decompose the complex analysis task, the related data is obtained by automatic planning and execution, and the analysis and decision are performed by using the data and the domain knowledge. The complex report analysis task can be automatically planned, and the pre-trained language model can be automatically executed by gradual decomposition, the ability of the pre-trained language model to cope with the complex report analysis task is improved, and thus the accuracy of the report analysis in the complex query scene can be improved.
[0060] In some embodiments of the present application, before the query interface corresponding to each subtask is called based on the sequence relationship between the multiple subtasks to query the target report and obtain the analysis result for the target analysis task, the method further includes: determining the fields corresponding to each business requirement based on the domain knowledge of the domain to which the target report belongs and the database schema definition language corresponding to the target report.
[0061] In actual execution, the domain knowledge layer can be constructed in advance to generate the query interface corresponding to different business requirements.
[0062] In some embodiments, based on the domain knowledge of the field to which the target report belongs and the underlying business data, the database mode definition language (DDL) of the database corresponding to the target report (i.e., the database storing the target report) can be automatically analyzed to obtain the storage mode of the data and the meaning of the fields, etc. The database mode definition language is used to define the structure of the database, including tables, fields, data types, and constraints, etc. After obtaining the storage mode of the data and the meaning of the fields, etc., the fields can be divided into two categories according to the structure and content of the data in each data table of the database, i.e., fields used to describe the classification, grouping, and attributes of the data, and fields used to measure the specific numerical values of the data. The fields used to describe the classification, grouping, or attributes of the data are dimension fields, which are usually discrete and non-numeric fields. The fields used to measure the specific numerical values of the data are indicator fields, which are usually continuous and numeric fields.
[0063] The dimension fields are usually of text type (e.g., VARCHAR, CHAR) or date type (e.g., DATE, DATETIME), and are used to describe the attributes or classification of the data, and are not directly used for numerical calculation.
[0064] The indicator fields are usually of numeric type (e.g., INT, DECIMAL, FLOAT), and are used for quantitative analysis, and can be directly used for numerical calculation.
[0065] In some embodiments, the fields corresponding to each business requirement can be determined respectively. The fields corresponding to the business requirement can include dimension fields and indicator fields.
[0066] Based on the fields corresponding to each business requirement respectively, the query interface corresponding to the business requirement is generated.
[0067] In actual implementation, for each business requirement, the indicator fields and the dimension fields in the fields corresponding to the business requirement can be combined and spliced to convert the abstract business requirement into a structured data query and analysis unit, forming a query interface of a basic indicator as the query interface corresponding to the business requirement.
[0068] For example, the basic indicator is the number of visitors, and based on the relevant analysis dimensions (e.g., time and / or region, etc.) corresponding to the indicator, the query interface of the number of visitors in a certain time period or the query interface of the number of visitors in a certain region can be formed.
[0069] In some embodiments, the indicator fields and the dimension fields in the fields corresponding to the business requirement can be combined and spliced based on the business logic consistency principle to ensure that the combination of the dimensions and the indicators conforms to the actual business process.
[0070] In some embodiments, the index field in the field corresponding to the business requirement is combined with the latitude field, and various structured combination strategies can be used according to the business analysis target and the data characteristics, such as a single-dimension single-index combination method, a single-dimension multi-index combination method, or a multi-dimension multi-index combination method.
[0071] In some embodiments, the query interface corresponding to each business requirement described above can be stored in the domain knowledge layer. In some embodiments, by analyzing the database DDL, the related indexes and dimensions can be identified through tables, fields, and data types, and the combination of the indexes and the dimensions is spliced into the query interface of the index to form the domain knowledge layer.
[0072] According to the report analysis method provided in the embodiments of the present application, the production database is isolated from the application through the construction of sub-tasks by the domain knowledge and the artificial intelligence agent, which can realize safer and more efficient data acquisition, guarantee the security and timeliness of business data acquisition, and can fuse the prior knowledge and the business data to enable the pre-trained language model to better understand the business.
[0073] In some embodiments of the present application, the artificial intelligence agent respectively calls the query interface corresponding to each sub-task based on the sequence relationship between the plurality of sub-tasks to query the target report and obtain the query result corresponding to the sub-task, including: for any sub-task, rewriting the current question corresponding to the sub-task based on the context information of the historical dialogue to obtain a semantic complete search question; the historical dialogue is a dialogue generated in the process of executing the sub-task before the sub-task.
[0074] In actual execution, in the execution of the sub-task, the context management mechanism can be used to ensure the coherence and consistency of the artificial intelligence agent in multiple rounds of dialogue or complex tasks. The role of the context management mechanism is to provide historical information for the artificial intelligence agent. When processing the current sub-task, the artificial intelligence agent can use the information of the historical dialogue of the executed sub-task to enhance the understanding and processing ability of the current sub-task, extract useful information and user inquiry habits, avoid repeated information query, and provide more personalized and accurate services.
[0075] In some embodiments, the context information can be retrieved and used by the artificial intelligence agent when needed. When retrieving the domain knowledge related to the task, the artificial intelligence agent can need to combine the context information to rewrite the current question corresponding to the sub-task to obtain a semantic complete search question.
[0076] The query interface corresponding to the sub-task is called, at least one round of dialogue is generated based on the search question, the target report is queried, the query result corresponding to the sub-task is obtained, and the context information is updated based on the at least one round of dialogue.
[0077] In actual execution, after obtaining the retrieval question, a query interface corresponding to the subtask can be called to query the target report based on the retrieval question, and obtain the query result corresponding to the subtask.
[0078] It should be noted that at least one round of dialogue can be generated in the process of querying the target report based on the retrieval question, and interaction with the user can be performed. The context information can be updated based on the above interaction.
[0079] In some embodiments, the context management mechanism described above can include context storage, context update, context retrieval, and context cleaning.
[0080] In some embodiments, context storage can be used to store and manage the data structure of context information. The context information includes information type and information content. The information type can include three types: user's question information, pre-trained language model's reply information, and subtask calling return information.
[0081] In some embodiments, context update can dynamically update context information according to new interaction. In some embodiments, context information can be incrementally updated based on current interaction information.
[0082] In some embodiments, context retrieval can retrieve and use context information when needed by the artificial intelligence agent. When retrieving domain knowledge related to the task, the artificial intelligence agent can need to combine context information to rewrite the current question corresponding to the subtask to obtain a semantically complete retrieval question.
[0083] In some embodiments, context cleaning is to periodically clean outdated or no longer relevant context information to avoid information overload. In some embodiments, expired context information can be cleaned according to a timestamp and a dialogue end flag. In some embodiments, context exceeding a certain limit can be cleaned.
[0084] According to the report analysis method provided in the embodiments of the present application, by using context management in the execution of subtasks, the coherence and consistency of the artificial intelligence agent in multiple rounds of dialogue or complex tasks can be improved, thereby improving the accuracy of report analysis in complex query scenarios.
[0085] In some embodiments of the present application, the artificial intelligence agent calls the pre-trained language model to analyze the query results corresponding to each subtask to obtain the analysis result for the target analysis task, including: the artificial intelligence agent calls the pre-trained language model to analyze the target analysis task and the query results corresponding to each subtask based on the domain knowledge related to the target analysis task, and obtains the response result output by the pre-trained language model.
[0086] In actual execution, the query results corresponding to the target analysis task and each subtask can be input into the pre-trained language model to perform task reasoning, and the output of the pre-trained language model is taken as the response result.
[0087] In some embodiments, the pre-trained language model can obtain the domain knowledge related to the target analysis task based on the query results corresponding to the target analysis task and each subtask. In some embodiments, the pre-trained language model can rewrite the target analysis task input by the user in combination with the aforementioned context information, obtain a complete description of the target analysis task, search for relevant knowledge in the domain knowledge by using the rewritten target analysis task, and obtain the domain knowledge related to the target analysis task.
[0088] In some embodiments, the pre-trained language model can analyze the query results corresponding to the target analysis task and each subtask in combination with the domain knowledge related to the target analysis task, and obtain the response result.
[0089] Based on the response result, the analysis result for the target analysis task is obtained.
[0090] In actual execution, the correctness of the response result can be verified, and the response result is taken as the analysis result for the target analysis task if the verification is passed.
[0091] According to the report analysis method provided in the embodiments of the present application, the pre-trained language model is called by the artificial intelligence agent, the query results corresponding to the target analysis task and each subtask are analyzed, the response result output by the pre-trained language model is obtained, and based on the response result, the analysis result for the target analysis task is obtained, which can improve the accuracy of report analysis in a complex query scenario.
[0092] In some embodiments of the present application, based on the response result, the analysis result for the target analysis task is obtained, including: obtaining the consistency between the response result and the premise data; the premise data includes the target analysis task and the context information.
[0093] In actual execution, the response result can be hallucination evaluated. The correctness of the response result is verified.
[0094] In some embodiments, the consistency between the response result output by the pre-trained model and the retrieved context information can be judged.
[0095] In some embodiments, the consistency between the response result output by the pre-trained model and the retrieved context information can be judged by a hallucination evaluation model. The input of the hallucination evaluation model includes the response result and the premise data. The premise data can include the target analysis task and the context information.
[0096] In some embodiments, the hallucination evaluation model can format the above inputs as follows: Premise data = Context information + Question (i.e., the target analysis task); Response result = Model answer (i.e., the result of the task reasoning output by the pre-trained language model).
[0097] In some embodiments, the result of judging the consistency between the response result output by the pre-trained model and the retrieved context information can be a consistency score. For example, the hallucination evaluation model can output a consistency score.
[0098] In the case where the consistency is greater than or equal to the target threshold, the response result is taken as the analysis result.
[0099] In actual implementation, in the case where the consistency between the response result and the premise data exceeds the target threshold, the answer can be directly returned, i.e., the aforementioned response result is directly returned as the analysis result for the target analysis question.
[0100] According to the report analysis method provided in the embodiments of the present application, by taking the response result as the analysis result in the case where the consistency between the response result and the premise data exceeds the target threshold, the generation of the hallucination of the pre-trained language model can be reduced or even avoided, thereby improving the accuracy of report analysis in a complex query scenario.
[0101] In some embodiments of the present application, after obtaining the consistency between the response result and the premise data, the method further includes: in the case where the consistency is less than the target threshold, outputting prompt information; the prompt information is used to trigger manual review.
[0102] In actual implementation, in the case where the consistency between the response result and the premise data is less than the target threshold, prompt information can be output to trigger manual review.
[0103] According to the report analysis method provided in the embodiments of the present application, by outputting prompt information in the case where the consistency between the response result and the premise data is less than the target threshold to trigger manual review, the generation of the hallucination of the pre-trained language model can be reduced or even avoided, thereby improving the accuracy of report analysis in a complex query scenario.
[0104] In some embodiments of the present application, the implementation of the above report analysis method can adopt the architecture as shown in Figure 2 Referring to Figure 2 , the architecture can mainly include a domain knowledge layer 210, an agent layer 220, a context management layer 230, and a front-end interaction layer 240.
[0105] In some embodiments, the domain knowledge layer 210 can be used to extract dimensions and indicators from the DDL of the business database, and form query interfaces of each basic indicator based on the dimensions and indicators.
[0106] In some embodiments, the agent layer 220 can be used for planning and decision-making, and can use a large model (i.e., the aforementioned pre-trained language model) to define subtasks, task decomposition, subtask execution, and task reasoning.
[0107] In some embodiments, the context management layer 230 is used to provide context information for the agent layer 220. The functions of the context management layer 230 can include context storage, context updating, context retrieval, and context cleaning.
[0108] In some embodiments, the front-end interaction layer 240 can be used to interact with users and display the process and conclusion of report analysis.
[0109] In some embodiments, the front-end interaction layer 240 can be used to implement user interaction and data visualization, and can realize interaction between the large model and the user through the front-end interaction page, thereby improving user experience and analysis efficiency.
[0110] In some embodiments, the content of the interaction between the large model and the user can include question clarification, analysis ideas, data visualization, and report analysis conclusions.
[0111] In some embodiments, question clarification is that when the user's demand is not clear, the large model can clarify the demand by asking questions. For example, the user inputs “I want to analyze the passenger flow”, and the large model can answer: “You can analyze from the perspectives of time trend, route, and region”, thereby further clarifying the user's demand.
[0112] In some embodiments, the interaction of analysis ideas refers to showing the user the process of task decomposition and the process of subtask calling, so as to help the user understand the analysis ideas of the large model.
[0113] In some embodiments, data visualization refers to displaying the results of subtask queries in a graphical manner, which helps the user to intuitively understand the characteristics and trends of the data. In some embodiments, the large model can realize data visualization by generating visualization code or directly generating charts.
[0114] In some embodiments, the report analysis conclusion can include at least one of data profile description, indicator analysis result, and report analysis report.
[0115] The report analysis method provided in the embodiments of the present application can be executed by a report analysis device. In the embodiments of the present application, the report analysis device is taken as an example to illustrate the report analysis device provided in the embodiments of the present application.
[0116] The application further provides a report analysis device. Figure 3 FIG. 1 is a structural schematic diagram of a report analysis device provided by the application. As shown in the figure, the report analysis device comprises an interaction module 310, a splitting module 320, a query module 330 and an analysis module 340. Figure 3
[0117] The interaction module 310 is configured to receive a target analysis task through a front-end interaction layer. The splitting module 320 is configured to split the target analysis task into a plurality of sub-tasks by calling a pre-trained language model through an artificial intelligence agent; each sub-task corresponds to a business requirement. The query module 330 is configured to call a query interface corresponding to each sub-task based on the sequence relationship between the plurality of sub-tasks, query a target report, and obtain a query result corresponding to the sub-task through the artificial intelligence agent. The analysis module 340 is configured to analyze the query result corresponding to each sub-task by calling the pre-trained language model through the artificial intelligence agent, and obtain an analysis result for the target analysis task.
[0118] According to the report analysis device provided by the application, In some embodiments, the report analysis device can further comprise: A generation module configured to determine a field corresponding to each business requirement based on domain knowledge of a domain to which a target report belongs and a database schema definition language corresponding to the target report, and generate a query interface corresponding to the business requirement based on the field corresponding to each business requirement.
[0119] In some embodiments, the query module 330 can be specifically configured to: For any sub-task, rewrite a current question corresponding to the sub-task based on context information of a historical dialogue, and obtain a semantic complete search question; the historical dialogue is a dialogue generated in the process of executing the sub-task before the sub-task; Call a query interface corresponding to the sub-task, generate at least one round of dialogue based on the search question, query the target report, obtain a query result corresponding to the sub-task, and update the context information based on the at least one round of dialogue.
[0120] In some embodiments, the analysis module 340 can comprise: An analysis unit configured to analyze the target analysis task and the query result corresponding to each sub-task based on domain knowledge related to the target analysis task by calling the pre-trained language model through the artificial intelligence agent, and obtain a response result output by the pre-trained language model; An obtaining unit configured to obtain an analysis result for the target analysis task based on the response result.
[0121] In some embodiments, the obtaining unit can be specifically configured to: obtain consistency between the response result and the premise data; the premise data comprises the target analysis task and the context information; in a case where the consistency is greater than or equal to a target threshold, take the response result as the analysis result.
[0122] In some embodiments, the obtaining unit can be further configured to: in a case where the consistency is less than the target threshold, output prompt information; the prompt information is used to trigger manual review.
[0123] The report analysis apparatus in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited in this regard.
[0124] The report analysis apparatus in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.
[0125] The report analysis apparatus provided in the embodiments of the present application can implement the method embodiments Figures 1 to 2 The processes implemented by the method embodiments are not repeated here to avoid repetition.
[0126] In some embodiments, as Figure 4As shown, the electronic device 400 according to the embodiment of the present application further comprises a processor 410, a memory 420 and a computer program stored in the memory 420 and executable on the processor 410. The computer program is executed by the processor 410 to implement the processes of the report analysis method according to the above embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.
[0127] It should be noted that the electronic device according to the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
[0128] The embodiment of the present application further provides a non-volatile computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the processes of the report analysis method according to the above embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.
[0129] The processor is the processor of the electronic device according to the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0130] The embodiment of the present application further provides a computer program product, which includes a computer program. The computer program is executed by a processor to implement the report analysis method according to the above embodiment.
[0131] The processor is the processor of the electronic device according to the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0132] The embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or an instruction to implement the processes of the report analysis method according to the above embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.
[0133] It should be understood that the chip according to the embodiment of the present application can also be referred to as a system level chip, a system chip, a chip system or a system on chip, etc.
[0134] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a", "comprising", or "comprises" does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. Additionally, it should be noted that the terms "one embodiment", "some embodiments", "certain embodiments", "certain examples", or "some examples" as used in the present document are intended to refer to one or more embodiments or examples that do not necessarily have to cover all embodiments or examples of the present application. In other words, use of the above terms does not necessarily refer to the same embodiment or example. Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0135] From the above description of the embodiments, it is apparent that the above-described method of the embodiments can be realized by means of software and general-purpose hardware platforms, of course, but in many cases, the former is a better embodiment. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device) to perform the methods described in the various embodiments of the present application.
[0136] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-described specific embodiments, which are merely illustrative rather than restrictive, and a person of ordinary skill in the art can make many forms without departing from the scope of the present application and the scope of protection of the claims.
[0137] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "certain embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in any one or more embodiments or examples.
[0138] While the embodiments of the application have been shown and described, it is to be understood that the embodiments can be varied, modified, substituted and changed by those skilled in the art without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.
Claims
1. A report analysis method characterized by, The method comprises the following steps: receiving a target analysis task through a front-end interaction layer; calling a pre-trained language model through an artificial intelligence agent to split the target analysis task into a plurality of sub-tasks; each of the sub-tasks corresponds to a business requirement; based on the sequence relationship between the plurality of sub-tasks, the artificial intelligence agent respectively calls a query interface corresponding to each of the sub-tasks to query a target report and obtain a query result corresponding to the sub-task; the artificial intelligence agent calls the pre-trained language model to analyze the query result corresponding to each of the sub-tasks and obtain an analysis result for the target analysis task.
2. The report analysis method of claim 1, wherein, Before the step of based on the sequence relationship between the plurality of sub-tasks, the artificial intelligence agent respectively calls a query interface corresponding to each of the sub-tasks to query a target report and obtain an analysis result for the target analysis task, the method further comprises the following steps: based on the domain knowledge of the domain to which the target report belongs and the database schema definition language corresponding to the target report, determining the fields corresponding to each of the business requirements; based on the fields corresponding to each of the business requirements, respectively generating a query interface corresponding to the business requirement.
3. The report analysis method according to claim 1 or 2, characterized by, The step of based on the sequence relationship between the plurality of sub-tasks, the artificial intelligence agent respectively calls a query interface corresponding to each of the sub-tasks to query a target report and obtain a query result corresponding to the sub-task, comprises the following steps: for any of the sub-tasks, rewriting the current question corresponding to the sub-task based on the context information of the historical dialogue to obtain a semantic complete search question; the historical dialogue is a dialogue generated in the process of executing the sub-task before the sub-task; calling the query interface corresponding to the sub-task, generating at least one round of dialogue based on the search question, querying the target report, obtaining the query result corresponding to the sub-task, and updating the context information based on the at least one round of dialogue.
4. The report analysis method of claim 3, wherein, The step of based on the sequence relationship between the plurality of sub-tasks, the artificial intelligence agent respectively calls a query interface corresponding to each of the sub-tasks to query a target report and obtain an analysis result for the target analysis task, comprises the following steps: based on the domain knowledge related to the target analysis task, the artificial intelligence agent calls the pre-trained language model to analyze the target analysis task and the query result corresponding to each of the sub-tasks to obtain a response result output by the pre-trained language model; based on the response result, obtaining an analysis result for the target analysis task.
5. The report analysis method of claim 4, wherein, The step of based on the response result, obtaining an analysis result for the target analysis task, comprises the following steps: obtaining the consistency between the response result and premise data; the premise data comprises the target analysis task and the context information; in the case that the consistency is greater than or equal to a target threshold, the response result is taken as the analysis result.
6. The report analysis method of claim 5, wherein, After the step of obtaining the consistency between the response result and premise data, the method further comprises the following steps: in the case that the consistency is less than the target threshold, outputting a prompt information; the prompt information is used to trigger manual review.
7. A report analysis apparatus characterized by comprising: The method comprises the following steps: an interaction module is configured to receive a target analysis task through a front-end interaction layer; The splitting module is configured to split the target analysis task into a plurality of subtasks by invoking a pre-trained language model by an artificial intelligence agent. Each of the subtasks corresponds to a business requirement. The querying module is configured to query a target report by invoking a query interface corresponding to each of the subtasks based on a sequence relationship between the subtasks by the artificial intelligence agent, and obtain a query result corresponding to the subtask. The analysis module is configured to analyze the query result corresponding to each of the subtasks by invoking the pre-trained language model by the artificial intelligence agent, and obtain an analysis result for the target analysis task.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the report analysis method according to any one of claims 1-6 when executing the program.
9. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the report analysis method according to any one of claims 1-6 when executed by the processor.
10. A computer program product comprising a computer program, characterized in that, The computer program implements the report analysis method according to any one of claims 1-6 when executed by the processor.
Citation Information
Cited By
Multi-agent collaborative simulation circuit analysis reasoning method, system and equipment
CN121902730A