Data processing method and device, computer equipment, storage medium and computer program product

By working collaboratively between the terminal and the server, the query task is broken down into subtasks. Leveraging the advantages of large models and local tools, the problem of low accuracy of large language models on the client side is solved, achieving efficient processing of complex tasks and data security protection.

CN121597404APending Publication Date: 2026-03-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511685341.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Large language models are not very accurate when deployed on the client side, and the server cannot operate the client to complete the task. Existing technologies cannot effectively utilize the advantages of large models and local tools, resulting in limited task capabilities.

Method used

By working collaboratively between the terminal and the server, leveraging the server's large model and the advantages of local tools, query tasks are broken down into subtasks, and each subtask is processed separately. By combining local and cloud tools, a comprehensive solution to the task is achieved.

Benefits of technology

It has improved the boundaries of task processing capabilities, protected terminal data security, and made full use of the advantages of servers and local tools to achieve efficient solutions for complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597404A_ABST
    Figure CN121597404A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring a query request sent by a terminal; wherein the query request comprises a query task and tool information corresponding to at least one local tool installed on the terminal; based on the tool information corresponding to the local tool, performing task planning on the query task to obtain at least one subtask; under the condition that the task tool information of the subtask corresponds to a local tool, sending a calling request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask; and based on the processing result corresponding to the at least one subtask, determining reply content for replying the query task. The task processing capability of the large model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] Large Language Models (LLMs) are AI models capable of large-scale natural language understanding and generation. While LLMs can be deployed on both clients and servers, client-side computing power often limits their deployment to smaller models with lower accuracy. Servers can deploy even larger models, but they cannot directly control clients to perform certain tasks. In related technologies, the task capabilities of large models are limited. Summary of the Invention

[0003] Therefore, it is necessary to provide a task processing method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the capabilities of the model in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a data processing method. The method includes:

[0005] Obtain a query request sent by the terminal; wherein the query request includes a query task and tool information corresponding to at least one local tool installed on the terminal;

[0006] The query task is planned to obtain at least one subtask; wherein the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool;

[0007] For each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, a call request corresponding to the local tool represented by the task tool information of the subtask is sent to the terminal based on the task tool information corresponding to the subtask.

[0008] Based on the call result corresponding to the call request returned by the terminal, the processing result of the subtask is determined;

[0009] Based on the processing results corresponding to the at least one subtask, the response content for replying to the query task is determined.

[0010] Secondly, this application provides a data processing method. Applied to a terminal, the method includes:

[0011] Obtain a query task, query the local tools installed on the terminal, and obtain tool information corresponding to at least one local tool;

[0012] Based on the query task and the tool information corresponding to the at least one local tool, the query request is determined;

[0013] The query request is sent to the server to instruct the server to perform task planning for the query task, resulting in at least one subtask. For each subtask carrying corresponding task tool information, if the tool information of the subtask corresponds to a local tool, a call request corresponding to the local tool represented by the task tool information of the subtask is returned based on the task tool information corresponding to the subtask. The at least one subtask carries corresponding task tool information, which is at least one of the tool information corresponding to the at least one local tool.

[0014] Upon receiving the call request, the system invokes the local tool represented by the task tool information of the subtask, obtains the call result, and sends the call result to the server to instruct the server to determine the processing result of the subtask based on the call result. Based on the processing results corresponding to the at least one subtask, the system returns the response content of the query task.

[0015] The response content is displayed.

[0016] Thirdly, this application also provides a data processing apparatus. The apparatus includes:

[0017] The first acquisition module is used to acquire a query request sent by the terminal; wherein the query request includes a query task and tool information corresponding to at least one local tool installed on the terminal;

[0018] The task planning module is used to perform task planning on the query task to obtain at least one subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool;

[0019] The invocation module is used to send an invocation request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask, when the task tool information of the subtask corresponds to a local tool.

[0020] The first determining module is used to determine the processing result of the subtask based on the call result corresponding to the call request returned by the terminal;

[0021] The second determining module is used to determine the response content for replying to the query task based on the processing results corresponding to the at least one subtask.

[0022] In one embodiment, the task planning module is further configured to:

[0023] The query task is decomposed to obtain at least one task objective;

[0024] For the task objective, at least based on the tool information corresponding to the local tool, a target tool whose functional scope meets the task objective is determined;

[0025] Each subtask is determined based on the task objective and the tool identifier of the target tool corresponding to the task objective.

[0026] In one embodiment, the task planning module is further configured to:

[0027] If the target tool is a standard protocol tool, the input parameters of the target tool are queried from the tool information corresponding to the at least one local tool;

[0028] Based on the task objective corresponding to the target tool, determine the parameter content of the input parameters of the target tool;

[0029] Based on the task objective, the identification information of the target tool, the input parameters of the target tool, and the corresponding parameter content, the sub-task corresponding to the task objective is determined.

[0030] In one embodiment, the task planning module is further configured to:

[0031] Obtain the identification information of the agent invoked by the target tool;

[0032] Each subtask is determined based on the task objective, the tool identifier of the target tool corresponding to the task objective, and the identifier information of the intelligent agent invoked by the target tool.

[0033] In one embodiment, the task planning module is further configured to:

[0034] For subtasks that do not carry corresponding task tool information, if the subtasks meet preset conditions, the subtasks that meet the preset conditions are decomposed to obtain at least one secondary subtask; wherein, the at least one secondary subtask carries corresponding subtask tool information; the subtask tool information is at least one of the tool information corresponding to the at least one local tool;

[0035] In one embodiment, the task planning module is further configured to:

[0036] For each secondary subtask carrying corresponding subtask tool information, if the subtask tool information of the secondary subtask corresponds to a local tool, a call request corresponding to the local tool represented by the subtask tool information of the secondary subtask is sent to the terminal based on the subtask tool information corresponding to the secondary subtask.

[0037] Based on the invocation result of the invocation request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the second-level subtask is determined.

[0038] Based on the processing results of the at least one secondary subtask, the processing results of the subtask that meets the preset conditions are determined.

[0039] In one embodiment, the calling module is further configured to:

[0040] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a local tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the terminal call request corresponding to the subtask.

[0041] Send the terminal call request to the terminal.

[0042] In one embodiment, the calling module is further configured to:

[0043] Obtain the account identification information of the terminal and determine the long-connection communication interface corresponding to the account identification information;

[0044] Based on the long-connection communication interface, the terminal call request is pushed to the terminal.

[0045] In one embodiment, the calling module is further configured to:

[0046] Send the terminal call request to the terminal;

[0047] If no confirmation response is received from the terminal within a preset time period, the terminal call request is resent to the terminal.

[0048] In one embodiment, the calling module is further configured to:

[0049] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a cloud tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the cloud call request corresponding to the subtask.

[0050] Send the cloud call request to the server where the cloud tool represented by the task tool information of the subtask is located.

[0051] In one embodiment, the calling module is further configured to:

[0052] The task tool information corresponding to the subtask and the task objective of the subtask are input into the intelligent agent that executes the standard protocol tool call;

[0053] The agent invoked through the execution standard protocol tool sends a request to the terminal to invoke the local tool represented by the task tool information of the subtask.

[0054] In one embodiment, the first determining module is further configured to:

[0055] If the call result corresponding to the call request returned by the terminal is a call failure, the tool for executing the subtask is updated to a backup tool;

[0056] Based on the processing result of the backup tool, the processing result of the subtask is determined.

[0057] In one embodiment, the first determining module is further configured to:

[0058] If the backup tool fails to be invoked, the query task is re-planned to obtain at least one updated sub-task.

[0059] The step of determining the response content for the query task based on the processing results corresponding to the at least one subtask includes:

[0060] Based on the processing results corresponding to the at least one updated subtask, the response content for replying to the query task is determined.

[0061] Fourthly, this application also provides a data processing apparatus, the apparatus comprising:

[0062] The second acquisition module is used to acquire query tasks, query local tools installed on the terminal, and obtain tool information corresponding to at least one local tool.

[0063] The third determining module is used to determine the query request based on the query task and the tool information corresponding to the at least one local tool;

[0064] The sending module is configured to send the query request to the server to instruct the server to perform task planning for the query task and obtain at least one subtask; for each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, the module returns a call request corresponding to the local tool represented by the task tool information of the subtask based on the task tool information corresponding to the subtask; wherein, the at least one subtask carries corresponding task tool information.

[0065] The receiving module is configured to receive the call request, call the local tool represented by the task tool information of the subtask, obtain the call result, send the call result to the server to instruct the server to determine the processing result of the subtask based on the call result, and return the response content of the query task based on the processing results corresponding to the at least one subtask.

[0066] The display module is used to display the response content.

[0067] In one embodiment, the apparatus further includes a configuration module, the configuration module being configured to:

[0068] Display the target page, on which configuration controls for the local tools are displayed;

[0069] In response to a triggered event on the configuration control, display a list of local tools;

[0070] In response to a selection event for a target local tool from the list of local tools, the target local tool is installed onto the terminal.

[0071] In one embodiment, the configuration module is further configured to:

[0072] In response to a share event for a target local tool from the list of local tools, the link information of the target local tool is sent to other terminal accounts.

[0073] In one embodiment, the configuration module is further configured to:

[0074] Display the target page, on which a new control for local tools is displayed;

[0075] In response to the trigger event for the newly created control, display the local tool creation page;

[0076] The local tool import page receives the input of the link information of the local tool, and downloads the local tool from the third-party platform based on the link information to obtain the newly created local tool.

[0077] In one embodiment, the configuration module is further configured to:

[0078] Parse the invocation request to obtain the invocation instructions of the local tool represented by the tool information of the subtask; wherein, the invocation instructions include processing files in the target region of the terminal;

[0079] Based on the invocation instruction, the files in the target area of ​​the terminal are processed to obtain the processing result, and the processing result is sent to the server.

[0080] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement an embodiment of the method described in any of the embodiments of this disclosure.

[0081] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements an embodiment of the method described in any of the embodiments of this disclosure.

[0082] In a seventh aspect, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements an embodiment of the method described in any of the embodiments of this disclosure.

[0083] The aforementioned data processing methods, apparatus, computer equipment, storage media, and computer program products, in response to query requests sent by terminals, perform task planning on the query task through a server to obtain at least one subtask, breaking down complex query tasks into subtasks and solving each subtask one by one. Optionally, if the subtasks are relatively complex, they can be further broken down. This application configures corresponding task tool information for each subtask. In addition to cloud tools that can be invoked, different terminals can correspond to different local tools. In this process, the advantages of deploying large-scale models on servers and the advantages of local tools accessing the terminal environment are fully utilized. The combination of local and cloud tools greatly expands the boundaries of task solving capabilities. Furthermore, by sending an invocation request to the terminal corresponding to the local tool represented by the task tool information of the subtask; and based on the invocation result corresponding to the invocation request returned by the terminal, the processing result of the subtask is determined. In this way, it is not necessary to access the terminal user's data, but only to obtain the invocation result, which can protect the security of terminal data. Attached Figure Description

[0084] Figure 1 This is a diagram illustrating the application environment of a data processing method in one embodiment.

[0085] Figure 2 This is a flowchart illustrating a data processing method in one embodiment;

[0086] Figure 3 This is a schematic diagram of the local tool configuration interface in one embodiment;

[0087] Figure 4 This is a schematic diagram of subtask planning in one embodiment;

[0088] Figure 5 This is a flowchart illustrating the data processing method in another embodiment;

[0089] Figure 6 This is a schematic diagram of the query task input interface in one embodiment;

[0090] Figure 7 A schematic diagram of the local tool configuration interface in another embodiment;

[0091] Figure 8 A schematic diagram of the local tool configuration interface in another embodiment;

[0092] Figure 9 This is a flowchart illustrating the data processing method in another embodiment;

[0093] Figure 10 This is a communication architecture diagram of the data processing method in another embodiment;

[0094] Figure 11 This is a structural block diagram of a data processing device in one embodiment;

[0095] Figure 12 This is a structural block diagram of a data processing device in one embodiment;

[0096] Figure 13 This is an internal structural diagram of a computer device in one embodiment;

[0097] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0098] 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.

[0099] To facilitate understanding of the technical solutions provided by the embodiments of this disclosure by those skilled in the art, the technical environment for implementing the technical solutions will be described below.

[0100] In the application of large language models, related technologies provide some dedicated tools to extend the capabilities of large models, such as drawing tools and PPT writing tools. However, these tools are independent of each other, lack collaboration, and cannot work together to complete more complex tasks. These tools also cannot perform operations specific to the terminal environment. Other related technologies simulate virtual terminals, using tools to operate the virtual machine's browser to obtain data. However, virtual machines differ from a user's real computer and may have the following problems: a) They cannot access files on the user's computer, such as counting the number of files or images on the desktop. b) They cannot access the user's browser's account data; for example, some applications and websites require login, and the virtual machine's browser is not logged in. Still other related technologies implement specific functions through coding, but this has low scalability and success rate.

[0101] Based on practical technical needs similar to those described above, this application provides a task processing method, apparatus, computer device, storage medium, and computer program product.

[0102] The task processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other server. Terminal 102 receives query content and, exemplarily, sends the query content to server 104. Server 104, based on the tool information corresponding to the local tool, performs task planning for the query task, obtaining at least one subtask; wherein each subtask carries corresponding tool information. For each subtask, if the tool information of the subtask corresponds to a local tool, based on the tool information corresponding to the subtask, a call request corresponding to the local tool represented by the tool information of the subtask is sent to the terminal. Based on the call result corresponding to the call request returned by the terminal, the processing result of the subtask is determined. Based on the processing results corresponding to the at least one subtask, a response to the query task is determined. Server 104 sends the response content to terminal 102. The response content is displayed on terminal 102. The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0103] In one embodiment, such as Figure 2 As shown, a task processing method is provided, which is applied to Figure 1 Taking the server in the example, the following steps are included:

[0104] Step S201: Obtain the query request sent by the terminal.

[0105] The query request includes a query task and tool information corresponding to at least one local tool installed on the terminal.

[0106] The query task can be obtained by structuring the query content through a terminal or server, transforming colloquial query content into an easily understandable query task. In an exemplary embodiment, for example, the query content is: "I like hiking and mountain climbing, and now I want to go out and live in the mountains. I need to buy a tent. Do you have any purchasing suggestions?" The corresponding query task could be: "I like hiking and mountain climbing, and I plan to camp in the mountains. Please recommend a tent suitable for hiking and mountain climbing, and give purchasing suggestions." It is understood that the query content can include queries from any field that is expected to be answered, such as resource interaction, office work, medical care, and document editing. For example, "Which should I buy, phone A or phone B?" Examples include: "Extract screenshots from PPT videos and identify the title document," "Please help me count the photos on my computer," "Please help me retweet a Weibo post," "Please help me shop on platform X," etc. In an exemplary embodiment, the query content can be entered via text. In another exemplary embodiment, the query content can also be entered via voice. In a specific implementation, a query content input box can be displayed on the query content input page, and the query content can be entered in the query content input box as: "Please help me count the number of files on my computer desktop."

[0107] The local tools can include tools installed on the terminal. These local tools can have various functions. For example, they can be developed based on a private protocol to obtain custom local tools. Another example is user-defined development. Yet another example is the development of tools based on public standard protocols. When using tools developed using public standard protocols, they can be downloaded and used from a platform tool store by searching keywords such as "train tickets," "browser," or "code generation." In a specific embodiment, local tools can be configured on the terminal, and the terminal downloads the corresponding tools based on the configuration. Optionally, a list of completed local tools can be displayed on the terminal, for example, referring to... Figure 3 As shown, when a local tool 301 is triggered, the tool is automatically downloaded and installed on the terminal. This embodiment of the disclosure... Figure 3 The sources of the tools shown in the document are not restricted.

[0108] The tool information of a local tool describes the parameters required to invoke that local tool. In specific implementations, different development methods may correspond to different tool information. For example, tool information may include the tool's identifier, input parameters, parameter types, tool description, etc. This disclosure does not limit the content of the tool information. It is understood that there may be multiple local tools, and thus the tool information of this public tool can be transmitted in a list manner. At least one local tool may include all local tools installed on the terminal, or it may include only some of the tools installed on the terminal.

[0109] Step S203: Perform task planning on the query task to obtain at least one subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool.

[0110] The query task can be transmitted to an intelligent agent, which parses the query task and performs task planning on the parsed content to obtain at least one subtask to respond to the query task. The intelligent agent can be built on a large language model, possessing the ability to autonomously understand, perceive, plan, remember, and use tools. In an exemplary embodiment, the intelligent agent can adopt a "thinking + action" reasoning mode when determining the query task. Thinking refers to the intelligent agent analyzing the current situation and considering what to do next; action refers to the action performed by the intelligent agent, usually by calling a tool. During the intelligent agent's task planning phase, the intelligent agent performs a round of thinking beforehand, generating at least one subtask to respond to the query task. In the specific implementation process, different query tasks can correspond to different prompt templates, and prompts are constructed based on these templates. For example, when the query content is: "What is A's height?", the prompt may include: User: What is B's height? Intelligent agent thinking: I need to search for B's height; Intelligent agent action: Search online; Intelligent agent output: B's height. Now let's start processing the new task: the user's query content: what is Xiao A's height, etc., where the agent's actions can be a subtask of the above query task.

[0111] In another exemplary embodiment, the aforementioned intelligent agent can be an AI agent focused on task planning. The intelligent agent responsible for task planning is used to break down complex user needs, understand task objectives and contextual information, and dynamically formulate and adjust a distributed multi-agent collaborative execution plan. In this embodiment, the intelligent agent responsible for task planning can be obtained by training an initial intelligent agent on planning tasks. In an exemplary embodiment, to improve the accuracy of the initial task planning, prompts can be generated based on candidate planning tasks in the target domain. The prompts and query content are input to the intelligent agent responsible for planning tasks, and at least one corresponding sub-task is output. In a specific implementation, for example, in the domain of resource interaction, the query content is input to the intelligent agent responsible for task planning, and at least one corresponding sub-task is output, such as: analysis of the query object in the query content, recommendation of specific products of the query object, and comparison between various recommended products. The prompt can be input text provided by the intelligent agent system to the large language model in the intelligent agent, used to guide the large language model to produce the desired output or behavior.

[0112] In the specific implementation process, tool information corresponding to at least one local tool can be input into the intelligent agent planning the task. The intelligent agent can then filter local tools that match the subtask based on the description of the local tool's function in the tool information. It is understood that among the planned at least one subtask, some subtasks require calling local tools, while others can be implemented by calling cloud tools. Therefore, in an exemplary embodiment, the tool information of the cloud tools can also be input into the intelligent agent planning the task. The intelligent agent can then filter local and cloud tools that match the subtask based on the description of the local tool's function in the tool information. In the specific implementation process, task tool information corresponding to the subtask can be written into the subtask, where the tool represented by the task tool information is used to execute the corresponding subtask. It is understood that when a subtask can be implemented without calling a tool, the task tool information in the subtask may not need to be written.

