Human-computer interaction method and device, computer equipment, storage medium and computer program product
By receiving user interaction tasks, detecting similarity, and using a large language model to generate a tool call list, combined with a personalized database to optimize the response, the problem of insufficient targeting in existing interaction systems is solved, and efficient and personalized interaction responses are achieved.
Patent Information
- Application Number
- CN202511671530.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-17
AI Technical Summary
Existing interactive systems lack specificity and fail to match user expectations. Tool invocation requires predefined fixed processes, resulting in redundancy and high manual costs, and they cannot automatically adapt to user context.
By receiving the current interaction task input from the user, obtaining historical interaction information, detecting similarity, generating a tool call list using a large language model, optimizing the response results by combining user information, and adjusting the language style and level of detail through a personalized database, the strategy is dynamically updated.
Shorten task response time, reduce operating costs, improve the relevance of interactions and user satisfaction, reduce execution failures, and enhance system flexibility and personalization.
Smart Images

Figure CN121680995A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a human-computer interaction method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] In existing technologies, tool invocation typically requires predefined fault flows, making it impossible to automatically determine whether a specific tool or a combination of tools needs to be invoked to execute the task based on the context. The emergence of Model Context Protocols, through standardized context structures and cross-task transfer mechanisms, enables tool invocation to be automatically triggered and combined based on context, reducing manual process design and achieving context-driven execution.
[0003] However, current interactive systems typically require predefined, fixed processes for tool invocation, resulting in redundancy in handling repetitive or similar tasks. Consequently, the content generated by current interactive systems lacks specificity and is difficult to match user expectations. Summary of the Invention
[0004] Therefore, it is necessary to address the technical problem that the content generated by the current interactive systems lacks specificity and is difficult to match with user expectations, and to provide a human-computer interaction method, device, computer equipment, computer-readable storage medium, and computer program product.
[0005] Firstly, this application provides a human-computer interaction method, including:
[0006] The system receives the current interaction task input by the user and obtains the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0007] Detect the similarity between the current interaction task and each of the user's historical interaction tasks;
[0008] If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, then the target tool call list of the target historical interaction task is obtained.
[0009] Input the current interaction task, the target tool call list, and the user information into the large language model to obtain the first tool call list for executing the current interaction task;
[0010] Based on the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interactive task.
[0011] In one embodiment, after detecting the similarity between the current interaction task and each of the user's historical interaction tasks, the method further includes: if the detected similarity is less than a preset threshold, obtaining the current interaction task, the tool list of the current interaction task, and user information; inputting the current interaction task, the tool list of the current interaction task, and the user information into the large language model to obtain a second tool call list for executing the current interaction task; and executing a tool call operation according to the input parameters and call order of each tool in the second tool call list to obtain a response result for the current interaction task.
[0012] In one embodiment, the human-computer interaction method further includes: obtaining the user's historical interaction information from a database; if the similarity is detected to be less than the preset threshold, storing the current interaction task and the second tool call list in the database.
[0013] In one embodiment, the step of performing a tool invocation operation based on the input parameters and invocation order of each tool in the first tool invocation list to obtain a response result for the current interactive task includes: performing a tool invocation operation based on the input parameters and invocation order of each tool in the first tool invocation list to obtain a tool invocation result; inputting the current interactive task and the tool invocation result into the large language model, and obtaining a response result for the current interactive task through the large language model.
[0014] In one embodiment, the human-computer interaction method further includes: acquiring user preference information, behavioral information, social information, and device information to generate a personalized database; adjusting the priority of the tool call list based on the personalized database and a preset tool call strategy; and adjusting the language style and level of detail of the response result based on the personalized database when the large language model generates the response result based on the current interaction task and the tool call list corresponding to the current interaction task.
[0015] In one embodiment, after obtaining the response result to the current interactive task, the method further includes: receiving user feedback information, the feedback information including satisfaction with the task result, tool selection feedback, and task execution efficiency score; dynamically updating the personalized database based on the task result satisfaction in the user feedback information; evaluating the first tool call list based on the tool selection feedback and the task execution efficiency score in the user feedback information, and adjusting the calling strategy of the large language model based on the evaluation result.
[0016] In one embodiment, dynamically updating the personalized database based on the task result satisfaction in the user's feedback information includes: updating the user information in the personalized database when the task result satisfaction is lower than a preset satisfaction level, and calculating the matching degree between the tool call list and the user information; the user information includes user needs and user personalized data; and updating the function description and tool call strategy of the tool call list according to the calculation result of the matching degree.
[0017] In one embodiment, before receiving the current interaction task input by the user and obtaining the user's historical interaction information, the method further includes: performing security verification on each tool used to perform the interaction task; the security verification includes: encrypting and verifying the identity credentials of the registration request corresponding to each tool; verifying the integrity of the signature corresponding to each tool; and verifying the trusted environment of the request source corresponding to each tool.
[0018] Secondly, this application also provides a human-computer interaction device, comprising:
[0019] The information receiving module is used to receive the current interaction task input by the user and obtain the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0020] The similarity detection module is used to detect the similarity between the current interaction task and the user's various historical interaction tasks;
[0021] The similarity detection module is also used to obtain the target tool call list of the target historical interaction task if a target historical interaction task with a similarity greater than or equal to a preset threshold is detected.
[0022] The information input module is used to input the current interaction task, the target tool call list and the user information into the large language model to obtain the first tool call list for executing the current interaction task;
[0023] The result acquisition module is used to perform tool call operations based on the input parameters and call order of each tool in the first tool call list, and obtain the response result for the current interactive task.
[0024] Thirdly, this application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0025] The system receives the current interaction task input by the user and obtains the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0026] Detect the similarity between the current interaction task and each of the user's historical interaction tasks;
[0027] If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, then the target tool call list of the target historical interaction task is obtained.
[0028] Input the current interaction task, the target tool call list, and the user information into the large language model to obtain the first tool call list for executing the current interaction task;
[0029] Based on the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interactive task.
[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0031] The system receives the current interaction task input by the user and obtains the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0032] Detect the similarity between the current interaction task and each of the user's historical interaction tasks;
[0033] If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, then the target tool call list of the target historical interaction task is obtained.
[0034] Input the current interaction task, the target tool call list, and the user information into the large language model to obtain the first tool call list for executing the current interaction task;
[0035] Based on the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interactive task.
[0036] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, performs the following steps:
[0037] The system receives the current interaction task input by the user and obtains the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0038] Detect the similarity between the current interaction task and each of the user's historical interaction tasks;
[0039] If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, then the target tool call list of the target historical interaction task is obtained.
[0040] Input the current interaction task, the target tool call list, and the user information into the large language model to obtain the first tool call list for executing the current interaction task;
[0041] Based on the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interactive task.
[0042] The aforementioned human-computer interaction method, device, computer equipment, storage medium, and computer program product, during the human-computer interaction process, first receive the current interaction task input by the user and obtain the user's historical interaction information; the historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information; the tool call list includes the calling order, input parameters, and output parameters of each tool used to execute the interaction task; then, the similarity between the current interaction task and each of the user's historical interaction tasks is detected; if a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, the target tool call list of the target historical interaction task is obtained; next, the current interaction task, the target tool call list, and the user information are input into a large language model to obtain a first tool call list for executing the current interaction task; finally, according to the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interaction task. In the above process, by reusing historical interaction information, the system avoids repeatedly inputting instructions or parameters for similar tasks. When encountering a current task similar to a historical task, the system directly retrieves the target tool call list without having to rebuild the execution logic from scratch, significantly shortening task response time and reducing operational costs. Furthermore, the large language model optimizes and generates the first tool call list based on existing historical data, which can both continue the successful experience of historical tasks and adjust according to the characteristics of the current task, reducing execution failures caused by incorrect parameter settings or improper tool call order. In summary, this method can generate targeted content that matches user expectations. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating a human-computer interaction method in one embodiment;
[0045] Figure 2 This is a detailed flowchart of a human-computer interaction method in one embodiment;
[0046] Figure 3 This is a flowchart illustrating a human-computer interaction method in one embodiment where the similarity is less than a preset threshold.
[0047] Figure 4 This is a flowchart illustrating the process of a human-computer interaction method in another embodiment where the similarity is greater than or equal to a preset threshold.
[0048] Figure 5This is a structural block diagram of a human-computer interaction device in one embodiment;
[0049] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In traditional multi-tool automation systems, tool invocation typically requires predefined fixed processes, lacks dynamic awareness of the user's current context, and the system cannot automatically determine whether to invoke specific tools or combinations of tools to perform tasks based on the context. This results in rigid tool invocation, a lack of flexibility in adapting to user intent, complex toolchain orchestration and maintenance, high manual costs, and inconsistent user experience. Furthermore, existing interactive systems lack the ability to remember and process historical user tasks, leading to redundancy in handling repetitive or similar tasks, the inability to reuse already generated tool lists, and the standard MCP (Model Context Protocol) mechanism does not incorporate user preferences, resulting in generated content that lacks targeting and personalization, is difficult to match with user expectations, and lacks appeal for continued use.
[0052] To address the aforementioned technical problems, in one embodiment, such as Figure 1 As shown, a human-computer interaction method is provided. This embodiment illustrates the method applied to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0053] Step S102: Receive the current interaction task input by the user and obtain the user's historical interaction information; the historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information; the tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0054] Among them, the current interaction task is the specific requirement that the user actively inputs and that requires a system response or completion; the historical interaction information is a collection of the user's past interaction data stored by the system, including: the user's historical interaction tasks, the tool call list for the corresponding task, and user information; the tool call list is a list that records all tool-related information required to execute the interaction task, including: tool call order, input parameters, and output parameters.
[0055] For example, the current interactive task may include user-initiated tasks such as "generating a monthly sales report" or "checking flight status".
[0056] Step S104: Detect the similarity between the current interaction task and the user's various historical interaction tasks.
[0057] Among them, detecting the similarity between the current interaction task and the user's various historical interaction tasks is a process of comparing the matching degree between the current interaction task and the historical interaction tasks. The overlap between the current interaction task and the historical interaction tasks can be calculated through text semantic similarity algorithms, task feature matching algorithms, etc.
[0058] Step S106: If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, then the target tool call list of the target historical interaction task is obtained.
[0059] Among them, the preset threshold is a threshold value set by the system in advance to determine whether the current interaction task is similar to the historical interaction task. If the preset threshold is 80%, only historical interaction tasks with a similarity greater than or equal to 80% will be judged as the target historical interaction task; the target historical interaction task is the interaction task detected by similarity detection; the target tool call list is the tool call list corresponding to the target historical interaction task.
[0060] Step S108: Input the current interaction task, the target tool call list, and user information into the large language model to obtain the first tool call list for executing the current interaction task.
[0061] The first tool call list is a tool call list adapted to the current interaction task, generated by the large language model by combining the current interaction task, the target tool call list, and user information. It retains the successful experience of historical interaction tasks and makes personalized adjustments based on the characteristics of the current interaction task and user information.
[0062] Step S110: Based on the input parameters and calling order of each tool in the first tool call list, execute the tool call operation to obtain the response result for the current interactive task.
[0063] The response result is the result that the system returns to the user after the tool call operation is completed, which meets the requirements of the current interactive task. It can be text information, files, or charts.
[0064] In the aforementioned human-computer interaction method, the current interaction task input by the user is first received, and the user's historical interaction information is obtained. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the calling order, input parameters, and output parameters of each tool used to execute the interaction task. Then, the similarity between the current interaction task and each of the user's historical interaction tasks is detected. If a target historical interaction task with a similarity greater than or equal to a preset threshold is detected, the target tool call list for the target historical interaction task is obtained. Next, the current interaction task, the target tool call list, and the user information are input into a large language model to obtain a first tool call list for executing the current interaction task. Finally, according to the input parameters and calling order of each tool in the first tool call list, the tool call operation is executed to obtain the response result for the current interaction task. In the above process, by reusing historical interaction information, the system avoids repeatedly inputting instructions or parameters for similar tasks. When encountering a current task similar to a historical task, the system directly retrieves the target tool call list without having to rebuild the execution logic from scratch, significantly shortening task response time and reducing operational costs. Furthermore, the large language model optimizes and generates the first tool call list based on existing historical data, which can both continue the successful experience of historical tasks and adjust according to the characteristics of the current task, reducing execution failures caused by incorrect parameter settings or improper tool call order. In summary, this method can generate targeted content that matches user expectations.
[0065] In one exemplary embodiment, after detecting the similarity between the current interaction task and the user's various historical interaction tasks, the method further includes:
[0066] If the detected similarity is less than a preset threshold, the current interaction task, the tool list for the current interaction task, and the user information are obtained. The current interaction task, the tool list for the current interaction task, and the user information are input into the large language model to obtain the second tool call list for executing the current interaction task. According to the input parameters and call order of each tool in the second tool call list, the tool call operation is executed to obtain the response result for the current interaction task.
[0067] The tool list for the current interaction task is a set of all tools selected by the system to handle current interaction tasks with similarity less than a preset threshold. It only includes the tools themselves and does not involve execution details such as calling order and input / output parameters. The second tool call list is an execution plan generated by the large language model when there are no similar historical tasks to refer to for the current interaction task. It combines the current interaction task, the tool list for the current interaction task, and user information to execute the current task.
[0068] In this embodiment, when the current task has highly similar historical tasks, the system directly reuses the target tool call list and optimizes it with a large model, without having to repeatedly build the execution logic, which greatly shortens the response time. At the same time, it continues the reliable parameters verified in the past and reduces the operation error rate. When there are no similar historical tasks, the system generates a second tool call list based on the current task tool list and user information, ensuring that the task can still be effectively promoted in the absence of experience reference scenarios, and avoiding the interruption of interaction due to lack of historical data.
[0069] In one embodiment, the human-computer interaction method further includes: obtaining the user's historical interaction information from the database; if the similarity is detected to be less than a preset threshold, storing the current interaction task and the second tool call list in the database.
[0070] The database is a structured storage system used for long-term storage and management of user interaction data. It can provide the system with a stable source for querying historical interaction information, support similarity detection, and receive newly generated interaction data to achieve continuous data accumulation. Retrieving the user's historical interaction information from the database is an operation in which the system actively retrieves the target user's historical interaction data from the database. Storing the current interaction task and the second tool call list into the database is an operation in which the system writes the relevant data of the current interaction task into the database when the current task has no similar history (similarity < preset threshold).
[0071] In this embodiment, by obtaining historical interaction information from the database, a stable data source is provided for similarity detection, ensuring that the system can accurately retrieve the user's historical interaction task experience, laying the foundation for efficient processing of highly similar interaction tasks. Furthermore, if there are no similar historical interaction tasks for the current interaction task, the current interaction task and the second tool call list are stored in the database to form a closed-loop data accumulation, allowing the system to continuously enrich its data reserves as the number of interactions increases, further improving interaction efficiency.
[0072] Furthermore, in one embodiment, according to the input parameters and calling order of each tool in the first tool call list, a tool call operation is performed to obtain a response result for the current interactive task, including: according to the input parameters and calling order of each tool in the first tool call list, a tool call operation is performed to obtain a tool call result; the current interactive task and the tool call result are input into a large language model, and a response result for the current interactive task is obtained through the large language model.
[0073] The response generation process involves inputting the current interaction task and tool call results into a large language model. Through the model's semantic understanding and logical integration capabilities, it generates final feedback content that aligns with the user's cognitive habits. The training of the large language model typically includes multiple stages such as pre-training, instruction fine-tuning, and preference fine-tuning. Through this training, the large language model can generate tool call lists and achieve style and task output. For example, pre-training can learn the basic rules of language through self-supervised learning by collecting text data. Instruction fine-tuning teaches the large model how to provide accurate and useful responses under different instructions. Preference fine-tuning trains the large model to adjust parameters based on staff feedback, making subsequent generated answers more suitable for the needs and preferences of different staff. Inference fine-tuning allows the large model to complete tasks through reasoning and logical analysis, thereby generating tool call lists and answers that better meet task requirements.
[0074] In this embodiment, by executing operations according to the input parameters and calling order of the first tool call list, parameter errors or disordered order during tool calls are avoided, providing a reliable foundation for subsequent response generation. Furthermore, by combining the interactive task with the tool call results into the input big model, a strong correlation between the response results and the user's current interactive task can be ensured, significantly improving the smoothness of the interaction.
[0075] In an exemplary embodiment, the human-computer interaction method further includes: acquiring user preference information, behavioral information, social information, and device information to generate a personalized database; adjusting the priority of the tool call list based on the personalized database and a preset tool call strategy; and adjusting the language style and level of detail of the response result based on the personalized database when the large language model generates a response result based on the current interaction task and the tool call list corresponding to the current interaction task.
[0076] Among them, user preference information is data showing users' tendencies in content presentation during interaction, such as a preference for concise conclusions, conversational expressions, and frequent use of tables to display data; user behavior information is the user's operation trajectory and interaction history data in the system, such as a user repeatedly asking for details of the interaction task or quickly skipping complex explanations; user social information is the attributes or related data displayed by users in social scenarios, such as a user's social tags being a newcomer to the workplace or a senior professional; user device information is data related to the terminal device used by the user, such as if the user is using a mobile phone, the response will be adjusted to short sentences and paragraphs to avoid long blocks of text, and if it is a computer, charts can be added.
[0077] In this embodiment, by constructing a personalized database and linking it with a large model to optimize the response, the interaction results are accurately adapted. By generating a personalized database based on user preference information, behavioral information, social information, and device information, the deviation of adjustments based on general data is avoided. Therefore, the above-mentioned personalized adjustments allow users to directly obtain response results that conform to their own usage habits, greatly improving the comfort and satisfaction of the interaction.
[0078] In one embodiment, after obtaining the response result to the current interactive task, the method further includes:
[0079] Receive user feedback, including satisfaction with task results, feedback on tool selection, and task execution efficiency rating; dynamically update the personalized database based on user feedback regarding task result satisfaction; evaluate the first tool call list based on user feedback regarding tool selection and task execution efficiency rating, and adjust the calling strategy of the large language model based on the evaluation results.
[0080] Among these, user feedback information consists of user evaluation data regarding the system's processing and results after the interaction; task result satisfaction is the user's evaluation of the final response result of the current interactive task; tool selection feedback is the user's evaluation of the appropriateness of the tools used by the system to perform the task; task execution efficiency rating is the user's rating of the time taken and the smoothness of the process in completing the current interactive task; and dynamic updating of the personalized database is an operation that adjusts user preferences, demand tendencies, and other data in the personalized database in real time based on user task result satisfaction feedback. For example, if a user gives low satisfaction because the response is too brief, the system will update the database to reflect the user's preference for higher detail; if the user is dissatisfied because the style is too professional, it will be adjusted to a preference for more colloquial expression; if feedback indicates inappropriate tool selection, the suitability of the tool type needs to be evaluated; and if a low efficiency rating is given, the redundancy of the tool call order and parameter settings needs to be evaluated.
[0081] In this embodiment, by dynamically updating the personalized database based on task result satisfaction, user preferences and demand tendencies are always aligned with the latest feedback, avoiding repeated adaptation deviations. By evaluating the first tool call list through tool selection feedback and efficiency scores, problems such as inappropriate tool selection and cumbersome call order can be accurately identified, reducing invalid calls and improving execution efficiency and accuracy.
[0082] More specifically, in one embodiment, dynamically updating the personalized database based on task result satisfaction in user feedback includes: updating user information in the personalized database when task result satisfaction is lower than a preset satisfaction level, and calculating the matching degree between the tool call list and user information; user information includes user needs and user personalized data; and updating the function description and tool call strategy of the tool call list according to the matching degree calculation result.
[0083] The preset satisfaction level is a threshold value set by the system to determine whether a user is satisfied with the task result. The database update operation will only be initiated when the user's satisfaction with the task result is lower than this threshold. A task result satisfaction level lower than the preset satisfaction level means that the user's acceptance of the final response result of the current interactive task does not meet the qualified standard set by the system, indicating that the user information in the current personalized database can no longer adapt to the user's latest needs. Updating the user information in the personalized database is an operation that corrects or supplements the user preferences, demand tendencies, and other data stored in the personalized database when the user satisfaction level is not up to standard.
[0084] In the above embodiments, targeted updates can enable users to obtain expected response results more quickly in subsequent interactions, and can also enhance the dynamic adaptability of the database, allowing the personalized database to be dynamically adjusted based on user needs.
[0085] In an exemplary embodiment, before receiving the current interaction task input by the user and obtaining the user's historical interaction information, the method further includes: performing security verification on each tool used to perform the interaction task; the security verification includes: encrypting and verifying the identity credentials of the registration request corresponding to each tool; verifying the integrity of the signature corresponding to each tool; and verifying the trusted environment of the request source corresponding to each tool.
[0086] Each tool must be registered before it can be added to the tool list for the first time. Registration includes a security verification process to ensure the legality and trustworthiness of the registered tool. The security verification includes: encrypting and verifying the identity credentials of the registration request; verifying the integrity of the tool signature; verifying the trusted environment of the request source; and generating a unique registration token after successful verification for subsequent calls and access control.
[0087] In the above embodiments, by encrypting and verifying identity credentials, only tools with legitimate identities are allowed to register and use during human-computer interaction, thus preventing the access of unauthorized tools. Signature integrity verification can prevent tools from being tampered with or implanted with malicious programs, ensuring tool security. Trusted environment verification can filter tool requests from dangerous environments at the source, reducing security risks from external environments. After successful verification, a unique registration token is generated, which enables accurate identity recognition for tool calls, supports subsequent access control, and prevents tools from being called illegally.
[0088] This application provides a human-computer interaction method. To better understand the process of the above-described human-computer interaction method, combined with... Figure 2 As shown below, the specific process of the applicant's human-computer interaction method is described in detail, including the following steps:
[0089] In step S202, the memory module stores the user's historical interaction information, the personalization database stores the user's personalized data, and the MCP (Model Context Protocol) client establishes and maintains a connection with the MCP server.
[0090] In step S204, the user proposes the current task, and the memory module performs a similarity detection to determine whether the task is similar to the user's historical tasks. If the task similarity is greater than or equal to a preset threshold, the tool call list of the historical task is reused. If the task similarity is less than the preset threshold, the current task is transmitted to the MCP client.
[0091] In step S206, the MCP client extracts user information related to the current task from the personal database (personalized database), inputs the current task, tool list, and user information into the large language model, and the large language model generates a tool call list and returns it to the MCP client.
[0092] In step S208, the MCP client invokes a tool, the return result of which is input to the large language model, which outputs a response and returns it to the user, who then provides feedback.
[0093] Historical interaction information includes historical tasks, tool call lists, and user information; personalized data includes user preference information, behavioral information, social information, and device information; the MCP client synchronizes the tool list through the MCP server, which encapsulates external APIs (Application Programming Interfaces). The interface (Application Programming Interface) or data source provides a standardized interface; the input format of the current task includes text and speech. If the input format is speech, speech recognition technology is used to convert speech into text; similarity detection converts the current task and historical tasks into embedding vectors and calculates the cosine similarity between the current task embedding vector and the historical task embedding vector; tools include a series of functional modules capable of information retrieval, data processing, recommendation generation, and other tasks. The large language model selects and calls functional modules according to the user's task; the tool call list includes the order of tool calls, the input parameters of the tool calls, and the output parameters of the tool calls; tool calls are executed by the MCP client through the MCP server, and the MCP server interacts directly with the tools; the large language model generates response content based on the current task and tool call results, and adjusts the language style and the level of detail of the task output based on the personal database; user feedback includes user satisfaction with the task results, feedback on tool selection, and satisfaction with task execution efficiency; the personal database is dynamically updated based on the user feedback on task result satisfaction, continuously optimizing the language style and level of detail of the task output of the interactive system; the tool call list selection is evaluated based on the user feedback on tool selection and satisfaction with task execution efficiency, and the feedback is used as a reward signal to adjust the calling strategy of the large language model.
[0094] More specifically, in one exemplary embodiment, such as Figure 3The diagram illustrates a process in human-computer interaction where the similarity score is less than a preset threshold. The user proposes the current task: "Book a flight to location A tomorrow." The memory module stores the similarity between the current task and past tasks calculated using cosine similarity. If the similarity is less than a threshold, the current task is transmitted to the MCP client. The MCP client extracts user information related to the current task from the personal database, including preferred airlines and flight times. The MCP client inputs the current task, tool list, and user information into the large language model. The large language model generates a tool call list and returns it to the MCP client. The tool list includes functional modules such as location, payment, weather query, and flight booking. The large language model returns the tool call list to the MCP client, including the order of tool calls, input parameters, and output parameters. The MCP client stores the current task and tool call list in the memory module and inputs the IP address (Internet Protocol Address) to query the current city from the location MCP server. The location MCP server returns the current city to the MCP client. The MCP client inputs the current city, target city, preferred airline, and flight time to book a flight from the flight booking MCP server. The flight booking MCP server returns the flight information to the MCP client. The MCP client inputs the current task and tool call results into the large language model. The large language model optimizes the language style and the level of detail in the task output and returns the final response to the MCP client, which then forwards it to the user.
[0095] Furthermore, in an exemplary embodiment, such as Figure 4 The diagram illustrates the process of achieving a similarity score greater than or equal to a preset threshold in human-computer interaction methods. The user proposes the current task: "Book a flight to location B tomorrow." The memory module stores the similarity between the current task and historical tasks calculated using cosine similarity. If the similarity score is greater than the threshold, the tool call lists for the current and historical tasks, along with the user information, are transmitted to the MCP client. The MCP client then sends the current task, tool call list, and user information to the large language model. The large language model extracts the input parameters for the tool call list based on the current task and returns them to the MCP client. The MCP client inputs its IP address to query the current city from the location MCP server. The location MCP server returns the current city to the MCP client. The MCP client inputs the current city, target city, preferred airline, and flight time to book a flight from the flight booking MCP server. The flight booking MCP server returns the flight information to the MCP client. The MCP client inputs the current task and tool call results to the large language model. The large language model optimizes the language style and the level of detail in the task output, returning the final response to the MCP client, which then forwards it to the user.
[0096] Through the above embodiments, a memory module is added to the MCP interaction system to store the user's historical interaction information, including historical tasks, tool call lists, and user information. The memory module can also automatically load and reuse information from historical tasks in new tasks, improving the response speed of the current task. In addition, a personalized database is added to the MCP interaction system to store the user's personalized data, including user preference information, behavioral information, social information, and device information. The personalized database can also provide tailored user services, improving the relevance and effectiveness of recommendation data.
[0097] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0098] Based on the same inventive concept, this application also provides a human-computer interaction device for implementing the aforementioned human-computer interaction method. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more human-computer interaction device embodiments provided below can be found in the limitations of the human-computer interaction method described above, and will not be repeated here.
[0099] In one exemplary embodiment, such as Figure 5 As shown, a human-computer interaction device is provided, including: an information receiving module 501, a similarity detection module 502, an information input module 503, and a result acquisition module 504, wherein:
[0100] The information receiving module 501 is used to receive the current interaction task input by the user and obtain the user's historical interaction information. The historical interaction information includes multiple historical interaction tasks of the user, a tool call list for each historical interaction task, and user information. The tool call list includes the call order, input parameters, and output parameters of each tool used to execute the interaction task.
[0101] The similarity detection module 502 is used to detect the similarity between the current interaction task and the user's various historical interaction tasks;
[0102] The similarity detection module 502 is also used to obtain the target tool call list of the target historical interaction task if a target historical interaction task with a similarity greater than or equal to a preset threshold is detected.
[0103] The information input module 503 is used to input the current interactive task, the target tool call list and user information into the large language model to obtain the first tool call list for executing the current interactive task.
[0104] The result acquisition module 504 is used to execute tool call operations based on the input parameters and call order of each tool in the first tool call list, and obtain the response result for the current interactive task.
[0105] Furthermore, in one embodiment, the similarity detection module 502 is also used to, if the detected similarity is less than a preset threshold, obtain the current interaction task, the tool list of the current interaction task, and user information; input the current interaction task, the tool list of the current interaction task, and user information into the large language model to obtain a second tool call list for executing the current interaction task; and execute the tool call operation according to the input parameters and call order of each tool in the second tool call list to obtain the response result for the current interaction task.
[0106] Furthermore, in one embodiment, the similarity detection module 502 is also used to obtain the user's historical interaction information from the database; if the detected similarity is less than a preset threshold, the current interaction task and the second tool call list are stored in the database.
[0107] Furthermore, in one embodiment, the result acquisition module 504 is also used to perform a tool call operation according to the input parameters and call order of each tool in the first tool call list, and obtain the tool call result; input the current interaction task and the tool call result into the large language model, and obtain the response result for the current interaction task through the large language model.
[0108] Furthermore, in one embodiment, the result acquisition module 504 is also used to acquire user preference information, behavior information, social information and device information to generate a personalized database; based on the personalized database and the preset tool call strategy, the priority of the tool call list is adjusted; when the large language model generates response results based on the current interaction task and the tool call list corresponding to the current interaction task, the language style and level of detail of the response results are adjusted based on the personalized database.
[0109] Furthermore, in one embodiment, the information receiving module 501 is also used to receive user feedback information, including satisfaction with task results, tool selection feedback, and task execution efficiency score; dynamically update the personalized database based on the user's task result satisfaction information; evaluate the first tool call list based on the user's tool selection feedback and task execution efficiency score, and adjust the calling strategy of the large language model based on the evaluation results.
[0110] Furthermore, in one embodiment, the information receiving module 501 is also used to update the user information in the personalized database and calculate the matching degree between the tool call list and the user information when the task result satisfaction is lower than the preset satisfaction. The user information includes user needs and user personalized data. Based on the calculation result of the matching degree, the functional description and tool call strategy of the tool call list are updated.
[0111] Furthermore, in one embodiment, the information receiving module 501 is also used to perform security verification on each tool used to perform the interactive task; the security verification includes: encrypting and verifying the identity credentials of the registration request corresponding to each tool; verifying the integrity of the signature corresponding to each tool; and verifying the trusted environment of the request source corresponding to each tool.
[0112] Each module in the aforementioned human-computer interaction device 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 a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0113] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores human-computer interaction data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a human-computer interaction method.
[0114] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0115] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0116] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0117] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0118] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0119] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0121] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A human-machine interaction method, characterized in that, The method comprises: receiving a current interaction task input by a user, and obtaining historical interaction information of the user; the historical interaction information comprises a plurality of historical interaction tasks of the user, a tool calling list of each historical interaction task, and user information; the tool calling list comprises a calling sequence, input parameters, and output parameters of each tool used for executing an interaction task; detecting similarity between the current interaction task and each historical interaction task of the user; if a target historical interaction task with similarity greater than or equal to a preset threshold is detected, obtaining a target tool calling list of the target historical interaction task; inputting the current interaction task, the target tool calling list, and the user information into a large language model to obtain a first tool calling list for executing the current interaction task; performing a tool calling operation according to the input parameters and the calling sequence of each tool in the first tool calling list to obtain a response result for the current interaction task.
2. The method of claim 1, wherein, After the detection of the similarity between the current interaction task and each historical interaction task of the user, the method further comprises: if the similarity is less than the preset threshold, obtaining the current interaction task, a tool list of the current interaction task, and user information; inputting the current interaction task, the tool list of the current interaction task, and the user information into the large language model to obtain a second tool calling list for executing the current interaction task; performing a tool calling operation according to the input parameters and the calling sequence of each tool in the second tool calling list to obtain a response result for the current interaction task.
3. The method of claim 2, wherein, The method further comprises: obtaining historical interaction information of the user from a database; if the similarity is less than the preset threshold, storing the current interaction task and the second tool calling list to the database.
4. The method of claim 1, wherein, The performing of the tool calling operation according to the input parameters and the calling sequence of each tool in the first tool calling list to obtain the response result for the current interaction task comprises: performing a tool calling operation according to the input parameters and the calling sequence of each tool in the first tool calling list to obtain a tool calling result; inputting the current interaction task and the tool calling result into the large language model to obtain the response result for the current interaction task through the large language model.
5. The method of claim 4, wherein, The method further comprises: obtaining preference information, behavior information, social information, and device information of the user to generate a personalized database; based on the personalized database and a preset tool calling strategy, adjusting the priority of the tool calling list, and based on the personalized database, adjusting the language style and the detail level of the response result when the large language model generates the response result based on the current interaction task and the tool calling list corresponding to the current interaction task.
6. The method of claim 1, wherein, After the obtaining of the response result for the current interaction task, the method further comprises: receiving feedback information of the user, the feedback information comprising a task result satisfaction degree, tool selection feedback, and a task execution efficiency score; dynamically updating the personalized database based on the task result satisfaction degree in the feedback information of the user. The first tool calling list is evaluated based on the tool selection feedback and the task execution efficiency score in the feedback information of the user, and the calling strategy of the large language model is adjusted based on the evaluation result.
7. The method of claim 6, wherein, The task result satisfaction degree in the feedback information of the user is used to dynamically update a personalized database. In the case that the task result satisfaction degree is lower than a preset satisfaction degree, the user information in the personalized database is updated, and the matching degree of the tool calling list and the user information is calculated; the user information includes user demand and user personalized data; According to the calculation result of the matching degree, the function description and tool calling strategy of the tool calling list are updated.
8. The method of claim 1, wherein, Before receiving the current interactive task input by the user and obtaining the historical interactive information of the user, the method further includes: The security check includes: encrypting and verifying the identity credentials of the registration request corresponding to each tool; performing integrity check on the signature corresponding to each tool; and performing trusted environment verification on the request source corresponding to each tool.
9. A human-machine interaction device, characterized in that, The apparatus includes: An information receiving module is configured to receive a current interactive task input by a user and obtain historical interactive information of the user; the historical interactive information includes a plurality of historical interactive tasks of the user, a tool calling list of each historical interactive task, and user information; the tool calling list includes a calling sequence, input parameters, and output parameters of each tool used to execute an interactive task; A similarity detection module is configured to detect the similarity between the current interactive task and each historical interactive task of the user. The similarity detection module is further configured to obtain a target tool calling list of a target historical interactive task if the detected similarity is greater than or equal to a preset threshold. An information input module is configured to input the current interactive task, the target tool calling list, and the user information into a large language model to obtain a first tool calling list for executing the current interactive task. A result obtaining module is configured to perform tool calling operations according to the input parameters and calling sequence of each tool in the first tool calling list to obtain a response result for the current interactive task. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8.