Task scale scheduling method and device based on large model
Through a large-model-based task-scale scheduling method, natural language queries entered by users are disassembled and multi-source data are integrated, which solves the problem of inefficiency in complex task processing and achieves more efficient task planning and processing.
Patent Information
- Application Number
- CN202411294002.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-27
AI Technical Summary
The existing technology is difficult to efficiently disassemble complex tasks, dynamically call multi-source data and accurately meet user needs. Especially when dealing with complex tasks in large-scale language models, there are problems of low task planning and scheduling efficiency.
Using a large model-based task scale scheduling method, the natural language query logic input by the user is split into metatasks through task analysis and disassembly modules, and multi-source data is integrated with multi-type tool integration modules, and data decision-making and presentation modules are integrated. The data generates final response text or report, and uses a large-scale language model LLM for task processing.
It realizes lower latency and more accurate task matching and processing complex tasks, improving the task planning and processing efficiency of large models in complex tasks.
Smart Images

Figure CN119201392A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and specifically to technologies such as large language models, task planning, tool calling, knowledge base and data processing technology, and in particular to a task scale scheduling method and device based on a large model. Background Art
[0002] In recent years, the rapid development of large model technology has revolutionized the field of artificial intelligence, especially in natural language processing (NLP), intelligent decision-making, and complex task processing. The GPT series of models launched by OpenAI has brought breakthroughs in large-scale language models.
[0003] In various intelligent systems, how to more efficiently decompose complex tasks, dynamically call multi-source data, and accurately meet user needs has become a core challenge. To this end, a faster, lighter, and more refined task planning and scheduling method is now needed. Summary of the invention
[0004] One or more embodiments of the present specification provide a large-model-based task scale scheduling method and device, which are used to solve the technical problems raised by the background technology.
[0005] One or more embodiments of this specification adopt the following technical solutions: One or more embodiments of this specification provide a large-model-based task scale scheduling method, which is applied to an intelligent task processing system. The intelligent task processing system includes a task parsing and decomposition module, a multi-type tool integration module, and a data decision and display module, including: The task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text modes. The multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes a database, a knowledge base, and an external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects a suitable tool according to the meta-task; The data decision and presentation module combines the task decomposition results to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
[0006] Furthermore, the task analysis and decomposition module outputs a series of meta-task logic chains, each meta-task being a sub-task with the smallest decomposition granularity and executable independently.
[0007] Furthermore, the task analysis and decomposition module is specifically used to: Fine-tune the large language model. The core of the fine-tuning process involves deep design to clarify the dependencies between tasks and their execution order. Each task is assigned a depth value to indicate its execution priority and dependency; Use multiple threads to execute the same deep task to compress the response time. The transmission mechanism of the result dataset parameters is realized by associating the task return value with the parameters of the dependent tasks. Finally, fine-tuning ensures that complex tasks proceed according to the correct logic to avoid chaotic execution of tasks. Defines the details of a set of tools, which are used to describe the tools required for system tasks during the task execution phase, and to solve different tasks in user requests. The specific definition is in JSON array format, and each tool corresponds to a JSON format data.
[0008] Furthermore, if the tool is used to query a database, the key fields of the tool include name, description, category, parameters, and return content; The name corresponds to a specific action tool, and the database query tool exec_sql can be defined; The description is a brief description of the tool, which can be defined as translating into SQL statements according to user input and executing them, returning the retrieved data; The category is the category to which it belongs, and defines the unique identifier of each tool, which can be defined as sql_data; The parameters are the parameters required for calling the tool, which can be defined as the text sql_input required for querying the database. The parameters include the description of the parameters, the parameter type, and the parameter name; The returned content is the result after executing the tool, including the result name, type and description.
[0009] Further, after receiving a user request, the corresponding task is logically split, including: Formatting the natural language query input by the user into a format supported by the model, wherein the format supported by the model is a message template, and the message template includes a prompt template based on task decomposition; The message template is converted into the model input format input_ids and sent to the specified GPU device for decoding. After decoding, the task chain is obtained. The task chain is used to physically split the task. After the task chain is obtained, the tool is loaded to process each task. For each task, all tools are traversed and candidate tools are found in each tool graph. Each task type node in the tool graph is connected to multiple tool nodes.
[0010] Furthermore, for each task, all tools are traversed and candidate tools are searched in each tool graph, including: LLM is used to evaluate and score the tools. The scoring criteria are based on the match between the task requirements and the tools. The scoring rules are implemented based on prompt. The scoring rules in prompt are as follows: the scoring is based on the match between the tool and task information. If multiple tools have the same score, the multiple tools with the same score are selected as candidate tools. The candidate tools are further screened to ensure that the most useful tool is selected to perform each task.
[0011] Furthermore, the further screening of the candidate tools includes: Check the candidate tool set for each task. If there is only one tool, keep it directly. If there are multiple tools, a task description and tool prompt information are generated for the task, and then LLM is used for further judgment to finally get the most suitable tool; If there are multiple tools after multiple screenings, the last tool added is selected as the most appropriate tool.
[0012] Furthermore, the multi-type tool integration module is specifically used for: The multi-type tool integration module includes a knowledge base subsystem and a system integration knowledge base. The knowledge base corpus in the multi-type tool integration module can be customized according to specific needs. The knowledge base is implemented using the LangChain framework and the Embedding model of the open source HuggingFace to vectorize the data, and the vector data and the corresponding block file names are stored in the middleware ElasticSearch. The multi-way recall retrieval is used to calculate similar texts to obtain knowledge answers, wherein the multi-way recall uses multi-threaded concurrent recall to compress the response time. Finally, the knowledge base is exposed as an API interface using FastAPI, and asynchronous processing is implemented. The database subsystem in the multi-type tool integration module integrates text-to-sql technology based on large models, thought chains and retrieval generation enhancements, as well as data analysis report intelligent generation technology, which can automatically identify user intentions, convert user data query questions into SQL query statements, and query the MySQL database to achieve intelligent data query. At the same time, it can identify the data analysis intentions in user questions and generate professional data analysis reports based on the returned data and business expert system; The system also integrates other subsystems, including external APIs for querying real-time time and weather.
[0013] Furthermore, the data decision and display module is specifically used for: The system receives a task chain as input, checks the format of the task chain, and then fills in the parameters required by the tool and returns the result to ensure that the dependencies between the tools are maintained. Finally, a result in a fixed format is obtained. The standardization of the result is guaranteed based on the prompt. The format is JSON, which contains two key-value pairs with Thoughts and Tools as keys.
[0014] One or more embodiments of this specification provide a large-model-based task scale scheduling device, characterized by comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: The device is applied to an intelligent task processing system, which includes a task parsing and disassembling module, a multi-type tool integration module and a data decision and display module, including: The task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text modes. The multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes a database, a knowledge base, and an external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects a suitable tool according to the meta-task; The data decision and presentation module combines the task decomposition results to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
[0015] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: The present invention proposes an intelligent task processing system based on a large-scale language model, a task decomposition algorithm based on a thought chain, and a multi-tool integrated fusion call, aiming to improve the task planning and processing efficiency of large models in complex tasks. The present invention can process complex tasks with lower latency and more accurate task matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings: Figure 1 A flowchart of a task scale scheduling method based on a large model provided for one or more embodiments of this specification; Figure 2 A schematic diagram of the structure of an intelligent task processing system provided in one or more embodiments of this specification; Figure 3 A schematic diagram of the structure of a task scale scheduling device based on a large model provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0017] The embodiments of this specification provide a method and device for scheduling task scale based on a large model.
[0018] In recent years, the rapid development of large model technology has completely changed the field of artificial intelligence, especially in natural language processing (NLP), intelligent decision-making and complex task processing. Since the GPT series of models launched by OpenAI brought a breakthrough in large-scale language models, domestic companies such as Tsinghua Zhipu and H3C Lingxi have accelerated technology research and development to promote the widespread application of large models in various industries. In various intelligent systems, how to more efficiently decompose complex tasks, dynamically call multi-source data, and accurately meet user needs has become a core challenge. At present, H3C Lingxi's large model has further promoted the application of intelligent control technology in various industries. Lingxi combines AIGC (generative artificial intelligence) technology and relies on ICT infrastructure to focus on the customization of private domain large models in vertical industries, providing functions including intelligent operation and maintenance, business process optimization, etc. Lingxi's multi-level customization capabilities enable it to perform well in complex business scenarios, and realize flexible combinations of different functions through modular design, greatly improving the scalability and adaptability of the system. This flexible combination is similar to the task decomposition and tool calling mechanism proposed in the present invention, that is, the system dynamically calls different modules to complete the task according to the specific needs of the task.
[0019] At the same time, the Zhipu big model launched by Tsinghua University and Zhipu Technology, especially the "Wudao" series, demonstrated China's leading position in the field of global large-scale pre-trained models. The model has ultra-large-scale parameters and can solve a variety of complex problems from text generation to knowledge question and answer through task customization and multi-task processing capabilities. The development and application of the Zhipu big model has laid a solid foundation for the application of big model technology in complex task processing and deep reasoning scenarios. Similar to the task decomposition method based on the big model thinking chain COT (Chain of Thought) in the present invention, the Zhipu big model optimizes the system's processing capabilities through multi-level task planning and execution when processing multi-step tasks, making it suitable for a wider range of scenarios.
[0020] In terms of intelligent control, Inspur Intelligent Control Wizard uses large models and intelligent agent technology to provide powerful task processing and intelligent control functions. It can intelligently adapt traditional software through voice, text and other means to achieve automatic control and execution of complex tasks, showing the broad application prospects of large models in traditional software control.
[0021] In contrast, although early intelligent assistants such as Siri have made some progress in speech recognition and single-step task execution, their ability to handle complex, multi-step tasks is limited. Siri is more suitable for performing relatively simple tasks, such as setting reminders and checking the weather, while traditional intelligent assistants often cannot meet the needs of complex reasoning tasks across task chains. This limitation has prompted large model technology to gradually enter more complex application fields and become the key to solving complex tasks and decision support.
[0022] In order to meet such challenges, the task decomposition and execution of large model technology are particularly critical. Relying on the development of large model technology, the system of the present invention proposes a faster, lighter, and more refined task planning and scheduling method based on large models. This method improves the processing and decision support functions of large models in complex tasks through the COT task decomposition algorithm and tool calling mechanism. Combined with the integration of multiple types of tools (API, database, knowledge base, etc.) and the automated tool selection mechanism, the system can dynamically call the appropriate tool to complete the task, thereby achieving efficient solution of complex problems and optimal allocation of resources.
[0023] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0024] Figure 1 A schematic diagram of a process flow of a large-model-based task scale scheduling method provided for one or more embodiments of this specification, which can be executed by an intelligent task processing system. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0025] The method is applied to an intelligent task processing system, which includes a task parsing and disassembling module, a multi-type tool integration module, and a data decision and display module.
[0026] The method steps of the embodiment of this specification are as follows: S101, the task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text methods.
[0027] S102, the multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes database, knowledge base and external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects appropriate tools according to meta-tasks.
[0028] S103, the data decision and presentation module combines the task decomposition result to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
[0029] The present invention proposes an intelligent task processing system based on a large-scale language model (LLM), a task decomposition algorithm based on a thought chain, and multi-tool integrated fusion call, aiming to improve the task planning and processing efficiency of large models in complex tasks. The present invention can process complex tasks with lower latency and more accurate task matching. The following is a detailed description of the content of the present invention.
[0030] Figure 2 This is a structural diagram of the intelligent task processing system. The system consists of three main modules: task analysis and decomposition module, multi-type tool integration module, and data decision and display module.
[0031] (I) The task analysis and decomposition module is responsible for receiving natural language queries input by users, including voice and text, analyzing user intentions, and logically decomposing complex tasks based on COT. This module outputs a series of meta-task logic chains, each of which is a subtask with the smallest decomposition granularity and can be executed independently (not dependent on other tasks at the same level).
[0032] The specific steps include: model fine-tuning, tool group definition, multi-task splitting and tool adaptation.
[0033] First, the large language model is fine-tuned. The core of the fine-tuning process involves depth design, which is used to clarify the dependencies between tasks and their execution order. Each task is assigned a depth value to indicate its execution priority and dependency. For example, a depth of 0 represents the first layer and can be executed independently. A depth of 1 means that it must wait for the result of depth 0 to be executed before execution, and so on. The present invention uses multi-threading to execute tasks of the same depth to compress response time and optimize user experience. The transmission mechanism of the result data set parameters is realized by associating the task return value with the parameters of the dependent tasks (variable placeholders). Finally, fine-tuning ensures that complex tasks proceed according to the correct logic to avoid problems such as chaotic task execution.
[0034] Secondly, define a set of detailed contents of tools, which are used to describe the tools required for system tasks in the task execution phase, and solve different tasks in user requests. The specific definition is in JSON array format, and each tool corresponds to a JSON format data. The key fields are as follows (taking the query database as an example): The name (name) corresponds to a specific action tool, which can be defined as a database query tool (exec_sql); the description (description) is a brief description of the tool, which can be defined as "translate the user input into SQL statements and execute them, and return the retrieved data"; the category (domain) is the category to which it belongs, that is, it defines the unique identifier of each tool, which can be defined as "sql_data"; the parameters (args) are the parameters required to call the tool, which can be defined as sql_input (text required to query the database); the parameters include the description of the parameters, the parameter type, and the name of the parameter; the return content (returns) is the result after executing the tool, including the result name, type and description.
[0035] When receiving a user request, its specific splitting process works as follows: First, the natural language task input by the user is formatted into a format that the model can understand, specifically including formatting the task into a message template, which includes a prompt template based on task decomposition. Then the template is converted into the model input format (input_ids) and sent to the specified GPU device. After decoding, the task chain is obtained. Here, the task chain only realizes the physical splitting of the task. After obtaining the task chain, the tool is loaded to process each task. For each task, all tools are traversed and candidate tools are found in each tool graph. Each task type node in the tool graph will be connected to multiple tool nodes. The tools are evaluated and scored using LLM, and the scoring criteria are based on the matching degree between the task requirements and the tools. The scoring rules are implemented based on prompt. The following scoring rules are described in prompt: The scoring is based on the matching degree between the tool and task information, and the scoring is inferred in a think step by step manner, and the scoring reasons are given. The score range is 1-5, 1 represents completely irrelevant, 5 represents the most relevant (only briefly described here), and the degree increases from 1 to 5. If multiple tools have the same score, they are regarded as candidate tools; then these tools are further screened to ensure that the most useful tool is selected to perform each task. The further screening process is as follows: check the candidate tool set for each task. If there is only one tool, keep it directly; if there are multiple tools, generate a task description and tool prompt information for the task, and then use LLM to make further judgments to finally get the most suitable tool. If there are still multiple tools after multiple screenings, select the last added tool as the most suitable tool.
[0036] (II) The multi-type tool integration module integrates multi-source data such as databases, knowledge bases, and external APIs to provide basic data support for task execution. Through this module, you can obtain structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Tools are seamlessly connected through FastAPI, and the system selects the appropriate tool based on the meta-task. The specific contents are as follows: The knowledge base subsystem integrates the knowledge base in the system. The knowledge base corpus can be customized according to specific needs. The knowledge base is implemented using the LangChain framework. The Embedding model of the open source HuggingFace is used to vectorize the data, and the vector data and the corresponding block file names are stored in the middleware ElasticSearch. The multi-way recall retrieval (LSI, BM25, and cosine similarity, etc.) is used to calculate similar texts to obtain knowledge answers. Among them, multi-way recall uses multi-threaded concurrent recall to compress the response time. Finally, the knowledge base is exposed as an API interface using FastAPI, and asynchronous processing is implemented.
[0037] The database subsystem integrates text-to-sql technology based on large models, thought chains, and retrieval generation enhancements, as well as data analysis report intelligent generation technology. It can automatically identify user intent, convert user data query questions into SQL query statements, and query the MySQL database to achieve intelligent data query. At the same time, it identifies the data analysis intent in user questions and generates professional data analysis reports based on the returned data and business expert system.
[0038] The system can also integrate other subsystems, including querying real-time time, weather and other external APIs.
[0039] (III) Data decision and display module: This module combines the task decomposition results, obtains multiple data from the multi-source data integration module, integrates them, and combines them with LLM to generate the final response text or detailed report. The output content can be analysis reports, problem suggestions, etc. Users can choose to export them to PDF, visual charts and other formats to facilitate data sharing and review. The specific process is as follows: This system receives the task chain as input, checks the format correctness of the task chain, and then fills in the parameters and return results required by the tool, and ensures that the dependencies between tools are maintained, and finally obtains a result in a fixed format. The standardization of the result is guaranteed based on prompt, and the format is JSON, containing two key-value pairs with Thoughts and Tools as keys. This part is only for filling in parameters using LLM. The specific tool call will be based on the Tools list call, in which the depth field ensures the order of execution.
[0040] Build three main system modules: task analysis and disassembly module, multi-type tool integration module, and data decision and display module.
[0041] In the specific implementation process of the present invention, it is assumed that the user proposes the following complex task: "Please analyze a company's operating data in 2024 and generate a data analysis report, combine industry-related standards, evaluate its performance, and provide optimization suggestions." The system first parses the natural language input by the user through the task parsing and decomposition module, and decomposes it into four meta-tasks based on the COT algorithm, and sets different depths according to the task dependencies.
[0042] The first meta-task is "obtaining a company's operating data for 2024", and the second meta-task is "retrieve industry-related performance evaluation standards". The depth of these two sub-tasks is 0 and can be executed in parallel. The first meta-task obtains the company's operating data through a database query tool. The system uses Text-to-SQL technology to convert natural language into SQL query statements and automatically obtains relevant operating data from the company's database. The second meta-task accesses the integrated industry standard database through a knowledge base tool to retrieve industry-related performance evaluation standards and best practices. The execution results of these two sub-tasks will provide necessary data support for subsequent tasks.
[0043] After the first two meta-tasks are completed, the system enters the third meta-task, namely "generate analysis report". The depth of this meta-task is 1, which depends on the execution results of the first two tasks. Through the data decision and display module, the system generates an operating analysis report based on the operating data obtained from the database. This module first analyzes the operating data, including the changing trends of key indicators such as revenue, cost, and profit, and then compares the analysis results with the industry standards retrieved from the knowledge base to evaluate the company's performance. The report content includes the overall performance of the company's operating data, the gap with the industry benchmark, and compliance assessment. This step generates a preliminary report through LLM (large-scale language model) combined with data. This report can be exported to PDF format or presented in the form of charts for user review.
[0044] Next, the system performs the fourth meta-task, "generate specific optimization suggestions", which has a depth of 2 and relies on the previously generated analysis report and knowledge base return content. In this task, the system combines the performance and industry standards in the analysis report and uses the reasoning ability of the large model to generate optimization suggestions. This module will propose a series of feasible improvement measures based on the comparison results of the company's operating data and industry standards. These suggestions may cover aspects such as cost control, business process optimization, and market strategy adjustment to help companies improve their operating efficiency and competitiveness.
[0045] Through the orderly execution of these four tasks, the system forms a complete task chain from data retrieval, analysis report generation, to optimization suggestions. By parsing the meta-task dependencies and executing them step by step according to logic, a complete and high-value analysis report and optimization plan are finally generated for the user.
[0046] In this example, the system demonstrated strong task analysis and execution capabilities, and was able to efficiently handle complex, multi-step tasks, and automatically execute tasks through the combination of large models and intelligent tools. This system architecture is applicable to multiple industries and application scenarios, and can greatly improve the efficiency of data processing and decision support.
[0047] The present invention aims to efficiently solve complex query tasks and is applicable to various industries. The system consists of three main modules: a task parsing and disassembly module, a multi-type tool integration module, and a data decision and display module. First, the task parsing and disassembly module disassembles the complex query task input by the user into multiple meta-tasks through the COT algorithm, and sets the execution order according to the logical relationship. The multi-type tool integration module seamlessly integrates the database, knowledge base and external API through the FastAPI interface to ensure that relevant data can be obtained in real time during the task execution process. The data decision and display module calls appropriate tools to analyze the task results, and generates energy consumption reports, policy evaluations and energy-saving suggestions, etc., and supports output in multiple formats such as PDF and charts. The entire system relies on software and hardware technologies such as Python, FastAPI, SQL database, ElasticSearch, GPU acceleration, etc., which can realize the automatic processing of complex tasks and efficient data integration, improve decision-making accuracy and task execution efficiency.
[0048] It should be noted that the present invention relates to a faster, lighter, and more refined task planning and scheduling method based on a large model, which aims to improve the ability of large model call tools to handle complex tasks. The method is based on the FastAPI framework, integrates core technologies such as Text-to-SQL technology, local knowledge base, and Function Calling, completes user intent understanding through a large model, and realizes dynamic calling and fusion of API interfaces, knowledge bases, and databases based on intent understanding, significantly enhancing the task planning, tool calling, and decision support capabilities of large models in complex scenarios. By introducing the thinking chain technology of multi-level deep task decomposition, the system can decompose complex tasks into multiple subtasks, optimize the execution path, and improve the accuracy and execution efficiency of multi-step reasoning tasks. In addition, the present invention develops a user query tool calling module, which can automatically select and call appropriate tools for task processing by accurately identifying and decomposing user needs, and realizes efficient solution of complex problems and optimal allocation of resources. The overall process embodies an orderly task planning chain from task decomposition, execution to result return, improves the practicality and response efficiency of large models in complex tasks, and is suitable for data processing, reasoning, and intelligent decision-making scenarios in multiple fields.
[0049] Figure 3 A schematic diagram of a large-model-based task scale scheduling device provided for one or more embodiments of this specification, characterized in that it includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: The device is applied to an intelligent task processing system, which includes a task parsing and disassembling module, a multi-type tool integration module and a data decision and display module, including: The task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text modes. The multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes a database, a knowledge base, and an external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects a suitable tool according to the meta-task; The data decision and presentation module combines the task decomposition results to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
[0050] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A task scale scheduling method based on a large model, characterized in that: The method is applied to an intelligent task processing system, which includes a task parsing and disassembling module, a multi-type tool integration module, and a data decision and display module, including: The task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text modes. The multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes a database, a knowledge base, and an external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects a suitable tool according to the meta-task; The data decision and presentation module combines the task decomposition results to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
2. The method according to claim 1, characterized in that The task analysis and decomposition module outputs a series of meta-task logic chains, each of which is a sub-task with the smallest decomposition granularity and can be executed independently.
3. The method according to claim 1, characterized in that The task analysis and disassembly module is specifically used for: Fine-tune the large language model. The core of the fine-tuning process involves deep design, which is used to clarify the dependencies between tasks and their execution order. Each task is assigned a depth value to indicate its execution priority and dependency. Use multiple threads to execute the same deep task to compress the response time. The transmission mechanism of the result dataset parameters is realized by associating the task return value with the parameters of the dependent tasks. Finally, fine-tuning ensures that complex tasks proceed according to the correct logic to avoid chaotic execution of tasks. Defines the detailed contents of a set of tools, which are used to describe the tools required for system tasks during the task execution phase, and to solve different tasks in user requests. The specific definition is in JSON array format, and each tool corresponds to a JSON formatted data.
4. The method according to claim 3, characterized in that If you are querying a database, the key fields of the tool include name, description, category, parameters, and return content; The name corresponds to a specific action tool, and the database query tool exec_sql can be defined; The description is a brief description of the tool, which can be defined as translating into SQL statements according to user input and executing them, returning the retrieved data; The category is the category to which it belongs, and defines the unique identifier of each tool, which can be defined as sql_data; The parameters are the parameters required for calling the tool, which can be defined as the text sql_input required for querying the database. The parameters include the description of the parameters, the parameter type, and the parameter name; The returned content is the result after executing the tool, including the result name, type and description.
5. The method according to claim 4, characterized in that After receiving the user request, the corresponding task is logically split, including: Formatting the natural language query input by the user into a format supported by the model, wherein the format supported by the model is a message template, and the message template includes a prompt template based on task decomposition; The message template is converted into the model input format input_ids and sent to the specified GPU device for decoding. After decoding, the task chain is obtained. The task chain is used to physically split the task. After the task chain is obtained, the tool is loaded to process each task. For each task, all tools are traversed and candidate tools are found in each tool graph. Each task type node in the tool graph is connected to multiple tool nodes.
6. The method according to claim 5, characterized in that For each task, all tools are traversed and candidate tools are searched in each tool graph, including: LLM is used to evaluate and score the tools. The scoring criteria are based on the match between the task requirements and the tools. The scoring rules are implemented based on prompt. The scoring rules in prompt are as follows: the scoring is based on the match between the tool and task information. If multiple tools have the same score, the multiple tools with the same score are selected as candidate tools. The candidate tools are further screened to ensure that the most useful tool is selected to perform each task.
7. The method according to claim 6, characterized in that The further screening of the candidate tools comprises: Check the candidate tool set for each task. If there is only one tool, keep it directly. If there are multiple tools, a task description and tool prompt information are generated for the task, and then LLM is used for further judgment to finally get the most suitable tool; If there are multiple tools after multiple screenings, the last tool added is selected as the most appropriate tool.
8. The method according to claim 7, characterized in that The multi-type tool integration module is specifically used for: The multi-type tool integration module includes a knowledge base subsystem and a system integration knowledge base. The knowledge base corpus in the multi-type tool integration module can be customized according to specific needs. The knowledge base is implemented using the LangChain framework and the Embedding model of the open source HuggingFace to vectorize the data, and the vector data and the corresponding block file names are stored in the middleware ElasticSearch. The multi-way recall retrieval is used to calculate similar texts to obtain knowledge answers, wherein the multi-way recall uses multi-threaded concurrent recall to compress the response time. Finally, the knowledge base is exposed as an API interface using FastAPI, and asynchronous processing is implemented. The database subsystem in the multi-type tool integration module integrates text-to-sql technology based on large models, thought chains and retrieval generation enhancements, as well as data analysis report intelligent generation technology, which can automatically identify user intentions, convert user data query questions into SQL query statements, and query the MySQL database to achieve intelligent data query. At the same time, it can identify the data analysis intentions in user questions and generate professional data analysis reports based on the returned data and business expert system; The system also integrates other subsystems, including external APIs for querying real-time time and weather.
9. The method according to claim 8, characterized in that The data decision and display module is specifically used for: The system receives a task chain as input, checks the format of the task chain, and then fills in the parameters required by the tool and returns the result to ensure that the dependencies between the tools are maintained. Finally, a result in a fixed format is obtained. The standardization of the result is guaranteed based on the prompt. The format is JSON, which contains two key-value pairs with Thoughts and Tools as keys.
10. A task scale scheduling device based on a large model, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: The device is applied to an intelligent task processing system, which includes a task parsing and disassembling module, a multi-type tool integration module and a data decision and display module, including: The task analysis and decomposition module is used to receive natural language queries input by users, analyze user intentions, obtain corresponding tasks, and logically split the corresponding tasks based on the big model thinking chain. The natural language queries include voice and text modes. The multi-type tool integration module integrates multi-source data to provide data support for task execution. The multi-source data includes a database, a knowledge base, and an external API. The multi-type tool integration module obtains structured data in the database, unstructured data in the knowledge base, and integrated external API response data. Multi-type tools are seamlessly connected through FastAPI, and the system selects a suitable tool according to the meta-task; The data decision and presentation module combines the task decomposition results to obtain multiple data of the multi-type tool integration module, integrates the multiple data to obtain an integration result, and combines the integration result with the large-scale language model LLM to generate a final response text or detailed report.
Citation Information
Cited By
Intelligent agent framework based on large language model
CN119476505A
Question and answer method based on thinking chain and intelligent agent and ChatBI system
CN120012760A
Legal consultation system construction method based on multi-model collaborative reasoning
CN120030130A
Customizable AI agent management platform facing enterprise demands and management method thereof
CN120046871A
Tool calling method and device based on large language model
CN120104216A
