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

By adjusting the tool parameters when a large model fails to call the tool, the problem of users seeing incorrect results was solved, and the correct results were automatically generated, thus improving the user experience.

CN121326601APending Publication Date: 2026-01-13BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511386492.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

If a large model fails to invoke the tool, users may see incorrect results, affecting the user experience.

Method used

After generating the initial tool call command, if the execution fails, the initial tool parameters are adjusted according to the reason for the failure to obtain the adjusted target tool parameters, and the result is regenerated based on the target tool parameters.

Benefits of technology

When a large model fails to call the tool, the parameters are automatically adjusted to generate the correct results, improving the user experience without requiring manual operation from the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121326601A_ABST
    Figure CN121326601A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of large models, and discloses a data processing method and device, equipment, a storage medium and a product. After the initial tool calling instruction is called, if a returned tool execution result is execution failure, the initial tool parameters are adjusted according to failure reasons, then the initial tool calling instruction is adjusted based on the target tool parameters, and the adjusted target tool calling instruction is called to generate a result corresponding to the user request. According to the method, after the initial tool calling instruction is called, if the returned tool execution result is execution failure, the initial tool parameter is adjusted according to the failure reason, and the initial tool parameter can be automatically adjusted under the condition that the tool execution result received by a large model is execution failure, so that the operation efficiency is improved. And then the adjusted target tool calling instruction is called to generate the result corresponding to the user request, so that the correct result can be automatically generated under the condition that the large model calling tool fails, manual operation of the user is not needed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large models, and particularly relates to a data processing method and device, equipment, a storage medium and a product. BACKGROUND

[0002] After a large model determines that a certain tool needs to be called, an error may occur in the actual calling process, resulting in that a user sees an error result and affecting user experience. SUMMARY

[0003] The main purpose of the present application is to provide a data processing method, device, equipment, storage medium and product, which aims to solve the technical problem of how to generate a correct result in the case of failure of a large model calling a tool and improve user experience.

[0004] To achieve the above purpose, the present application provides a data processing method, which comprises the following steps:

[0005] In the case that a large model receives a user request, an initial tool calling instruction is generated, and the initial tool calling instruction comprises an initial tool and an initial tool parameter;

[0006] After the initial tool calling instruction is called, if the returned tool execution result is execution failure, the initial tool parameter is adjusted according to the failure reason to obtain a target tool parameter after adjustment;

[0007] The initial tool calling instruction is adjusted based on the target tool parameter, and a result corresponding to the user request is generated by calling the target tool calling instruction after adjustment.

[0008] Optionally, the initial tool parameter is adjusted according to the failure reason to obtain a target tool parameter after adjustment after the initial tool calling instruction is called if the returned tool execution result is execution failure, which comprises:

[0009] After the initial tool calling instruction is called, the tool execution result returned after each initial tool is called is obtained;

[0010] The target successful execution result of execution success and the target failed execution result of execution failure in the tool execution result are determined;

[0011] The initial tool parameter is adjusted according to the failure reason in the target successful execution result and the target failed execution result to obtain a target tool parameter after adjustment.

[0012] Optionally, the target successful execution result of execution success and the target failed execution result of execution failure in the tool execution result are determined, which comprises:

[0013] Extract the target keywords from the tool's execution results and match the target keywords with preset keywords to obtain matching results;

[0014] Based on the matching results, select the initial successful execution results and the initial failed execution results from the tool's execution results;

[0015] Based on the initial successful execution result and the initial failed execution result, determine the target successful execution result and the target failed execution result.

[0016] Optionally, determining the target successful execution result and the target failed execution result based on the initial successful execution result and the initial failed execution result includes:

[0017] Obtain the initial success field from the initial successful execution result and the initial failure field from the initial failed execution result;

[0018] The initial success field is compared with the expected success field corresponding to the user request to obtain a first comparison result;

[0019] The initial failure field is compared with the expected failure field corresponding to the user request to obtain a second comparison result;

[0020] Based on the first comparison result and the second comparison result, the initial successful execution result and the initial failed execution result are adjusted to obtain the target successful execution result and the target failed execution result.

[0021] Optionally, adjusting the initial tool parameters based on the reasons for failure in the successful execution result and the failed execution result of the target to obtain the adjusted target tool parameters includes:

[0022] Determine the cause of failure in the target execution result, and select the tool parameters that need to be adjusted from the initial tool parameters based on the cause of failure;

[0023] Determine the success result type in the successful execution result of the target;

[0024] Adjust the tool parameters that need to be adjusted according to the type of successful result to obtain the adjusted target tool parameters.

[0025] Optionally, adjusting the tool parameters that need adjustment according to the success result type to obtain the adjusted target tool parameters includes:

[0026] Based on the user's request, the tool parameters that need to be adjusted are initially adjusted to obtain the initially adjusted tool parameters;

[0027] If the tool execution result returned based on the initially adjusted tool parameters is an execution failure, then determine the failure result type and the failure tool parameters;

[0028] The successful result type is matched with the failed result type, and the failed tool parameters are adjusted according to the matching results to obtain the adjusted target tool parameters.

[0029] Optionally, the step of matching the success result type with the failure result type and adjusting the failure tool parameters according to the matching result to obtain the adjusted target tool parameters includes:

[0030] Match the success result type with the failure result type to obtain the matching result;

[0031] If the matching result is a successful match, then determine the success tool parameters corresponding to the success result type;

[0032] Determine the parameter type corresponding to the success tool parameter, and determine the reference tool parameter based on the parameter type;

[0033] The failed tool parameters are adjusted based on the reference tool parameters to obtain the adjusted target tool parameters.

[0034] Optionally, after adjusting the initial tool invocation instruction based on the target tool parameters and invoking the adjusted target tool invocation instruction to generate the result corresponding to the user request, the method further includes:

[0035] The generated result corresponding to the user request is fed back to the user, and the input content of the user feedback is obtained;

[0036] If the input content results in a non-compliant outcome, the target tool invocation instruction is adjusted based on the reason for the input to obtain the final adjusted tool invocation instruction.

[0037] The adjusted final tool call instruction is invoked to regenerate the target result corresponding to the user request.

[0038] Optionally, if the input content indicates that the result does not meet the requirements, the target tool invocation instruction is adjusted according to the input reason in the input content to obtain the adjusted final tool invocation instruction, including:

[0039] If the input content results in a non-compliant outcome, then the reason for the input content is determined.

