Report generation method, system, electronic device, and storage medium
By obtaining requirement text information in the report generation method, identifying intent, and orchestrating intelligent agents, a report matching user needs is generated, solving the problems of high cost and long cycle in existing technologies, and achieving efficient and low-cost report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU ALIBABA INT INTERNET IND CO LTD
- Filing Date
- 2024-02-28
- Publication Date
- 2026-06-26
AI Technical Summary
Existing report generation methods are costly and time-consuming, failing to quickly meet user needs.
By acquiring textual information about user needs in the target application scenario, identifying the user's intent, obtaining report parameters, and selecting and arranging them based on a preset intelligent agent, a report matching the user's needs is generated.
It enables the rapid and low-cost generation of reports that match user needs, improving report generation efficiency and reducing the need for manual data collection and analysis.
Smart Images

Figure CN118228687B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a report generation method, a report generation system, an electronic device, a storage medium, and a computer program product. Background Technology
[0002] In real life and work, it's frequently necessary to generate various types of insight reports to solve and answer a variety of questions. For example, national growth project analysis reports answer questions such as whether traffic in certain industries within a given country is sufficient, which industry sectors or regions are worth increasing investment in, and which should reduce investment in. Another example is industry development trend reports, which showcase current industry trends, the national differences in these trends, and suggestions for future industry development. Yet another example is strategic analysis reports in the e-commerce field, which combine national macroeconomic conditions and competitor analysis to produce strategic analysis results. Currently, reports in various fields addressing different problems are typically generated manually by data analysts in the relevant fields, who collect data, perform statistical analysis, and then manually generate the reports. This manual report generation method suffers from drawbacks such as high cost and long turnaround time.
[0003] It is evident that existing report generation methods still require improvement. Summary of the Invention
[0004] This application provides a report generation method that can quickly generate reports according to user needs, with low cost and high efficiency.
[0005] Accordingly, embodiments of this application also provide a report generation system, an electronic device, a storage medium, and a computer program product to ensure the implementation and application of the above-mentioned report generation method.
[0006] To address the aforementioned problems, this application discloses a report generation method, the method comprising:
[0007] Obtain the required text information for the report to be generated in the target application scenario;
[0008] The requirement text information is used to identify the requirement intent and obtain the report parameters that match the report to be generated;
[0009] Based on the target application scenario, preset intelligent agents are selected and arranged to obtain an intelligent agent call chain;
[0010] Based on the report parameters, the preset agents in the agent call chain are chained together to generate a report that matches the required text information.
[0011] This application discloses a report generation method applied to a client, the method comprising:
[0012] Obtain the target application scenario and requirement text information for the report to be generated;
[0013] The target application scenario and the requirement text information are sent to a preset server, causing the preset server to perform the following report generation operations based on the target application scenario and the requirement text information: the requirement text information is used to identify the requirement intent, and report parameters matching the report to be generated are obtained; preset agents are selected and arranged based on the target application scenario to obtain an agent call chain; based on the report parameters, the preset agents in the agent call chain are chained together to generate a report matching the requirement text information.
[0014] Obtain the report generated by the preset server;
[0015] Present the report.
[0016] This application discloses a report generation system, the system comprising: a client and a server, wherein...
[0017] The client is used to obtain the target application scenario and requirement text information of the report to be generated, and send the target application scenario and requirement text information to the server.
[0018] The server is used to receive the target application scenario and the requirement text information, and to perform requirement intent recognition on the requirement text information to obtain the report parameters that match the report to be generated.
[0019] The server is also used to select and orchestrate preset intelligent agents based on the target application scenario to obtain an intelligent agent call chain;
[0020] The server is also used to chain-call the preset intelligent agents in the intelligent agent call chain based on the report parameters, and generate a report that matches the required text information;
[0021] The client is also used to obtain the report and to display the report.
[0022] This application also discloses an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method described in this application.
[0023] This application also discloses a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in this application.
[0024] This application also discloses a computer program product, including a computer program / computer executable instructions, characterized in that the computer program / computer executable instructions, when executed by a processor in an electronic device, implement the method described in this application.
[0025] Compared with the prior art, the embodiments of this application have the following advantages:
[0026] After obtaining the requirement text information of the report to be generated in the target application scenario, the method first identifies the requirement intent of the requirement text information to obtain the report parameters matching the report to be generated, thus achieving an accurate understanding of user needs. Then, based on the target application scenario, preset intelligent agents are selected and arranged to obtain an intelligent agent call chain. Finally, based on the report parameters, the preset intelligent agents in the intelligent agent call chain are chained together to generate a report matching the requirement text information. This method can automatically and quickly generate reports that match user needs, effectively improving report generation efficiency. Using this method to generate reports eliminates the need for manual data collection and analysis, resulting in higher efficiency and lower costs. Attached Figure Description
[0027] Figure 1 This is a flowchart of one step of the report generation method disclosed in the embodiments of this application;
[0028] Figure 2 This is a flowchart of another step in the report generation method disclosed in the embodiments of this application;
[0029] Figure 3 This is a schematic diagram of the client interface in the report generation method disclosed in the embodiments of this application;
[0030] Figure 4 This is a schematic diagram of the report displayed on the client side in the report generation method disclosed in the embodiments of this application;
[0031] Figure 5 This is an interactive schematic diagram of the report generation system disclosed in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram of the implementation architecture of the report generation system disclosed in the embodiments of this application;
[0033] Figure 7 This is a schematic diagram of the report generation process in an application scenario of the report generation system disclosed in this application embodiment;
[0034] Figure 8 This is a schematic diagram of the structure of an exemplary device provided in one embodiment of this application. Detailed Implementation
[0035] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] The report generation method disclosed in this application can be applied to generate various types of reports in multiple application scenarios. For example, in the scenario of international growth analysis for cross-border e-commerce websites, the website assistant needs to answer questions such as whether the traffic for a certain industry in a specified country is sufficient, which industries are worth increasing investment in, and which industries need to reduce investment in. Another example is that some services need to generate trend reports such as what the hot trends in a specified industry are, and what the international differences in these trends are. Yet another example is that in the e-commerce field, when maintaining merchant relationships, website sales need to provide reports with future development suggestions based on the merchant's operating status on the website and the industry trends of the merchant's main categories. Finally, when conducting strategic analysis of cross-border e-commerce, it is necessary to combine the macroeconomic situation and market competition in various countries to generate strategic analysis reports.
[0037] In practical implementation, the report generation method disclosed in this application abstracts a general report generation process and automatically sets up intelligent agents with corresponding capabilities at each stage of the report generation process to complete various forms of AI (Artificial Intelligence) tasks such as question-answering understanding, data extraction, content production, and text summarization. Optionally, the implementation form of the intelligent agent includes, but is not limited to, any of the following: components, applications, service interfaces, and functional modules.
[0038] In addition, to address the diverse report content output needs, the system provides automated orchestration capabilities for intelligent agents, enabling dynamic assembly of the report generation process. This allows for the understanding and response to various report generation requirements, automatically generating reports that match user needs.
[0039] The report generation method disclosed in this application is applied to the server side, such as... Figure 1 As shown, the method includes steps 102 to 108.
[0040] Step 102: Obtain the required text information of the report to be generated in the target application scenario.
[0041] In some optional embodiments, the report generation method disclosed in this application can be implemented through a report generation system. The report generation system includes a client and a server. Users can select an application scenario through the client, input the required text information for the report to be generated, and send the application scenario and the required text information to the server. The server then executes the report generation method disclosed in this application, generates a report, and sends it to the client for display. The client can be implemented as a webpage, an application, or other forms.
[0042] The report generation system supports generating reports for various application scenarios. For example, it supports generating reports for scenarios including, but not limited to, the following: user growth, merchant growth, and product growth. The user growth scenario could be, for example, analyzing the market of a specific industry in a particular country and generating a user growth budget adjustment report; the merchant growth scenario could be, for example, analyzing the market trends of a specific segment within an international industry and generating a merchant development opportunity analysis report; and the product growth scenario could include: industry hot topic push notifications, segmented market trend keywords, and price / value indicator interpretation. The target application scenario is selected by the user through the client. The application scenarios supported by the report generation system are defined according to application requirements.
[0043] The requirement text information is used to describe the requirements for the report to be generated. The content of the requirement text information is not limited in this embodiment. For example, the requirement text information can be: "Recommendations on the Clothing Industry Trends in Country X," or "Comparative Analysis of Product Sales," etc. In some optional embodiments, the user can select an application scenario through the client, and then further input the questions they are interested in. Correspondingly, the client sends the user-input questions as requirement text information, along with the user-selected application scenario, to the server to trigger the report generation system to generate the report content for that question under the corresponding application scenario.
[0044] Step 104: Perform requirement intent recognition on the requirement text information to obtain the report parameters that match the report to be generated.
[0045] In practice, user-inputted requirements are diverse and lack standardization. The first challenge in generating a report that meets user needs based on these non-standardized requirements is accurately understanding the textual information and obtaining the specific report parameters corresponding to the requirements. Then, the report can be automatically generated based on these parameters.
[0046] To automatically generate reports based on user-inputted text information, this application predefines several application scenarios and predefines several metrics for each scenario as report parameters. Optionally, the report parameters include one or more of the following dimensions: region, industry, time, data analysis object, and report type. For example, for a user growth application scenario, region, industry, and report type are required; for a merchant growth application scenario, region, industry, and report type are required; and for a product growth application scenario, industry, category, region, time, and a list of growth metrics are required.
[0047] The report parameters for the geographic dimension include, but are not limited to, any of the following: geographical regions such as country, province, and city. The report parameters for the industry dimension include, but are not limited to, categories such as apparel, food, tourism, and technology. The report parameters for the time dimension describe the time when the original data for the report was generated. The report parameters for the data analysis object dimension vary depending on the application scenario. For example, for a product growth application scenario, the data analysis object could be, for instance, monthly or quarterly sales volume. For a user growth application scenario, the data analysis object could be, for example, holidays or user registrations. The report parameters for the report type dimension describe the type of report generated, including, but not limited to, any of the following: macro reports, trend charts, thematic summaries, and analytical insights.
[0048] In the embodiments of this application, the reporting parameters of interest in each application scenario are determined according to the specific application scenario. The embodiments of this application do not impose restrictions on the reporting parameters that need to be considered in each application scenario.
[0049] The report parameters can be expressed using preset keywords for the corresponding dimension, or through words with corresponding attributes. For example, report parameters for the geographical dimension can be represented by "a certain country," and report parameters for the report type dimension can be represented by "trend," "popularity," etc.
[0050] In the specific implementation of this application, the following two methods, including but not limited to, can be used to identify the intent of the requirement text information and obtain the report parameters that match the report to be generated.
[0051] (I) Content-Generative Methods
[0052] In some optional embodiments, the step of identifying the demand intent of the demand text information and obtaining the report parameters matching the report to be generated includes: formatting a preset prompt word template corresponding to the target application scenario based on the demand text information to obtain a first prompt word; and calling a preset generative pre-trained model based on the first prompt word, so that the generative pre-trained model analyzes and extracts information according to the demand text information to obtain the report parameters.
[0053] For example, a generative pre-trained model, such as the GPT (Generative Pre-trained Transformer) model, can be used to extract report parameters from the requirement text information. In the embodiments of this application, corresponding prompt words can be pre-trained for each application scenario to generate a prompt word template, which is used to generate report parameters for the corresponding application scenario based on the input text. For example, general prompt words that have been fine-tuned and tested can be used as fixed prompt words in the prompt word template, and the information that needs to be dynamically obtained can be expressed as placeholders to generate the prompt word template. The process of creating the prompt word template is described in the prior art and will not be repeated here.
[0054] Optionally, the prompt word template includes at least the following: a question description, a system role description, and a response description. The question description describes the textual information of the request; the system role description describes the dimensions of the report parameters that the generative pre-trained model needs to generate based on the input; and the response description describes the format of the output content of the generative pre-trained model. In some optional embodiments, the preset prompt word template for identifying the intent of the request can be represented, for example, as:
[0055] "question: $input"
[0056] system_role: Extracts the target country, industry, and report type from the input question. Outputs the result in JSON format.
[0057] '
[0058] answer: {'country' = $country, 'industry' = $industry, 'target' = $report type}.
[0059] In this prompt template, "$input" represents a placeholder for the required text information, "$country" represents a placeholder for the extracted country information, "$industry" represents a placeholder for the extracted industry information, and "$report type" represents a placeholder for the extracted report type parameters.
[0060] After formatting the preset prompt word template using the acquired requirement text information, the prompt words are extracted from the report parameters. Then, based on the prompt words extracted from the generated report parameters, the generative pre-trained model is called, so that the generative pre-trained model extracts the prompt words from the report parameters and performs the corresponding report parameter generation operation to generate the report parameters.
[0061] For a specific example, given the user-inputted text message "Recent six-month trend recommendations for the apparel industry in Country X", the prompt words extracted from the report parameters after formatting this text message can include the following text content:
[0062] 1. Question, for example: "Development trend of the clothing industry in Country X";
[0063] 2. System role (i.e., "system_role"), for example: "Extract the target country, industry, and target parameters from the input question and output them in JSON format";
[0064] 3. Response (i.e., "answer"), for example: "The output includes: region, industry, and report type, output in three lines, where region is the target country to be extracted, industry is the industry to be extracted, and report type is the target parameter to be extracted."
[0065] Based on the formatted report parameter extraction prompts, the generative pre-trained model is called to extract the report parameters, resulting in the following output: Region = "Country X", Industry = "Apparel", Report Type = "Trend Analysis". Here, "Country X", "Apparel", and "Trend Analysis" represent report parameters from different dimensions.
[0066] (II) Keyword Extraction Methods
[0067] In some optional embodiments, the step of identifying the demand intent in the demand text information and obtaining the report parameters matching the report to be generated includes: identifying preset keywords included in the demand text information through word matching technology; and obtaining the report parameters based on the identified preset keywords.
[0068] In some alternative embodiments, several keywords can be pre-set according to various report parameters to form a keyword library. For example, keywords such as country name, province name, industry name, report type name, and time unit can be set to form the keyword library. During the report generation stage, the user-input requirement text information is first segmented to obtain several words included in the requirement text information; then, each word segment is matched with the keywords in the keyword library for similarity, and based on the matching results, preset keywords are identified in the requirement text information; then, based on the identified keywords and the preset report parameters corresponding to the keywords, the identified report parameters in the requirement text information are obtained.
[0069] For a specific example, if the keyword library includes "Country X", "clothing", "quarterly", and "trend analysis", and the word segmentation results for the demand text "Country X Clothing Industry Trend Suggestions" include the following words: "Country X", "clothing", "industry", "trend", and "suggestions", then through similarity matching, it can be identified that the demand text includes the following keywords: "Country X", "clothing", and "trend analysis". Furthermore, the report parameters corresponding to the demand text can be represented as: "Country X", "clothing", and "trend analysis", where "Country X" represents the value of the regional dimension report parameter, "clothing" represents the value of the industry dimension report parameter, and "trend analysis" represents the value of the report type dimension report parameter.
[0070] Optionally, the step of performing requirement intent recognition on the requirement text information and obtaining the report parameters matching the report to be generated can be performed by a preset intelligent agent for intent recognition.
[0071] In other embodiments, other methods can be used to extract preset information from the required text information to obtain report parameters, which will not be listed one by one in this embodiment.
[0072] Step 106: Select and arrange the preset intelligent agents based on the target application scenario to obtain the intelligent agent call chain.
[0073] In some optional embodiments, the preset intelligent agent is created by: decomposing and aggregating the report generation process of a preset application scenario to obtain multiple deduplicated atomic capabilities, and creating a preset intelligent agent corresponding to each atomic capability. The preset intelligent agent is implemented either based on a generative pre-trained model or based on a service interface. In the embodiments of this application, the atomic capability is a function implemented by an intelligent agent, which can be manually divided according to the specific application scenario.
[0074] In the embodiments of this application, a general report generation process is abstracted by analyzing the report generation process of several application scenarios. Simultaneously, adaptive intelligent agents are set up at each stage of the report generation process to complete tasks from basic data acquisition, data analysis and processing, text summarization, and finally report output. The stages included in the report generation process may differ in different application scenarios, and the input and output content of each stage may also differ. In the embodiments of this application, several intelligent agents are pre-set by analyzing the report generation process of several application scenarios.
[0075] For example, by decomposing the report generation process supported by the report generation system according to the software development functional module design scheme, one or more tasks are obtained, each task implementing an atomic capability. Each report generation process is then decomposed into one or more sequentially implemented atomic capabilities. Each atomic capability obtained corresponds to a specific task, as well as specified inputs and outputs. In some optional embodiments, the functional decomposition can be performed with the goal of decoupling tasks and minimizing redundancy.
[0076] Furthermore, the atomic capabilities obtained from the breakdown of each application scenario are aggregated, and atomic capabilities with the same function are grouped together as the capabilities of a single agent. An agent that implements this atomic capability is then created. To make this atomic capability applicable to different application scenarios, the application scenario-related inputs and outputs of this atomic capability can be defined as variables of the agent. For example, taking the report generation process of application scenario S1, which is broken down into n atomic capabilities (S11, S12, ..., S1n), and the report generation process of application scenario S2, which is broken down into m atomic capabilities (S21, S22, ..., S2m), where m and n are positive integers, if the fundamental capability S1n obtained from the breakdown of application scenario S1 is to generate a report in a first format from formatted input text, and the fundamental capability S2m obtained from the breakdown of application scenario S2 is also to generate a report in a first format from formatted input text, then only one preset agent needs to be created. This preset agent is used to generate a report in a first format from formatted input text, and this preset agent can be reused by application scenarios S1 and S2.
[0077] Optionally, the preset intelligent agent includes any one or more of the following: an intelligent agent for generating database query statements, an intelligent agent for formatting data into a report in a target format, an intelligent agent for executing a specified database query instruction to obtain data within the system, and an intelligent agent for calling a preset service interface to obtain data outside the system.
[0078] For specific examples, taking a report generation system that only supports user growth and merchant growth application scenarios as an example, the report generation process for the user growth application scenario can be broken down into: generating database query statements, executing database query statements to read the database, data retrieval, user metric drill-down analysis, comparative analysis, trend analysis, generating a country summary, and generating an industry summary. The report generation process for the merchant growth application scenario can be broken down into: generating database query statements, executing database query statements to read the database, data retrieval, merchant metric drill-down analysis, comparative analysis, trend analysis, generating a country summary, generating an industry summary, and generating a summary of trending searches and best-selling items. The atomic capabilities corresponding to the above tasks in these two application scenarios are aggregated according to function to obtain the following atomic capabilities for each task: generating database query statements, executing database query statements to read the database, data retrieval, user metric drill-down analysis, merchant metric drill-down analysis, comparative analysis, trend analysis, generating a country summary, generating an industry summary, and generating a summary of trending searches and best-selling items. By creating separate agents (such as components corresponding to each task) for each aggregated task to implement the atomic capabilities corresponding to the task, multiple agents can be obtained.
[0079] As can be seen from the aforementioned method for creating intelligent agents, each agent possesses specific capabilities and has designated inputs and outputs. These agents can be reused in multiple application scenarios, thereby improving the development efficiency of the report generation system and reducing development costs.
[0080] In some embodiments of this application, each preset intelligent agent can be encapsulated as a component in the report generation system for use by the system program.
[0081] During the development of the report generation system, the preset intelligent agents implementing each atomic capability can be implemented based on the call of a generative pre-trained model, the call of a service interface, or completely self-written program code. For example, one or more of the preset intelligent agents can be implemented by reading prompt words through program code and then calling a generative pre-trained model based on the read prompt words. Another example is that one or more of the preset intelligent agents can be implemented by reading input content through program code and then using the input content as an input parameter to call the query service interface of a specified search engine. In the embodiments of this application, the implementation method of the preset intelligent agents is not limited.
[0082] As mentioned earlier, the intelligent agent is obtained by decomposing the report generation process. As the reverse operation of this decomposition, during the report generation stage, by selecting and arranging some intelligent agents from the aforementioned preset agents according to the needs of a specified application scenario, the report generation process can be dynamically assembled. Then, based on the assembly result, the selected intelligent agents are sequentially invoked to execute the corresponding tasks, thereby generating a report for the corresponding application scenario.
[0083] In practical applications, the report generation process may differ for different application scenarios. Therefore, it is necessary to determine in real time each step of the report generation process for the target application scenario, as well as the corresponding preset intelligent agents for each step, to determine which preset intelligent agents need to be called sequentially when generating the report for the target application scenario. The preset intelligent agents that need to be called sequentially when generating the report for the target application scenario constitute an intelligent agent call chain. The process of determining which preset intelligent agents need to be called sequentially when generating the report for the target application scenario is essentially the process of selecting and orchestrating preset intelligent agents.
[0084] The selection and arrangement of preset intelligent agents based on the target application scenario to obtain the intelligent agent call chain includes, but is not limited to, any of the following methods.
[0085] (i) Selecting and arranging agents based on configuration information
[0086] In some optional embodiments, the step of selecting and orchestrating preset agents based on the target application scenario to obtain an agent call chain includes: obtaining an agent call chain according to agent configuration information of the target application scenario, wherein the agent configuration information is used to describe the preset agents that need to be called sequentially when generating a report of the target application scenario.
[0087] In some embodiments of this application, descriptive information can be further set for specific application scenarios. This descriptive information describes the preset intelligent agents that need to be invoked sequentially when generating a report for the corresponding application scenario. In embodiments of this application, the descriptive information pre-set for each application scenario is denoted as "intelligent agent configuration information." The preset intelligent agents that need to be invoked sequentially when generating a report for the corresponding application scenario are set according to the requirements of the application scenario, the input and output content of each application scenario, and the capabilities of each preset intelligent agent.
[0088] Taking the merchant growth application scenario of an e-commerce website as an example, the following three intelligent agents can be set up to work collaboratively: a data collection intelligent agent, a data understanding intelligent agent, and a result generation intelligent agent. The data collection intelligent agent connects to a designated on-site database, generates a database query statement based on the user's question, and interacts with the database based on the generated query statement to obtain the basic data needed to generate the report. The data understanding intelligent agent understands and processes the obtained basic data to obtain indicator values corresponding to the user's needs. The result generation intelligent agent processes the indicator values obtained from the data processing to generate the final report content. The data collection intelligent agent, the data understanding intelligent agent, and the result generation intelligent agent can all or partly be implemented by pre-writing generation prompts to call a generative pre-trained model.
[0089] In other application scenarios, two types of data collection agents can be created: one for reading basic data within a specified website, and the other for calling external search engine interfaces to obtain external basic data in real time. Correspondingly, the data understanding agent can be used to understand and process the acquired basic data within and outside the website to obtain indicator values corresponding to user needs.
[0090] For example, based on the capabilities of the preset agents, the report generation process of the target application scenario S3 can be broken down into three tasks. These three task blocks can be implemented by preset agents A, B, and C, each with corresponding capabilities. Therefore, the agent configuration information for the target application scenario S3 can be represented as: S3 = {A, B, C}, where A, B, and C represent the three agents that need to be called sequentially when generating the report for the target application scenario S3. Accordingly, based on the agent configuration information for the target application scenario S3, the call chain of the agents in the target application scenario S3 can be determined as: S3 = A → B → C.
[0091] Specifically, in an application scenario that provides valuable growth insight reports for intelligent assistant applications in merchants and industries, the report generation process of the growth insight report includes the following steps: obtaining industry data from an e-commerce website, obtaining industry data from a search engine, and generating the growth insight report based on the on-site and off-site data. In this application scenario, the intelligent agent configuration information can be described as a sequence of on-site data collection intelligent agents, off-site data collection intelligent agents, and report generation intelligent agents. In this sequence, the on-site data collection intelligent agent is used to obtain on-site industry data from the e-commerce website; the off-site data collection intelligent agent is used to obtain off-site industry data from a specified search engine; and the report generation intelligent agent is used to generate the growth insight report based on the input industry data. During the report generation phase, the above sequence can be used to determine the agents that need to be called sequentially when generating the growth insight report. The agents called sequentially constitute the agent call chain corresponding to the application scenario, for example, represented as: (A1, A2) → B1, where A1 and A2 represent the in-site data collection agent and the out-of-site data collection agent, respectively, and B1 represents the report generation agent.
[0092] (ii) Using generative pre-trained models for agent selection and orchestration
[0093] In some optional embodiments, the step of selecting and orchestrating preset agents based on the target application scenario to obtain an agent call chain includes: based on the target application scenario and the capability description text of the preset agents, calling a generative pre-trained model to generate an agent call chain corresponding to the target application scenario.
[0094] Generative pre-trained models possess powerful content generation capabilities. In some optional embodiments, by pre-training prompts, the generative pre-trained model can generate an agent call chain corresponding to the target application scenario based on the agent's capability description text given in the prompts and the target application scenario information. The capability description text includes, but is not limited to, the identifiers of each preset agent and the capability description text of each preset agent. Taking the LangChain framework (a programming framework that helps use large language models in applications) to implement agent selection and orchestration as an example, preset agents can be used as components. Pre-configured preset agents and agent orchestration prompt templates can be configured in the LangChain framework, enabling the framework to automatically generate a call chain composed of preset agents. After each agent in the call chain is invoked according to its dependency relationship, a report of the target application scenario can be generated.
[0095] For specific implementation methods of configuring preset smart agents in the LangChain framework, please refer to the existing methods of using the LangChain framework, which will not be repeated in the embodiments of this application.
[0096] Step 108: Based on the report parameters, perform chained calls on the preset agents in the agent call chain to generate a report that matches the requirement text information.
[0097] After obtaining the call chain of the agents that match the current requirement text information in the aforementioned steps, each agent in the call chain is called in turn to generate a report that matches the current requirement text information.
[0098] Taking the intent recognition and report generation process as described above, after decomposition and arrangement, the call chain of the agents can be represented as E→F→G, where E represents the data query statement generating agent, F represents the data acquisition agent, and G represents the report generating agent. In this step, firstly, the data query statement generating agent E is called to generate a data query statement; then, the data acquisition agent F is called to execute the above data query statement, perform data query, and obtain the query data; finally, the report generating agent G is called to format the query data output by the data acquisition agent F to obtain a suitable report.
[0099] Due to different application scenarios, the number and type of pre-defined agents included in the agent call chain are usually different. On the other hand, the capabilities and creation methods of different pre-defined agents are different, which may lead to different calling methods for the pre-defined agents.
[0100] In some optional embodiments, the step of chaining the preset agents in the agent call chain based on the report parameters to generate a report matching the requirement text information includes: sequentially taking the agents in the call chain as the current agents in order from beginning to end, and performing the following call operations on the current agents: calling the current agent to obtain the output content of the current step call; calling the current agent based on the report parameters to obtain the output content of the current step call; calling the current agent based on the output content generated by one or more previous step call operations to obtain the output content of the current step call; and calling the current agent based on the output content generated by one or more previous step call operations and one or more parameters in the report parameters to obtain the output content of the current step call.
[0101] In some embodiments of this application, the invocation process of each preset agent in the invocation chain can be executed through a preset agent scheduling task. The preset agent may or may not have input content. The input and output content of the preset agent are predetermined based on its capabilities and declared in the report generation system. When invoking the current agent, the agent scheduling task first determines whether the current agent depends on the input content. If it depends on the input content, it first obtains the value of the dependent input content, and then uses the obtained value of the input content as the invocation parameter for the current agent to invoke it; if it does not depend on the input content, it directly invokes the current agent.
[0102] For example, for a pre-defined agent used to read external data needed to generate a report, its input comes from user input, such as one or more report parameters extracted from the user's input text information, and its output is a document obtained from a specified search engine.
[0103] For example, a pre-set agent used to generate database query statements can set prompt words for each combination of database and application scenario. Therefore, when such a pre-set agent is invoked, it calls the generative pre-trained model based on the pre-set prompt words to generate database query statements.
[0104] For example, a preset agent used for data analysis has the capability to analyze and process data read by other agents to generate the required indicator values in a report. The input content of such a preset agent can be the output content of one or more preset agents. In some optional embodiments, the input content of such a preset agent can also include both the output content of the preset agent and the report parameters.
[0105] Each intelligent agent, after being invoked, executes according to a preset program flow to complete the corresponding task. In specific implementation, the program flow of each preset intelligent agent is set according to specific capability requirements. In the embodiments of this application, the program flow of each preset intelligent agent is not limited.
[0106] As mentioned earlier, the preset intelligent agent can be implemented based on the invocation of a generative pre-trained model, the invocation of a service interface, or the implementation of self-written program code. The execution logic of the intelligent agent implemented in different ways differs after being invoked.
[0107] For example, for a preset intelligent agent implemented based on a service interface call, the input content can be read first to obtain the call parameter value of the preset service interface; then, the preset service interface (such as a search engine interface) can be called based on the call parameter value to obtain the search results; then, the output content can be generated based on the search results and the output can be completed.
[0108] For example, for an agent implemented based on a generative pre-trained model, the corresponding preset prompt words can be read directly. Then, based on the read preset prompt words, the preset generative pre-trained model can be called to generate output content.
[0109] For example, for an agent implemented based on a generative pre-trained model, the corresponding prompt word template and input content can be obtained first; then, the prompt word template obtained is formatted based on the read input content to generate prompt words; then, the pre-set generative pre-trained model is called based on the generated prompt words to generate output content.
[0110] In some embodiments of this application, when the agent call chain is generated using the LangChain framework, the LangChain framework can also be used to perform chained calls on each preset agent in the agent call chain. The specific method by which the LangChain framework performs chained calls on each preset agent in the agent call chain is described in the prior art and will not be repeated here.
[0111] In summary, the report generation method disclosed in this application, after obtaining the requirement text information of the report to be generated in the target application scenario, firstly identifies the requirement intent of the requirement text information to obtain the report parameters matching the report to be generated, thus achieving an accurate understanding of user needs; then, based on the target application scenario, it selects and arranges preset intelligent agents to obtain an intelligent agent call chain; finally, based on the report parameters, it performs chained calls on the preset intelligent agents in the intelligent agent call chain to generate a report matching the requirement text information. This method can automatically and quickly generate reports matching user needs, effectively improving report generation efficiency. Using this method to generate reports eliminates the need for manual data collection and analysis, resulting in higher efficiency and lower costs.
[0112] On the other hand, by pre-decomposing and aggregating the report generation process, a preset intelligent agent corresponding to the atomic capability is constructed. The intelligent agent is then orchestrated in real time during the report generation stage to achieve dynamic assembly of the report generation process and obtain the intelligent agent call chain. This effectively realizes the reuse of the preset intelligent agent, improves the energy-saving performance of the report generation system, and enables flexible expansion of the report generation process, thereby enhancing the functional expansion capability of the report generation system.
[0113] Based on the above embodiments, this application also discloses a report generation method, applied to the client of a report generation system. For example... Figure 2 As shown, the report generation method includes steps 202 to 208.
[0114] Step 202: Obtain the target application scenario and requirement text information for the report to be generated.
[0115] In some optional embodiments, a selection list of application scenarios and a requirement editing area can be set on the client side, and the application scenarios supported by the report generation system can be displayed in the selection list, such as... Figure 3 As shown. By clicking on the selection list 310, the user can select the application scenario for which the report is to be generated, and enter the requirement text for the report in the requirement editing area 320. The client detects the selected state of the application scenario in the selection list to obtain the target application scenario for the report to be generated, and at the same time, reads the input text in the requirement editing area as the requirement text information for the report to be generated.
[0116] In other optional embodiments, the client can also obtain the target application scenario and requirement text information of the report to be generated through other human-computer interaction methods. The embodiments of this application do not limit the specific implementation methods for obtaining the target application scenario and requirement text information of the report to be generated.
[0117] Step 204: Send the target application scenario and the requirement text information to the preset server, so that the preset server performs the following report generation operation based on the target application scenario and the requirement text information: identify the requirement intent of the requirement text information and obtain the report parameters matching the report to be generated; select and arrange preset agents based on the target application scenario to obtain an agent call chain; and perform chained calls on the preset agents in the agent call chain based on the report parameters to generate a report matching the requirement text information.
[0118] The preset server is the server of the report generation system.
[0119] In some optional embodiments, a button for submitting a report generation request can be set on the client. When the button is triggered, the client encapsulates the target application scenario and the requirement text information into a report generation request and sends it to the preset server.
[0120] In other optional embodiments, the client may also use other methods to send the target application scenario and the requirement text information to the preset server. The specific implementation methods for the client to send the target application scenario and the requirement text information to the preset server are not limited in the embodiments of this application.
[0121] In some optional embodiments, after receiving a report generation request from the client, the preset server parses the report generation request to obtain the target application scenario and the requirement text information for the report to be generated. Further, the preset server employs the method described in steps 104 to 108 of the report generation method in the aforementioned embodiments to perform requirement intent recognition on the requirement text information, obtain report parameters matching the report to be generated, and select and orchestrate preset agents based on the target application scenario to obtain an agent call chain. Finally, based on the report parameters, it performs chained calls on the preset agents in the agent call chain to generate a report matching the requirement text information.
[0122] Step 206: Obtain the report generated by the preset server.
[0123] In some optional embodiments, after generating the report, the preset server may send a report generation message to the client to notify the client to actively retrieve the report from the preset server. In other optional embodiments, after generating the report, the preset server may send the report to the client.
[0124] In the embodiments of this application, there are no restrictions on the specific implementation of the client obtaining the report generated by the preset server.
[0125] Step 208: Display the report.
[0126] The client can display the report according to a preset page layout. For example... Figure 4 As shown, the report displayed by the client includes one or more of the following report content formats: text, images, and tables. In some optional embodiments, the client may also display a summary or outline of the report in zoom level, and expand the report content to display the full content after the user triggers the display of the report details.
[0127] The embodiments of this application do not impose restrictions on the display layout of the report content.
[0128] In summary, the report generation method disclosed in this application, after obtaining the target application scenario and requirement text information of the report to be generated, sends the target application scenario and requirement text information to a preset server, causing the preset server to perform the following report generation operations based on the target application scenario and requirement text information: identifying the requirement intent of the requirement text information to obtain report parameters matching the report to be generated; selecting and arranging preset agents based on the target application scenario to obtain an agent call chain; chaining the preset agents in the agent call chain based on the report parameters to generate a report matching the requirement text information; and then obtaining and displaying the report generated by the preset server, quickly generating a report matching user needs and effectively improving report generation efficiency. Furthermore, using this method to generate reports eliminates the need for manual data collection and analysis, resulting in higher efficiency and lower cost.
[0129] Based on the above embodiments, this application also discloses a report generation system for implementing the above report generation method.
[0130] like Figure 5 As shown, the report generation system includes: client 502 and server 504. The following is in conjunction with... Figure 5 The implementation scheme of the report generation system is described.
[0131] The client 502 is used to obtain the target application scenario and requirement text information of the report to be generated, and send the target application scenario and requirement text information to the server 504.
[0132] The server 504 is used to receive the target application scenario and the requirement text information, and to perform requirement intent recognition on the requirement text information to obtain the report parameters that match the report to be generated.
[0133] The server 504 is also used to select and arrange preset intelligent agents based on the target application scenario to obtain an intelligent agent call chain;
[0134] The server 504 is also used to perform chained calls to the preset intelligent agents in the intelligent agent call chain based on the report parameters, and generate a report that matches the required text information;
[0135] The client 502 is also used to obtain the report and to display the report.
[0136] In some optional embodiments, the preset intelligent agent is created by: decomposing and aggregating the report generation process of a preset application scenario to obtain multiple deduplicated atomic capabilities, and creating a preset intelligent agent corresponding to the atomic capabilities. The preset intelligent agent is implemented either based on a generative pre-trained model or based on a service interface call.
[0137] For specific implementation details of the client and server, please refer to the relevant descriptions in the previous embodiments, which will not be repeated here.
[0138] In some alternative embodiments, the report generation system may employ, for example... Figure 6 The system architecture shown is implemented below. The implementation schemes for each part of the system architecture are described in detail below.
[0139] The platform support layer 602 includes: a large language model management center, a data center, and a system platform. The large language model management center is used to access various LLMs (Large Language Models) and maximize the capabilities of generative pre-trained models based on application scenarios. The data center is used to store data assets and knowledge bases, and provide data content. The system platform is responsible for accessing second- and third-party service capabilities, expanding the capability boundaries of the report generation system. The large-scale language models and data content in the platform support layer 602 will be accessed or invoked by the intelligent agents called by the server of the report generation system during the report generation phase.
[0140] The agent layer 604 includes several agents with various capabilities. For example, agents for intent understanding, agents for data acquisition, and agents for content generation. In some optional embodiments, each agent may possess one or more sub-capabilities. For example, the agent for intent understanding may possess one or more of the following sub-capabilities: application scenario identification, problem understanding, requirement decomposition, capability matching, etc.; the agent for data acquisition may possess one or more of the following sub-capabilities: text understanding, webpage parsing, data interpretation, knowledge retrieval, etc.; the agent for content generation may possess one or more of the following sub-capabilities: text summarization, code generation, service orchestration, webpage generation, etc. During the report generation phase, for a specific application scenario, the server of the report generation system can select some agents from the preset agents in the agent layer 604, arrange the call order, and thus obtain the agent call chain for that application scenario.
[0141] Service Center 606 provides a variety of service capabilities. For example, through the accumulation of experience, it offers a general report production framework process, report customization capabilities, Q&A services, and personalized services such as scheduled push notifications.
[0142] Application layer 608 interacts with service center 606 and utilizes underlying system capabilities to generate reports for various application scenarios.
[0143] To make the report generation method and report generation system disclosed in the embodiments of this application clearer, the following will be combined with Figure 7 The diagram shown illustrates the report generation process, further explaining the execution process of the report generation method in the report generation system.
[0144] First, the report generation system integrates multiple large-scale language models as generative pre-trained models invoked during the report generation process. Second, the system pre-configures several agents with various capabilities, selected and orchestrated during the report generation phase according to the needs of the target application scenario, forming an agent call chain. This chain is then executed to perform the report generation process for the target application scenario. The creation method of the pre-configured agents is described above. For agents implemented based on generative pre-trained models (i.e., large-scale language models), in this specific implementation, prompt words or prompt word templates for each agent are pre-created through testing.
[0145] Then, the steps of the above-mentioned report generation method are executed through the aforementioned report generation system.
[0146] In an application scenario that generates industry insight reports for e-commerce websites, users input questions through the client, such as "Analyze the apparel industry in country X". After the client determines the application scenario selected by the user, it sends the target application scenario (i.e., the application scenario selected by the user) and the requirement text information (i.e., the question entered by the user) to the server.
[0147] The server identifies the intent of the request text information and obtains the report parameters that match the report to be generated, such as "Country X" and "clothing".
[0148] Subsequently, based on the target application scenario and the capabilities of each preset agent in the report generation system, the server selects one or more preset agents and orchestrates them to obtain an agent call chain. For example, the obtained agent call chain includes, in sequence: preset agents 701 and 702 for data acquisition, agents 703, 704, and 705 for data analysis, and agents 706, 707, and 708 for outputting the report.
[0149] Then, based on the report parameters, the server performs chained calls to the preset agents 701 to 708 in the agent call chain to generate a report corresponding to the report generation requirement.
[0150] Among them, the preset intelligent agent 701 can retrieve data such as import and export data, hot search terms and best-selling products related to the clothing industry in country X by calling the preset third-party service interface, and collect the external content of the e-commerce website; the preset intelligent agent 702 can generate database query statements for a specified database by calling the generative pre-trained model, and execute the generated database query statements to search for data and transaction data within the site, and collect the internal content of the e-commerce website.
[0151] Preset agent 703 compares and analyzes the external content output by preset agent 701 and the internal content output by preset agent 702, obtaining a comparison analysis result; preset agent 704 performs drill-down analysis on the external content output by preset agent 701 and the internal content output by preset agent 702, obtaining a drill-down analysis result; preset agent 705 performs trend analysis on the drill-down analysis result output by preset agent 704, obtaining a trend analysis result. Then, the server uses one or more of the following results as the data analysis result: the comparison analysis result output by preset agent 703, the drill-down analysis result output by preset agent 704, and the trend analysis result output by preset agent 705.
[0152] Preset agents 706, 707, and 708 are invoked according to data dependencies to perform corresponding formatting processing on the analysis results output by the invoked preset agents 703, 704, and 705, such as generating country summaries, industry summaries, and summaries of hot-searched and best-selling products, and finally generating a report in the specified format containing the specified content.
[0153] Decomposing and aggregating the report generation processes for various application scenarios supported by the report generation system to create several intelligent agents with corresponding atomic capabilities is the foundation for implementing the report generation method and system disclosed in this application. Furthermore, leveraging the powerful generative capabilities of generative pre-trained models to implement these intelligent agents can further improve report generation efficiency.
[0154] For example, in the aforementioned pre-defined agent 702, a pre-defined prompt word template for calling the generative pre-trained model to generate database query statements can be pre-created through testing and training, such as "
[0155] system_role = 'As a data analyst, based on data patterns and analytical needs, output SQL code to extract data content.'
[0156] data_schema=open('data / traffic_schema.txt').read().strip()
[0157] question = 'Data schema {data_schema},\nAnalysis requirements: Region $country Industry $industry.'
[0158] In the aforementioned preset prompt template, the symbol "$country" represents a placeholder for the region-level report parameter, and "$industry" represents a placeholder for the industry-level report parameter. When the preset agent 702 is invoked, it formats the preset prompt template according to the input content to generate prompts. Then, based on the generated prompts, it invokes the generative pre-trained model to generate SQL code.
[0159] In addition, agents 706, 707, and 708 that output reports can also be implemented based on generative pre-trained models.
[0160] Those skilled in the art should understand that Figure 7 The report generation process shown is merely an example of a possible agent orchestration result for a specific application scenario and should not be construed as a limitation on the report generation method and system disclosed in the embodiments of this application. Pre-set agents in the report generation system can be added, modified, or removed according to application requirements. Consequently, for a given application scenario, the agent call chain for implementing the report in that application scenario may change.
[0161] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0162] Based on the above embodiments, this embodiment also provides a report generation device, the device comprising:
[0163] The requirement information acquisition module is used to acquire the requirement text information of the report to be generated in the target application scenario;
[0164] The report parameter acquisition module is used to identify the intent of the requirement text information and obtain the report parameters that match the report to be generated.
[0165] The agent orchestration module is used to select and orchestrate preset agents based on the target application scenario to obtain an agent call chain;
[0166] The report generation module is used to perform chained calls on the preset intelligent agents in the intelligent agent call chain based on the report parameters, and generate a report that matches the required text information.
[0167] In some optional embodiments, the report parameter acquisition module is further configured to:
[0168] Based on the required text information, a preset prompt word template corresponding to the target application scenario is formatted to obtain the first prompt word;
[0169] Based on the first prompt word, a preset generative pre-trained model is invoked, which then analyzes and extracts information according to the required text information to obtain report parameters.
[0170] In some optional embodiments, the report parameter acquisition module is further configured to:
[0171] The preset keywords included in the required text information are identified using word matching technology;
[0172] Report parameters are obtained based on the preset keywords identified.
[0173] In some optional embodiments, the reporting parameters include one or more of the following dimensions: region, industry, time, data analysis object, and report type.
[0174] In some optional embodiments, the intelligent agent orchestration module is further configured to:
[0175] Based on the agent configuration information of the target application scenario, an agent call chain is obtained, wherein the agent configuration information describes the preset agents that need to be called sequentially when generating a report for the target application scenario; or...
[0176] Based on the target application scenario and the capability description text of the preset intelligent agent, a generative pre-trained model is invoked to generate the intelligent agent call chain corresponding to the target application scenario.
[0177] In some optional embodiments, the preset agent is created by the following method:
[0178] The report generation process for a preset application scenario is functionally decomposed and aggregated to obtain multiple deduplicated atomic capabilities, and preset intelligent agents corresponding to the atomic capabilities are created. The preset intelligent agents are implemented in the following ways: based on generative pre-trained model invocation or based on service interface invocation.
[0179] In some optional embodiments, the preset intelligent agent includes any one or more of the following: an intelligent agent for generating database query statements, an intelligent agent for formatting data into a report in a target format, an intelligent agent for executing a specified database query instruction to obtain data within the system, and an intelligent agent for calling a preset service interface to obtain data outside the system.
[0180] In some optional embodiments, the report generation module is further configured to:
[0181] Following the order from beginning to end, each agent in the call chain is taken as the current agent, and any of the following call operations are performed on the current agent:
[0182] Invoke the current intelligent agent to obtain the output content of the current step call;
[0183] The current agent is invoked based on the report parameters to obtain the output content of the current step invocation;
[0184] The current agent is invoked based on the output content generated by one or more previous step invocation operations to obtain the output content of the current step invocation;
[0185] The current agent is invoked based on the output content generated by one or more previous step invocation operations and one or more of the report parameters to obtain the output content of the current step invocation.
[0186] In summary, the report generation apparatus disclosed in this application, after obtaining the requirement text information of the report to be generated in the target application scenario, first identifies the requirement intent of the requirement text information to obtain the report parameters matching the report to be generated, thus achieving an accurate understanding of user needs; then, based on the target application scenario, it selects and arranges preset intelligent agents to obtain an intelligent agent call chain; finally, based on the report parameters, it performs chained calls on the preset intelligent agents in the intelligent agent call chain to generate a report matching the requirement text information. This fully automatic and rapid generation of reports matching user needs effectively improves report generation efficiency. Using this method to generate reports eliminates the need for manual data collection and analysis, resulting in higher efficiency and lower costs.
[0187] On the other hand, by pre-decomposing and aggregating the report generation process, five pre-defined intelligent agents corresponding to atomic capabilities are constructed. During the report generation phase, these agents are orchestrated in real-time to dynamically assemble the report generation process, resulting in an agent call chain. This effectively enables the reuse of pre-defined intelligent agents, improves the energy efficiency of the report generation system, and further…
[0188] It enables flexible expansion of the report generation process, enhancing the functional scalability of the report generation system.
[0189] This application also discloses a report generation device, which is applied to a client. The device includes a requirement information acquisition module, which is used to acquire the target application scenario and requirement text information of the report to be generated.
[0190] 10. Requirement information sending module, used to send the target application scenario and the requirement text information to a preset server.
[0191] The preset server then performs the following report generation operation based on the target application scenario and the required text information:
[0192] The request text information is subjected to request intent recognition to obtain report parameters matching the report to be generated; based on the target application scenario, preset intelligent agents are selected and arranged to obtain the intelligent agent call chain; based on the report parameters, the request is processed...
[0193] The preset intelligent agents in the intelligent agent call chain are called in a chain to generate a report that matches the required text information;
[0194] The report acquisition module is used to acquire the report generated by the preset server;
[0195] The report display module is used to display the report.
[0196] In summary, the report generation apparatus disclosed in this application, through obtaining the target application scenario of the report to be generated,
[0197] After receiving the requirement text information, the target application scenario and the requirement text information are sent to a preset server, causing the preset server to perform the following report generation operation based on the target application scenario and the requirement text information: [The rest of the text appears to be incomplete and requires further context.]
[0198] The requirement text information is used to identify the requirement intent and obtain the report parameters that match the report to be generated; based on the target application scenario, preset intelligent agents are selected and arranged to obtain an intelligent agent call chain; based on the report parameters, the preset intelligent agents in the intelligent agent call chain are chained to generate a report that matches the requirement text information.
[0199] Subsequently, the report generated by the preset server is retrieved and displayed, quickly generating a report that matches the user's needs, effectively improving report generation efficiency. Furthermore, this method eliminates the need for manual data collection.
[0200] It is more efficient and less costly to analyze and process data.
[0201] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0202] This application also provides a computer-readable storage medium in 30 embodiments, wherein the computer-readable storage medium stores
[0203] There are computer execution instructions, which, when executed by a processor, are used to implement the method described in the embodiments of this application.
[0204] This application also provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in this application embodiment. In this application embodiment, the electronic device includes devices such as servers and terminal devices.
[0205] This application also discloses a computer program product, including a computer program / computer executable instructions, characterized in that the computer program / computer executable instructions, when executed by a processor in an electronic device, implement the method described in this application.
[0206] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired, and the apparatus may include electronic devices such as servers (clusters) and terminals. Figure 8 An exemplary apparatus 800 is schematically shown that can be used to implement the various embodiments described in this application.
[0207] In one embodiment, Figure 8 An exemplary device 800 is shown, which includes one or more processors 802, a control module (chipset) 804 coupled to at least one of the processors 802, a memory 806 coupled to the control module 804, a non-volatile memory (NVM) / storage device 808 coupled to the control module 804, one or more input / output devices 810 coupled to the control module 804, and a network interface 812 coupled to the control module 804.
[0208] Processor 802 may include one or more single-core or multi-core processors, and processor 802 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 800 can serve as a server, terminal, or other device as described in the embodiments of this application.
[0209] In some embodiments, apparatus 800 may include one or more computer-readable media (e.g., memory 806 or NVM / storage device 808) having instructions 814 and one or more processors 802 that are combined with the one or more computer-readable media and configured to execute the instructions 814 to implement the module and thus perform the actions described in this disclosure.
[0210] In one embodiment, the control module 804 may include any suitable interface controller to provide any suitable interface to at least one of the processors 802 and / or any suitable device or component communicating with the control module 804.
[0211] The control module 804 may include a memory controller module to provide an interface to the memory 806. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0212] Memory 806 may be used, for example, to load and store data and / or instructions 814 for device 800. In one embodiment, memory 806 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 806 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0213] In one embodiment, the control module 804 may include one or more input / output controllers to provide an interface to the NVM / storage device 808 and (one or more) input / output devices 810.
[0214] For example, NVM / storage device 808 may be used to store data and / or instructions 814. NVM / storage device 808 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0215] NVM / storage device 808 may include storage resources that are part of a device on which device 800 is mounted, or that are accessible to the device but do not necessarily have to be part of the device. For example, NVM / storage device 808 may be accessed via a network through one or more input / output devices 810.
[0216] One or more input / output devices 810 may provide an interface for device 800 to communicate with any other suitable device. Input / output devices 810 may include communication components, audio components, sensor components, etc. A network interface 812 may provide an interface for device 800 to communicate via one or more networks. Device 800 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing a wireless network based on communication standards, such as Bluetooth, WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0217] In one embodiment, at least one of the processors 802 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 804. In one embodiment, at least one of the processors 802 may be logically packaged with one or more controllers of the control module 804 to form a system-in-package (SiP). In one embodiment, at least one of the processors 802 may be integrated with the logic of one or more controllers of the control module 804 on the same die. In one embodiment, at least one of the processors 802 may be integrated with the logic of one or more controllers of the control module 804 on the same die to form a system-on-a-chip (SoC).
[0218] In various embodiments, device 800 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop, handheld computing device, tablet, netbook, etc.). In various embodiments, device 800 may have more or fewer components and / or different architectures. For example, in some embodiments, device 800 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0219] The detection device can use a main control chip as a processor or control module, and sensor data, position information, etc. can be stored in a memory or NVM / storage device. The sensor group can be used as an input / output device, and the communication interface can include a network interface.
[0220] This application also provides an electronic device, including: a processor; and a memory storing executable code thereon. When the executable code is executed, the processor performs one or more methods as described in this application embodiment. In this application embodiment, the memory can store various types of data, such as target files, file-application association data, and user behavior data, thereby providing a data foundation for various processing operations.
[0221] This application also provides one or more machine-readable media having executable code stored thereon, which, when executed, causes a processor to perform one or more of the methods described in this application.
[0222] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0223] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0224] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0225] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0226] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0227] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0228] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0229] The above provides a detailed description of a report generation method, a report generation system, an electronic device, a storage medium, and a computer program product provided by this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A report generation method, applied on a server side, characterized in that, The method includes: Obtain the required text information for the report to be generated in the target application scenario; The requirement text information is used to identify the requirement intent and obtain the report parameters that match the report to be generated; Based on the target application scenario, preset agents are selected and orchestrated to obtain an agent call chain. This process includes: obtaining the agent call chain based on agent configuration information of the target application scenario, wherein the agent configuration information describes the preset agents that need to be called sequentially when generating a report for the target application scenario; or, based on the capability description text of the target application scenario and the preset agents, a generative pre-trained model is invoked to generate the agent call chain corresponding to the target application scenario. The preset agents are created by: performing functional decomposition and aggregation processing on the report generation process of the preset application scenario to obtain multiple deduplicated atomic capabilities, and creating preset agents corresponding to the atomic capabilities. Based on the report parameters, the preset agents in the agent call chain are chained together to generate a report that matches the requirement text information. Specifically, this includes: sequentially taking the agents in the call chain as the current agents in order from beginning to end, and performing any of the following call operations on the current agents: calling the current agent to obtain the output content of the current step call; calling the current agent based on the report parameters to obtain the output content of the current step call; calling the current agent based on the output content generated by one or more previous step call operations to obtain the output content of the current step call; calling the current agent based on the output content generated by one or more previous step call operations and one or more parameters in the report parameters to obtain the output content of the current step call.
2. The method according to claim 1, characterized in that, The step of identifying the intent of the requirement text information and obtaining the report parameters matching the report to be generated includes: Based on the required text information, a preset prompt word template corresponding to the target application scenario is formatted to obtain the first prompt word; Based on the first prompt word, a preset generative pre-trained model is invoked, which then analyzes and extracts information according to the required text information to obtain report parameters.
3. The method according to claim 1, characterized in that, The step of identifying the intent of the requirement text information and obtaining the report parameters matching the report to be generated includes: The preset keywords included in the required text information are identified using word matching technology; Report parameters are obtained based on the preset keywords identified.
4. The method according to claim 1, characterized in that, The report parameters include one or more of the following dimensions: region, industry, time, data analysis object, and report type.
5. The method according to claim 1, characterized in that, The implementation methods of the preset intelligent agent include: implementation based on generative pre-trained model invocation or implementation based on service interface invocation.
6. The method according to claim 1, characterized in that, The preset intelligent agent includes any one or more of the following: an intelligent agent for generating database query statements, an intelligent agent for formatting data into a report of a target format, an intelligent agent for executing a specified database query instruction to obtain data within the system, and an intelligent agent for calling a preset service interface to obtain data outside the system.
7. A report generation method, applied to a client, characterized in that, The method includes: Obtain the target application scenario and requirement text information for the report to be generated; The target application scenario and the requirement text information are sent to a preset server, causing the preset server to perform the following report generation operations based on the target application scenario and the requirement text information: requirement intent recognition is performed on the requirement text information to obtain report parameters matching the report to be generated; preset agents are selected and orchestrated based on the target application scenario to obtain an agent call chain; based on the report parameters, the preset agents in the agent call chain are chained together to generate a report matching the requirement text information; wherein, selecting and orchestrating preset agents based on the target application scenario to obtain an agent call chain includes: obtaining an agent call chain according to the agent configuration information of the target application scenario, wherein the agent configuration information describes the preset agents that need to be called sequentially when generating the report of the target application scenario; or, based on the target application scenario and the capability description text of the preset agents, a generative pre-trained model is invoked to generate the agent call chain corresponding to the target application scenario. The preset intelligent agent is created through the following method: The report generation process for the preset application scenario is functionally decomposed and aggregated to obtain multiple deduplicated atomic capabilities, and a preset intelligent agent corresponding to each atomic capability is created. The step of chaining the preset intelligent agents in the intelligent agent call chain based on the report parameters to generate a report matching the required text information includes: sequentially taking the intelligent agents in the call chain as the current intelligent agent in order from beginning to end, and performing any of the following call operations on the current intelligent agent: calling the current intelligent agent to obtain the output content of the current step call; calling the current intelligent agent based on the report parameters to obtain the output content of the current step call; calling the current intelligent agent based on the output content generated by one or more previous step call operations to obtain the output content of the current step call; calling the current intelligent agent based on the output content generated by one or more previous step call operations and one or more parameters in the report parameters to obtain the output content of the current step call. Obtain the report generated by the preset server; Present the report.
8. A report generation system, characterized in that, include: Client and server, among which, The client is used to obtain the target application scenario and requirement text information of the report to be generated, and send the target application scenario and requirement text information to the server. The server is used to receive the target application scenario and the requirement text information, and to perform requirement intent recognition on the requirement text information to obtain the report parameters that match the report to be generated. The server is further configured to select and orchestrate preset agents based on the target application scenario to obtain an agent call chain. This selection and orchestration includes: obtaining the agent call chain based on agent configuration information of the target application scenario, wherein the agent configuration information describes the preset agents that need to be called sequentially when generating a report for the target application scenario; or, generating the agent call chain corresponding to the target application scenario by calling a generative pre-trained model based on the capability description text of the target application scenario and the preset agents. The preset agents are created by: performing functional decomposition and aggregation processing on the report generation process of the preset application scenario to obtain multiple deduplicated atomic capabilities, and creating preset agents corresponding to the atomic capabilities. The server is further configured to perform chained calls on the preset agents in the agent call chain based on the report parameters, generating a report matching the requirement text information; wherein, the chained calls on the preset agents in the agent call chain based on the report parameters to generate a report matching the requirement text information includes: sequentially taking the agents in the call chain as the current agents in order from beginning to end, and performing any of the following call operations on the current agents: calling the current agent to obtain the output content of the current step call; calling the current agent based on the report parameters to obtain the output content of the current step call; calling the current agent based on the output content generated by one or more previous step call operations to obtain the output content of the current step call; calling the current agent based on the output content generated by one or more previous step call operations and one or more parameters in the report parameters to obtain the output content of the current step call; The client is also used to obtain the report and to display the report.
9. The system according to claim 8, characterized in that, The implementation methods of the preset intelligent agent include: implementation based on generative pre-trained model invocation or implementation based on service interface invocation.
10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
12. A computer program product comprising a computer program / computer-executable instructions, characterized in that, When the computer program / computer executable instructions are executed by a processor in an electronic device, the method of any one of claims 1-7 is implemented.