[0113] Step S205: For each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, a call request corresponding to the local tool represented by the task tool information of the subtask is sent to the terminal based on the task tool information corresponding to the subtask.

[0114] In the specific execution process, the association between tool identifiers and types can be used to determine whether a tool is a local tool or a cloud tool. In an exemplary embodiment, for example, if the task tool information of subtask A corresponds to local tool a, the tool identifier and input parameters required by local tool a can be queried from the tool information sent by the terminal. The content corresponding to the subtask is then used as the parameter content corresponding to the input parameters, and a local tool invocation request is made. For example, the function description of local tool a is "open URL", and the input parameters include: url:. The task objective of the subtask is: "Use local tool a to open the target website, the address is https: / / www.XXX.com". Based on the task objective and input parameters, an invocation request can be obtained, for example: invoking local tool a, the parameters are {"tool name: "local tool a""; url: https: / / www.XXX.com}. Next, the above invocation request is sent to the terminal. Optionally, the task tool information of the subtask may also correspond to a cloud tool, or the task tool information may not exist in the subtask, requiring further decomposition to obtain secondary subtasks.

[0115] Step S207: Based on the call result corresponding to the call request returned by the terminal, determine the processing result of the subtask.

[0116] Specifically, the result of the call request returned by the terminal can be used as the processing result of the subtask. In one exemplary embodiment, for example, if the subtask is to count the number of photos in folder F on the computer, and the count is found to be one thousand photos using the corresponding tool, then one thousand photos can be used as the processing result of the subtask. In the specific implementation process, the call result may return an error, such as an error in the execution of the local tool or the local tool not being found. Exemplarily, the call request can be resent. In another exemplary embodiment, a waiting delay can be set. For example, if the terminal has not received the call result returned by the terminal within 5 minutes, failure processing can be performed, and the call request can be resent. In another exemplary embodiment, if the number of times the subtask fails to execute meets a preset requirement, the subtask can be re-planned.

[0117] Step S209: Based on the processing results corresponding to the at least one subtask, determine the response content for replying to the query task.

[0118] In this embodiment of the disclosure, some of the at least one subtask may be implemented by calling cloud tools during execution, and the results of the cloud tool calls are obtained. Exemplarily, some of the at least one subtask may not require calling tools, for example, they can be obtained through model inference or by querying a database. In another example, some subtasks are implemented by calling local tools, and the results of the local tool calls are obtained.

[0119] In this embodiment of the disclosure, each subtask in the at least one subtask corresponds to a processing result. For example, the execution results of at least one target can be summarized by an intelligent agent, such as extracting summary information of the target execution results and outputting it according to a preset output format. For example, a report corresponding to the response content can be generated and downloaded. In a specific embodiment, for example, a user's query task includes: checking the weather and booking train tickets for next week on the ticketing system. The at least one subtask includes: Subtask a: querying a cloud-based weather tool, the corresponding query result is sunny and suitable for travel. Subtask b: using a local ticketing tool to book tickets on the ticketing system, the booking result is successful ticket booking. Summarizing the processing results of each subtask yields a response content such as sunny and suitable for travel, and that a ticket for tomorrow has been booked for you, with ticket information as follows, etc.

[0120] In the above data processing method, for the query request sent by the terminal, the server performs task planning on the query task to obtain at least one subtask, breaking down the complex query task into subtasks and solving each subtask one by one. Optionally, if the subtask is relatively complex, it can be further broken down. This application configures corresponding task tool information for each subtask. In addition to cloud tools that can be called, different terminals can correspond to different local tools. In this process, the advantages of deploying large-scale models on the server and the advantages of local tools accessing the terminal environment are fully utilized. The combination of local tools and cloud tools greatly expands the boundary of task solving capabilities. Furthermore, by sending a call request to the terminal corresponding to the local tool represented by the task tool information of the subtask; based on the call result corresponding to the call request returned by the terminal, the processing result of the subtask is determined. In this way, it is not necessary to access the terminal user's data, but only to obtain the call result, which can protect the security of terminal data.

[0121] In one embodiment, the task planning for the query task to obtain at least one subtask includes:

[0122] The query task is decomposed to obtain at least one task objective.

[0123] For the task objective, at least based on the tool information corresponding to the local tool, a target tool whose functional scope meets the task objective is determined.

[0124] Each subtask is determined based on the task objective and the tool identifier of the target tool corresponding to the task objective.

[0125] In this embodiment, the task objective describes the task content of the sub-task. According to the method described in the above embodiments, the query task can be broken down or planned into at least one task objective. In an exemplary embodiment, the query content is, for example, "Help me open search engine C to search for events." Exemplarily, the task planning agent plans the query content into the following three sub-task objectives: Task objective a: "Use a browser to open search engine C, the address is https: / / www.sousuoyinqingC.com". Task objective b: "Find the search box component on the browser page and enter the search keyword 'events'". Task objective c: "Find the search button on the browser page and click the search button".

[0126] In an exemplary embodiment, for the content of a task objective, a target tool whose functional scope matches the task objective can be determined from the tool's description. The target tool can be a cloud-based tool or a local tool. The tool information for cloud-based tools can be stored on a server. Optionally, if multiple tools simultaneously satisfy the same task objective, the tool with the highest performance can be selected from among them. In the above embodiment, for example, task objective a corresponds to a local tool for opening a URL; task objective b corresponds to a local tool for entering input content; and task objective c corresponds to a tool for clicking a button. Exemplarily, the task objective and the tool identifier for performing the task objective are written into a subtask to obtain a subtask. It is understood that if the subtask does not depend on a tool, the tool identifier may not be filled in.

[0127] In the above embodiments, the query task is decomposed to obtain at least one task objective; for each task objective, a target tool whose functional scope meets the task objective is determined based on at least the tool information corresponding to the local tool; each subtask is determined based on the tool identifier of each task objective and the target tool corresponding to the task objective. Writing the tool identifier into the subtask facilitates the selection of a matching tool during subtask execution, simplifying the execution process and improving processing efficiency.

[0128] In one embodiment, the target tool includes a standard protocol tool, and determining each sub-task based on each task objective and the tool identifier of the target tool corresponding to the task objective includes:

[0129] If the target tool is a standard protocol tool, the input parameters of the target tool are queried from the tool information corresponding to the at least one local tool.

[0130] Based on the task objective corresponding to the target tool, the parameter content of the input parameters of the target tool is determined.

[0131] Based on the task objective, the identification information of the target tool, the input parameters of the target tool, and the corresponding parameter content, the sub-task corresponding to the task objective is determined.

[0132] Standard protocol tools can include tools developed using open and shared protocols, and the developed tools must conform to the aforementioned protocol standards. For example, MCP (Model Context Protocol): an open-source protocol for accessing a large language model. Various tools can run on the user's computer; as long as the developer follows the MCP protocol, the tool will operate according to a standard, and the large language model can utilize these tools to perform tasks and complete user instructions.

[0133] In one exemplary embodiment, after completing the development of a standard protocol tool, the developer can agree on the functions implemented by the tool, the tool's calling interface, the tool's identification information, and the tool's input parameters. The tool's input parameters describe the parameters required to call the tool, such as parameter URL: [ ]; parameter type: [ ], etc. In one exemplary embodiment, the content of the input parameters is determined based on the task objective. For example, if the task objective is to search for the homepage of Company A, the parameter content would be, for example, "https: / / www.companyA.com".

[0134] In this embodiment of the disclosure, a subtask corresponding to the task target is determined based on the task objective, the identification information of the target tool, the input parameters of the target tool, and the corresponding parameter content. By writing the input parameters of the target tool and the corresponding parameter content into the subtask, the content of the subtask can be converted into a tool invocation request when the subtask is executed, simplifying the process invocation and improving the execution efficiency of the task.

[0135] In one embodiment, determining each subtask based on the task objective and the tool identifier of the target tool corresponding to the task objective includes:

[0136] Obtain the identification information of the agent invoked by the target tool.

[0137] Each subtask is determined based on the task objective, the tool identifier of the target tool corresponding to the task objective, and the identifier information of the intelligent agent invoked by the target tool.

[0138] The target tool can include either a cloud-based tool or a local tool. The identification information of the intelligent agent can include intelligent agents executing standard protocol tools and intelligent agents executing non-standard protocol tools. In an exemplary embodiment, if the target tool is developed using a standard protocol, it corresponds to an intelligent agent executing the standard protocol tool. The identification information of the intelligent agent executing the standard protocol tool, such as MCP Proxy Agent, is written into the corresponding subtask. In an exemplary embodiment, if the target tool is developed using a non-standard protocol, the identification information of the intelligent agent executing the non-standard protocol tool, such as a webpage generation agent, is written into the corresponding subtask. It should be noted that the intelligent agent executing the standard protocol tool can call either a cloud-based tool or a local tool, and the intelligent agent executing the non-standard protocol tool can use either a cloud-based tool or call a local tool. This embodiment of the disclosure does not impose any limitations on this.

[0139] In the above embodiments, by writing the identification information of the intelligent agent called by the target tool into the subtask, the scheduler can automatically route to the corresponding intelligent agent during the execution of the subtask. Different target tools correspond to different intelligent agents for execution, which improves the professionalism of the intelligent agents, saves processes, and improves execution efficiency and accuracy.

[0140] In one embodiment, task planning is performed on the query task to obtain at least one subtask, including:

[0141] For subtasks that do not carry corresponding task tool information, if the subtasks meet preset conditions, the subtasks that meet the preset conditions are decomposed to obtain at least one secondary subtask; wherein, the at least one secondary subtask carries corresponding subtask tool information; the subtask tool information is at least one of the tool information corresponding to the at least one local tool.