[0040] Determine the target tool and target tool parameters in the target tool invocation command;

[0041] Based on the input reason, select the tool that needs to be adjusted from the target tools, and select the tool parameter that needs to be adjusted from the target tool parameters;

[0042] Based on the input reason, the tool to be adjusted and the tool parameters to be adjusted are adjusted respectively to obtain the final adjusted tool and the final adjusted tool parameters;

[0043] The final tool invocation instruction is generated based on the adjusted final tool and the adjusted final tool parameters.

[0044] Optionally, the step of generating an initial tool invocation instruction when the large model receives a user request includes:

[0045] When the large model receives a user request, it determines the request task type corresponding to the user request.

[0046] If the requested task type is a multimodal task, determine the target modality corresponding to the multimodal task;

[0047] An initial tool is selected from a preset tool list based on the target modality, and the parameters of the initial tool are determined based on the user request.

[0048] An initial tool invocation instruction is generated based on the initial tool and the initial tool parameters.

[0049] Optionally, when the requested task type is a multimodal task, determining the target modality corresponding to the multimodal task includes:

[0050] If the requested task type is a multimodal task, determine the input mode and output mode corresponding to the multimodal task;

[0051] Determine the intermediate modes required during the transition from the input mode to the output mode;

[0052] The target mode corresponding to the multimodal task is determined based on the input mode, the output mode, and the intermediate mode.

[0053] Furthermore, to achieve the above objectives, this application also provides a data processing apparatus, the data processing apparatus comprising:

[0054] The instruction generation module is used to generate an initial tool invocation instruction when the large model receives a user request. The initial tool invocation instruction includes an initial tool and initial tool parameters.

[0055] The parameter adjustment module is used to adjust the initial tool parameters according to the reason for failure if the tool execution result returned after the initial tool call instruction is called and the target tool parameters are obtained after the adjustment.

[0056] The result generation module is used to adjust the initial tool invocation instruction based on the target tool parameters, and invoke the adjusted target tool invocation instruction to generate the result corresponding to the user request.

[0057] Optionally, the parameter adjustment module is further configured to, after calling the initial tool call instruction, obtain the tool execution results returned after calling each initial tool; determine the successful execution results and the failed execution results in the tool execution results; and adjust the initial tool parameters according to the failure reasons in the successful execution results and the failed execution results to obtain the adjusted target tool parameters.

[0058] Optionally, the parameter adjustment module is further configured to extract target keywords from the tool execution results, match the target keywords with preset keywords to obtain matching results; select initial successful execution results and initial failed execution results from the tool execution results based on the matching results; and determine the target successful execution result and the target failed execution result based on the initial successful execution results and the initial failed execution results.

[0059] Optionally, the parameter adjustment module is further configured to: obtain the initial success field in the initial successful execution result and the initial failure field in the initial failed execution result; compare the initial success field with the expected success field corresponding to the user request to obtain a first comparison result; compare the initial failure field with the expected failure field corresponding to the user request to obtain a second comparison result; and adjust the initial successful execution result and the initial failed execution result according to the first comparison result and the second comparison result to obtain the target successful execution result and the target failed execution result.

[0060] Optionally, the parameter adjustment module is further configured to determine the failure reason in the target failed execution result, and select the tool parameter to be adjusted from the initial tool parameters according to the failure reason; determine the success result type in the target successful execution result; and adjust the tool parameter to be adjusted according to the success result type to obtain the adjusted target tool parameter.

[0061] Optionally, the parameter adjustment module is further configured to perform preliminary adjustment on the tool parameters to be adjusted according to the user request to obtain the tool parameters after preliminary adjustment; if the tool execution result returned based on the tool parameters after preliminary adjustment is execution failure, then determine the failure result type and the failure tool parameters; match the success result type with the failure result type, and adjust the failure tool parameters according to the matching result to obtain the target tool parameters after adjustment.

[0062] In addition, to achieve the above objectives, this application also proposes a data processing apparatus, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data processing method described above.

[0063] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the data processing method described above.

[0064] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the data processing method described above.

[0065] This application generates an initial tool invocation instruction upon receiving a user request in a large model. This instruction includes an initial tool and initial tool parameters. If the tool execution fails after invoking the initial tool invocation instruction, the initial tool parameters are adjusted based on the failure reason to obtain adjusted target tool parameters. The initial tool invocation instruction is then adjusted based on these target tool parameters, and finally, the adjusted target tool invocation instruction is invoked to generate the result corresponding to the user request. This application automatically adjusts the initial tool parameters and invokes the adjusted target tool invocation instruction to generate the result corresponding to the user request even when the large model receives a failed tool execution result. This ensures that the correct result is automatically generated even if the large model fails to invoke the tool, eliminating the need for manual user intervention and improving the user experience. Attached Figure Description

[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application;

[0069] Figure 2 This is a flowchart illustrating the second embodiment of the data processing method of this application;

[0070] Figure 3 This is a flowchart illustrating the third embodiment of the data processing method of this application;

[0071] Figure 4 This is a structural block diagram of the first embodiment of the data processing apparatus of this application;

[0072] Figure 5 This is a schematic diagram of the structure of the data processing device in the hardware operating environment involved in the embodiments of this application.

[0073] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0074] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0075] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0076] The main solution of this application embodiment is as follows: When the large model receives a user request, it generates an initial tool invocation instruction, which includes an initial tool and initial tool parameters. After invoking the initial tool invocation instruction, if the returned tool execution result is an execution failure, the initial tool parameters are adjusted according to the reason for the failure to obtain adjusted target tool parameters. Based on the target tool parameters, the initial tool invocation instruction is adjusted, and the adjusted target tool invocation instruction is invoked to generate the result corresponding to the user request. After the large model determines that a certain tool needs to be invoked, errors may occur during the actual invocation process, causing the user to see incorrect results and affecting the user experience.

[0077] This application generates an initial tool invocation instruction upon receiving a user request in a large model. This instruction includes an initial tool and initial tool parameters. If the tool execution fails after invoking the initial tool invocation instruction, the initial tool parameters are adjusted based on the failure reason to obtain adjusted target tool parameters. The initial tool invocation instruction is then adjusted based on these target tool parameters, and finally, the adjusted target tool invocation instruction is invoked to generate the result corresponding to the user request. This application automatically adjusts the initial tool parameters and invokes the adjusted target tool invocation instruction to generate the result corresponding to the user request even when the large model receives a failed tool execution result. This ensures that the correct result is automatically generated even if the large model fails to invoke the tool, eliminating the need for manual user intervention and improving the user experience.

