Task execution method and device, storage medium and electronic equipment
By obtaining task information in a large language model, determining the target tool, and requesting parameters from the user terminal when the task parameters are insufficient, the problem that large language models cannot directly query information or execute actions is solved, and the accuracy and user experience of task execution are improved.
Patent Information
- Application Number
- CN202311360760.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-25
AI Technical Summary
Large language models cannot directly query certain information or perform specific actions, resulting in inconvenient user experience.
By obtaining the task information of the target task, input it to a large language model to determine the tool information of the target tool. If the task information lacks task parameters, a parameter acquisition request is sent to the user terminal. After obtaining the required parameters, the target tool is called to complete the target task.
Improve the task execution capabilities of large language models, ensuring the accuracy of task execution results and the convenience of user experience.
Smart Images

Figure CN119886321A_ABST
Abstract
Description
Technical Field
[0001] The technical solution disclosed herein relates to the field of deep learning technology, and in particular to a task execution method, device, storage medium and electronic device. Background Art
[0002] Large language models usually refer to deep learning models with large parameters and complex structures. Common large language models include the GPT (Generative Pre-trained Transformer) series and BERT (Bidirectional Encoder Representations from Transformers).
[0003] Generally speaking, users will transfer text, voice and other data that need to be processed to a large language model for processing, and then obtain the output results generated by the large language model.
[0004] However, since large language models generate text by learning semantic and grammatical rules in large-scale text data, they do not have the ability to directly query certain information (such as weather forecasts, train tickets) or perform specific actions (booking train tickets, autonomous driving), which is not convenient for users. Summary of the invention
[0005] In view of this, the present disclosure provides a task execution method, device, storage medium and electronic device to improve the task execution capability of a large language model.
[0006] According to a first aspect of an embodiment of the present disclosure, a task execution method is provided, the method comprising:
[0007] Get the task information of the target task;
[0008] Input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information, wherein the target tool is a tool that needs to be called by the large language model to execute the target task;
[0009] If the large language model determines, based on the tool information, that at least some task parameters are missing from the task information, a parameter acquisition request is sent to the user terminal, where the task parameters are parameters required to call the target tool;
[0010] After obtaining at least part of the task parameters fed back by the user terminal, inputting at least part of the task parameters and the task information into the large language model;
[0011] The large language model calls the target tool to complete the target task based on at least part of the task parameters and the task information.
[0012] According to a second aspect of an embodiment of the present disclosure, there is provided a task execution device, the device comprising:
[0013] An acquisition module is used to obtain task information of a target task;
[0014] A first input module is used to input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information, wherein the target tool is a tool that needs to be called by the large language model to execute the target task;
[0015] A sending module, configured to send a parameter acquisition request to a user terminal if the large language model determines, based on the tool information, that at least some task parameters are missing from the task information, wherein the task parameters are parameters required to call the target tool;
[0016] A second input module, configured to input at least part of the task parameters and the task information into the large language model after acquiring at least part of the task parameters fed back by the user terminal;
[0017] A calling module is used for the large language model to call the target tool to complete the target task based on at least part of the task parameters and the task information.
[0018] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0019] processor;
[0020] a memory for storing processor-executable instructions;
[0021] Wherein, the processor is configured to implement the steps of any task execution method described in the first aspect by running the executable instructions.
[0022] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any task execution method described in the first aspect are implemented.
[0023] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0024] The task information of the target task is input into the large language model. When the large language model finds that it cannot complete the target task by itself, it will call the corresponding target tool to cooperate in completing the target task.
[0025] When calling the target tool to perform a task, the large language model needs to provide the corresponding task parameters. For example, when a user wants to query the weather, it is necessary to know the time and location of the weather that the user wants to query. At this time, time and location are the task parameters that need to be provided.
[0026] However, when users issue tasks, they are often unable to provide all parameters. In other words, large language models often cannot obtain sufficient task parameters based on the task information issued by users. Therefore, by sending a parameter acquisition request to the user terminal, the required parameter information can be obtained in the user terminal, thereby avoiding the problem of being unable to execute tasks or inaccurate task execution results due to failure to obtain sufficient parameters.
[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0029] Figure 1 is a flowchart of a task execution method according to an exemplary embodiment of the present disclosure;
[0030] Figure 2 is a flowchart of another task execution method shown in the present disclosure according to an exemplary embodiment;
[0031] Figure 3 is a flowchart of another task execution method shown in the present disclosure according to an exemplary embodiment;
[0032] Figure 4 is an application scenario diagram of a task execution method according to an exemplary embodiment of the present disclosure;
[0033] Figure 5 is a structural schematic diagram of a task execution device according to an exemplary embodiment of the present disclosure;
[0034] Figure 6 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0036] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0037] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0038] The basic model trained in the early stage is usually controlled by trigger words. For example, the user must accurately say the trigger word "turn on the light" in order for the basic model to control the corresponding tool and perform the task of turning on the light.
[0039] In other words, this type of basic model cannot complete complex instructions randomly issued by users, nor can it understand some of the users' complex needs.
[0040] With the emergence of large language models (LLMs), it has become possible to understand users' complex language logic and communicate with them normally. In order to expand the capabilities of large language models, other tool interfaces can be provided to large language models to enable them to understand users' complex instructions and perform corresponding tasks.
[0041] For example, when a weather forecast interface is provided for a large language model, when a user issues a command such as "query the weather", the large language model can directly call the weather forecast tool and organize the data returned by the tool to obtain the weather information output to the user.
[0042] For another example, when providing the large language model with relevant interfaces for the vehicle control system and navigation system, if the user issues the following task: Help me drive the car to location A, the large language model can understand the user's intention and convey the user's intention to the vehicle control system (or call the vehicle control system) through the corresponding interface to achieve more intelligent autonomous driving, etc.
[0043] When a large language model calls external tools to provide corresponding functions, the following problems may occur:
[0044] When the task parameters provided by the user are insufficient, it is often impossible to provide more accurate task execution results.
[0045] For example, the user only says: Check the weather.
[0046] The task parameters that large language models need to know when querying usually include: time and location. At this time, since the time and location are not clearly expressed in the user's sentence, it is usually assumed that the user is querying the current time and the weather information of the area where the device is located (or the area involved in the historical chat).
[0047] Therefore, when the user wants to query the weather at other times or other places, he will get a weather query result with a relatively large error.
[0048] At this time, users are often required to supplement the corresponding task parameter information to the large language model based on the weather query result with large errors. However, users may not necessarily understand which task parameters are truly missing, so the task parameters that users actively supplement may not be correct and comprehensive. Therefore, large language models often obtain weather query results with large errors based on supplementary results that may not be correct or comprehensive.
[0049] The present disclosure provides a task execution method, which inputs the acquired task information of a target task into a large language model, so that the large language model executes the target task according to its own understanding ability.
[0050] When the large language model finds that it cannot complete the target task, it will call the corresponding target tool to complete the target task according to the interfaces of several pre-configured tools. When the large language model calls the target tool to perform a task, it needs to provide the corresponding task parameters. For example, when a user wants to query the weather, it needs to know the time and location of the weather that the user wants to query. At this time, time and location are the task parameters that need to be provided.
[0051] However, when users issue tasks, they are often unable to provide all the parameters. In other words, large language models are usually unable to obtain sufficient task parameters based on the task information issued by users. Therefore, by sending a parameter acquisition request to the user terminal, the missing task parameters can be obtained from the user terminal, thereby solving the problem of inaccurate task execution results due to the lack of task parameters during the tool calling process, which helps to improve the task execution capabilities of large language models.
[0052] The following is a detailed introduction:
[0053] Figure 1 is a flowchart of a task execution method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method comprises the following steps:
[0054] Step 101, obtaining task information of the target task.
[0055] The method is applied in a component or plug-in configured for a large language model, which is configured with information about the interfaces of various tools and task parameters required to call each tool. It is understandable that this component or plug-in can be part of a large language model or can be set independently of the large language model.
[0056] The task information at least includes a sentence for describing the target task, which can express the user's needs. For example, the sentence describing the target task can be: check today's weather, or order tomorrow's train ticket.
[0057] The user inputs the above task information into the component through the user terminal to obtain the task information of the target task.
[0058] Step 102: input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information. The target tool is a tool that needs to be called by the large language model to execute the target task.
[0059] The obtained task information is used as the input of the large language model, and the large language model is allowed to perform the target task. Since the task information includes at least a sentence for describing the target task. After the sentence is input into the large language model, the large language model can understand the requirements corresponding to the sentence and determine the tool information of the target tool that needs to be called to complete the requirement. The tool information includes but is not limited to: tool name, tool label, and tool function.
[0060] For example, if the sentence is: Check today's weather, the tool information determined by the large language model based on this sentence may be: weather forecast (name of the tool), and may also include information about the interface corresponding to the tool.
[0061] Step 103: If the large language model determines, based on the tool information, that at least some task parameters are missing from the task information, a parameter acquisition request is sent to the user terminal, where the task parameters are the parameters required to call the target tool.
[0062] Exemplarily, the following method can be used to assist a large language model in determining whether some task parameters are missing:
[0063] Determine a first parameter required for the target tool to perform the target task. Input the first parameter and the task information into a large language model to obtain a parameter comparison result output by the large language model, wherein the task information includes at least a portion of a sentence describing the target task to be performed, and the parameter comparison result indicates that the task information lacks at least a portion of the task parameters.
[0064] Let's take the statement "Query today's weather" in the task information as an example:
[0065] When it is determined that the target tool is "weather forecast", it can be determined that the task parameters required by the "weather forecast" tool at least include: time and location, that is, to query the weather at which time and location.
[0066] At this time, the first parameter includes: time parameter and location parameter.
[0067] After the first parameter and task information are input into the large language model, the large language model first analyzes which parameters are included in the task analysis. For example, the large language model can determine that the time parameter is "today" by analyzing "query today's weather". At this time, the large language model may need to call the corresponding clock interface to query the specific time point corresponding to "today", or directly call the time of the server or user terminal to determine the specific time point corresponding to "today".
[0068] Through analysis, the large language model can determine that at least the "location parameter" is missing in the task information, so at least a parameter acquisition request for acquiring the "location parameter" needs to be sent to the user terminal. (In addition, in order to ensure more accurate task parameters, it is also possible to simultaneously determine whether the "time parameter" is accurate when acquiring the "location parameter".)
[0069] Exemplarily, the sending a parameter acquisition request to the user terminal includes:
[0070] A parameter inquiry statement is output to the user terminal, where the parameter inquiry statement is used to instruct the user to provide at least part of the task parameters.
[0071] Parameter query sentences are generated by the large language model based on missing parameters. For example, when the large language model finds that the "query today's weather" in the task information lacks the "location parameter", it may generate the following question:
[0072] Which location (city) do you want to check the weather in?
[0073] At this time, the user terminal may directly output the parameter query statement (for example, display the parameter query statement in a display interface, and / or voice broadcast the parameter query statement).
[0074] The user can further supplement the relevant parameters of the location through the user terminal.
[0075] This direct inquiry method can assist users to supplement comprehensive and accurate task parameters, avoiding the problem of directly generating task execution results with large errors. In addition, it can solve the problem that after users realize that the task execution results are inaccurate and actively supplement task parameters, the task parameters supplemented by users are still not comprehensive due to uncertainty about which parameters are missing.
[0076] Step 104: after obtaining at least part of the task parameters fed back by the user terminal, inputting at least part of the task parameters and the task information into the large language model.
[0077] After obtaining at least part of the missing task parameters through the user terminal, at this time, at least part of the current task parameters and the task parameters in the task information are the first parameters that can meet the need to call the target tool. Therefore, at least part of the task parameters and the task information can be directly input into the large language model, so that the large language model can call the target tool according to the task parameters therein.
[0078] Step 105: The large language model calls the target tool to complete the target task based on at least part of the task parameters and the task information.
[0079] After the large language model calls the target tool, the target tool will perform the corresponding target task (such as checking the weather or booking train tickets, or turning on the lights, opening the windows, etc.).
[0080] The task information of the target task is input into the large language model. When the large language model finds that it cannot complete the target task by itself, it will call the corresponding target tool to cooperate in completing the target task.
[0081] When calling the target tool to perform a task, the large language model needs to provide the corresponding task parameters. For example, when a user wants to query the weather, it is necessary to know the time and location of the weather that the user wants to query. At this time, time and location are the task parameters that need to be provided.
[0082] However, when users issue tasks, they are often unable to provide all parameters. In other words, large language models often cannot obtain sufficient task parameters based on the task information issued by users. Therefore, by sending a parameter acquisition request to the user terminal, the required parameter information can be obtained in the user terminal, thereby avoiding the problem of being unable to execute tasks or inaccurate task execution results due to failure to obtain sufficient parameters.
[0083] Optionally, the method further comprises the following steps:
[0084] Sending a task execution result to the user terminal; the task execution result is determined by the large language model based on the execution information fed back by the target tool.
[0085] For example, when querying the weather, the target tool will feed back the corresponding execution information to the large language model (such as weather information at a specific time and a specific location). The large language model can then organize the execution information accordingly and obtain the task execution result. For example, organize it into an organized and concise output statement. For another example, the large language model can also make targeted replies, such as when the user asks: Will it snow today? After determining the required task parameters, the large language model should execute: query the weather information at a certain time (today) and a certain location (task parameters supplemented by the user).
[0086] The information fed back by the weather forecast tool is usually all the information for the day (for example, sunny, 3 degrees Celsius to 7 degrees Celsius). The large language model analyzes this execution information and concludes that it will not snow today. At this time, "It will not snow today" can be output to the user terminal as the task execution result. In this way, there is no need to output the tool's execution information directly to the user terminal, which is more convenient and intelligent for users.
[0087] Optional, Figure 2 is a flowchart of another task execution method according to an exemplary embodiment of the present disclosure, such as Figure 2 As shown, the method of obtaining the tool information of the target tool determined by the large language model according to the task information includes the following steps:
[0088] Step 201: Obtain a statement in the task information that is used to describe the tool to be used and the target task to be performed.
[0089] When users use large language models, in addition to describing the target tasks to be performed, they can also describe the tools to be used to avoid the problem of being unable to call tools due to unclear interfaces of the tools that can be used.
[0090] The statement describing the tool to be used may include one or more tools, so that the user can subsequently continue to issue multiple instructions for different tools.
[0091] For example, a user can enter the following task information:
[0092] You can perform subsequent tasks based on the weather forecast tool, train ticket tool, clock tool, and book tool I provide. Let me introduce the first task: help me check the weather.
[0093] It can be seen that the above statement includes information about the tool and the target task.
[0094] Step 202: input the sentence into a large language model to obtain information of candidate tools output by the large language model; the candidate tool is at least one tool among the tools to be used.
[0095] Large language models can sort out information about candidate tools based on the input sentences.
[0096] For example, when the large language model determines the candidate tool as the book tool based on the above content, it can be noticed that the candidate tool determined by the large language model is wrong. The large language model may have wrongly understood the context that the user wants to search for books related to weather.
[0097] At this time, if no verification is performed, the large language model will directly call the corresponding book tool to obtain books related to weather. This causes the large language model to output incorrect task execution results. In order to avoid the above problem, step 203 and step 204 are executed.
[0098] Step 203: Perform tool verification based on the information of the candidate tool to obtain a verification result.
[0099] For example, Figure 3 is a flowchart of another task execution method according to an exemplary embodiment of the present disclosure, such as Figure 3 As shown, the tool verification is performed based on the information of the candidate tool to obtain the verification result, including:
[0100] Step 2031: Use the candidate tool information and the task information as inputs to the large language model to obtain output results.
[0101] When the input of the large language model includes information about the candidate tool and task information, the large language model may analyze the candidate tool, including but not limited to: analyzing functions, principles, usage methods, etc.
[0102] For example, when the candidate tool is "book tool", the large language model can determine that the book tool is a tool used to search for books, read books, record and share book reviews by analyzing the functions of the book tool.
[0103] At this point, based on the book tool's functions of searching for books, reading books, and recording and sharing book reviews, it can be analyzed that this candidate tool does not have the ability to perform the target task.
[0104] For another example, when the candidate tool is a “weather forecast tool,” the large language model can analyze that this candidate tool has the ability to perform the target task.
[0105] Step 2032, in response to the output result indicating that the candidate tool has the ability to perform the target task, a verification result of successful verification is obtained; or, in response to the output result indicating that the candidate tool does not have the ability to perform the target task, a verification result of failed verification is obtained.
[0106] Based on the output results, it can be determined whether the candidate tool can perform the target task, avoiding the situation where the large language model misunderstands the user's needs and directly calls the wrong tool.
[0107] Alternatively, the task information may be re-input into the large language model to determine whether the candidate tools obtained twice by the large language model are consistent. If they are consistent, it indicates that the verification is successful; if they are inconsistent, it indicates that the verification has failed.
[0108] Step 204: in response to the verification result being a successful verification, determining the candidate tool as the target tool, wherein the successful verification indicates that the candidate tool has the ability to perform the target task.
[0109] Through the above method, by verifying the candidate tool, it is possible to avoid directly calling the candidate tool after the large language model determines an erroneous candidate tool, thereby preventing the erroneous task execution result from being obtained.
[0110] Optionally, the method further comprises the following steps:
[0111] In response to the verification result being a verification failure, a prompt message is added to the sentence input into the large language model; the prompt message is used to indicate that the candidate tool does not have the ability to perform the target task.
[0112] Exemplarily, the prompt information may be at least one of the following:
[0113] Verification failed, verification of the candidate tool (including tool information) failed, the candidate tool (including tool information) does not have the ability to perform the target task, and a new candidate tool is re-determined.
[0114] Figure 4 is an application scenario diagram of a task execution method according to an exemplary embodiment of the present disclosure, such as Figure 4 As shown, through components or plug-ins, the tool library is configured to large language models ( Figure 4 (referred to as the large model in this article).
[0115] After obtaining the task information, the large language model generates a tool based on the task information and performs self-verification (verifying whether the tool has the ability to perform the target task). When the verification is successful, the large language model determines the task parameters based on the task information and checks whether the task parameters are complete. When the task parameters are incomplete, it is necessary to send a parameter acquisition request to the user terminal; when the task parameters are complete, the tool can be directly called to perform the target task.
[0116] After the tool executes the target task, it will generate execution information. The tool will feed the execution information back to the large language model, and the large language model will organize it to obtain the corresponding task execution results.
[0117] The contents involved in the above steps have been explained in the above embodiments and will not be repeated here.
[0118] For the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously.
[0119] Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0120] Corresponding to the aforementioned application function realization method embodiment, the present disclosure also provides an embodiment of a task execution device and a corresponding terminal.
[0121] Figure 5 is a structural diagram of a task execution device according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the task execution device may include:
[0122] The acquisition module 501 is used to acquire task information of the target task.
[0123] The first input module 502 is used to input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information, wherein the target tool is a tool that needs to be called by the large language model to execute the target task.
[0124] The sending module 503 is used to send a parameter acquisition request to the user terminal if the large language model determines based on the tool information that at least some task parameters are missing in the task information, where the task parameters are parameters required to call the target tool.
[0125] The second input module 504 is used to input at least part of the task parameters and the task information into the large language model after acquiring at least part of the task parameters fed back by the user terminal.
[0126] The calling module 505 is used for the large language model to call the target tool to complete the target task based on at least part of the task parameters and the task information.
[0127] Optionally, when the sending module 503 is used to send a parameter acquisition request to a user terminal, it is used to:
[0128] A parameter inquiry statement is output to the user terminal, where the parameter inquiry statement is used to instruct the user to provide at least part of the task parameters.
[0129] Optionally, when the first input module 502 is used to obtain the tool information of the target tool determined by the large language model according to the task information, it is used to:
[0130] Get the statement in the task information that describes the tool to be used and the target task to be performed.
[0131] The sentence is input into a large language model to obtain information of candidate tools output by the large language model; the candidate tool is at least one tool among the tools to be used.
[0132] Tool verification is performed based on the information of the candidate tool to obtain a verification result.
[0133] In response to the verification result being a successful verification, the candidate tool is determined as the target tool, and the successful verification indicates that the candidate tool has the ability to perform the target task.
[0134] Optionally, the device further comprises:
[0135] An adding module is used to add prompt information to the sentence input into the large language model in response to the verification result being a verification failure; the prompt information is used to indicate that the candidate tool does not have the ability to perform the target task.
[0136] Optionally, when the first input module 502 is used to perform tool verification based on the information of the candidate tool and obtain a verification result, it is used to:
[0137] The information of the candidate tools and the task information are used as inputs of the large language model to obtain output results.
[0138] In response to the output result indicating that the candidate tool has the ability to perform the target task, a verification result indicating successful verification is obtained.
[0139] Alternatively, in response to the output result indicating that the candidate tool does not have the ability to perform the target task, a verification result indicating verification failure is obtained.
[0140] Optionally, when the sending module 503 is used to determine, based on the tool information, that at least some task parameters are missing from the task information, it is used to:
[0141] A first parameter required for the target tool to perform the target task is determined.
[0142] The first parameter and the task information are input into a large language model to obtain a parameter comparison result output by the large language model, wherein the task information includes at least part of a sentence describing a target task to be performed, and the parameter comparison result indicates that the task information lacks at least part of the task parameters.
[0143] Optionally, the device further comprises:
[0144] A result sending module is used to send the task execution result to the user terminal; the task execution result is determined by the large language model based on the execution information fed back by the target tool.
[0145] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.
[0146] Accordingly, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the steps of any of the above-mentioned task execution methods by running the executable instructions.
[0147] Figure 6 6 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. For example, the electronic device 600 may be a user device, which may specifically be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device such as a smart watch, a smart glasses, a smart bracelet, a smart running shoe, etc.
[0148] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0149] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0150] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0151] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0152] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0153] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0154] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0155] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0156] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, 4G LTE, 5G NR or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0157] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0158] In an exemplary embodiment, a non-temporary computer-readable storage medium is also provided, such as a memory 604 including instructions, which, when executed by a processor 620 of an electronic device 600, enables the electronic device 600 to perform any of the above-mentioned task execution methods.
[0159] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0160] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0161] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A task execution method, characterized in that: The method comprises: Get the task information of the target task; Input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information, wherein the target tool is a tool that needs to be called by the large language model to execute the target task; If the large language model determines, based on the tool information, that at least some task parameters are missing from the task information, a parameter acquisition request is sent to the user terminal, where the task parameters are parameters required to call the target tool; After obtaining at least part of the task parameters fed back by the user terminal, inputting at least part of the task parameters and the task information into the large language model; The large language model calls the target tool to complete the target task based on at least part of the task parameters and the task information.
2. The method according to claim 1, characterized in that The sending of a parameter acquisition request to the user terminal includes: A parameter inquiry statement is output to the user terminal, where the parameter inquiry statement is used to instruct the user to provide at least part of the task parameters.
3. The method according to claim 1, characterized in that: The acquiring tool information of the target tool determined by the large language model according to the task information includes: Obtaining a statement in the task information that describes the tool to be used and the target task to be performed; Inputting the sentence into a large language model to obtain information of candidate tools output by the large language model; the candidate tool is at least one tool among the tools to be used; Perform tool verification based on the information of the candidate tool to obtain a verification result; In response to the verification result being a successful verification, the candidate tool is determined as the target tool, and the successful verification indicates that the candidate tool has the ability to perform the target task.
4. The method according to claim 3, characterized in that The method further comprises: In response to the verification result being a verification failure, a prompt message is added to the sentence input into the large language model; the prompt message is used to indicate that the candidate tool does not have the ability to perform the target task.
5. The method according to claim 3 or 4, characterized in that: The performing tool verification based on the information of the candidate tool to obtain a verification result includes: Using the information of the candidate tool and the task information as inputs of the large language model to obtain an output result; In response to the output result indicating that the candidate tool has the ability to perform the target task, obtaining a verification result of successful verification; Alternatively, in response to the output result indicating that the candidate tool does not have the ability to perform the target task, a verification result indicating verification failure is obtained.
6. The method according to claim 1, characterized in that The large language model determines, based on the tool information, that at least some task parameters are missing from the task information, including: Determining a first parameter required for the target tool to perform the target task; The first parameter and the task information are input into a large language model to obtain a parameter comparison result output by the large language model, wherein the task information includes at least part of a sentence describing a target task to be performed, and the parameter comparison result indicates that the task information lacks at least part of the task parameters.
7. The method according to claim 1, characterized in that The method further comprises: Sending a task execution result to the user terminal; the task execution result is determined by the large language model based on the execution information fed back by the target tool.
8. A task execution device, characterized in that: The device comprises: Acquisition module, to obtain the task information of the target task; A first input module is used to input the task information into a preset large language model, and obtain tool information of a target tool determined by the large language model according to the task information, wherein the target tool is a tool that needs to be called by the large language model to execute the target task; A sending module, configured to send a parameter acquisition request to a user terminal if the large language model determines, based on the tool information, that at least some task parameters are missing from the task information, wherein the task parameters are parameters required to call the target tool; A second input module is used to input at least part of the task parameters and the task information into the large language model after acquiring at least part of the task parameters fed back by the user terminal; A calling module is used for the large language model to call the target tool to complete the target task based on at least part of the task parameters and the task information.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of any one of the methods of claims 1 to 7 by running the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1 to 7 are implemented.