Intelligent implementation method and device of intelligent operation assistant, equipment and medium
By adjusting the tool service protocol and natural language processing technology, the tool service is automatically invoked, solving the problem of low efficiency in existing intelligent order entry tools, realizing an end-to-end task loop, and improving agent work efficiency and customer experience.
Patent Information
- Application Number
- CN202511072659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-21
AI Technical Summary
Existing intelligent order entry tools can only complete the data entry task in the order entry stage. Other stages require manual processing, resulting in low efficiency and untimely task processing, which may damage customer experience and company image.
By adjusting the internal communication protocol and external service protocol of the unified tool service, the task is parsed based on natural language processing technology to obtain the tool service address. The task description information is obtained by communicating with the tool service through the internal communication protocol. The task description is optimized by using the prompt word engine and LLM inference engine, and the tool service is automatically invoked to achieve an end-to-end task closed loop.
The system has enabled automatic task tracking, improved agent work efficiency, prevented task omissions, ensured timely follow-up, reduced customer complaints, and improved the accuracy and rationality of task processing.
Smart Images

Figure CN120994420A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent tool technology, and in particular to an intelligent implementation method, apparatus, device and medium for an intelligent work assistant. Background Technology
[0002] In the application of intelligent tools in fintech, healthcare, and elderly care, many tools already assist agent operations, but they all require human intervention and cannot solve problems independently end-to-end. For example, intelligent data entry tools can only complete the data entry task; other processes still require manual handling. In actual operation, agents face many simple tasks, such as reminding customers to claim benefits, reminding them to renew their policies, and assisting customers with clear needs with underwriting. These tasks all require agents to log into the system, actively acquire tasks, and contact customers for follow-up. This model has the following problems: this manual task follow-up method is inefficient, involves a large amount of simple and repetitive work, and manual processing can lead to untimely task processing, resulting in a poor customer experience or even missed cases. If this leads to customers lapsed in their insurance coverage, it may cause customer complaints, damaging the company's image and interests. Summary of the Invention
[0003] This invention provides an intelligent implementation method, device, computer equipment, and medium for an intelligent work assistant, in order to solve the technical problem that existing intelligent data entry tools can only complete the data entry task in the data entry stage, while other stages of the process still require manual processing.
[0004] Firstly, a method for intelligently implementing a smart task assistant is provided, including:
[0005] Adjust the internal communication protocol and external service protocol of the unified tool service;
[0006] The task to be processed is analyzed using natural language processing technology to determine the task objectives and specific requirements.
[0007] Obtain the information publishing addresses of all callable tools and construct a list of tool service addresses;
[0008] It communicates with tool services through internal communication protocols to obtain task description information for each tool;
[0009] The task description information is sent to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the semantics of the current task.
[0010] Send the optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, decide whether to call the tool. If it is necessary to call the tool, guide the task assistant agent to connect to the MCP tool service.
[0011] Add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0012] Secondly, a smart implementation device for an intelligent work assistant is provided, comprising:
[0013] The adjustment module is used to adjust the internal communication protocol and external service protocol of the unified tool service;
[0014] The determination module is used to parse the job tasks to be processed based on natural language processing technology, and to determine the task objectives and specific requirements.
[0015] The build module is used to obtain the information publishing addresses of all callable tools and build a list of tool service addresses;
[0016] The acquisition module is used to communicate with the tool service through an internal communication protocol to obtain the task description information of each tool;
[0017] The optimization module is used to send task description information to the prompt word engine. The prompt word engine optimizes the task description information based on the prompt word template corresponding to the semantics of the current task.
[0018] The module is used to send optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, it decides whether to call the tool. If it is necessary to call the tool, it guides the task assistant agent to connect to the MCP tool service.
[0019] The response module is used to add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0020] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the intelligent implementation method of the above-mentioned intelligent work assistant.
[0021] Fourthly, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of the intelligent implementation method of the above-mentioned intelligent work assistant.
[0022] The intelligent implementation method, device, computer equipment, and storage medium of the aforementioned intelligent job assistant can achieve the following: Adjust the internal communication protocol and external service protocol of the unified tool service; parse the job task to be processed based on natural language processing technology to determine the task objectives and specific requirements; obtain the information publishing addresses of all callable tools and construct a tool service address list; communicate with the tool service through the internal communication protocol to obtain the task description information of each tool; send the task description information to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the current task semantics; send the optimized task description information and tool capability information to the LLM inference engine, which analyzes the task complexity based on the LLM inference engine and decides whether to call the tool; if a call is needed, guide the job assistant agent to connect to the MCP tool service; add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information. This invention enables the planning of job tasks through a large model and the automatic invocation of toolchains, achieving an end-to-end task closed loop. It transforms the mode of agents actively handling tasks into a mode of automatic follow-up and execution by the system, improving agent work efficiency and allowing agents to focus on complex tasks. The automatic follow-up mode ensures timely follow-up of each task, avoiding customer complaints and damage to the company's image due to task omissions. The introduction of a registry center module allows tool services to be registered in the registry center, enabling agents to discover more available tools in a timely manner and facilitating the expansion of tasks at any time. The introduction of a prompt word engine optimizes the tasks input by agents, making the large model more accurate and making planning and execution more reasonable. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of an application environment for an intelligent implementation method of an intelligent work assistant according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart illustrating an intelligent implementation method of an intelligent work assistant according to an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the intelligent implementation device of the intelligent work assistant in one embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0028] Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] The intelligent implementation method of the intelligent task assistant provided in this embodiment of the invention can be applied to, for example... Figure 1 In the application environment, the client adjusts the internal communication protocol and external service protocol of the unified tool service; parses the job tasks to be processed based on natural language processing technology to determine the task objectives and specific requirements; obtains the information publishing addresses of all callable tools and constructs a tool service address list; communicates with the tool service through the internal communication protocol to obtain the task description information of each tool; sends the task description information to the prompt word engine, which optimizes the task description information based on the semantic matching of the current task with the corresponding prompt word template; sends the optimized task description information and tool capability information to the LLM inference engine, which analyzes the task complexity based on the LLM inference engine and decides whether to call the tool. If a call is needed, it guides the job assistant agent to connect to the MCP tool service; adds all call results to the message history and calls the LLM inference engine again to generate a logically complete final call response based on all interaction information. This invention enables the planning of job tasks through a large model and the automatic invocation of toolchains, achieving an end-to-end task closed loop. It transforms the mode of agents actively handling tasks into a mode of automatic follow-up and execution by the system, improving agent work efficiency and allowing agents to focus on complex tasks. The automatic follow-up mode ensures timely follow-up of each task, avoiding customer complaints and damage to the company's image due to task omissions. The introduction of a registry center module allows tool services to be registered in the registry center, enabling agents to discover more available tools in a timely manner and facilitating the expansion of tasks at any time. The introduction of a prompt word engine optimizes the tasks input by agents, making the large model more accurate and making planning and execution more reasonable.
[0031] The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0032] Please see Figure 2 As shown, Figure 2A flowchart illustrating the intelligent implementation method of the intelligent task assistant provided in this embodiment of the invention includes the following steps:
[0033] S10: Adjust the internal communication protocol and external service protocol of the unified tool service;
[0034] Unified internal communication protocols and external service protocols for unified tool services are crucial for ensuring the efficient and stable operation of the system. At the internal communication level, MCP (Message Communication Protocol) is adopted as the standard protocol. Based on a message-driven mechanism, the MCP protocol boasts high scalability: its modular architecture allows for rapid integration of new tool services; by defining unified message formats (such as JSON) and interface specifications, it decouples different tools, reduces system coupling, and ensures that adding new tools does not affect the operation of existing services. It also features reliable transmission: a built-in message queue mechanism supports asynchronous communication and persistent message storage, ensuring no message loss even during network fluctuations or temporary service interruptions, guaranteeing the integrity and accuracy of data exchange between tools. Furthermore, it provides secure interaction: integrating authentication and encrypted transmission mechanisms, it verifies the identities of both communicating parties through digital signatures and encrypts transmitted data using AES to prevent the leakage of sensitive information and ensure the security of internal communication.
[0035] At the external service level, the SSE (Server-Sent Events) protocol is adopted. The SSE protocol provides a standardized solution for clients to obtain server data in real time: Unidirectional data flow: The SSE protocol establishes a one-way long connection from the server to the client, suitable for the tool service to proactively push real-time information such as task progress and status changes, avoiding the resource consumption caused by frequent client polling. Strong compatibility: Supports native HTML5 interfaces, running in mainstream browsers without additional plugins, and is highly compatible with common web application frameworks (such as Spring Boot and Django), facilitating rapid integration into existing business systems. Event-driven: Through predefined event types (such as open, message, error), different stages of data transmission and exception handling mechanisms are clearly defined, enabling clients to accurately parse and respond to various information sent by the tool service.
[0036] By unifying the MCP and SSE protocols, not only are standardized specifications provided for internal communication and external interaction between tool services, but a stable and efficient technical foundation is also laid for subsequent task parsing, tool invocation, and result response, ensuring orderly collaboration among system modules and achieving reliable data flow and seamless business integration.
[0037] S20: Analyze the job tasks to be processed based on natural language processing technology, and determine the task objectives and specific requirements;
[0038] Specifically, this step includes: preprocessing the tasks to be processed; identifying key entities in the tasks to be processed based on an entity recognition model and labeling the entity types of the key entities; determining the entity types based on a pre-trained intent classification model and filling the key entities into the corresponding slots; parsing the logical relationships between key entities and establishing a relationship graph between task elements; matching the task templates corresponding to the key entities according to the intent classification results; checking the information completeness based on the task template fields; if key slots are missing, filling the slots by default according to the task type; if key slots are missing, outputting the missing slot information and querying the user to obtain the human-computer interaction results.
[0039] It should be noted that, based on Natural Language Processing (NLP) technology, a systematic analysis of user-input job descriptions is performed. The core objective is to extract structured information from unstructured natural language text, clarifying task objectives, key parameters, and execution logic. This specifically includes the following steps:
[0040] Text preprocessing involves cleaning and standardizing the original input text: Denoising and normalization: removing special symbols, invalid spaces, and redundant information from the text; converting full-width characters to half-width characters; standardizing capitalization; and improving the accuracy of subsequent processing. Word segmentation and part-of-speech tagging: using word segmentation tools (such as jieba and NLTK) to break down the text into word units and tagging the part of speech (noun, verb, adjective, etc.) of each word. For example, "design a product promotion plan" is broken down into "design / v a / q product / n promotion / v plan / n", providing a foundation for semantic analysis.
[0041] Semantic understanding and intent recognition utilize deep learning models to mine the deep semantics of text: Named Entity Recognition (NER): Identifies key entities in text, such as names, times, locations, and product names. For example, from "Formulate a sales plan for the Beijing market in Q2 2025," it extracts "Q2 2025" (time), "Beijing" (location), and "sales plan" (task type) to build a core element library for the task; Intent Classification: Using pre-trained language models (such as BERT, GPT series) or rule-based classifiers, it determines the category of the task (such as data analysis, copywriting, image generation, etc.) and clarifies the basic processing direction of the task; Relationship Extraction: It analyzes the logical relationships between entities. For example, in "Use Python to analyze user behavior data," it identifies "Python" as a tool and "user behavior data" as the processing object, establishing a relationship graph between task elements.
[0042] The semantic analysis results are transformed into machine-executable structured data: a task description framework is generated, and standardized template fields are filled in according to the task category. For example, the template for a data analysis task includes fields such as "data source," "analysis dimension," and "output format," forming a structured task description JSON object. Goals are refined and prioritized, breaking down complex tasks. For instance, "planning an online promotional campaign" is broken down into "determining the campaign theme → designing promotional rules → creating promotional materials → developing a promotion plan," and the dependencies and priorities of each sub-task are marked to provide a basis for subsequent resource scheduling.
[0043] The system refines task requirements through an interactive feedback mechanism: Information gap detection checks the completeness of key fields based on the task template; if the "design poster" doesn't specify size or style, the system proactively asks the user for additional information. Ambiguity resolution clarifies vague expressions; for example, if the user inputs "process data," the system asks follow-up questions like "data type" and "processing purpose" to accurately pinpoint the task requirements. Through this process, the natural language-described task is transformed into clear, complete, and actionable structured instructions, providing precise input for subsequently obtaining tool service addresses, invoking tool capabilities, and generating task responses. This ensures the system accurately executes user intent, improving the efficiency and accuracy of task processing.
[0044] S30: Obtain the information publishing addresses of all callable tools and build a list of tool service addresses;
[0045] Specifically, this step includes: setting up a distributed service registry and using it as the core of address management; obtaining a list of available tools through the API interface or SDK of the distributed service registry; and obtaining the target address based on the external protocol of the tool list.
[0046] It's important to note that a standardized service discovery mechanism dynamically obtains the network address information of callable tools. The core process includes: Registration center integration, connecting to a unified service registry (such as Consul or Nacos). This registry stores metadata for all tool services (including service name, IP address, port number, protocol type, etc.). Tool services automatically register their addresses with the registry upon startup and actively deregister upon shutdown, ensuring the real-time nature of the address list. Multi-protocol adaptation is also performed, obtaining the address based on the tool service's external protocol (such as the SSE protocol defined in S10) via API gateway or DNS resolution. For example, for HTTP / S protocol tools, the IP address is directly obtained by resolving the domain name; for message queue protocols (such as Kafka), the queue server address and topic information are obtained.
[0047] Tiered caching mechanism: Store the obtained address information in a local cache (such as Redis) and set a multi-level caching strategy: Core tool addresses: cache validity period of 30 seconds, high frequency refresh to ensure availability; Low-frequency tool addresses: cache validity period of 5 minutes to reduce the query pressure on the registry center.
[0048] A structured tool address information database is constructed, containing the following core fields:
[0049]
[0050]
[0051] Address validity verification and dynamic updates include real-time health checks. A heartbeat is sent periodically (e.g., every 10 seconds) to verify the availability of tool addresses. If three consecutive heartbeats fail, the address is marked as "offline" and removed from the list of available addresses. Event-driven updates are implemented, with the registry pushing service address change events via a publish-subscribe (Pub / Sub) model. Examples include: adding addresses when the tool service is expanded; address invalidation due to server failure; and address changes during version upgrades. A manual intervention mechanism allows administrators to manually add, delete, or modify tool addresses through the backend management system to handle temporary service adjustments (such as partial address switching during canary releases).
[0052] Obtaining the address requires JWT token or OAuth 2.0 authentication to ensure that only authorized systems can access the tool address, preventing unauthorized access. Addresses of sensitive tools (such as database operation tools) are anonymized during storage and transmission; for example, 192.168.1.100:3306 is displayed as 192.168.1.***:****, decrypted only during invocation. Address access scope is defined according to the tool's security level; for example, core data processing tools are restricted to internal network addresses, while external service tools expose public network addresses and are configured with firewall rules. This step ensures the accuracy, timeliness, and security of tool address information, laying a reliable network connection foundation for subsequent tool capability invocations and avoiding task processing interruptions due to address issues.
[0053] S40: Communicates with tool services through internal communication protocols to obtain task description information for each tool;
[0054] Specifically, this step includes: establishing a connection with the tool service through a message queue or RPC framework (such as gRPC) according to the MCP protocol specification; and sending a query request to the tool service through the standardized interface of the MCP protocol to obtain structured capability description information.
[0055] Communicating with the tool service via the MCP protocol allows for in-depth analysis of the tool's parameters, functions, and constraints, providing a capability basis for subsequent task processing. According to the MCP protocol specification, a connection is established with the tool service via a message queue or RPC framework (such as gRPC). For example, a ConnectRequest message containing authentication information (such as a JWT token) is sent, and the tool service returns a ConnectResponse confirming a successful connection, synchronously exchanging protocol versions and lists of supported functions.
[0056] If there are version differences in the tool service (such as an older version of the MCP protocol), the message format can be dynamically adjusted using a protocol converter to ensure that both new and old versions of the tool can communicate normally. For example, the JSON format messages of the new version of MCP can be converted to the older XML format to achieve cross-version interaction.
[0057] Tool capability information is obtained by sending a query request to the tool service through a standardized interface of the MCP protocol to obtain structured capability description information, including: basic attributes, such as tool name, version number, developer information, update time, etc.; functional parameters, such as supported task types (e.g., "image cutout", "data visualization"), input and output data formats (JSON / CSV / PNG), parameter range (e.g., "image resolution ≤ 4K"); performance indicators, such as processing speed (e.g., "processes 100 images per second"), resource consumption (memory / CPU usage), concurrency limits; and constraints, such as data security requirements (e.g., "only supports intranet data") and authorization restrictions (requires a specific license).
[0058] The acquired tool capability information is parsed into a unified data model and stored in a local cache or database: Capability verification and updates, real-time health monitoring, periodic Ping messages are sent to verify the tool service status, if no response is received within a timeout, it is marked as "unavailable" and removed from the capability list; dynamic capability updates, the tool service can proactively push capability change notifications (such as new features, parameter adjustments), and the system automatically updates the local capability library upon receiving them; version compatibility verification, before calling the tool, the task requirements are compared with the tool capability version, if there is incompatibility (such as the old version of the tool not supporting new parameters), a downgrade process or error message is triggered.
[0059] In the subsequent S50, the prompt engine optimizes the task description based on the tool capability information (such as input format, parameter limitations) to ensure the match between the task instructions and the tool capabilities; in S60, the LLM inference engine analyzes the task complexity based on the tool capabilities, determines whether to invoke a tool, and selects the most suitable tool (such as the tool with the fastest processing speed and the lowest resource consumption); in the closed-loop feedback mechanism, if the tool invocation fails (such as parameter mismatch), the system traces back to S40 to re-obtain or update the tool capability information and correct the task execution strategy. Through the above process, S40 ensures that the system comprehensively grasps the capability boundaries and operating status of the tool services, realizes the accurate mapping between the task requirements and the tool capabilities, and provides a solid guarantee for the efficiency and accuracy of subsequent task processing.
[0060] S50: Send the task description information to the prompt engine, and the prompt engine matches the corresponding prompt template based on the current task semantics to optimize the task description information;
[0061] Through semantic enhancement and structured processing of the task description by the prompt engine, ensure the accuracy of subsequent LLM inference and tool invocation. Specifically, trigger task description semantic optimization, task description preprocessing and feature extraction, text standardization: perform secondary cleaning on the original task description, including removing stop words (such as "de", "le"), unifying measurement units (such as converting "2 meters" to "200 centimeters"), and reducing interference from redundant information. Key feature extraction: Use named entity recognition (NER) and keyword extraction techniques to extract core elements from the task description. For example, extract "Python (tool)", "e-commerce sales data (object)", "analysis (action)" from "Analyze e-commerce sales data using Python" to construct a feature vector.
[0062] Prompt template matching and screening, template library construction: Pre-define multiple types of prompt templates covering different task scenarios (such as data analysis, copywriting generation, graphic design), and each template contains variable placeholders and constraint conditions. For example:
[0063] # Data analysis template
[0064] {
[0065] "name":"Data analysis",
[0066] "variables":["Data source", "Analysis dimension", "Output format"],
[0067] "constraints":{
[0068] "Data source":["csv", "excel"],
[0069] "Output format":["Chart", "Report"]
[0070] },
[0071] "template":"Please use {tool} to analyze {data source} from {analysis dimensions} and output {output format}"
[0072] }
[0073] The system calculates the semantic similarity between the task description and the template using a pre-trained language model (such as BERT) and selects the template with the highest score. For example, if the task description is "create a sales trend chart using Excel," the system prioritizes matching the "data analysis" template. The template is adapted based on tool capability information (obtained from S40). If the target tool only supports JSON input, the "output format" in the template is limited to "JSON data."
[0074] The extracted key task features (such as tools and data types) are populated into template variables to generate structured task instructions. For example, filling "Python," "e-commerce sales data," and "chart" into the data analysis template will result in "Please use Python to analyze e-commerce sales data from a time perspective and output a chart."
[0075] Using GPT-based models or rule engines, the populated descriptions can be refined to supplement missing details (such as default parameters and priorities). For example, implicit requirements such as "weekly statistics" and "sorted in descending order of importance" can be automatically added.
[0076] Check the optimized task description against the tool's capability constraints (such as input length limits and data type requirements) to ensure compliance. If the tool only supports data files smaller than 10MB, prompt for splitting or compressing tasks with excessive data.
[0077] If the optimized description remains ambiguous or conflicts with the tool's capabilities, the system will ask the user for additional information via dialogue. For example, if the template cannot match the "ancient style" in "create an ancient style poster," the system will ask, "Do you want to specify a specific style such as ink painting / meticulous brushwork?" Problem cases during the optimization process are recorded, and the template matching strategy and semantic enhancement rules are dynamically adjusted using reinforcement learning algorithms to improve the accuracy of subsequent task optimizations.
[0078] In the subsequent S60, the LLM inference engine, based on the optimized task description, more accurately judges the task complexity and the necessity of tool invocation. The optimized description clarifies the input parameters required by the tool (such as data format and processing dimensions), directly guiding the parameter settings when the task assistant agent in S60 invokes the tool. If the final response of S70 does not meet expectations, the system backtracks to step 5, analyzes the shortcomings of the optimization process (such as template matching errors or missing parameters), and triggers a new round of description optimization. Through the above process, the prompt word engine transforms ambiguous natural language tasks into clear, structured instructions that conform to the tool's capabilities, effectively reducing task execution failures caused by semantic ambiguity and improving the overall efficiency and success rate of task processing.
[0079] S60: Send the optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, decide whether to call the tool. If it is necessary to call the tool, guide the task assistant agent to connect to the MCP tool service.
[0080] Specifically, this step includes: sending the optimized task description and tool capability information to the LLM inference engine in structured data format; analyzing the task complexity based on the task description combined with the built-in rule base and knowledge graph by the LLM inference engine; determining the tool to be invoked based on the task complexity, and calculating the matching score of each candidate tool according to the task requirements; determining the tool invocation strategy by considering factors such as task urgency and tool load; if it is determined that a tool needs to be invoked, the LLM inference engine generates a standardized invocation command according to the internal communication protocol and parameter requirements; sending the command to the job assistant agent via the JSON-RPC protocol, whereby the agent is responsible for converting the command into the MCP protocol format and establishing communication with the tool service.
[0081] Based on the optimized task description and tool capability information, the LLM inference engine determines the task complexity and intelligently schedules tool execution. The optimized task description from S50 and the tool capability information obtained from S40 are sent to the LLM inference engine in a structured data format (such as JSON).
[0082] The LLM inference engine analyzes task complexity based on task descriptions, combined with a built-in rule base and knowledge graph. For example: simple tasks: directly generate answers (such as "explain what machine learning is"), without calling tools; complex tasks: require external tools (such as "analyze 2024 sales data and generate comparison charts"), triggering the tool call process.
[0083] Based on the task requirements, calculate the matching score for each candidate tool. For example, for the task of "generating sales charts," prioritize tools that support chart generation and have matching input and output formats, and assign them higher weight. Considering factors such as task urgency and tool load, determine the tool usage strategy: Single tool usage: The task can be completed with only a single tool (e.g., using only Python to analyze data); Multi-tool chaining: The task requires multiple tools to work together (e.g., first using Python to process data, then using a visualization tool to generate charts); Tool alternatives: If the preferred tool is unavailable, automatically switch to the second-best tool.
[0084] If it is determined that a tool needs to be invoked, the LLM inference engine generates standardized invocation instructions based on the tool protocol (MCP protocol) and parameter requirements. For example:
[0085] json
[0086] {
[0087] "tool_name":"Python data analysis tool",
[0088] "function":"Data statistics",
[0089] "parameters":{
[0090] "data_source":"sales_data.csv",
[0091] "analysis_dimension":"time",
[0092] "output_format":"json"
[0093] }}
[0094] Instructions are sent to the job assistant agent via the JSON-RPC protocol. The agent is responsible for converting the instructions into the MCP protocol format and establishing communication with the tool service. For example, a JSON-RPC request {"jsonrpc":"2.0", "method":"invokeTool", "params":{...}} is converted into MCP protocol message packets for transmission. The job assistant agent tracks the tool call status in real time, recording information such as start time, execution progress, and error logs. If the call times out or fails, a retry mechanism is immediately triggered or a backup tool is switched.
[0095] During task processing, the tool service feeds back intermediate results and status changes (such as "data processing" or "insufficient memory") to the LLM inference engine via the MCP protocol, facilitating dynamic strategy adjustments by the engine. If a tool call fails (e.g., parameter mismatch or service interruption), the LLM inference engine performs different actions based on the error type: for parameter errors, it re-optimizes the task description and supplements or corrects the parameters; for service failures, it switches to a backup tool or suspends the task and notifies the user. Successful / failed tool call cases are stored in a historical database, and reinforcement learning algorithms are used to optimize the LLM inference engine's decision model, improving the accuracy of future task scheduling.
[0096] Relying on the optimized task description of S50 and the tool capability information of S40, the accuracy of decision-making is ensured; the generated tool call instructions directly drive the tool execution and result integration of S70; the call results returned by S70 serve as new inputs to assist the LLM inference engine in verifying the rationality of the decision, forming a complete closed loop of "analysis-decision-execution-feedback".
[0097] Through the above process, the LLM inference engine achieves intelligent decision-making across the entire chain, from task understanding and tool matching to instruction execution, ensuring that complex tasks are completed efficiently and accurately, while also possessing dynamic fault tolerance and optimization capabilities.
[0098] S70: Add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0099] Specifically, this step includes: adding all call results to the message history and calling the LLM inference engine again; based on the LLM inference engine, selecting the corresponding response template to determine the structure and focus of the final response according to the task type and result data; combining the structure and focus of the final response, the message history, and the user's original requirements to generate the final response content; checking the generated response for logical consistency to ensure that the data matches the conclusion and the steps correspond to the description; if there is a logical gap, the LLM inference engine automatically supplements the reasoning process or provides suggestions.
[0100] The tool call results are deeply integrated with historical interaction messages, and the final feedback is generated through an LLM inference engine. This ensures that the response not only meets the task requirements but also possesses logical completeness and usability. The following section details the technical implementation and logical aspects:
[0101] First, the task assistant agent receives the processing results returned by the tool via the MCP protocol, converting results in different formats (such as JSON, CSV, and binary image data) into a unified structured representation. For example, it encodes PNG images generated by the image tool into Base64 strings and integrates them with other text results into a JSON object.
[0102] Perform completeness and compliance checks on the results returned by the tool, verifying whether key fields are missing (such as statistical indicators in data analysis results) and whether the data types are correct (such as whether numeric fields contain non-numeric characters). If the results are invalid, trigger the error handling process (such as re-launching the tool or prompting the user with an error message).
[0103] Information from the entire task processing flow (including the original task description, optimized task instructions, tool call parameters, and intermediate status feedback) is integrated into a message history in chronological order to construct a complete task processing context. An example structure is as follows:
[0104]
[0105]
[0106] By using NLP technology to highlight key data (such as statistical values and concluding statements) in the message history, LLM can quickly locate and reference them.
[0107] The LLM inference engine performs secondary processing. Based on the task type and result data, it selects the corresponding response template (such as a data analysis report template or an operation guide template) to determine the structure and focus of the final response. Combining message history and the user's original needs, it generates the final response content. For example, in a data analysis scenario, LLM will write conclusive text based on the statistical data returned by the tool and insert generated chart links or Base64 encoding; in a copywriting scenario, it directly outputs optimized text content. The generated response undergoes a logical consistency check to ensure that data matches conclusions and steps correspond to descriptions. If logical gaps exist (such as unexplained data fluctuations), LLM automatically supplements the reasoning process or provides suggestions.
[0108] The response format is converted based on the output channel (e.g., webpage, app, API). For example: for webpages, text results and charts are rendered in HTML+CSS format; for APIs, structured data is encapsulated and returned in JSON format. If the task involves multiple types of results (e.g., text + image + link), they are integrated into a rich media response. For example, in the "Generate Marketing Plan" task, the response content includes the plan text, accompanying images, and related data links. Sensitive information in the response (e.g., database fields, user privacy data) is anonymized to ensure data security and compliance.
[0109] After pushing the final response to the user, user satisfaction and improvement suggestions are collected through questionnaires, ratings, and other methods to optimize subsequent task processing. Log data of the entire task processing process is recorded, and metrics such as time consumption and error rate at key nodes are analyzed to pinpoint performance bottlenecks or logical vulnerabilities, continuously optimizing algorithms and strategies. Typical task processing solutions and high-quality response examples are stored in a knowledge base for LLM learning and reference, improving the efficiency and quality of processing similar tasks.
[0110] Through the above process, a complete closed loop from the original task requirements to the final delivery result is achieved, which not only ensures the accuracy and practicality of the response content, but also continuously improves the system's intelligence level and user experience through the feedback mechanism.
[0111] As can be seen, in the above scheme, for large-scale model planning tasks, the internal communication protocol and external service protocol of the unified tool service are adjusted first; the task to be processed is parsed based on natural language processing technology to determine the task objectives and specific requirements; the information publishing addresses of all callable tools are obtained, and a tool service address list is constructed; the task description information of each tool is obtained by communicating with the tool service through the internal communication protocol; the task description information is sent to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the current task semantics; the optimized task description information and tool capability information are sent to the LLM inference engine, which analyzes the task complexity based on the LLM inference engine and decides whether to call the tool. If it needs to be called, the task assistant agent is guided to connect to the MCP tool service; all call results are added to the message history and the LLM inference engine is called again to generate a logically complete final call response based on the full amount of interaction information. This invention enables the planning of job tasks through a large model and the automatic invocation of toolchains, achieving an end-to-end task closed loop. It transforms the mode of agents actively handling tasks into a mode of automatic follow-up and execution by the system, improving agent work efficiency and allowing agents to focus on complex tasks. The automatic follow-up mode ensures timely follow-up of each task, avoiding customer complaints and damage to the company's image due to task omissions. The introduction of a registry center module allows tool services to be registered in the registry center, enabling agents to discover more available tools in a timely manner and facilitating the expansion of tasks at any time. The introduction of a prompt word engine optimizes the tasks input by agents, making the large model more accurate and making planning and execution more reasonable.
[0112] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0113] In one embodiment, a smart implementation device for a smart task assistant is provided, which corresponds one-to-one with the smart implementation method for the smart task assistant in the above embodiments. For example... Figure 3As shown, the intelligent implementation device of this intelligent work assistant includes an adjustment module 101, a determination module 102, a construction module 103, an acquisition module 104, an optimization module 105, a calling module 106, and a response module 107. Detailed descriptions of each functional module are as follows:
[0114] Adjustment module 101 is used to adjust the internal communication protocol and external service protocol of the unified tool service;
[0115] The determination module 102 is used to parse the job task to be processed based on natural language processing technology and determine the task objectives and specific requirements.
[0116] Module 103 is used to obtain the information publishing addresses of all callable tools and build a list of tool service addresses;
[0117] The acquisition module 104 is used to communicate with the tool service through an internal communication protocol to obtain the task description information of each tool.
[0118] The optimization module 105 is used to send task description information to the prompt word engine. The prompt word engine optimizes the task description information based on the prompt word template corresponding to the semantics of the current task.
[0119] Module 106 is used to send optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, it decides whether to call the tool. If it is necessary to call the tool, it guides the task assistant agent to connect to the MCP tool service.
[0120] The response module 107 is used to add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0121] In one embodiment, the determining module 102 is specifically used for:
[0122] Preprocess pending job tasks;
[0123] Based on the entity recognition model, key entities in the task to be processed are identified, and the entity type of the key entities is labeled.
[0124] The entity type is determined based on a pre-trained intent classification model, and key entities are filled into the corresponding slots.
[0125] Analyze the logical relationships between key entities and establish a relationship graph among task elements.
[0126] In one embodiment, the construction module 103 is specifically used for:
[0127] Build a distributed service registry and use it as the core of address management;
[0128] Obtain a list of available tools through the API or SDK of the distributed service registry;
[0129] Obtain the target address based on the external protocols of the tool list.
[0130] In one embodiment, the acquisition module 104 is specifically used for:
[0131] According to the MCP protocol specification, a connection is established with the tool service through a message queue or RPC framework (such as gRPC);
[0132] By sending a query request to the tool service through the standardized interface of the MCP protocol, structured capability description information can be obtained.
[0133] In one embodiment, module 106 is invoked, specifically for:
[0134] The optimized task description and tool capability information are sent to the LLM inference engine in the form of structured data;
[0135] The task complexity is analyzed by combining the task description with the built-in rule base and knowledge graph based on the LLM inference engine.
[0136] The tool to be used is determined based on the complexity of the task, and the matching score of each candidate tool is calculated based on the task requirements.
[0137] Determine the tool invocation strategy based on factors such as task urgency and tool load.
[0138] If it is determined that a tool needs to be invoked, the LLM inference engine generates standardized invocation instructions based on the internal communication protocol and parameter requirements;
[0139] Instructions are sent to the job assistant agent via the JSON-RPC protocol. The agent is responsible for converting the instructions into the MCP protocol format and establishing communication with the tool service.
[0140] In one embodiment, the response module 107 is specifically used for:
[0141] Add all call results to the message history and call the LLM inference engine again;
[0142] Based on the LLM inference engine, the task type and result data are used to select the corresponding response template to determine the structure and focus of the final response;
[0143] The final response content is generated by combining the structure and focus of the final response, message history, and the user's original requirements.
[0144] Check the generated response for logical consistency, ensuring that the data matches the conclusions and the steps correspond to the descriptions;
[0145] If a logical gap exists, the LLM inference engine will automatically supplement the reasoning process or provide suggestions.
[0146] This invention provides an intelligent implementation device for a smart task assistant. It adjusts the internal communication protocol and external service protocol of a unified tool service; analyzes the task to be processed based on natural language processing technology to determine the task objectives and specific requirements; obtains the information publishing addresses of all callable tools and constructs a tool service address list; communicates with the tool service through the internal communication protocol to obtain the task description information of each tool; sends the task description information to a prompt word engine, which optimizes the task description information based on the semantic matching of the current task with the corresponding prompt word template; sends the optimized task description information and tool capability information to an LLM inference engine, which analyzes the task complexity and decides whether to call the tool. If a tool call is needed, it guides the task assistant agent to connect to the MCP tool service; adds all call results to the message history and calls the LLM inference engine again to generate a logically complete final call response based on all interaction information. This invention enables the planning of job tasks through a large model and the automatic invocation of toolchains, achieving an end-to-end task closed loop. It transforms the mode of agents actively handling tasks into a mode of automatic follow-up and execution by the system, improving agent work efficiency and allowing agents to focus on complex tasks. The automatic follow-up mode ensures timely follow-up of each task, avoiding customer complaints and damage to the company's image due to task omissions. The introduction of a registry center module allows tool services to be registered in the registry center, enabling agents to discover more available tools in a timely manner and facilitating the expansion of tasks at any time. The introduction of a prompt word engine optimizes the tasks input by agents, making the large model more accurate and making planning and execution more reasonable.
[0147] Specific limitations regarding the intelligent implementation device of the intelligent task assistant can be found in the limitations on the intelligent implementation method of the intelligent task assistant mentioned above, and will not be repeated here. Each module in the aforementioned intelligent implementation device of the intelligent task assistant can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0148] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a smart work assistant on the server side.
[0149] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of an intelligent operation assistant.
[0150] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0151] Adjust the internal communication protocol and external service protocol of the unified tool service;
[0152] The task to be processed is analyzed using natural language processing technology to determine the task objectives and specific requirements.
[0153] Obtain the information publishing addresses of all callable tools and construct a list of tool service addresses;
[0154] It communicates with tool services through internal communication protocols to obtain task description information for each tool;
[0155] The task description information is sent to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the semantics of the current task.
[0156] Send the optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, decide whether to call the tool. If it is necessary to call the tool, guide the task assistant agent to connect to the MCP tool service.
[0157] Add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0158] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0159] Adjust the internal communication protocol and external service protocol of the unified tool service;
[0160] The task to be processed is analyzed using natural language processing technology to determine the task objectives and specific requirements.
[0161] Obtain the information publishing addresses of all callable tools and construct a list of tool service addresses;
[0162] It communicates with tool services through internal communication protocols to obtain task description information for each tool;
[0163] The task description information is sent to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the semantics of the current task.
[0164] Send the optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, decide whether to call the tool. If it is necessary to call the tool, guide the task assistant agent to connect to the MCP tool service.
[0165] Add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
[0166] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0167] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0168] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0169] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for intelligently implementing a smart task assistant, characterized in that, include: Adjust the internal communication protocol and external service protocol of the unified tool service; The task to be processed is analyzed using natural language processing technology to determine the task objectives and specific requirements. Obtain the information publishing addresses of all callable tools and construct a list of tool service addresses; It communicates with tool services through internal communication protocols to obtain task description information for each tool; The task description information is sent to the prompt word engine, which optimizes the task description information based on the prompt word template corresponding to the semantics of the current task. Send the optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, decide whether to call the tool. If it is necessary to call the tool, guide the task assistant agent to connect to the MCP tool service. Add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
2. The intelligent implementation method of the intelligent work assistant as described in claim 1, characterized in that, The steps of parsing the task to be processed based on natural language processing technology and determining the task objectives and specific requirements include: Preprocess pending job tasks; Based on the entity recognition model, key entities in the task to be processed are identified, and the entity type of the key entities is labeled. The entity type is determined based on a pre-trained intent classification model, and key entities are filled into the corresponding slots. Analyze the logical relationships between key entities and establish a relationship graph among task elements.
3. The intelligent implementation method of the intelligent work assistant as described in claim 2, characterized in that, After the steps of parsing the logical relationships between key entities and determining the execution order of key entities, the method includes: Match task templates corresponding to key entities based on intent classification results; The integrity of information is checked based on the task template fields. If a key slot is missing, the slot is filled with a default value according to the task type. If a critical slot is missing, output the missing slot information and ask the user for the human-computer interaction result.
4. The intelligent implementation method of the intelligent work assistant as described in claim 1, characterized in that, The steps of obtaining the information publishing addresses of all callable tools and constructing a list of tool service addresses include: Build a distributed service registry and use it as the core of address management; Obtain a list of available tools through the API or SDK of the distributed service registry; Obtain the target address based on the external protocols of the tool list.
5. The intelligent implementation method of the intelligent work assistant as described in claim 1, characterized in that, The step of communicating with the tool service through an internal communication protocol to obtain the task description information of each tool includes: According to the MCP protocol specification, a connection is established with the tool service through a message queue or RPC framework; By sending a query request to the tool service through the standardized interface of the MCP protocol, structured capability description information can be obtained.
6. The intelligent implementation method of the intelligent work assistant as described in claim 1, characterized in that, The steps of sending the optimized task description information and tool capability information to the LLM inference engine, analyzing the task complexity based on the LLM inference engine to determine whether to invoke the tool, and guiding the task assistant agent to connect to the MCP tool service if invocation is required include: The optimized task description and tool capability information are sent to the LLM inference engine in the form of structured data; The task complexity is analyzed by combining the task description with the built-in rule base and knowledge graph based on the LLM inference engine. The tool to be used is determined based on the complexity of the task, and the matching score of each candidate tool is calculated based on the task requirements. Determine the tool invocation strategy based on factors such as task urgency and tool load. If it is determined that a tool needs to be invoked, the LLM inference engine generates standardized invocation instructions based on the internal communication protocol and parameter requirements; Instructions are sent to the job assistant agent via the JSON-RPC protocol. The agent is responsible for converting the instructions into the MCP protocol format and establishing communication with the tool service.
7. The intelligent implementation method of the intelligent work assistant as described in claim 6, characterized in that, The steps of adding all call results to the message history and calling the LLM inference engine again to generate a logically complete final call response based on all interaction information include: Add all call results to the message history and call the LLM inference engine again; Based on the LLM inference engine, the task type and result data are used to select the corresponding response template to determine the structure and focus of the final response; The final response content is generated by combining the structure and focus of the final response, message history, and the user's original requirements. Check the generated response for logical consistency, ensuring that the data matches the conclusions and the steps correspond to the descriptions; If a logical gap exists, the LLM inference engine will automatically supplement the reasoning process or provide suggestions.
8. A smart implementation device for an intelligent work assistant, characterized in that, include: The adjustment module is used to adjust the internal communication protocol and external service protocol of the unified tool service; The determination module is used to parse the job tasks to be processed based on natural language processing technology, and to determine the task objectives and specific requirements. The build module is used to obtain the information publishing addresses of all callable tools and build a list of tool service addresses; The acquisition module is used to communicate with the tool service through an internal communication protocol to obtain the task description information of each tool; The optimization module is used to send task description information to the prompt word engine. The prompt word engine optimizes the task description information based on the prompt word template corresponding to the semantics of the current task. The module is used to send optimized task description information and tool capability information to the LLM inference engine. Based on the analysis of task complexity by the LLM inference engine, it decides whether to call the tool. If it is necessary to call the tool, it guides the task assistant agent to connect to the MCP tool service. The response module is used to add all call results to the message history and call the LLM inference engine again to generate a logically complete final call response based on all interaction information.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent implementation method of the intelligent job assistant as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent implementation method of the intelligent job assistant as described in any one of claims 1 to 7.
Citation Information
Cited By
Space-time task processing method and system and storage medium
CN121349705A
Lightweight agent development method and system based on MCP protocol
CN121833293A