[0078] It should be noted that the executing entity of this application can be a large model, such as a large language model, a multimodal large model, a large video model, a large code model, a vector embedding model, etc.

[0079] Based on this, embodiments of this application provide a data processing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application.

[0080] In this embodiment, the data processing method includes the following steps:

[0081] Step S10: When the large model receives a user request, an initial tool invocation instruction is generated, which includes an initial tool and initial tool parameters.

[0082] Understandably, user requests can be requests such as video generation or question-and-answer generation. When the large model receives a user request, it can generate an initial tool invocation instruction. The initial tool invocation instruction can include an initial tool and initial tool parameters. The initial tool is the tool selected by the large model to be invoked, which can be a function. The initial tool parameters can be function parameters. For example, if the user request is "generate an image depicting a war scene, with explosions and soldiers", the initial tool is generate_image, and the initial tool parameters are {prompt:"war scene", explosion, soldiers}.

[0083] Furthermore, in order to accurately generate the initial tool invocation instruction, in this embodiment, step S10 includes: when the large model receives a user request, determining the request task type corresponding to the user request; when the request task type is a multimodal task, determining the target modality corresponding to the multimodal task; selecting an initial tool from a preset tool list according to the target modality, and determining the initial tool parameters according to the user request; and generating the initial tool invocation instruction according to the initial tool and the initial tool parameters.

[0084] It should be understood that when a large model receives a user request, it can determine the type of the request task. This type can include unimodal and multimodal tasks. A unimodal task refers to input and / or output involving only one modality, such as text classification, speech recognition (speech → text), and image classification. A multimodal task refers to input and / or output involving two or more modalities, such as speech question answering (text + audio → audio), visual question answering (image + text → text), and video generation (text → video + audio).

[0085] Understandably, when the requested task type is a single-modal task, only one tool may need to be called. Therefore, the initial tool call instruction can be generated directly according to the tool to be called and the corresponding tool parameters.

[0086] In a practical implementation, when the requested task type is a multimodal task, the target modality corresponding to the multimodal task can be determined first. The target modality can include all modalities traversed during task execution. Then, an initial tool is selected from a preset tool list based on the target modality. The preset tool list can be a pre-defined list of all tools that the server can call. In one feasible embodiment, tools related to the target modality can be selected first from the preset tool list, and then the initial tool can be selected from these tools. The initial tool parameters corresponding to the initial tool are determined based on the user request, and then an initial tool invocation instruction is generated based on the initial tool and its parameters.

[0087] Furthermore, in order to effectively obtain the target modality corresponding to the multimodal task, in this embodiment, determining the target modality corresponding to the multimodal task when the requested task type is a multimodal task includes: determining the input modality and output modality corresponding to the multimodal task when the requested task type is a multimodal task; determining the intermediate modality required in the process of converting from the input modality to the output modality; and determining the target modality corresponding to the multimodal task based on the input modality, the output modality, and the intermediate modality.

[0088] Understandably, when the request task type is a multimodal task, the input modality and output modality corresponding to the multimodal task can be determined. The input modality can be the modality corresponding to the content received by the large model, and the output modality can be the modality corresponding to the content output by the large model. The intermediate modalities required by the large model to transform from the input modality to the output modality are also determined, such as from text → audio → video, where the intermediate modality can be audio. The input modality, output modality, and intermediate modality are then used as the target modality corresponding to the multimodal task. For example, if a user requests, "Help me generate a 30-second short video: a cute Shiba Inu wearing sunglasses surfing on a Hawaiian beach with a sunset background and upbeat music," this request is a multimodal request, involving modalities including visual, audio, temporal, and scene description.

[0089] Step S20: After invoking the initial tool invocation instruction, if the returned tool execution result is execution failure, the initial tool parameters are adjusted according to the reason for failure to obtain the adjusted target tool parameters.

[0090] It should be understood that after the large model invokes the initial tool invocation command, the initial tool invocation command can be executed through the server. If the server returns a tool execution failure result, the initial tool parameters can be adjusted according to the reason for the failure. For example, if the tool execution result is "Error: Sensitive content detected, Terms: 'war', 'explosion', Image generation is restricted under safety guidelines", the reason for the failure is that sensitive content was detected, involving the words "war" and "explosion". According to the safety guidelines, the image generation function is restricted. Therefore, the initial tool parameter "war" can be adjusted to "technological defense war", and the initial tool parameter "explosion" can be adjusted to "light and shadow explosion", and these can be used as the adjusted target parameters.

[0091] Step S30: Adjust the initial tool invocation command based on the target tool parameters, and invoke the adjusted target tool invocation command to generate the result corresponding to the user request.

[0092] In a practical implementation, the initial tool invocation command can be adjusted based on the target tool parameters to obtain the adjusted target tool invocation command. The adjusted target tool invocation command can include the initial tool and target tool parameters. Then, the adjusted target tool invocation command is invoked to generate the result corresponding to the user request and the result is displayed to the user.

[0093] This embodiment generates an initial tool invocation command when the large model receives a user request. The initial tool invocation command includes an initial tool and initial tool parameters. After invoking the initial tool invocation command, if the returned tool execution result is a failure, the initial tool parameters are adjusted according to the failure reason to obtain adjusted target tool parameters. Then, the initial tool invocation command is adjusted based on the target tool parameters, and the adjusted target tool invocation command is invoked to generate the result corresponding to the user request. This embodiment automatically adjusts the initial tool parameters based on the failure reason after invoking the initial tool invocation command, and then invokes the adjusted target tool invocation command to generate the result corresponding to the user request, thus automatically generating the correct result even when the large model fails to invoke the tool, without requiring manual user operation, improving the user experience.

[0094] refer to Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the data processing method of this application.

[0095] Based on the first embodiment described above, in this embodiment, step S20 includes:

[0096] Step S201: After invoking the initial tool invocation instruction, obtain the tool execution results returned after invoking each initial tool.

[0097] It should be understood that after invoking the initial tool invocation instruction, the initial tool invocation instruction may contain multiple initial tools, and thus the tool execution results returned after invoking each initial tool can be obtained.

[0098] Step S202: Determine the successful execution results of the target and the failed execution results of the target in the execution results of the tool.