[0142] In the actual implementation process, the subtasks are quite complex. For example, they may not be able to be answered by calling tools or relying on knowledge base content. Therefore, it is necessary to decompose the subtasks into at least one second-level subtask. Understandably, if the second-level subtasks are still quite complex, they can be further decomposed into at least one third-level subtask, until the decomposed subtasks can be processed.

[0143] In this embodiment of the disclosure, when a secondary subtask can be processed by calling a tool, the secondary subtask carries corresponding subtask tool information. The subtask tool information can be tool information corresponding to a local tool, or tool information corresponding to a cloud tool, etc. Optionally, processing the subtask can be achieved by calling multiple local tools, or by calling one local tool; this embodiment of the disclosure does not impose any limitations on this.

[0144] In the above embodiments, for subtasks that do not carry corresponding task tool information, if the subtasks meet preset conditions, the subtasks that meet the preset conditions are decomposed to obtain at least one second-level subtask. This realizes the layer-by-layer decomposition of complex query tasks, divides the problem into smaller parts and solves it, and improves the processing capability of complex tasks.

[0145] In one embodiment, after decomposing the task objective that meets preset conditions to obtain at least one secondary sub-task, the method further includes:

[0146] For each secondary subtask carrying corresponding subtask tool information, if the subtask tool information of the secondary subtask corresponds to a local tool, a call request corresponding to the local tool represented by the subtask tool information of the secondary subtask is sent to the terminal based on the subtask tool information of the secondary subtask.

[0147] Based on the invocation result of the call request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the second-level subtask is determined.

[0148] Based on the processing results of the at least one secondary subtask, the processing results of the subtask that meets the preset conditions are determined.

[0149] Specifically, the subtask tool information may carry a tool identifier. By associating the tool identifier with its type, it can be determined whether the tool is a local tool or a cloud tool. In an exemplary embodiment, for example, if the subtask tool information of a second-level subtask corresponds to a local tool, the input parameters required by the local tool can be queried from the tool information sent by the terminal, and the content of the second-level subtask can be used as the parameter content corresponding to the input parameters. The input parameters and parameter content are encapsulated to obtain a call request. Based on the call result of the call request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the second-level subtask is determined. In an exemplary embodiment, for example, if the subtask tool information of a second-level subtask corresponds to a cloud tool, the processing result of the second-level subtask is obtained by calling the cloud tool to process the second-level subtask. Finally, based on the processing result of each second-level subtask, the processing result of the subtask corresponding to the task target that meets preset conditions is determined.

[0150] In the above embodiments, for each secondary subtask carrying corresponding subtask tool information, if the subtask tool information of the secondary subtask corresponds to a local tool, a call request corresponding to the local tool represented by the subtask tool information of the secondary subtask is sent to the terminal based on the subtask tool information of the secondary subtask. Based on the call result of the call request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the secondary subtask is determined, thus realizing the processing of the secondary subtask.

[0151] In one embodiment, when the task tool information of the subtask corresponds to a local tool, sending a call request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask includes:

[0152] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a local tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the terminal call request corresponding to the subtask.

[0153] Send the terminal call request to the terminal.

[0154] In the specific implementation process, it can be determined whether the tool corresponding to the task tool information of the subtask is a local tool or a cloud tool by querying. In this embodiment of the disclosure, the local tool adopts a standard protocol tool, and the agent calling the local tool selects the agent executing the standard protocol tool. By executing the agent executing the standard protocol, the task tool information corresponding to the subtask is written into the call request. For example, the tool identifier being called is puppeteer_navigate, and the task tool information includes input parameters. Thus, the call request can be represented as: {"tool_name": "puppeteer_navigate", "url":"https: / / www.baidu.com"}.

[0155] In one exemplary embodiment, the input parameters of the task tool information in the subtask can be input into the agent executing the subtask in the form of prompt words, and the agent executing the planning task is required to output in a specified JSON format, such as: {tool_name:xxx,input:xxx}, and finally these fields are parsed by the program.

[0156] In the above embodiments, standard protocol local tools are used. These standard protocol local tools can be user-defined, obtained from third-party platforms, or downloaded from the tool set applied in this application, thus providing more tool sources and enriching the variety of local tools. Furthermore, the intelligent agent executing the standard protocol tool can directly output a call request that satisfies the standard protocol, improving the convenience of tool invocation and the execution efficiency of subtasks.

[0157] In one embodiment, sending the terminal invocation request to the terminal includes:

[0158] Obtain the account identification information of the terminal and determine the long-connection communication interface corresponding to the account identification information.

[0159] Based on the long-connection communication interface, the terminal call request is pushed to the terminal.

[0160] In the specific implementation, when a terminal sends a query request to the server, the server retrieves the account identification information and establishes a corresponding long-connection communication interface. It's understandable that the server receives a large number of query requests; therefore, an association can be established between account identification information and long-connection communication interfaces. When a message needs to be sent to a specific terminal, this association is used to determine the corresponding long-connection communication interface. Optionally, the aforementioned long-connection communication interface can be a WebSocket connection.

[0161] In the specific implementation, when a terminal (e.g., JavaScript code in a browser) executes `newWebSocket("ws: / / server.example.com")`, it sends a special HTTP request to the server. The key to this request is that it includes a header requesting an upgrade protocol. Upon receiving the request, the server performs a series of checks, such as whether WebSocket is supported. If everything is normal, the server returns an HTTP 101 SwitchingProtocols status code response, indicating a successful protocol switch. Once the client verifies that the server's `Sec-WebSocket-Accept` response is correct, the TCP connection is not closed, but rather formally upgraded from the HTTP protocol to the WebSocket protocol. At this point, the application layer protocol has changed. Both parties no longer use the HTTP request / response model, but instead use frames defined by the WebSocket protocol for full-duplex communication.

[0162] In this embodiment of the disclosure, the terminal call request is pushed to the terminal based on the long connection communication interface, which can realize full-duplex communication. When the call fails, it is easy to re-initiate the call or switch to a new subtask, which reduces the time consumption of traditional request response and improves the execution efficiency of local tool calls.

[0163] In one embodiment, sending the terminal invocation request to the terminal includes:

[0164] Send the terminal call request to the terminal.

[0165] If no confirmation response is received from the terminal within a preset time period, the terminal call request is resent to the terminal.

[0166] In the specific implementation process, when the server initially sends a terminal call request to the terminal, it can agree to receive a definite reply (ACK) from the terminal within a preset time period. This preset time period can be set according to the specific application scenario, such as 5 seconds or 8 seconds. In an exemplary embodiment, if no definite reply is received from the terminal within the preset time period, the server resends the terminal call request to the terminal. Optionally, if the number of resends reaches a preset threshold, the server may stop resending and use other tools. In an exemplary embodiment, if a definite reply is received from the terminal within the preset time period, the server continues to wait for the call result. Optionally, if the waiting time exceeds a preset threshold, the server considers the call to have failed. For example, if no call result is received from the terminal after a waiting time of 5 minutes, the call is considered to have failed.

[0167] The above embodiment sends a terminal call request to the terminal. If no acknowledgment message is received from the terminal within a preset time, the terminal call request is resent to the terminal. This reduces the likelihood of subtask call failures due to network issues and improves the success rate of subtask execution.

[0168] In one embodiment, after performing task planning on the query task based on the tool information corresponding to the local tool to obtain at least one sub-task, the method further includes:

[0169] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a cloud tool, it encapsulates the data information of the subtask according to the standard protocol to obtain the cloud call request corresponding to the subtask.

[0170] Send the cloud call request to the server where the cloud tool represented by the task tool information of the subtask is located.

[0171] In the specific implementation process, it can be determined whether the tool corresponding to the task tool information of the subtask is a local tool or a cloud tool by querying. In this embodiment of the disclosure, the cloud tool adopts a standard protocol tool, and the agent that calls the local tool selects the agent that executes the standard protocol tool. By executing the agent that executes the standard protocol, the task tool information corresponding to the subtask is written into the call request. For example, the tool identifier called is puppeteer_fill, and the task tool information includes input parameters. Thus, the call request can be represented as: {"tool_name": "puppeteer_fill", "selector": "search", "value": "event"}.

[0172] In one exemplary embodiment, the input parameters of the task tool information in the subtask can be input into the agent executing the standard protocol tool in the form of prompt words, and the agent executing the planning task can be required to output in a specified JSON format. Finally, these fields are parsed out by the program.

[0173] In this embodiment of the disclosure, the cloud call request can be sent directly to the server where the cloud tool represented by the task tool information of the subtask is located, without the need to establish a long connection communication interface.

[0174] In the above embodiments, the intelligent agent that executes the standard protocol call can call the standard protocol tools deployed in the cloud, which enriches the types of tools and enhances the task processing capabilities of large models.

[0175] In one embodiment, sending a call request to the terminal corresponding to the local tool represented by the tool information of the subtask, based on the task tool information corresponding to the subtask, includes:

[0176] The task tool information corresponding to the subtask and the task objective of the subtask are input into the intelligent agent that executes the standard protocol tool call.

[0177] The agent invoked through the execution standard protocol tool sends a request to the terminal to invoke the local tool represented by the task tool information of the subtask.

[0178] In the specific implementation process, for example, the task objective of a subtask is "click the search button". The task tool information of the subtask includes the input parameter "selector": search. The task objective and task tool information of the subtask are input to the agent that executes the standard protocol tool call through prompt words. The agent sends a call request to the terminal, which includes the tool identifier to be called, the input parameters and the corresponding parameter content.

