CN-121997306-A - Request processing method, task processing method, device and equipment
Abstract
The embodiment of the specification provides a request processing method, a task processing method, a device and equipment. The method comprises the steps of receiving a service call request of an intelligent agent, determining a target operating system user identifier associated with a target Model Context Protocol (MCP) service corresponding to the service call request according to a preconfigured mapping relation, providing an MCP service process running with the target operating system user identifier, and executing processing operation corresponding to the service call request by the MCP service process according to resource access rights defined by the target operating system user identifier.
Inventors
- LI QIANG
Assignees
- 支付宝(杭州)数字服务技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260127
Claims (13)
- 1. A request processing method, comprising: Receiving a service call request of an intelligent agent; determining a target operating system user identifier associated with a target Model Context Protocol (MCP) service corresponding to the service call request according to the preconfigured mapping relation information; providing an MCP service process running with the target operating system user identifier; and executing the processing operation corresponding to the service call request by the MCP service process according to the resource access authority defined by the target operating system user identifier.
- 2. The method according to claim 1, wherein the providing the MCP service process running with the target operating system user identification specifically includes: multiplexing the MCP service resident process running by the user identification of the operating system if the MCP service resident process exists; Otherwise, creating the MCP service process running with the target operating system user identification.
- 3. The method of claim 1, further comprising, prior to receiving a service invocation request of an agent: Starting a proxy service process of the agent based on the root user identification; and loading mapping relation information between each MCP service and each corresponding operating system user identifier by the proxy service process according to the configuration file.
- 4. The method of claim 3, further comprising, prior to the initiating the agent's proxy service process: acquiring an agent image in which resources required by the agent operation are packaged; Creating a container instance based on the agent image; the proxy service process of the starting agent specifically comprises the following steps: the proxy service process is started in the container instance.
- 5. The method according to claim 3, before loading the mapping relationship information between each MCP service and each corresponding operating system user identifier according to the configuration file, further comprising: creating a corresponding operating system user identifier for each MCP service; Configuring resource access rights of user identifiers of the operating systems; And storing the corresponding relation between the MCP service identifier of the MCP service, the operating system user identifier and the resource access authority into the configuration file.
- 6. The method of claim 1, wherein the service call request carries a target task, and the executing the processing operation corresponding to the service call request specifically comprises: Accessing, by the MCP service process, a target resource within a resource access permission range identified by the target operating system user; and processing the target task based on the target resource.
- 7. The method of claim 1, the method further comprising: and returning the processing result of the processing operation to the agent.
- 8. A task processing method, comprising: Acquiring task information input by a user; analyzing the task information by using a large model to generate a service call request aiming at a Model Context Protocol (MCP) service; Sending the service call request to a proxy service process; receiving a processing result returned by the proxy service process, wherein the processing result is obtained by the proxy service process executing the request processing method according to any one of claims 1-7.
- 9. The method according to claim 8, wherein the analyzing the task information with the large model generates a service call request for a model context protocol MCP service, specifically comprising: Acquiring function description information of a plurality of MCP services; Inputting the task information and the function description information into the large model to obtain at least one subtask determined by the large model aiming at the task information and a target MCP service corresponding to each subtask; and generating the service call request based on the subtask and the target MCP service.
- 10. The method of claim 9, the subtasks comprising a first subtask and a second subtask, the execution of the second subtask being dependent on the execution result of the first subtask, the target MCP service comprising a first target MCP service corresponding to the first subtask and a second target MCP service corresponding to the second subtask, the method further comprising: generating a first service invocation request based on the first subtask and the first target MCP service; Sending the first service call request to the proxy service process; Receiving a first subtask processing result returned by the proxy service process for the first service call request; generating the second service call request based on the first subtask processing result, the second subtask and the second target MCP service; Sending the second service call request to the proxy service process; and receiving a second subtask processing result returned by the proxy service process for the second service call request.
- 11. A request processing apparatus comprising: the request receiving module is used for receiving a service call request of the intelligent body; the user identification determining module is used for determining a target operating system user identification associated with the target Model Context Protocol (MCP) service corresponding to the service calling request according to the preconfigured mapping relation information; the process providing module is used for providing an MCP service process running by the target operating system user identifier; And the request execution module is used for executing the processing operation corresponding to the service call request by the MCP service process according to the resource access authority defined by the target operating system user identifier.
- 12. A task processing device comprising: The task acquisition module is used for acquiring task information input by a user; The request generation module is used for analyzing the task information by utilizing a large model and generating a service call request aiming at the Model Context Protocol (MCP) service; the request sending module is used for sending the service calling request to the proxy service process; The result receiving module is configured to receive the processing result returned by the proxy service process, where the processing result is obtained by the proxy service process executing the request processing method according to any one of claims 1 to 7.
- 13. A computing device, comprising: A memory and a processor; the memory is adapted to store a computer program/instruction, the processor being adapted to execute the computer program/instruction, which when executed by the processor, implements the steps of the method according to any one of claims 1 to 10.
Description
Request processing method, task processing method, device and equipment Technical Field One or more embodiments of the present disclosure relate to the field of computer technology, and in particular, to a request processing method and a task processing method. One or more embodiments of the present specification relate to a request processing apparatus and a task processing apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Along with the rapid development of artificial intelligence, intelligent bodies with autonomous decision making and task execution capabilities are widely applied to various fields such as finance, medical treatment, industrial control and the like. The intelligent agent can call external resources or services to realize various complex business logic. However, in the process of processing complex business logic by the AI agent, data security risks may be caused due to excessively high authority of the invoked service. Therefore, how to provide a request processing method with higher security is a technical problem to be solved. Disclosure of Invention In view of this, one or more embodiments of the present disclosure provide a request processing method and task processing method, apparatus, device, and computer readable medium, to solve the problem of low data security existing in the existing request processing method. According to a first aspect of one or more embodiments of the present specification, there is provided a request processing method, including: Receiving a service call request of an intelligent agent; determining a target operating system user identifier associated with a target Model Context Protocol (MCP) service corresponding to the service call request according to the preconfigured mapping relation information; providing an MCP service process running with the target operating system user identifier; and executing the processing operation corresponding to the service call request by the MCP service process according to the resource access authority defined by the target operating system user identifier. According to a second aspect of one or more embodiments of the present specification, there is provided a task processing method, comprising: Acquiring task information input by a user; analyzing the task information by using a large model to generate a service call request aiming at a Model Context Protocol (MCP) service; Sending the service call request to a proxy service process; And receiving the processing result returned by the proxy service process, wherein the processing result is obtained by the proxy service process executing request processing method. According to a third aspect of one or more embodiments of the present specification, there is provided a request processing apparatus comprising: the request receiving module is used for receiving a service call request of the intelligent body; the user identification determining module is used for determining a target operating system user identification associated with the target Model Context Protocol (MCP) service corresponding to the service calling request according to the preconfigured mapping relation information; the process providing module is used for providing an MCP service process running by the target operating system user identifier; And the request execution module is used for executing the processing operation corresponding to the service call request by the MCP service process according to the resource access authority defined by the target operating system user identifier. According to a fourth aspect of one or more embodiments of the present specification, there is provided a task processing device comprising: The task acquisition module is used for acquiring task information input by a user; The request generation module is used for analyzing the task information by utilizing a large model and generating a service call request aiming at the Model Context Protocol (MCP) service; the request sending module is used for sending the service calling request to the proxy service process; And the result receiving module is used for receiving the processing result returned by the proxy service process, wherein the processing result is obtained by the proxy service process executing request processing method. According to a fifth aspect of one or more embodiments of the present description, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the request processing method or the task processing method when executing the computer instructions. According to a sixth aspect of one or more embodiments of the present description, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the request processing method or the tas