[0099] Understandably, since tool execution results include multiple outcomes, some results may be successful and some may be unsuccessful. Successful execution results and unsuccessful execution results can be selected from these results. For example, if a user requests "Generate a 30-second short video: a cute Shiba Inu wearing sunglasses surfing on a Hawaiian beach with a sunset background and upbeat music," the tools invoked could include: generating video footage (generate_video(prompt, duration=30), generating background music (generate_music(style="upbeat", mood="cheerful")), generating voiceover / subtitles (generate_subtitle(text="KuGou Surfing Diary")), and final merging (merge_video_audio(video,music,subtitle)). These tool execution results may include both successful and unsuccessful execution results.

[0100] Furthermore, in order to accurately select the target successful execution result and the target failed execution result, in this embodiment, step S202 includes: extracting target keywords from the tool execution result and matching the target keywords with preset keywords to obtain matching results; selecting the initial successful execution result and the initial failed execution result from the tool execution result based on the matching results; and determining the target successful execution result and the target failed execution result based on the initial successful execution result and the initial failed execution result.

[0101] It should be understood that target keywords can be extracted from the tool's execution results and matched with preset keywords. For example, preset keywords for execution failure include "Error," "failed," and "not found." If a match is found between the target keyword and the preset keywords for execution failure, the tool's execution result corresponding to that target keyword can be used as the initial failure execution result, and the remaining tool execution results can be used as the initial success execution result. The accuracy of the initial success and initial failure execution results can be further evaluated to obtain the target success execution result for successful execution and the target failure execution result for failed execution.

[0102] Furthermore, to more accurately select the target successful execution result and the target failed execution result, in this embodiment, determining the successful target successful execution result and the failed target failed execution result based on the initial successful execution result and the initial failed execution result includes: obtaining the initial success field in the initial successful execution result and the initial failure field in the initial failed execution result; comparing the initial success field with the expected success field corresponding to the user request to obtain a first comparison result; comparing the initial failure field with the expected failure field corresponding to the user request to obtain a second comparison result; and adjusting the initial successful execution result and the initial failed execution result based on the first comparison result and the second comparison result to obtain the successful target successful execution result and the failed target failed execution result.

[0103] Understandably, it is possible to obtain the initial success field from the initial successful execution result and the initial failure field from the initial failed execution result. On success, it returns JSON containing the expected fields, while on failure, it may be empty or contain garbled characters.

[0104] It should be understood that the expected success field corresponding to the user request can be a JSON-formatted field that corresponds to the user request, while the expected failure field can be empty or contain garbled characters. Comparing the initial success field with the expected success field yields a first comparison result, which can further determine whether the initial successful execution result is accurate. If the first comparison result indicates that the initial success field is not within the expected success field, the corresponding initial successful execution result can be used as the target failure execution result for execution failure; if the first comparison result indicates that the initial success field is within the expected success field, the corresponding initial successful execution result can be used as the target successful execution result for execution success.

[0105] In the specific implementation, the initial failure field is compared with the expected failure field to obtain a second comparison result, which can further determine whether the initial failure execution result is accurate. If the second comparison result shows that the initial failure field is not within the expected failure field, the corresponding initial failure execution result can be used as the target successful execution result. If the second comparison result shows that the initial failure field is within the expected failure field, the corresponding initial failure execution result can be used as the target failure execution result.

[0106] Step S203: Adjust the initial tool parameters according to the reasons for failure in the successful execution result and the failed execution result of the target, and obtain the adjusted target tool parameters.

[0107] It should be understood that this embodiment can adjust the initial tool parameters based on the failure reason in the target failure execution result, and can also further adjust the initial tool parameters based on the target success execution result to obtain the adjusted target tool parameters.

[0108] Furthermore, in order to accurately and effectively adjust the initial tool parameters, in this embodiment, step S203 includes: determining the failure reason in the target failed execution result, and selecting the tool parameters that need to be adjusted from the initial tool parameters according to the failure reason; determining the success result type in the target successful execution result; adjusting the tool parameters that need to be adjusted according to the success result type to obtain the adjusted target tool parameters.

[0109] Understandably, the reason for the failure in the target execution result can be determined, and the tool parameters that need to be adjusted can be selected from the initial tool parameters based on the reason for the failure. For example, if the reason for the failure is that sensitive content was detected, involving the words "war" and "explosion", the tool parameters that need to be adjusted are "war" and "explosion".

[0110] It should be understood that the success result type in the target successful execution result can be the result type returned by the server, which may include video, audio, text, etc. Then, the tool parameters that need to be adjusted are adjusted according to the success result type. In one feasible embodiment, the result type that the tool corresponding to the tool parameter that needs to be adjusted should return can be determined, and then a type with the same result type can be selected from the success result types. The tool parameters that need to be adjusted are then further adjusted based on the tool parameters corresponding to that type to obtain the adjusted target tool parameters.

[0111] Furthermore, in order to accurately adjust the tool parameters that need adjustment, in this embodiment, adjusting the tool parameters that need adjustment according to the success result type to obtain the adjusted target tool parameters includes: performing a preliminary adjustment on the tool parameters that need adjustment according to the user request to obtain the preliminary adjusted tool parameters; if the tool execution result returned based on the preliminary adjusted tool parameters is an execution failure, then determining the failure result type and the failure tool parameters; matching the success result type with the failure result type, and adjusting the failure tool parameters according to the matching result to obtain the adjusted target tool parameters.

[0112] Understandably, the tool parameters that need adjustment can be initially adjusted based on user requests to obtain the preliminarily adjusted tool parameters, such as adjusting "explosion" to "light and shadow burst". Based on the preliminarily adjusted tool parameters and the initial tool, a new tool invocation command can be obtained. After the large model invokes this command, if the returned tool execution result is failure, it indicates that there may still be problems with the preliminarily adjusted tool parameters. At this point, the failure result type and the failing tool parameters can be determined. The failure result type refers to the type of result the tool should return corresponding to the preliminarily adjusted tool parameters, and the failing tool parameters refer to the preliminarily adjusted tool parameters.

[0113] In a specific implementation, the success result type can be matched with the failure result type, and the same type as the failure result type can be selected from the success result types. Then, the failure tool parameters can be adjusted according to the tool parameters corresponding to the success result type. In a feasible embodiment, all relevant parameters that can return the success result type can be selected from the context, and then the adjusted target tool parameters related to the failure tool parameters can be selected from these relevant parameters.

[0114] Further, in this embodiment, the step of matching the success result type with the failure result type and adjusting the failure tool parameters according to the matching result to obtain the adjusted target tool parameters includes: matching the success result type with the failure result type to obtain a matching result; if the matching result is a successful match, determining the success tool parameter corresponding to the success result type; determining the parameter type corresponding to the success tool parameter and determining a reference tool parameter according to the parameter type; adjusting the failure tool parameters according to the reference tool parameters to obtain the adjusted target tool parameters.

[0115] It should be understood that successful result types can be matched with failed result types to obtain matching results. If the matching result is successful, the successful tool parameters corresponding to the successful result types that are the same as the failed result types can be determined. Successful tool parameters can include tool parameters corresponding to all successful result types that are the same as the failed result types.

[0116] In a practical implementation, the parameter type corresponding to the successful tool parameter can be determined, such as time, location, etc. Then, reference tool parameters are selected from the context based on the parameter type. These reference tool parameters can be all tool parameters of the same type as those mentioned above. The failed tool parameters are then adjusted based on the reference tool parameters. In one feasible embodiment, the required failure parameter type for the tool corresponding to the failed tool parameter can be determined first, and then the most relevant parameter of the same type as the failed parameter can be selected from the reference tool parameters as the adjusted target tool parameter.

[0117] This embodiment, after invoking the initial tool invocation command, obtains the tool execution results returned after each initial tool invocation. Then, it determines the successful execution results and the failed execution results from the tool execution results. Finally, based on the failure reasons in the successful and failed execution results, it adjusts the initial tool parameters to obtain the adjusted target tool parameters. This embodiment, after invoking the initial tool invocation command, if multiple tools need to be invoked, can adjust the initial tool parameters based on the failure reasons in the successful and failed execution results, thereby improving the accuracy of the adjusted target tool parameters.

[0118] refer to Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the data processing method of this application.

[0119] Based on the above embodiments, in this embodiment, after step S30, the method further includes:

[0120] Step S40: Feed back the generated result corresponding to the user request to the user, and obtain the input content of the user feedback.

[0121] Understandably, the results corresponding to the generated user request can be fed back to the user, and the user's input can be obtained. Since the results generated by the large model may not meet the requirements, the user needs to continue to communicate with the large model and input content into the large model.

[0122] Step S50: If the input content is that the result does not meet the requirements, the target tool call instruction is adjusted according to the input reason in the input content to obtain the adjusted final tool call instruction.

[0123] It should be understood that if the user inputs content indicating that the result does not meet the requirements or other related content, it can be determined that the user is not satisfied with the generated result. The target tool call instruction can be adjusted based on the reason in the input content to obtain the final adjusted tool call instruction. The reason can be the direction that the user wants to adjust, for example, representing the generated text result in a table.

[0124] Furthermore, in order to accurately and effectively adjust the target tool invocation command, in this embodiment, step S50 includes: if the input content indicates that the result does not meet the requirements, then determining the input reason in the input content; determining the target tool and target tool parameters in the target tool invocation command; selecting the tool to be adjusted from the target tools according to the input reason, and selecting the tool parameters to be adjusted from the target tool parameters; adjusting the tool to be adjusted and the tool parameters to be adjusted according to the input reason, respectively, to obtain the adjusted final tool and the adjusted final tool parameters; generating the final tool invocation command based on the adjusted final tool and the adjusted final tool parameters.

[0125] Understandably, if the user input results in an unacceptable outcome, the reason for the input can be identified, along with the target tool and its parameters in the target tool invocation command. Based on the input reason, the tool requiring adjustment can be selected from the target tools. For example, if the input reason is to represent the generated text results in a table, tools related to text conversion can be selected as the tools requiring adjustment, and the corresponding tool parameters can be chosen from the target tool parameters.

[0126] In practice, the tool and its parameters can be adjusted based on the input reason. For example, if the tool is related to text conversion, the parameters could be the content to be converted. Finally, the final tool invocation command is generated based on the adjusted tool and its parameters.

[0127] Step S60: Invoke the adjusted final tool invocation command to regenerate the target result corresponding to the user request.

[0128] It should be understood that the adjusted final tool call instruction can be invoked to regenerate the target result corresponding to the user request and display the target result to the user.

[0129] This embodiment feeds back the generated result corresponding to the user request to the user and obtains the user's input. If the input indicates that the result does not meet the requirements, the target tool invocation instruction is adjusted based on the reason given in the input, resulting in a revised final tool invocation instruction. This revised final tool invocation instruction is then used to regenerate the target result corresponding to the user request. In this embodiment, when the input indicates that the result does not meet the requirements, the target tool invocation instruction is adjusted based on the reason given in the input, and then the revised final tool invocation instruction is used to regenerate the target result corresponding to the user request, thereby ensuring that the final displayed target result meets the user's requirements.

[0130] Reference Figure 4 ,Figure 4 This is a structural block diagram of the first embodiment of the data processing apparatus of this application.

[0131] like Figure 4 As shown, the data processing apparatus proposed in this application embodiment includes:

[0132] The instruction generation module 10 is used to generate an initial tool invocation instruction when the large model receives a user request. The initial tool invocation instruction includes an initial tool and initial tool parameters.

[0133] The parameter adjustment module 20 is used to adjust the initial tool parameters according to the reason for failure if the returned tool execution result is failure after the initial tool call instruction is invoked, so as to obtain the adjusted target tool parameters.

[0134] The result generation module 30 is used to adjust the initial tool call instruction based on the target tool parameters, and call the adjusted target tool call instruction to generate the result corresponding to the user request.

[0135] This embodiment generates an initial tool invocation command when the large model receives a user request. The initial tool invocation command includes an initial tool and initial tool parameters. After invoking the initial tool invocation command, if the returned tool execution result is a failure, the initial tool parameters are adjusted according to the failure reason to obtain adjusted target tool parameters. Then, the initial tool invocation command is adjusted based on the target tool parameters, and the adjusted target tool invocation command is invoked to generate the result corresponding to the user request. This embodiment automatically adjusts the initial tool parameters based on the failure reason after invoking the initial tool invocation command, and then invokes the adjusted target tool invocation command to generate the result corresponding to the user request, thus automatically generating the correct result even when the large model fails to invoke the tool, without requiring manual user operation, improving the user experience.

[0136] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this application. In practical applications, those skilled in the art can select some or all of it to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0137] In addition, for technical details not described in detail in this embodiment, please refer to the data processing method provided in any embodiment of this application, which will not be repeated here.