[0179] In one exemplary embodiment, the agent executing the standard protocol tool call may receive multiple subtasks simultaneously. For example, subtasks may contain dependencies; for instance, subtask b depends on the execution result of subtask a during its execution. Specifically, subtask a may be: querying information about phone a and phone b, while subtask b may be: combining key parameters of phone a and phone b to provide purchase recommendations. In this case, the agent executing the standard protocol tool call may execute subtask a first, and then execute subtask b.

[0180] In the above embodiments, the intelligent agent that executes the standard protocol tool calls uniformly calls the standard protocol tool and generates the corresponding call request. The integrated execution method can expand to more standard protocol tools, and different users can call the local tools of different standard protocols, thereby improving the system's scalability.

[0181] In one embodiment, determining the processing result of the subtask based on the call result corresponding to the call request returned by the terminal includes:

[0182] If the terminal returns a call request with a call failure result, the tool for executing the subtask is updated to a backup tool.

[0183] Based on the processing result of the backup tool, the processing result of the subtask is determined.

[0184] In the specific implementation process, the terminal's invocation result may be a failure, such as a tool execution error or the tool not being found. In an exemplary embodiment, the task tool information of a subtask may include the preferred target tool 'a', and may also include selecting backup tools 'b' and 'c' if target tool 'a' fails. In the specific implementation process, the processing result of the subtask can be determined based on the processing result of the backup tools. In a specific application scenario, for example, the target tool is using browser 'a' to search for a target event. If searching with browser 'a' fails, browser 'b' can be used to search for the target event.

[0185] In the above embodiments, if the call result corresponding to the call request returned by the terminal is a call failure, the tool executing the subtask is updated to a backup tool. Based on the processing result of the backup tool, the processing result of the subtask is determined, which can improve the success rate of subtask processing.

[0186] In one embodiment, after updating the tool for performing the subtask to a backup tool, the method further includes:

[0187] If the backup tool fails to be invoked, the query task is re-planned to obtain at least one updated sub-task.

[0188] The step of determining the response content for the query task based on the processing results corresponding to the at least one subtask includes:

[0189] Based on the processing results corresponding to the at least one updated subtask, the response content for replying to the query task is determined.

[0190] In the specific implementation process, refer to Figure 4 As shown, during the execution of subtask 401, multiple tools can be invoked. For example, if local tool 403 fails to execute, the local tool is replaced with a backup tool, and subtask 403 is re-executed. If it fails again, this embodiment can return to the previous step, and the task planning agent can redefine the subtask to obtain an updated subtask.

[0191] In the specific implementation process, the subtasks corresponding to the query content may include subtask A, subtask B, and subtask C. In an exemplary embodiment, all subtasks A, B, and C can be updated, or only some of the subtasks can be updated, such as updating subtask A, or updating subtasks A and B.

[0192] In one exemplary embodiment, when only some subtasks are updated, the response content for the query is determined based on the processing results of the partially updated subtasks. In another exemplary embodiment, when all subtasks are updated, the response content for the query is determined based on the processing results of all updated subtasks.

[0193] In the above embodiments, local remediation is first implemented, for example, selecting a backup tool to execute a subtask if the target tool fails. If the backup tool fails, a large-scale task replanning is deployed, which can comprehensively improve the success rate of the response.

[0194] In one embodiment, such as Figure 5 As shown, a task processing method is provided, which is applied to Figure 1 Taking the terminal in the example, the explanation includes the following steps:

[0195] Step S501: Obtain a query task, query the local tools installed on the terminal, and obtain tool information corresponding to at least one local tool.

[0196] In the specific implementation process, refer to Figure 6As shown, a new query task 601 can be created in the terminal application, and the responses to historical query tasks 603 can also be viewed. In an exemplary embodiment, after entering a query task, the system further queries the local tools installed on the terminal to obtain tool information corresponding to at least one local tool.

[0197] Step S503: Determine the query request based on the query task and the tool information corresponding to the at least one local tool.

[0198] The query request includes a query task and tool information corresponding to at least one local tool installed on the terminal.

[0199] The local tools can include tools installed on the terminal. These local tools can have various functions. For example, they can be developed based on a private protocol to obtain custom local tools. Another example is user-defined development. Yet another example is the development of tools based on public standard protocols. When using tools developed using public standard protocols, they can be downloaded and used from a platform tool store by searching keywords such as "train tickets," "browser," or "code generation." In a specific embodiment, local tools can be configured on the terminal, and the terminal downloads the corresponding tools based on the configuration. Optionally, a list of completed local tools can be displayed on the terminal, for example, referring to... Figure 3 As shown, when a local tool 301 is triggered, the tool is automatically downloaded and installed on the terminal. This embodiment of the disclosure... Figure 3 The sources of the tools shown in the document are not restricted.

[0200] The tool information of a local tool describes the parameters required to invoke that local tool. In specific implementations, different development methods may correspond to different tool information. For example, tool information may include the tool's identifier, input parameters, parameter types, tool description, etc. This disclosure does not limit the content of the tool information. It is understood that there may be multiple local tools, and thus the tool information of this public tool can be transmitted in a list manner. At least one local tool may include all local tools installed on the terminal, or it may include only some of the tools installed on the terminal.

[0201] Step S505: Send the query request to the server to instruct the server to perform task planning for the query task and obtain at least one subtask; for each subtask carrying corresponding task tool information, if the tool information of the subtask corresponds to a local tool, return a call request corresponding to the local tool represented by the task tool information of the subtask based on the task tool information corresponding to the subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool.

[0202] In an exemplary embodiment, the aforementioned intelligent agent can be an AI agent focused on task planning. The intelligent agent responsible for task planning is used to break down complex user needs, understand task objectives and contextual information, and dynamically formulate and adjust a distributed multi-agent collaborative execution plan. In this embodiment, the intelligent agent responsible for task planning can be obtained by training an initial intelligent agent on planning tasks. In an exemplary embodiment, to improve the accuracy of the initial task planning, prompts can be generated based on candidate planning tasks in the target domain. The prompts and query content are input to the intelligent agent responsible for planning tasks, and at least one corresponding sub-task is output. In a specific implementation, for example, in the domain of resource interaction, the query content is input to the intelligent agent responsible for task planning, and at least one corresponding sub-task is output, such as: analysis of the query object in the query content, recommendation of specific products of the query object, and comparison between various recommended products. The prompt can be input text provided by the intelligent agent system to the large language model in the intelligent agent, used to guide the large language model to produce the desired output or behavior.

[0203] In the specific implementation process, tool information corresponding to at least one local tool can be input into the intelligent agent planning the task. The intelligent agent can then filter local tools that match the subtask based on the description of the local tool's function in the tool information. It is understood that among the planned at least one subtask, some subtasks require calling local tools, while others can be implemented by calling cloud tools. Therefore, in an exemplary embodiment, the tool information of the cloud tools can also be input into the intelligent agent planning the task. The intelligent agent can then filter local and cloud tools that match the subtask based on the description of the local tool's function in the tool information. In the specific implementation process, task tool information corresponding to the subtask can be written into the subtask, where the tool represented by the task tool information is used to execute the corresponding subtask. It is understood that when a subtask can be implemented without calling a tool, the task tool information in the subtask may not need to be written.

[0204] During execution, the association between tool identifiers and types can be used to determine whether a tool is a local tool or a cloud tool. In an exemplary embodiment, for example, if the task tool information for subtask A corresponds to local tool a, the tool identifier and input parameters required by local tool a can be queried from the tool information sent by the terminal. The content corresponding to the subtask is then used as the parameter content corresponding to the input parameters, thus triggering the local tool invocation request. For example, the function description of local tool a is "open URL," and the input parameters include: url:. The task objective of the subtask is: "Use local tool a to open the target website, the address of which is https: / / www.XXX.com." Based on the task objective and input parameters, an invocation request can be obtained, for example: invoking local tool a, with parameters {"tool name: "local tool a""; url: https: / / www.XXX.com}.

[0205] In the specific implementation process, the planned subtasks, such as subtask 605, can be displayed in the terminal interface.

[0206] Step S507: Receive the call request, call the local tool represented by the task tool information of the subtask, obtain the call result, send the call result to the server to instruct the server to determine the processing result of the subtask based on the call result, and return the response content of the query task based on the processing results corresponding to the at least one subtask.

[0207] In this embodiment of the disclosure, upon receiving a call request, parameters are input to the local tool represented by the task tool information of the subtask to obtain the call result of the local tool, and the call tool is sent to the server.

[0208] In this embodiment of the disclosure, each subtask in the at least one subtask corresponds to a processing result. For example, the execution results of at least one target can be summarized by an intelligent agent, such as extracting summary information of the target execution results and outputting it according to a preset output format. For example, a report corresponding to the response content can be generated and downloaded. In a specific embodiment, for example, a user's query task includes: checking the weather and booking train tickets for next week on the ticketing system. The at least one subtask includes: Subtask a: querying a cloud-based weather tool, the corresponding query result is sunny and suitable for travel. Subtask b: using a local ticketing tool to book tickets on the ticketing system, the booking result is successful ticket booking. Summarizing the processing results of each subtask yields a response content such as sunny and suitable for travel, and that a ticket for tomorrow has been booked for you, with ticket information as follows, etc.

[0209] Step S509: Display the response content.

[0210] In the specific implementation process, refer to Figure 6 As shown, the interface displays detailed information about the subtask's execution and the response content. In an exemplary embodiment, the response content can be converted into a report for download.