[0138] Based on the first embodiment of the data processing apparatus described above, a second embodiment of the data processing apparatus of this application is proposed.

[0139] In this embodiment, the parameter adjustment module 20 is further configured to, after calling the initial tool call instruction, obtain the tool execution results returned after calling each initial tool; determine the target successful execution result and the target failed execution result in the tool execution results; and adjust the initial tool parameters according to the failure reasons in the target successful execution result and the target failed execution result to obtain the adjusted target tool parameters.

[0140] Furthermore, the parameter adjustment module 20 is also used to extract target keywords from the tool execution results, and match the target keywords with preset keywords to obtain matching results; select initial successful execution results and initial failed execution results from the tool execution results based on the matching results; and determine the target successful execution results and the target failed execution results based on the initial successful execution results and the initial failed execution results.

[0141] Furthermore, the parameter adjustment module 20 is also used to obtain the initial success field in the initial successful execution result and the initial failure field in the initial failed execution result; compare the initial success field with the expected success field corresponding to the user request to obtain a first comparison result; compare the initial failure field with the expected failure field corresponding to the user request to obtain a second comparison result; and adjust the initial successful execution result and the initial failed execution result according to the first comparison result and the second comparison result to obtain the target successful execution result and the target failed execution result.

[0142] Furthermore, the parameter adjustment module 20 is also used to determine the failure reason in the target failed execution result, and select the tool parameter to be adjusted from the initial tool parameter according to the failure reason; determine the success result type in the target successful execution result; and adjust the tool parameter to be adjusted according to the success result type to obtain the adjusted target tool parameter.

[0143] Furthermore, the parameter adjustment module 20 is also used to perform preliminary adjustment of the tool parameters to be adjusted according to the user request to obtain the tool parameters after preliminary adjustment; if the tool execution result returned based on the tool parameters after preliminary adjustment is execution failure, then determine the failure result type and the failure tool parameters; match the success result type with the failure result type, and adjust the failure tool parameters according to the matching result to obtain the target tool parameters after adjustment.

[0144] Furthermore, the parameter adjustment module 20 is also used to match the success result type with the failure result type to obtain a matching result; if the matching result is a successful match, then determine the success tool parameter corresponding to the success result type; determine the parameter type corresponding to the success tool parameter, and determine the reference tool parameter according to the parameter type; adjust the failure tool parameter according to the reference tool parameter to obtain the adjusted target tool parameter.

[0145] Furthermore, the result generation module 30 is also used to feed back the generated result corresponding to the user request to the user, and obtain the input content fed back by the user; if the input content indicates that the result does not meet the requirements, the target tool call instruction is adjusted according to the input reason in the input content to obtain the adjusted final tool call instruction; the adjusted final tool call instruction is called to generate the target result corresponding to the user request again.

[0146] Furthermore, the result generation module 30 is also configured to: determine the input reason in the input content if the input content is that the result does not meet the requirements; determine the target tool and target tool parameters in the target tool call instruction; select the tool to be adjusted from the target tools according to the input reason, and select the tool parameters to be adjusted from the target tool parameters; adjust the tool to be adjusted and the tool parameters to be adjusted according to the input reason to obtain the adjusted final tool and the adjusted final tool parameters; and generate the final tool call instruction according to the adjusted final tool and the adjusted final tool parameters.

[0147] Furthermore, the instruction generation module 10 is also configured to, when the large model receives a user request, determine the request task type corresponding to the user request; when the request task type is a multimodal task, determine the target modality corresponding to the multimodal task; select an initial tool from a preset tool list according to the target modality, and determine the initial tool parameters according to the user request; and generate an initial tool invocation instruction according to the initial tool and the initial tool parameters.

[0148] Furthermore, the instruction generation module 10 is also configured to, when the requested task type is a multimodal task, determine the input mode and output mode corresponding to the multimodal task; determine the intermediate mode required in the process of converting from the input mode to the output mode; and determine the target mode corresponding to the multimodal task based on the input mode, the output mode, and the intermediate mode.

[0149] Other embodiments or specific implementations of the data processing device of this application can be found in the above-described method embodiments, and will not be repeated here.

[0150] This application provides a data processing apparatus, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data processing method in Embodiment 1 above.

[0151] The following is for reference. Figure 5 This document illustrates a structural diagram of a data processing device suitable for implementing embodiments of this application. The data processing device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The data processing device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0152] like Figure 5 As shown, the data processing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the data processing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the data processing device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show data processing devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.

[0153] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0154] The data processing device provided in this application, employing the data processing method described in the above embodiments, can solve the technical problem of generating correct results and improving user experience when large model tool calls fail. Compared with the prior art, the beneficial effects of the data processing device provided in this application are the same as those of the data processing method described in the above embodiments, and other technical features of this data processing device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0155] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0156] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0157] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the data processing method described in the above embodiments.

[0158] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0159] The aforementioned computer-readable storage medium may be included in a data processing device or may exist independently without being assembled into a data processing device.

[0160] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a data processing device, the data processing device: upon receiving a user request in a large model, generates an initial tool invocation instruction, which includes an initial tool and initial tool parameters; after invoking the initial tool invocation instruction, if the returned tool execution result is an execution failure, the initial tool parameters are adjusted according to the reason for the failure to obtain adjusted target tool parameters; the initial tool invocation instruction is adjusted based on the target tool parameters, and the adjusted target tool invocation instruction is invoked to generate the result corresponding to the user request.

[0161] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0163] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0164] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data processing method. This solves the technical problem of generating correct results and improving user experience even when large-scale model tool calls fail. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the data processing method provided in the above embodiments, and will not be repeated here.

[0165] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data processing method described above.

[0166] The computer program product provided in this application solves the technical problem of generating correct results and improving user experience when large model tool calls fail. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the data processing method provided in the above embodiments, and will not be repeated here.

[0167] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.

[0168] This application discloses A1. A data processing method, the data processing method comprising the following steps:

[0169] Upon receiving a user request, the large model generates an initial tool invocation instruction, which includes an initial tool and initial tool parameters.