[0211] In the above data processing method, for a query request sent by the terminal, the server performs task planning based on the tool information corresponding to the local tools, resulting in at least one subtask. The complex query task is broken down into subtasks, and each subtask is solved one by one. Corresponding task tool information is configured for each subtask; in addition to cloud tools, different terminals can use different local tools. This process fully utilizes the advantages of deploying large-scale models on the server and the accessibility of local tools to the terminal environment. The combination of local and cloud tools significantly expands the boundaries of task resolution capabilities. Furthermore, a call request corresponding to the local tool represented by the task tool information of the subtask is sent to the terminal; based on the call result returned by the terminal, the processing result of the subtask is determined. This eliminates the need to access the terminal user's data, only requiring the call result, thus protecting the security of terminal data. Simultaneously, the terminal can display the subtask planning process and tool call process in real time, facilitating understanding of the task execution progress.

[0212] In one embodiment, prior to obtaining the query task, the method further includes:

[0213] Display the target page, which shows the configuration controls for the local tools.

[0214] In response to a triggered event for the configuration control, display a list of local tools.

[0215] In response to a selection event for a target local tool from the list of local tools, the target local tool is installed onto the terminal.

[0216] In the specific implementation process, refer to Figure 6 As shown, a configuration control 607 for local tools can be displayed on the target page. This configuration control 607 is triggered, for example, by clicking it. (See reference) Figure 7 As shown, it can be displayed as follows Figure 7 The page displays a list of local tools. In one exemplary embodiment, each local tool has an enable control 701. Triggering the enable control 701 selects the corresponding target local tool and downloads and installs it to the terminal.

[0217] In the above embodiments, by providing a list of local tools, which includes tools with various functions for users to choose from, the convenience of installing and downloading local tools is improved, and the usage rate of local tools is increased.

[0218] In one embodiment, following the display of the list of local tools, the following is also included:

[0219] In response to a share event for a target local tool from the list of local tools, the link information of the target local tool is sent to other terminal accounts.

[0220] In the specific implementation process, refer to Figure 7 As shown, the local tools list can display dropdown control 703. Triggering this dropdown control is indicated in the reference. Figure 8 As shown, a sharing control 801 can be displayed. Triggering this sharing control 801 can share the corresponding local tool to other accounts. In an exemplary embodiment, refer to... Figure 7 As shown, the page also allows you to set an import configuration control 705. When the import configuration control 705 is triggered, you can paste the sharing password, and the system will automatically download the corresponding local tool based on the password.

[0221] In the above embodiments, by sending the link information of the target local tool to other terminal accounts through the sharing event of the target local tool in the local tool list, the use and dissemination of local tools are facilitated, the types of tools are enriched, and the calling capability of large models is improved.

[0222] In one embodiment, prior to obtaining the query task, the method further includes:

[0223] Display the target page, on which a new control for local tools is displayed;

[0224] In response to the trigger event for the newly created control, display the local tool creation page;

[0225] The local tool creation page receives the input of the local tool's link information, and based on the link information, downloads the local tool from a third-party platform to obtain the newly created local tool.

[0226] In the specific implementation process, the target page displays a new control for local tools, see reference. Figure 7 As shown, this page has a control for adding a new local tool (705). Triggering this control will display the following: Figure 9The local tool creation page 901 is shown. This page receives link information for local tools, indicating how to obtain the tool. This link information can be generated during the development of the local tool. For example, a third-party platform can be used to select the tool to be installed, and the tool's information can be copied to the link information field here. In an exemplary embodiment, the creation page 901 can also include a tool identifier, a description of the tool's corresponding functions, and configuration of the corresponding service type.

[0227] In the above embodiments, by setting up a new local tool page, the corresponding local tool can be automatically downloaded from a third-party platform by simply inputting link information, thus expanding the channels for obtaining local tools and enriching the local tools available on the terminal.

[0228] In one embodiment, receiving the invocation request, invoking the local tool represented by the tool information of the subtask, obtaining the invocation result, and sending the invocation result to the server includes:

[0229] Parse the invocation request to obtain the invocation instructions of the local tool represented by the tool information of the subtask; wherein, the invocation instructions include processing files in the target region of the terminal.

[0230] Based on the invocation instruction, the files in the target area of ​​the terminal are processed to obtain the processing result, and the processing result is sent to the server.

[0231] In the specific implementation process, the call request is parsed to obtain the calling instructions needed to invoke the local tool. For example, this might involve processing files in the target area of ​​the terminal, such as counting desktop photos and automatically printing them. After receiving the relevant calling instructions, the local tool processes the desktop photo files, determines the processing result (e.g., successful printing or some photos failing to print), and then sends the processing result to the server.

[0232] In the above embodiments, by executing the call command through local tools, the runtime environment can be accessed in a real way without uploading the terminal's files to the server, thus ensuring the data security of the terminal, while also enabling related processing of the terminal's files.

[0233] In one specific embodiment, the method of this application can be applied to complex query task scenarios involving terminal operations. In the prior art, after receiving a user's query request, the server is unable to operate the client to complete certain tasks, or it needs to upload the terminal's data to the server, resulting in data insecurity on the terminal. This application provides a data processing method that can improve the processing capacity of large models.

[0234] The data processing method of this application may include a local tool configuration phase, a phase for determining the subtask corresponding to the query request, a phase for executing the subtask, and a phase for generating the response content.

[0235] Specifically, in the configuration phase of a local tool, the method includes: displaying a target page and showing configuration controls for the local tool on the target page; displaying a list of local tools in response to a trigger event for the configuration controls; and installing the target local tool to the terminal in response to a selection event for a target local tool from the list of local tools. In an exemplary embodiment, after displaying the list of local tools, the method further includes: sending the link information of the target local tool to other terminal accounts in response to a share event for the target local tool from the list of local tools. In an exemplary embodiment, before obtaining the query task, the method further includes: displaying a target page and showing a new local tool control on the target page; displaying a new local tool page in response to a trigger event for the new control; receiving input of link information for the local tool on the local tool import page; and downloading the local tool from a third-party platform based on the link information to obtain the newly created local tool. In one exemplary embodiment, receiving the invocation request, invoking the local tool represented by the tool information of the subtask, obtaining the invocation result, and sending the invocation result to the server includes: parsing the invocation request to obtain an invocation instruction for the local tool represented by the tool information of the subtask; wherein the invocation instruction includes processing files in the target region of the terminal; processing the files in the target region of the terminal based on the invocation instruction, obtaining a processing result, and sending the processing result to the server. (Reference) Figure 9 As shown, when using the annotation protocol for tool development, multiple local tools are installed on the terminal, denoted as MCP Svr.

[0236] Next, refer to Figure 9 As shown, the server assesses the query task. If it's a simple query, the response can be retrieved directly. If it's a complex query, task planning is required, determining the subtasks corresponding to the query request.

[0237] In the stage of determining the subtask corresponding to the query request, the method includes: performing task planning on the query task based on the tool information corresponding to the local tool to obtain at least one subtask, including: decomposing the query task to obtain at least one task objective; for the task objective, determining a target tool whose functional scope meets the task objective based at least on the tool information corresponding to the local tool; and determining each subtask based on the task objective and the tool identifier of the target tool corresponding to the task objective. In an exemplary embodiment, the target tool includes a standard protocol tool, and determining each subtask based on each task objective and the tool identifier of the target tool corresponding to the task objective includes: if the target tool is a standard protocol tool, querying the input parameters of the target tool from the tool information corresponding to the at least one local tool; determining the parameter content of the input parameters of the target tool based on the task objective corresponding to the target tool; and determining the subtask corresponding to the task objective based on the task objective, the identifier information of the target tool, the input parameters of the target tool, and the corresponding parameter content. In one exemplary embodiment, determining each subtask based on the task objective and the tool identifier of the target tool corresponding to the task objective includes: obtaining the identifier information of the agent that executes the target tool call; and determining each subtask based on the task objective, the tool identifier of the target tool corresponding to the task objective, and the identifier information of the agent called by the target tool.

[0238] Next, refer to Figure 9 As shown, the subtask contains the identification information of the agent called by the execution tool. Based on the identification information of the agent, the Agent task scheduler can route the subtask to the corresponding agent for processing. For example, the MCP Proxy agent that executes the standard protocol tool call, and other agents that execute the non-standard protocol tool call, such as the product recommendation agent and the paper interpretation agent.

[0239] During the execution phase of a subtask, the method includes: when the task tool information of the subtask corresponds to a local tool, sending a call request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask includes: when determining that the task tool information of the subtask corresponds to a local tool through an agent executing a standard protocol call, encapsulating the data according to the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain a terminal call request corresponding to the subtask; and sending the terminal call request to the terminal. In an exemplary embodiment, sending the terminal call request to the terminal includes: obtaining the account identification information of the terminal, determining the long-connection communication interface corresponding to the account identification information; and pushing the terminal call request to the terminal based on the long-connection communication interface. Specifically, refer to... Figure 10 As shown, the agent executing the standard protocol tool call can establish a long-term connection with the terminal, using full-duplex communication and WebSocket. The server can control the terminal and local tools to exchange data at any time. The terminal uses the standard protocol to call the local tool installed on the terminal and obtains the call result. In an exemplary embodiment, sending the terminal call request to the terminal includes: sending the terminal call request to the terminal; if no definite reply message is received from the terminal within a preset time period, resending the terminal call request to the terminal. In an exemplary embodiment, after the task planning for the query task is performed based on the tool information corresponding to the local tool to obtain at least one subtask, the method further includes: if the agent executing the standard protocol call determines that the task tool information of the subtask corresponds to a cloud tool, based on the task tool information corresponding to the subtask, encapsulating it using the data format of the standard protocol to obtain the cloud call request corresponding to the subtask; and sending the cloud call request to the server where the cloud tool represented by the task tool information of the subtask is located. In one exemplary embodiment, sending a call request to the terminal based on the task tool information corresponding to the subtask and corresponding to the local tool represented by the tool information of the subtask includes: inputting the task tool information corresponding to the subtask and the task target of the subtask to the intelligent agent that executes the standard protocol tool call; and sending the call request to the terminal through the intelligent agent that executes the standard protocol tool call and corresponding to the local tool represented by the task tool information of the subtask.