[0170] After invoking the initial tool invocation command, if the returned tool execution result is execution failure, the initial tool parameters are adjusted according to the reason for failure to obtain the adjusted target tool parameters;

[0171] The initial tool invocation command is adjusted based on the target tool parameters, and the adjusted target tool invocation command is invoked to generate the result corresponding to the user request.

[0172] A2. The data processing method as described in A1, wherein after invoking the initial tool invocation instruction, if the returned tool execution result is an execution failure, the initial tool parameters are adjusted according to the reason for the failure to obtain the adjusted target tool parameters, including:

[0173] After invoking the initial tool invocation command, obtain the tool execution results returned after invoking each initial tool;

[0174] Determine the successful execution results of the target and the failed execution results of the target in the execution results of the tool;

[0175] The initial tool parameters are adjusted based on the reasons for failure in the successful execution results and the failed execution results of the target, to obtain the adjusted target tool parameters.

[0176] A3. The data processing method as described in A2, wherein determining the successful execution result of the target and the unsuccessful execution result of the target in the execution result of the tool includes:

[0177] Extract the target keywords from the tool's execution results and match the target keywords with preset keywords to obtain matching results;

[0178] Based on the matching results, select the initial successful execution results and the initial failed execution results from the tool's execution results;

[0179] Based on the initial successful execution result and the initial failed execution result, determine the target successful execution result and the target failed execution result.

[0180] A4. The data processing method as described in A3, wherein determining the target successful execution result and the target failed execution result based on the initial successful execution result and the initial failed execution result includes:

[0181] Obtain the initial success field from the initial successful execution result and the initial failure field from the initial failed execution result;

[0182] The initial success field is compared with the expected success field corresponding to the user request to obtain a first comparison result;

[0183] The initial failure field is compared with the expected failure field corresponding to the user request to obtain a second comparison result;

[0184] Based on the first comparison result and the second comparison result, the initial successful execution result and the initial failed execution result are adjusted to obtain the target successful execution result and the target failed execution result.

[0185] A5. The data processing method as described in A2, wherein adjusting the initial tool parameters based on the failure reasons in the successful execution result and the failed execution result of the target to obtain the adjusted target tool parameters includes:

[0186] Determine the cause of failure in the target execution result, and select the tool parameters that need to be adjusted from the initial tool parameters based on the cause of failure;

[0187] Determine the success result type in the successful execution result of the target;

[0188] Adjust the tool parameters that need to be adjusted according to the type of successful result to obtain the adjusted target tool parameters.

[0189] A6. The data processing method as described in A5, wherein adjusting the tool parameters to be adjusted according to the success result type to obtain the adjusted target tool parameters includes:

[0190] Based on the user's request, the tool parameters that need to be adjusted are initially adjusted to obtain the initially adjusted tool parameters;

[0191] If the tool execution result returned based on the initially adjusted tool parameters is an execution failure, then determine the failure result type and the failure tool parameters;

[0192] The successful result type is matched with the failed result type, and the failed tool parameters are adjusted according to the matching results to obtain the adjusted target tool parameters.

[0193] A7. The data processing method as described in A6, wherein matching the success result type with the failure result type and adjusting the failure tool parameters according to the matching result to obtain the adjusted target tool parameters includes:

[0194] Match the success result type with the failure result type to obtain the matching result;

[0195] If the matching result is a successful match, then determine the success tool parameters corresponding to the success result type;

[0196] Determine the parameter type corresponding to the success tool parameter, and determine the reference tool parameter based on the parameter type;

[0197] The failed tool parameters are adjusted based on the reference tool parameters to obtain the adjusted target tool parameters.

[0198] A8. The data processing method as described in A1, after adjusting the initial tool invocation instruction based on the target tool parameters and invoking the adjusted target tool invocation instruction to generate the result corresponding to the user request, further includes:

[0199] The generated result corresponding to the user request is fed back to the user, and the input content of the user feedback is obtained;

[0200] If the input content results in a non-compliant outcome, the target tool invocation instruction is adjusted based on the reason for the input to obtain the final adjusted tool invocation instruction.

[0201] The adjusted final tool call instruction is invoked to regenerate the target result corresponding to the user request.

[0202] A9. The data processing method as described in A8, wherein if the input content results in a non-compliant outcome, the target tool invocation instruction is adjusted based on the input reason in the input content to obtain the adjusted final tool invocation instruction, including:

[0203] If the input content results in a non-compliant outcome, then the reason for the input content is determined.

[0204] Determine the target tool and target tool parameters in the target tool invocation command;

[0205] Based on the input reason, select the tool that needs to be adjusted from the target tools, and select the tool parameter that needs to be adjusted from the target tool parameters;

[0206] Based on the input reason, the tool to be adjusted and the tool parameters to be adjusted are adjusted respectively to obtain the final adjusted tool and the final adjusted tool parameters;

[0207] The final tool invocation instruction is generated based on the adjusted final tool and the adjusted final tool parameters.

[0208] A10. The data processing method as described in any one of A1 to A9, wherein generating an initial tool invocation instruction upon receiving a user request in the large model includes:

[0209] When the large model receives a user request, it determines the request task type corresponding to the user request.

[0210] If the requested task type is a multimodal task, determine the target modality corresponding to the multimodal task;

[0211] An initial tool is selected from a preset tool list based on the target modality, and the parameters of the initial tool are determined based on the user request.

[0212] An initial tool invocation instruction is generated based on the initial tool and the initial tool parameters.

[0213] A11. The data processing method as described in A10, wherein when the requested task type is a multimodal task, determining the target modality corresponding to the multimodal task includes:

[0214] If the requested task type is a multimodal task, determine the input mode and output mode corresponding to the multimodal task;

[0215] Determine the intermediate modes required during the transition from the input mode to the output mode;

[0216] The target mode corresponding to the multimodal task is determined based on the input mode, the output mode, and the intermediate mode.

[0217] This application also discloses B12. A data processing apparatus, the data processing apparatus comprising:

[0218] The instruction generation module is used to generate an initial tool invocation instruction when the large model receives a user request. The initial tool invocation instruction includes an initial tool and initial tool parameters.

[0219] The parameter adjustment module is used to adjust the initial tool parameters according to the reason for failure if the tool execution result returned after the initial tool call instruction is called and the target tool parameters are obtained after the adjustment.

[0220] The result generation module is used to adjust the initial tool invocation instruction based on the target tool parameters, and invoke the adjusted target tool invocation instruction to generate the result corresponding to the user request.

[0221] B13. The data processing apparatus as described in B12, wherein the parameter adjustment module is further configured to, after calling the initial tool call instruction, obtain the tool execution results returned after calling each initial tool; determine the target successful execution results and the target failure execution results in the tool execution results; and adjust the initial tool parameters according to the failure reasons in the target successful execution results and the target failure execution results to obtain the adjusted target tool parameters.

[0222] B14. The data processing apparatus as described in B13, wherein the parameter adjustment module is further configured to extract target keywords from the tool execution results, and match the target keywords with preset keywords to obtain matching results; select initial successful execution results and initial failed execution results from the tool execution results based on the matching results; and determine target successful execution results and target failed execution results based on the initial successful execution results and the initial failed execution results.

[0223] B15. The data processing apparatus as described in B14, wherein the parameter adjustment module is further configured to: obtain an initial success field in the initial successful execution result and an initial failure field in the initial failed execution result; compare the initial success field with the expected success field corresponding to the user request to obtain a first comparison result; compare the initial failure field with the expected failure field corresponding to the user request to obtain a second comparison result; and adjust the initial successful execution result and the initial failed execution result according to the first comparison result and the second comparison result to obtain a target successful execution result and a target failed execution result.

[0224] B16. The data processing apparatus as described in B13, wherein the parameter adjustment module is further configured to determine the failure reason in the target failed execution result, and select the tool parameter to be adjusted from the initial tool parameters according to the failure reason; determine the success result type in the target successful execution result; and adjust the tool parameter to be adjusted according to the success result type to obtain the adjusted target tool parameter.

[0225] B17. The data processing apparatus as described in B16, wherein the parameter adjustment module is further configured to perform preliminary adjustment on the tool parameters to be adjusted according to the user request, and obtain the tool parameters after preliminary adjustment; if the tool execution result returned based on the tool parameters after preliminary adjustment is an execution failure, then determine the failure result type and the failure tool parameters; match the success result type with the failure result type, and adjust the failure tool parameters according to the matching result, to obtain the target tool parameters after adjustment.

[0226] This application also discloses C18. A data processing apparatus, the apparatus comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data processing method as described in any one of A1 to A11.

[0227] This application also discloses D19. A storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the data processing method as described in any one of A1 to A11.

[0228] This application also discloses E20. A computer program product comprising a computer program that, when executed by a processor, implements the steps of a data processing method as described in any one of A1 to A11.

Claims

1. A data processing method, characterized in that, The data processing method includes the following steps: Upon receiving a user request, the large model generates an initial tool invocation instruction, which includes an initial tool and initial tool parameters. After invoking the initial tool invocation command, if the returned tool execution result is execution failure, the initial tool parameters are adjusted according to the reason for failure to obtain the adjusted target tool parameters; The initial tool invocation command is adjusted based on the target tool parameters, and the adjusted target tool invocation command is invoked to generate the result corresponding to the user request.

2. The data processing method as described in claim 1, characterized in that, If, after invoking the initial tool invocation instruction, the returned tool execution result is an execution failure, the initial tool parameters are adjusted according to the reason for the failure to obtain the adjusted target tool parameters, including: After invoking the initial tool invocation command, obtain the tool execution results returned after invoking each initial tool; Determine the successful execution results of the target and the failed execution results of the target in the execution results of the tool; The initial tool parameters are adjusted based on the reasons for failure in the successful execution results and the failed execution results of the target, to obtain the adjusted target tool parameters.

3. The data processing method as described in claim 2, characterized in that, The determination of the successful execution results and the unsuccessful execution results of the tool execution results includes: Extract the target keywords from the tool's execution results and match the target keywords with preset keywords to obtain matching results; Based on the matching results, select the initial successful execution results and the initial failed execution results from the tool's execution results; Based on the initial successful execution result and the initial failed execution result, determine the target successful execution result and the target failed execution result.

4. The data processing method as described in claim 3, characterized in that, The step of determining the target successful execution result and the target failed execution result based on the initial successful execution result and the initial failed execution result includes: Obtain the initial success field from the initial successful execution result and the initial failure field from the initial failed execution result; The initial success field is compared with the expected success field corresponding to the user request to obtain a first comparison result; The initial failure field is compared with the expected failure field corresponding to the user request to obtain a second comparison result; Based on the first comparison result and the second comparison result, the initial successful execution result and the initial failed execution result are adjusted to obtain the target successful execution result and the target failed execution result.

5. The data processing method as described in claim 2, characterized in that, The step of adjusting the initial tool parameters based on the reasons for failure in the successful execution results and the failed execution results of the target, to obtain the adjusted target tool parameters, includes: Determine the cause of failure in the target execution result, and select the tool parameters that need to be adjusted from the initial tool parameters based on the cause of failure; Determine the success result type in the successful execution result of the target; Adjust the tool parameters that need to be adjusted according to the type of successful result to obtain the adjusted target tool parameters.

6. The data processing method as described in claim 5, characterized in that, The step of adjusting the tool parameters that need to be adjusted according to the success result type to obtain the adjusted target tool parameters includes: Based on the user's request, the tool parameters that need to be adjusted are initially adjusted to obtain the initially adjusted tool parameters; If the tool execution result returned based on the initially adjusted tool parameters is an execution failure, then determine the failure result type and the failure tool parameters; The successful result type is matched with the failed result type, and the failed tool parameters are adjusted according to the matching results to obtain the adjusted target tool parameters.

7. A data processing apparatus, characterized in that, The data processing device includes: The instruction generation module is used to generate an initial tool invocation instruction when the large model receives a user request. The initial tool invocation instruction includes an initial tool and initial tool parameters. The parameter adjustment module is used to adjust the initial tool parameters according to the reason for failure if the tool execution result returned after the initial tool call instruction is called and the target tool parameters are obtained after the adjustment. The result generation module is used to adjust the initial tool invocation instruction based on the target tool parameters, and invoke the adjusted target tool invocation instruction to generate the result corresponding to the user request.

8. A data processing device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data processing method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the data processing method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the data processing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Reprocessing data control method and device, storage medium and computer equipment

    CN109992429A

  • Model-based task execution method, device and equipment and readable storage medium

    CN118796479A

  • Query statement generation method and device, equipment and storage medium

    CN119719321A

  • Robot control method and device, equipment and computer readable storage medium

    CN120503204A