[0240] In the response content generation stage, the method includes: determining the processing result of the subtask based on the call result corresponding to the call request returned by the terminal, including: if the call result corresponding to the call request returned by the terminal is a call failure, updating the tool executing the subtask to a backup tool; and determining the processing result of the subtask based on the processing result of the backup tool. In an exemplary embodiment, after updating the tool executing the subtask to a backup tool, the method further includes: if the backup tool call fails, re-planning the query task to obtain at least one updated subtask; and determining the response content for replying to the query task based on the processing results corresponding to the at least one subtask, including: determining the response content for replying to the query task based on the processing results corresponding to the at least one updated subtask.

[0241] 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.

[0242] In a specific implementation scenario, this application can be applied to the statistical organization of photos. A terminal sends a query request, for example, "Please count how many photos are on my desktop." The terminal sends the query request and tool information corresponding to at least one local tool to the server. Based on the tool information corresponding to the local tool, the server performs task planning for the query task, obtaining at least one subtask; for example, subtask 1, locating desktop files; subtask 2, calculating the number of image files on the desktop. For each subtask, if the task tool information corresponds to a local tool, the server sends a call request to the terminal corresponding to the local tool represented by the task tool information of the subtask, for example, a file statistics tool. The terminal calls the file statistics tool to obtain the call result. The server determines the processing result of the subtask based on the call result corresponding to the call request returned by the terminal, and determines the response content to the query task based on the processing results corresponding to the at least one subtask.

[0243] In a specific implementation scenario, this application can be applied to the application scenario of posting on Weibo. The terminal sends a query request, such as "Please post a Weibo message with the following content." The terminal sends the query request and tool information corresponding to at least one local tool to the server. Based on the tool information corresponding to the local tool, the server performs task planning for the query task, obtaining at least one subtask; for example, subtask 1: open a third-party platform; subtask 2: input content; subtask 3: click send. For each subtask, if the task tool information of the subtask corresponds to a local tool, the server sends a call request to the terminal corresponding to the local tool represented by the task tool information of the subtask, such as a tool to open a third-party platform, an input tool, or a click operation tool. The terminal calls a file statistics tool to obtain the call result. The server determines the processing result of the subtask based on the call result corresponding to the call request returned by the terminal, and determines the reply content to the query task based on the processing results corresponding to the at least one subtask.

[0244] In this embodiment, the server cannot directly access the terminal's operating environment, such as data on a computer. Traditional solutions require users to upload the data to the cloud. This application allows for the local launch of standard protocol tools, providing the server with a list of supported standard protocols. When generating a problem-solving plan, the server's large-scale intelligent agent system incorporates local standard protocol capabilities. During task planning, it can control the execution of standard protocol tools on the client side to obtain the desired results. This effectively combines edge and cloud capabilities, ensuring user privacy and expanding the capabilities of the large-scale model.

[0245] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.

[0246] In one embodiment, such as Figure 11 As shown, a data processing apparatus is provided, comprising:

[0247] The first acquisition module 1101 is used to acquire a query request sent by the terminal; wherein, the query request includes a query task and tool information corresponding to at least one local tool installed on the terminal;

[0248] The task planning module 1103 is used to perform task planning on the query task to obtain at least one subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool;

[0249] The calling module 1105 is used to send a calling request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask, when the task tool information of the subtask corresponds to a local tool.

[0250] The first determining module 1107 is used to determine the processing result of the subtask based on the call result corresponding to the call request returned by the terminal;

[0251] The second determining module 1109 is used to determine the response content for replying to the query task based on the processing results corresponding to the at least one subtask.

[0252] In one embodiment, the task planning module is further configured to:

[0253] The query task is decomposed to obtain at least one task objective;

[0254] For the task objective, at least based on the tool information corresponding to the local tool, a target tool whose functional scope meets the task objective is determined;

[0255] Each subtask is determined based on the task objective and the tool identifier of the target tool corresponding to the task objective.

[0256] In one embodiment, the task planning module is further configured to:

[0257] If the target tool is a standard protocol tool, the input parameters of the target tool are queried from the tool information corresponding to the at least one local tool;

[0258] Based on the task objective corresponding to the target tool, determine the parameter content of the input parameters of the target tool;

[0259] Based on the task objective, the identification information of the target tool, the input parameters of the target tool, and the corresponding parameter content, the sub-task corresponding to the task objective is determined.

[0260] In one embodiment, the task planning module is further configured to:

[0261] Obtain the identification information of the agent invoked by the target tool;

[0262] Each subtask is determined based on the task objective, the tool identifier of the target tool corresponding to the task objective, and the identifier information of the intelligent agent invoked by the target tool.

[0263] In one embodiment, the task planning module is further configured to:

[0264] For subtasks that do not carry corresponding task tool information, if the subtasks meet preset conditions, the subtasks that meet the preset conditions are decomposed to obtain at least one secondary subtask; wherein, the at least one secondary subtask carries corresponding subtask tool information; the subtask tool information is at least one of the tool information corresponding to the at least one local tool;

[0265] In one embodiment, the task planning module is further configured to:

[0266] For each secondary subtask carrying corresponding subtask tool information, if the subtask tool information of the secondary subtask corresponds to a local tool, a call request corresponding to the local tool represented by the subtask tool information of the secondary subtask is sent to the terminal based on the subtask tool information corresponding to the secondary subtask.

[0267] Based on the invocation result of the invocation request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the second-level subtask is determined.

[0268] Based on the processing results of the at least one secondary subtask, the processing results of the subtask that meets the preset conditions are determined.

[0269] In one embodiment, the calling module is further configured to:

[0270] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a local tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the terminal call request corresponding to the subtask.

[0271] Send the terminal call request to the terminal.

[0272] In one embodiment, the calling module is further configured to:

[0273] Obtain the account identification information of the terminal and determine the long-connection communication interface corresponding to the account identification information;

[0274] Based on the long-connection communication interface, the terminal call request is pushed to the terminal.

[0275] In one embodiment, the calling module is further configured to:

[0276] Send the terminal call request to the terminal;

[0277] If no confirmation response is received from the terminal within a preset time period, the terminal call request is resent to the terminal.

[0278] In one embodiment, the calling module is further configured to:

[0279] If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a cloud tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the cloud call request corresponding to the subtask.

[0280] Send the cloud call request to the server where the cloud tool represented by the task tool information of the subtask is located.

[0281] In one embodiment, the calling module is further configured to:

[0282] The task tool information corresponding to the subtask and the task objective of the subtask are input into the intelligent agent that executes the standard protocol tool call;

[0283] The agent invoked through the execution standard protocol tool sends a request to the terminal to invoke the local tool represented by the task tool information of the subtask.

[0284] In one embodiment, the first determining module is further configured to:

[0285] If the call result corresponding to the call request returned by the terminal is a call failure, the tool for executing the subtask is updated to a backup tool;

[0286] Based on the processing result of the backup tool, the processing result of the subtask is determined.

[0287] In one embodiment, the first determining module is further configured to:

[0288] If the backup tool fails to be invoked, the query task is re-planned to obtain at least one updated sub-task.

[0289] The step of determining the response content for the query task based on the processing results corresponding to the at least one subtask includes:

[0290] Based on the processing results corresponding to the at least one updated subtask, the response content for replying to the query task is determined.

[0291] refer to Figure 12 As shown, this application also provides a data processing apparatus 1200, the apparatus comprising:

[0292] The second acquisition module 1201 is used to acquire query tasks, query local tools installed on the terminal, and obtain tool information corresponding to at least one local tool.

[0293] The third determining module 1203 is used to determine the query request based on the query task and the tool information corresponding to the at least one local tool;

[0294] The sending module 1205 is configured to send the query request to the server to instruct the server to perform task planning for the query task and obtain at least one subtask; for each subtask carrying corresponding task tool information, if the tool information of the subtask corresponds to a local tool, based on the task tool information corresponding to the subtask, return a call request corresponding to the local tool represented by the task tool information of the subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool;

[0295] The receiving module 1207 is configured to receive the call request, call the local tool represented by the task tool information of the subtask, obtain the call result, send the call result to the server, so as to instruct the server to determine the processing result of the subtask based on the call result, and return the response content of the query task based on the processing results corresponding to the at least one subtask respectively.

[0296] Display module 1209 is used to display the reply content.

[0297] In one embodiment, the apparatus further includes a configuration module, the configuration module being configured to:

[0298] Display the target page, on which configuration controls for the local tools are displayed;

[0299] In response to a triggered event on the configuration control, display a list of local tools;

[0300] In response to a selection event for a target local tool from the list of local tools, the target local tool is installed onto the terminal.

[0301] In one embodiment, the configuration module is further configured to:

[0302] In response to a share event for a target local tool from the list of local tools, the link information of the target local tool is sent to other terminal accounts.

[0303] In one embodiment, the configuration module is further configured to:

[0304] Display the target page, on which a new control for local tools is displayed;

[0305] In response to the trigger event for the newly created control, display the local tool creation page;

[0306] The local tool import page receives the input of the link information of the local tool, and downloads the local tool from the third-party platform based on the link information to obtain the newly created local tool.

[0307] In one embodiment, the configuration module is further configured to:

[0308] Parse the invocation request to obtain the invocation instructions of the local tool represented by the tool information of the subtask; wherein, the invocation instructions include processing files in the target region of the terminal;

[0309] Based on the invocation instruction, the files in the target area of ​​the terminal are processed to obtain the processing result, and the processing result is sent to the server.

[0310] Each module in the aforementioned data processing 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.

[0311] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, 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 data for data processing. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.

[0312] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 14 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output 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 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 input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data processing method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0313] Those skilled in the art will understand that Figure 14 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.

[0314] 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0315] 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, etc., and are not limited to these.

[0316] 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.

[0317] 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 data processing method, characterized in that, Applied to a server, the method includes: Obtain a query request sent by the terminal; wherein the query request includes a query task and tool information corresponding to at least one local tool installed on the terminal; The query task is planned to obtain at least one subtask; wherein the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool; For each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, a call request corresponding to the local tool represented by the task tool information of the subtask is sent to the terminal based on the task tool information corresponding to the subtask. Based on the call result corresponding to the call request returned by the terminal, the processing result of the subtask is determined; Based on the processing results corresponding to the at least one subtask, the response content for replying to the query task is determined.

2. The method according to claim 1, characterized in that, The task planning for the query task yields at least one subtask, including: The query task is decomposed to obtain at least one task objective; For the task objective, at least based on the tool information corresponding to the local tool, a target tool whose functional scope meets the task objective is determined; Each subtask is determined based on the task objective and the tool identifier of the target tool corresponding to the task objective.

3. The method according to claim 2, characterized in that, The target tools include standard protocol tools. The process of determining each sub-task based on each task objective and the tool identifier of the target tool corresponding to that task objective includes: If the target tool is a standard protocol tool, the input parameters of the target tool are queried from the tool information corresponding to the at least one local tool; Based on the task objective corresponding to the target tool, determine the parameter content of the input parameters of the target tool; Based on the task objective, the identification information of the target tool, the input parameters of the target tool, and the corresponding parameter content, the sub-task corresponding to the task objective is determined.

4. The method according to claim 2, characterized in that, The process of determining each subtask based on the task objective and the tool identifier of the target tool corresponding to the task objective includes: Obtain the identification information of the agent invoked by the target tool; Each subtask is determined based on the task objective, the tool identifier of the target tool corresponding to the task objective, and the identifier information of the intelligent agent invoked by the target tool.

5. The method according to claim 1, characterized in that, After performing task planning on the query task to obtain at least one subtask, the process also includes: For subtasks that do not carry corresponding task tool information, if the subtasks meet preset conditions, the subtasks that meet the preset conditions are decomposed to obtain at least one secondary subtask; wherein, the at least one secondary subtask carries corresponding subtask tool information; the subtask tool information is at least one of the tool information corresponding to the at least one local tool.

6. The method according to claim 5, characterized in that, After decomposing the task objective that meets the preset conditions to obtain at least one secondary sub-task, the method further includes: For each secondary subtask carrying corresponding subtask tool information, if the subtask tool information of the secondary subtask corresponds to a local tool, a call request corresponding to the local tool represented by the subtask tool information of the secondary subtask is sent to the terminal based on the subtask tool information corresponding to the secondary subtask. Based on the invocation result of the invocation request corresponding to the local tool represented by the subtask tool information returned by the terminal, the processing result of the second-level subtask is determined. Based on the processing results of the at least one secondary subtask, the processing results of the subtask that meets the preset conditions are determined.

7. The method according to claim 1, characterized in that, When the task tool information of the subtask corresponds to a local tool, the method of sending a call request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask includes: If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a local tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the terminal call request corresponding to the subtask. Send the terminal call request to the terminal.

8. The method according to claim 7, characterized in that, Sending the terminal call request to the terminal includes: Obtain the account identification information of the terminal and determine the long-connection communication interface corresponding to the account identification information; Based on the long-connection communication interface, the terminal call request is pushed to the terminal.

9. The method according to claim 7, characterized in that, Sending the terminal call request to the terminal includes: Send the terminal call request to the terminal; If no confirmation response is received from the terminal within a preset time period, the terminal call request is resent to the terminal.

10. The method according to claim 1, characterized in that, After performing task planning on the query task to obtain at least one subtask, the method further includes: If the intelligent agent that executes the standard protocol call determines that the task tool information of the subtask corresponds to a cloud tool, it encapsulates the data format of the standard protocol based on the task tool information corresponding to the subtask to obtain the cloud call request corresponding to the subtask. Send the cloud call request to the server where the cloud tool represented by the task tool information of the subtask is located.

11. The method according to claim 1, characterized in that, The step of sending a call request to the terminal, based on the task tool information corresponding to the subtask, corresponding to the local tool represented by the tool information of the subtask, includes: The task tool information corresponding to the subtask and the task objective of the subtask are input into the intelligent agent that executes the standard protocol tool call; The agent invoked through the execution standard protocol tool sends a request to the terminal to invoke the local tool represented by the task tool information of the subtask.

12. The method according to claim 1, characterized in that, Determining the processing result of the subtask based on the call result corresponding to the call request returned by the terminal includes: If the call result corresponding to the call request returned by the terminal is a call failure, the tool for executing the subtask is updated to a backup tool; Based on the processing result of the backup tool, the processing result of the subtask is determined.

13. The method according to claim 12, characterized in that, After updating the tool used to perform the subtask to a backup tool, the following is also included: If the backup tool fails to be invoked, the query task is re-planned to obtain at least one updated sub-task. The step of determining the response content for the query task based on the processing results corresponding to the at least one subtask includes: Based on the processing results corresponding to the at least one updated subtask, the response content for replying to the query task is determined.

14. A data processing method, characterized in that, Applied to a terminal, the method includes: Obtain a query task, query the local tools installed on the terminal, and obtain tool information corresponding to at least one local tool; Based on the query task and the tool information corresponding to the at least one local tool, the query request is determined; The query request is sent to the server to instruct the server to perform task planning for the query task, resulting in at least one subtask. For each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, a call request corresponding to the local tool represented by the task tool information of the subtask is returned based on the task tool information corresponding to the subtask. The at least one subtask carries corresponding task tool information, which is at least one of the tool information corresponding to the at least one local tool. Upon receiving the call request, the system invokes the local tool represented by the task tool information of the subtask, obtains the call result, and sends the call result to the server to instruct the server to determine the processing result of the subtask based on the call result. Based on the processing results corresponding to the at least one subtask, the system returns the response content of the query task. The response content is displayed.

15. The method according to claim 14, characterized in that, Before obtaining the query task, the following is also included: Display the target page, on which configuration controls for the local tools are displayed; In response to a triggered event on the configuration control, display a list of local tools; In response to a selection event for a target local tool from the list of local tools, the target local tool is installed onto the terminal.

16. The method according to claim 15, characterized in that, Following the display of the list of local tools, the following is also included: In response to a share event for a target local tool from the list of local tools, the link information of the target local tool is sent to other terminal accounts.

17. The method according to claim 14, characterized in that, Before obtaining the query task, the following is also included: Display the target page, on which a new control for local tools is displayed; In response to the trigger event for the newly created control, display the local tool creation page; The local tool import page receives the input of the link information of the local tool, and downloads the local tool from the third-party platform based on the link information to obtain the newly created local tool.

18. The method according to claim 14, characterized in that, The steps of receiving the invocation request, invoking the local tool represented by the tool information of the subtask, obtaining the invocation result, and sending the invocation result to the server include: Parse the invocation request to obtain the invocation instructions of the local tool represented by the tool information of the subtask; wherein, the invocation instructions include processing files in the target region of the terminal; Based on the invocation instruction, the files in the target area of ​​the terminal are processed to obtain the processing result, and the processing result is sent to the server.

19. A data processing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire a query request sent by the terminal; wherein the query request includes a query task and tool information corresponding to at least one local tool installed on the terminal; The task planning module is used to perform task planning on the query task to obtain at least one subtask; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool; The invocation module is used to send an invocation request corresponding to the local tool represented by the task tool information of the subtask to the terminal based on the task tool information corresponding to the subtask, when the task tool information of the subtask corresponds to a local tool. The first determining module is used to determine the processing result of the subtask based on the call result corresponding to the call request returned by the terminal; The second determining module is used to determine the response content for replying to the query task based on the processing results corresponding to the at least one subtask.

20. A data processing apparatus, characterized in that, The device includes: The second acquisition module is used to acquire query tasks, query local tools installed on the terminal, and obtain tool information corresponding to at least one local tool. The third determining module is used to determine the query request based on the query task and the tool information corresponding to the at least one local tool; A sending module is configured to send the query request to the server to instruct the server to perform task planning for the query task and obtain at least one subtask; for each subtask carrying corresponding task tool information, if the task tool information of the subtask corresponds to a local tool, based on the task tool information corresponding to the subtask, a call request corresponding to the local tool represented by the task tool information of the subtask is returned; wherein, the at least one subtask carries corresponding task tool information; the task tool information is at least one of the tool information corresponding to the at least one local tool; The receiving module is configured to receive the call request, call the local tool represented by the task tool information of the subtask, obtain the call result, send the call result to the server to instruct the server to determine the processing result of the subtask based on the call result, and return the response content of the query task based on the processing results corresponding to the at least one subtask. The display module is used to display the response content.

21. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13 or the steps of the method according to any one of claims 14 to 18.

22. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13 or the steps of the method according to any one of claims 14 to 18.

23. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 13 or the steps of the method according to any one of claims 14 to 18.